Gossamer Forum
Home : Products : Links 2.0 : Installation -- Unix :

Number of links in results page

Quote Reply
Number of links in results page
I know this question must have been posted a zillion times but I can't find any previous threads so:

How do I set the limit on the number of search results displayed per page? I don't seem to have a cut off limit (I have disabled the category headings in search results so maybe that has something to do with it). Thanks.

Quote Reply
Re: Number of links in results page In reply to
Look in links.def in your cgi-bin/admin/directory for:
Code:
# Maximum number of hits returned in a search. Can be overridden in the search
# options.
$db_max_hits = 10;
brad

Quote Reply
Re: Number of links in results page In reply to
Strange. I just checked, and it is definitely set at 10. But I just got 16 results on a page. How can this happen??

If I go to search options (which defaults at 25)I can set it to 10 and then I get ten results - but for that search only! The next search from the normal search box will not have a limit per page. (Or maybe the limit is also 25 - I wouldn't know as I don't have enough sites yet to return that sort of result).

Alan
Quote Reply
Re: Number of links in results page In reply to
hmmm...well live and learn, go to search.cgi or search.pl (whatever you are using) and look for:

Code:
sub main {
# --------------------------------------------------------
%in = &parse_form();



# Display the form if called with no input.
(keys %in <= 0) and &site_html_search_form() and return;

# Set maximum hits -- default to 25.
local $maxhits = 25;
if ($in{'mh'} && (($in{'mh'} == 10) || ($in{'mh'} == 25) || ($in{'mh'} == 50) || ($in{'mh'} = 100))) {
$maxhits = $in{'mh'};
you could change this, or you could put into your search form the value of mh, that is name=mh value=10 and just pass that along with your form query.

Or you can wait till the experts show up and tell you a better way of doing it.

Quote Reply
Re: Number of links in results page In reply to
Yeah. Thanks for your suggestions. I will try that as a last resort but what I really want to know is why links.def is not working. Changing mazx hits in search options is just disguising an error somewhere without actually fixing it.

Any one else got any ideas on what could be happening here??

Alan