Hi Lynne,
I am wondering if there is anyway for me to use this great tutorial.
I want to be able to use this even though I do not have a custom page, I have my forumhome split to keep style download forums out of my main forums. I have do this using a really old mod by amykhar.
My forums for style downloads are located on forum.php?page=2, there isn't a this script defined anywhere so I cannot use one to get the tab higlighted or the pop-up menus to appear.
This is how I have my plugin written:
Code:
$tabselected = '';
$tablinks = '';
if (THIS_SCRIPT == 'forum.php?page=2')
{
$vbulletin->options['selectednavtab']='style_forums';
$tabselected = ' class="selected"';
$tablinks = ' <ul class="floatcontainer">
<li class="popupmenu">
<a href="javascript://" class="popupctrl">The vB3 Styles</a>
<ul class="popupbody popuphover">
<li><a href="forumdisplay.php?11-Download-vB3-Lighter-Styles">Download vB3 Lighter Styles</a></li>
<li><a href="forumdisplay.php?16-Download-vB3-Dark-Styles">Download vB3 Dark Styles</a></li>
<li><a href="project.php?projectid=2">Project vB Styles Version 3.8x</a></li>
</ul>
</li>
<li class="popupmenu">
<a href="javascript://" class="popupctrl">The vB4 Styles</a>
<ul class="popupbody popuphover">
<li><a href="forumdisplay.php?10-Download-vB4-Styles">Download vB4 Styles</a></li>
<li><a href="project.php?projectid=3">Project vB Styles Version 4</a></li>
</ul>
</li>
<li class="popupmenu">
<a href="javascript://" class="popupctrl">Loyal Member Styles</a>
<ul class="popupbody popuphover">
<li><a href="forumdisplay.php?22-Loyal-Member-vB4-Styles">Loyal Member vB4 Styles</a></li>
<li><a href="project.php?projectid=4">Project vB4 Styles Loyal Members</a></li>
</ul>
</li>
</ul> ';
}
$template_hook['navtab_end'] .= '<li'.$tabselected.'><a class="navtab" href="forum.php?page=2">Styles Forums</a>'.$tablinks.'</li>' ;
In use here:
http://www.styleorigin.com/vbstyles/forum.php
The link navigates to the page well enough but obviously the tab doesn't higlight and the pop-up menus do not appear. I know this is because of the incorrect use of the THIS_SCRIPT, but I don't know what to use instead.
Do you have any ideas please?