Advertise Here

Author Topic: [Code] Drop-Down Skin Chooser  (Read 14496 times)

0 Members and 1 Guest are viewing this topic.

Offline OutOfOrder

  • SMF For Free Sr. Member
  • *
  • Posts: 385
  • Creator of the X-treme Gaming Forums
    • View Profile
    • X-treme Gaming Forums!!!

  • Total Badges: 14
    Badges: (View All)
    Topic Starter Combination Level 3 Level 2 Level 1
Re: [Code] Drop-Down Skin Chooser
« Reply #30 on: October 13, 2008, 06:09:39 am »
Forum Url: http://funcentral.smfforfree2.com
how do we find the url for our skins?

Offline simply sibyl

  • Helpers
  • *
  • Posts: 14347
  • On hiatus
    • View Profile
    • The Tent Dwellers

  • Total Badges: 31
    Badges: (View All)
    Level 6 Poll Voter Webmaster Arcade Highscore Windows User
Re: [Code] Drop-Down Skin Chooser
« Reply #31 on: October 13, 2008, 06:12:34 am »
Forum Url: http://funcentral.smfforfree2.com
how do we find the url for our skins?

Depending on which version of this code you are talking about it tells you that in the directions in the first post

Offline ishybadboy

  • SMF For Free Member
  • *
  • Posts: 46
    • View Profile

  • Total Badges: 10
    Badges: (View All)
    Topic Starter Combination Level 2 Level 1 10 Posts
Re: [Code] Drop-Down Skin Chooser
« Reply #32 on: October 13, 2008, 09:08:22 pm »
This works on MFF, I recently took it off of my Test forums, But It DID work.

You need to make sure you have

Code: [Select]
<script src="/jquery.js"></script>In your Header.


Offline Andrew

  • Helpers
  • *
  • Posts: 2060
  • Andrew at your service
    • View Profile
    • Alabama Weather Prediction

  • Total Badges: 32
    Badges: (View All)
    10 Poll Votes Level 6 Eighth year Anniversary Seventh year Anniversary Sixth year Anniversary
Re: [Code] Drop-Down Skin Chooser
« Reply #33 on: May 29, 2009, 12:05:58 am »
I just noticed this code in the index :P much better then the other one I used.
However, this one isnt working at all for me, here is the code I am using:

This is in the headers:
Code: [Select]
<script>
var n = 0;var Skin = new Array();
Skin[n++] = ["potco (default)","http://www.smfforfree.com/styles/pic/potco.css?fin11"];
Skin[n++] = ["world of warcraft","http://www.smfforfree.com/styles/pic/worldofwarcraft.css?fin11"];
Skin[n++] = ["Halo","http://www.smfforfree.com/styles/pic/halo.css?fin11"];
Skin[n++] = ["pheonix","http://www.smfforfree.com/styles/pic/pheonix.css?fin11"];
Skin[n++] = ["zephiroth","http://www.smfforfree.com/styles/pic/zephiroth.css?fin11"];
Skin[n++] = ["brown blitz","http://www.smfforfree.com/styles/pic/brownblitz.css?fin11"];
Skin[n++] = ["Camo","http://www.smfforfree.com/styles/pic/camo.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>


Offline zaHawk

  • SMF For Free Member
  • *
  • Posts: 72
    • View Profile

  • Total Badges: 23
    Badges: (View All)
    Level 5 Eighth year Anniversary Seventh year Anniversary Sixth year Anniversary Fifth year Anniversary
Re: [Code] Drop-Down Skin Chooser
« Reply #34 on: October 10, 2010, 12:43:29 pm »
Do any of these codes work.. as post is very old.. and sites are shut down ????

I am trying to allow members (or vsitors.. no restrictions).. to choose their own skins
I looked for ages through past posts.. but everything is so old.. or dead.

I can't use this code if its not working... or where can I activate it in the control panel ?

EDIT:
Allow members to select their own themes.
Allow members to select the "Default" theme.

Both are checked.. but nothing shows up???
« Last Edit: October 10, 2010, 03:30:26 pm by zaHawk »
My site - South African Networks
Also has a R500 prize for Gamers  ;)

 

Related Topics

  Subject / Started by Replies Last post
12 Replies
9235 Views
Last post August 14, 2008, 05:00:44 am
by ishybadboy