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 not working

View previous topic View next topic Go down

Theme Changer not working

Post by Papier on July 21st 2011, 6:42 am

I just used Typlo's tutorial on theme changer here: http://help.forumotion.com/t71484-add-multi-themes-to-your-forum

It seemed to all make sense, and this was the code I put in for my html page:
Code:
This is the multi theme script. Remember to read the remainder of the post before you jump ahead.

//STAR Skin Selector by Bourne (montatuforo.net) and  3mOtrOnik (toxigeek.com)
document.write('<style>body {margin-top:50px !important;} select {color: #fff !important; background-color: #000 !important;}  option {font-family: verdana; font-size: 10px; color: white;} option.sl {color: #fff !important; background-color: #000;} SELECT{ font-family: verdana; font-size: 10px; color: white; </style>');
document.write('<div style="position: absolute; width: 150px; height: 38px; z-index: 1; left: 5px; top: 10px" id="skinselector"><form><select onchange="changeskin(this.options[this.selectedIndex].value); window.location.reload();"><option class="sl"> Change the Skin </option><option class="sl" value="Defaul"> Airplane </option><option class="sl" value="Black"> Gaming</option><option class="sl" value="Purple"> Summer</option><option class="sl" value="Yellow"> Christmas </option></select></form></div>');
var scheme = getCookie('template1');
if (scheme == 'Defaul') {
document.write('<LINK REL="stylesheet" TYPE="text/css" HREF="http://paperpen.forummotion.com/166393-ltr.css">');
} else if (scheme == 'Black') {
document.write('<LINK REL="stylesheet" TYPE="text/css" HREF="http://paperpen.forummotion.com/100111-ltr.css">');
} else if (scheme == 'Purple') {
document.write('<LINK REL="stylesheet" TYPE="text/css" HREF="http://paperpen.forummotion.com/141564-ltr.css">');
} else if (scheme == 'Yellow') {
document.write('<LINK REL="stylesheet" TYPE="text/css" HREF="http://paperpen.forummotion.com/147019-ltr.css">');;
}

function changeskin(change) {
var scheme = change;
var name = 'template1';
var pathname = location.pathname;
var myDomain = pathname.substring(0,pathname.lastIndexOf('/')) +'/';
var ExpDate = new Date ();
ExpDate.setTime(ExpDate.getTime() + (180 * 24 * 3600 * 1000));
setCookie(name,scheme,ExpDate,myDomain);
}
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, path, domain, secure) {
document·cookie = name + "=" + escape(value) +
((expires == null) ? "" : "; expires=" + expires.toGMTString()) +
((path == null) ? "" : "; path=" + path) +
((domain == null) ? "" : "; domain=" + domain) +
((secure == null) ? "" : "; secure");
}
//END Skin Selector by Bourne (montatuforo.net) and  3mOtrOnik (toxigeek.com)





Posted on the English Support Forum for ForuMotion (help.forumotion.com) by Darren1/

I also put the script in for the forum description area.

However, on saving, nothing has changed in my forum. Where is this theme changer supposed to appear? What does it look like? As of now, I can't see any new options anywhere.

Thanks in advance for your help!

Papier
New Member

Female Posts : 7
Reputation : 0
Language : English

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