phpbb2 & phpbb3 : Display post numbers Hitskin_logo Hitskin.com

This is a Hitskin.com skin preview
Install the skinReturn to the skin page

The forum of the forums
Would you like to react to this message? Create an account in a few clicks or log in to continue.

    phpbb2 & phpbb3 : Display post numbers

    Ange Tuteur
    Ange Tuteur
    Forumaster


    Male Posts : 13246
    Reputation : 3000
    Language : English & 日本語
    Location : Pennsylvania

    Tutorial phpbb2 & phpbb3 : Display post numbers

    Post by Ange Tuteur January 16th 2015, 7:43 am

    Display post numbers for phpbb2 and phpbb3

    This tutorial will help you display the number on posts for versions phpbb2 and phpbb3 of your Forumotion forum.

    phpbb2 & phpbb3 : Display post numbers Captur10


    Modification of viewtopic_body

    Go to Administration Panel > Display > Templates > General and open the viewtopic_body template. Edit

    Exclamation Follow the instructions for your forum version !

    Phpbb3

    Find :
    Code:
    <div style="position: relative; top: -30px; width: 1px;" id="{postrow.displayed.U_POST_ID}"></div>

    Replace by :
    Code:
    <div style="position: relative; top: -30px; width: 1px;" id="{postrow.displayed.U_POST_ID}"></div>
    <div class="postNumberContainer"><a href="{postrow.displayed.POST_URL}" class="postNumber">#{postrow.displayed.COUNT_POSTS}</a></div>

    Phpbb2

    Find :
    Code:
    <td><span class="postdetails"><img src="{postrow.displayed.MINI_POST_IMG}" alt="{postrow.displayed.L_MINI_POST_ALT}" title="{postrow.displayed.L_MINI_POST_ALT}" border="0" />{L_POST_SUBJECT}: {postrow.displayed.POST_SUBJECT}&nbsp; &nbsp;<img src="{postrow.displayed.MINI_TIME_IMG}" alt="" border="0" />{postrow.displayed.POST_DATE}</span></td>

    Replace by :
    Code:
    <td><span class="postdetails"><a class="postNumber" href="{postrow.displayed.POST_URL}">#{postrow.displayed.COUNT_POSTS}</a><img src="{postrow.displayed.MINI_POST_IMG}" alt="{postrow.displayed.L_MINI_POST_ALT}" title="{postrow.displayed.L_MINI_POST_ALT}" border="0" />{L_POST_SUBJECT}: {postrow.displayed.POST_SUBJECT}&nbsp; &nbsp;<img src="{postrow.displayed.MINI_TIME_IMG}" alt="" border="0" />{postrow.displayed.POST_DATE}</span></td>

    Modifications :
    To change the # next to the post number. Find #{postrow.displayed.COUNT_POSTS} and replace the # with whatever you want.

    Don't forget to save and publish the template ! Add

    Afterwards you should now see the numbers on posts. See the next section for style modifications. Wink


    Modifying the style

    To change the style go to Administration Panel > Display > Colors > CSS stylesheet. Paste any of the codes below that are for your forum version.

    If you want to align the number to the right on phpbb3 :
    Code:
    .postNumberContainer { text-align:right }
    You can change the alignment with these values : left || center || right


    To change the display of the number like this : phpbb2 & phpbb3 : Display post numbers Captur11, use the example below and modify it to your liking.
    Code:
    a.postNumber {
      font-size:10px; /* size of the number */
      color:#666; /* color of the link */
      background:#EEE; /* background color */
      border:1px solid #CCC; /* border size, type, and color */
      border-radius:3px; /* border roundness */
      display:inline-block; /* display state */
      padding:2px; /* inner spacing */
    }


    Information :
    The classname .postNumber is used to style the post number link. e.g. #1, #2, #3

    The classname .postNumberContainer is used only in phpbb3, and refers to the container that holds the post number.