Headers or Footers:
<script>
var n = 0;var Skin = new Array();
Skin[n++] = ["Black","http://h1.ripway.com/smcodes/Skins/black.css"];
Skin[n++] = ["Red","http://h1.ripway.com/smcodes/Skins/red.css"];
Skin[n++] = ["Green","http://h1.ripway.com/smcodes/Skins/green.css"];
Skin[n++] = ["NAME","URL"];
//Created by Agent Moose (smcodes.smfforfree3.com)
document.write("<script src='http://209.85.62.24/15/114/0/f82735/DropSkina.js'></scr" + "ipt>");
</script>
Original Request:
http://smcodes.smfforfree3.com/index.php/topic,982.0.htmlThis Skin Chooser is probably something you all wanted, so here you are
Where ever you add this code to, that is where it will show.
There are three Skins avaliable for it right now, and I will not add anymore because it takes up my hosting. So I made it so that you can add your own skins.
NAME = The Name of the skin
URL = The URL of the CSS file for the skin.
To upload your own skin, just follow these steps:
1. Find the Skin you want
2. Copy the CSS and save it in Notepad. Doesn't matter what you name it
3. Find a place to upload that file.
4. Take the URL of that file and place it where it says URL.
To add more skins, add more of these lines:
Skin[n++] = ["NAME","URL"];
Enjoy
EDIT:
Thanks to simply, she figured out how to make the skin chooser not flash everytime the page loads.
A.
Set your forum to the Default Style B.
Find other styles you want to use. Add each of them in Manage Styles.
C.
For each of those stylesheets edit these lines in the code: (add more if you need them, delete those you do not need)
Skin[n++] = ["STYLE NAME","http://www.smfforfree.com/styles/FORUM NAME/STYLE.css?fin11"];
1. Replace "STYLE NAME" with the name of the style
2. Replace "smfforfree.com" with your forum's info
for instance (smfforfree.com, smfforfree2.com, smfforfree3.com, smfforfree4.com, mysmf.com, freesmfhosting.com)
3. Replace "FORUM NAME" with the name of your forum.
4. Replace "STYLE" with the name of the stylesheet.
(the name you named the style when you created it in manage styles)
Do this for each one you want to use.
D. When done with the edits the code goes in your
Header and will center the dropdown box at the top of your forum.
<script>
var n = 0;var Skin = new Array();
Skin[n++] = ["STYLE NAME","http://www.smfforfree.com/styles/FORUM NAME/STYLE.css?fin11"];
Skin[n++] = ["STYLE NAME","http://www.smfforfree.com/styles/FORUM NAME/STYLE.css?fin11"];
Skin[n++] = ["STYLE NAME","http://www.smfforfree.com/styles/FORUM NAME/STYLE.css?fin11"];
Skin[n++] = ["STYLE NAME","http://www.smfforfree.com/styles/FORUM NAME/STYLE.css?fin11"];
//Created by Agent Moose (smcodes.smfforfree3.com)
document.write("<center><select id='SkinChooser'><option value='default'>Choose Style</option>");
for(i=0;i<Skin.length;i++){
document.write("<option value='" + Skin[i][1] + "'>" + Skin[i][0] + "</option>");
};
document.write("</select> <input type='button' value='Change' onclick='setSkin();' /></center>");
function setCookie(name, value, expires){
var deCookie = name + "=" + escape(value);
if(expires){
expires= expires.toGMTString();
deCookie += "; expires=";
deCookie += expires;
};
document.cookie = deCookie;
};
function getCookie(name){
var dc = document.cookie;
var prefix = name + "=";
var begin = dc.indexOf("; " + prefix);
if (begin == -1){
begin = dc.indexOf(prefix);
if (begin != 0) return false;
}else begin += 2;
var end = document.cookie.indexOf(";", begin);
if (end == -1)
end = dc.length;
return unescape(dc.substring(begin + prefix.length, end));
};
function delCookie(name){
expires = new Date(1807,1,1);
expires = expires.toGMTString();
deCookie = name;
deCookie += "=delete; expires=";
deCookie += expires;
document.cookie = deCookie;
};
function changeSkin(Agent){
document.write("<link rel='stylesheet' type='text/css' href='" + Agent + "' />");
};
var Omi = "default";
document.getElementById("SkinChooser").onchange = function(){
if(Skin[parseInt(document.getElementById("SkinChooser").selectedIndex)-1]){
Omi = Skin[parseInt(document.getElementById("SkinChooser").selectedIndex)-1][1]
}else{
Omi = "default";
};};
function setSkin(){
if(Omi == "default") delCookie("Skin");
if(Omi != "default") setCookie("Skin",Omi,new Date(9999,1,1));
window.location.reload();
};
changeSkin(getCookie("Skin"));
</script>