• Downloading from our site will require you to have a paid membership. Upgrade to a Premium Membership from 10$ a month today!

    Dont forget read our Rules! Also anyone caught Sharing this content will be banned. By using this site you are agreeing to our rules so read them. Saying I did not know is simply not an excuse! You have been warned.

Add Icons to the Navigation Bar Tabs

Admin

Well-Known Member
Staff member
Administrator
Prior to the vBulletin 4.0 upgrade, I had these neat little icons in the navigation bar of my v 3.8 forum's theme. Since I upgraded the forums, I wanted to put these icons back once again. However, with the rewrite of the whole code, I was at a complete loss as to where to make these changes.

After a lot of searching and hit and trial, however, I did manage to come up with something that suited my needs. So I thought I'd write an article myself, with the hope that it would help others trying to do something similar. :)

These template modifications allow you to add icons to the tabs in the Navigation Bar, right below the logo, as shown in the image below:

NavigationBarIcons.png


I'll stick with the default Navigation Bar tabs, i.e. Home, Forum, Blogs and What's New. Although you may use images of any size, but since I did not want to meddle too much with the default design / layout, I resized all the images to 24px × 24px.

Note: I have colour coded all code edits / additions in red to make it easier to see what has been added.

Note: You may find instructions for vB 4.1.2 over here.
------------------------------

"Home" Tab:
(2 modifications needed in only 1 template)

In your Admin Control Panel (ACP), go to:

ACP > Styles & Templates > Style Manager > Double arrows on the right of the style you want to edit (Expand Templates) > vBulletin CMS Templates > vbcms_navbar_link

Here, look for the following code:

Code:
<vb:if condition="$vboptions['selectednavtab'] == 'vbcms'">
<li class="selected">
    <a class="navtab" href="{vb:raw vboptions.site_tab_url}{vb:raw  session.sessionurl_q}">{vb:rawphrase site}</a>
Replace this with:

Code:
<vb:if condition="$vboptions['selectednavtab'] == 'vbcms'">
<li class="selected">
    <a class="navtab" href="{vb:raw vboptions.site_tab_url}{vb:raw  session.sessionurl_q}">[COLOR=Red]<img src="path_of_image"  border="0" align="top" alt="" /> [/COLOR]{vb:rawphrase  site}</a>
Now find:

Code:
<vb:else />
    <li><a class="navtab" href="{vb:raw  vboptions.site_tab_url}{vb:raw session.sessionurl_q}">{vb:rawphrase  site}</a></li>
Replace with:

Code:
<vb:else />
    <li><a class="navtab" href="{vb:raw  vboptions.site_tab_url}{vb:raw session.sessionurl_q}">[COLOR=Red]<img src="path_of_image" border="0" align="top"[/COLOR][COLOR=Red] alt=""[/COLOR][COLOR=Red] /> [/COLOR]{vb:rawphrase  site}</a></li>
Remember to press "Save" after making these changes to the template.
------------------------------

"Forum" Tab:
(3 modifications needed in only 1 template)

In your Admin Control Panel (ACP), go to:

ACP > Styles & Templates > Style Manager > Double arrows on the right of the style you want to edit (Expand Templates) > Navigation / Breadcrumb Templates > navbar

Here, look for the following code:

Code:
<vb:if condition="!$vboptions['selectednavtab'] AND THIS_SCRIPT  != 'search'">
            <li class="selected"><a class="navtab"  href="{vb:raw vboptions.forumhome}.php{vb:raw  session.sessionurl_q}">{vb:rawphrase forum}</a>
Replace this with:

Code:
<vb:if condition="!$vboptions['selectednavtab'] AND THIS_SCRIPT  != 'search'">
            <li class="selected"><a class="navtab"  href="{vb:raw vboptions.forumhome}.php{vb:raw session.sessionurl_q}">[COLOR=Red]<img src="path_of_image" border="0" align="top"[/COLOR][COLOR=Red] alt=""[/COLOR][COLOR=Red] />[/COLOR] {vb:rawphrase  forum}</a>
Now find:

Code:
<vb:elseif condition="$vboptions['selectednavtab']=='usercp'"  />
            <li class="selected"><a class="navtab"  href="{vb:raw vboptions.forumhome}.php{vb:raw  session.sessionurl_q}">{vb:rawphrase forum}</a>
Replace with:

Code:
<vb:elseif condition="$vboptions['selectednavtab']=='usercp'"  />
            <li class="selected"><a class="navtab"  href="{vb:raw vboptions.forumhome}.php{vb:raw session.sessionurl_q}">[COLOR=Red]<img src="path_of_image" border="0" align="top"[/COLOR][COLOR=Red] alt=""[/COLOR][COLOR=Red] />[/COLOR] {vb:rawphrase  forum}</a>
Finally find:

Code:
<vb:else />
            <li><a class="navtab" href="{vb:raw  vboptions.forumhome}.php{vb:raw session.sessionurl_q}">{vb:rawphrase  forum}</a></li>
Replace with:

