vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=251)
-   -   New NavTab Created. How Do I Add Text And Create A Target? (https://vborg.vbsupport.ru/showthread.php?t=262350)

Steve038 04-20-2011 10:58 PM

New NavTab Created. How Do I Add Text And Create A Target?
 
Sorry to keep bombarding this message board with stupid questions. Adding a couple of new navtabs is one of the last remaining jobs required to complete my site, and I'm really struggling with it.

I've followed the instructions on this thread: https://vborg.vbsupport.ru/showthread.php?t=228313 My new Navtab has appeared, but it has no text on it. My questions are:

1: How do I add About Us to the tab?
2: How do I link it to the target page I want it to go to when people click on it?

Here is the code in my New Template:

<vb:if condition="$vboptions['selectednavtab'] == 'roaringseasonabout'">
<li class="selected">
<a class="navtab" href="about.php{vb:raw session.sessionurl_q}">{vb:rawphrase roaringseason_about}</a>
<ul class="floatcontainer">
<li><a href="#">#</a></li>
</ul>
</li>
<vb:else />
<li><a class="navtab" href="about.php{vb:raw session.sessionurl_q}">{vb:rawphrase roaringseason_about}</a></li>
</vb:if>

Here is my Plugin PHP code:

if (THIS_SCRIPT == 'About Us') // also defined('ragteknews') possible
{
//set selected tab
$vbulletin->options['selectednavtab'] = 'roaringseasonabout';
}
// add the "subtemplate" to the navbartemplate
$template_hook['navtab_middle'] .= vB_Template::create('roaringseason_about_navbar')->render();



Many thanks

Lynne 04-21-2011 02:48 AM

PHP Code:

if (THIS_SCRIPT == 'About Us'

Is there a line like this at the top of your about us page:
PHP Code:

define('THIS_SCRIPT''xxxxx'); 

The xxxxx is what you put for 'About Us' as that is what THIS-SCRIPT is defined as. You will need to look in your page to find that, and if it isn't there, then enter it yourself and define it with a unique name.

HTML Code:

{vb:rawphrase roaringseason_about}
Did you create a phrase called "roaringseason_about" and enter the text for your tab name?


All times are GMT. The time now is 01:04 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.00983 seconds
  • Memory Usage 1,718KB
  • 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
  • (1)bbcode_html_printable
  • (2)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (2)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