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.

Multi-theme Changed ( I did not understand the tutorial we have )

View previous topic View next topic Go down

Re: Multi-theme Changed ( I did not understand the tutorial we have )

Post by Anime Creator on October 4th 2010, 10:22 pm

BUMPS

Anime Creator
Forumember

Posts : 337
Reputation : 7
Language : english

http://www.narutoland.net/index.htm

Back to top Go down

Re: Multi-theme Changed ( I did not understand the tutorial we have )

Post by Darren1 on October 5th 2010, 12:49 am

Hi,

What part of the tutorial don't you understand?

Darren1
Helper
Helper

Male Posts : 11853
Reputation : 563
Language : English

Back to top Go down

Re: Multi-theme Changed ( I did not understand the tutorial we have )

Post by Archangel Death God on October 5th 2010, 11:57 pm

@Darren1 wrote:Hi,

What part of the tutorial don't you understand?

He doesn't understand any of it. It says on the original post if he can just get the code.

Archangel Death God
Forumember

Male Posts : 44
Reputation : 0
Language : English

http://narutonation.narutorpg.org

Back to top Go down

Re: Multi-theme Changed ( I did not understand the tutorial we have )

Post by Darren1 on October 6th 2010, 1:15 am

This is the code:

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

tutorial wrote:Lets change the text displayed for the theme.

Code:

    <option> Choose your theme  </option>


Change the text "Choose your theme" to what you'd like.

Now lets add our skins

Stay in section 1 of the coding and locate this

Code:

    <option value="valeur1"> Name of theme - Name of theme creator </option>


This is the name of the theme followed by the creator of the theme, lets change it to our first theme.

Now, lets go and correspond that to our style sheets in section 2

Code:
if (type == 'valeur1')
{
document.write('<link rel="stylesheet" type="text/css" href="URL_OF_YOUR_FORUM/IDNUMBER-ltr.css">');
}


Just change URL_OF_YOUR_FORUM/IDNUMBER-ltr.css" to what you have saved in your note/word pad which would be similar to "http://Your_forum_address/153102-ltr.css"

Do that for each of the 7 skins Smile

Darren1
Helper
Helper

Male Posts : 11853
Reputation : 563
Language : English

Back to top Go down

Re: Multi-theme Changed ( I did not understand the tutorial we have )

Post by Anime Creator on October 6th 2010, 10:51 pm

@Darren1 wrote:This is the code:

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

tutorial wrote:Lets change the text displayed for the theme.

Code:

    <option> Choose your theme  </option>


Change the text "Choose your theme" to what you'd like.

Now lets add our skins

Stay in section 1 of the coding and locate this

Code:

    <option value="valeur1"> Name of theme - Name of theme creator </option>


This is the name of the theme followed by the creator of the theme, lets change it to our first theme.

Now, lets go and correspond that to our style sheets in section 2

Code:
if (type == 'valeur1')
{
document.write('<link rel="stylesheet" type="text/css" href="URL_OF_YOUR_FORUM/IDNUMBER-ltr.css">');
}


Just change URL_OF_YOUR_FORUM/IDNUMBER-ltr.css" to what you have saved in your note/word pad which would be similar to "http://Your_forum_address/153102-ltr.css"

Do that for each of the 7 skins Smile


Shocked were do i add this this is confusing .

Anime Creator
Forumember

Posts : 337
Reputation : 7
Language : english

http://www.narutoland.net/index.htm

Back to top Go down

Re: Multi-theme Changed ( I did not understand the tutorial we have )

Post by Anime Creator on October 8th 2010, 10:39 pm

bump

Anime Creator
Forumember

Posts : 337
Reputation : 7
Language : english

http://www.narutoland.net/index.htm

Back to top Go down

Re: Multi-theme Changed ( I did not understand the tutorial we have )

Post by MrMario on October 9th 2010, 12:26 am

The post tells you. Just need to read...

MrMario
Helper
Helper

Male Posts : 22186
Reputation : 1830
Language : test

http://test.com

Back to top Go down

Re: Multi-theme Changed ( I did not understand the tutorial we have )

Post by Anime Creator on October 9th 2010, 3:23 pm

I read i just don't understand well.

Anime Creator
Forumember

Posts : 337
Reputation : 7
Language : english

http://www.narutoland.net/index.htm

Back to top Go down

Re: Multi-theme Changed ( I did not understand the tutorial we have )

Post by Archangel Death God on October 10th 2010, 7:38 pm

@MrMario wrote:The post tells you. Just need to read...
He just doesn't understand where to put it. Maybe the templates.


Edit: I also don't understand it.

Archangel Death God
Forumember

Male Posts : 44
Reputation : 0
Language : English

http://narutonation.narutorpg.org

Back to top Go down

Re: Multi-theme Changed ( I did not understand the tutorial we have )

Post by Archangel Death God on October 10th 2010, 11:04 pm


Archangel Death God
Forumember

Male Posts : 44
Reputation : 0
Language : English

http://narutonation.narutorpg.org

Back to top Go down

Re: Multi-theme Changed ( I did not understand the tutorial we have )

Post by Anime Creator on October 12th 2010, 1:29 am

Anyone help ^^

Anime Creator
Forumember

Posts : 337
Reputation : 7
Language : english

http://www.narutoland.net/index.htm

Back to top Go down

Re: Multi-theme Changed ( I did not understand the tutorial we have )

Post by Darren1 on October 12th 2010, 1:33 am

For PHPBB2 this tutorial will be better; http://www.webartzforum.com/tutorials-f7/forumotion-theme-changer-t301.htm

What about it do you not understand?
I find them both simple to do, and they both tell you how to do everything in plain, simple English?

Darren1
Helper
Helper

Male Posts : 11853
Reputation : 563
Language : English

Back to top Go down

Re: Multi-theme Changed ( I did not understand the tutorial we have )

Post by Anime Creator on October 14th 2010, 2:16 am

Can you like make a video tutorial or make screen shot of every step ^^

Anime Creator
Forumember

Posts : 337
Reputation : 7
Language : english

http://www.narutoland.net/index.htm

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