Code:
<vb:else />
            <li><a class="navtab" href="{vb:raw  vboptions.forumhome}.php{vb:raw session.sessionurl_q}">[COLOR=Red]<img src="path_of_image" border="0" align="top"[/COLOR][COLOR=Red] alt=""[/COLOR][COLOR=Red] />[/COLOR] {vb:rawphrase  forum}</a></li>
Remember to press "Save" after making these changes to the template.
------------------------------

"Blogs" Tab: (2 modifications needed in only 1 template)

In your Admin Control Panel (ACP), go to:

ACP > Styles & Templates > Style Manager > Double arrows on the right of the style you want to edit (Expand Templates) > Blog Templates > blog_navbar_link

Here, look for the following code:

Code:
<vb:if condition="$vboptions['selectednavtab'] == 'vbblog'">
<li class="selected">
    <a class="navtab" href="blog.php{vb:raw  session.sessionurl_q}">{vb:rawphrase blogs}</a>
Replace this with:

Code:
<vb:if condition="$vboptions['selectednavtab'] == 'vbblog'">
<li class="selected">
    <a class="navtab" href="blog.php{vb:raw  session.sessionurl_q}">[COLOR=Red]<img src="path_of_image"  border="0" align="top"[/COLOR][COLOR=Red] alt=""[/COLOR][COLOR=Red] /> [/COLOR]{vb:rawphrase blogs}</a>
Now find:

Code:
<vb:else />
    <li><a class="navtab" href="blog.php{vb:raw  session.sessionurl_q}">{vb:rawphrase  blogs}</a></li>
Replace with:

Code:
<vb:else />
    <li><a class="navtab" href="blog.php{vb:raw  session.sessionurl_q}">[COLOR=Red]<img src="path_of_image"  border="0" align="top" [/COLOR][COLOR=Red]alt=""[/COLOR][COLOR=Red] />[/COLOR] {vb:rawphrase  blogs}</a></li>
Remember to press "Save" after making these changes to the template.
------------------------------

"What's New" Tab:
(4 modifications needed in only 1 template)

In your Admin Control Panel (ACP), go to:

ACP > Styles & Templates > Style Manager > Double arrows on the right of the style you want to edit (Expand Templates) > Navigation / Breadcrumb Templates > navbar

Here, look for the following code:

Code:
<vb:if condition="$show['member']">
            <li  class="selected"><a class="navtab"  href="search.php?{vb:raw  session.sessionurl}do=getnew&amp;contenttype=vBForum_Post"  accesskey="2">{vb:rawphrase getnew_tab}</a>
Replace this with:

Code:
<vb:if condition="$show['member']">
            <li  class="selected"><a class="navtab"  href="search.php?{vb:raw  session.sessionurl}do=getnew&amp;contenttype=vBForum_Post"  accesskey="2">[COLOR=Red]<img src="path_of_image"  border="0" align="top"[/COLOR][COLOR=Red] alt=""[/COLOR][COLOR=Red] />[/COLOR] {vb:rawphrase getnew_tab}</a>
Now find:

Code:
<vb:else />
            <li  class="selected"><a class="navtab"  href="search.php?{vb:raw  session.sessionurl}do=getdaily&amp;contenttype=vBForum_Post"  accesskey="2">{vb:rawphrase getnew_tab}</a>
Replace with:

Code:
<vb:else />
            <li  class="selected"><a class="navtab"  href="search.php?{vb:raw  session.sessionurl}do=getdaily&amp;contenttype=vBForum_Post"  accesskey="2">[COLOR=Red]<img src="path_of_image"  border="0" align="top"[/COLOR][COLOR=Red] alt=""[/COLOR][COLOR=Red] />[/COLOR] {vb:rawphrase  getnew_tab}</a>
Find:

Code:
<vb:elseif condition="$show['member']" />
            <li><a class="navtab" href="search.php?{vb:raw  session.sessionurl}do=getnew&amp;contenttype=vBForum_Post"  accesskey="2">{vb:rawphrase  getnew_tab}</a></li>
Replace with:

Code:
<vb:elseif condition="$show['member']" />
            <li><a class="navtab" href="search.php?{vb:raw  session.sessionurl}do=getnew&amp;contenttype=vBForum_Post"  accesskey="2">[COLOR=Red]<img src="path_of_image"  border="0" align="top"[/COLOR][COLOR=Red] alt=""[/COLOR][COLOR=Red] />[/COLOR] {vb:rawphrase  getnew_tab}</a></li>
Finally find:

Code:
<vb:else />
            <li><a class="navtab" href="search.php?{vb:raw  session.sessionurl}do=getdaily&amp;contenttype=vBForum_Post"  accesskey="2">{vb:rawphrase  getnew_tab}</a></li>
Replace with:

Code:
<vb:else />
            <li><a class="navtab" href="search.php?{vb:raw  session.sessionurl}do=getdaily&amp;contenttype=vBForum_Post"  accesskey="2">[COLOR=Red]<img src="path_of_image"  border="0" align="top"[/COLOR][COLOR=Red] alt=""[/COLOR][COLOR=Red] /> [/COLOR]{vb:rawphrase  getnew_tab}</a></li>
