How do I put $navbar in the header template?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • HumanNature
    Member
    • Apr 2004
    • 41

    How do I put $navbar in the header template?

    Hello you guys!

    Mi problem is that I want tou use a different cellpading and cellshading for the navbar template, and actually the navbar forumhome and forumdisplay templates are under the same cell values.

    I have removed the "$navbar" from the forumdisplay and forumhome templates, and I have put it into the header template, but doing it this way the navbar doesn´t appear when the index.php loads

    I want the forumdisplay and forumhome to have the normal "lateral space" to the outer border of the page, but I want the navbar to be without any space betwen the border and the navbar, because of the style of mu page.

    I need some help please, I don´t known what to change and where

    Thanks in advance, and excuse me about my english
  • Jake Bunce
    Senior Member
    • Dec 2000
    • 46598
    • 3.6.x

    #2
    The $navbar variable is defined in each file, after the $header variable is defined, so it cannot be used in the header template. But you can still make this work by editing the templates.

    Here is a thread where I posted instructions for moving just the nav links into the header - http://www.vbulletin.com/forum/showthread.php?t=100305

    A similar method can be used to do what you want. Basically you remove this code from the bottom of the header template and add it to the bottom of the navbar template:

    Code:
    <!-- content table -->
    $spacer_open
    
    $_phpinclude_output
    Let me know if you need any help with your specific application.

    Comment

    • HumanNature
      Member
      • Apr 2004
      • 41

      #3
      Hello Jake. I´m sorry for not answering this post till today.

      This don´t solve my problem. What I want is.... grrrrrrrr ( you don´t speak spanish, don´t you? xd). Did you Know the space that you set the color with the "css selector body"? well, I want this space to be "0 Px". I want my header and/or navbar to be as wide as the full scream.



      I´m sure this is too easy but with the templates system of vb I dont know how do do it

      Comment

      • merk
        Senior Member
        • Jul 2001
        • 4149

        #4
        Try removing the $spacer_open mentions, if i understood what you're asking, the $spacer_open limits the size of the navbar and menu to the content-table width.

        Comment

        • HumanNature
          Member
          • Apr 2004
          • 41

          #5
          Please look at the image that I attach
          Attached Files

          Comment

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

            #6
            It looks like your navbar is already as wide as your header.

            Try removing the page margins in your:

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

            Under the Body class (top of the page) you will see a margin attribute in the Extra CSS Attributes field. See all of the margins to 0:

            Code:
            margin: 0px 0px 0px 0px;

            Comment

            • HumanNature
              Member
              • Apr 2004
              • 41

              #7
              Thanks Jake!!!!!!!!!!

              I had deleted this atributes, but it seems that is not the same deleting it than setting it to "0" as you have told me. Now everything works fine

              I know you will kill me but...

              Now I have the header and the navbar where I want, but what if I want the "whos on line and forum stats" "templates" to be shown as wide as the header and the navbar? Is this posible?

              I only want the forums and the legend to be shown in a "normal" way.

              Comment

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

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

                Add the red code:

                <br />
                <br />

                $spacer_close

                <!-- what's going on box -->
                <table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="$stylevar[outertablewidth]" align="center">
                <thead>
                <tr>
                <td class="tcat" colspan="2">$vbphrase[whats_going_on]</td>
                </tr>
                </thead>
                <if condition="$show['loggedinusers']">
                <!-- logged-in users -->
                <tbody>
                <tr>
                <td class="thead" colspan="2">
                <a style="float:$stylevar[right]" href="#top" onclick="return toggle_collapse('forumhome_activeusers')"><img id="collapseimg_forumhome_activeusers" src="$stylevar[imgdir_button]/collapse_thead$vbcollapse[collapseimg_forumhome_activeusers].gif" alt="" border="0" /></a>
                <a href="online.php?$session[sessionurl]">$vbphrase[currently_active_users]</a>: $totalonline (<phrase 1="$numberregistered" 2="$numberguest">$vbphrase[x_members_and_y_guests]</phrase>)
                </td>
                </tr>
                </tbody>
                <tbody id="collapseobj_forumhome_activeusers" style="$vbcollapse[collapseobj_forumhome_activeusers]">
                <tr>
                <td class="alt2"><a href="online.php?$session[sessionurl]"><img src="$stylevar[imgdir_misc]/whos_online.gif" alt="$vbphrase[view_whos_online]" border="0" /></a></td>
                <td class="alt1" width="100%">
                <div class="smallfont">
                <div style="white-space: nowrap"><phrase 1="$recordusers" 2="$recorddate" 3="$recordtime">$vbphrase[most_users_ever_online_was_x_y_at_z]</phrase></div>
                <div>$activeusers</div>
                </div>
                </td>
                </tr>
                </tbody>
                <!-- end logged-in users -->
                </if>
                <tbody>
                <tr>
                <td class="thead" colspan="2">
                <a style="float:$stylevar[right]" href="#top" onclick="return toggle_collapse('forumhome_stats')"><img id="collapseimg_forumhome_stats" src="$stylevar[imgdir_button]/collapse_thead$vbcollapse[collapseimg_forumhome_stats].gif" alt="" border="0" /></a>
                <phrase 1="$vboptions[bbtitle]">$vbphrase[x_statistics]</phrase>
                </td>
                </tr>
                </tbody>
                <tbody id="collapseobj_forumhome_stats" style="$vbcollapse[collapseobj_forumhome_stats]">
                <tr>
                <td class="alt2"><img src="$stylevar[imgdir_misc]/stats.gif" alt="<phrase 1="$vboptions[bbtitle]">$vbphrase[x_statistics]</phrase>" border="0" /></td>
                <td class="alt1">
                <div class="smallfont">
                <div>$vbphrase[threads]: $totalthreads, $vbphrase[posts]: $totalposts, $vbphrase[members]: $numbermembers</div>
                <div><phrase 1="member.php?$session[sessionurl]u=$newuserid" 2="$newusername">$vbphrase[welcome_to_our_newest_member_x]</phrase></div>
                </div>
                </td>
                </tr>
                </tbody>
                <if condition="$show['birthdays']">
                <!-- today's birthdays -->
                <tbody>
                <tr>
                <td class="thead" colspan="2">
                <a style="float:$stylevar[right]" href="#top" onclick="return toggle_collapse('forumhome_birthdays')"><img id="collapseimg_forumhome_birthdays" src="$stylevar[imgdir_button]/collapse_thead$vbcollapse[collapseimg_forumhome_birthdays].gif" alt="" border="0" /></a>
                $vbphrase[todays_birthdays]
                </td>
                </tr>
                </tbody>
                <tbody id="collapseobj_forumhome_birthdays" style="$vbcollapse[collapseobj_forumhome_birthdays]">
                <tr>
                <td class="alt2"><a href="calendar.php?$session[sessionurl]do=getday&amp;day=$today&amp;sb=1"><img src="$stylevar[imgdir_misc]/birthday.gif" alt="$vbphrase[view_birthdays]" border="0" /></a></td>
                <td class="alt1"><div class="smallfont">$birthdays</div></td>
                </tr>
                </tbody>
                <!-- end today's birthdays -->
                </if>
                <if condition="$show['upcomingevents']">
                <tbody>
                <tr>
                <td class="thead" colspan="2">
                <a style="float:$stylevar[right]" href="#top" onclick="return toggle_collapse('forumhome_events')"><img id="collapseimg_forumhome_events" src="$stylevar[imgdir_button]/collapse_thead$vbcollapse[collapseimg_forumhome_events].gif" alt="" border="0" /></a>
                <if condition="$show['todaysevents']">$vbphrase[todays_events]<else /><phrase 1="$vboptions[showevents]">$vbphrase[upcoming_events_for_the_next_x_days]</phrase></if>
                </td>
                </tr>
                </tbody>
                <tbody id="collapseobj_forumhome_events" style="$vbcollapse[collapseobj_forumhome_events]">
                <tr>
                <td class="alt2"><a href="calendar.php?$session[sessionurl]"><img src="$stylevar[imgdir_misc]/calendar.gif" alt="$vbphrase[calendar]" border="0" /></a></td>
                <td class="alt1"><div class="smallfont">$upcomingevents</div></td>
                </tr>
                </tbody>
                </if>
                </table>
                <br />
                <!-- end what's going on box -->

                $spacer_open

                <!-- icons and login code -->
                <table cellpadding="0" cellspacing="2" border="0" width="100%">
                <tr valign="bottom">

                Comment

                • HumanNature
                  Member
                  • Apr 2004
                  • 41

                  #9
                  Ok Jake, Thanks again

                  I will try it this night and I tell you. I thought that the open and close spacer only can be put one time.

                  When I finish my style I´m going to have to edit it again to insert a photo of you

                  Comment

                  • phenomenon
                    Member
                    • Sep 2003
                    • 61
                    • 2.3.2

                    #10
                    Jake you are a god. thank you!

                    Comment

                    • amnesia623
                      Member
                      • Jul 2006
                      • 61

                      #11
                      Thank YOU!!!!

                      Comment

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