PassMark Logo
Home » Forum

Announcement

Collapse
No announcement yet.

Paging - changing the default number of results per page

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Paging - changing the default number of results per page

    Where in the search.php file can I change the default of how many results appear?

    I would also sugest this be something we can define in the configuation box.

    Cy

  • #2
    Found my answer and will share in case anyone else wants to know.

    There is a block of code that looks like this
    Code:
    // number of results per page, defaults to 10 if not specified
    if (isset($_GET['zoom_per_page']))
    {
        $per_page = intval($_GET['zoom_per_page']);
        if ($per_page < 1)
        	$per_page = 1;
    }
    else
        [COLOR="Blue"][B]$per_page = 10;[/B][/COLOR]


    Simply change the 10 to anything you want it to be.

    Cy

    Comment


    • #3
      You can actually do this without changing the script source code.

      You simply need to link to the search page with an additional parameter, for example "http://www.mysite.com/search.php?zoom_per_page=20"

      Also previously discussed here:
      http://www.wrensoft.com/forum/showthread.php?t=74
      and here:
      http://www.wrensoft.com/forum/showthread.php?t=771
      Last edited by Ray; Sep-14-2007, 01:49 AM.
      --Ray
      Wrensoft Web Software
      Sydney, Australia
      Zoom Search Engine

      Comment

      Working...
      X