Go Back   vb.org Archive > vBulletin Modifications > vBulletin 3.8 Modifications > vBulletin 3.8 Template Modifications
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
UKBL ~ Choose Multiple Forum Colors - like VB.Org Details »»
UKBL ~ Choose Multiple Forum Colors - like VB.Org
Version: 1.00, by UKBusinessLive UKBusinessLive is offline
Developer Last Online: Feb 2012 Show Printable Version Email this Page

Category: End-User Options - Version: 3.8.1 Rating:
Released: 02-17-2009 Last Update: Never Installs: 65
Template Edits
Re-useable Code Translations  
No support by the author.

UKBL ~ Choose Multiple Forum Colors - like VB.Org


With recent requests to do something similar to VB.org without all the complications of seperate CCS scripts and pages, Now you'll be able to change your forums color, Just like VB.org This hack will show you how to make and customise your own forum styles - Great Fun




PLEASE NOTE, The demo Screenshots are not the Colors you will be getting They are just quick examples i made to show different colors. The Colours are custom made by you when you Edit the CSS in your Styles template folder

Lets get Started

First you will need to decide how many colors you want, For example we'll chose just 4, but you can have as many or as little as you want.

Then decide which forum style you want to use to offer your color changes, I've used just the VB default style for this example.

So here we go..........

1. Go to your Admin CP and select Style Manager

2. Click the Link at the bottom - Add New Style

3. Parent Style - Select the Style that you want to offer Color Changes on, Normally this would be your chosen default style, and name it Default - Green Allow User selection - Yes Display order - 20 Then Save

4. You will see that you've created a copy of your default style called default green. Now we'll need to play with our Colors

5. On your defalt Green style click on All Style Options and GO, scroll down untill you come to the Body CSS

Then basically you need to work your way down this changing Background Colors, font colors etc,, If you click on one of the colored squares you will bring up a selector of colors which can let you chose the color you want without having to know Hex color numbers.

Trust me, I've not done this before and already within minutes i was making different forum styles, It really is that simple, The key word here is experiment You'll love it

To see your changes save and then click on the Forum Home Page link at the top right of your screen.

So basically thats what we need to do to make our different color Styles, Do a new Default Style for each color you want.

Color Squares

Next we'll need our color Squares









Just make your own in the color which best represents your Style and save to your forums /images/misc folder To fit nicely in the bottom navbar, I made mine 13 x 13 pixels and made them in paint.net, You can use photoshop or even windows paint

Half way there

Now comes the Fun Part

We need to Make our Color Squares Clickable so for that we'll have to edit a bit of code.

Open Notepad or a similar Text editor and add the following Code

Code:
<a href="link.com"><img src="picture.jpg"></a>
Now we will need to add our url of our style to the Front of that code like this

Code:
<a href="http://www.ukbusinesslive.co.uk/forum/index.php?styleid=5"><img src="picture.jpg"></a>
You can find out which Style id you need in the Style Manager in your AdminCP, Next we add the url of our color square.

If you already havn't done so, Upload your Color squares to your forums image/misc folder and use the full url to link to that in the code, so now our code will be like this

Code:
<a href="http://www.ukbusinesslive.co.uk/forum/index.php?styleid=5"><img src="http://www.ukbusinesslive.co.uk/forum/images/misc/green.png"></a>
Then we add a spacer Code to the end of our coded like this &nbsp;


Code:
<a href="http://www.ukbusinesslive.co.uk/forum/index.php?styleid=5"><img src="http://www.ukbusinesslive.co.uk/forum/images/misc/green.png"></a> &nbsp;
Thats it, Then you do that with all the colors and save them one after the other, so you end up with one long line of code

Code:
   <a href="http://www.ukbusinesslive.co.uk/forum/index.php?styleid=5"><img src="http://www.ukbusinesslive.co.uk/forum/images/misc/green.png"></a>&nbsp; <a href="http://www.ukbusinesslive.co.uk/forum/index.php?styleid=6"><img src="http://www.ukbusinesslive.co.uk/forum/images/misc/red.png"></a>&nbsp;  <a href="http://www.ukbusinesslive.co.uk/forum/index.php?styleid=7"><img src="http://www.ukbusinesslive.co.uk/forum/images/misc/blue.png"></a>&nbsp;
Thats the code done, Now to add a few words to the Front of it

Code:
 Choose Your Color &nbsp;  <a href="http://www.ukbusinesslive.co.uk/forum/index.php?styleid=5"><img src="http://www.ukbusinesslive.co.uk/forum/images/misc/green.png"></a> &nbsp; <a href="http://www.ukbusinesslive.co.uk/forum/index.php?styleid=6"><img src="http://www.ukbusinesslive.co.uk/forum/images/misc/red.png"></a>&nbsp;  <a href="http://www.ukbusinesslive.co.uk/forum/index.php?styleid=7"><img src="http://www.ukbusinesslive.co.uk/forum/images/misc/blue.png"></a>&nbsp;
Remember to add a unedited Link back to your normal Style so members can keep using the original, You can use a white color square for this.

and thats it :up: save your work

Next we'll need to upload the code to our footer template of our Parent Style

Go to Default (Parent) style in the Admin CP and select All style Options > Edit Templates > Footer
and then find

Code:
<strong>
and below it add your code, Then save.

You'll see that it will copy to all the child styles automatically

You should get something along the lines of this









Thats all folks

