phpBB2Refugees.com Logo
Not affiliated with or endorsed by the phpBB Group

Register •  Login 

Continue the legacy...

Welcome to all phpBB2 Refugees!Wave Smilie

This site is intended to continue support for the legacy 2.x line of the phpBB2 bulletin board package. If you are a fan of phpBB2, please, by all means register, post, and help us out by offering your suggestions. We are primarily a community and support network. Our secondary goal is to provide a phpBB2 MOD Author and Styles area.

Previous - Next Pagnation links similar to PHPBB3


 
Search this topic... | Search phpBB2 Discussion... | Search Box
Register or Login to Post    Index » phpBB2 Discussion  Previous TopicPrint TopicNext Topic
Author Message
JLA
Board Member



Joined: 30 Apr 2009

Posts: 310
Location: U.S.A


flag
PostPosted: Sat Oct 15, 2011 1:13 am 
Post subject: Previous - Next Pagnation links similar to PHPBB3

Have any of you created separate prev/next pagination links similar to what is found in PHPBB3?

Example:

See this topic on PHPBB's site
http://www.phpbb.com/community/viewtopic.php?f=46&t=579376

Notice at the bottom of the 1st page - normal pagination exists just as in PHPBB2 but also just above that you will see a "Next" link in the bottom row where the topic sort is (far right)

Anyone have any code to create this link for that sort of feature?

_________________
http://www.jlaforums.com
Back to top
Salvatos
Board Member



Joined: 19 Feb 2009

Posts: 430
Location: Qu├ębec


flag
PostPosted: Sun Oct 16, 2011 3:00 am 
Post subject: Re: Previous - Next Pagnation links similar to PHPBB3

Well, all the code already exists, so you just have to take it out and copy it where you like. We're mostly looking at lines 630+ in functions.php:

Code:
   if ( $add_prevnext_text )
   {
      if ( $on_page > 1 )
      {
         $page_string = ' <a href="' . append_sid($base_url . "&amp;start=" . ( ( $on_page - 2 ) * $per_page ) ) . '">' . $lang['Previous'] . '</a>&nbsp;&nbsp;' . $page_string;
      }

      if ( $on_page < $total_pages )
      {
         $page_string .= '&nbsp;&nbsp;<a href="' . append_sid($base_url . "&amp;start=" . ( $on_page * $per_page ) ) . '">' . $lang['Next'] . '</a>';
      }

   }


You could make an adapted copy of that generate_pagination function, add the call in viewtopic.php (around 626) and of course place it in the template.
Back to top
Display posts from previous:   
Register or Login to Post    Index » phpBB2 Discussion  Previous TopicPrint TopicNext Topic
Page 1 of 1 All times are GMT
 
Jump to:  

Index • About • FAQ • Rules • Privacy • Search •  Register •  Login 
Not affiliated with or endorsed by the phpBB Group
Powered by phpBB2 © phpBB Group
Generated in 0.0279 seconds using 15 queries. (SQL 0.0023 Parse 0.0008 Other 0.0248)
phpBB Customizations by the phpBBDoctor.com
Template Design by DeLFlo and MomentsOfLight.com Moments of Light Logo