phpBB

Development Discussion Board

phpBB's testing ground of bleeding edge code
Advanced search

[RFC|Merged] Pagination as <ul> list

These requests for comments have lead to an implemented feature that has been successfully merged into the 3.1/Ascraeus branch. Everything listed in this forum will be available in phpBB 3.1.

[RFC|Merged] Pagination as <ul> list

Postby ecwpa » Tue May 08, 2012 12:48 am

Currently the pagination styling is done by a class called .pagination. The html rendered shows something like this:

Code: Select all
<div class="pagination">
         11 mensajes
          • <a href="#" onclick="jumpto(); return false;" title="Clic para saltar a página…">Página <strong>1</strong> de <strong>2</strong></a> • <span><strong>1</strong><span class="page-sep">, </span><a href="./viewtopic.php?etc">2</a></span>
      </div>


I guess you can see how messy it looks, this is my alternative:

Code: Select all
<div class="pagination">
    <ul>
        <li>11 mensajes</li>
        <li><a href="#" onclick="jumpto(); return false;" title="Clic para saltar a página…"></li>
        <li>Página <strong>1</strong> de <strong>2</strong></a></li>
        <li>1</li>
        <li><a href="./viewtopic.php?etc">2</a></li>
    </ul>
</div>


Or something like that, the point is, the current state looks outdated and not that easy to customize IMO.

TICKET: http://tracker.phpbb.com/browse/PHPBB3-10968
Last edited by naderman on Thu Jul 19, 2012 1:29 pm, edited 4 times in total.
Reason: Add ticket
Sorry for my bad english, still improving.
ecwpa
Registered User
 
Posts: 169
Joined: Mon Jan 24, 2005 2:10 am

Re: [RFC] Pagination as <ul> list

Postby callumacrae » Tue May 08, 2012 5:30 am

+1
"In JavaScript, there is a beautiful, elegant, highly expressive language that is buried under a steaming pile of good intentions and blunders"
—Douglas Crockford

View my MOD, phpBB Mobile
User avatar
callumacrae
Website Team
Website Team
 
Posts: 882
Joined: Tue Apr 27, 2010 9:37 am
Location: England

Re: [RFC] Pagination as <ul> list

Postby MichaelC » Tue May 08, 2012 7:06 am

+1
Unknown Bliss
psoTFX wrote:I went with Olympus because as I said to the teams ... "It's been one hell of a hill to climb"

No unsolicited PMs please except for quotes.
User avatar
MichaelC
Website Team
Website Team
 
Posts: 797
Joined: Thu Jan 28, 2010 6:29 pm

Re: [RFC] Pagination as <ul> list

Postby brunoais » Tue May 08, 2012 7:16 am

+1
brunoais
Registered User
 
Posts: 626
Joined: Fri Dec 18, 2009 3:55 pm

Re: [RFC] Pagination as <ul> list

Postby Senky » Tue May 08, 2012 8:48 am

+1
Senky
Registered User
 
Posts: 222
Joined: Thu Jul 16, 2009 4:41 pm

Re: [RFC] Pagination as <ul> list

Postby AliasM2K » Tue May 08, 2012 11:25 pm

+1 of course :D
User avatar
AliasM2K
Registered User
 
Posts: 82
Joined: Tue Mar 27, 2012 2:33 am

Re: [RFC] Pagination as <ul> list

Postby brunoais » Wed May 09, 2012 10:58 am

+1 :D
brunoais
Registered User
 
Posts: 626
Joined: Fri Dec 18, 2009 3:55 pm

Re: [RFC] Pagination as <ul> list

Postby hanakin » Sat May 19, 2012 5:03 am

+1

this was mentioned along with several other mistakes in the backend that produce in proper semantics or render html when they only need to output text in a post I made awhile back
hanakin
Registered User
 
Posts: 172
Joined: Sat Dec 25, 2010 9:02 pm

Re: [RFC] Pagination as <ul> list

Postby Meis2M » Sat May 19, 2012 8:01 am

and +2
User avatar
Meis2M
Registered User
 
Posts: 213
Joined: Fri Apr 23, 2010 10:18 am

Re: [RFC] Pagination as <ul> list

Postby psoTFX » Wed Jul 04, 2012 10:41 pm

I've opened a ticket for this. It's a little different from the op's original proposal but accomplishes the basic requirement. Rendering of pagination moves entirely to the template where the markup is of the (general) form:

Code: Select all
<div class="pagination">
            <ul>
            <!-- BEGIN pagination -->
               <!-- IF pagination.S_IS_PREV -->
               <!-- ELSEIF pagination.S_IS_CURRENT -->
               <li class="active"><span>{pagination.PAGE_NUMBER}</span></li>
               <!-- ELSEIF pagination.S_IS_ELLIPSIS -->
               <li class="ellipsis"><span>{L_ELLIPSIS}</span></li>
               <!-- ELSEIF pagination.S_IS_NEXT -->
               <!-- ELSE -->
               <li><a href="{pagination.PAGE_URL}">{pagination.PAGE_NUMBER}</a></li>
               <!-- ENDIF -->
            <!-- END pagination -->
            </ul>
</div>

This looks a bit "woowah!" - but I think it gives complete control of just what is shown. For example rather than the source deciding whether to show next/previous the style designer can and the form they may take. Likewise the form of any ellipsis, how "current" (active) elements are displayed, etc. Pagination can still be embedded within other blocks, e.g. on viewforum (for multi-page topics), etc. in the process I eliminated the seperate topic_generate_pagination function and merged it with generate_pagination (I did take a couple of liberties but they are just consistent with how things have worked for years). I need to modify the subsilver2 templates then I'll put in a PR.
User avatar
psoTFX
Registered User
 
Posts: 1984
Joined: Tue Jul 03, 2001 8:50 pm

Next

Return to [3.1/Ascraeus] Merged RFCs

Who is online

Users browsing this forum: No registered users and 8 guests