![]() |
Maintaining two closely related style options
This is kind of hard to sum up just in the headline.
My forum offers two style options to the users. The only difference is the font color. I didn't want to do all manual template edits in both styles all the time, so for a while I have only made changes to the default style and disregarded the other one (knowing that few people are even aware of this option). Now I want to get both styles on the same level again. My idea is to duplicate the current version of the default style and edit its font color, and replace the old alternate style with it (by giving it the same name). Basically, I want to make sure that the new style ends up with the same ID as the old one, or at least automatically falls into place for people who had selected the previous alternate style. I hope this was not too hard to follow, and that somebody can help me out with this. Thanks, Tobias |
Rather than having and maintaining 2 separate styles, why not just create a user option to select the font color then display proper font color using conditionals?
I may be missing something, but it seems to me you're going around the block to get next door.. |
Export your existing style with all the template mods.
Import it, making it non-selectable. Make your two styles children of your new parent style based on your good style. Revert all templates in the child styles that don't need to be different between them. Make all future template edits to the parent style. |
Quote:
|
AdminCP > User Profile Fields > Add New User Profile Field
Profile Field Type: Single-Selection Menu Title: Font Color Description: Select the color you would like the font displayed in. Options: (Whatever your colors are, separated by a carriage return) Set Default: Yes, but No First Blank Option Field Searchable on Members List: No Show on Members List: No Save. Now, in the User Profile Manager you will see your new profile field listed. Under the "name" column, you'll see a field number (ie. field12). Find (and note) the field number for the field you added. Now, I don't know how you currently implement your font colors -- whether you hardcoded <font>, <span>, etc. tags or if you're doing it via CSS (which is preferred) -- but you can then simply add the conditional: HTML Code:
<if condition="$bbuserinfo[fieldXX] == 'Red'">font-color: #AAAAAA;<else />font-color: #BBBBBB;</if> Users would then be able to select it in their UserCP under Profile Options. New users would be asked during registration as well. |
Is there a way to modify this so that a user can set his/her own custom font/color/size, that it defaults to whenever they make a post, in thier cp?
|
Yes. Just create more custom fields to your liking and call $bbuserinfo[fieldXX] where necessary.
|
All times are GMT. The time now is 09:33 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|