|
Post by Jordan Reposter on Sept 5, 2011 22:30:02 GMT -5
Code by Jordan
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>
|
|
|
Post by iPokemon on Sept 10, 2011 13:05:17 GMT -5
Accepted [style=-webkit-border-radius: 20px;-moz-border-radius: 20px;border-radius: 20px; background-color: rgba(0,0,0,0.9);padding: 6px;display:inline;color:white;font-weight:bold;]Thank you for your submission! It will be archived in our index!
[/style]
|
|