Announcement

Collapse
No announcement yet.

Space after last post on page

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Space after last post on page

    Please can someone help? I want to remove the space after the last post in a thread, as I am adding a tcat style table to the showthread template and want it to join seamlessly with the last post on the page.

    Many thanks,

    Rob.
    Last edited by Rob Locke; Tue 31 May '05, 8:46am.

  • #2
    In the SHOWTHREAD template, find:

    HTML Code:
    <!-- / controls below postbits -->
    
    <br />
    And remove the <br /> from it. That should remove some spacing.

    You could also move the following:

    HTML Code:
    <div class="smallfont" align="center">
    	<strong>&laquo;</strong>
    		<a href="showthread.php?$session[sessionurl]t=$threadid&amp;goto=nextoldest">$vbphrase[prev_thread]</a>
    		|
    		<a href="showthread.php?$session[sessionurl]t=$threadid&amp;goto=nextnewest">$vbphrase[next_thread]</a>
    	<strong>&raquo;</strong>
    </div>
    To some other place (to the top perhaps?) and remove the <br /> right after the above code (or keep the code and remove the <br /> anyways ).

    Finally, if you'd like to remove the "Post Reply" button then remove the following from the same template:

    HTML Code:
    <!-- controls below postbits -->
    <table cellpadding="0" cellspacing="0" border="0" width="100%">
    <tr valign="top">
    	<if condition="$show['largereplybutton']">
    		<td class="smallfont"><a href="newreply.php?$session[sessionurl]do=newreply&amp;noquote=1&amp;p=$LASTPOSTID"><if condition="$show['closethread']"><img src="$stylevar[imgdir_button]/reply.gif" alt="$vbphrase[reply]" border="0" /><else /><img src="$stylevar[imgdir_button]/threadclosed.gif" alt="$vbphrase[closed_thread]" border="0" ></if></a></td>
    	</if>	
    	<if condition="$show['pagenav']"><td align="$stylevar[right]">$pagenav</td></if>
    </tr>
    </table>
    <!-- / controls below postbits -->
    MGM out

    Comment


    • #3
      Thanks MGM. This is useful, but I actually need a conditional in the postbit which allows the space to appear between all the posts except the last one on the page. Any ideas?

      Comment


      • #4
        Try replacing
        Code:
        	<div style="padding:0px 0px $stylevar[cellpadding]px 0px">
        near the top with
        Code:
        <if condition="$postonpage++">
        	<div style="padding:$stylevar[cellpadding]px 0px 0px 0px">
        <else />
        	<div style="padding:0px 0px 0px 0px">
        </if>
        This moves the space to the top of the postbit instead of the bottom, and then doesn't show it for the first post on the page.
        http://www.zelaron.com/sigs/rotsig.gif

        Comment


        • #5
          For a moment there I got excited

          This looks like it should work. Everything is great except there is still a gap at the top of the first post. Any ideas?

          Comment


          • #6
            Originally posted by WetWired
            Try replacing
            Code:
            	<div style="padding:0px 0px $stylevar[cellpadding]px 0px">
            near the top with
            Code:
            <if condition="$postonpage++">
            	<div style="padding:$stylevar[cellpadding]px 0px 0px 0px">
            <else />
            	<div style="padding:0px 0px 0px 0px">
            </if>
            This moves the space to the top of the postbit instead of the bottom, and then doesn't show it for the first post on the page.
            What I am finding is that the $postonpage++ is not being recognized and so the posts are spaced according to the <else /> conditional, i.e. the padding is 0px accross the board.

            Presumably there is also a variable for the 'last post on page' and, to achieve the same effect, I could add a conditional:
            Code:
            <if condition="[b]whatever the last post on page variable is[/b]">
                <div style="padding:0px 0px 0px 0px">
            <else />
            	<div style="padding:0px 0px $stylevar[cellpadding]px 0px">
            </if>
            Any suggestions? All I want to do is remove the padding from the last post on the page of my threads, so a table will fit flush up to it.

            Thanks again for any/all help.

            Comment


            • #7
              In the template, there is reference to a last post on page variable, however, if you look at the page output, it is broken; the comment that it should hide does not get hidden.

              Now that I think about it, the problem with my solution is that unlike in forumdisplay, the parts are drawn from their own function, so a global variable would have to be used for my solution to work. I'll look into this some more...
              http://www.zelaron.com/sigs/rotsig.gif

              Comment


              • #8
                Originally posted by WetWired
                In the template, there is reference to a last post on page variable, however, if you look at the page output, it is broken; the comment that it should hide does not get hidden.
                I thought this wasn't working, as I tried every permutation to use the variable. I'm glad I wasn't going mad and that it should hide the comment. If this was repaired, all would be right with my world again!

                Thank you so much for looking into this - your help is hugely appreciated. I wait with enormous anticipation of a solution.
                Last edited by Rob Locke; Tue 31 May '05, 12:34pm.

                Comment


                • #9
                  Okay, this conditional works on my forums in all thread view modes for finding the posts besides the first displayed:
                  Code:
                  <if condition="($GLOBALS['threadedmode']!=1)&&($GLOBALS['postonpage']++)">
                  http://www.zelaron.com/sigs/rotsig.gif

                  Comment


                  • #10
                    Originally posted by WetWired
                    Okay, this conditional works on my forums in all thread view modes for finding the posts besides the first displayed:
                    Code:
                    <if condition="($GLOBALS['threadedmode']!=1)&&($GLOBALS['postonpage']++)">
                    GENIUS!!! It works. You have no idea how much time I have spent on this. THANK YOU, THANK YOU!

                    I don't suppose you do any custom work, do you?

                    Comment


                    • #11
                      Originally posted by WetWired
                      Okay, this conditional works on my forums in all thread view modes for finding the posts besides the first displayed:
                      Code:
                      <if condition="($GLOBALS['threadedmode']!=1)&&($GLOBALS['postonpage']++)">
                      The only thing is I have now run into another little issue. So you understand what I have done, the first post in my thread is separated from the rest and post 2 has a tcat table on the top of it and the last post has a tcat table on the bottom of it.

                      This mod makes a gap now between my the tcat table and post 2. Is there a way of adding another small conditional which singles out post 2 and removes the padding from the top? Sorry to be a pain!

                      Comment


                      • #12
                        Sorry, I try to reserve any significant chunk of PHP/coding time for my own website; I'm not in the mood away from work much.
                        http://www.zelaron.com/sigs/rotsig.gif

                        Comment


                        • #13
                          Hmm, that's a bit tricky, because the post numbering works differently in hybrid mode.
                          I think what you can do is change your conditional for your first post so it sets up for the second. This would be easiest if you posted your postbit template, or explained exactly how the first post of the thread is set apart if it's not done in the postbit template.
                          http://www.zelaron.com/sigs/rotsig.gif

                          Comment


                          • #14
                            I can simplify what I want to do. What this relies upon is the 'islastshown' variable working.

                            Basically, I need the stylevar padding to be at the bottom, not the top. Therefore, is there a condition, similar to
                            <if condition="($GLOBALS['threadedmode']!=1)&&($GLOBALS['postonpage']++)"> that will work solely to recognize the last post on the page? Can 'islastshown' be put in to the GLOBALS phrase somehow so it does what it is supposed to?

                            I just need to be able to set <div style="padding: 0px 0px 0px 0px" to the last post shown on the page and if the stylevar padding is on the bottom of the posts, this will space the forums perfectly and everything else will work fine.

                            Thanks again.

                            Comment


                            • #15
                              Okay, after looking at this some more, it seems that they only bothered to implement islastshown for linear mode, however threaded mode, the displayed post is always last and hybrid mode does have the info for the conditional for islastshown in a different variable, so you just have to use different sources depending on the display mode. This should do what you want:
                              Code:
                              <if condition="(($GLOBALS['threadedmode']==0)&&!$post['islastshown'])||(($GLOBALS['threadedmode']==2)&&($GLOBALS['LASTPOSTID']!=$post['postid']))">
                              	<div style="padding:0px 0px $stylevar[cellpadding]px 0px">
                              <else />
                              	<div style="padding:0px 0px 0px 0px">
                              </if>
                              http://www.zelaron.com/sigs/rotsig.gif

                              Comment

                              widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
                              Working...
                              X