PhpDig.net

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

Reply
 
Thread Tools
Old 01-05-2004, 03:06 PM   #1
Canadian
Green Mole
 
Join Date: Dec 2003
Location: Kelowna BC Canada
Posts: 8
Question Customization of "XML like code"

In the results templates I see this "XML like code" described in the documentation and am wondering how can I track down its "source". I mean for example; what determines that <phpdig:complete_path> shows the full URL, because I would like that to show just the main site.

Another customization I am interested in is limiting the results to one page maximum return for each "host" or URL, does anyone know an easy way to do this? Because right now a typical search on my index returns 5 straight pages from one site, followed by 5 or 10 straight pages from another site and so on......

Finally is there a way to add voice to the returns so that each site gets read out to people as they are returned? Like "Site return No. 1 is ABC news, your source for global and......" and so on?..... I thought this would be useful for any blind visitors....

Thanks
Canadian is offline   Reply With Quote
Old 01-05-2004, 11:53 PM   #2
Charter
Head Mole
 
Charter's Avatar
 
Join Date: May 2003
Posts: 2,539
Hi. For question one, using <phpdig:complete_path> as an example, to find where this is defined, search for complete_path in the PHP files. Doing this shows complete_path to be in the search_function.php file.

Now searching on complete_path in the search_function.php file shows the following:
PHP Code:
'complete_path' => $url
This is one of the key value pairs in the $table_results array. The key complete_path gets the vaule $url, so searching the search_function.php file again for $url shows $url defined as follows:
PHP Code:
$url eregi_replace("([a-z0-9])[/]+","\\\\1/",$content['site_url'].$content['path'].$content['file']); 
The $url variable is also used in page_link so changing its definition affects both complete_path and page_link.

For question two, from PhpDig 1.6.4+ there is the following option in the config.php file:
PHP Code:
define('NUMBER_OF_RESULTS_PER_SITE',-1);  //max number of results per site
                                         // use -1 to display all results 
For question three, it looks like you want to implement a server-side screen reader. While I am not aware of such a program, you might find this article on client-side screen readers useful.
__________________
Responses are offered on a voluntary if/as time is available basis, no guarantees. Double posting or bumping threads will not get your question answered any faster. No support via PM or email, responses not guaranteed. Thank you for your comprehension.
Charter is offline   Reply With Quote
Old 01-06-2004, 08:18 AM   #3
Canadian
Green Mole
 
Join Date: Dec 2003
Location: Kelowna BC Canada
Posts: 8
Much obliged !
Canadian is offline   Reply With Quote
Reply

Thread Tools

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
search.php suddenly stops parsing during "extract vars" jackmoring Troubleshooting 1 08-25-2006 11:27 AM
shows blank page if "Search All" and "exact phrase", timeout? alokjain9 Troubleshooting 2 03-07-2006 07:08 AM
"search depth" and "links per" features laurentxav How-to Forum 1 01-12-2005 07:27 PM
Command line spider ignoring "filelist.txt" lighthouse Troubleshooting 9 08-18-2004 07:35 AM


All times are GMT -8. The time now is 01:02 AM.


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