Post by Jordan on Sept 30, 2008 19:04:39 GMT -8
Allows you to have a different banner for each board.
Place the board id where the red is text is.
Global Headers
<script type="text/javascript"><!--
/*
Different Banner for Each Board
Open Source
*/
var _logo = new Array();
_logo["general"] = "image_url";
_logo["board_id"] = "image_url";
if(location.href.match(/board=(.+?)(&.+)?$/i)){
if(_logo[RegExp.$1]){
var td = document.getElementsByTagName("td")[1];
var _img = td.firstChild.firstChild.cloneNode(true);
_img.src = _logo[RegExp.$1];
td.firstChild.replaceChild(_img, td.firstChild.firstChild);
}
}
//--></script>
If you want to have the same image for each board in a category, use this version. Be sure to put the category id and not the board id where the red text is.
<script type="text/javascript"><!--
var _logo = new Array();
_logo["general"] = "image_url";
_logo["board_id"] = "image_url";
if(location.href.match(/board=(.+?)(&.+)?$/i)){
for(var a = document.getElementsByTagName("a"), x = 0; x < a.length; x++){
if(a[x].className == "nav" && a[x].previousSibling.nodeType == 3 && a[x].previousSibling.data.match(/::/i)){
if(_logo[a[x].href.split("#")[1]]){
var td = document.getElementsByTagName("td")[1];
var _img = td.firstChild.firstChild.cloneNode(true);
_img.src = _logo[a[x].href.split("#")[1]];
td.firstChild.replaceChild(_img, td.firstChild.firstChild);
break;
}
}
}
}
//--></script>
Place the board id where the red is text is.
Global Headers
<script type="text/javascript"><!--
/*
Different Banner for Each Board
Open Source
*/
var _logo = new Array();
_logo["general"] = "image_url";
_logo["board_id"] = "image_url";
if(location.href.match(/board=(.+?)(&.+)?$/i)){
if(_logo[RegExp.$1]){
var td = document.getElementsByTagName("td")[1];
var _img = td.firstChild.firstChild.cloneNode(true);
_img.src = _logo[RegExp.$1];
td.firstChild.replaceChild(_img, td.firstChild.firstChild);
}
}
//--></script>
If you want to have the same image for each board in a category, use this version. Be sure to put the category id and not the board id where the red text is.
<script type="text/javascript"><!--
var _logo = new Array();
_logo["general"] = "image_url";
_logo["board_id"] = "image_url";
if(location.href.match(/board=(.+?)(&.+)?$/i)){
for(var a = document.getElementsByTagName("a"), x = 0; x < a.length; x++){
if(a[x].className == "nav" && a[x].previousSibling.nodeType == 3 && a[x].previousSibling.data.match(/::/i)){
if(_logo[a[x].href.split("#")[1]]){
var td = document.getElementsByTagName("td")[1];
var _img = td.firstChild.firstChild.cloneNode(true);
_img.src = _logo[a[x].href.split("#")[1]];
td.firstChild.replaceChild(_img, td.firstChild.firstChild);
break;
}
}
}
}
//--></script>