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.

Multitheme code

5 posters

Go down

Multitheme code Empty Multitheme code

Post by intricity September 12th 2010, 9:46 pm

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

Refering to that topic, how exactly am I supposed to copy that image since there is no writen code of it anywhere -.-
avatar
intricity
New Member

Posts : 8
Reputation : 0
Language : Serb

Back to top Go down

Multitheme code Empty Re: Multitheme code

Post by KingOfSports September 12th 2010, 11:07 pm

What image?
KingOfSports
KingOfSports
Hyperactive

Male Posts : 2487
Reputation : 38
Language :
Location :

Back to top Go down

Multitheme code Empty Re: Multitheme code

Post by intricity September 13th 2010, 9:33 pm

avatar
intricity
New Member

Posts : 8
Reputation : 0
Language : Serb

Back to top Go down

Multitheme code Empty Re: Multitheme code

Post by Sanket September 13th 2010, 9:36 pm

Those images i think are there to explain the code given above the images.
Sanket
Sanket
ForumGuru

Male Posts : 48766
Reputation : 2830
Language : English
Location : Mumbai

Back to top Go down

Multitheme code Empty Re: Multitheme code

Post by Adam360 September 13th 2010, 9:44 pm

Sanket wrote:Those images i think are there to explain the code given above the images.

Confirmed!
Adam360
Adam360
Forumember

Male Posts : 866
Reputation : 11
Language : English
Location : England

http://GameBase.betaboard.net

Back to top Go down

Multitheme code Empty Re: Multitheme code

Post by Darren1 September 14th 2010, 6:44 am

Naughty Darren Multitheme code Redface

Here is the Code for the HTML Page
Code:
ar type = getCookie('template1');
var temsel = document.getElementById('temsel');
temsel.innerHTML =' Changer le style 1 YOUR NEW SKIN NAME HERE2 YOUR NEW SKIN NAME HERE 3 YOUR NEW SKIN NAME HERE ';




if (type == 'valeur1')
{
  document.write('');
}
else if (type == 'valeur2')
{
  document.write('');
}
else if (type == 'valeur3')
{
  document.write('');
}


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,'/');
}
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");
}

I'm 90% certain that is the correct code, otherwise Ill have to go re-fetch it from a long lost folder.
Make sure you follow the tut exactly as it says, and if you encounter any problems, were all here to help Wink
Darren1
Darren1
Helper
Helper

Male Posts : 11853
Reputation : 566
Language : English

Back to top Go down

Multitheme code Empty Re: Multitheme code

Post by intricity September 18th 2010, 3:48 pm

Section 2.2 Making the script ours
Reminder: We can only edit section 1 and 2 of the script

This is where the problems start, I'm not really sure what script does the guide talk about, if it's the one you wrote above then I can't locate "<option> Choose your theme </option>" if that's not it then what exactly is it?
avatar
intricity
New Member

Posts : 8
Reputation : 0
Language : Serb

Back to top Go down

Multitheme code Empty Re: Multitheme code

Post by Darren1 September 19th 2010, 3:24 am

Sorry, my mistake, here's the full code, I must of given you the incomplete one ><

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 style </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,'/');
}
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");

That should do it.
Darren1
Darren1
Helper
Helper

Male Posts : 11853
Reputation : 566
Language : English

Back to top Go down

Back to top

- Similar topics

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