Go Back   PHP Link Directory Forum > PHP Link Directory (phpLD) > Mods and contribution Discussion

Mods and contribution Discussion This forum is only for discussion of modding phpLD. For specific mod releases, please see the appropriate forum.

Closed Thread
 
topic widgets
Old 09-28-2005   #1
VSDan
Supporter
Moderator
 
VSDan's Avatar
 
Join Date: Sep 2005
Location: Vancouver, BC, Canada
Posts: 1,184
Default [Highlight Search Terms] Mod

The following mod will highlight terms in the search results page. As easy as 1-2-3:

Step 1
Open templates/link.tpl:

Find:

Code:
Content visible to registered users only.
Add the following before:

Code:
Content visible to registered users only.
Step 2
Find:

Code:
Content visible to registered users only.
Replace with:

Code:
Content visible to registered users only.
Step 3
Find:

Code:
Content visible to registered users only.
Replace with:

Code:
Content visible to registered users only.
[UPDATE:] change 'term' to 'search' in first code block to use this mod for phpLD 3.04+


Cheers,

Dan
Virtual Solutions
monster-submit.com

Last edited by VSDan; 12-23-2006 at 07:38 PM.
VSDan is offline  
Old 09-28-2005   #2
Sharr76
 
Join Date: Jul 2005
Posts: 70
Default

Can we see this working?
Sharr76 is offline  
Old 09-28-2005   #3
VSDan
Supporter
Moderator
 
VSDan's Avatar
 
Join Date: Sep 2005
Location: Vancouver, BC, Canada
Posts: 1,184
Default

Sure can: go to the following URL, and enter webmaster as search term:

http://www.monster-submit.com/directory/


Cheers,

Dan
Virtual Solutions
monster-submit.com
VSDan is offline  
Old 12-09-2005   #4
Neticus
Supporter
 
Neticus's Avatar
 
Join Date: Dec 2005
Posts: 484
Default

Thanks for a great mod everything works as instructed. Yet I seem to be having the problem of words being over-highlighted.
For instance a search for 'hosting' finds 'Linux hosting' - hosting will be highlighted but the space before it will also be highlighted along with the word. This over-highlighting poses problems as the process dosen't seem to recognise 'hosting' if 'linuxhosting' is placed together as one word.

I don't understand maybe its me any help much appreciated, thanks
Neticus
Neticus is offline  
Old 12-09-2005   #5
VSDan
Supporter
Moderator
 
VSDan's Avatar
 
Join Date: Sep 2005
Location: Vancouver, BC, Canada
Posts: 1,184
Default

Hi Neticus:

I don't have that problem myself. Can you provide URL to your directory so I can check.
__________________
Dan

phpLD Mods :: phpLD_Vault
Webmaster Resources Directory
phpLD_Vault Support

IMPORTANT NOTE:
phpLD_Vault Support not handled in this forum AND not via PM here. Click on link above for support. NO exceptions!
VSDan is offline  
Old 12-10-2005   #6
Neticus
Supporter
 
Neticus's Avatar
 
Join Date: Dec 2005
Posts: 484
Default

Hi VSDan, have figured it out as suspected it was a problem from my side. Sorry my bad!

What it was was I had removed 'Search Results for: ' in the following code in index.php, Yet had also left a space inbetween the commas when I did so, thus ' ' when it should have been '' . That space was also being processed as part of the search hence the over-highlighting effect.

Code:
Content visible to registered users only.
Although I have also now discovered that the highlight dosen't work even when the full 'Search Results for: ' text is in place. For me the highlight only works when that field is blank and left as '' I don't know why, its like the highlight code is taking the text in DESCRIPTION field as part of the search.

So thats the downlow!

Again thanks for the reply.
Cheers Neticus.
Neticus is offline  
Old 12-31-2005   #7
angeljs
Supporter
 
Join Date: Oct 2005
Posts: 41
Default

I can't seem to get this working...I've added the code as supplied, but the search terms won't highlight
:(
__________________
]
angeljs is offline  
Old 01-13-2006   #8
angeljs
Supporter
 
Join Date: Oct 2005
Posts: 41
Default

Any idea what the problem could be? :?:
__________________
]
angeljs is offline  
Old 01-13-2006   #9
VSDan
Supporter
Moderator
 
VSDan's Avatar
 
Join Date: Sep 2005
Location: Vancouver, BC, Canada
Posts: 1,184
Default

Is this where it is being used:

/php/

Can you post your link.tpl.
__________________
Dan

phpLD Mods :: phpLD_Vault
Webmaster Resources Directory
phpLD_Vault Support

IMPORTANT NOTE:
phpLD_Vault Support not handled in this forum AND not via PM here. Click on link above for support. NO exceptions!

