Changing the width of forum columns.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • GaleForce
    Senior Member
    • Sep 2002
    • 138

    Changing the width of forum columns.

    Floris helped me with this before, but I'd like to be able to tweak some of the widths without always having to ask her to do it. Right now, my "Last Post" column is a little bit wider than my liking. What template(s) can that be found in?
  • Jake Bunce
    Senior Member
    • Dec 2000
    • 46598
    • 3.6.x

    #2
    To adjust the column widths you need to account for 100% of the horrizontal space.

    Go to your:

    Admin CP -> Styles & Templates -> Style Manager -> « » -> Forum Home Templates » -> FORUMHOME

    Find this code:

    Code:
    	<tr align="center">
    	  <td class="thead">&nbsp;</td>
    	  <td class="thead" [color=red]width="100%"[/color] align="$stylevar[left]">$vbphrase[forum]</td>
    	  <td class="thead" [color=red]width="175"[/color]>$vbphrase[last_post]</td>
    	  <td class="thead">$vbphrase[threads]</td>
    	  <td class="thead">$vbphrase[posts]</td>
    	  <if condition="$vboptions['showmoderatorcolumn']">
    	  <td class="thead">$vbphrase[moderator]</td>
    	  </if>
    	</tr>
    Notice how not all of the table cells (<td> tags) have width attributes. You need to give each cell a width attribute, and the total widths need to equal 100% of the horrizontal space. Percentages work well for this. Here is an example of what you might use:

    Code:
    	<tr align="center">
    	  <td class="thead" [color=red]width="5%"[/color]>&nbsp;</td>
    	  <td class="thead" [color=red]width="50%"[/color] align="$stylevar[left]">$vbphrase[forum]</td>
    	  <td class="thead" [color=red]width="25%"[/color]>$vbphrase[last_post]</td>
    	  <td class="thead" [color=red]width="10%"[/color]>$vbphrase[threads]</td>
    	  <td class="thead" [color=red]width="10%"[/color]>$vbphrase[posts]</td>
    	  <if condition="$vboptions['showmoderatorcolumn']">
    	  <td class="thead" [color=red]width="0%"[/color]>$vbphrase[moderator]</td>
    	  </if>
    	</tr>
    Notice how the total width is 100%. The above example assumes you are not using the Moderator column. If you have that column enabled then you need give the moderator column a piece of the pie.

    Comment

    • turkforum
      Senior Member
      • Oct 2004
      • 138
      • 3.7.x

      #3
      I tried to these numbers but seems like not working?

      any idea why
      http://www.turkforum.net

      Comment

      • Jake Bunce
        Senior Member
        • Dec 2000
        • 46598
        • 3.6.x

        #4
        Can you post a link to your forum so I can see the problem?

        Comment

        • rokkyu
          New Member
          • Sep 2004
          • 8

          #5
          I also tried this but for some reason it is not working here is my link:



          I did both my styles..

          thanks,

          rokkyu

          Comment

          • Jake Bunce
            Senior Member
            • Dec 2000
            • 46598
            • 3.6.x

            #6
            Originally posted by rokkyu
            I also tried this but for some reason it is not working here is my link:

            http://www.gargoyledawn.com/new/forum
            Everything looks correct and appears to be working.

            Comment

            • rokkyu
              New Member
              • Sep 2004
              • 8

              #7
              Then how come my forum still looks wide? How do I make it a skinnier format?

              Thanks,

              rokkyu

              Comment

              • Jake Bunce
                Senior Member
                • Dec 2000
                • 46598
                • 3.6.x

                #8
                Admin CP -> Styles & Templates -> Style Manager -> StyleVars (in the menu) -> Main Table Width

                Comment

                • Joseph777
                  Senior Member
                  • Sep 2004
                  • 631
                  • 3.0.3

                  #9
                  Works for me!

                  Comment

                  • alexdelli
                    New Member
                    • Jan 2005
                    • 6
                    • 3.0.4

                    #10
                    Originally posted by Jake Bunce
                    To adjust the column widths you need to account for 100% of the horrizontal space.

                    Go to your:

                    Admin CP -> Styles & Templates -> Style Manager -> « » -> Forum Home Templates » -> FORUMHOME

                    Find this code:

                    Code:
                     	<tr align="center">
                     	  <td class="thead">&nbsp;</td>
                     	  <td class="thead" [color=red]width="100%"[/color] align="$stylevar[left]">$vbphrase[forum]</td>
                     	  <td class="thead" [color=red]width="175"[/color]>$vbphrase[last_post]</td>
                     	  <td class="thead">$vbphrase[threads]</td>
                     	  <td class="thead">$vbphrase[posts]</td>
                     	  <if condition="$vboptions['showmoderatorcolumn']">
                     	  <td class="thead">$vbphrase[moderator]</td>
                     	  </if>
                     	</tr>
                    Notice how not all of the table cells (<td> tags) have width attributes. You need to give each cell a width attribute, and the total widths need to equal 100% of the horrizontal space. Percentages work well for this. Here is an example of what you might use:

                    Code:
                     	<tr align="center">
                     	  <td class="thead" [color=red]width="5%"[/color]>&nbsp;</td>
                     	  <td class="thead" [color=red]width="50%"[/color] align="$stylevar[left]">$vbphrase[forum]</td>
                     	  <td class="thead" [color=red]width="25%"[/color]>$vbphrase[last_post]</td>
                     	  <td class="thead" [color=red]width="10%"[/color]>$vbphrase[threads]</td>
                     	  <td class="thead" [color=red]width="10%"[/color]>$vbphrase[posts]</td>
                     	  <if condition="$vboptions['showmoderatorcolumn']">
                     	  <td class="thead" [color=red]width="0%"[/color]>$vbphrase[moderator]</td>
                     	  </if>
                     	</tr>
                    Notice how the total width is 100%. The above example assumes you are not using the Moderator column. If you have that column enabled then you need give the moderator column a piece of the pie.

                    I tried but not working...i've vB 3.0.5

                    This is MY site

                    I've separate categories like this
                    and i applied the code fix... but....

                    this is my FORUMDISPLY

                    $stylevar[htmldoctype]
                    <html dir="$stylevar[textdirection]" lang="$stylevar[languagecode]">
                    <head>
                    <meta name="description" content="$foruminfo[description]" />
                    <title>$vboptions[bbtitle] - $foruminfo[title]</title>
                    $headinclude
                    </head>
                    <body>
                    $header
                    $navbar

                    <if condition="$show['forumslist']">
                    <!-- sub-forum list -->
                    <table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center" style="border-bottom-width:0px">
                    <tr>
                    <td class="tcat" width="100%">$vbphrase[subforums]<span class="normal">: $foruminfo[title]</span></td>
                    <if condition="$show['forumsearch']">
                    <td class="vbmenu_control" id="forumsearch.subforums"><a href="search.php?$session[sessionurl]f=$foruminfo[forumid]">$vbphrase[search_this_forum]</a> <script type="text/javascript"> vbmenu_register("forumsearch.subforums"); </script></td>
                    </if>
                    </tr>
                    </table>
                    <table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
                    <thead>
                    <tr align="center">
                    <td class="thead" width="5%">&nbsp;</td>
                    <td class="thead" width="55%" align="$stylevar[left]">$vbphrase[forum]</td>
                    <td class="thead" width="20%">$vbphrase[last_post]</td>
                    <td class="thead" width="10%">$vbphrase[threads]</td>
                    <td class="thead" width="10%">$vbphrase[posts]</td>
                    <if condition="$vboptions['showmoderatorcolumn']">
                    <td class="thead" width="0%">$vbphrase[moderator]</td>
                    </if>
                    </tr>
                    </thead>
                    $forumbits
                    </table>
                    <br />
                    <!-- / sub-forum list -->
                    </if>

                    and this is my forumbit level 1 nopost

                    </table>

                    <br />

                    <table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
                    <tbody>
                    <tr>
                    <td class="tcat" colspan="<if condition="$vboptions[showmoderatorcolumn]">6<else />5</if>">
                    <a style="float:$stylevar[right]" href="#top" onclick="return toggle_collapse('forumbit_$forumid')"><img id="collapseimg_forumbit_$forumid" src="$stylevar[imgdir_button]/collapse_tcat{$collapseimg_forumid}.gif" alt="" border="0" /></a>
                    <a href="forumdisplay.php?$session[sessionurl]f=$forum[forumid]">$forum[title]</a>
                    <if condition="$show['forumdescription']"><div class="smallfont">$forum[description]</div></if>
                    <if condition="$show['subforums']"><div class="smallfont"><strong>$vbphrase[subforums]</strong>: $forum[subforums]</div></if>
                    </td>
                    </tr>
                    <tr align="center">
                    <td class="thead" width="5%">&nbsp;</td>
                    <td class="thead" width="55%" align="$stylevar[left]">$vbphrase[forum]</td>
                    <td class="thead" width="20%">$vbphrase[last_post]</td>
                    <td class="thead" width="10%">$vbphrase[threads]</td>
                    <td class="thead" width="10%">$vbphrase[posts]</td>
                    <if condition="$vboptions['showmoderatorcolumn']">
                    <td class="thead" width="0%">$vbphrase[moderator]</td>
                    </if>
                    </tr>

                    </tbody>

                    Comment

                    • Jake Bunce
                      Senior Member
                      • Dec 2000
                      • 46598
                      • 3.6.x

                      #11
                      It seems to be working. I don't see a problem.

                      Comment

                      • Aros
                        Senior Member
                        • Jun 2002
                        • 323
                        • 3.7.x

                        #12
                        I think he's talking about the Last Post column being a bit too wide (for his liking) still.
                        Anyhow, it's because the column is set to 'nowrap'. You may want to delete the code:
                        Code:
                        nowrap="nowrap"
                        From forumhome_forumbit_level2_post (the Last Post column).
                        Or you could set a vBulletin Option to a less value; Last Thread Title Maximum Displayed Characters.

                        Comment

                        • Resale Broker
                          Member
                          • Aug 2004
                          • 37
                          • 3.6.x

                          #13
                          Thanks for the tips. That is exactly what I was looking for.
                          Online Sales Training community featuring practical resources including podcasts, scripts, articles and more. - Jeff Blackwell

                          Comment

                          • LeftCoastBias
                            Senior Member
                            • Nov 2005
                            • 108
                            • 3.5.x

                            #14
                            Originally posted by Jake Bunce
                            It seems to be working. I don't see a problem.
                            it's not doing it for me...

                            see here:

                            tehdriven.com

                            Comment

                            • LeftCoastBias
                              Senior Member
                              • Nov 2005
                              • 108
                              • 3.5.x

                              #15
                              bump for the morning crowd
                              tehdriven.com

                              Comment

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