vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4 Articles (https://vborg.vbsupport.ru/forumdisplay.php?f=242)
-   -   [HOW TO - vB4] Add Icons to the Navigation Bar Tabs (https://vborg.vbsupport.ru/showthread.php?t=239710)

abdulbasitsaeed 05-10-2010 11:15 PM

Well, I'm not using this mod, but you can try like this:

Where it asks for "Tab Label", enter the path of the image you want to use along with the actual label for the tab. e.g.

Code:

<img src="path_of_image"> Label

chriske 05-11-2010 12:16 AM

1 Attachment(s)
Thanks for the fast reply!

I gave it a try and it actually works! Only the positioning is not correct. (see attachment) Any suggestion how to fix this?

abdulbasitsaeed 05-11-2010 12:29 AM

Try changing the image code to something like this:

Code:

<img src="path_of_image" border="0" align="top" /> Label
Hope it works for you. :)

chriske 05-11-2010 02:48 AM

Only the image gets displayed, tekst is gone..

Thanks for your help anyhow.

CFodder 08-05-2010 11:35 PM

Followed instructions (using VB 4.03) but only seems to show icons when the button is selected and am unsure how to make them persistent. Any ideas?

abdulbasitsaeed 08-05-2010 11:48 PM

That would most likely mean that you did not replace the code for the condition when the tab is not selected. Try to check all the codes again. I have also detailed the procedure on this thread.

CFodder 08-06-2010 12:23 AM

Well I've checked and double checked, am pretty sure I've done it all as you've described. Here's my code for the Home Tab:

Quote:

<vb:if condition="$vboptions['selectednavtab'] == 'vbcms'">
<li class="selected">
<vb:if condition="$vboptions['vbcms_url']">
<a class="navtab" href="{vb:raw vboptions.site_tab_url}{vb:raw session.sessionurl_q}"><img src="/images/navbar/Home.png" Height="24" Width="24" border="0" align="top" title="Home" alt="Home" /> {vb:rawphrase site}</a>
<vb:else />
<li><a class="navtab" href="{vb:raw vboptions.site_tab_url}{vb:raw session.sessionurl_q}"><img src="/images/navbar/Home.png" Height="24" Width="24" border="0" align="top" title="Home" alt="Home" /> {vb:rawphrase site}</a></li>
</vb:if>

abdulbasitsaeed 08-06-2010 12:38 AM

This is what I was using before 4.0.4:

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}"><img  src="http://forums.pakfellows.com/images/icons/Homepage/home.png" border="0" align="top" /> {vb:rawphrase site}</a>
    <ul class="floatcontainer">
        {vb:raw template_hook.vbcms_navbar_start}
        <vb:if condition="$links">
            <vb:each from="links" value="link">
                <li><a href="{vb:raw link.url}">{vb:raw link.title}</a></li>
            </vb:each>
        <vb:else />
            <li class="hidden">&nbsp;</li>
        </vb:if>
        {vb:raw template_hook.vbcms_navbar_end}
    </ul>
</li>
<vb:else />
    <li><a class="navtab" href="{vb:raw vboptions.site_tab_url}{vb:raw session.sessionurl_q}"><img  src="http://forums.pakfellows.com/images/icons/Homepage/home.png" border="0" align="top" /> {vb:rawphrase site}</a></li>
</vb:if>

I think the 3rd line in your code is redundant (it is not part of the code I suggested), the one in red given below:

Code:

<vb:if condition="$vboptions['selectednavtab'] == 'vbcms'">
<li class="selected">
        <vb:if condition="$vboptions['vbcms_url']">
                <a class="navtab" href="{vb:raw vboptions.site_tab_url}{vb:raw  session.sessionurl_q}"><img src="/images/navbar/Home.png"  Height="24" Width="24" border="0" align="top" title="Home" alt="Home"  /> {vb:rawphrase site}</a>
        <vb:else />
                <li><a class="navtab" href="{vb:raw  vboptions.site_tab_url}{vb:raw session.sessionurl_q}"><img  src="/images/navbar/Home.png" Height="24" Width="24" border="0"  align="top" title="Home" alt="Home" /> {vb:rawphrase  site}</a></li>
        </vb:if>


CFodder 08-06-2010 12:53 AM

Oh dear, oh dear. I tried commenting out the third line and got a "adding child to non-existent node" error when trying to save it.

So I thought I'd just try all the code you gave me, pasted it in, changed for my icons of course, and got the same error :(.

abdulbasitsaeed 08-06-2010 01:05 AM

Hmmm. I think your template may have got messed up.

Try reverting to the original template, and then make the changes suggested in the article from scratch.

To revert: Select the template "vbcms_navbar_link" (do not double click) and on the right side of the list of templates, you shall find a "Revert" button. Revert to the default template. Now make the changes as outlined in the article.

Hope that helps. :)


All times are GMT. The time now is 08:47 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01323 seconds
  • Memory Usage 1,738KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (4)bbcode_code_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete