![]() |
Admins and mods have different post backgrounds when posting.
When making a post is it possible to have the admins and mods have different post backgrounds when posting... so you can see what level they are(Usergroup)
If you would like pictures to explain what I mean just ask. |
Find the class tag of that td cell in your postbit and use a conditional statement to switch it around depending on usergroup.
HTML Code:
<td class="<if condition="is_member_of($post, X)">alt1</else>alt2</if>">...</td> |
So this would allow me to have the post bits like these:
I know these are phpBB but this is were I got the Idea from. Admin: http://www.freeimageups.com/files/1/Misc/admin.jpg Mod: http://www.freeimageups.com/files/1/Misc/mod.jpg User: http://www.freeimageups.com/files/1/Misc/user.jpg So I need to make 3 different colors for the post bit dependent on there user group... Maybe more for future groups. |
Kirby's code is a bit off... it should be <else />, not </else>. But you can use a condition around any of the table column classes you want to change. It may be easier to 'read' if you do it this way:
HTML Code:
<if condition="is_member_of($post, X)"> |
Can we alternate colour background on each subsequent post, within same usergroup?
|
I would guess so, but I think you would have to get a plugin involved then.
|
So this would be before every td tag in the postbit template ?
$post, X and $post, y would be the user groups? and How would I make another alt# so I could have it on different styles |
You would do that for every td tag that you wish to change. I've seen some users only want to change the post background and that would be here in red:
Code:
<if condition="$show['moderated']"> x and y would be the usergroups. To add another alt class, you would put it in the Main CSS for the style - at the bottom of that page. |
now, as a secondary question to this, what if instead of changing the postbit BG I wanted to change just the admin or mod's font color, is that possible?
|
Sure, you can either just change the class or add the css for the color inline there.
If you just want to change the background inline, instead of adding a new class, just go: Code:
<td class="alt2" id="td_post_$post[postid]" style="background: #00ff00 url('smiley.gif') no-repeat fixed center;"> |
I can't seem to get it to work, any idea of what the code would be exactly? I have been toying for a little while ( I am still a noob with coding =[ )
|
Not exactly what you wanted but the following might help...
I have added the following code to the end of my headinclude template: Code:
<if condition="in_array($bbuserinfo[userid], array(800,799,773,1))"> This was done so that mods/admins would know that they were logged into a mod account and therefore prevent accidently posting stuff as an admin/normal user when the opposite is required. Obviously you can change those user ids to whatever you want |
Quote:
|
Te easiest way is to use Marco's Post Background Color AddOn. His AddOn is expandable in most ways and can be also added with the vB CSS Color Picker and Color Preview. Also the Permissions are pre-defined and can be used in a proper way :) IMO one of the best AddOns ever ;)
|
Wow, I didn't know that existed. Learn something new every day!
|
OK, so I messed around a little, and I used this code (a friend helped me, as I said, I am a noob to vBulletin code, I have no idea what anything is or what to do/place things in):
Code:
<if condition="in_array($bbuserinfo[userid], array(2))"> I, however, want to edit the BODY of the post. Any ideas? |
That code is not going to do anything in regards to what the original post in this thread is about - changing the post background depending on who makes the post. That will change the whole *sites* background color based on who is viewing the page.
|
Quote:
|
Something like this depending on what you want:
HTML Code:
.whatever {background-color: orange;} |
Thanks :)
|
Does anyone know of a way to get this working on vb4?
Thank you in advance. |
In postbit template go down to about line 90 and modify:
HTML Code:
<div class="postbody" |
All times are GMT. The time now is 05:52 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|