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.

Forum Color Changer

2 posters

Go down

Forum Color Changer Empty Forum Color Changer

Post by CPInsider March 8th 2012, 3:52 am

I've been trying to make my forum have a cool color changer. So I could change the color once you click on it for the hole time, they are on the site. I have tried multiple guides. They told me to put them in HTML Pages and so I did, and I didn't want to wreck the code.

Here is one code:

Code:
This is the multi theme script. Remember to read the remainder of the post before you jump ahead.

//STAR Skin Selector by Bourne (montatuforo.net) and  3mOtrOnik (toxigeek.com)
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">Black</option><option class="sl" value="Purple"> Purple</option><option class="sl" value="Yellow"> Yellow </option></select></form></div>');
var scheme = getCookie('template1');
if (scheme == 'Defaul') {
document.write('<LINK REL="stylesheet" TYPE="text/css" HREF="http://allaroundinsiders.forummotion.com/ 129351-ltr.css">');
} else if (scheme == 'Black') {
document.write('<LINK REL="stylesheet" TYPE="text/css" HREF="http://allaroundinsiders.forummotion.com/ 129346-ltr.css">');
} else if (scheme == 'Purple') {
document.write('<LINK REL="stylesheet" TYPE="text/css" HREF="http://allaroundinsiders.forummotion.com/ 129347-ltr.css">');
} else if (scheme == 'Yellow') {
document.write('<LINK REL="stylesheet" TYPE="text/css" HREF="http://allaroundinsiders.forummotion.com/ 129349-ltr.css">');
} else if (scheme == 'Yellow') {
document.write('<LINK REL="stylesheet" TYPE="text/css" HREF="http://allaroundinsiders.forummotion.com/ 129350-ltr.css">');
} else if (scheme == 'Yellow') {
document.write('<LINK REL="stylesheet" TYPE="text/css" HREF="http://allaroundinsiders.forummotion.com/ 129345-ltr.css">');
} else if (scheme == 'Yellow') {
document.write('<LINK REL="stylesheet" TYPE="text/css" HREF="http://allaroundinsiders.forummotion.com/ 129348-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");
}

And her is the other:

Code:
<a href="http://google.com" onmouseover="document.bgColor='#FFFFFF'"<img src="http://s818.photobucket.com/albums/zz106/johnsterivCPI/?action=view&current=Daphie.png" />

<a href="http://google.com" onmouseover="document.bgColor='#00FFFF'"<img src="http://s818.photobucket.com/albums/zz106/johnsterivCPI/?action=view&current=Daphie.png" />

<a href="http://google.com" onmouseover="document.bgColor='#FFFF00'"<img src="http://s818.photobucket.com/albums/zz106/johnsterivCPI/?action=view&current=Daphie.png" />

<a href="http://google.com" onmouseover="document.bgColor='#2B60DE'"<img src="http://s818.photobucket.com/albums/zz106/johnsterivCPI/?action=view&current=Daphie.png" />

I found the guides from this forum site.

Thanks for any help.
avatar
CPInsider
Forumember

Male Posts : 190
Reputation : 0
Language : English

http://allaroundinsiders.forummotion.com

Back to top Go down

Forum Color Changer Empty Re: Forum Color Changer

Post by SLGray March 8th 2012, 3:54 am

What exactly are you having trouble with?


Forum Color Changer Slgray10

When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.
SLGray
SLGray
Administrator
Administrator

Male Posts : 51482
Reputation : 3519
Language : English
Location : United States

https://forumsclub.com/gc/128-link-directory/

Back to top Go down

Forum Color Changer Empty Re: Forum Color Changer

Post by CPInsider March 8th 2012, 11:45 pm

I did all the stuff that it said to do, but it doesn't work. I was thinking it had something to do with the CSS Stylesheet. I never put anything in there.
avatar
CPInsider
Forumember

Male Posts : 190
Reputation : 0
Language : English

http://allaroundinsiders.forummotion.com

Back to top Go down

Forum Color Changer Empty Re: Forum Color Changer

Post by SLGray March 9th 2012, 1:59 am

With the first code, did you add a code that connects to the HTML page in your site decription?


Forum Color Changer Slgray10

When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.
SLGray
SLGray
Administrator
Administrator

Male Posts : 51482
Reputation : 3519
Language : English
Location : United States

https://forumsclub.com/gc/128-link-directory/

Back to top Go down

Back to top

- Similar topics

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