Search Module - Greek Search

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
tsiger
Forum Members
Forum Members
Posts: 18
Joined: Tue Oct 24, 2006 9:29 am

Re: Search Module - Greek Search

Post by tsiger »

actually the line i mentioned before is :

Code: Select all

$ary[] = "word = " . $db->qstr($word);
jozef

Re: Search Module - Greek Search

Post by jozef »

no, its more tricky. Do not use FCKEditor. Regardless the settings in its config file, the content from FCK is always being encoded with hmlentities.

The only working solution for MySQL 4.1 or MySQL 5 with collation utf8_general_ci:
- always connect to MySQL with utf8. Patch the include.php file; add this line:

Code: Select all

$db->Execute('set names utf8');
after line

Code: Select all

$db =& $gCms->GetDB();
- do not use FCKEditor
- in the file action.dosearch.php i replaced this line :

Code: Select all

$ary[] = "word = " . $db->qstr(htmlentities($word, ENT_COMPAT, 'UTF-8'));
with this:

Code: Select all

$ary[] = "word = " . $db->qstr($word);
Resume: Core developers, please read the articles i posted, and remove htmlentities from CMSMS. Use TinyMCE, if i remember TinyMCE has a config option "raw" which really stores content in utf8.
tsiger
Forum Members
Forum Members
Posts: 18
Joined: Tue Oct 24, 2006 9:29 am

Re: Search Module - Greek Search

Post by tsiger »

cool :)
jozef

Re: Search Module - Greek Search

Post by jozef »

tsiger, it was a nice collaboration  :)
What about my multilingual problem? Do you have any tips?
kode_fi
Forum Members
Forum Members
Posts: 21
Joined: Mon Oct 17, 2005 7:13 am

Re: Search Module - Greek Search

Post by kode_fi »

Thank's guys!!!

Searching works now as it should even when content is not encoded HTML entities. This was BIG problem for my project, but now it's solved.
You really saved my weekend!!!

Teemu
tsiger
Forum Members
Forum Members
Posts: 18
Joined: Tue Oct 24, 2006 9:29 am

Re: Search Module - Greek Search

Post by tsiger »

Hey jozef :) This is the first time using cmsmadesimple and i will need multilingual support for sure. At the point i get there i ll be the first to post my tips :)
Locked

Return to “CMSMS Core”