Post by Lugubrious on Feb 21, 2010 17:34:31 GMT -8
<script language="javascript">
/* Simple Custom Menu & PM Box by Lugubrious.
Support can be found in the questions board at http://epoque.proboards.com!
Open source, but do not repost and claim as your own without major editing. Ask me if you're not sure on the support site. If you have any questions or suggestions for a potential future release, drop by Epoque! */
//Edit these variables
var brak = ['{ ',' }']; // enter start then end brackets. Leave blank if not desired.
var sep = ' | '; //seperator here
var staff=['admin','moderator']; // people who can use the admin panel here
var x; // keep this here, no editing
var help = "yes"; // yes or no, do you want the help button?
var zwidth = '100%'; // enter your table's width here, percent or pixels wide.
var type = "NULL"; /* if you do not want to use the options I give you, and would rather use a class already made. (ie: windowbg, catbg, something you made, etc) then change "NULL" to the class you would like to use. Feel free to erase options below if you are using a class.*/
var zbgtype = 'c'; // enter i if you would like an image bg, enter c if you would like a color bg
var zbg = '#ffffff'; // enter what you would like the bg to be
var zborder = '1'; // enter border thickness
var zbc = '#000000'; // enter border color
var zfc = '#000000'; // enter font color (NOTE: the links will stay the same color as your forum)
var zfs = '3'; //enter font size
var zff = 'arial'; //enter font
//EXPERTS ONLY BELOW THIS LINE
if(type=="NULL"){
document.write('<center><table width="'+zwidth+'" border="'+zborder+'" bordercolor="'+zbc+'" cellspacing="0"><tr><td ');
if(zbgtype.toLowerCase()=='c'){
document.write('bgcolor');
}
else if(zbgtype.toLowerCase()=='i'){
document.write('background');
}
document.write('="'+zbg+'"><font size="'+zfs+'" face="'+zff+'" color="'+zfc+'"><center>');
}
else{
document.write('<center><table class="'+type+'" width="'+zwidth+'"><tr><td class="'+type+'"><center>');
}
var box = document.getElementsByTagName("td");
if(box[2].innerHTML.match(/Hey,\s(.+?),\syou\shave/i)){
document.write(brak[0]+'<a href="?index.cgi">Home</a>') ;
if(help.toLowerCase()=="yes" || help.toLowerCase()=="y"){
document.write(sep+ '<a href="?index.cgi?action=help">Help</a>');
}
document.write(sep+ '<a href="?action=pm">PM');
var pmNew = box[2].innerHTML.split(' are new')[0].split(',')[3];
pmNew = pmNew.split(' is new')[0];
var pmMsg = pmNew+" New";
document.write(pmMsg);
document.write("</a>");
document.write(sep+ '<a href="?action=search">Search</a>' + sep + '<a href="?action=members">Members</a>' +sep+ '<a href="?action=calendar">Calendar</a>' + sep);
for(x in staff){
if(pb_username==staff[x]){
document.write('<a href="?action=admin">Admin</a>' + sep);
}
}
document.write('<a href="?action=viewprofile">Profile</a>' + sep + '<a href="?action=logout">Logout</a>');
}else{
document.write('<a href="?action=home">Home</a>' + sep + '<a href="http://help.proboards.com">Help</a>' +sep+ '<a href="?action=search">Search</a>' +sep+ '<a href="?action=login">Login</a>' +sep+ '<a href="?action=register">Register</a>');
}
document.write(brak[1]+'</font></table></center>');
</script>
Put it in whichever header/footer you'd like it to show up in. It works anywhere.
It is recommended you use this with the codes to remove the Hey x you have x ... code and removing the site's menubar.
Example Admin Bar 1
Example Guest Bar 1
Example Admin Bar 2
You can find the link to the support site in the code header.
Thanks!