Board Logo

 Username:    Password:    Stay logged in: Welcome Guest. Please Login or Register.  Jul 26th, 2017, 9:32pm


Board Hacks
Important News
Please read the notes posted with any codes carefully, as they will usually tell you where they need to go.
Welcome to the Conforums Hacks Board!

All codes here have been tested but we accept no responsibility if these codes do not work on your board, or have an adverse effect when used in combination with other codes.

This board is read only. Any queries or requests for codes should be made on the Coding Forum

Helpful sites
Google
Dynamic Drive

The Staff
Roger
Dave
GIzzy



« Previous Topic | Next Topic »
Pages: 1  Notify Send Topic Print
 thread  Author  Topic: Advanced Menu V0.9  (Read 4516 times)
Garet
Conforums Elite
Senior Member


member is offline

Avatar




Homepage PM

Gender: Male
Posts: 2073
xx Advanced Menu V0.9
« Thread started on: Jul 7th, 2006, 11:42am »

Code Submitted By: Wolvenraider

All Headers

Quote:
<script>
//advanced menu
//headers
//copyright wolvenraider, may not be reposted without my permission!
//thanks to N�m�вл for helping me with this code

var activate='yes' // if you want to activate this code ad the yes between the ''

//basic things
var tdbgcolor='6E94B7' //the color of all the td's
var tdclass='titlebg' //the class of all the td's

//banner
var banyes='yes' // do you want to add a banner above the menu, put then yes between the ''
var banner='http://img235.exs.cx/img235/5324/sliiv2b1sa.gif' //give the link of the banner

//messagepanel
var messagepanel='yes' //want a messagepanel, put then yes between the ''
var nonewcolour='000000' //colour of the text if there are no new messages
var newcolour='FF0000' //colour of the text if there are new messages
var who='1' //who can see the message link? 1= everyone 2=member+leaders 3=leader

//quick admin
var quickadmin='yes' //want a quickadmin menu, put then yes between the ''?
var onlyheadadmin='no' //can only the headadmin use it , put then yes between the ''


