With a little innovative thinking on my behalf, and LG's masterful scripting. I have finally completed the AWC Theme Changer! Let me first state thank you LG for putting up with my constant PM's about this. Next I am going to show you the code and what you are able to do with it ok. Also this button is select box is placed right before the Reading Button for easy access
You can use any of my Themes which is in another post, located here http://www.avacweb.com/t851-avacweb-chat-themes . You can take any theme you don't want in it out or add some more as I update the themes
EX:
var themes = [ "Original","Mario", "Earth Tone", "Black And White","Red","Green","Pink","Orange","Military","Floral","Dark"];
var themes = [ "Original","Red","Green","Pink","Orange"]; This only has Five themes, which are mainly colors
var themes = [ "Original","Black And White","Red","Green","Military","Dark"]; I'm sure you are catching the idea now...
This code also has a cookie setting so that when you change it remember which theme it is and every time you come back it will be that theme until changed or cookies are deleted!
Well hope everyone likes it for I enjoy every minute of this code on my site.
- Code:
[panda=js]
avacweb_chat_config.add_event('onload', function () {
var themes = [ "Original","Mario", "Earth Tone", "Black And White","Red","Green","Pink","Orange","Military","Floral","Dark"];
var select = '<select id="achat_themes">';
for (var i = 0, l = themes.length; i < l; i++) {
select += '<option value="' + i + '">' + themes[i] + '</option>';
}
$(avacweb_chat.id('achat_reading')).before(select + '</select>');
function set_theme(i) {
var style = themes[ parseInt(i) ];
if(!style) return;
avacweb_chat.id('chatbox_header').getElementsByTagName('link')[0].href = 'http://chat.avacweb.net/themes/' + style.replace(/\s/g, '_').toLowerCase() + '.css';
avacweb_chat.cookie('theme', i, 1);
}
$(avacweb_chat.id('achat_themes')).change(function () {
set_theme( $(this).val() );
});
var theme = avacweb_chat.cookie('theme');
if(theme !== null) set_theme(theme);
});
You can use any of my Themes which is in another post, located here http://www.avacweb.com/t851-avacweb-chat-themes . You can take any theme you don't want in it out or add some more as I update the themes
EX:
var themes = [ "Original","Mario", "Earth Tone", "Black And White","Red","Green","Pink","Orange","Military","Floral","Dark"];
var themes = [ "Original","Red","Green","Pink","Orange"]; This only has Five themes, which are mainly colors
var themes = [ "Original","Black And White","Red","Green","Military","Dark"]; I'm sure you are catching the idea now...
This code also has a cookie setting so that when you change it remember which theme it is and every time you come back it will be that theme until changed or cookies are deleted!
Well hope everyone likes it for I enjoy every minute of this code on my site.