NTLDR
03-13-2004, 10:00 PM
This adds a dropdown menu on the navbar which contains all the links found in the forumjump that apears on certain pages. Note the forumjump must be enabled in the ACP for this to work. See the attached screenshot.
In your phpinclude_start template OR in global.php (if you have lots of styles you may want to do one edit to global.php instead of editing styles) after:
$logincode = construct_login_code();
Add (or place in the phpinclude_start template, do one or the other):
$donavjump = true;
construct_forum_jump();
$navjump = $forumjump;
unset($donavjump, $forumjump, $jumpforumbits, $optionselected, $usecategories, $jumpforumid, $jumpforumtitle, $curforumid, $daysprune, $defaultselected);
Replace the contents of your forumjump template with:
<if condition="$GLOBALS['donavjump']">
<!-- navjump menu -->
<div class="vbmenu_popup" id="navjump_menu" style="display:none">
<table cellpadding="4" cellspacing="1" border="0">
<tr><td class="thead">$vbphrase[site_areas]</td></tr>
<tr><td class="vbmenu_option"><a href="forumdisplay.php?$session[sessionurl]forumid=cp">$vbphrase[user_control_panel]</a></td></tr>
<tr><td class="vbmenu_option"><a href="forumdisplay.php?$session[sessionurl]forumid=pm">$vbphrase[private_messages]</a></td></tr>
<tr><td class="vbmenu_option"><a href="forumdisplay.php?$session[sessionurl]forumid=subs">$vbphrase[subscriptions]</a></td></tr>
<tr><td class="vbmenu_option"><a href="forumdisplay.php?$session[sessionurl]forumid=wol">$vbphrase[whos_online]</a></td></tr>
<tr><td class="vbmenu_option"><a href="forumdisplay.php?$session[sessionurl]forumid=search">$vbphrase[search_forums]</a></td></tr>
<tr><td class="vbmenu_option"><a href="forumdisplay.php?$session[sessionurl]forumid=home">$vbphrase[forums_home]</a></td></tr>
<tr><td class="thead">$vbphrase[forums]</td></tr>
$jumpforumbits
</table>
</div>
<!-- / navjump menu -->
<else />
<div class="smallfont" style="text-align:$stylevar[left]; white-space:nowrap">
<form action="forumdisplay.php" method="get">
<input type="hidden" name="s" value="$session[sessionhash]" />
<input type="hidden" name="daysprune" value="$daysprune" />
<strong>$vbphrase[forum_jump]</strong><br />
<select name="f" onchange="this.form.submit();">
<optgroup label="$vbphrase[site_areas]">
<option value="-1" $defaultselected>$vbphrase[please_select_one]</option>
<option value="cp" $frmjmpsel[usercp]>$vbphrase[user_control_panel]</option>
<option value="pm" $frmjmpsel[pm]>$vbphrase[private_messages]</option>
<option value="subs" $frmjmpsel[subs]>$vbphrase[subscriptions]</option>
<option value="wol" $frmjmpsel[wol]>$vbphrase[whos_online]</option>
<option value="search" $frmjmpsel[search]>$vbphrase[search_forums]</option>
<option value="home" $frmjmpsel[home]>$vbphrase[forums_home]</option>
<option value="-1">--------------------</option>
</optgroup>
<optgroup label="$vbphrase[forums]">
$jumpforumbits
</optgroup>
</select>$gobutton
</form>
</div>
</if>
Replace the contents of your option template with:
<if condition="$GLOBALS['donavjump']">
<tr><td class="vbmenu_option"><a href="forumdisplay.php?$session[sessionurl]forumid=$optionvalue">$optiontitle</a></td></tr>
<else />
<option value="$optionvalue" class="$optionclass" $optionselected>$optiontitle</option>
</if>
In your navbar template add:
<if condition="$vboptions['useforumjump']">
<td id="navjump" class="vbmenu_control"><a href="#navjump">$vbphrase[forum_jump]</a> <script type="text/javascript"> vbmenu_register("navjump"); </script></td>
</if>
Where you want the link to the forum jump to appear.
Still in the navbar template add:
<if condition="$vboptions['useforumjump']">
$GLOBALS[navjump]
</if>
Before:
<!-- / NAVBAR POPUP MENUS -->
In your phpinclude_start template OR in global.php (if you have lots of styles you may want to do one edit to global.php instead of editing styles) after:
$logincode = construct_login_code();
Add (or place in the phpinclude_start template, do one or the other):
$donavjump = true;
construct_forum_jump();
$navjump = $forumjump;
unset($donavjump, $forumjump, $jumpforumbits, $optionselected, $usecategories, $jumpforumid, $jumpforumtitle, $curforumid, $daysprune, $defaultselected);
Replace the contents of your forumjump template with:
<if condition="$GLOBALS['donavjump']">
<!-- navjump menu -->
<div class="vbmenu_popup" id="navjump_menu" style="display:none">
<table cellpadding="4" cellspacing="1" border="0">
<tr><td class="thead">$vbphrase[site_areas]</td></tr>
<tr><td class="vbmenu_option"><a href="forumdisplay.php?$session[sessionurl]forumid=cp">$vbphrase[user_control_panel]</a></td></tr>
<tr><td class="vbmenu_option"><a href="forumdisplay.php?$session[sessionurl]forumid=pm">$vbphrase[private_messages]</a></td></tr>
<tr><td class="vbmenu_option"><a href="forumdisplay.php?$session[sessionurl]forumid=subs">$vbphrase[subscriptions]</a></td></tr>
<tr><td class="vbmenu_option"><a href="forumdisplay.php?$session[sessionurl]forumid=wol">$vbphrase[whos_online]</a></td></tr>
<tr><td class="vbmenu_option"><a href="forumdisplay.php?$session[sessionurl]forumid=search">$vbphrase[search_forums]</a></td></tr>
<tr><td class="vbmenu_option"><a href="forumdisplay.php?$session[sessionurl]forumid=home">$vbphrase[forums_home]</a></td></tr>
<tr><td class="thead">$vbphrase[forums]</td></tr>
$jumpforumbits
</table>
</div>
<!-- / navjump menu -->
<else />
<div class="smallfont" style="text-align:$stylevar[left]; white-space:nowrap">
<form action="forumdisplay.php" method="get">
<input type="hidden" name="s" value="$session[sessionhash]" />
<input type="hidden" name="daysprune" value="$daysprune" />
<strong>$vbphrase[forum_jump]</strong><br />
<select name="f" onchange="this.form.submit();">
<optgroup label="$vbphrase[site_areas]">
<option value="-1" $defaultselected>$vbphrase[please_select_one]</option>
<option value="cp" $frmjmpsel[usercp]>$vbphrase[user_control_panel]</option>
<option value="pm" $frmjmpsel[pm]>$vbphrase[private_messages]</option>
<option value="subs" $frmjmpsel[subs]>$vbphrase[subscriptions]</option>
<option value="wol" $frmjmpsel[wol]>$vbphrase[whos_online]</option>
<option value="search" $frmjmpsel[search]>$vbphrase[search_forums]</option>
<option value="home" $frmjmpsel[home]>$vbphrase[forums_home]</option>
<option value="-1">--------------------</option>
</optgroup>
<optgroup label="$vbphrase[forums]">
$jumpforumbits
</optgroup>
</select>$gobutton
</form>
</div>
</if>
Replace the contents of your option template with:
<if condition="$GLOBALS['donavjump']">
<tr><td class="vbmenu_option"><a href="forumdisplay.php?$session[sessionurl]forumid=$optionvalue">$optiontitle</a></td></tr>
<else />
<option value="$optionvalue" class="$optionclass" $optionselected>$optiontitle</option>
</if>
In your navbar template add:
<if condition="$vboptions['useforumjump']">
<td id="navjump" class="vbmenu_control"><a href="#navjump">$vbphrase[forum_jump]</a> <script type="text/javascript"> vbmenu_register("navjump"); </script></td>
</if>
Where you want the link to the forum jump to appear.
Still in the navbar template add:
<if condition="$vboptions['useforumjump']">
$GLOBALS[navjump]
</if>
Before:
<!-- / NAVBAR POPUP MENUS -->