PhpDig.net

Go Back   PhpDig.net > PhpDig Forums > Mod Requests

Reply
 
Thread Tools
Old 11-13-2003, 07:11 AM   #1
mikeduff
Green Mole
 
Join Date: Nov 2003
Posts: 5
limit results?

Hello, I was wondering if anyone had created code to limit results. What I mean by this is, instead of returning 4324 results from the same site, after 5 or so, it would move on to the next site. becouse when I search on the one I made, the first 5-6 pages are all this one site, and if i wanted to view that many from the same site, I would clikc on the limit to link. make sense? can anyone help me.
mikeduff is offline   Reply With Quote
Old 11-17-2003, 01:00 AM   #2
Charter
Head Mole
 
Charter's Avatar
 
Join Date: May 2003
Posts: 2,539
Hi. PhpDig version 1.6.4 has an option in the config file to set the max number of results per site to display. When set to X, there will be at most X results from each of Y sites displayed, and if limit to a certain site is clicked, X results for that site will be displayed.
__________________
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 11-17-2003, 01:39 AM   #3
sid
Former Member
 
Join Date: Sep 2003
Posts: 34
I'm new to this, but can you please tell me how this 'limit' thing work and also, I didn't get one feature:
the is a $site var in PhpDig, for example search.php?query_string=blablabla&site=

Can you please explain to me these 2 features?
sid is offline   Reply With Quote
Old 11-17-2003, 02:35 AM   #4
Charter
Head Mole
 
Charter's Avatar
 
Join Date: May 2003
Posts: 2,539
Hi. If you click the limit to website link, then only results from that website are displayed. The site variable identifies a website.
__________________
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 11-17-2003, 07:05 PM   #5
sid
Former Member
 
Join Date: Sep 2003
Posts: 34
I did that limit thing, but, you said it will show all the results from that site, it is only showing the 'result per site' I limited which is 2 results per site. Is there anyway to show only 2 results in the whole results page and all the results from that site in the limit?

Thanks.
sid is offline   Reply With Quote
Old 11-25-2003, 03:50 PM   #6
Charter
Head Mole
 
Charter's Avatar
 
Join Date: May 2003
Posts: 2,539
Quote:
Originally posted by Charter
... When set to X, there will be at most X results from each of Y sites displayed, and if limit to a certain site is clicked, X results for that site will be displayed.
Hi. Actually it works like above.

However, if you want to have at most X results from each of Y sites displayed on a 'main' search, and then want all results for a given site displayed on a 'limit to' search, just do the following.

In search_function.php find:
PHP Code:
if(NUMBER_OF_RESULTS_PER_SITE != -1) { 
and replace with:
PHP Code:
if((!$refine) && (NUMBER_OF_RESULTS_PER_SITE != -1)) { 
__________________
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
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
Limit indexing millo Troubleshooting 3 10-04-2006 02:18 AM
how to limit phpdig only to my domain?? hasan How-to Forum 1 08-31-2006 01:32 AM
limit to a subfolder and below pepevilluela How-to Forum 0 08-30-2006 12:11 AM
Limit search to this path returns no results mixle Bug Tracker 2 05-30-2005 11:24 PM
limit digging to certain keywords? hgw How-to Forum 1 08-20-2004 06:57 AM


All times are GMT -8. The time now is 07:00 AM.


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