Go Back   vb.org Archive > vBulletin Modifications > vBulletin 3.8 Modifications > vBulletin 3.8 Template Modifications

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

Category: Miscellaneous Hacks - Version: 3.8.4 Rating:
Released: 01-31-2009 Last Update: Never Installs: 80
Template Edits
Re-useable Code  
No support by the author.

Hello! This is my first submission. I run LTXTech.com, I go by phantomzer0 over there, and I wanted this hack for a long time. I decided to write it on my own and the outcome was perfect. I know enough to get the job done, so if there is a more efficient way to produce this, by all means post it up!

Here is what this hack will do for you:

Demo Link:

http://ltxtech.com/forums/showthread.php?t=2865

Now, you can make any usergroups use these backgrounds. You will have to design your own, of course, but you can assign them however you would like. In the case of my forum, we have them set-up for administrators. You could make a separate image for staff members, reg users, banned users, whatever you need. You can also duplicate it and assign different images for different colored styles. I'll show you how below.

Here's how to do it:
-- Navigate to your Admin CP. Once there go to Styles and Templates, then to Style Manager, and then click the "Go" button once you have decided which template you would like to install this on.

-- Scroll all the way to the bottom and look for the "Additional CSS Definitions" Box. I like to use the second box for all of my custom CSS, but you can surely use either one. Copy this and paste it into the box.

Code:
.postbit {
background: #101010 url(this is the url to your image for the background);
background-repeat: no-repeat;
border-left: solid 1px #3c3c3c;
border-right: solid 1px #3c3c3c;
}
Now, the border colors will need to be the same as the colors on your forum. These are the borders I'm talking about:



You will need to figure out the color code of your borders and assign the same color to the CSS code. You can adjust the size of the border by increasing or decreasing the "1px" numbers. 3px would obviously increase the size of the border to 3 pixels. You can also rename the CSS ".postbit" to something else, but if you do make sure you take note of that.

-- Now we will assign the background to the actual postbit. To do so, you need to navigate to Styles and Templates, then click on the "<< >>" button on the style you want to edit.

-- Scroll down the list and find "Postbit Templates"



-- Double click on "Postbit Legacy", as seen in the picture above.

Find:
Code:
<td class="alt2" width="175" style="border: $stylevar[cellspacing]px solid $stylevar[tborder_bgcolor]; border-top: 0px; border-bottom: 0px">
Replace With:
Code:
<if condition="is_member_of($post, #)">
<td class="postbit" width="175" style="border: $stylevar[cellspacing]px solid $stylevar [tborder_bgcolor]; border-top: 0px; border-bottom: 0px id="td_post_$post[postid]">
<else />
<td class="alt2" width="175" style="border: $stylevar[cellspacing]px solid $stylevar[tborder_bgcolor]; border-top: 0px; border-bottom: 0px"></if>
The red # symbol is for you to put a usergroup id # in. In my case, the admin group on my forum is 6, so instead of a # sign, there is a 6 there. You can assign multiple usergroups to use the same image, if you want. You can use the same code above for different forum styles, you just need to change the "td class="postbit"" to whatever the CSS is for the different style.

Example, my forum has a light and dark skin. The dark skin's CSS is "postbit" and the CSS for the light skin is "postbit2". On the Dark skin, I use the code above and for the light skin it's the exact same, only I have changed the td class to postbit2.

The only thing left to do is design a background image. Once you have that, you can upload it and point your CSS url to the image on your server.I'm fairly sure I have included all the steps to accomplish this, if I missed one, please point it out! Good luck and thanks for looking!

Update:

If you would like to assign multiple background images to multiple usergroups, see this post. User down.low explains very well how to achieve this result! Thanks DL!

https://vborg.vbsupport.ru/showpost....8&postcount=52

Supporters / CoAuthors

Show Your Support

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

Comments
  #52  
Old 04-15-2009, 09:43 PM
Fastbird's Avatar
Fastbird Fastbird is offline
 
Join Date: Aug 2005
Posts: 135
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by therogueforums View Post
TY Sadly, it didn't work for me. The first solution is the one I tried last night. The last one, above, yeilds the same results ("you're missing a </if> tag! oh n0es!") and the avatar, etc gets shoved out to the right.
That really shouldn't be happening. Are you sure you have two CSS conditions setup for the script? Try copying the code I gave you verbatim, missing tag and all and see what it does, just change the css triggers over to whatever you use.

Can you post up your postbit so I can look it over?
Reply With Quote
  #53  
Old 04-15-2009, 11:45 PM
down.low down.low is offline
 
Join Date: Mar 2009
Posts: 106
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by therogueforums View Post
Very promising mod. Thank you, firstly. Now...

When I add more than 1 usergroup to this... the first usergroup I added (administrators) is borked a bit. The image shows up fine, but the avatar, username, etc is force "out" to the right, where the actual post should be.

Any ideas on what I'm doing wrong? Possibly, if you have the time... maybe make a "template" for those who wish to use this for multiple usergroups? Also... and I suspect you're pretty busy, and can understand if you don't want to throw this in... but any way you can code in some curved boxes, where the posts, join date, etc go? I tried to use your mod with another mod that adds the boxes, but the image just ended up in there, in addition to the rest of the postbit, which didn't look so hawt. Lastly... again, if you have time, maybe throw in a signature cell, below it all.

At any rate, thank you for your time, and I look forward to a response.
|
|

I had this problem when adding more then one group. What you are doing wrong is adding the following code to many times- there should only be 1 instance of this code:
Code:
<td class="alt2" width="175" style="border: $stylevar[cellspacing]px solid $stylevar[tborder_bgcolor]; border-top: 0px; border-bottom: 0px">
|
|

Here is a code for 1 background/group(after changing the red):
Quote:
Code:
In your postbit_legacy.

        <if condition="is_member_of($post, groupid)">
        <td class="css name1" width="175" style="border: $stylevar[cellspacing]px solid $stylevar [tborder_bgcolor]; border-top: 0px; border-bottom: 0px id="td_post_$post[postid]">
        <else />
        <td class="alt2" width="175" style="border: $stylevar[cellspacing]px solid $stylevar[tborder_bgcolor]; border-top: 0px; border-bottom: 0px"></if>
Code:

And this code (after changing the red) would have to be in your additional css.


 .css name1 {
background: #000000 url(image path);
background-repeat: repeat;
border-left: solid 0px #border color;
border-right: solid 1px #border color;
}
|
|
Two backgrounds/groups would look like this:
Quote:
Code:
In your postbit_legacy.


        <if condition="is_member_of($post, groupid2)">
        <td class="css name2" width="175" style="border: $stylevar[cellspacing]px solid $stylevar [tborder_bgcolor]; border-top: 0px; border-bottom: 0px id="td_post_$post[postid]">
        <else />
        <if condition="is_member_of($post, groupid1)">
        <td class="css name1" width="175" style="border: $stylevar[cellspacing]px solid $stylevar [tborder_bgcolor]; border-top: 0px; border-bottom: 0px id="td_post_$post[postid]">
        <else />
        <td class="alt2" width="175" style="border: $stylevar[cellspacing]px solid $stylevar[tborder_bgcolor]; border-top: 0px; border-bottom: 0px"></if></if>


Notice: I had to add the additional </if> to the very end!!


|
|
Code:
And this code (after changing the red) would have to be in your additional css:
 .css name1 {
 background: #000000 url(image path);
 background-repeat: repeat;
 border-left: solid 0px #border color;
 border-right: solid 1px #border color;
 }
.css name2 {
  background: #000000 url(image path);
  background-repeat: repeat;
  border-left: solid 0px #border color;
  border-right: solid 1px #border color;
  }
|
|
Three backgrounds/groups would look like this:
Quote:
Code:
In your postbit_legacy.


        
        <if condition="is_member_of($post, groupid3)">
         <td class="css name3" width="175" style="border: $stylevar[cellspacing]px solid $stylevar [tborder_bgcolor]; border-top: 0px; border-bottom: 0px id="td_post_$post[postid]">
         <else />
        <if condition="is_member_of($post, groupid2)">
        <td class="css name2" width="175" style="border: $stylevar[cellspacing]px solid $stylevar [tborder_bgcolor]; border-top: 0px; border-bottom: 0px id="td_post_$post[postid]">
        <else />
        <if condition="is_member_of($post, groupid1)">
        <td class="css name1" width="175" style="border: $stylevar[cellspacing]px solid $stylevar [tborder_bgcolor]; border-top: 0px; border-bottom: 0px id="td_post_$post[postid]">
        <else />
        <td class="alt2" width="175" style="border: $stylevar[cellspacing]px solid $stylevar[tborder_bgcolor]; border-top: 0px; border-bottom: 0px"></if></if></if>


Notice: I had to add the additional </if> to the very end (AGAIN)!!

|
|

Code:
And this code (after changing the red) would have to be in your additional css:


 .css name1 {
 background: #000000 url(image path);
 background-repeat: repeat;
 border-left: solid 0px #border color;
 border-right: solid 1px #border color;
 }
.css name2 {
  background: #000000 url(image path);
  background-repeat: repeat;
  border-left: solid 0px #border color;
  border-right: solid 1px #border color;
  }
.css name3 {
   background: #000000 url(image path);
   background-repeat: repeat;
   border-left: solid 0px #border color;
   border-right: solid 1px #border color;
   }
Reply With Quote
  #54  
Old 04-15-2009, 11:46 PM
Fastbird's Avatar
Fastbird Fastbird is offline
 
Join Date: Aug 2005
Posts: 135
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yeah, thanks for clearing that up. I tried to explain that, that you need independent CSS for each statement, but the if tags I didn't know about. I'll update the initial install info. Thanks!
Reply With Quote
  #55  
Old 04-15-2009, 11:52 PM
down.low down.low is offline
 
Join Date: Mar 2009
Posts: 106
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Fastbird View Post
Ok, here's how to center everything:

Find:

<div id="postmenu_$post[postid]">

Replace:

<div id="postmenu_$post[postid]" align="center">

Find:
<div class="smallfont">

Replace:
<div class="smallfont" align="center">
Thanks for helping buddy, That did center my name and the title under my name- could you point me in the direction to center the rest of the stuff under- like my avatar and such?
Reply With Quote
  #56  
Old 04-15-2009, 11:55 PM
down.low down.low is offline
 
Join Date: Mar 2009
Posts: 106
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Fastbird View Post
Yeah, thanks for clearing that up. I tried to explain that, that you need independent CSS for each statement, but the if tags I didn't know about. I'll update the initial install info. Thanks!
Well the post post someone else posted sort of left that out and their code had the extra bit in it and didn't mention to only have it once. Took my a while to figure it out myself but I enjoy learning.
Reply With Quote
  #57  
Old 04-15-2009, 11:57 PM
down.low down.low is offline
 
Join Date: Mar 2009
Posts: 106
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by down.low View Post
Thanks for helping buddy, That did center my name and the title under my name- could you point me in the direction to center the rest of the stuff under- like my avatar and such?
cancel the avatar- I got it centered.
Reply With Quote
  #58  
Old 04-16-2009, 12:23 AM
down.low down.low is offline
 
Join Date: Mar 2009
Posts: 106
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by down.low View Post
cancel the avatar- I got it centered.
allright I got everything centered, thanks for helping out.
Reply With Quote
  #59  
Old 04-16-2009, 12:12 PM
Fastbird's Avatar
Fastbird Fastbird is offline
 
Join Date: Aug 2005
Posts: 135
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks for helping out!
Reply With Quote
  #60  
Old 04-19-2009, 09:13 PM
therogueforums's Avatar
therogueforums therogueforums is offline
 
Join Date: Mar 2007
Location: Louisville, KY
Posts: 149
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by down.low View Post
...

Thank you, so much! Worked like a charm!
Reply With Quote
  #61  
Old 04-20-2009, 02:59 AM
mikey1991's Avatar
mikey1991 mikey1991 is offline
 
Join Date: Oct 2008
Location: United Kingdom
Posts: 654
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

great mod, saw it a awhile ago, tagged it.
Reply With Quote
Reply

Thread Tools

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:11 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.05978 seconds
  • Memory Usage 2,352KB
  • 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
  • (10)bbcode_code
  • (10)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
  • (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_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete