#### 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)

- It show the number of lowest characters by single and multi byte.
- Brushup some language resources.
- The result can be laid out with the template, so you may select various plug-in, as you like.
- It changes like showing that there is no module that can be retrieved when there is no module that can be retrieved.
- extract() is removed and the variable pollution is prevented.
- It having separated from a core of XOOPS.
- Administrator can manage freely set "module to be retrieved".
- The text of the result can be displayed(extension-free in the plug-in).
- This module has block that redirects automatically when there was request in http:// your site/search.php. If you don't use original search function, you have to set block completely as displayed in all pages and all groups.

* 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

- The influence that this application gives you is assumed to be not responsible at all to those who produce.
- Those who produce abdicate all responsibility for the user of this application.
- The user of this application doesn't have a previous notice and those who produce do not assume the responsibility to those who produce for those having the right to decide the discontinuance of time and development that changes and distributes this application etc. freely, and giving it to the user at all.
- It is not production person's obligation though those who produce make an effort to the solution of the trouble of this application.
- The user assumes that he or she assumes all responsibilities of this application when this application is used and agreed to the above-mentioned matter.

#### 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("&" -> "&amp;")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.