Current time: 04-20-2014, 03:52 PM Hello There, Guest! (LoginRegister)


Highlighted search results..
02-06-2009, 08:40 PM
Post: #11
RE: Highlighted search results..
It's okay, at least someone else is noticing this so it's not just meToungue.
Find all posts by this user
02-07-2009, 05:57 AM
Post: #12
RE: Highlighted search results..
PHP Code:
        $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?).
Visit this user's website Find all posts by this user
02-20-2009, 10:23 AM
Post: #13
RE: Highlighted search results..
Bump...
Find all posts by this user
02-20-2009, 07:02 PM (This post was last modified: 02-20-2009 07:03 PM by Ryan Gordon.)
Post: #14
RE: Highlighted search results..
(02-20-2009 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.
Visit this user's website Find all posts by this user
03-10-2009, 07:28 PM
Post: #15
RE: Highlighted search results..
Suggested fix. Find in inc/functions.php:

PHP Code:
function build_highlight_array($terms)


add after

PHP Code:
global $mybb;

if(
$mybb->settings['minsearchword'] < 1)
{
    
$mybb->settings['minsearchword'] = 3;


Find in the same file:

PHP Code:
foreach($split_words as $word)
{
    if(!
$word)
    {
        continue;
    }
    
$words[] = trim($word);


replace with

PHP Code:
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)
Visit this user's website Find all posts by this user
08-20-2009, 07:31 PM
Post: #16
RE: Highlighted search results..
Corresponding Ticket: http://dev.mybboard.net/issues/411

[Image: logo2.png]
MyBBSource.com: Plugins, Themes and MyCodes
Visit this user's website Find all posts by this user


Forum Jump:


User(s) browsing this thread: 1 Guest(s)

Contact Us | MyBB | Return to Top | Return to Content | Lite (Archive) Mode | RSS Syndication