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-themes

Page 2 of 2 Previous  1, 2

View previous topic View next topic Go down

Multi-themes

Post by MasterOfKings on January 29th 2011, 11:31 am

First topic message reminder :

Hey all,

I know about the tutorial by Darren here. I went through it, I didn't bother with the CSS bit because I was just trying to get it to work first of all. But I can't find the selector. I chose only 2 themes instead of three, but how do you change the theme? I can't find it.

I'm using Invision.

-MoK

EDIT: Could it have something to do with the fact that in my Site Description, the quotes (") aren't there? When I choose Save they disappear.

MasterOfKings
Forumember

Male Posts : 89
Reputation : 20
Language : English

Back to top Go down


Re: Multi-themes

Post by TR1 on May 29th 2011, 11:23 pm

I recently have been trying to get this function to work for my forum as well, and I seem to be stuck on the custom CSS part of it. I read this entire thread along with Darren1's tut, but I can't seem to get it to work. I think it has to be the way that I am trying to reference the CSS code in the HTML. I also find a site that recommend making an HTML doc that references the CSS code, but I am not that proficient in HTML and need a little guidance to try that. Below is my HTML code and the site that I am talking about.

Could the problem be that I am also only trying to use two different themes instead of the four set up here? I got the drop down box on my forum to appear, but it just doesn't change themes.

HTML Suggestion

Code:
document.write('<style>body {margin-top:50px !important;} select {color: #fff !important; background-color: #000 !important;}  option {font-family: verdana; font-size: 10px; color: white;} option.sl {color: #fff !important; background-color: #000;} SELECT{ font-family: verdana; font-size: 10px; color: white; </style>');
document.write('<div style="position: absolute; width: 150px; height: 38px; z-index: 1; left: 5px; top: 10px" id="skinselector"><form><select onchange="changeskin(this.options[this.selectedIndex].value); window.location.reload();"><option class="sl"> Change the Skin </option><option class="sl" value="Defaul"> Default </option><option class="sl" value="Black"> CUSTOM THEME 1</option><option class="sl" value="Purple"> CUSTOM THEME 2</option><option class="sl" value="Yellow"> CUSTOM THEME 3 </option></select></form></div>');
var scheme = getCookie('template1');
if (scheme == 'Defaul') {
document.write('<LINK REL="stylesheet" TYPE="text/css" HREF="(DEFAULT THEME)http://www.filedropper.com/ibbthemedefault">');
} else if (scheme == 'Black') {
document.write('<LINK REL="stylesheet" TYPE="text/css" HREF="(CUSTOM THEME 1)http://www.filedropper.com/ibbthemeblue">');
} else if (scheme == 'Purple') {
document.write('<LINK REL="stylesheet" TYPE="text/css" HREF="(CUSTOM THEME 2)http://testorial.forumotion.com/168970-ltr.css">');
} else if (scheme == 'Yellow') {
document.write('<LINK REL="stylesheet" TYPE="text/css" HREF="(CUSTOM THEME 3)http://testorial.forumotion.com/168975-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");
}

TR1
Forumember

Posts : 31
Reputation : 0
Language : English

http://internetbatman.forumotion.com/

Back to top Go down

Re: Multi-themes

Post by TR1 on May 31st 2011, 2:19 am

Bump of Great Desperation and Shame.

TR1
Forumember

Posts : 31
Reputation : 0
Language : English

http://internetbatman.forumotion.com/

Back to top Go down

Re: Multi-themes

Post by Diana on May 31st 2011, 9:19 am

Do the buttons/images of different themes come over aswell? Cause that's where I had my problem and I had to call the thing off cause someone told me to change the code by myself. Wow, men are so helpful and they stick together so wonderfully. I, a woman, feel so helped! Men are gods

Diana
Active Poster

Female Posts : 1286
Reputation : 21
Language : English

Back to top Go down

Re: Multi-themes

Post by TR1 on June 2nd 2011, 4:49 am

rhe wrote:Do the buttons/images of different themes come over aswell? Cause that's where I had my problem and I had to call the thing off cause someone told me to change the code by myself. Wow, men are so helpful and they stick together so wonderfully. I, a woman, feel so helped! Men are gods

I don't think you can reference that multiple images like that in the CSS. The other images are all tied to base code so I don't think that works. Only thing that I think you can change is the NavBar icons, banner, background, and colors. Also anything measurement in the CSS as well.

I am still stuck on this btw.

TR1
Forumember

Posts : 31
Reputation : 0
Language : English

http://internetbatman.forumotion.com/

Back to top Go down

Re: Multi-themes

Post by TR1 on June 5th 2011, 1:01 am

I don't mean to bump again, but I solved my own question and I want to make a post here for future reference if anyone needs this help as well.

Darren1 suggested using http://www.filedropper.com/ for hosting CSS files. This website does not work for this. It doesn't provide direct link for the download, but does give a HTML link. The problem is that your upload will be taken down after a few days if you do not buy an account. If you host your CSS there and use it, I think your page will generate errors because the file will be taken off the servers.

Instead, I found success using http://www.dropbox.com/. It gives you a free two GB of online storage, you can change your documents whenever on your computer without constantly having to re-upload them (making trial and error far easier), and it literally provides a direct link to your CSS.

Here is my forum if you want to see for yourself. I am still working out some of my CSS btw mwii . http://internetbatman.forumotion.com/

If you need help on the HTML, Dropbox, or CSS let me know. I know Darren1 isn't around and active, and I may not be as skilled with this as him, but I am free to help if anyone needs it.

TR1
Forumember

Posts : 31
Reputation : 0
Language : English

http://internetbatman.forumotion.com/

Back to top Go down

Page 2 of 2 Previous  1, 2

View previous topic View next topic Back to top


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