View Single Post
  #5  
Old 07-14-2011, 05:20 AM
ForumExcellence ForumExcellence is offline
 
Join Date: Mar 2011
Posts: 41
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by J. Schultz View Post
Any critiques?

Now to get the text formatting to match
Change to:

Code:
<div class="postdetails">
<div class="userinfo">
<div class="username_container">
<vb:if condition="$post['field6']">
<span class="postbit-postfield6">{vb:raw post.field6}</span>
</vb:if>
<vb:if condition="$post['userid']">
{vb:raw memberaction_dropdown}
{vb:raw post.onlinestatus}
<vb:else />

Then, open postbit.css

Find:

Code:
.postbitlegacy .userinfo a.username, .eventbit .userinfo a.username {
	clear:{vb:stylevar right};
	font-size:{vb:stylevar font.fontSize}{vb:stylevar font.units};
	font-weight:bold;
	width: auto;
	max-width:{vb:math {vb:stylevar postbitlegacy_userinfo_width} - {vb:math {vb:stylevar padding}*2} - 20px};
	word-wrap:break-word;
}

There may be something different for your style after the emphasized line, so just look for that line and then copy everything between it and the }, then paste it right under (but leave the original!), then change where it says "a.username" on the one you pasted, to ".postbit-postfield6", and change ", .eventbit .userinfo a.username" to:

Code:
, .postbit .contact .postbit-postfield6

If you would like to use a specific colour for that text, find "font-weight:bold;", then add the following line underneath it (changing the emphasized text with the appropriate hex value, including the # sign - I've set it as white, most hex codes will be 6 characters long):

Code:
color:#fff;

You can also add this instead to use the default link colour:

Code:
color:{vb:stylevar link_color};

So the whole thing should now look something like:

Code:
.postbitlegacy .userinfo .postbit-postfield6, .postbit .contact .postbit-postfield6 {
	clear:{vb:stylevar right};
	font-size:{vb:stylevar font.fontSize}{vb:stylevar font.units};
	font-weight:bold;
	color:#fff;
	width: auto;
	max-width:{vb:math {vb:stylevar postbitlegacy_userinfo_width} - {vb:math {vb:stylevar padding}*2} - 20px};
	word-wrap:break-word;
}

This will work even if you choose to change to the horizontal postbit template later.

If you are using specific HTML markups per usergroup, and would like your text to have the same markup for your postbit field based on each member's usergroup, the easiest way would be to use the following syntax (adding as many "<vb:elseif />" conditionals as you have usergroups with their own HTML markups which you'd like to duplicate, with the last "<vb:else />" being what shows for everybody else, and ending with a "</vb:if>"), making sure to add additional CSS rules (as above) for each new class, as required. For example:

Code:
<div class="postdetails">
<div class="userinfo">
<div class="username_container">
<vb:if condition="$post['field6']">
<vb:if condition="is_member_of($bbuserinfo, 6)">
<span class="postbit-postfield6-6">
<vb:elseif condition="is_member_of($bbuserinfo, 7)" />
<span class="postbit-postfield6-7">
<vb:else />
<span class="postbit-postfield6"></vb:if>{vb:raw post.field6}</span>
</vb:if>
<vb:if condition="$post['userid']">
{vb:raw memberaction_dropdown}
{vb:raw post.onlinestatus}
<vb:else />

In this case, I added an additional "-#" to the end of the class name to denote a particular usergroup number, however, you can change them however you like, as long as you maintain proper syntax. Remember to make the appropriate changes in both selector instances in each new rule (as emphasized):

Code:
.postbitlegacy .userinfo .postbit-postfield6-7, .postbit .contact .postbit-postfield6-7 {
	clear:{vb:stylevar right};
	font-size:{vb:stylevar font.fontSize}{vb:stylevar font.units};
	font-weight:bold;
	color:#000;
	width: auto;
	max-width:{vb:math {vb:stylevar postbitlegacy_userinfo_width} - {vb:math {vb:stylevar padding}*2} - 20px};
	word-wrap:break-word;
}
Reply With Quote
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01209 seconds
  • Memory Usage 1,793KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD_SHOWPOST
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (8)bbcode_code
  • (1)bbcode_quote
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_box
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (1)postbit_onlinestatus
  • (1)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • reputationlevel
  • showthread
Included Files:
  • ./showpost.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_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showpost_start
  • bbcode_fetch_tags
  • bbcode_create
  • postbit_factory
  • showpost_post
  • 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
  • showpost_complete