[3.0.3] Category Splitting

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Floris
    Senior Member
    • Dec 2001
    • 37767

    [3.0.3] Category Splitting

    Category Splitting

    How to split the categories up from eachother, template modification, for vBulletin version 3.0.3

    Author: Floris - http://www.vBulletin.nl/

    Installation Instructions:

    # Open the Admin Control Panel > Styles & Templates > Style Manager > Forum Home Template Group > FORUMHOME template, and find this code:

    Code:
    <!-- main -->
    <table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
    <thead>
    <if condition="$show['guest']">
    <!-- guest welcome message -->
    <tr>
    <td class="tcat" colspan="<if condition="$vboptions['showmoderatorcolumn']">6<else />5</if>"><phrase 1="$vboptions[bbtitle]">$vbphrase[welcome_to_the_x]</phrase></td>
    </tr>
    <tr>
    <td class="alt1" colspan="<if condition="$vboptions['showmoderatorcolumn']">6<else />5</if>">
    <phrase 1="faq.php?$session[sessionurl]" 2="register.php?$session[sessionurl]">$vbphrase[first_visit_message]</phrase>
    </td>
    </tr>
    <!-- / guest welcome message -->
    </if>
    <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>
    </thead>
    $forumbits
    <tbody>
    <tr>
    <td class="tfoot" align="center" colspan="<if condition="$vboptions['showmoderatorcolumn']">6<else />5</if>"><div class="smallfont"><strong>
    <a href="forumdisplay.php?$session[sessionurl]do=markread">$vbphrase[mark_forums_read]</a>
    &nbsp; &nbsp;
    <a href="showgroups.php?$session[sessionurl]">$vbphrase[view_forum_leaders]</a>
    </strong></div></td>
    </tr>
    </tbody>
    </table>
    <!-- /main -->
    # and replace it with this code:

    Code:
    <!-- guest welcome message -->
    <if condition="$show['guest']">
    <table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
    <thead>
    <tr>
    <td class="tcat" colspan="<if condition="$vboptions['showmoderatorcolumn']">6<else />5</if>"><phrase 1="$vboptions[bbtitle]">$vbphrase[welcome_to_the_x]</phrase></td>
    </tr>
    <tr>
    <td class="alt1" colspan="<if condition="$vboptions['showmoderatorcolumn']">6<else />5</if>">
    <phrase 1="faq.php?$session[sessionurl]" 2="register.php?$session[sessionurl]">$vbphrase[first_visit_message]</phrase>
    </td>
    </tr>
    </thead>
    </table>
    </if>
    <!-- / guest welcome message -->
    <!-- main -->
    $forumbits
    <!-- /main -->
    # now find this code:

    Code:
    </table>
    <br />
    <!-- end what's going on box -->
    # and replace that with this code:

    Code:
    <tbody>
    <tr>
    <td class="thead" align="center" colspan="<if condition="$vboptions['showmoderatorcolumn']">6<else />5</if>"><div class="smallfont"><strong>
    <a href="forumdisplay.php?$session[sessionurl]do=markread">$vbphrase[mark_forums_read]</a>
    &nbsp; &nbsp;
    <a href="showgroups.php?$session[sessionurl]">$vbphrase[view_forum_leaders]</a>
    </strong></div></td>
    </tr>
    </tbody>
    </table>
    <br />
    <!-- end what's going on box -->
    # Save the FORUMHOME template

    # Open the template forumhome_forumbit_level1_nopost and replace the full content with this code:

    Code:
    <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>
    </tbody>
    <if condition="$childforumbits">
    <tbody id="collapseobj_forumbit_$forumid" style="{$collapseobj_forumid}">
    <tr align="center">
    <td class="thead" width="35">&nbsp;</td>
    <td class="thead" align="$stylevar[left]">$vbphrase[forum]</td>
    <td class="thead" width="200">$vbphrase[last_post]</td>
    <td class="thead" width="65">$vbphrase[threads]</td>
    <td class="thead" width="65">$vbphrase[posts]</td>
    <if condition="$vboptions['showmoderatorcolumn']">
    <td class="thead" width="120">$vbphrase[moderator]</td>
    </if>
    </tr>
    $childforumbits
    <tr><td class="thead" style="line-height: 0; padding: 0; margin: 0;" colspan="<if condition="$vboptions[showmoderatorcolumn]">6<else />5</if>"><img src="$vboptions[cleargifurl]" alt="" width="1" height="12" /></td></tr>
    </tbody>
    </if>
    </table>
    <div style="padding:0px 0px 16px 0px;"></div>
    # Note: You can change the split height of 16px to any number you want.

    # Save the forumhome_forumbit_level1_nopost template

    # Open the forumhome_forumbit_level2_post template and replace the full content with this code:

    Code:
    <tr align="center">
    <td class="alt2" width="35"><img src="$stylevar[imgdir_statusicon]/forum_$forum[statusicon].gif" alt="" border="0" /></td>
    <td class="alt1Active" align="$stylevar[left]" id="f$forum[forumid]">
    <div>
    <a href="forumdisplay.php?$session[sessionurl]f=$forum[forumid]"><strong>$forum[title]</strong></a>
    <if condition="$show['browsers']"><span class="smallfont">(<phrase 1="$forum[browsers]">$vbphrase[x_viewing]</phrase>)</span></if>
    </div>
    <if condition="$show['forumdescription']"><div class="smallfont">$forum[description]</div></if>
    <if condition="$show['forumsubscription']"><div class="smallfont"><strong><a href="subscription.php?$session[sessionurl]do=removesubscription&amp;f=$forum[forumid]">$vbphrase[unsubscribe_from_this_forum]</a></strong></div></if>
    <if condition="$show['subforums']"><div class="smallfont" style="margin-top:$stylevar[cellpadding]px"><strong>$vbphrase[subforums]</strong>: $forum[subforums]</div></if>
    </td>
    <td class="alt2" width="200" nowrap="nowrap">$forum[lastpostinfo]</td>
    <td class="alt1" width="65">$forum[threadcount]</td>
    <td class="alt2" width="65">$forum[replycount]</td>
    <if condition="$vboptions['showmoderatorcolumn']">
    <td class="alt1" width="120"><div class="smallfont">$forum[moderators]&nbsp;</div></td>
    </if>
    </tr>
    $childforumbits
    # Save the forumhome_forumbit_level2_post template.

    ## Done Enjoy.


    // Can I distribute this source code mod? NO.
    // Why is this better then the other mods? Becuz.
    Attached Files
    Last edited by Floris; Fri 16 Jul '04, 12:35pm.
  • kira
    Senior Member
    • Aug 2002
    • 188

    #2
    Hi Floris, thanks for the code!

    Unfortuantely, I've been trying without success to make it work with the Subforums in columns on forumhome hack by Xenon over on vb.org, which has changed my forumbit_level1_nopost template. The result is pretty fugly, LOL. Can you help me figure out how to reconfigure your template mod with the revised forumbit template below?

    PHP Code:
    <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_$forumidsrc="$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>
    </
    tbody>
    <if 
    condition="$childforumbits">
    <
    tbody id="collapseobj_forumbit_$forumidstyle="{$collapseobj_forumid}">
    <if 
    condition="$forum['subforumcolumns'] > 1">
     <
    tr>
      <
    td class="alt1" colspan="<if condition="$vboptions[showmoderatorcolumn]">6<else />5</if>">
    <
    table style="border: none; width: 100%;">
       
    $childforumbits
    </table>
      </
    td>
     </
    tr>
    <else />
     
    $childforumbits
    </if>
    </
    tbody>
    </if> 
    Help! And thanks for all you do over on vbulletin.nl.
    Kira

    EpiGuide: Web Entertainment Forums - vB Board of the Month, Aug 2007
    About Schuyler Falls, an Original Drama | Falling Sky Designs

    Comment

    • HaloImpulse
      Senior Member
      • Jul 2004
      • 139
      • 3.0.3

      #3
      :-D. Nice tut

      Comment

      • Floris
        Senior Member
        • Dec 2001
        • 37767

        #4
        Hi there, this isn't written to be compliant with any mod installation. It is based on default vb3 templates. If you have modified the code or templates, try to understand the changes and work around them. You must understand I can't write installation instructions for any release. So simply: I have no idea.

        Comment

        • Jon_Mitchell
          New Member
          • May 2002
          • 11
          • 2.3.2

          #5
          Thank you for posting this Floris!

          But I am having problems
          The last two steps are no brainers and I do not think I could have messed them up. I Tried the Forumhome edit twice to make sure I was not making an error, but the forums are not spacing out.
          I would like to post my Forumhome template for you to look at if it is ok?

          Comment

          • Floris
            Senior Member
            • Dec 2001
            • 37767

            #6
            Without knowing the problem, I can't really help. Please send me a privmsg with the details to the problem and your forum details so I can check it out. Pref. with an admin account so I can look into it later on.

            Comment

            • Jon_Mitchell
              New Member
              • May 2002
              • 11
              • 2.3.2

              #7
              Hi Floris,
              I just sent you the PM you requested.
              Thank you again!

              Comment

              • Vega
                Senior Member
                • Mar 2004
                • 155
                • 3.5.x

                #8
                Hi there,

                first of all thanks for posting this!


                I just got one question: Is there a way to remove that border (see attachment)?


                Thanks in advance.
                Attached Files

                Comment

                • Floris
                  Senior Member
                  • Dec 2001
                  • 37767

                  #9
                  Since its the level1_nopost template that holds this footer row, just remove
                  <tr><td class="thead" style="line-height: 0; padding: 0; margin: 0;" colspan="<if condition="$vboptions[showmoderatorcolumn]">6<else />5</if>"><img src="$vboptions[cleargifurl]" alt="" width="1" height="12" /></td></tr>
                  from it.

                  Comment

                  • Vega
                    Senior Member
                    • Mar 2004
                    • 155
                    • 3.5.x

                    #10
                    Yay! Works like a charm, thanks for your help & quick response!!

                    Comment

                    • nando415
                      Member
                      • Mar 2004
                      • 49
                      • 3.0.3

                      #11
                      how can i change the width of each individual column? the Thread and Post columns are too wide, I want 2 shorten them and widen the last post column, and the one with the small image in it is too big too

                      thanks

                      Comment

                      • Floris
                        Senior Member
                        • Dec 2001
                        • 37767

                        #12
                        The instructions show the table <td> cells in 2 templates that hold the width, change that.

                        Comment

                        • Theater
                          Senior Member
                          • Jun 2003
                          • 112

                          #13
                          Thanks!

                          Worked like a charm even with my modified board!

                          Comment

                          • adguru
                            Senior Member
                            • Jul 2004
                            • 339
                            • 3.0.3

                            #14
                            Thanks for the wonderful Tut Floris... I am gonna apply it soon
                            =)

                            Comment

                            • Surtain23
                              Member
                              • Apr 2004
                              • 57
                              • 3.0.1

                              #15
                              Thanks! Worked like a charm

                              Comment

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