Last edited by David; 05-17-2010 at 11:06 PM.
VSDan is offline  
Old 01-13-2006   #10
angeljs
Supporter
 
Join Date: Oct 2005
Posts: 41
Default

Sure, thanks:

Code:
Content visible to registered users only.
Yes, the site below is where I have it.
__________________
]
angeljs is offline  
Old 01-13-2006   #11
VSDan
Supporter
Moderator
 
VSDan's Avatar
 
Join Date: Sep 2005
Location: Vancouver, BC, Canada
Posts: 1,184
Default

This could take some debugging. Can you send me your FTP access information? If so, then you can send c/o support at monster-submit dot com
__________________
Dan

phpLD Mods :: phpLD_Vault
Webmaster Resources Directory
phpLD_Vault Support

IMPORTANT NOTE:
phpLD_Vault Support not handled in this forum AND not via PM here. Click on link above for support. NO exceptions!
VSDan is offline  
Old 01-23-2006   #12
m_leefs
 
Join Date: Jan 2006
Posts: 5
Default

Along with angeljs I also added the code as supplied, but the search terms won't highlight. I also just installed phpLD and everything else seems to work great. I tried to do some debugging, but as a newby without too much php experience I'm trying my best. I did find that the following

Code:
Content visible to registered users only.
contains "Search results for: term" so the code given will only highlight text that contains the following:

Search results for: term

But will not highlight just "term". The search though pulls out all links with "term" in them. So in a list I have the following highlights:

This is a link with the word term, which won't highlight, but Search results for: term will highlight. Weird huh.

Any help would be great. Thanks!
m_leefs is offline  
Old 01-23-2006   #13
VSDan
Supporter
Moderator
 
VSDan's Avatar
 
Join Date: Sep 2005
Location: Vancouver, BC, Canada
Posts: 1,184
Default

Can you post your index.php and main.tpl files.
__________________
Dan

phpLD Mods :: phpLD_Vault
Webmaster Resources Directory
phpLD_Vault Support

IMPORTANT NOTE:
phpLD_Vault Support not handled in this forum AND not via PM here. Click on link above for support. NO exceptions!
VSDan is offline  
Old 01-25-2006   #14
VSDan
Supporter
Moderator
 
VSDan's Avatar
 
Join Date: Sep 2005
Location: Vancouver, BC, Canada
Posts: 1,184
Default

I think I see the problem (should have mentioned in my instructions). In index.php, change:

Code:
Content visible to registered users only.
to:

Code:
Content visible to registered users only.
__________________
Dan

phpLD Mods :: phpLD_Vault
Webmaster Resources Directory
phpLD_Vault Support

IMPORTANT NOTE:
phpLD_Vault Support not handled in this forum AND not via PM here. Click on link above for support. NO exceptions!
VSDan is offline  
Old 01-26-2006   #15
m_leefs
 
Join Date: Jan 2006
Posts: 5
Default

Thanks VSDan for the fix! I also added some extras in order to highlight multiple word searches (seperated by spaces).

replace
Code:
Content visible to registered users only.
with
Code:
Content visible to registered users only.
Doing this I noticed a bug in the search function when searching multiple words. The search is dependent on the order of the words, however when searching multiple words one may not want that. Example: Searching "great site" will find links like "This is a great site", but not "This site is great". Any insight anybody could give would be great. Thanks.

Last edited by VSDan; 07-30-2006 at 06:41 PM.
m_leefs is offline  
Old 02-06-2006   #16
John D
 
Join Date: Nov 2005
Posts: 159
Default

Hey,
This doesn't seem to highlight it for me..

Try a search on All Dot Net - Don't see any differences.

Thanks

Last edited by David; 05-17-2010 at 11:06 PM.
John D is offline  
Old 02-06-2006   #17
Neticus
Supporter
 
Neticus's Avatar
 
Join Date: Dec 2005
Posts: 484
Default

Have you tried this yet?:
http://www.phplinkdirectory.com/foru...hp?p=9284#9284

Last edited by David; 05-17-2010 at 11:05 PM.
Neticus is offline  
Old 02-06-2006   #18
John D
 
Join Date: Nov 2005
Posts: 159
Default

Thanks a lot

There were that many replies with different fixes I read it a few times but still missed a lot
John D is offline  
Old 03-23-2006   #19
LyndaLAX
Supporter
 
Join Date: Mar 2006
Posts: 22
Default does this work in v3.03?

thanks,
Lynda
LyndaLAX is offline  
Old 07-30-2006   #20
angeljs
Supporter
 
Join Date: Oct 2005
Posts: 41
Oh, dear, now something else has happened.
__________________
]

Last edited by David; 05-17-2010 at 11:07 PM.
angeljs is offline  
Closed Thread

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
topic widgets



All times are GMT +1. The time now is 05:59 PM.


Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.