The forum of the forums
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Multi Skins, where do I add the ID?

2 posters

Go down

Multi Skins, where do I add the ID? Empty Multi Skins, where do I add the ID?

Post by MyPwny December 11th 2010, 4:42 am

I followed this:
https://help.forumotion.com/tricks-tips-f32/add-multi-themes-to-your-forum-by-darren-t71484.htm

I have the ID's of the skins I want from hitskin.

I replaced:
Code:
var type = getCookie('template1');
var temsel = document.getElementById('temsel');
temsel.innerHTML ='<select onchange="changeskin(this.options[this.selectedIndex].value);window.location.reload();"><option> Changer le thème </option><option value="valeur1"> Kagamine - Kingyo.Akki </option><option value="valeur2"> School Time - Quierra </option><option value="valeur3"> Web 2.2 rose - Capucine </option></select>';




if (type == 'valeur1')
{
document.write('<link rel="stylesheet" type="text/css" href="http://themeselect.forumactif.com/143387-ltr.css">');
}
else if (type == 'valeur2')
{
document.write('<link rel="stylesheet" type="text/css" href="http://themeselect.forumactif.com/143694-ltr.css">');
}
else if (type == 'valeur3')
{
document.write('<link rel="stylesheet" type="text/css" href="http://themeselect.forumactif.com/131817-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");
}

With:
Code:
var type = getCookie('template1');
var temsel = document.getElementById('temsel');
temsel.innerHTML ='<select onchange="changeskin(this.options[this.selectedIndex].value);window.location.reload();"><option> Changer le thème </option><option value="valeur1"> Kagamine - Kingyo.Akki </option><option value="valeur2"> School Time - Quierra </option><option value="valeur3"> Web 2.2 rose - Capucine </option></select>';




if (type == 'valeur1')
{
document.write('<link rel="stylesheet" type="text/css" href="http://www.eliteguild.team-talk.net/104992-ltr.css">');
}
else if (type == 'valeur2')
{
document.write('<link rel="stylesheet" type="text/css" href="http://www.eliteguild.team-talk.net/163929-ltr.css">');
}
else if (type == 'valeur3')
{
document.write('<link rel="stylesheet" type="text/css" href="http://www.eliteguild.team-talk.net/149489-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");

Then, I made a new widget and used that for the HTML code and named the widget Change Skin. The tutorial was confusing :S Doesn't say where to put the ID I just guessed. Do I add it into a widget or CSS stylesheet? And where does the ID for the skin go in the original code (assuming I placed it into the wrong place).
avatar
MyPwny
New Member

Posts : 13
Reputation : 0
Language : English

Back to top Go down

Multi Skins, where do I add the ID? Empty Re: Multi Skins, where do I add the ID?

Post by MyPwny December 11th 2010, 8:37 pm

Bump, can anyone help? :S
avatar
MyPwny
New Member

Posts : 13
Reputation : 0
Language : English

Back to top Go down

Multi Skins, where do I add the ID? Empty Re: Multi Skins, where do I add the ID?

Post by omganotherforum December 11th 2010, 10:43 pm

I made a similar thread a few days ago, I hope either of our threads is answered soon.

https://help.forumotion.com/script-code-problems-f43/multi-skin-drop-down-for-phpbb2-t82333.htm

Good luck, and Happy Holidays.
omganotherforum
omganotherforum
Forumember

Posts : 99
Reputation : 0
Language : english
Location : Milwaukee Wi.

Back to top Go down

Multi Skins, where do I add the ID? Empty Re: Multi Skins, where do I add the ID?

Post by MyPwny December 13th 2010, 12:04 am

Omg can anyone help me -.-?
avatar
MyPwny
New Member

Posts : 13
Reputation : 0
Language : English

Back to top Go down

Back to top

- Similar topics

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