Post by Matt on Jun 11, 2006 9:25:40 GMT -5
Created By: Virtuoso
Creator's Comments:
Finally The Release of SwitchHatch Admin Panel v.1
Cross-Browser.
Features:
* Board Modification
* Info Center Modification
* Admin Panel
* Choseable Features
Special Thanks to David for helping me debug.
First place this code in the Global Footers.
Now Place This Code In The Global Footers following the previous.
Enjoy
Creator's Comments:
Finally The Release of SwitchHatch Admin Panel v.1
Cross-Browser.
Features:
* Board Modification
* Info Center Modification
* Admin Panel
* Choseable Features
Special Thanks to David for helping me debug.
First place this code in the Global Footers.
<script type='text/javascript'>
/*SwitchHatch admin panel v.1
Created by Virtuoso
Do not repost, or redistribute without permission of the creator.
Leave this header intact.
*/
//Do not edit ANYTHING.
var gActivatemod = "";
var gActivateinfo = "";
var gForum_Name = "";
var gon = "";
var goff = "";
var gext = ".";
var forum_url = "";
var re = new RegExp('('+gon+'|'+goff+'|'+gext+')','i');
var gCell = document.getElementsByTagName("td");
if(gActivatemod == 'yes'){
for(i=0;i<gCell.length;i++)
{
if(gCell[i].className=="titlebg" && gCell[i].innerHTML.match(/Forum Name/))
{
gCell[i].innerHTML=gForum_Name;
gCell[i+1].style.display="none";
gCell[i+2].style.display="none";
}
if(gCell[i].width=="8%" && gCell[i].innerHTML.match(re) && gCell[i].className=="windowbg")
{
var gTopics = gCell[i+2].innerHTML;
var gPosts = gCell[i+3].innerHTML;
var gInformation = gCell[i+1].innerHTML;
gCell[i+2].style.display="none";
gCell[i+3].style.display="none";
gCell[i+4].width="20%";
gCell[i+1].innerHTML='<table width="97%" cellpadding="3"><tr><td width="50%">'+gInformation+'</td><td Width="50%" align="right" valign="top">[Total Topics: '+gTopics+' | Total Posts: '+gPosts+']</td></tr></table>';
}
}
}
if(gActivateinfo == 'yes'){
for(t=0;t<gCell.length;t++){
if(gCell[t].className == "catbg" && gCell[t].colSpan == "2" && gCell[t].innerHTML.match(/Users Online/i)){
var inner = gCell[t+2].innerHTML;
gCell[t+2].innerHTML = inner+"<hr/><center><br><a href='#top'>Back To Top.</a></center>"
}
}
}
</script>
Now Place This Code In The Global Footers following the previous.
<script type='text/javascript'>
/*SwitchHatch admin panel v.1
Created by Virtuoso
Do not repost, or redistribute without permission of the creator.
Leave this header intact.
*/
var gTable=document.getElementsByTagName("table");
if(location.href.match(/action=(admin|(.+?)3)$/)){
var gAnchor = document.getElementsByTagName('a');
for(d=0;d<gAnchor.length;d++){
if(gAnchor[d].href.match(/action=skins/i)){
gAnchor[d].parentNode.innerHTML+='<br /><a href="/index.cgi?action=headersfooters2&id=*&forumpagemod">SwitchHatch Preferences.</a>';
}
}
}
if(location.href.match(/index.cgi\?action=headersfooters2&id=\*&forumpagemod/)){
for(t=4;t<gTable.length;t++){
gTable[t].style.display="none";
}
document.write("<table width=92% border=0 cellspacing=1 cellpading=4 class=bordercolor align=center><tr><td class=catbg align=left><font size=1 class=cattext>SwitchHatch </font></td><td class=catbg align=center><font size=1 class=cattext>Forum Modification</font></td><td class=catbg align=right><font size=1 class=cattext>Modify Preferences</font></td></tr><tr><td class=windowbg2 valign=top height=100 width=100 align=left><font size=1>Here, you may edit your code preferences.</font></td><td class=windowbg2 valign=top height=100 width=100 align=center></td><td class=windowbg2 valign=top height=100 width=100 align=right></td></tr><tr><td class=windowbg2><u>Activate Board Modification:</u></td><td class=windowbg2><input type=text value='"+gActivatemod+"' id=modactivation size=35></td><td class=windowbg2><font size=2><i>Yes</i> to activate Board Modification. <i>No</i> to keep it inactive.</font></td></tr><tr><td class=windowbg2><font size=1><u>Activate Info Center Modification:</u></font></td><td class=windowbg2><input type=text value='"+gActivateinfo+"' id=infoactivation size=35></td><td class=windowbg2><font size=2><i>Yes</i> to activate Info Center Modification. <i>No</i> to keep it inactive.</font></td></tr><tr><td class=windowbg2><font size=1><u>On Icon Name:</u></font></td><td class=windowbg2><input type=text value='"+gon+"' id=oniconid size=35></td><td class=windowbg2><font size=2>Enter the name of your ON icon. If it is on.jpg, the name is on.</font></td></tr><tr><td class=windowbg2><font size=1><u>Off Icon Name:</u></font></td><td class=windowbg2><input type=text value='"+goff+"' id=officonid size=35></td><td class=windowbg2><font size=2>Enter the name of your ON icon. If it is off.jpg, the name is off.</font></td></tr><tr><td class=windowbg2><font size=1><u>ON/OFF icon Extension:</u></td><td class=windowbg2><input type=text value='"+gext+"' id=onoffextension size=35></td><td class=windowbg2><font size=2>The extension of both icons. If they are on.jpg and off.jpg, the extension is .jpg. YOU MUST SAVE AS THE SAME EXTENSION.</font></td></tr><tr><td class=windowbg2><font size=1><u>Forum Name:</u></font></td><td class=windowbg2><input type=text value='"+gForum_Name+"' id=forumnameid size=35></td><td class=windowbg2><font size=2>Your Forum's Name. It is recommended you keep it short.</font></td></tr><tr><td class=windowbg2><font size=1><u>Forum Url:</u></td><td class=windowbg2><input type=text value='"+forum_url+"' id=forumurlid size=35></td><td class=windowbg2><font size=2>Your Forums URL. It is recommended you add an # at the end instead of an ?.</font></td></tr><tr><td class=windowbg2><input type='button' value='Update' onClick='globalUpdate()'></td><td class=windowbg2></td><td class=windowbg2></td></tr></tr></table>")
}
function globalUpdate(){
document.forms[0].footer.value = document.forms[0].footer.value.replace(/var gActivatemod = ""/,'var gActivatemod = "'+document.getElementById("modactivation").value+'"');
document.forms[0].footer.value = document.forms[0].footer.value.replace(/var gActivateinfo = ""/,'var gActivateinfo = "'+document.getElementById("infoactivation").value+'"');
document.forms[0].footer.value = document.forms[0].footer.value.replace(/var gon = ""/,'var gon = "'+document.getElementById("oniconid").value+'"');
document.forms[0].footer.value = document.forms[0].footer.value.replace(/var goff = ""/,'var goff = "'+document.getElementById("officonid").value+'"');
document.forms[0].footer.value = document.forms[0].footer.value.replace(/var gext = ""/,'var gext = "'+document.getElementById("onoffextension").value+'"');
document.forms[0].footer.value = document.forms[0].footer.value.replace(/var gForum_Name = ""/,'var gForum_Name = "'+document.getElementById("forumnameid").value+'"');
document.forms[0].footer.value = document.forms[0].footer.value.replace(/var forum_url = ""/,'var forum_url = "'+document.getElementById("forumurlid").value+'"');
document.forms[0].submit();
}
</script>
Enjoy