Register Members List Search Today's Posts Mark Forums Read

Reply
 
Mod Options
UKBL ~ Choose Multiple Forum Colors - like VB.Org Details »
UKBL ~ Choose Multiple Forum Colors - like VB.Org
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.1 Rating: (9 votes - 5.00 average) Installs: 64
Released: 18 Feb 2009 Last Update: Never Downloads: 568
Not Supported Template Edits Re-usable Code Translations  

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


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

Now we will need to add our url of our style to the Front of that code like this


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

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


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

Then we add a spacer Code to the end of our coded like this  



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

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


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

Thats the code done, Now to add a few words to the Front of it


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

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


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

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

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

Screenshots

Click image for larger version

Name:	choser.png
Views:	509
Size:	48.9 KB
ID:	95081   Click image for larger version

Name:	bluepage.png
Views:	177
Size:	50.8 KB
ID:	95086   Click image for larger version

Name:	orangepage.png
Views:	160
Size:	50.8 KB
ID:	95087   Click image for larger version

Name:	redpage.png
Views:	202
Size:	50.4 KB
ID:	95088  

Click image for larger version

Name:	greenpage.png
Views:	240
Size:	51.0 KB
ID:	95089  

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.
  #76  
Old 08 Aug 2009, 13:37
UKBusinessLive UKBusinessLive is offline
 
Join Date: Sep 2008
Real name: Gerry
Originally Posted by sKippah View Post
Ok so far.. but what about the code? seems i have to add this to every footer Template? Thanks
Yes to every style or color that you have included
Reply With Quote
  #77  
Old 08 Aug 2009, 13:45
UKBusinessLive UKBusinessLive is offline
 
Join Date: Sep 2008
Real name: Gerry
Originally Posted by GaryT View Post
I've followed your directions and everything works as it should

Now, how can I remove the drop down style selector without disabling user selection? If I were to disable user selection it would disable their being able to set it in their user options.

I want to put your mod in place of the drop menu. (same place)

=================

Note:
I skipped the first part of your instructions as I am using the multiple colored styles offered by Sofia's "CA Evo 3.8.3 - 25 colors" styles.

Again, this mod is so simple to implement, even I could do it Trust me, that's saying a lot for your instructions.
Hi Gary

I think But not 100% sure you can remove the style drop menu from the admin cp (general options??) But i'm not 100% sure and not totally sure if it would effect this mod or not, Perhaps you could let us know

Thanks Buddy

BTW, Sofia is a Very Talented Designer, I have a lot of respect for her work, those evo styles are just wicked
Reply With Quote
  #78  
Old 08 Aug 2009, 16:33
K4GAP K4GAP is offline
 
Join Date: Mar 2008
Thanks Gerry
I'm a grumpy old kind of guy and usually ask myself why others do what I just did. Asking questions for support of something that isn't related to the actual mod. Sorry about that.

I'm going to dive into the code after I back everything up. I'll post positive results with a link to my site and any helpful code examples.
Reply With Quote
  #79  
Old 08 Aug 2009, 18:58
UKBusinessLive UKBusinessLive is offline
 
Join Date: Sep 2008
Real name: Gerry
Originally Posted by GaryT View Post
Thanks Gerry
I'm a grumpy old kind of guy and usually ask myself why others do what I just did. Asking questions for support of something that isn't related to the actual mod. Sorry about that.

I'm going to dive into the code after I back everything up. I'll post positive results with a link to my site and any helpful code examples.
Hey Buddy, I'm grumpy too, so thats cool

see how you get on mate, i'm always here to help
Reply With Quote
  #80  
Old 08 Aug 2009, 21:01
K4GAP K4GAP is offline
 
Join Date: Mar 2008
Thumbs up

This is what I came up with.... looks and works GREAT!


Last edited by K4GAP; 09 Aug 2009 at 02:12. Reason: Updated info
Reply With Quote
  #81  
Old 09 Aug 2009, 03:45
UKBusinessLive UKBusinessLive is offline
 
Join Date: Sep 2008
Real name: Gerry
Excellent
Reply With Quote
  #82  
Old 09 Aug 2009, 20:58
K4GAP K4GAP is offline
 
Join Date: Mar 2008
Originally Posted by GaryT View Post
This is what I came up with.... looks and works GREAT!

