2009-02-06, 08:40 PM
Pages: 1 2
2009-02-07, 05:57 AM
$find = "#(^|>)([^<]*)(".preg_quote($word, "#").")#i";
$replacement = "$1$2<span class=\"highlight\">$3</span>";
Appears to be a number of problems with that actually, such as breaking HTML entities as well.A cheap fix could be to make the spans not have a border, thus stacked spans don't appear to be stacked... Won't fix the issue with HTML entities however (write another replacement for that?).
2009-02-20, 10:23 AM
Bump...
2009-02-20, 07:02 PM
(2009-02-20, 10:23 AM)Tom Loveric Wrote: [ -> ]Bump...
As a staff member, you should you already know how busy we are. Bumping will not accomplish anything and you should cease from doing that in the future.
2009-03-10, 07:28 PM
Suggested fix. Find in inc/functions.php:
add after
Find in the same file:
replace with
because that is the minimum limit for a word when searching otherwise it just ignores the word. We should ignore it as well.
(more fix coming later)
function build_highlight_array($terms)
{
add after
global $mybb;
if($mybb->settings['minsearchword'] < 1)
{
$mybb->settings['minsearchword'] = 3;
}
Find in the same file:
foreach($split_words as $word)
{
if(!$word)
{
continue;
}
$words[] = trim($word);
}
replace with
foreach($split_words as $word)
{
if(!$word || strlen($word) < $mybb->settings['minsearchword'])
{
continue;
}
$words[] = trim($word);
}
because that is the minimum limit for a word when searching otherwise it just ignores the word. We should ignore it as well.
(more fix coming later)
2009-08-20, 07:31 PM
Corresponding Ticket: http://dev.mybboard.net/issues/411
Pages: 1 2