PDA

View Full Version : New NavTab Created. How Do I Add Text And Create A Target?


Steve038
04-20-2011, 10:58 PM
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
if (THIS_SCRIPT == 'About Us') Is there a line like this at the top of your about us page:
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.

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