42
Thank you all.
For multi-bytes language (my language is Chinese
![](https://xoops.org/uploads/smil3dbd4d6422f04.gif)
), after set "Use keywords highlighting" to true, then open the article by the search, the story's content is abnormal. Modified the class/keyhighlighter.class.php like below, it's OK now.
find:
$patterns[] = '/(?' . '>' . $keyword . '+)/si';
replaced with:
$patterns[] = '/(?' . '>' . preg_quote($keyword) . ')/si';
find:
$patterns[] = '/(?' . '>' . $this->preg_keywords . '+)/si';
replaced with:
$patterns[] = '/(?' . '>' . preg_quote($this->preg_keywords) . ')/si';
find:
$this->preg_keywords = preg_replace ('/[^w ]/si', '', $this->keywords);
replaced with:
if ( XOOPS_USE_MULTIBYTES ) {
$this->preg_keywords = trim($this->keywords);
} else {
$this->preg_keywords = preg_replace ('/[^w ]/si', '', $this->keywords);
}
find:
$buffer = xoops_substr($buffer, 1, -1);
replaced with:
$buffer = substr($buffer, 1, -1);
Another question:
In the news admin home, here is a "News Statistics", and a stats "There are (x) News published in Home" in it, I published some news in home, and this stats is always "There are 0 News published in Home". This is there any problem?