vForums Support Banner



 

Welcome Guest! Please Login or Register
vForums Support :: Programming & Coding :: Code Requests & Support :: [F] On/off icon mod - View Topic (Page 1 of 2)Page: 1 2
Topic Rating: *****
Printable View
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)
{Smile} 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. {Smile}
Michael
Moderator
*****

[Avatar]
Recoding the future

Posts: 4,043
Status: Offline
Gender: Male
Location: UK
Joined:  

Additional Groups:
Coding Team
***


Reputation: 58%  


pmtwittervForum
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? {Unsure}
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]
Recoding the future

Posts: 4,043
Status: Offline
Gender: Male
Location: UK
Joined:  

Additional Groups:
Coding Team
***


Reputation: 58%  


pmtwittervForum
Re: On/off icon mod (21st Mar 08 at 10:18pm UTC)
Well this is a code and a half! {Tongue Out}

<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! {Smile}

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! {Smile}

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
***


Reputation: 40%  


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
***


Reputation: 40%  


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. {Wink}

rroll.to— Shorten a link, rickroll your friends.
Michael
Moderator
*****

[Avatar]
Recoding the future

Posts: 4,043
Status: Offline
Gender: Male
Location: UK
Joined:  

Additional Groups:
Coding Team
***


Reputation: 58%  


pmtwittervForum
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! {Smile}
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 {Smile}


@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
***


Reputation: 40%  


pmwww
Re: On/off icon mod (22nd Mar 08 at 4:21pm UTC)
Still seeing the login message. {Unsure}

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]
Recoding the future

Posts: 4,043
Status: Offline
Gender: Male
Location: UK
Joined:  

Additional Groups:
Coding Team
***


Reputation: 58%  


pmtwittervForum
Re: On/off icon mod (22nd Mar 08 at 6:44pm UTC)
Added you cause I was bored! {Tongue Out}

Also, should work because it works on my test board.

I will look at this later! {Smile}
Marc
vChat Developer
*****
I <3 Rossy

Posts: 3,388
Status: Offline
Gender: Male
Location: Ontario, Canada
Age: 33
Joined:  

Additional Groups:
Coding Team
***


Reputation: 40%  


pmwww
Re: On/off icon mod (22nd Mar 08 at 7:23pm UTC)
Dwight, put Wrighty's code above the Sub-Board Categories code. {Wink}

rroll.to— Shorten a link, rickroll your friends.
Michael
Moderator
*****

[Avatar]
Recoding the future

Posts: 4,043
Status: Offline
Gender: Male
Location: UK
Joined:  

Additional Groups:
Coding Team
***


Reputation: 58%  


pmtwittervForum
Re: On/off icon mod (22nd Mar 08 at 8:06pm UTC)
sub-board categories code is in the board headers. Mine is global!
 Printable View
Page: 1 2

All times are GMT+0 :: The current time is 12:40pm
Page generated in 0.9795 seconds
This Forum is Powered By vForums (v2.4)
Create a Forum for Free | Find Forums