Register Members List Search Today's Posts Mark Forums Read

Reply
 
Mod Options
Multi-Choice background color using Javascript Details »
Multi-Choice background color using Javascript
Mod Version: 1.00, by UKBusinessLive (Designer) UKBusinessLive is offline
Developer Last Online: Feb 2012 I like it Show Printable Version Email this Page

vB Version: 3.8.0 RC 2 Rating: (1 vote - 5.00 average) Installs: 7
Released: 29 Dec 2008 Last Update: 29 Dec 2008 Downloads: 50
Not Supported Template Edits Re-usable Code Translations  

Multi-Choice background color using Javascript

Just a quickie here to give your members a choice of what color to display for the forum Background.

I quickly bought this together as a result of this request here http://www.vbulletin.org/forum/showthread.php?t=200086

Firstly, you need to save this code as a Javascript so copy it to your notepad and save it as "Backcolor.js"


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

then you upload the backcolor.js file to same directory as the Web page on which you will use the script (ideally your Forum Root)

Then enter the code below, between the <body> and </body> tags where you want the select box and button to appear, ideally in the footer or header templates

As an example i saved it to the end of my header template, see the pictures


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

What that will do is give your users a dropdown box with a Change Color button ( for the english spelling please change the above code here <input type="submit" value="Change Color" /> )

i've done this very basic, but you can change the colors in the backcolor.js file just change the case 1, 2 and 3 options with a new hex color #FFFFFF

You need to change the hex values to the colors that you choose for your site, in the javascript file (Hex numbers) and then with the template code (The color names)

You can get a nice selection of hexcolors here http://www.december.com/html/spec/colorsafe.html

This is what you get, Mind you it won't work well on my forum as its fluid, but it'll work well with fixed forums





Remember you can change these colors, I've just done 3 as an example, But you can add as many as you want and with millions of combinations by using a color Hex chart.

Have Fun

Download Now

Only licensed members can download files, Click Here for more information.

Screenshots

Click image for larger version

Name:	page10.png
Views:	29
Size:	147.6 KB
ID:	91377   Click image for larger version

Name:	page11.png
Views:	31
Size:	153.6 KB
ID:	91378   Click image for larger version

Name:	page12.png
Views:	25
Size:	158.3 KB
ID:	91379  

Show Your Support

  • To receive notifications regarding updates -> Click to Mark as Installed.
  • If you like this modification support the author by donating.
  • This modification may not be copied, reproduced or published elsewhere without author's permission.
Comments
  #2  
Old 29 Dec 2008, 16:37
UKBusinessLive UKBusinessLive is offline
 
Join Date: Sep 2008
Real name: Gerry
Reserved
Reply With Quote
  #3  
Old 29 Dec 2008, 23:31
cygy2k cygy2k is offline
 
Join Date: May 2006
Will the color remain on subsequent visits? Is it stored in a cookie or anything? How about some how making it based off a profile field so it stores it in the user table?
__________________
CycloneFanatic.com
Reply With Quote
  #4  
Old 01 Jan 2009, 14:05
Triky's Avatar
Triky Triky is offline
 
Join Date: Mar 2007
Location: [Italy]
Tried, and it works when I click on 'change color'. But when I load another page the new bg color return the default one.
__________________
I'm italian, I am learning english.. so, please, if you see any errors in my grammar or spelling, let me know via PM. Danke!
Reply With Quote
  #5  
Old 01 Jan 2009, 15:50
UKBusinessLive UKBusinessLive is offline
 
Join Date: Sep 2008
Real name: Gerry
There is a way of doing this, i'm just waiting for an email and i'll update the code
Reply With Quote
  #6  
Old 06 Jan 2009, 22:25
Triky's Avatar
Triky Triky is offline
 
Join Date: Mar 2007
Location: [Italy]
Is there any news, UKBusinessLive?
__________________
I'm italian, I am learning english.. so, please, if you see any errors in my grammar or spelling, let me know via PM. Danke!
Reply With Quote
  #7  
Old 11 Jan 2009, 09:06
carntheroos4eva's Avatar
carntheroos4eva carntheroos4eva is offline
 
Join Date: Nov 2008
Real name: Suzi Olsen
Didn't really work on my forum....
Reply With Quote
  #8  
Old 11 Jan 2009, 09:11
UKBusinessLive UKBusinessLive is offline
 
Join Date: Sep 2008
Real name: Gerry
It seems to onllt work on the index page, I need to get a more experianced coder to take a look at the code, bear with me i'm working on this
Reply With Quote
  #9  
Old 27 Jan 2009, 12:57
ViciousCode ViciousCode is offline
 
Join Date: Oct 2008
I would suggest making a profile field

so the user can change the background look, in their profile or in the navbar.
Reply With Quote
  #10  
Old 27 Jan 2009, 17:33
Magnumutz's Avatar
Magnumutz Magnumutz is offline
 
Join Date: Feb 2006
Real name: Alex
I wonder if we could use this to change styles without reloading
__________________

Reply With Quote
  #11  
Old 28 Jan 2009, 23:05
Fungsten Fungsten is offline
 
Join Date: Jul 2006
Originally Posted by Triky View Post
Is there any news, UKBusinessLive?
Same here. VB 3.8.1.

Also I"d like to find out on how to change the "page background".

Last edited by Fungsten; 28 Jan 2009 at 23:24.
Reply With Quote
  #12  
Old 05 May 2009, 21:27
rob01 rob01 is offline
 
Join Date: Sep 2008
Real name: robert
is this stuff still working :S


or there is any other mod for this?.. i remember there was a mod for the colors just like vb.org has
Reply With Quote
  #13  
Old 05 May 2009, 21:57
UKBusinessLive UKBusinessLive is offline
 
Join Date: Sep 2008
Real name: Gerry
Originally Posted by rob01 View Post
is this stuff still working :S


or there is any other mod for this?.. i remember there was a mod for the colors just like vb.org has
here it is rob


http://www.vbulletin.org/forum/showthread.php?t=205755
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Mod Options

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


New To Site? Need Help?

All times are GMT. The time now is 10:12.

Layout Options | Width: Wide Color: