Go Back   vb.org Archive > vBulletin Modifications > vBulletin 4.x Modifications > vBulletin 4.x Template Modifications
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Postbit Legacy - Usergroup Backgrounds vb4 Details »»
Postbit Legacy - Usergroup Backgrounds vb4
Version: 4.0.1, by Fastbird Fastbird is offline
Developer Last Online: Jan 2012 Show Printable Version Email this Page

Category: Show Thread Enhancements - Version: 4.0.1 Rating:
Released: 12-03-2009 Last Update: Never Installs: 47
Template Edits
Re-useable Code Code Changes Translations  
No support by the author.

Updated for vBulletin 4.0.1!!!!

Hey Everyone! I went ahead and updated my vb3.x.x mod to work with the new coding in vBulletin 4. There are a few more modifications to make than the last time, but overall, I think you will find this very easy.

To start, let's look at a screenshot of what this mod will do for you, it's the image behind the username and the posbit information. This will not do anything else but assign a special background to the specified usergroup and assign the regular styling to all other usergroups:

DEMO: http://ltxtech.com/forums/showthread...or-New-Upgrade

Now that you have decided to continue with the modification, let's begin!

Navigate to:

Style Manager --> Click on the << >> Next to the template you are editing -->CSS Templates

postbit.css


FIND:
Code:
.postbitlegacy .userinfo {
	float:{vb:stylevar left};
	position: relative;
	width: {vb:math {vb:stylevar postbitlegacy_userinfo_width}-{vb:math {vb:stylevar padding}*2}}; 
	padding: 2px {vb:stylevar padding} {vb:math {vb:stylevar padding}/2};
	font-size: {vb:stylevar small_fontSize};
	display:block;
        background: {vb:stylevar postbit_userinfo_background};
	_background-image: none;
	_margin-top: -{vb:math {vb:math 16px*{vb:stylevar line_height}} + {vb:stylevar padding}-{vb:stylevar postbit_border.borderWidth}};
	clear:both;
}
ADD UNDER:
Code:
/*Custom Postbit Background - Image*/
.postbitlegacy .userinfo2 {
	float:{vb:stylevar left};
	position: relative;
	width:{vb:math {vb:stylevar postbitlegacy_userinfo_width}-{vb:math {vb:stylevar 
padding}*2}}; 
	padding: 2px {vb:stylevar padding} {vb:math {vb:stylevar padding}/2};
	font-size: {vb:stylevar small_fontSize};
	display:block;
       background: #xxxxxx /*url(url to image here) no-repeat*/;
        _margin-top: -{vb:math {vb:math 16px*{vb:stylevar line_height}} + {vb:stylevar padding}-{vb:stylevar postbit_border.borderWidth}};
	clear:both;
}
---> Note: The Red xxxxxx is a color number. You need to specify a background color in case you aren't using an image. Remove the /* and */ around the url code to use an image. Otherwise it will just change the color of the box. I suggest fading the image to the color of the background you choose, as shown in the picture example.

