vForums Support > Programming & Coding :: Database of Codes/Hacks/Mods :: > Category Name in Head Image
Category Name in Head Image - Posted By Michael (wrighty) on 31st Mar 08 at 11:51am
This will put the category name in the middle of your head image. To make this work effectively, you have to make sure that your head left & head right images are the same widths!
<script>
/*Category Name in Head Image
by Wrighty
No Repost, Rip or Claiming*/
var row = 1; //Are you showing the 'Board Name' row? 1 = yes, 0 = no.
var r = get('tr','tag');
for(i=0;i<r.length;i++){
if(r[i].cells[0].className == 'title2 categorytitle' && r[i].cells[0].innerHTML.match(/\/category\//)){
var x = (row==1)? 1 : -1;
var num = parseInt(2 + x);
var a = r[i-num].insertCell(1);
with(a){
width="100%";
align="center";
}
a.appendChild(r[i].cells[0].firstChild);
r[i].style.display = 'none';
}
}
</script>
Edit the part in red. That is the row that appears just above where the 'category' name normally is. If you're showing it, put a 1 otherwise, a 0
Global Footer