Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 04-10-2007, 09:51 PM
tobias_t tobias_t is offline
 
Join Date: Dec 2006
Location: Berlin, Germany
Posts: 121
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default 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
Reply With Quote
  #2  
Old 04-10-2007, 10:06 PM
magnus's Avatar
magnus magnus is offline
 
Join Date: Apr 2002
Location: Miami, FL
Posts: 1,107
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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..
Reply With Quote
  #3  
Old 04-10-2007, 10:07 PM
WetWired's Avatar
WetWired WetWired is offline
 
Join Date: Jun 2002
Location: Texas
Posts: 669
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #4  
Old 04-10-2007, 10:12 PM
tobias_t tobias_t is offline
 
Join Date: Dec 2006
Location: Berlin, Germany
Posts: 121
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by magnus View Post
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..
How would you do this, and where would this option show up for users?
Reply With Quote
  #5  
Old 04-10-2007, 10:21 PM
magnus's Avatar
magnus magnus is offline
 
Join Date: Apr 2002
Location: Miami, FL
Posts: 1,107
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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>
Modify that however you see fit, but that's the gist of it.

Users would then be able to select it in their UserCP under Profile Options. New users would be asked during registration as well.
Reply With Quote
  #6  
Old 04-11-2007, 01:38 PM
DiSpy's Avatar
DiSpy DiSpy is offline
 
Join Date: Feb 2007
Location: South Florida!!
Posts: 107
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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?
Reply With Quote
  #7  
Old 04-11-2007, 01:57 PM
magnus's Avatar
magnus magnus is offline
 
Join Date: Apr 2002
Location: Miami, FL
Posts: 1,107
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yes. Just create more custom fields to your liking and call $bbuserinfo[fieldXX] where necessary.
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 01:07 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
  • Page Generation 0.03657 seconds
  • Memory Usage 2,220KB
  • Queries Executed 13 (?)
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
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)bbcode_html
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (7)post_thanks_box
  • (7)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (7)post_thanks_postbit_info
  • (7)postbit
  • (7)postbit_onlinestatus
  • (7)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_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete