Welcome, Guest. Please login or register.
Did you miss your activation email?
May 26, 2012, 05:01:44 PM

Login with username, password and session length
Search:     Advanced search
Interested in joining the WebsiteBaker team?
For more Information read here or on our new website.
155544 Posts in 21714 Topics by 7736 Members
Latest Member: chris85
* Home Help Search Login Register
Pages: [1]   Go Down
Print
Author Topic: **SOLVED** Max search results per page  (Read 1027 times)
bob4u2000

Offline Offline

Posts: 9


« on: January 28, 2011, 02:54:11 PM »

Hello guys,

Where can i limit the max. search results per page?.
I'm making a site with a lot of searchable items (1000-2000 items)
I want maybe 10 hits per page and a link to the next page with the next 10 search results.

The problem is my search output has got only images (150px * 150px ), so can you imagine 500 picture results?
This will blow my server Smiley

My site is useless without this option Sad Sad
« Last Edit: January 31, 2011, 01:41:42 PM by bob4u2000 » Logged
bob4u2000

Offline Offline

Posts: 9


« Reply #1 on: January 31, 2011, 01:42:10 PM »

Solved***

Thanks to Ruud from the Dutch support team. He rewrote the search script.
Now i am able to navigate through my search results!
Logged
pcwacht
AddOn Development
*
Offline Offline

Posts: 2858



WWW
« Reply #2 on: January 31, 2011, 02:50:04 PM »

And the solution is... ?
Logged

http://www.ictwacht.nl = Dutch ICT info
http://www.pcwacht.nl = My first
both still work in progress, since years.....
Ruud
WebsiteBaker Org e.V.

Offline Offline

Posts: 2297



WWW
« Reply #3 on: January 31, 2011, 09:39:29 PM »

Ok, here it is.

Two modified files that should be replaced in the /search folder.

Note: this is an unofficial modification, to be used in WB 2.8.1 only.
Logged

Professional WebsiteBaker Solutions
pcwacht
AddOn Development
*
Offline Offline

Posts: 2858



WWW
« Reply #4 on: January 31, 2011, 11:19:59 PM »

Didn't test it, don't have a site with so many pages handy ...

THink this could be a good additition to WB-core
 
Can this be tested by others as well so the alterations could be, hopefully, made to core?
Then the Search Settings - search number per page, template for prev and next page etc. - needs to be altered.


Thanks
John

Logged

http://www.ictwacht.nl = Dutch ICT info
http://www.pcwacht.nl = My first
both still work in progress, since years.....
Ruud
WebsiteBaker Org e.V.

Offline Offline

Posts: 2297



WWW
« Reply #5 on: January 31, 2011, 11:33:39 PM »

Then the Search Settings - search number per page, template for prev and next page etc. - needs to be altered.
that is exactly the problem why these kind of nice additions don't make it to a next version.

If you want to do it right, you need extra data for a template block, backend template modifications, extra language translations, on/off switches, etc..

As long as there are not a lot of requests for something like this, it will not happen. It takes too much time of the very limited manpower.

Right now you can only set the results per page by setting the "max" value in the initial search form.
Use <input type="hidden" name="max" value="5" /> to get 5 results per page.


Logged

Professional WebsiteBaker Solutions
pcwacht
AddOn Development
*
Offline Offline

Posts: 2858



WWW
« Reply #6 on: February 01, 2011, 09:05:22 AM »

True.
Logged

http://www.ictwacht.nl = Dutch ICT info
http://www.pcwacht.nl = My first
both still work in progress, since years.....
Argos
Moderator
**
Offline Offline

Posts: 2161


WWW
« Reply #7 on: February 08, 2011, 06:46:31 PM »

Can't you add a function to the core, without adding a complete backend administration as well? So a kind of hidden extra function that you can enable in the code if you want. That's better than nothing. I think search pagination should be a core function, even if it's not completely administrable (hm... is that a word?) in the backend (yet). Lots of core functions need extra hacking in the code anyway to fully customize.
Logged

Jurgen Nijhuis
Argos Media
Heiloo, The Netherlands
WB Showcase: http://www.mywebsitebaker.com/pages/showcase.php?v&category_id=1242&count=30
----------------------------------------------------------------
Please don't request personal support, use the forums!
crnogorac081
AddOn Development
*
Offline Offline

Posts: 1706



« Reply #8 on: February 23, 2011, 03:42:29 PM »

I vote too, to add this in core Smiley

the pagination in search result page is really useful for any site..large and small..
Logged

Wow, I coded something myself: PM Messanger Modul ,Searchbox with suggestions
crnogorac081
AddOn Development
*
Offline Offline

Posts: 1706



« Reply #9 on: February 23, 2011, 04:31:04 PM »

Also,

an addition, just noticed when you move from page 1 - to page xx, show_menu2 dissapears..

Here is a fix for it:
Code:
replace:
$parms = '&amp;max='.$pagination['max']
.'&amp;search_path='.htmlspecialchars($_REQUEST['search_path'])
.'&amp;string='.htmlspecialchars($_REQUEST['string'])
.'&amp;match='.htmlspecialchars($_REQUEST['match']) ;

WITH:
$parms = '&amp;max='.$pagination['max']
.'&amp;search_path='.htmlspecialchars($_REQUEST['search_path'])
.'&amp;string='.htmlspecialchars($_REQUEST['string'])
.'&amp;referrer='.intval(REFERRER_ID)
.'&amp;match='.htmlspecialchars($_REQUEST['match']) ;

As you can see, I added referrer line:    .'&amp;referrer='.intval(REFERRER_ID)   

cheers
Logged

Wow, I coded something myself: PM Messanger Modul ,Searchbox with suggestions
Pages: [1]   Go Up
Print
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!