Next And Previous Page Links on Topic View Page

For support and discussion related to templates, themes, and imagesets in phpBB 3.2.
Post Reply
SanjaySharma
Registered User
Posts: 3
Joined: Mon Nov 25, 2019 4:37 am

Next And Previous Page Links on Topic View Page

Post by SanjaySharma »

Hello Friends,

in phpbb 3.0 i use following code on viewtopic page at bottom of the last topic to allow user to browse next and previous page

Code: Select all

<!-- IF postrow.S_LAST_ROW-->
<div align="center"><!-- IF NEXT_PAGE or PREVIOUS_PAGE --><strong>Showing {PAGE_NUMBER}</strong><br><!-- ENDIF -->
<!-- IF PREVIOUS_PAGE --><a href="{PREVIOUS_PAGE}"><button type="button" class="btn btn-primary"><i class="fa fa-arrow-left"></i>&nbspPREVIOUS</button></a> <!-- ENDIF -->&nbsp &nbsp<!-- IF NEXT_PAGE --><a href="{NEXT_PAGE}"><button type="button" class="btn btn-primary">NEXT&nbsp<i class="fa fa-arrow-right"></i></button></a> <!-- ENDIF -->&nbsp &nbsp</div>
<!-- ENDIF -->

and in phpbb 3.2.2 i am trying following code. but its not working please help me

Code: Select all

	<!-- IF pagination.S_IS_PREV -->
		<li class="arrow previous"><a class="button button-icon-only" href="{pagination.PAGE_URL}" rel="prev" role="button"><i class="icon fa-chevron-{S_CONTENT_FLOW_BEGIN} fa-fw" aria-hidden="true"></i><span class="sr-only">{L_PREVIOUS}</span></a></li>
		<!-- ENDIF -->
		
	<!-- IF pagination.S_IS_NEXT -->
		<li class="arrow next"><a class="button button-icon-only" href="{pagination.PAGE_URL}" rel="next" role="button"><i class="icon fa-chevron-{S_CONTENT_FLOW_END} fa-fw" aria-hidden="true"></i><span class="sr-only">{L_NEXT}</span></a></li>
	<!-- ENDIF -->

User avatar
thecoalman
Community Team Member
Community Team Member
Posts: 3489
Joined: Wed Dec 22, 2004 3:52 am
Location: Pennsylvania, U.S.A.
Contact:

Re: Next And Previous Page Links on Topic View Page

Post by thecoalman »

Try:

Code: Select all

<!-- IF .pagination -->
<div class="pagination">
<ul>
<!-- BEGIN pagination -->
	<!-- IF pagination.S_IS_PREV -->
		<li class="arrow previous"><a class="button button-icon-only" href="{pagination.PAGE_URL}" rel="prev" role="button"><i class="icon fa-chevron-{S_CONTENT_FLOW_BEGIN} fa-fw" aria-hidden="true"></i><span class="sr-only">{L_PREVIOUS}</span></a></li>
		<!-- ENDIF -->
		
	<!-- IF pagination.S_IS_NEXT -->
		<li class="arrow next"><a class="button button-icon-only" href="{pagination.PAGE_URL}" rel="next" role="button"><i class="icon fa-chevron-{S_CONTENT_FLOW_END} fa-fw" aria-hidden="true"></i><span class="sr-only">{L_NEXT}</span></a></li>
	<!-- ENDIF -->
<!-- END pagination -->
</ul>
</div>
<!-- ENDIF -->
Untested but that is only going to produce two arrows already present a little bit below where you are putting it... To get the text you will need to remove the CSS.
“Results! Why, man, I have gotten a lot of results! I have found several thousand things that won’t work.”

Attributed - Thomas Edison

SanjaySharma
Registered User
Posts: 3
Joined: Mon Nov 25, 2019 4:37 am

Re: Next And Previous Page Links on Topic View Page

Post by SanjaySharma »

remove the CSS ??? which css file ?

User avatar
thecoalman
Community Team Member
Community Team Member
Posts: 3489
Joined: Wed Dec 22, 2004 3:52 am
Location: Pennsylvania, U.S.A.
Contact:

Re: Next And Previous Page Links on Topic View Page

Post by thecoalman »

You would remove reference to it from the HTML and any HTML it uses. Without testing it you are probably going to want to replace both instances of this:

Code: Select all

<a class="button button-icon-only"
With this:

Code: Select all

<a class="button"
“Results! Why, man, I have gotten a lot of results! I have found several thousand things that won’t work.”

Attributed - Thomas Edison

User avatar
Gumboots
Registered User
Posts: 217
Joined: Fri Oct 11, 2019 1:59 am

Re: Next And Previous Page Links on Topic View Page

Post by Gumboots »

The class you want to get rid of is actually .sr-only.
Utilities.css:

Code: Select all

.sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	border: 0;
}
.button-icon-only (buttons.css) won't affect the text spans:

Code: Select all

.button-icon-only {
	padding-left: 3px;
	padding-right: 3px;
}

SanjaySharma
Registered User
Posts: 3
Joined: Mon Nov 25, 2019 4:37 am

Re: Next And Previous Page Links on Topic View Page

Post by SanjaySharma »

thanks for help. buttons area loading fine. but next and previous links are not working.

see this Link :- https://www.url2share.com/viewtopic.php ... 14&start=1

User avatar
Hanakin
Front-End Dev Team Lead
Front-End Dev Team Lead
Posts: 943
Joined: Wed Dec 30, 2009 8:14 am
Name: Michael Miday
Contact:

Re: Next And Previous Page Links on Topic View Page

Post by Hanakin »

they mean remove the class in the html sr-only.....

Code: Select all

<!-- IF .pagination -->
<div class="pagination">
<ul>
<!-- BEGIN pagination -->
	<!-- IF pagination.S_IS_PREV -->
		<li class="arrow previous"><a class="button button-icon-only" href="{pagination.PAGE_URL}" rel="prev" role="button"><i class="icon fa-chevron-{S_CONTENT_FLOW_BEGIN} fa-fw" aria-hidden="true"></i><span>{L_PREVIOUS}</span></a></li>
		<!-- ENDIF -->
		
	<!-- IF pagination.S_IS_NEXT -->
		<li class="arrow next"><a class="button button-icon-only" href="{pagination.PAGE_URL}" rel="next" role="button"><i class="icon fa-chevron-{S_CONTENT_FLOW_END} fa-fw" aria-hidden="true"></i><span>{L_NEXT}</span></a></li>
	<!-- ENDIF -->
<!-- END pagination -->
</ul>

User avatar
Lumpy Burgertushie
Registered User
Posts: 67227
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: Next And Previous Page Links on Topic View Page

Post by Lumpy Burgertushie »

Code: Select all

<div align="center">
		<a href="" rel="prev" role="button"><button type="button" class="btn btn-primary"><i class="fa fa-arrow-left" ></i><span>&nbspPREVIOUS</span></button></a>&nbsp &nbsp
		<a href="" rel="next" role="button"><button type="button" class="btn btn-primary"><i class="fa fa-arrow-right"></i><span>&nbspNEXT</span></button></a>&nbsp &nbsp
        <a href="https://www.url2share.com/more.php"><button type="button" class="btn btn-primary">READ MORE&nbsp<i class="fa fa-hand-o-left"></i></button></a></div>

notice you have not put anything for the a href.
there are no links for those buttons to go anywhere.

robert
I'm baaaaaccckkkk. still doing work on donation basis. PM your needs.

Premium phpBB 3.3 Styles by PlanetStyles.net

If nobody is in the forest, does a tree really fall?

Post Reply

Return to “[3.2.x] Styles Support & Discussion”