The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Postbit Legacy - Usergroup Backgrounds Details »» | |||||||||||||||||||||||||
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; } 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"> 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> 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
|
Comments |
#112
|
|||
|
|||
My coding skills are crap, but you could create a usergroup for only the girls and then use either the search for user function based on the gender field (if it is a profile field I think) and then manually move all the girls over to the new usergroup. There is also a query you can run to return all users that have filled out a certain field. I can look that up and post it if it will help you. Good luck getting it automated though.
|
#113
|
|||
|
|||
Quote:
I could of course move all women to a usergroup - then again this is exactly what I am trying to avoid - would take insanely long and require constant work on it. I think the postbit query is supposed to already query that profile field - just like the usergroup for the user. So I think there must be a variable for that. that post might still help me - if you could look it up that'd be great! |
#114
|
|||
|
|||
It seems like you might be able to edit the code from the other mod to just call and post the CSS class from this mod... some deep searching around the net might yield you enough info to hack it yourself. If all else fells, you could hire someone to do it for you via the Rent A Coder site. I've personally had good luck there and the site really protects the buyer from getting ripped off from a coder.
Anyway, here is the link to the query I was talking about... not a lot there, but maybe some help. |
#115
|
|||
|
|||
I managed it!!!
check out this post: https://vborg.vbsupport.ru/showpost....8&postcount=52 Don't forget the additional /if to close each group! This one: Code:
<if condition="is_member_of($post, 1)"> Code:
<if condition="$post[field5] == 'Girl'"> If you use boolean stuff like true false you should do it different. you can also use != for is not. btw this mod is marked as not working for 3.8.4 - it totally works on 3.8.4!!! |
#116
|
|||
|
|||
Glad you got it worked out, thinking about this more, it might actually help me automate my setup. Thanks for posting your findings.
|
#117
|
|||
|
|||
In order to get this to work with my setup, I need two profile fields filled in. Is it possible to string two if conditions together with some thing like "AND"
|
#118
|
|||
|
|||
Found it! If you need it to check the condition of two fields, here is what you need...
Code:
<if condition="$post[field#] == 'Option'"> <elseif condition="$post[field#] == 'Option'"> <td class="postbitbg7" width="175" style="border: $stylevar[cellspacing]px solid $stylevar [tborder_bgcolor]; border-top: 0px; border-bottom: 0px id="td_post_$post[postid]"> <else /> |
#119
|
||||
|
||||
Plz how make it in VB 4.01 ?
|
#120
|
|||
|
|||
thn
|
#121
|
||||
|
||||
Go look in the correct mod forum and you will see I've already ported it.
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|