+ Reply to Thread
Page 1 of 5 1 2 3 4 5 LastLast
Results 1 to 20 of 83

Thread: Clean up your Navbar -and- Add Homepage Links

  1. #1
    vBFAQ Adminstrator Joeychgo has disabled reputation Joeychgo's Avatar
    Join Date
    Jan 2005
    Location
    Chicago, IL
    Age
    43
    Posts
    6,408
    Blog Entries
    2

    Default Clean up your Navbar -and- Add Homepage Links

    This is a simple way to clean up your navbar.

    Why clean it up? Well on most forums, very few members use the FAQ, Members list and Calender. So why clutter up the navbar with all those items.

    My suggestion is to move them to the Quick Links drop down menu. This way, they are still available, but not taking up space on the navbar.

    All this happens in your navbar template.


    What your looking for first is this code:

    <td class="vbmenu_control"><a href="faq.php$session[sessionurl_q]" accesskey="5">$vbphrase[faq]</a></td>
    <td class="vbmenu_control"><a href="memberlist.php$session[sessionurl_q]">$vbphrase[members_list]</a></td>
    <td class="vbmenu_control"><a href="calendar.php$session[sessionurl_q]">$vbphrase[calendar]</a></td>
    Delete that.


    Now look for:

    <tr><td class="vbmenu_option"><a href="member.php?$session[sessionurl]u=$bbuserinfo[userid]">$vbphrase[my_profile]</a></td></tr>
    And place this code below it.

    <tr><td class="vbmenu_option"><a href="faq.php$session[sessionurl_q]" accesskey="5">$vbphrase[faq]</a></td></tr>
    <tr><td class="vbmenu_option"><a href="memberlist.php$session[sessionurl_q]">$vbphrase[members_list]</a></td></tr>
    <tr><td class="vbmenu_option"><a href="calendar.php$session[sessionurl_q]">$vbphrase[calendar]</a></td></tr>
    Notice, we didnt only move it but we altered the code a little. We wrapped each link in <tr> </tr> tags and we changed vbmenu_control to vbmenu_option.


    Now, lets add a homepage link to the navbar.

    If your homepage is forumhome...

    Look for this:

    <!-- nav buttons bar -->
    <div align="center">
    <table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="0" border="0" width="100%" align="center" style="border-top-width:0px">
    <tr align="center">
    And below it place this:

    <td class="vbmenu_control"><a href="http://www.Your-Homepage-URL/">Home</a></td>


    IF you have a homepage and a Forumhome (like this site has)...

    Look for this:

    <!-- nav buttons bar -->
    <div align="center">
    <table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="0" border="0" width="100%" align="center" style="border-top-width:0px">
    <tr align="center">
    And below it place this:

    <td class="vbmenu_control"><a href="http://www.Your-Homepage-URL/">Home</a></td>
    <td class="vbmenu_control"><a href="http://www.Your-Forum-Home-Url">Forum</a></td>

    Now, You can also add a Dynamic Home / Forums Link (If you use vBadvanced CMPS as your homepage)





    <if condition="THIS_SCRIPT == 'adv_index'">




    <a href="$vboptions[bburl]?$session[sessionurl]">

    Forums

    <else />
    <a href="$vboptions[homeurl]?$session[sessionurl]">
    Home
    </if>









  2. #2
    Moody Admin Peggy is on a distinguished road Peggy's Avatar
    Join Date
    Jan 2005
    Location
    NE Ohio
    Age
    50
    Posts
    12,414

    Default

    EXCELLENT. I've been wondering how to clean up my navbar. I had added a hack for a second navbar at one time and had my addons, like the eStore and arcade on it, plus moved the calendar and members list to it.

    But I like this scenario much better. Thanks

  3. #3
    Moody Admin Peggy is on a distinguished road Peggy's Avatar
    Join Date
    Jan 2005
    Location
    NE Ohio
    Age
    50
    Posts
    12,414

    Default

    Joey... I want to move the Search feature to the Quick links as well, but Ican't figure out exactly which code in the Navbar template belongs to the Search. can you help?

  4. #4
    vBFAQ Adminstrator Joeychgo has disabled reputation Joeychgo's Avatar
    Join Date
    Jan 2005
    Location
    Chicago, IL
    Age
    43
    Posts
    6,408
    Blog Entries
    2

    Default

    Um, to a point....

    The search feature is a dropdown... Cant put a dropdown in a dropdown, or at least I dont know how.

    BUT, what you can do is this....


    Delete This:

    <if condition="$show['searchbuttons']">
    <!-- header quick search form -->
    <div class="vbmenu_popup" id="navbar_search_menu" style="display:none">
    <table cellpadding="4" cellspacing="1" border="0">
    <tr>
    <td class="thead">$vbphrase[search_forums]</td>
    </tr>
    <tr>
    <td class="vbmenu_option" title="nohilite">
    <form action="search.php" method="post">
    <input type="hidden" name="do" value="process" />
    <input type="hidden" name="showposts" value="0" />
    <input type="hidden" name="quicksearch" value="1" />
    <input type="hidden" name="s" value="$session[sessionhash]" />
    <input type="text" class="bginput" name="query" size="20" />&nbsp;$gobutton<br />
    </form>
    </td>
    </tr>
    <tr>
    <td class="vbmenu_option"><a href="search.php$session[sessionurl_q]" accesskey="4" rel="nofollow">$vbphrase[advanced_search]</a></td>
    </tr>
    </table>
    </div>
    <!-- / header quick search form -->
    </if>
    Now, look for this:

    <tr><td class="vbmenu_option"><a href="calendar.php$session[sessionurl_q]">$vbphrase[calendar]</a></td></tr>
    Add this after:
    <if condition="$show['searchbuttons']">
    <tr><td class="vbmenu_option"><a href="search.php$session[sessionurl_q]" accesskey="4" rel="nofollow">$vbphrase[advanced_search]</a></td></tr>
    </if>

    That should work.......

  5. #5
    Moody Admin Peggy is on a distinguished road Peggy's Avatar
    Join Date
    Jan 2005
    Location
    NE Ohio
    Age
    50
    Posts
    12,414

    Default

    I'll try that... thanks!

  6. #6
    vBFAQ Adminstrator Joeychgo has disabled reputation Joeychgo's Avatar
    Join Date
    Jan 2005
    Location
    Chicago, IL
    Age
    43
    Posts
    6,408
    Blog Entries
    2

    Default

    That takes your user right to the advanced search page. Thats the only real difference. Works just the same

  7. #7

    Default You're a Star, Joey!

    Words cannot express how grateful I am for this thread. I know you guys think this is simple - but it ain't for me!

    I've done what you suggested above, Joey, and boy has it made a difference. Without wishing to appear in any way sycophantic, I mean it when I say: "Thanks a million!"

    A very pleased Biggles LLB

  8. #8
    vBFAQ Adminstrator Joeychgo has disabled reputation Joeychgo's Avatar
    Join Date
    Jan 2005
    Location
    Chicago, IL
    Age
    43
    Posts
    6,408
    Blog Entries
    2

    Default

    Your quite welcome

  9. #9

    Default

    Simple Question, though I like my navbar at present the only thing left that is driving me insane is seeing the Register link on every page, even when you are logged in.

    I'm sure there is a simple way to set a conditional 'if logged in' to make it go away... but figured I'd use someone else's brain for a bit.

  10. #10
    Moody Admin Peggy is on a distinguished road Peggy's Avatar
    Join Date
    Jan 2005
    Location
    NE Ohio
    Age
    50
    Posts
    12,414

    Default

    Quote Originally Posted by dakar
    Simple Question, though I like my navbar at present the only thing left that is driving me insane is seeing the Register link on every page, even when you are logged in.

    I'm sure there is a simple way to set a conditional 'if logged in' to make it go away... but figured I'd use someone else's brain for a bit.
    odd... I don't see it on mine when logged in...

  11. #11
    vBFAQ Adminstrator Joeychgo has disabled reputation Joeychgo's Avatar
    Join Date
    Jan 2005
    Location
    Chicago, IL
    Age
    43
    Posts
    6,408
    Blog Entries
    2

    Default

    Quote Originally Posted by dakar
    Simple Question, though I like my navbar at present the only thing left that is driving me insane is seeing the Register link on every page, even when you are logged in.

    I'm sure there is a simple way to set a conditional 'if logged in' to make it go away... but figured I'd use someone else's brain for a bit.


    Yes, you have a problem.

    The code you should have is this: (this is stock code)

    PHP Code:
    <if condition="$show['member']">
       <
    td class="vbmenu_control"><a href="usercp.php$session[sessionurl_q]">$vbphrase[user_cp]</a></td>
      </if>
      <if 
    condition="$show['registerbutton']">
       <
    td class="vbmenu_control"><a href="register.php$session[sessionurl_q]" rel="nofollow">$vbphrase[register]</a></td>
      </if> 
    This makes it so if the user is logged in, he gets a user cp button. If he is not logged in he gets a register button in the same place.

    Your code for these things is not like it should be.

  12. #12

    Default

    good hacking, but I need my FAQ and calendar pages,, we use them a lot
    there is a custom links hack at vb.org,, if your running out of space for the navbar, you should check this hack out u can see it action at www.locoforum.com " site goodies "

    -Loco

  13. #13
    Moody Admin Peggy is on a distinguished road Peggy's Avatar
    Join Date
    Jan 2005
    Location
    NE Ohio
    Age
    50
    Posts
    12,414

    Default

    Quote Originally Posted by Loco.M
    good hacking, but I need my FAQ and calendar pages,, we use them a lot
    there is a custom links hack at vb.org,, if your running out of space for the navbar, you should check this hack out u can see it action at www.locoforum.com " site goodies "

    -Loco
    the FAQ and calendar are still useable, they're inthe Quick Links drop down menu. I placed my members list there as well.

  14. #14
    vBFAQ Adminstrator Joeychgo has disabled reputation Joeychgo's Avatar
    Join Date
    Jan 2005
    Location
    Chicago, IL
    Age
    43
    Posts
    6,408
    Blog Entries
    2

    Default

    Quote Originally Posted by Loco.M
    good hacking, but I need my FAQ and calendar pages,, we use them a lot
    there is a custom links hack at vb.org,, if your running out of space for the navbar, you should check this hack out u can see it action at www.locoforum.com " site goodies "

    -Loco

    Ive never liked that over/under style. If I need more space I do a navbar like I did on www.team-2g.com

  15. #15
    Moody Admin Peggy is on a distinguished road Peggy's Avatar
    Join Date
    Jan 2005
    Location
    NE Ohio
    Age
    50
    Posts
    12,414

    Default

    Quote Originally Posted by Joeychgo
    Ive never liked that over/under style. If I need more space I do a navbar like I did on www.team-2g.com
    now THAT is sharp... I LIKE it!!!



    pssssssssssttt... care to share how you did that?

  16. #16

    Default

    not bad Joey, nice looking site

    OHS you can view the source and see

  17. #17
    Moody Admin Peggy is on a distinguished road Peggy's Avatar
    Join Date
    Jan 2005
    Location
    NE Ohio
    Age
    50
    Posts
    12,414

    Default

    Quote Originally Posted by Loco.M
    not bad Joey, nice looking site

    OHS you can view the source and see
    I did and that I have figured out.. but I need to know how he got the navbar background image tall enough to place two rows of nav links on it.

  18. #18

    Default

    That portion of the template code has not been changed, still in it's stock form (as you posted). I must have something else hosed up somewhere then. The only other real changes I've made besides adding options was the Home/Forum link that switches back and forth depending on the page you are on.

    Any ideas where else to look?

    Thanks,
    Dave

    Quote Originally Posted by Joeychgo
    Yes, you have a problem.

    The code you should have is this: (this is stock code)

    PHP Code:
    <if condition="$show['member']">
       <
    td class="vbmenu_control"><a href="usercp.php$session[sessionurl_q]">$vbphrase[user_cp]</a></td>
      </if>
      <if 
    condition="$show['registerbutton']">
       <
    td class="vbmenu_control"><a href="register.php$session[sessionurl_q]" rel="nofollow">$vbphrase[register]</a></td>
      </if> 
    This makes it so if the user is logged in, he gets a user cp button. If he is not logged in he gets a register button in the same place.

    Your code for these things is not like it should be.

  19. #19
    vBFAQ Adminstrator Joeychgo has disabled reputation Joeychgo's Avatar
    Join Date
    Jan 2005
    Location
    Chicago, IL
    Age
    43
    Posts
    6,408
    Blog Entries
    2

    Default

    Quote Originally Posted by Loco.M

    OHS you can view the source and see

    Actually, its a bit more involved then you might think. The navbar isnt in the navbar template anymore on that site, and there are some CSS elements that have to be added.

  20. #20
    vBFAQ Adminstrator Joeychgo has disabled reputation Joeychgo's Avatar
    Join Date
    Jan 2005
    Location
    Chicago, IL
    Age
    43
    Posts
    6,408
    Blog Entries
    2

    Default

    Quote Originally Posted by dakar
    That portion of the template code has not been changed, still in it's stock form (as you posted). I must have something else hosed up somewhere then. The only other real changes I've made besides adding options was the Home/Forum link that switches back and forth depending on the page you are on.

    Any ideas where else to look?

    Thanks,
    Dave

    I would suggest you revert the navbar and start over. That would be easiest.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Similar Threads

  1. Clean Re-install and Migrate Members /Posts ?
    By lunchboxhero in forum vBulletin Discussion and Questions
    Replies: 0
    Last Post: 10-04-2008, 03:33 PM
  2. hiding navbar links to certain usergroups?
    By the noob in forum vBulletin Discussion and Questions
    Replies: 2
    Last Post: 03-20-2008, 11:43 AM
  3. Problem with Navbar links
    By ISN in forum vBulletin Discussion and Questions
    Replies: 3
    Last Post: 03-09-2007, 03:03 PM
  4. Clean Log
    By Ziki in forum vBulletin Modifications prior to version 4.0
    Replies: 0
    Last Post: 02-04-2007, 05:33 AM
  5. Clean up your templates
    By Joeychgo in forum Setting up and Customizing your Forum
    Replies: 0
    Last Post: 05-10-2005, 09:00 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts