This topic was locked 23rd Mar 08 at 6:59pm by Michael |
dog199200 Guest | [F] On/off icon mod (19th Mar 08 at 4:15am UTC) | | 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. | |
|
Michael Moderator
    
![[Avatar]](http://av.wservices.co.uk/av.png) Recoding the future Posts: 4,043 Status: Offline Gender: Male Location: UK Joined:
Additional Groups: Coding Team
  
pmvForum | Re: On/off icon mod (20th Mar 08 at 12:50am UTC) | | 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? | |
|
dog199200 Guest | Re: On/off icon mod (20th Mar 08 at 11:01pm UTC) | | 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...) | |
|
Michael Moderator
    
![[Avatar]](http://av.wservices.co.uk/av.png) Recoding the future Posts: 4,043 Status: Offline Gender: Male Location: UK Joined:
Additional Groups: Coding Team
  
pmvForum | Re: On/off icon mod (21st Mar 08 at 10:18pm UTC) | | 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! ^_^ | |
|
dog199200 Guest | Re: On/off icon mod (22nd Mar 08 at 3:28am UTC) | | 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) | |
|
Marc vChat Developer
     I <3 Rossy
Posts: 3,388 Status: Offline Gender: Male Location: Ontario, Canada Age: 33 Joined:
Additional Groups: Coding Team
  
pmwww | Re: On/off icon mod (22nd Mar 08 at 4:23am UTC) | | Could you open up the board to guests, please? | |
rroll.to— Shorten a link, rickroll your friends. |
|
dog199200 Guest | Re: On/off icon mod (22nd Mar 08 at 4:52am UTC) | | 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 | |
|
Marc vChat Developer
     I <3 Rossy
Posts: 3,388 Status: Offline Gender: Male Location: Ontario, Canada Age: 33 Joined:
Additional Groups: Coding Team
  
pmwww | Re: On/off icon mod (22nd Mar 08 at 6:22am UTC) | | Quote: You must login to access this area.
Check your board settings. | |
rroll.to— Shorten a link, rickroll your friends. |
|
Michael Moderator
    
![[Avatar]](http://av.wservices.co.uk/av.png) Recoding the future Posts: 4,043 Status: Offline Gender: Male Location: UK Joined:
Additional Groups: Coding Team
  
pmvForum | Re: On/off icon mod (22nd Mar 08 at 10:23am UTC) | | Can you try removing Cr0ws code for me temporarily as they may be conflicting. If they are, I'll have to rewrite it! | |
|
dog199200 Guest | Re: On/off icon mod (22nd Mar 08 at 3:33pm UTC) | | @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? | |
|
Marc vChat Developer
     I <3 Rossy
Posts: 3,388 Status: Offline Gender: Male Location: Ontario, Canada Age: 33 Joined:
Additional Groups: Coding Team
  
pmwww | Re: On/off icon mod (22nd Mar 08 at 4:21pm UTC) | | Still seeing the login message. | |
rroll.to— Shorten a link, rickroll your friends. |
|
dog199200 Guest | Re: On/off icon mod (22nd Mar 08 at 5:38pm UTC) | | sorry i got busy and forgot to fix it doing taht right now
edit: done | |
|
Michael Moderator
    
![[Avatar]](http://av.wservices.co.uk/av.png) Recoding the future Posts: 4,043 Status: Offline Gender: Male Location: UK Joined:
Additional Groups: Coding Team
  
pmvForum | Re: On/off icon mod (22nd Mar 08 at 6:44pm UTC) | | Added you cause I was bored!
Also, should work because it works on my test board.
I will look at this later! | |
|
Marc vChat Developer
     I <3 Rossy
Posts: 3,388 Status: Offline Gender: Male Location: Ontario, Canada Age: 33 Joined:
Additional Groups: Coding Team
  
pmwww | Re: On/off icon mod (22nd Mar 08 at 7:23pm UTC) | | Dwight, put Wrighty's code above the Sub-Board Categories code. | |
rroll.to— Shorten a link, rickroll your friends. |
|
Michael Moderator
    
![[Avatar]](http://av.wservices.co.uk/av.png) Recoding the future Posts: 4,043 Status: Offline Gender: Male Location: UK Joined:
Additional Groups: Coding Team
  
pmvForum | Re: On/off icon mod (22nd Mar 08 at 8:06pm UTC) | | sub-board categories code is in the board headers. Mine is global! | |
|