Page 1 of 1

Next And Previous Page Links on Topic View Page

Posted: Mon Nov 25, 2019 4:47 am
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 -->

Re: Next And Previous Page Links on Topic View Page

Posted: Mon Nov 25, 2019 5:53 am
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.

Re: Next And Previous Page Links on Topic View Page

Posted: Mon Nov 25, 2019 7:47 am
by SanjaySharma
remove the CSS ??? which css file ?

Re: Next And Previous Page Links on Topic View Page

Posted: Mon Nov 25, 2019 2:17 pm
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"

Re: Next And Previous Page Links on Topic View Page

Posted: Mon Nov 25, 2019 8:17 pm
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;
}

Re: Next And Previous Page Links on Topic View Page

Posted: Tue Nov 26, 2019 9:02 am
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

Re: Next And Previous Page Links on Topic View Page

Posted: Wed Nov 27, 2019 1:47 am
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>

Re: Next And Previous Page Links on Topic View Page

Posted: Wed Nov 27, 2019 1:57 am
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