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.

Issue With Adding a Skin Selector to My Forum

View previous topic View next topic Go down

Solved Issue With Adding a Skin Selector to My Forum

Post by SLGray on August 28th 2011, 5:39 am

Spoiler:
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"> Default </option><option class="sl" value="Black"> CUSTOM THEME 1</option><option class="sl" value="Purple"> CUSTOM THEME 2</option><option class="sl" value="Yellow"> CUSTOM THEME 3 </option></select></form></div>');
var scheme = getCookie('template1');
if (scheme == 'Defaul') {
document.write('<LINK REL="stylesheet" TYPE="text/css" HREF="http://ztwds.forumotion.com/129351-ltr.css">');
} else if (scheme == 'Black') {
document.write('<LINK REL="stylesheet" TYPE="text/css" HREF="http://ztwds.forumotion.com/152229-ltr.css">');
} else if (scheme == 'Purple') {
document.write('<LINK REL="stylesheet" TYPE="text/css" HREF="http://ztwds.forumotion.com/156875-ltr.css">');
} else if (scheme == 'Yellow') {
document.write('<LINK REL="stylesheet" TYPE="text/css" HREF="http://ztwds.forumotion.com/142825-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 am using the above code that I fixed for my fourm. I used this tutorial: http://help.forumotion.com/t71484-add-multi-themes-to-your-forum . I add this to my site description: <script type=text/javascript src=http://ztwds.forumotion.com/h1-theme-changer></script> . When I preview the html page, there is a drop down selector and under it, it looks like the code that I fixed for the page. The skin selector is not appearing on my forum. My forum version is Invision.

Added Info:
I noticed also that after a page loads in IE that it says: Done with errors on page. After I added that code, it caused a space between my banner and navigation bar which was not there before.


Last edited by slg on August 29th 2011, 8:34 am; edited 1 time in total

SLGray
Administrator
Administrator

Male Posts : 35670
Reputation : 2375
Language : English
Location : United States

http://fmthemes.forumotion.com/

Back to top Go down

Solved Re: Issue With Adding a Skin Selector to My Forum

Post by SLGray on August 29th 2011, 8:33 am

Sorry for always starting a topic then replying that I solved it. But again I found a solution to my problem. I believe the code ,the one has an attachment, that is in the tutorial is not correct. I located the original code by the the original creators. The attachment code has some misspelled words and some code errors. So I fixed the code I had by looking at the original code.

Solved.

SLGray
Administrator
Administrator

Male Posts : 35670
Reputation : 2375
Language : English
Location : United States

http://fmthemes.forumotion.com/

Back to top Go down

Solved Re: Issue With Adding a Skin Selector to My Forum

Post by MrMario on August 29th 2011, 6:50 pm

Solved => Locked

MrMario
Helper
Helper

Male Posts : 22186
Reputation : 1830
Language : test

http://test.com

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