FIND:
Code:
.postbitlegacy .userinfo .postuseravatar img, .eventbit userinfo .eventuseravatar img {
	border: {vb:stylevar postbitlegacy_avatar_border};
 	outline: {vb:stylevar postbitlegacy_avatar_outline};
 	max-width: {vb:math {vb:stylevar postbitlegacy_userinfo_width} - {vb:math {vb:stylevar padding}*2}- {vb:math {vb:stylevar postbitlegacy_avatar_outline.borderWidth}*2} - {vb:math {vb:stylevar postbitlegacy_avatar_border.borderWidth}*2}};
}
ADD UNDER:
Code:
/*Custom Postbit Background - Avatar Border*/
.postbitlegacy .userinfo2 .postuseravatar img, .eventbit userinfo .eventuseravatar img {
	border: {vb:stylevar postbitlegacy_avatar_border};
 	outline: {vb:stylevar postbitlegacy_avatar_outline};
 	max-width: {vb:math {vb:stylevar postbitlegacy_userinfo_width} - {vb:math {vb:stylevar padding}*2}- {vb:math {vb:stylevar postbitlegacy_avatar_outline.borderWidth}*2} - {vb:math {vb:stylevar postbitlegacy_avatar_border.borderWidth}*2}};
}
FIND:
Code:
.postbitlegacy .userinfo a.username, .eventbit .userinfo a.username {
	clear:right;
	font-size:21px;
	font-weight:none;
	width: auto;
	max-width:{vb:math {vb:stylevar postbitlegacy_userinfo_width} - {vb:math {vb:stylevar padding}*2} - 20px};
	word-wrap:break-word;
}
ADD UNDER:
Code:
/*Custom Postbit Background - Username Style*/
.postbitlegacy .userinfo2 a.username, .eventbit .userinfo a.username {
	clear:right;
	font-size:21px;
	font-weight:none;
	width: auto;
	max-width:{vb:math {vb:stylevar postbitlegacy_userinfo_width} - {vb:math {vb:stylevar padding}*2} - 20px};
	word-wrap:break-word;
}
FIND:
Code:
.postbitlegacy .userinfo .postuseravatar, .eventbit .userinfo .eventuseravatar {
	display:block;
	margin:{vb:math {vb:stylevar padding}/3} auto 0;
	text-align:center;
	width: auto;
}
ADD UNDER:
Code:
/*Custom Postbit Background - Avatar Position*/
.postbitlegacy .userinfo2 .postuseravatar, .eventbit .userinfo .eventuseravatar {
	display:block;
	margin:{vb:math {vb:stylevar padding}/3} auto 0;
	text-align:center;
	width: auto;
}
FIND:
Code:
.postbitlegacy dl.userinfo_extra dt, .postbitlegacy dl.user_rep dt {
	float: {vb:stylevar left};
	text-align: {vb:stylevar left};
	/*color: {vb:stylevar shade_color};*/
	margin-{vb:stylevar right}: {vb:stylevar padding};
	margin-{vb:stylevar left}: 0;
	min-width:60px;
	width:auto !important;
	width:60px;
}
ADD UNDER:
/*Custom Postbit Background - Userinfo Alignment*/
Code:
.postbitlegacy dl.userinfo_extra2 dt, .postbitlegacy dl.user_rep dt {
	float: {vb:stylevar left};
	text-align: {vb:stylevar left};
	/*color: {vb:stylevar shade_color};*/
	margin-{vb:stylevar right}: {vb:stylevar padding};
	margin-{vb:stylevar left}: 0;
	min-width:60px;
	width:auto !important;
	width:60px;
}
That does it for the CSS file. Now we need to do one last thing, and that's edit the posbit_legacy template.

Navigate to:

Style Manager --> Click on the << >> Next to the template you are editing -->Postbit Templates

postbit_legacy:

FIND:
Code:
<div class="userinfo">
REPLACE:
Code:
<vb:if condition="is_member_of($post, #)"><div class="userinfo2">
<vb:else />
<div class="userinfo">
</vb:if>
FIND:
Code:
<dl class="userinfo_extra">
REPLACE:
Code:
<vb:if condition="is_member_of($post, #)"><dl class="userinfo_extra2">
<vb:else />
<dl class="userinfo_extra">
</vb:if>
The RED # is the ID of the usergroup that you want to have a unique background. In my example picture, the administrators have the custom image, so the # sign is replaced in the code with a 6, because the ID for the administrator usergroup is 6. To find the ID, go to usergroup options in the AdminCP and look at the chart. The group ID should be on the same line as the usergroup name.

All right! You should now have a styled postbit legacy background image for a specific usergroup!

I can't really provide support, I'm extremely busy with work and life, but if I pop in from time to time I'll try to help. Also, please, please, please create your own background image. I do not want my image being used. If you would like to setup the modification and use my image to get it up and running, that's fine. But I am asking that you create your own after it's installed properly.

Good luck guys!

Screenshots

File Type: jpg admin_back.jpg (112.3 KB, 0 views)

Supporters / CoAuthors

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #22  
Old 01-17-2010, 07:16 PM
TimberFloorAu's Avatar
TimberFloorAu TimberFloorAu is offline
 
Join Date: May 2008
Location: Brisbane
Posts: 2,264
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Still have this tagged Fastbird, get it going for 4.0.2 please :up:
Reply With Quote
  #23  
Old 01-17-2010, 07:20 PM
TimberFloorAu's Avatar
TimberFloorAu TimberFloorAu is offline
 
Join Date: May 2008
Location: Brisbane
Posts: 2,264
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ignore me I am a knob, will install :up:

Add:

Where does it pull the image from? Looking over code changes, I cant see where the image is extracted from. Is it profile pic?
Reply With Quote
  #24  
Old 01-18-2010, 09:37 PM
Fastbird's Avatar
Fastbird Fastbird is offline
 