So I thought.
The first two members on the web site to try it said the colors were not changing for them when they clicked a colored square. They are using IE8. I tried it with IE8 and it works fine for me????

Here is the code I'm using....

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

Do you see anything in this code that would prevent anyone from being able to use it? This has got me stumped.
Reply With Quote
  #83  
Old 09 Aug 2009, 21:08
UKBusinessLive UKBusinessLive is offline
 
Join Date: Sep 2008
Real name: Gerry
The beauty of this hack is the fact that its quite easy to do the links are in fact clickable pictures and if your using the basic code there can't really be a problem??


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

basically the Url to your style goes in the front and the url to the colored squares goes to the end

Test each url in your brower see if it goes where its meant to

I've just checked a url http://publicwarriors.com/forums/index.php?styleid=28 and it goes to the brown style also with http://publicwarriors.com/forums/index.php?styleid=10 thats brown also ??

You have every style going to the brown style, I think you've not set somthing up right in your style manager???
Reply With Quote
  #84  
Old 09 Aug 2009, 22:01
K4GAP K4GAP is offline
 
Join Date: Mar 2008
Originally Posted by UKBusinessLive View Post
The beauty of this hack is the fact that its quite easy to do the links are in fact clickable pictures and if your using the basic code there can't really be a problem??


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

basically the Url to your style goes in the front and the url to the colored squares goes to the end

Test each url in your brower see if it goes where its meant to

I've just checked a url http://publicwarriors.com/forums/index.php?styleid=28 and it goes to the brown style also with http://publicwarriors.com/forums/index.php?styleid=10 thats brown also ??

You have every style going to the brown style, I think you've not set somthing up right in your style manager???
You have to be logged in. It works now. It requires user style selection be turned on. I had it off to hide the drop menu. As Admin it would work for me but nobody else.
Everything is good now... thanks!

Last edited by K4GAP; 09 Aug 2009 at 22:43. Reason: update
Reply With Quote
  #85  
Old 11 Aug 2009, 02:48
UKBusinessLive UKBusinessLive is offline
 
Join Date: Sep 2008
Real name: Gerry
Originally Posted by GaryT View Post
You have to be logged in. It works now. It requires user style selection be turned on. I had it off to hide the drop menu. As Admin it would work for me but nobody else.
Everything is good now... thanks!
Just took a look Gary, You did a great job with all the styles, works ok for me buddy. What do your members make of it???

Well done again
Reply With Quote
  #86  
Old 11 Aug 2009, 03:03
K4GAP K4GAP is offline
 
Join Date: Mar 2008
Members?
Both of them love it!!
Reply With Quote
  #87  
Old 13 Aug 2009, 23:44
Kadence Kadence is offline
 
Join Date: Nov 2004
There's probably no way this would work with 3.6.8 right?
Reply With Quote
  #88  
Old 14 Aug 2009, 00:50
UKBusinessLive UKBusinessLive is offline
 
Join Date: Sep 2008
Real name: Gerry
Originally Posted by Kadence View Post
There's probably no way this would work with 3.6.8 right?
This is Basic Html, It would work with VB 2.2 if people still have it
Reply With Quote
  #89  
Old 26 Aug 2009, 13:16
OcR Envy's Avatar
OcR Envy OcR Envy is offline
 
Join Date: May 2008
Real name: Ryan
It bothered me that regardless of what page you were on this would redirect you to index.php when you change the color so I wrote up a simple javascript so when a user selects a different color they stay on the page they were viewing.

Place this above your color images:
<script type="text/javascript">
<!--
//<![CDATA[
function updatestyle(styleid){
location.href = location.href + "?styleid=" + styleid;
}
//]]>
// -->
</script>
Then the color image/link would change to:

<a href="#" onclick="updatestyle(5);"><img src="http://www.ukbusinesslive.co.uk/forum/images/misc/green.png"></a> &nbsp;
onclick="updatestyle(5);" 5 represents the style id, change this to whatever.

Enjoy
Reply With Quote
  #90  
Old 04 Sep 2009, 04:04
PGAmerica PGAmerica is offline
 
Join Date: Mar 2008
Thank you for this. It works perfectly for me. However, I have 2 questions.

1) How do I remove the pull-down style selection list so this is the only way to change styles?

2) How do I make this the only way to select a new style in the UserCP?
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:52.

Layout Options | Width: Wide Color: