About this module

This module has renewal of search function in XOOPS, because it is not gentle with Japanese(multi byte). The retrieval block is included, too.

Function(difference between original search function)

* A part of the function optimized to Japanese is not worked if server doesn't support mbstring.

Module list for which text display can be used(alphabetical)

The following modules are corresponded by plug-ins.

BluesBB
comment_search
mydownloads / mylinks / newbb / news
XoopsFAQ
Xwords

The following modules corresponds by themself. therefore, the plug-ins is not enclosed.
d3blog
myAlbum-P
piCal
pico
TinyD
wraps

The following modules are, the author is distributing the plug-in.
rssc
weblinks
xfsection

Immunity and Guarantee

Installation

  1. The data compressed file is defrosted and it uploads it to the module directory.
  2. Please install it in the "Module Management".
  3. Please set it variously by "General setting" of this module.
  4. Please set the block as the group.

Uninstallation

Please execute uninstallation from the "Module Management" a usual similar module.

Tips for more secure

This module patches the security hole in the core of XOOPS 2.0.x.
In search.php, the weakness exists that executes extract() two times. So, I will introduce the method of closing it by hucking the core.

search.php(before):
$xoopsOption['pagetype'] = "search";

include 'mainfile.php';
$config_handler =& xoops_gethandler('config');
$xoopsConfigSearch =& $config_handler->getConfigsByCat(XOOPS_CONF_SEARCH);

if ($xoopsConfigSearch['enable_search'] != 1) {
    header('Location: '.XOOPS_URL.'/index.php');
    exit();
}

extract($_GET);
extract($_POST, EXTR_OVERWRITE);

search.php(after):
$xoopsOption['pagetype'] = "search";

include 'mainfile.php';

// xoops search japanese optimization START
if(file_exists(XOOPS_ROOT_PATH."/modules/search/index.php")){
        $module_handler =& xoops_gethandler('module');
        $module =& $module_handler->getByDirname('search');
        if( $module->getVar('isactive') == 1){
                header("Location: ".XOOPS_URL."/modules/".$mydirname."/index.php?".$_SERVER['QUERY_STRING']);
                exit();
        }
}
// xoops search japanese optimization END

$config_handler =& xoops_gethandler('config');
$xoopsConfigSearch =& $config_handler->getConfigsByCat(XOOPS_CONF_SEARCH);

if ($xoopsConfigSearch['enable_search'] != 1) {
    header('Location: '.XOOPS_URL.'/index.php');
    exit();
}

extract($_GET);
extract($_POST, EXTR_OVERWRITE);

Revision History

Version Date News
1.0 2005-01-19 First release
2.0 2006-06-02 Rewrited the typo that causes SQL Injection.
[Bug]The text was not displayed when retrieving from the block.
2.01 2007-12-05 Deleted link to Amethyst Blue site.
2.01a 2008-12-16 [Bug]The search is not done correctly when words that include comma.
2.01b 2008-12-18 Added two language files(English and Ja_utf8) and help file(this file).
2.01c ----- Extended the range of the retrieval for Japanese.
2.01d 2009-01-13 [Bug?]Corrected the point that failed in cutting out the retrieval result unusually.
Assumed the display range specification to be character number conversion from byte conversion.
2.01e 2009-02-01 added mymenu, said "good-bye" to system modules and "welcome" to altsys.
2.02 2009-03-19 Hack version Release.
2.02a 2009-04-27 [Bug]Corrected entity reference("&" -> "&")in mymenu.
2 templates and help(this file) were updated.
2.03 2010-03-24 [Bug]Excluded modules Options were not saved.
help(this file) were updated.

Special Thanks:

Content display hack by nao-pon <http://hypweb.net/xoops/>
Idea that "when retrieving, the module can be selected" by dendeke.
myblocksadmin by GIJOE <http://xoops.peak.ne.jp/>

Copyrights

Original search module was developed by SUIN. and new version(> 2.01) was hacked by Shigeto Yoshida.