Join Date: Aug 2005
Posts: 135
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by TimberFloorAu View Post
Ignore me I am a knob, will install :up:

Add:

Where does it pull the image from? Looking over code changes, I cant see where the image is extracted from. Is it profile pic?
If you want an image, you need to supply one and place it in the CSS. It's commented out. Check the first section of code to add/replace for it.
Reply With Quote
  #25  
Old 01-18-2010, 09:48 PM
TimberFloorAu's Avatar
TimberFloorAu TimberFloorAu is offline
 
Join Date: May 2008
Location: Brisbane
Posts: 2,264
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Fastbird View Post
If you want an image, you need to supply one and place it in the CSS. It's commented out. Check the first section of code to add/replace for it.
Yeah got that but tried everything and to no avail. Great hack, but couldnt get it working for us.

Thanks anyhoo

your code:
Code:
background: #xxxxxx /*url(url to image here) no-repeat*/;
our code change:
Code:
background: #ff9900 images/bg.jpg no-repeat;
Didnt produce anything.
Even tried absolute URL
Reply With Quote
  #26  
Old 01-18-2010, 10:22 PM
Fastbird's Avatar
Fastbird Fastbird is offline
 
Join Date: Aug 2005
Posts: 135
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by TimberFloorAu View Post
Yeah got that but tried everything and to no avail. Great hack, but couldnt get it working for us.

Thanks anyhoo

your code:
Code:
background: #xxxxxx /*url(url to image here) no-repeat*/;
our code change:
Code:
background: #ff9900 images/bg.jpg no-repeat;
Didnt produce anything.
Even tried absolute URL
That's because you removed too much of the code from the CSS. You need to use this line:

Code:
background: #ff9900 url(images/bg.jpg) no-repeat;
Reply With Quote
  #27  
Old 01-21-2010, 09:54 PM
Bouncer222 Bouncer222 is offline
 
Join Date: Oct 2009
Posts: 705
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I see on your site you used different images for different usergroups, how do I do the same??
Reply With Quote
  #28  
Old 01-21-2010, 10:07 PM
Fastbird's Avatar
Fastbird Fastbird is offline
 
Join Date: Aug 2005
Posts: 135
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

One usergroup is like this:
Code:
<vb:if condition="is_member_of($post, #)"><dl class="userinfo_extra2">
<vb:else />
<dl class="userinfo_extra">
</vb:if>
Two usergroups is like this:
Code:
<vb:if condition="is_member_of($post, #)"><dl class="userinfo_extra2">
<vb:else />
<vb:if condition="is_member_of($post, #)"><dl class="userinfo_extra3">
<vb:else />
<dl class="userinfo_extra">
</vb:if>
</vb:if>
You keep adding the statement over and over and then add a vb:if at the end for each additional phrase you add. Then, you must duplicate the css each time for each usergroup. So, in the example for installation, I use userinfo2 for the duplicate css codes. Each additional usergroup will have an incremental increase, so the css for the 2nd usergroup would be userinfo3, the 3rd user group would use userinfo4, and so on. Just keep duplicating each of the steps above for each usergroup.
Reply With Quote
  #29  
Old 01-21-2010, 10:22 PM
Bouncer222 Bouncer222 is offline
 
Join Date: Oct 2009
Posts: 705
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It's not possible to make it simpler? Because duplicating css I think shouldnt be necessary if you can somehow do that.
Reply With Quote
  #30  
Old 01-21-2010, 10:45 PM
Fastbird's Avatar
Fastbird Fastbird is offline
 
Join Date: Aug 2005
Posts: 135
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Bouncer222 View Post
It's not possible to make it simpler? Because duplicating css I think shouldnt be necessary if you can somehow do that.
If there's a simpler way, I don't know it. The way I explained it is known to work, so if there is a better way, then by all means go for it. I just don't know what that way is, sorry
Reply With Quote
  #31  
Old 02-28-2010, 05:05 PM
patrick91 patrick91 is offline
 
Join Date: Aug 2009
Posts: 72
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thnx i will install this soon! but how do you get your postbit look like that???
Attached Images
File Type: jpg backp.jpg (81.4 KB, 0 views)
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:06 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05050 seconds
  • Memory Usage 2,364KB
  • Queries Executed 27 (?)
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
  • (21)bbcode_code
  • (4)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (2)postbit_attachment
  • (11)postbit_onlinestatus
  • (11)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_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete