can i get a code that will allow me to have a different on/off icon for a select board and that it will also change the on/off icon of the sub-boards with in it no matter how deep they are tunneled, to that same image, and if i have to add the code to the header/footer of each board thats ok.
![]()
So you want. The parent board to have a set on/off image, and the sub-boards of that parent board to have the same on/off as the parent board?![]()
yes...basically, its to make the rp boards on/off icons to match the rp..if that makes any sence....
(for the rp area of my Deluxe Anime Forum forum...)
Well this is a code and a half!![]()
<script>
/*Different On/Off Icons
Created By Wrighty
No Ripping, Reposting or Claiming*/
var icon = {
list: [
["general","officon_.jpg","onicon_.jpg"],
["general","officon_.jpg","onicon_.jpg"],
["general","officon_.jpg","onicon_.jpg"]
],
_d: get('td','tag'),
change: {
board: function(){
for(a=0;a<icon.list.length;a++){
for(i=0;i<icon._d.length;i++){
if(icon._d[i].width=="6%" && icon._d[i+1].innerHTML.match(new RegExp('/board/'+icon.list[a][0]))){
switch(icon._d[i].firstChild.alt){
case 'No New Posts':
icon._d[i].firstChild.src = icon.list[a][1];
break;
case 'New Posts':
icon._d[i].firstChild.src = icon.list[a][2];
break;
}
}
}
}
},
sub_board: function(){
for(a=0;a<icon.list.length;a++){
for(i=0;i<icon._d.length;i++){
if(icon._d[i].width=="6%"){
switch(icon._d[i].firstChild.alt){
case 'No New Posts':
icon._d[i].firstChild.src = icon.list[a][1];
break;
case 'New Posts':
icon._d[i].firstChild.src = icon.list[a][2];
break;
}
}
}
}
}
}
};
if(location.href.match(/.co.uk(\/$|$)/) || location.href.match(/\/category\//)){
icon.change.board();
}
for(i=0;i<icon.list.length;i++){
if(location.href.match(new RegExp('/board/'+icon.list[i][0])) || get('nav_tree','id').innerHTML.match(new RegExp('/board/'+icon.list[i][0]))){
icon.change.sub_board();
}
}
</script>
To add more boards use this:
["general","officon_.jpg","onicon_.jpg"],
["general","officon_.jpg","onicon_.jpg"],
["general","officon_.jpg","onicon_.jpg"]
Simply add more of those to the end. Make sure to leave off a comma on the last line.
Any problems. Feel free to make a new thread!![]()
Global Footer
I'm pretty sure that this is what you wanted. It will give the same on/off ions to the board on the main page and to ANY sub-boards of that board. Irrespective of the depth that you are going to go!![]()
Have fun! ^_^
its not working at all....
Edit: at the current time i dont have the images up there but when i did nothing showed at all...
(Board: HackSerenity)
Could you open up the board to guests, please?
umm its not that, its that i have no subboards in it and i have posting disabled, i'm in the process of making that board...but other then that it is open to guests, i'll add stuff to it really quick..
Edit: i added a few sub-boards to it now it should show
You must login to access this area.
Check your board settings.![]()
Can you try removing Cr0ws code for me temporarily as they may be conflicting. If they are, I'll have to rewrite it!![]()
@Wrighty: nope that wouldn't be it...i just added that in last night, long after i reported that the code you made doesn't work...
@Marc: and oops i will fix that![]()
@Wrighty: if you don't mind me asking...why did you add me on the messanger?
Still seeing the login message.![]()
sorry i got busy and forgot to fix it doing taht right now
edit: done
Added you cause I was bored!![]()
Also, should work because it works on my test board.
I will look at this later!![]()
Dwight, put Wrighty's code above the Sub-Board Categories code.![]()
sub-board categories code is in the board headers. Mine is global!
sub-board categories code is in the board headers. Mine is global!
Should they not both be in the board footers?![]()
No because mine is coded to work on the main page also![]()
I'll modify my categorizing code in a minute to work with your on/off icon code.![]()
Sorry, I know why it's not working. You didn't put the BOARD name. You need to put 'HackSerenity' instead of 'RolePlay'![]()
oops i didn't notice i did that, ok fixed that and it works so ty![]()
No problem!![]()