Hi,
I actually modified this patch a bit - it actually doesn't display the
links quite correctly......here's what I've implemented for 3.2.0b4
// I set the default span to be 15 instead of 10
// also had to change config.Value to config->Value for 3.2.0b4
int pageSpan = config->Value("results_page_span", 15);
int pageStart = pageNumber;
int pageEnd = pageNumber + pageSpan;
if(pageStart == nPages) pageStart = pageStart - pageSpan;
if( pageStart < 1 ) pageStart = 1;
if ( pageEnd > nPages ) pageEnd = nPages;
int pageDiff = pageEnd - pageStart;
// this will maintain full listing if there are less than
// 15 total pages of results
if(pageDiff < 15) {
pageStart = pageEnd - pageSpan;
if( pageStart < 1 ) pageStart = 1;
}
for (i = pageStart; i <= pageEnd; i++)
{
In terms of the conf files, Gilles is correct - I had to set the following:
maximum_pages: 2000
maximum_page_buttons: 2000
This is now working quite well on www.comminit.com - do a search off the
left navigation bar and you'll see it in action :)
Cheers,
Jonathan Schlackl
The Communication Initiative
> According to Irene talaway:
>> I have modified Display.cc according to
>> ftp://ftp.ccsf.org/htdig-patches/3.1.6/Google-style.0
>> by changing line:
>> for (i = 1; i <= nPages; i++)
>>
>> with:
>> int pageSpan = config.Value("results_page_span", 10);
>> int pageStart = pageNumber - pageSpan;
>> int pageEnd = pageNumber + pageSpan;
>> if ( pageStart < 1 ) pageStart = 1;
>> if ( pageEnd > nPages ) pageEnd = nPages;
>> for (i = pageStart; i <= pageEnd; i++)
>>
>> and I re-compile htdig using make and make install. I have removed the
>> page_number_text and no_page_number_text attributes from the
>> configuration file.
>> But the pagelist in the search result still show all of page number
>> together. Did I miss something?
>
> I think you also must explicitly set maximum_pages to something large,
> as well as perhaps also setting maximum_page_buttons (although I think
> it's OK to leave it set to ${maximum_pages} as it is by default).
>
> Also make sure that your make install did indeed update the htsearch
> binary that's called from your search form. If you moved or copied
> things around after your first make install, you will likely have to do
> that again.
>
> Apart from that, I don't know what else to recommend. I didn't write
> the patch, and it came with precious little as far as documentation. But
> others have been reporting success with it, so it should work.
>
> --
> Gilles R. Detillieux E-mail: <[EMAIL PROTECTED]>
> Spinal Cord Research Centre WWW: http://www.scrc.umanitoba.ca/
> Dept. Physiology, U. of Manitoba Winnipeg, MB R3E 3J7 (Canada)
>
>
> -------------------------------------------------------
> This SF.Net email sponsored by: Free pre-built ASP.NET sites including
> Data Reports, E-commerce, Portals, and Forums are available now.
> Download today and enter to win an XBOX or Visual Studio .NET.
> http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
> _______________________________________________
> ht://Dig general mailing list: <[EMAIL PROTECTED]>
> ht://Dig FAQ: http://htdig.sourceforge.net/FAQ.html
> List information (subscribe/unsubscribe, etc.)
> https://lists.sourceforge.net/lists/listinfo/htdig-general
-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
_______________________________________________
ht://Dig general mailing list: <[EMAIL PROTECTED]>
ht://Dig FAQ: http://htdig.sourceforge.net/FAQ.html
List information (subscribe/unsubscribe, etc.)
https://lists.sourceforge.net/lists/listinfo/htdig-general