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

This modification is in the archives.
vB Version: 3.7.4 Rating: (1 vote - 5.00 average) Installs: 4
Released: 29 Dec 2008 Last Update: 29 Dec 2008 Downloads: 12
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:	12
Size:	147.6 KB
ID:	91380   Click image for larger version

Name:	page11.png
Views:	9
Size:	153.6 KB
ID:	91381   Click image for larger version

Name:	page12.png
Views:	9
Size:	158.3 KB
ID:	91382  

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.
Similar Mod
Mod Developer Type Replies Last Post
End-User Options Multi-Choice background color using Javascript UKBusinessLive vBulletin 3.8 Template Modifications 12 05 May 2009 21:57

Comments
  #2  
Old 29 Dec 2008, 16:36
UKBusinessLive UKBusinessLive is offline
 
Join Date: Sep 2008
Real name: Gerry
Reserved
Reply With Quote
  #3  
Old 29 Dec 2008, 17:33
Triky's Avatar
Triky Triky is offline
 
Join Date: Mar 2007
Location: [Italy]
Thank you a lot. Using this, they (my users) will be able to change the page background color. But what about when they load another page? Does the effect will remain or does it will disappear?
__________________
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
  #4  
Old 29 Dec 2008, 17:36
UKBusinessLive UKBusinessLive is offline
 
Join Date: Sep 2008
Real name: Gerry
Originally Posted by Triky View Post
Thank you a lot. Using this, they (my users) will be able to change the page background color. But what about when they load another page? Does the effect will remain or does it will disappear?
Should still stay, it saves it for as long as they are logged in or their cookie session valid

Try it yourself and see
Reply With Quote
  #5  
Old 30 Dec 2008, 08:34
Triky's Avatar
Triky Triky is offline
 
Join Date: Mar 2007
Location: [Italy]
No, it works when I submit the option, but when I load another page it disappear..
Is ther no way to save it permanently (until user change it again) in the vBulletin database?
__________________
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
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 12:18.

Layout Options | Width: Wide Color: