Peter
Junior Member
Coding God
Posts: 50
|
Post by Peter on Apr 29, 2006 13:20:07 GMT
This will do what SSD has, it will add a head and base image to the top and bottom of the main page tables (main table, info center and login table).
<script type="text/javascript"> <!-- /* Main page head and base images - Created by Peter
This code cannot be reposted anywhere other than SSDesigns or ProBoards Support.
This header must stay intact. */
// Head image and height var iHeadImg = "URL"; var iHeadHeight = 25;
// Base image and height var iBaseImg = "URL"; var iBaseHeight = 25;
var iTable = document.getElementsByTagName("table");
function doHeadBase(){ for(t = 0; t < iTable.length; t ++){ if(iTable.item(t).width == "100%" && iTable.item(t).cellPadding == "0" && iTable.item(t).innerHTML.match(/Forum Name|Info Center|Stay logged in for:/)){ var hCell = iTable.item(t).insertRow(0).insertCell(0) hCell.colSpan = 5; hCell.height = iHeadHeight; hCell.style.backgroundImage = "url('" + iHeadImg + "')"; var bCell = iTable.item(t).insertRow(iTable.item(t).rows.length).insertCell(0); bCell.colSpan = 5; bCell.height = iBaseHeight; bCell.style.backgroundImage = "url('" + iBaseImg + "')"; } } }
if(location.href.match(/\.com(\/|.+cgi(\?|#.+|\?\w+=home)?)?$/i)){ doHeadBase(); }
//--> </script>
Just change the variables in the top of the script.
Add to Main footer
Note: if you are using my divide categories script, place this below it, and it will add the head and base images to them as well
|
|