The forum of the forums
Welcome to the Official Support Forum of Forumotion!

To take full advantage of everything offered by our forum, please log in if you are already a member, or join our community if you've not yet.

Create a free forum like this one.

Theme Changer?

View previous topic View next topic Go down

In progress Theme Changer?

Post by JAD2350 on June 30th 2013, 9:26 pm

Hey everyone. 
Can you guys make an update on the theme changer tutorial? The other topic is quite confusing and I don't know if it even works anymore. 
One of you guys should try the tutorial yourself; the attachment doesn't really go along with the tutorial that well. It's not being specific enough.. 

Thanks. Hope someone can help..

New Member

Posts : 3
Reputation : 1
Language : English

Back to top Go down

In progress Re: Theme Changer?

Post by SLGray on June 30th 2013, 11:46 pm

When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.


Male Posts : 37711
Reputation : 2533
Language : English
Location : United States

Back to top Go down

In progress Re: Theme Changer?

Post by JAD2350 on July 1st 2013, 12:01 am

Thank you, but I've tried that one, but it requires the power of the owner/creator. At the moment, I'm only an administrator on the forum. Do you have any other advice?

New Member

Posts : 3
Reputation : 1
Language : English

Back to top Go down

In progress Re: Theme Changer?

Post by Festina Lente on July 1st 2013, 12:14 am

I have this theme changer:

I tested it on IE and Google Chrome and it doesn't work. It works only on Mozilla Firefox and I'm satisfied 'cause Firefox is my default browser.

Festina Lente

Male Posts : 279
Reputation : 20
Language : English

Back to top Go down

In progress Re: Theme Changer?

Post by Derri on July 1st 2013, 12:42 am

Forum Rules: :Forumotion Staff: :Appeal A Warning: :FAQ: :Tips & Tricks: :Forgotten Password/Login Issues
You need one post to send a PM
When your topic has been solved, ensure you mark the topic solved
Never post your email in public


Male Posts : 8489
Reputation : 587
Language : English & Basic French
Location : Scotland, United Kingdom

Back to top Go down

In progress Re: Theme Changer?

Post by Mr.EasyBB on July 4th 2013, 8:58 am


$(function() {
var css = "<style>body {margin-top:50px !important;} select {color: #fff !important; background-color: #000 !important;} option {font-family: verdana; font-size: 10px; color: white;} {color: #fff !important; background-color: #000;} SELECT{ font-family: verdana; font-size: 10px; color: white; </style>",
select = '<div style="position: absolute; width: 150px; height: 15px; z-index: 1; left: 5px; top: 35px" id="skinselector"><form><select id="changeTheme" onchange="changeskin(this.options[this.selectedIndex].value);">',

//ADD THEMES TO THE themes And it will automatically add it. Don't forget to add the if statement like below in the second note.
themes =["Default","Pink","Blue","Gold","Purple","Dark"];

for(var i=0;i<themes.length;i++){
var options = '<option class="sl" value="'+themes[i]+'">'+themes[i]+' Theme</option>';
var head = $('head'),
body = $('body');
body.append('<link rel="stylesheet" id="themeChanger" type="text/css" href="" />');
var themeChanger= document.getElementById('themeChanger');
var scheme = getCookie('template1');
var path = window.location.hostname;
if (scheme == 'Default') {
themeChanger.href= path+"/21-ltr.css";
} else if (scheme == 'Pink') {
} else if (scheme == 'Blue') {
} else if (scheme == 'Gold') {
} else if (scheme == 'Purple') {
} else if (scheme == 'Dark') {
}//whenever adding another theme add another else if statement with the CSS

$('#changeTheme').change(function() {
var themeName = $(this).val();
var themeChanger= $('#themeChanger');
if (themeName == 'Default') {
} else if (themeName == 'Pink') {
} else if (themeName == 'Blue') {
} else if (themeName == 'Gold') {
} else if (themeName == 'Purple') {
} else if (themeName == 'Dark') {
function changeskin(change) {
var scheme = change;
var name = 'template1';
var ExpDate = new Date ();
ExpDate.setTime(ExpDate.getTime() + (180 * 24 * 3600 * 1000));
function getCookie(name){
var cname = name + "=";
var dc = document.cookie;
if (dc.length > 0) {
begin = dc.indexOf(cname);
if (begin != -1) {
begin += cname.length;
end = dc.indexOf(";", begin);
if (end == -1) end = dc.length;
return unescape(dc.substring(begin, end));
return null;
function setCookie(name, value, expires) {
document.cookie = name + "=" + escape(value) +
((expires === null) ? "" : "; expires=" + expires.toGMTString());

The code could probably be written a lot better, this was just something I redesigned for someone, and it was originally a mess. I will look into this more tomorrow and see if I can reredeign this to make it a whole lot better. This will automatically change the theme, and whenever going to another link that is the same domain it will stay the same as I've add the my personal cookie code.


Posts : 69
Reputation : 9

Back to top Go down

View previous topic View next topic Back to top

Permissions in this forum:
You cannot reply to topics in this forum