Please Click Install and i'll support 100%

Download Now

File Type: zip color.zip (227.9 KB, 601 views)

Screenshots

File Type: png choser.png (48.9 KB, 0 views)
File Type: png bluepage.png (50.8 KB, 0 views)
File Type: png orangepage.png (50.8 KB, 0 views)
File Type: png redpage.png (50.4 KB, 0 views)
File Type: png greenpage.png (51.0 KB, 0 views)

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #12  
Old 02-18-2009, 12:36 PM
UKBusinessLive UKBusinessLive is offline
 
Join Date: Sep 2008
Location: Essex, United Kingdom
Posts: 1,637
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Shazz View Post
This looks really ugly but its real nice
Ha ha, Please don't go by the colors, i just did them as an example

I guess when admins change their own colors they'll do it with a bit more care and attention, God forbid anyone having a forum with those colors :erm:

Reply With Quote
  #13  
Old 02-18-2009, 01:46 PM
ry215 ry215 is offline
 
Join Date: Apr 2006
Location: Paraguay
Posts: 508
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by UKBusinessLive View Post
lol It changes forum colours like VB.org






You MUST add some new fields to Database, and use PHP Codes for this, not only edit template

Only use Main CSS and StyleID for all colors.
Reply With Quote
  #14  
Old 02-18-2009, 01:56 PM
UKBusinessLive UKBusinessLive is offline
 
Join Date: Sep 2008
Location: Essex, United Kingdom
Posts: 1,637
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by ry215 View Post





You MUST add some new fields to Database, and use PHP Codes for this, not only edit template

Only use Main CSS and StyleID for all colors.
Well i'm not just going to copy someone elses code??

Plus this is a quite and simple way for people not advanced in coding and databases, to have a similar function to their site, If i wanted to copy VB.orgs code i'd copy the source code, but thats not the idea.

My Heading states "Choose Multiple Forum Colors - like VB.Org"

Notice it says "Like" Not spitting image or a copy.

also "With recent requests to do something similar to VB.org without all the complications of seperate CCS scripts and pages"

i'm sorry if its not met your expectations :erm:
Reply With Quote
  #15  
Old 02-18-2009, 02:06 PM
macc's Avatar
macc macc is offline
 
Join Date: Feb 2008
Posts: 647
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Your code works also fine (on my site) !

here i had read that many asked and requested about this code or hack ...but never get help from here -mean vbulletin org.

Thanks again UKbusinesslive - nice mod and nice help!

regards

macc
Reply With Quote
  #16  
Old 02-18-2009, 02:12 PM
UKBusinessLive UKBusinessLive is offline
 
Join Date: Sep 2008
Location: Essex, United Kingdom
Posts: 1,637
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by macc View Post
Your code works also fine (on my site) !

here i had read that many asked and requested about this code or hack ...but never get help from here -mean vbulletin org.

Thanks again UKbusinesslive - nice mod and nice help!

regards

macc
Thanks Macc,

Always happy to help
Reply With Quote
  #17  
Old 02-18-2009, 03:30 PM
rapidphim rapidphim is offline
 
Join Date: Feb 2007
Posts: 733
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

so, in order to change the color for the forum, you also have to edit the style CSS to match the color? Is there away for it to change automatically without edit the template CSS for each of style color that you add on?
Reply With Quote
  #18  
Old 02-18-2009, 03:58 PM
UKBusinessLive UKBusinessLive is offline
 
Join Date: Sep 2008
Location: Essex, United Kingdom
Posts: 1,637
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by rapidphim View Post
so, in order to change the color for the forum, you also have to edit the style CSS to match the color? Is there away for it to change automatically without edit the template CSS for each of style color that you add on?
You edit the child style which you us your default forum as the parent, Changing the Style template CSS is so easy and the results can be viewed instantly after being saved, each template should take no more than 3 to 5 minutes.

I've not done it any other way as to make it more difficult by editing main page CSS and database tables.

This is a Hack for the little guy that wants the same result as VB.org but alot easier and quicker.

If you did it the way you say you will still have to edit a CSS page for each color, so this ways quicker and easier
Reply With Quote
  #19  
Old 02-18-2009, 06:53 PM
Hornstar Hornstar is offline
 
Join Date: Jun 2005
Location: Australia
Posts: 2,469
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thanks for sharing now if only I could create some nice colours as I would most likely create something that looks like yours
Reply With Quote
  #20  
Old 02-18-2009, 07:13 PM
UKBusinessLive UKBusinessLive is offline
 
Join Date: Sep 2008
Location: Essex, United Kingdom
Posts: 1,637
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by hornstar1337 View Post
thanks for sharing now if only I could create some nice colours as I would most likely create something that looks like yours
LOL, I did that in minutes because i was adding it to here , But its so easy to play with, given time you could make some nice complimentry color styles for your Forum.

Experiment, Thats the fun Part
Reply With Quote
  #21  
Old 02-18-2009, 07:18 PM
pein87's Avatar
pein87 pein87 is offline
 
Join Date: Sep 2008
Posts: 352
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Your awesome with javascript mate well done do you do paid services my js isnt the best?
Reply With Quote
Reply


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

Forum Jump


All times are GMT. The time now is 09:33 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04818 seconds
  • Memory Usage 2,367KB
  • Queries Executed 26 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (7)bbcode_code
  • (6)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (6)postbit_attachment
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete