Author |
Message |
gopo
New Member
Joined: Dec 28, 2005
Posts: 12
|
Posted:
Mon Dec 15, 2008 5:31 pm |
|
Its a little something I/m having a hard time fixing. When you search for example "system" the results will only highlight the word system and not System (notice the capital letter), even though results are displayed with and without capital letter. It's not the exact query but to me system and System and SysTem are the same words...If anyone knows a fix for this.
thanx |
|
|
|
|
Guardian2003
Site Admin
Joined: Aug 28, 2003
Posts: 6799
Location: Ha Noi, Viet Nam
|
Posted:
Mon Dec 15, 2008 7:41 pm |
|
Which 'search' function are you using? There is one for news, one for the forums..... |
|
|
|
|
gopo
|
Posted:
Mon Dec 15, 2008 9:37 pm |
|
|
|
|
Palbin
Site Admin
Joined: Mar 30, 2006
Posts: 2583
Location: Pittsburgh, Pennsylvania
|
Posted:
Mon Dec 15, 2008 9:59 pm |
|
*** EDIT****
See below post for revised code. |
Last edited by Palbin on Tue Dec 16, 2008 7:59 pm; edited 1 time in total |
|
|
|
gopo
|
Posted:
Tue Dec 16, 2008 6:46 pm |
|
Palbin
Are you talking about index.php? These are the only files I have in RN2.30 /modules/Downloads/ ... index.php, d_config.php and voteinclude.php
Tryed with index.php but couldn't get it to work |
|
|
|
|
Palbin
|
Posted:
Tue Dec 16, 2008 7:43 pm |
|
Maybe I over wrote the default download module in my base RN files. I will take a look and get back to you. |
|
|
|
|
Palbin
|
Posted:
Tue Dec 16, 2008 7:58 pm |
|
Ok apperently I did over write the default module. See below for the correct changes.
The following lines of code are in /modules/Downloads/index.php
Find line 1176:
Code:
$title3 = ereg_replace($query, "<b>$query</b>", $title3);
|
Replace with:
Code:
$title3 = ereg_replace("|$query|i", "<b>$query</b>", $title3);
|
Find lines 1199:
Code:
$title = ereg_replace($query, "<b>$query</b>", $title);
|
Replace with:
Code:
$title = ereg_replace("|$query|i", "<b>$query</b>", $title);
|
Find lines 1211:
Code:
$description = ereg_replace($query, "<font color=\"#CC0000\"><b>$query</b></font>", $description);
|
Replace with:
Code:
$description = ereg_replace("|$query|i", "<font color=\"#CC0000\"><b>$query</b></font>", $description);
|
|
|
|
|
|
Palbin
|
Posted:
Tue Dec 16, 2008 8:00 pm |
|
once again let me know if this works |
|
|
|
|
gopo
|
Posted:
Tue Dec 16, 2008 9:28 pm |
|
After changing the last line description is gone magic |
|
|
|
|
Palbin
|
Posted:
Tue Dec 16, 2008 11:06 pm |
|
Ok i'll have to try it myself and play with it. |
|
|
|
|
Palbin
|
Posted:
Tue Dec 16, 2008 11:16 pm |
|
I am not sure when I will get to this because I need to setup a clean install. All the sites I have have NSN downloads on them. |
|
|
|
|
gopo
|
Posted:
Wed Dec 17, 2008 12:18 am |
|
Okay no problem. Thanx for trying! |
|
|
|
|
gopo
|
Posted:
Sun Dec 21, 2008 3:36 am |
|
... and the solution to my question is eregi_replace . This works! |
|
|
|
|
Guardian2003
|
Posted:
Sun Dec 21, 2008 5:20 am |
|
gopo That sounds like it could be PHP version specific. Could you possible find out which version of PHP you are using. |
|
|
|
|
Palbin
|
Posted:
Sun Dec 21, 2008 10:58 am |
|
eregi should work on php 4.x and 5.x |
|
|
|
|
gopo
|
Posted:
Sun Dec 21, 2008 11:04 am |
|
|
|
|
Guardian2003
|
Posted:
Sun Dec 21, 2008 11:20 am |
|
Palbin wrote: | eregi should work on php 4.x and 5.x | yes and so should ereg_replace
I know eregi is case insenseitve not sure about ereg
Nice that the problem is solved anyhow |
|
|
|
|
|