Add a jump menu to phpnuke header


This tutorial will show you how to add a jump menu to the phpnuke header..

Files to edit :
themes/YOURTHEME/theme.php
themes/YOURTHEME/header.html [if necessary]

Steps :
If your theme includes a header.html use the code below to add the jump box.

Add to the <head> tag

<script language="JavaScript">

function openDir( form ) {

var newIndex = form.fieldname.selectedIndex;

if ( newIndex == 0 ) {

alert( "Please select a location!" );

} else {

cururl = form.fieldname.options[ newIndex ].value;

window.location.assign( cururl );

}

}

</script>

Add the following form where you want the jump box to appear.

<form name=form>
<select name="fieldname" size="1" onChange="openDir( this.form )">
<option>--------Jump To--------</option>
<option value=http://www.westernstudios.net>Western Studios</option>
<option value=http://www.westernstudios.net>Western Studios </option>
<option value=http://www.yoursite.com>Your link here</option>
</select>
</form>

If your theme does not contain a header.html then paste the following in your themes/YOURTHEME/theme.php under the function themeheader()

echo ' <script language="JavaScript">

function openDir( form ) {

var newIndex = form.fieldname.selectedIndex;

if ( newIndex == 0 ) {

alert( "Please select a location!" );

} else {

cururl = form.fieldname.options[ newIndex ].value;

window.location.assign( cururl );

}

}

</script>';

Add the following form where you want the jump box to appear.

echo ' <form name=form>
<select name="fieldname" size="1" onChange="openDir( this.form )">
<option>--------Jump To--------</option>
<option value=http://www.westernstudios.net>Western Studios</option>
<option value=http://www.westernstudios.net>Western Studios </option>
<option value=http://www.yoursite.com>Your link here</option>
</select>
</form>';

That's all! Visit the forums for more help.