cmsms and greek
Posted: Wed May 09, 2007 8:32 pm
Thank you for providing such a great project to the internet community. I'm from greece my name is john and i'm using cmsms for a 6 months now building sites. I must say i find cmsms absolutely great. I myself have very good knowledge of xhtml-css mediocre php and little javascript. I'm contacting you about some problems that i have encountered and solved in cmsms when working with greek. Maybe the folowing problems exist also for languages other than English.
1)my site and my sql database are in utf-8 so in order for content to be inserted right in the database and be searchable
i added set names utf8. Otherwise the content inserts in the database like weird characters...
Line 109 include.php
2)Search results in utf-8 (fix to show search results with greek searchwords) otherwise Search shows results only for English searchwords.
Line 21 action.dosearch.php
3)Even with the "set names utf8" added, fckeditor still inserted weird characters in the database (with no editor content inserted right in the database) so i switched to tinymce with in tinyconfig.php.
4)I don't know if this is a bug but when you put a searchword in the search box that has preceding spaces, some weird character results appear in the result page! The above change in code (trim) fixed it but i don't know what is causing it.
Line 6 action.dosearch.php
Are the above changes correct to be implemented in cmsms core?
And if yes can they be implemented in the next release?
Thank you very much.
1)my site and my sql database are in utf-8 so in order for content to be inserted right in the database and be searchable
i added set names utf8. Otherwise the content inserts in the database like weird characters...
Line 109 include.php
Code: Select all
#Load them into the usual variables. This'll go away a little later on.
global $DONT_LOAD_DB;
if (!isset($DONT_LOAD_DB))
{
$cmsdb =& $gCms->GetDB();
$cmsdb->Execute('set names utf8'); // database connection with utf-8
}
Line 21 action.dosearch.php
Code: Select all
#$searchphrase = implode(' OR ', array_fill(0, $nb_words, 'word = ?'));
$ary = array();
foreach ($words as $word)
{
$word = trim($word);
$ary[] = "word = " . $db->qstr($word, ENT_COMPAT, 'UTF-8'); //query results in utf-8
}
$searchphrase = implode(' OR ', $ary);
}
Code: Select all
mode : "exact"
4)I don't know if this is a bug but when you put a searchword in the search box that has preceding spaces, some weird character results appear in the result page! The above change in code (trim) fixed it but i don't know what is causing it.
Line 6 action.dosearch.php
Code: Select all
// Fix to prevent XSS like behaviour. See: http://www.securityfocus.com/archive/1/455417/30/0/threaded
$params['searchinput'] = htmlspecialchars(trim($params['searchinput'])); //trim added
@$this->SendEvent('SearchInitiated', array(&$params['searchinput']));
And if yes can they be implemented in the next release?
Thank you very much.