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

Reply
 
Thread Tools Display Modes
  #1  
Old 02-05-2010, 04:54 PM
DragonBlade's Avatar
DragonBlade DragonBlade is offline
 
Join Date: May 2006
Posts: 189
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default where should I change postbitlegacy_userinfo_width?

I'm making a minor modification for a Valentines Day Event on my forum, in which I am doubling the width of my userinfo block to fit in an extra avatar (the avatar of the person they are "dating," heh, it was a big hit last year).

Last year, I forced a stomach-churning pink V-Day skin on my users for the Event, but this year I didn't want to make an entirely new skin--instead, I was going to just make a few Plugins and edit the Avatar bit of the posbit_legacy template.

I've got two options--one is to change $stylevar['postbitlegacy_userinfo_width'], and the other is to edit a few HTML elements (<div class="postdetails"> and <div class="userinfo">) with inline CSS in the postbit_legacy template while I muck around with the Avatar bit. I would LIKE to go with the former option, as it seems a lot simpler, but I'm not quite sure which hook I should place it on. I tried postbit_display_start, but it seems to not work. XP

Advice?
Reply With Quote
  #2  
Old 02-05-2010, 05:29 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Is this a new style? If so, you would just change the stylevar in the StyleVars dropdown. Otherwise, you will have to just add the new width for those two classes into the additional.css template like so:
Code:
.postdetails {width: 300px;}
Reply With Quote
  #3  
Old 02-05-2010, 08:50 PM
DragonBlade's Avatar
DragonBlade DragonBlade is offline
 
Join Date: May 2006
Posts: 189
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hmm. Well, I guess I cannot do it just by changing postdetails and userinfo classes. THere's other parts of the postbit that determine their width by postbitlegacy_userinfo_width's value. I'd -have- to either change the value in $stylevar['postbitlegacy_userinfo_width'] before postbit.css is called but after any final changes to $stylevar occur, or I would have to make a bunch of new styles. :< I'd much rather find a hook to change the $stylevar value.


@Lynne, naw, it's something I want to apply to all of my existing styles.

See, I keep a "Master" template as a parent of all my styles and make modifications to the templates in that one (specifically here, the postbit_legacy template) and let the rest of my styles inherit the changes. I -could- find all the classes affected by postbitlegacy_userinfo_width's value and change them accordingly, but it would be a pain if I could just do it by being able to globally change $stylevar['postbitlegacy_userinfo_width'] before postbit.css is processed.

--------------- Added [DATE]1265413944[/DATE] at [TIME]1265413944[/TIME] ---------------

Well, let's see.

PHP Code:
global $vbulletin;
if (
$vbulletin->userinfo['userid'] == 15010)
{
  
$vbulletin->stylevars['postbitlegacy_userinfo_width']['size'] = '350';

I have that as a plugin, which is what I need to change... But, erm, I just don't knwo WHERE to place it. (Like what hook.)
Reply With Quote
  #4  
Old 02-06-2010, 02:30 AM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

If you want to change this for all styles, I really don't understand why you don't just change the stylevar in the stylevars list. It seems to me that is the easiest method - click, change number, apply, all done.
Reply With Quote
  #5  
Old 02-06-2010, 03:58 AM
DragonBlade's Avatar
DragonBlade DragonBlade is offline
 
Join Date: May 2006
Posts: 189
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I've got quite a few skins. :<


ANd I do want it done for all styles, but I also want to be able to impose conditions on it.

As in, "
PHP Code:
if (is_member_of($vbulletin->userinfo$development_group_id))
{
 
/// Display new width for the Development Team to screw around with
}
else {
/** Leave As Is so regular users are not affected **/
See what I mean, heh?
Reply With Quote
  #6  
Old 02-06-2010, 09:30 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You are going to have to write a plugin that does the if statement for you and then set the width in the classes then. You can not set a stylevar like you are trying to do. When a a stylevar is changed via the stylevar editor, it creates all new css files. Changing a stylevar in a plugin does not do that. So, you need to actually change the css at that point which means modifying the classes.
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 02:39 AM.


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.04381 seconds
  • Memory Usage 2,215KB
  • Queries Executed 11 (?)
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_code
  • (2)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (6)post_thanks_box
  • (6)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (6)post_thanks_postbit_info
  • (6)postbit
  • (6)postbit_onlinestatus
  • (6)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