PhpDig.net

Go Back   PhpDig.net > PhpDig Forums > How-to Forum

Reply
 
Thread Tools
Old 03-15-2004, 05:22 AM   #1
lighthouse
Green Mole
 
Join Date: Mar 2004
Posts: 20
Adding the site URL in results page

Looking for some help in customising my returned results...

I want to add a "From website: http://relevantsite.com" line inder each of the results - so that the user can quickly see where the search term was found (without having to click on it, or without using the "refine" code)...

I've tried many things, but nothing will show the desired effect...

The code in the template looks like this:

<phpdig:results>
<b><phpdig:page_link/></b>
<br />From website: WHAT-GOES-HERE [Relevance: <phpdig:weight/>%]
<br />
<phpdig:text/>
</phpdig:results>

Any help with "WHAT-GOES-HERE" is appreciated... all I want to do is display the website!

Thanks
Gary
lighthouse is offline   Reply With Quote
Old 03-15-2004, 06:33 AM   #2
vinyl-junkie
Purple Mole
 
Join Date: Jan 2004
Posts: 694
You need something like this:
PHP Code:
From website: <phpdig:complete_path/> 
Hope this helps.
vinyl-junkie is offline   Reply With Quote
Old 03-15-2004, 06:45 AM   #3
lighthouse
Green Mole
 
Join Date: Mar 2004
Posts: 20
hi there,

tried that - but I don't actually want the full path... just the url of the main site:

so instead of "http://domain.com/subdir/file.htm" all i want is "http://domain.com"

Any ideas?

Thanks
lighthouse is offline   Reply With Quote
Old 03-15-2004, 07:23 AM   #4
vinyl-junkie
Purple Mole
 
Join Date: Jan 2004
Posts: 694
Sorry, I misunderstood the question. This is untested, but I'm pretty sure this is what you need to do. Go into libs/search_function.php and find the following code:
PHP Code:
$url eregi_replace("([a-z0-9])[/]+","\\\\1/",$content['site_url'].$content['path'].$content['file']); 
Replace it with the following code:
PHP Code:
$url eregi_replace("([a-z0-9])[/]+","\\\\1/",$content['site_url']); 
Be sure you remove any word wrapping.

Let us know if this helps.
vinyl-junkie is offline   Reply With Quote
Old 03-15-2004, 07:43 AM   #5
lighthouse
Green Mole
 
Join Date: Mar 2004
Posts: 20
Thanks....
that helped a lot....

lighthouse is offline   Reply With Quote
Old 03-22-2004, 12:37 PM   #6
jerrywin5
Orange Mole
 
Join Date: Mar 2004
Posts: 48
I think you can you just use <phpdig:limit_links/> as well.
jerrywin5 is offline   Reply With Quote
Reply


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 Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Adding thumbnail pictures to your results? Dave A How-to Forum 0 06-30-2007 07:41 PM
Blank page after adding code mods Brewer External Binaries 1 07-06-2005 12:34 PM
Adding a thumbnail to each page...help? huge_nerd How-to Forum 1 11-16-2004 09:54 AM
Adding search box to every page (cont'd) rogerh How-to Forum 1 10-11-2004 11:08 AM
Adding search box to every page Psycho1 How-to Forum 7 04-25-2004 08:04 AM


All times are GMT -8. The time now is 09:36 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright © 2001 - 2005, ThinkDing LLC. All Rights Reserved.