MyBB Community Forums

Full Version: How to Built a Multipage ?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
From the last couple of hours I'm struggling with multipage thingy [attachment=22954] but nothing found a way to achieve. I also searched this around and nothing found so far.

Here is what I've coded;
	$perpage = $mybb->settings['threadsperpage'];

	if(intval($mybb->input['page']) > 0)
	{
		$page = intval($mybb->input['page']);
		$start = ($page-1) * $perpage;
		$pages = ceil(111 / $perpage);
		if($page > $pages)
		{
			$start = 0;
			$page = 1;
		}
	}
	else
	{
		$start = 0;
		$page = 1;
	}

	// Assemble page URL
	$multipage = multipage("114", $perpage, $page, "misc.php?action=link");

Though the main thing has been achieved (i.e. multipages are visible in the template) but its not working correctly. Link are incorrect.

Any help ? Blush
You mean styling it? Should be like "pagination" or something in global.css I think.
(2011-06-01, 12:16 AM)lucasbytegenius Wrote: [ -> ]You mean styling it? Should be like "pagination" or something in global.css I think.

Correct. Or he may be having the exact same problem I am having with one of my forums where the paginations have completely disappeared. Quite odd.
Not styling but actually making it.

I searched showthread.php and forumdisplay.php and all those files where this is used, but I van't figure out. Though the main thing has been achieved (i.e. multipages are visible in the template) but its not working correctly.

I've edited the First Post as well.
Are you attempting to make it only show the [1] and the [next] button?
Not just [1] but [1][2][3]...[9][10][NEXT] something like this <-- Every thing is working except pagination is not correct.
(2011-06-01, 12:39 AM)Yaldaram Wrote: [ -> ]Not just [1] but [1][2][3]...[9][10][NEXT] something like this <-- Every thing is working except pagination is not correct.

I believe your saying that [2][3]etc. will not appear. It is 15 posts per page unless you had changed it in the ACP. e.g. 30 replies 2 pages. 100 replies is 6 pages. Am I correct? If not, correct me.
Where does the multipage link to atm if it's showing?
Oops forgot to post here, Thanks for the suggestions or replies guys, I've found multipage function myself.

Thank You once again. =)
Sorry to bump, but I'll like to tell that I've figured out this myself.

Thanks for consideration though guys.. I Heart U.