Announcement

Collapse
No announcement yet.

Changing the width of forum columns.

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

  • 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?

  • #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" width="100%" align="$stylevar[left]">$vbphrase[forum]</td>
    	  <td class="thead" width="175">$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" width="5%">&nbsp;</td>
    	  <td class="thead" width="50%" align="$stylevar[left]">$vbphrase[forum]</td>
    	  <td class="thead" width="25%">$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>
    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


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

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

      Comment


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

        Comment


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

          http://www.gargoyledawn.com/new/forum

          I did both my styles..

          thanks,

          rokkyu

          Comment


          • #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


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

              Thanks,

              rokkyu

              Comment


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

                Comment


                • #9
                  Works for me!

                  Comment


                  • #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" width="100%" align="$stylevar[left]">$vbphrase[forum]</td>
                     	  <td class="thead" width="175">$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" width="5%">&nbsp;</td>
                     	  <td class="thead" width="50%" align="$stylevar[left]">$vbphrase[forum]</td>
                     	  <td class="thead" width="25%">$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>
                    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


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

                      Comment


                      • #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


                        • #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


                          • #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


                            • #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...
                              X