//start actual code
if (activate=="yes"){
TD= document.getElementsByTagName('TD');
Object = document.getElementsByTagName('td')[5].innerHTML
if(Object.match(/username=/)){
username=RegExp.rightContext.split('"')[0]
} else {
username="Guest"
}
//admin menu
if(TD[5].innerHTML.match(/action=admin/i)){
document.write("<center><table cellpadding='4' cellspacing='1' border='0' width='92%' valign='middle'>");
if (banyes=="yes") {
document.write("<tr><td bgcolor='"+tdbgcolor+"' class='"+tdclass+"' align='center' colspan='2'><img src='"+banner+"' border='0'></td></tr>");
}
document.write("<tr><td bgcolor='"+tdbgcolor+"' class='"+tdclass+"' align='center'>");
document.write("<a href='/index.cgi?'>[home]</a> ");
document.write("<a href='/index.cgi?action=search'>[search]</a> ");
document.write("<a href='/index.cgi?action=mlall'>[members]</a> ");
document.write("<a href='/index.cgi?action=calendar'>[calendar]</a> ");
document.write("<a href='/index.cgi?action=admin'>[admin]</a> ");
document.write("<a href='/index.cgi?action=profile&username="+username+"'>[profile]</a> ");
document.write("<a href='/index.cgi?action=notifyshow'>[notification]</a> ");
document.write("<a href='/index.cgi?action=logout'>[logout]</a>");


if (messagepanel=="yes" && who<="3") {
if(TD[2].innerHTML.match(/0 are new/i)){
document.write("<td bgcolor='"+tdbgcolor+"' class='"+tdclass+"' align='center'><a href='/index.cgi?action=im'><font color='"+nonewcolour+"'>no new messages</font></a></td>");
}
else if(TD[2].innerHTML.match(/1 is new/i)){
document.write("<td bgcolor='"+tdbgcolor+"' class='"+tdclass+"' align='center'><a href='/index.cgi?action=im'><font color='"+newcolour+"'>one new message</font></a></td>");
}
else {
document.write("<td bgcolor='"+tdbgcolor+"' class='"+tdclass+"' align='center'><a href='/index.cgi?action=im'><font color='"+newcolour+"'>new messages</font></a></td>");
}}
document.write("</td></tr>");
//quickadmin

if (quickadmin=="yes" && username=="admin" && onlyheadadmin=="yes") {
document.write("<tr><td bgcolor='"+tdbgcolor+"' class='"+tdclass+"' colspan='2'>");
document.write("<b>Quick Admin:</b> ");
document.write("<a href='/index.cgi?action=createboards'>create board</a> - ");
document.write("<a href='/index.cgi?action=createcategory'>create category</a> - ");
document.write("<a href='/index.cgi?action=deletecategory'> delete category</a> - ");
document.write("<a href='/index.cgi?action=boardsettings'>board settings</a> - ");
document.write("<a href='/index.cgi?action=headersfooters'>headers footers</a> - ");
document.write("<a href='/index.cgi?action=forumcolors'>forum colours</a> - ");
document.write("<a href='/index.cgi?action=newsfader'>news</a>");
document.write("</td></tr>");
}
if (quickadmin=="yes" && onlyheadadmin=="no") {
document.write("<tr><td bgcolor='"+tdbgcolor+"' class='"+tdclass+"' colspan='2'>");
document.write("<b>Quick Admin:</b> ");
document.write("<a href='/index.cgi?action=createboards'>create board</a> - ");
document.write("<a href='/index.cgi?action=createcategory'>create category</a> - ");
document.write("<a href='/index.cgi?action=deletecategory'> delete category</a> - ");
document.write("<a href='/index.cgi?action=boardsettings'>board settings</a> - ");
document.write("<a href='/index.cgi?action=headersfooters'>headers footers</a> - ");
document.write("<a href='/index.cgi?action=forumcolors'>forum colours</a> - ");
document.write("<a href='/index.cgi?action=newsfader'>news</a>");
document.write("</td></tr>");
}
document.write("</table></center>");

//end admin menu
}

else if(TD[2].innerHTML.match(/Hey,/i))
{
//member menu
document.write("<center><table cellpadding='4' cellspacing='1' border='0' width='92%' valign='middle'>");
if (banyes=="yes") {
document.write("<tr><td bgcolor='"+tdbgcolor+"' class='"+tdclass+"' align='center' colspan='2'><img src='"+banner+"' border='0'></td></tr>");
}
document.write("<tr><td bgcolor='"+tdbgcolor+"' class='"+tdclass+"' align='center'>");
document.write("<a href='/index.cgi?'>[home]</a> ");
document.write("<a href='/index.cgi?action=search'>[search]</a> ");
document.write("<a href='/index.cgi?action=mlall'>[members]</a> ");
document.write("<a href='/index.cgi?action=calendar'>[calendar]</a> ");
document.write("<a href='/index.cgi?action=profile&username="+username+"'>[profile]</a> ");
document.write("<a href='/index.cgi?action=notifyshow'>[notification]</a> ");
document.write("<a href='/index.cgi?action=logout'>[logout]</a>");

if (messagepanel=="yes" && who<="2") {
if(TD[2].innerHTML.match(/0 are new/i)){
document.write("<td bgcolor='"+tdbgcolor+"' class='"+tdclass+"' align='center'><a href='/index.cgi?action=im'><font color='"+nonewcolour+"'>no new messages</font></a></td>");
}
else if(TD[2].innerHTML.match(/1 is new/i)){
document.write("<td bgcolor='"+tdbgcolor+"' class='"+tdclass+"' align='center'><a href='/index.cgi?action=im'><font color='"+newcolour+"'>one new message</font></a></td>");
}
else {
document.write("<td bgcolor='6E94B7' class='"+tdclass+"' align='center'><a href='/index.cgi?action=im'><font color='"+newcolour+"'>new messages</font></a></td>");
}}
document.write("</td></tr></table></center>");
//end member menu
}
else {
//guests menu
document.write("<center><table cellpadding='4' cellspacing='1' border='0' width='92%' valign='middle'>");
if (banyes=="yes") {
document.write("<tr><td bgcolor='"+tdbgcolor+"' class='"+tdclass+"' align='center' colspan='2'><img src='"+banner+"' border='0'></td></tr>");
}
document.write("<tr><td bgcolor='"+tdbgcolor+"' class='"+tdclass+"' align='center' width='75%'>");
document.write("<a href='/index.cgi?'>[home]</a> ");
document.write("<a href='/index.cgi?action=search'>[search]</a> ");
document.write("<a href='/index.cgi?action=login'>[login]</a> ");
document.write("<a href='/index.cgi?action=register'>[register]</a> ");
if (messagepanel=="yes" && who<="1") {
document.write("<br /><td bgcolor='"+tdbgcolor+"' class=��+tdclass+�� align='right' width='15%'><font color='"+nonewcolour+"'>login to view pm's</font></td>");
}
document.write("</td></tr></table></center> ");
}
table= document.getElementsByTagName('table');
table[0].style.display='none';
}
</script>


Preview: Click Here

Code inserts itself right below banner

« Last Edit: Jul 7th, 2006, 11:42am by Garet » User IP Logged

Pages: 1  Notify Send Topic Print
« Previous Topic | Next Topic »

Back To Top
Donate $6.99 for 50,000 Ad-Free Pageviews!

| |

This forum powered for FREE by Conforums ©
Sign up for your own Free Message Board today!
Terms of Service | Privacy Policy | Conforums Support | Parental Controls