View Full Version : Need Help Changing Post Color for Administrators!
Aleks
04-09-2012, 07:51 PM
Can anyone please tell me how to change the whole background color for when administrators post on vB 4.1? I'm not talking about text background, I mean the whole entire background of the post. Thanks a lot in advanced!
ForceHSS
04-09-2012, 08:21 PM
only way would be to code it or a custom plugin
SEOvB
04-09-2012, 08:55 PM
Hey There,
This is a quick & dirty fix.
Add this plugin to your postbit_display_start hook:
if($this->post->usergroupid == 6) {
$this->post['is_admin'] = true;
}
Find the div in your postbit template with the postrow class, and edit it.
Before:
<div class="postrow">
After:
<div class="postrow" <vb:if condition="$post['is_admin']">style="background-color: #ddd"</vb:if>>
Change the #ddd to whatever color you want.
No guarantees, but that should work :).
-Nick, SEOvB Developer
Aleks
04-09-2012, 09:14 PM
Hey There,
This is a quick & dirty fix.
Add this plugin to your postbit_display_start hook:
if($this->post->usergroupid == 6) {
$this->post['is_admin'] = true;
}
Find the div in your postbit template with the postrow class, and edit it.
Before:
<div class="postrow">
After:
<div class="postrow" <vb:if condition="$post['is_admin']">style="background-color: #ddd"</vb:if>>
Change the #ddd to whatever color you want.
No guarantees, but that should work :).
-Nick, SEOvB Developer
Thanks for your reply Nick. Nooby question, but what is the div with the postrow class called? Also, if I were to do this same thing for another usergroup, what would I do with;
$this->post['is_admin'] = true;
}
SEOvB
04-09-2012, 09:31 PM
Thanks for your reply Nick. Nooby question, but what is the div with the postrow class called? Also, if I were to do this same thing for another usergroup, what would I do with;
$this->post['is_admin'] = true;
}
I'm not sure what you mean with what the div is called... If you go to AdminCP->Styles & Templates->Search Templates->(enter 'postbit' and check 'titles only')->(click the postbit template in your active style), you can Ctrl+F 'postrow' to find the div.
If you want to add more usergroups, you can do so by adding more to the if condition. Like:
if($this->post->usergroupid == 6 OR $this->post->usergroup == 4 OR $this->post->usergroup == 3)
You can find out which usergroup has which id in the Usergroup Manager.
-Nick, SEOvB Developer
Aleks
04-09-2012, 09:46 PM
I'm not sure what you mean with what the div is called... If you go to AdminCP->Styles & Templates->Search Templates->(enter 'postbit' and check 'titles only')->(click the postbit template in your active style), you can Ctrl+F 'postrow' to find the div.
If you want to add more usergroups, you can do so by adding more to the if condition. Like:
if($this->post->usergroupid == 6 OR $this->post->usergroup == 4 OR $this->post->usergroup == 3)
You can find out which usergroup has which id in the Usergroup Manager.
-Nick, SEOvB Developer
I really appreciate you're help, but I'm going to be honest; I'm confused. Sorry if I'm annoying you, but could you please go over step by step what to do? If you don't feel like it don't even bother, but it would be helpful. Also, where is the postbit_display_start hook located?
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.