View Full Version : Reducing number of results displayed per page
toneharb
06-16-2005, 01:40 PM
Is it possible to reduct the no of results displayed by zoom php search at the moment it displays 10 per page .
Thanks
wrensoft
06-16-2005, 10:25 PM
If you are using the default HTML search form generated by the script then there will be a drop down list containing 4 options. 10, 20, 50 & 100 results per page.
If you want values different from these 4 values then you need to turn off the default form and create your own custom form.
You can turn off the default form from the "Search page" tab in the Zoom configuration window. Your own form should look like the default form, but with different values in the drop down list. e.g.
<form method="get" action="/search/search.php">
Search for: <input type="text" name="zoom_query" size="20" value="" class="zoom_searchbox" />
<input type="submit" value="Submit" class="zoom_button" />
<span class="zoom_options">Results per page:
<select name='zoom_per_page'>
<option selected="selected">5</option>
<option>10</option>
<option>15</option>
</select>
</form>
Another option would be to not have the drop down list but have a hidden form element to directly specify the number of results required. You need to generate this field in the URL when the form is submitted,
zoom_per_page=xx
where xx is the results required per page.
----
David
nitinp
06-10-2009, 04:50 AM
Hi,
I am having similar problems ....
I have tried several ways to edit my search.cgi and search_win32.cgi files to modify the "Results per page" from 10 to 50.
I can easily remove the "Results per page" drop down box by editing my CSS file.
I have also followed all the methods discussed in other threads but our cgi file is hardcoded with %s.
Small Part of the code:
<form method="get" action="%s" class="zoom_searchform">
%s <input type="text" name="zoom_query" size="20" value="%s" class="zoom_searchbox" />
<input type="submit" value="%s" class="zoom_button" />
<span class="zoom_results_per_page">%s
<select name='zoom_per_page'> <option selected="selected" >%d</option> </select><br /><br /></span>
How can i modify the results per page value?
Cheers
The CGI file is not a script. It is a compiled binary executable (which is why it performs significantly faster than the other scripted platform options). It cannot be modified directly.
If you wish to change the search form, you can do so by defining your own form in HTML and disabling the one generated by the CGI. See this FAQ for more details:
Q. How do I define my own search form? (http://www.wrensoft.com/zoom/support/faq_howto.html#searchform)
Actually, this seemed to have been explained in the post above already??
Powered by vBulletin® Version 4.1.12 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.