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

Mod Requests Have a suggestion for a mod? Post it here. You may not always receive an answer, but phpLD devs and mod developers do regularly visit this forum. If you MUST get something done, you may need to opt for paid help.

Closed Thread
 
Thread Tools Display Modes
Old 09-26-2005   #1
superlinks
 
Join Date: Aug 2005
Posts: 18
Default Search results

Hi

How can I add the 'search results' on the page index.php?q=
And some text like 'you were looking for ...'.

And how can I add the words 'no search results, try some other words', when the search didn't return any results.
superlinks is offline  
Old 09-27-2005   #2
yktan
 
Join Date: Jun 2005
Posts: 353
Default

Hi superlinks,

Quote:
How can I add the 'search results' on the page index.php?q=
And some text like 'you were looking for ...'.
This has already been done. If you look at the search result page, the heading will say "Search Results" and below that, "Search result for..."

Quote:
And how can I add the words 'no search results, try some other words', when the search didn't return any results.
Add the following code somewhere in \main.tpl
Code:
{if $qu and count($links) eq 0}
	No search results, try some other words.
{/if}
Regards,
York Kie
__________________
Greatest fear in a coder\'s world: A minute bug with correct syntax.
{link removed from sig as the account seemed to be suspended}
yktan is offline  
Old 09-27-2005   #3
VSDan
Supporter
Moderator
 
VSDan's Avatar
 
Join Date: Sep 2005
Location: Vancouver, BC, Canada
Posts: 1,180
Default

I believe you need to change:

Code:
{if $qu and count($links) eq 0} 
No search results, try some other words. 
{/if}
to:

Code:
{if $qu and count($links) eq 0 and count($feat_links) eq 0}
No search results, try some other words. 
{/if}
... to factor out featured links.


Cheers,

Dan
Virtual Solutions
monster-submit.com
VSDan is offline  
Old 09-27-2005   #4
superlinks
 
Join Date: Aug 2005
Posts: 18
Default

Thanx that solved the problem!!
superlinks is offline  
Old 09-28-2005   #5
yktan
 
Join Date: Jun 2005
Posts: 353
Default

Quote:
Originally Posted by VSDan
I believe you need to change:

Code:
{if $qu and count($links) eq 0} 
No search results, try some other words. 
{/if}
to:

Code:
{if $qu and count($links) eq 0 and count($feat_links) eq 0}
No search results, try some other words. 
{/if}
... to factor out featured links.


Cheers,

Dan
Virtual Solutions
monster-submit.com
Thanks for correcting me VSDan, you're right
__________________
Greatest fear in a coder\'s world: A minute bug with correct syntax.
{link removed from sig as the account seemed to be suspended}
yktan is offline  
Old 09-28-2005   #6
VSDan
Supporter
Moderator
 
VSDan's Avatar
 
Join Date: Sep 2005
Location: Vancouver, BC, Canada
Posts: 1,180
Default

Not a problem, thanks for the great solution =)


Cheers,

Dan
Virtual Solutions
monster-submit.com
VSDan is offline  
Closed Thread


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 06:44 AM.


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