Next topic,last topic in pagination for prosilver style

Guides & Snippets for phpBB3.
Try the Snippets here and share Your own Snippets
User avatar
Steve Offline
Donator
Donator
Posts: 1,429
Joined: 04 Mar 2010, 23:10
Local time: Saturday 22:51
Last active: -

Next topic,last topic in pagination for prosilver style

Post by Steve »

I found this out age,s ago and remember toringt posting it has own snippet irrc on the old board when he requested it in a support topic.
This is already in subsilver2 styles so why not add it to prosilver,we will add the links to the pagination, what it does is allow you to view the newer or older topic in the forum your are viewing.
recomend using this snippet also will take you to the last post of the topic : viewtopic.php?f=9&t=1086&p=6418#p6418

Instructions
Open styles/prosilver/template/viewtopic_body.html
find:

Code: Select all

	<!-- IF PAGINATION or TOTAL_POSTS -->
		<div class="pagination">
			<!-- IF U_VIEW_UNREAD_POST and not S_IS_BOT --><a href="{U_VIEW_UNREAD_POST}">{L_VIEW_UNREAD_POST}</a> &bull; <!-- ENDIF -->{TOTAL_POSTS}
			<!-- IF PAGE_NUMBER --><!-- IF PAGINATION --> &bull; <a href="#" onclick="jumpto(); return false;" title="{L_JUMP_TO_PAGE}">{PAGE_NUMBER}</a> &bull; <span>{PAGINATION}</span><!-- ELSE --> &bull; {PAGE_NUMBER}<!-- ENDIF --><!-- ENDIF -->
		</div>
	<!-- ENDIF -->
replace with:

Code: Select all

	<!-- IF PAGINATION or TOTAL_POSTS -->
		<div class="pagination">
			<a href="{U_VIEW_OLDER_TOPIC}">{L_VIEW_PREVIOUS_TOPIC}</a> &bull; <!-- IF U_VIEW_UNREAD_POST and not S_IS_BOT --><a href="{U_VIEW_UNREAD_POST}">{L_VIEW_UNREAD_POST}</a> &bull; <!-- ENDIF -->{TOTAL_POSTS}
			<!-- IF PAGE_NUMBER --><!-- IF PAGINATION --> &bull; <a href="#" onclick="jumpto(); return false;" title="{L_JUMP_TO_PAGE}">{PAGE_NUMBER}</a> &bull; <span>{PAGINATION}</span><!-- ELSE --> &bull; {PAGE_NUMBER}<!-- ENDIF --><!-- ENDIF --> &bull; <a href="{U_VIEW_NEWER_TOPIC}">{L_VIEW_NEXT_TOPIC}</a>
		</div>
	<!-- ENDIF -->
* if you use this snippet : viewtopic.php?f=9&t=1086&p=6418#p6418
replace with:

Code: Select all

   <!-- IF PAGINATION or TOTAL_POSTS -->
      <div class="pagination">
         <a href="{U_VIEW_OLDER_TOPIC}">{L_VIEW_PREVIOUS_TOPIC}</a> &bull; <!-- IF U_VIEW_UNREAD_POST and not S_IS_BOT --><a href="{U_VIEW_UNREAD_POST}">{L_VIEW_UNREAD_POST}</a> &bull; <!-- ENDIF -->{TOTAL_POSTS}
         <!-- IF PAGE_NUMBER --><!-- IF PAGINATION --> &bull; <a href="{U_LAST_POST}">{L_LAST_POST}</a> &bull; <a href="#" onclick="jumpto(); return false;" title="{L_JUMP_TO_PAGE}">{PAGE_NUMBER}</a> &bull; <span>{PAGINATION}</span><!-- ELSE --> &bull; {PAGE_NUMBER}<!-- ENDIF --><!-- ENDIF --> &bull; <a href="{U_VIEW_NEWER_TOPIC}">{L_VIEW_NEXT_TOPIC}</a>
      </div>
   <!-- ENDIF -->
find:

Code: Select all

	<!-- IF PAGINATION or TOTAL_POSTS -->
		<div class="pagination">
			{TOTAL_POSTS}
			<!-- IF PAGE_NUMBER --><!-- IF PAGINATION --> &bull; <a href="#" onclick="jumpto(); return false;" title="{L_JUMP_TO_PAGE}">{PAGE_NUMBER}</a> &bull; <span>{PAGINATION}</span><!-- ELSE --> &bull; {PAGE_NUMBER}<!-- ENDIF --><!-- ENDIF -->
		</div>
	<!-- ENDIF -->
replace with:

Code: Select all

	<!-- IF PAGINATION or TOTAL_POSTS -->
		<div class="pagination">
			<a href="{U_VIEW_OLDER_TOPIC}">{L_VIEW_PREVIOUS_TOPIC}</a> &bull; {TOTAL_POSTS}
			<!-- IF PAGE_NUMBER --><!-- IF PAGINATION --> &bull; <a href="#" onclick="jumpto(); return false;" title="{L_JUMP_TO_PAGE}">{PAGE_NUMBER}</a> &bull; <span>{PAGINATION}</span><!-- ELSE --> &bull; {PAGE_NUMBER}<!-- ENDIF --><!-- ENDIF --> &bull; <a href="{U_VIEW_NEWER_TOPIC}">{L_VIEW_NEXT_TOPIC}</a>
		</div>
	<!-- ENDIF -->
* if you use this snippet : viewtopic.php?f=9&t=1086&p=6418#p6418
replace with:

Code: Select all

   <!-- IF PAGINATION or TOTAL_POSTS -->
      <div class="pagination">
         <a href="{U_VIEW_OLDER_TOPIC}">{L_VIEW_PREVIOUS_TOPIC}</a> &bull; {TOTAL_POSTS}
         <!-- IF PAGE_NUMBER --><!-- IF PAGINATION -->&bull; <a href="{U_LAST_POST}">{L_LAST_POST}</a> &bull; <a href="#" onclick="jumpto(); return false;" title="{L_JUMP_TO_PAGE}">{PAGE_NUMBER}</a> &bull; <span>{PAGINATION}</span><!-- ELSE --> &bull; {PAGE_NUMBER}<!-- ENDIF --><!-- ENDIF --> &bull; <a href="{U_VIEW_NEWER_TOPIC}">{L_VIEW_NEXT_TOPIC}</a>
      </div>
   <!-- ENDIF -->
Refresh template for prosilver.
pic: (box highlighted in red is view last post link,green is view next last topic)
next-first.png
secret code: 123 might be abc or thank you might work
When I'm writing code, I am building a picture for you to see and use on your screen...
User avatar
Oliver Offline
BBCoder III
BBCoder III
Posts: 120
Joined: 07 Mar 2010, 09:55
Local time: Saturday 23:51
Last active: -

Re: Next topic,last topic in pagination for prosilver style

Post by Oliver »

Very good job steve.