Forum Border

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Sem
    Member
    • Mar 2003
    • 38

    Forum Border

    how do i add a border around my vB forum like this

    www.halflife2.net/forums


    thanks
    Attached Files
  • Jake Bunce
    Senior Member
    • Dec 2000
    • 46598
    • 3.6.x

    #2
    Go to your:

    Admin CP -> Styles & Templates -> Style Manager -> Common Templates (in the menu)

    Add the red code to the top of the header template:

    Code:
    [color=red]<table class="tborder" width="$stylevar[outertablewidth]" cellpadding="0" cellspacing="0" border="0" align="center">
    <tr>
    <td align="top">[/color]
    
    <!-- logo -->
    <a name="top"></a>
    <table border="0" width="$stylevar[outertablewidth]" cellpadding="0" cellspacing="0" align="center">
    <tr>
    And add the red code to the middle of your footer template:

    Code:
    				<a href="#top" onclick="self.scrollTo(0, 0); return false;">$vbphrase[top]</a>
    			</strong>
    		</div>
    	</td>
    </tr>
    </table>
    
    [color=red]</td>
    </tr>
    </table>[/color]
    
    <br />
    
    <div align="center">
    	<div class="smallfont" align="center">
    	<!-- Do not remove this copyright notice -->
    This will add a border of the same thickness and color as defined by your tborder CSS class.

    Comment

    • Sem
      Member
      • Mar 2003
      • 38

      #3
      looks perfectly how i wanted it to

      Jake you are the man

      Comment

      • Sem
        Member
        • Mar 2003
        • 38

        #4
        hmm jake seems there is a small problem

        the banner image wont align porperly
        there is a small space on the right hand side even tho the image size is the same as the table width 800px

        i tried to reduce the image size by 2px so its 798 to try and make up for the border but it doesnt work

        how do i fix it


        thanks
        Attached Files

        Comment

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

          #5
          I'm gonna take a guess...

          Remove this code from your header template:

          Code:
          	<td align="$stylevar[right]">
          		&nbsp;
          <!--
            NEW HEADER &amp; NAVBAR
            
            Now that the nav buttons are in the
            navbar template, you can stick whatever
            you like into this space.
          
            This makes it much easier for novice
            admins to customize their header
            template without affecting important
            navigation elements.
          -->
          	</td>
          If that doesn't work I will need you to see your header and footer templates.

          Comment

          • Sem
            Member
            • Mar 2003
            • 38

            #6
            i tried to remove that but when i reloaded my page it was back again

            header template
            Code:
             
            <table class="tborder" width="$stylevar[outertablewidth]" cellpadding="0" cellspacing="0" border="0" align="center">
            <tr>
            <td align="top">
            <!-- logo -->
            <a name="top"></a>
            <table border="0" width="$stylevar[outertablewidth]" cellpadding="0" cellspacing="0" align="center">
            <tr>
             <td align="$stylevar[left]"><a href="$vboptions[forumhome].php?$session[sessionurl]"><img src="$stylevar[titleimage]" border="0" alt="$vboptions[bbtitle]" /></a></td>
             <td align="$stylevar[right]">
              &nbsp;
            <!--
              NEW HEADER &amp; NAVBAR
              
              Now that the nav buttons are in the
              navbar template, you can stick whatever
              you like into this space.
              This makes it much easier for novice
              admins to customize their header
              template without affecting important
              navigation elements.
            -->
             </td>
            </tr>
            </table>
            <!-- /logo -->
            <!-- content table -->
            $spacer_open
            $_phpinclude_output

            footer

            Code:
             
            <br />
            <div class="smallfont" align="center">$vbphrase[all_times_are_gmt_x_time_now_is_y]</div>
            <br />
            $spacer_close
            <!-- /content area table -->
            <form action="$vboptions[forumhome].php" method="get">
             
            <table cellpadding="$stylevar[cellpadding]" cellspacing="0" border="0" width="$stylevar[outertablewidth]" class="page" align="center">
            <tr>
             <if condition="$show['quickchooser']">
              <td class="tfoot">
               <select name="styleid" id="ressel" onchange="switch_styleid(this)">
            	<optgroup label="$vbphrase[quick_style_chooser]">
            	 $quickchooserbits
            	</optgroup>
               </select>
              </td>
             </if>
             <td class="tfoot" align="$stylevar[right]">
              <div class="smallfont">
               <strong>
            	<a href="$vboptions[contactuslink]">$vbphrase[contact_us]</a> -
            	<a href="$vboptions[homeurl]">$vboptions[hometitle]</a> -
            	<if condition="$show['admincplink']"><a href="$admincpdir/index.php?$session[sessionurl]">$vbphrase[admin]</a> -</if>
            	<if condition="$show['modcplink']"><a href="$modcpdir/index.php?$session[sessionurl]">$vbphrase[mod]</a> -</if>
            	<if condition="$vboptions['archiveenabled']"><a href="archive/index.php">$vbphrase[archive]</a> -</if>
            	<!-- - <a href="$vboptions[privacyurl]">$vbphrase[privacy_statement]</a> - -->
            	<a href="#top" onclick="self.scrollTo(0, 0); return false;">$vbphrase[top]</a>
               </strong>
              </div>
             </td>
            </tr>
            </table>
            </td>
            </tr>
            </table>
            <br />
            <div align="center">
             <div class="smallfont" align="center">
             <!-- Do not remove this copyright notice -->
             $vbphrase[powered_by_vbulletin]
             <!-- Do not remove this copyright notice -->
             </div>
             
             <div class="smallfont" align="center">
             <!-- Do not remove $cronimage or your scheduled tasks will cease to function -->
             $cronimage
             <!-- Do not remove $cronimage or your scheduled tasks will cease to function -->
             
             $vboptions[copyrighttext]
             </div>
            </div>
            </form>
            <if condition="$show['dst_correction']">
            <!-- auto DST correction code -->
            <form action="profile.php" method="post" name="dstform">
             <input type="hidden" name="s" value="$session[sessionhash]" />
             <input type="hidden" name="do" value="dst" />
            </form>
            <script type="text/javascript">
            <!--
             var tzOffset = $bbuserinfo[timezoneoffset] + $bbuserinfo[dstonoff];
             var utcOffset = new Date().getTimezoneOffset() / 60;
             if (Math.abs(tzOffset + utcOffset) == 1)
             { // Dst offset is 1 so its changed
              document.forms.dstform.submit();
             }
            //-->
            </script>
            <!-- / auto DST correction code -->
            </if>
            <script type="text/javascript">
            <!--
             // Main vBulletin Javascript Initialization
             vBulletin_init();
             // Initialize 'Active' Table Cells
             //activecells_init();
            //-->
            </script>
            thanks

            Comment

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

              #7
              Originally posted by Sem
              i tried to remove that but when i reloaded my page it was back again
              That's odd. Did you try editing it again? There are two places to edit the header template... maybe try the other one:

              Admin CP -> Styles & Templates -> Style Manager -> Common Templates

              and

              Admin CP -> Styles & Templates -> Style Manager -> « » -> header

              Comment

              • Sem
                Member
                • Mar 2003
                • 38

                #8
                i removed it and it didnt fix it
                here is what my header template looks like now

                Code:
                  
                <table class="tborder" width="$stylevar[outertablewidth]" cellpadding="0" cellspacing="0" border="0" align="center">
                <tr>
                <td align="top">
                <!-- logo -->
                <a name="top"></a>
                <table border="0" width="$stylevar[outertablewidth]" cellpadding="0" cellspacing="0" align="center">
                <tr>
                 <td align="$stylevar[left]"><a href="$vboptions[forumhome].php?$session[sessionurl]"><img src="$stylevar[titleimage]" border="0" alt="$vboptions[bbtitle]" /></a></td>
                 <td align="$stylevar[right]">
                  &nbsp;
                </tr>
                </table>
                <!-- /logo -->
                <!-- content table -->
                $spacer_open
                $_phpinclude_output

                Comment

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

                  #9
                  You forgot some.

                  Code:
                    
                  <table class="tborder" width="$stylevar[outertablewidth]" cellpadding="0" cellspacing="0" border="0" align="center">
                  <tr>
                  <td align="top">
                  <!-- logo -->
                  <a name="top"></a>
                  <table border="0" width="$stylevar[outertablewidth]" cellpadding="0" cellspacing="0" align="center">
                  <tr>
                   <td align="$stylevar[left]"><a href="$vboptions[forumhome].php?$session[sessionurl]"><img src="$stylevar[titleimage]" border="0" alt="$vboptions[bbtitle]" /></a></td>
                   [color=red]<td align="$stylevar[right]">
                    &nbsp;[/color]
                  </tr>
                  </table>
                  <!-- /logo -->
                  <!-- content table -->
                  $spacer_open
                  $_phpinclude_output

                  Comment

                  • Sem
                    Member
                    • Mar 2003
                    • 38

                    #10
                    /me slaps forehead

                    works perfect now
                    Last edited by Sem; Mon 26 Jul '04, 3:50pm.

                    Comment

                    • somedudeer
                      Senior Member
                      • Oct 2004
                      • 234
                      • 3.5.0 Pre-Release

                      #11
                      I cant use it on 99% width :|
                      You know you can't live without vBulletin!

                      Comment

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

                        #12
                        Originally posted by somedudeer
                        I cant use it on 99% width :|
                        Use what?

                        Comment

                        • MRGTB
                          Senior Member
                          • May 2005
                          • 5454

                          #13
                          I used this method and for some strange reason you get threads hanging randomly. Sometimes threads load fast and other times they seem to hang and freeze for a few seconds before loading. Seems fine in Firefox, but this problem happens using IE

                          Any ideas why?

                          Here is my header and footer:

                          Header:

                          Code:
                          [COLOR=red]<table class="tborder" width="$stylevar[outertablewidth]" cellpadding="0" cellspacing="0" border="0" align="center">
                          <tr>
                          <td align="top">[/COLOR]
                           
                          <!-- logo -->
                          <a name="top"></a>
                          <table border="0" width="$stylevar[outertablewidth]" cellpadding="0" cellspacing="0" align="center">
                          <tr>
                           <td align="$stylevar[center]"><a href="$vboptions[forumhome].php?$session[sessionurl]"><img src="$stylevar[titleimage]" border="0" alt="$vboptions[bbtitle]" /></a></td>
                           </tr>
                          </table>
                          <!-- /logo -->
                          <!-- content table -->
                          $spacer_open
                          <if condition="$bbuserinfo['usergroupid'] == 3">
                          <br />
                          <div align="left" style="color: #696969; background-color: #0F1623; border: 1px solid #B50000; padding:2px">Your account is awaiting email confirmation. Please click the activation link in the email you were sent, or visit <a href="register.php?$session[sessionurl]do=requestemail">Here</a> to resend the activation email. If you did not receive the email then it's possible it was blocked by your email client. In this case you can either disable your blocker software or enter a new email address in your <a href="profile.php?$session[sessionurl]do=editpassword">User CP</a>. This message will disappear once you activate your account.</div>
                          </if>
                          $_phpinclude_output
                          Footer:

                          Code:
                          <br />
                          <div class="smallfont" align="center">$vbphrase[all_times_are_gmt_x_time_now_is_y]</div>
                          <br />
                          $spacer_close
                          <!-- /content area table -->
                          <form action="$vboptions[forumhome].php" method="get">
                           
                          <table cellpadding="$stylevar[cellpadding]" cellspacing="0" border="0" width="$stylevar[outertablewidth]" class="page" align="center">
                          {ms}
                          <tr>
                           <if condition="$show['quickchooser']">
                            <td class="tfoot">
                             <select name="styleid" id="ressel" onchange="switch_styleid(this)">
                              <optgroup label="$vbphrase[quick_style_chooser]">
                               $quickchooserbits
                              </optgroup>
                             </select>
                            </td>
                           </if>
                           <td class="tfoot" align="$stylevar[right]">
                            <div class="smallfont">
                             <strong>
                              <if condition="$show['contactus']"><a href="$vboptions[contactuslink]">$vbphrase[contact_us]</a> -</if>
                              <a href="$vboptions[homeurl]">$vboptions[hometitle]</a> -
                                                          <a href="$vboptions[bburl]">$vboptions[bbtitle]</a> -
                              <if condition="$show['admincplink']"><a href="$admincpdir/index.php?$session[sessionurl]">$vbphrase[admin]</a> -</if>
                              <if condition="$show['modcplink']"><a href="$modcpdir/index.php?$session[sessionurl]">$vbphrase[mod]</a> -</if>
                              <if condition="$vboptions['archiveenabled']"><a href="archive/index.php">$vbphrase[archive]</a> -</if>
                              <if condition="$vboptions[privacyurl]"><a href="$vboptions[privacyurl]">$vbphrase[privacy_statement]</a> -</if>
                              <a href="#top" onclick="self.scrollTo(0, 0); return false;">$vbphrase[top]</a>
                             </strong>
                            </div>
                           </td>
                          </tr>
                          </table>
                           
                          [COLOR=red]</td>
                          </tr>
                          </table>[/COLOR]
                           
                          <br />
                          <div align="center">
                           <div class="smallfont" align="center">
                           <!-- Do not remove this copyright notice -->
                           $vbphrase[powered_by_vbulletin]
                           <!-- Do not remove this copyright notice -->
                           </div>
                           
                           <div class="smallfont" align="center">
                           <!-- Do not remove $cronimage or your scheduled tasks will cease to function -->
                           $cronimage
                           <!-- Do not remove $cronimage or your scheduled tasks will cease to function -->
                           
                           $vboptions[copyrighttext]
                                  <br />
                                  Best viewed using: <a href="[URL="http://www.microsoft.com/windows/ie/default.mspx"]http://www.microsoft.com/windows/ie/default.mspx[/URL]" target="_blank">Internet Explorer</a> at: 1024X768
                           </div>
                          </div>
                          </form>
                          <if condition="$show['dst_correction']">
                          <!-- auto DST correction code -->
                          <form action="profile.php" method="post" name="dstform">
                           <input type="hidden" name="s" value="$session[sessionhash]" />
                           <input type="hidden" name="do" value="dst" />
                          </form>
                          <script type="text/javascript">
                          <!--
                           var tzOffset = $bbuserinfo[timezoneoffset] + $bbuserinfo[dstonoff];
                           var utcOffset = new Date().getTimezoneOffset() / 60;
                           if (Math.abs(tzOffset + utcOffset) == 1)
                           { // Dst offset is 1 so its changed
                            document.forms.dstform.submit();
                           }
                          //-->
                          </script>
                          <!-- / auto DST correction code -->
                          </if>
                          <script type="text/javascript">
                          <!--
                           // Main vBulletin Javascript Initialization
                           vBulletin_init();
                           // Initialize 'Active' Table Cells
                           //activecells_init();
                          //-->
                          </script>
                          Last edited by MRGTB; Thu 3 Nov '05, 10:37am.

                          Comment

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

                            #14
                            Nested tables like this can sometimes cause slowness in page rendering. That would be my guess.

                            What is the URL to one of those threads? I can try IE and FF.

                            Comment

                            • MRGTB
                              Senior Member
                              • May 2005
                              • 5454

                              #15
                              This thread seems to do it quite a lot, but you may have to close your browser and then re-visit it a couple of time to see it do it. As sometimes it seems to be OK sort of, then it just freezes and hangs for a while. A little random which doesnt help.



                              Or go to my site a click the link in the top forum board for the thread called "Site Bug Tracker "
                              Last edited by MRGTB; Thu 3 Nov '05, 1:51pm.

                              Comment

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