Page 1 of 1

Next topic,last topic in pagination for prosilver style

Posted: 23 Aug 2010, 21:30
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

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

Posted: 23 Aug 2010, 21:53
by Oliver
Very good job steve.