Log in

View Full Version : $perpage and $pagenumber


SDB
01-22-2007, 05:15 PM
Hi

In the hook : showthread_getinfo ..

I've added the following code :

if ($thread[forumid] == 111) {
$perpage = 1;
}

I want the forum id 111 to always show 1 post per page.

This works fine, however, when I think click "page 2", I get page 1.

I assume I need to fiddle with the $pagenumber somewhere. Any pointers would be very helpful :)

Cheers

Simon

ragtek
01-22-2007, 05:22 PM
have you tried:

$vbulletin->options['maxposts'] =1;

SDB
01-22-2007, 05:29 PM
Hi

Thanks for your reply.

I tried adding your code line below mine in the hook which made no difference :(

I think tried using your code in place of mine, and it shows all posts on the same page.

oops!

sorry, I included a typo. I've just corrected that and it works a treat!

Thank you sir :)

ragtek
01-23-2007, 06:01 AM
ups
sorry
you have the false hook its global_start
sorry i didn't see that!

this is my plugin and it works great:
if ($threadid == 1161)
{
$vbulletin->options['postminchars'] = 500;
}