Remember to press "Save" after making these changes to the template.
 

Facebook Comments

Similar threads
Thread starter Title Forum Replies Date
Admin [Xen-Soluce] Add-on Archive Improvements Xenforo 0
Admin TUOITREIT Add Alt Images Resource Xenforo 2 Xenforo 2.x Premium 0
Admin TUOITREIT Add Alt Text To Images Xenforo 2 Xenforo 2.x Premium 0
Admin [EAE Add-ons] Thread preview widget Xenforo 0
Admin [VNXF 2x] Google Trans - Add auto Google translate bar into your forum Xenforo 0
Admin [EAE Add-ons] Cupid's Arrow Xenforo 0
Admin XenForo & Add-ons 2.2.0 Release Candidate 2 Released (Unsupported) Xenforo 0
Admin [OzzModz] Add Pagination To Top Of Members List In ACP Xenforo 0
Admin [OzzModz] Add Pagination To Top Of Phrase List Xenforo 0
Admin [OzzModz] Add Pagination To Top Of Templates List Xenforo 0
Admin tuoitreit.vn add Facebook Comments Xenforo 2 Xenforo 2.x Premium 0
Admin Kinh nghiệm add thuế cho Ad Breaks tránh on hold Tut, tool, mmo 0
Admin [Jazzaaf] Move Installable Add-ons Xenforo 0
Admin How to add amp adsense code to xenforo 2 simple Xenforo 0
Admin Hướng dẫn bật kiếm tiền Ad Breaks từ đầu cho đến bước add bank và khai thuế W-9 Tut, tool, mmo 0
Admin Add Safari smart banners Add-ons 0
Admin Hướng dẫn thêm đuôi .html cho xenforo không dùng add-ons Xenforo 0
Admin Hướng dẫn xóa bản quyền add-ons Advertisement Manager cho xenforo Xenforo 0
Admin Share add-ons bộ gõ tiếng việt cho xenforo Xenforo 0
Admin Share add-ons tự động nhận diện tiêu đề link cho xenforo Xenforo 0
Admin [OzzModz] Add As Friend In Postbit Add-ons 0
T Hỏi Ai biết dùng add-ons stop spam here ko? Xenforo 0
Admin Share add-ons chặn like facebook cho firefox Sử dụng, chia sẻ, hỏi đáp 0
T Xin add-on sitemap for xenforo 1.2.2 Xenforo 1
T Help Cần giúp đỡ về add-ons Xenforo Xenforo 8
khanhsak3r Hỏi add domain vào openshift Thảo luận wap việt 4
Admin Add the time the page was generated at back! Vbb tutorial 0
bunvocam9x Share Hướng dẩn add title vào tag Johncms 0
Admin Hướng dẫn nâng cấp IOS 7 cho các thiệt bị mà không cần add UDID Sử dụng, chia sẻ, hỏi đáp 0
Admin Force members add tag for vbb Vbb tutorial 0
blog4me Thảo luận Pro add Mod JohnCms vào Johncms 17
WapNCTY Thảo luận Đổi domain lấy wap ***tgem park được domain,chưa add mail. Wap builder, wapego, xtgem, wen.ru, wapka, wap4 4
Admin Add the time the page was generated at back! Vbb tutorial 0
Admin Nhận download add-ons từ xenforo.com cho thành viên tuoitreit.vn Xenforo 15
Admin Hướng dẫn thêm trả lời vào phần tin nhắn của khách - Add reply to visitor message Vbb tutorial 1
Myshare Share Tut hướng dẫn add site(tên miền) lên google Hosting / Domain 0
Admin Add-Ons XF Forum List Tabs by Waindigo 1.0.1 Xenforo 0
Admin Hướng dẫn add style mobile cho vbb4 bằng hình ảnh Vbb tutorial 1
Admin Hướng dẫn add thêm domain vào vps azure VPS & Dedicated Server 0
Admin iTrader - Automatically add "Deal URL" to rating page Vbb tutorial 0
R Thảo luận nên add những mod gì cho xenforo Xenforo 0
Admin Đóng dấu bản quyền ảnh - WaterMark Add-on 1.2 Xenforo 0
Admin Easiest way to add Facebook Comments on thread Add-ons 0
Cuongkoj00 Share Add-on Bot online xenforo Xenforo 1
Cuongkoj00 Hỏi Về sitemap và add wap lên google Thảo luận wap việt 6
Cuongkoj00 ∞Art Of War(Đế chế tank)Đã vh,Çrack, Hack Tiề∩ MAX để xây nhà, tool.Đã Add ThêM 83 Map(füll)‼ S40 0
H xin hd add icon mem và admin mod cho vbb Vbulletin 1
tubotocdo Youtube Hướng dẫn add logo và text vao film Video, clip 2
HocVN.Net Hướng dẫn Add style vbb nhiều phiên bản. Vbulletin 0
Admin Hướng dẫn add mod cho xenforo bằng hình ảnh Xenforo 0

Similar threads

New posts New threads New resources

Back
Top