vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 Design and Graphics Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=253)
-   -   Home Icom as Tab (https://vborg.vbsupport.ru/showthread.php?t=315317)

TheAdminMarket 11-08-2014 05:55 AM

Home Icom as Tab
 
Hello,

I've a page landing as homepage and I want to avoid adding text like "Home" in Navigation manager but rather to use a Home icon like in my WP template at:
http://www.dimoslagada.com/

Is there anyway to do it?

Thank you

Zachery 11-08-2014 06:52 AM

Edit the phrase, and make it an image, or edit the navigation manager entry and make it an image?

TheAdminMarket 11-08-2014 07:26 AM

Quote:

Originally Posted by Zachery (Post 2521886)
Edit the phrase, and make it an image, or edit the navigation manager entry and make it an image?

I think that I've tried this solution one year ago (then I gave up the idea), and if I remember well it was working half the way. What I mean. There are 2 icons. One for active tab and a second one (grey out) for inactive tab. It was always showing one icon.

But thanks to your suggestion I just got an idea. As it will be just for my site I can modify the template and add something like:
Code:

<vb:if condition="THIS_SCRIPT == '.....'">
<img border="0" src="active.png">
<vb:else />
<a href="..."><img border="0" src="inactive.png"></a>
</vb:if>

I've a feeling that it will works.

Thank you !!

--------------- Added [DATE]1415464398[/DATE] at [TIME]1415464398[/TIME] ---------------

Well, I was able to add it on the way that I said before, but my try to make it professional using the Plugin system currently stucks.

I want to place it on the hook: navtab_start but seems that using as hookname: navigation_tab_complete is not the right one.

My code (in the xml file) is:
Code:

<plugin active="1" executionorder="90">
        <title>Index: Home Tab</title>
        <hookname>navigation_tab_complete</hookname>
        <phpcode><![CDATA[
            $template_hook['navtab_start'] .= vB_Template::create('index_hometab')->render();
        ]]></phpcode>
</plugin>

and the template code (which works when I'm adding it manually) is:
HTML Code:

<template name="index_hometab" templatetype="template" date="" username="" version="1.0.0">
<![CDATA[
<vb:if condition="THIS_SCRIPT == 'index'">

        <img border="0" src="images/portal/misc/navhome_active.png" style="float:left;">
<vb:else />
        <a href=""><img border="0" src="images/portal/misc/navhome_inactive.png" style="float:left;"></a>
</vb:if>
]]></template>

Anyone can catch the bug?


All times are GMT. The time now is 10:25 PM.

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

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.00951 seconds
  • Memory Usage 1,724KB
  • 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
  • (2)bbcode_code_printable
  • (1)bbcode_html_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (3)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete