View Full Version : Usergroup Post Color
Hey, I was wondering if anyone could make a hack that makes all posts made by the admin usergroup show up in a different color. Like on the Blizzard forums where all blizzard staff posts are shown in blue and now white.
Thank you.
Deaths
02-17-2005, 09:40 AM
It would't be a hack, I guess it would be more of a template mod ;).
I think this would work, but I cant check :
In your postbit template, find:
$post[message]
Now, replace with:
<if condition="$post[usergroupid]=6">
<font color="#XXXXXX">
$post[message]
</font>
</if>
Good luck, and let me know if it worked :)
Marco van Herwaarden
02-17-2005, 09:45 AM
i would suggest you try:
<if condition="$post[usergroupid]=6">
<font color="#XXXXXX">
</if>
$post[message]
<if condition="$post[usergroupid]=6">
</font>
</if>
Ot post would never show up anymore if not usergroup = 6 :D
It works, but everyone gets that color. :P
<!-- message -->
<div>
<if condition="$post[usergroupid]==6">
<div style="color: #CC0000">
</if>
$post[message]
<if condition="$post[usergroupid]==6">
</div>
</if>
</div>
<!-- / message -->
This worked like a charm, it lacked a second = I also changed the font tag to style so that it's XHTML compatible.
If you want to exclude forums use<!-- message -->
<div>
<if condition="$post[usergroupid]==6 AND $forum[forumid]!=XX">
<div style="color: #CC0000">
</if>
$post[message]
<if condition="$post[usergroupid]==6 AND $forum[forumid]!=XX">
</div>
</if>
</div>
<!-- / message -->
https://vborg.vbsupport.ru/showthread.php?p=613189#post613189
Deaths
02-17-2005, 03:15 PM
i would suggest you try:
<if condition="$post[usergroupid]=6">
<font color="#XXXXXX">
</if>
$post[message]
<if condition="$post[usergroupid]=6">
</font>
</if>
Ot post would never show up anymore if not usergroup = 6 :D
Ah, yes, I completely forgot about that!
Heh, sleepy me :)
beduino
06-17-2008, 10:46 AM
tks for this thread
joao barroca
aka beduino
zero_ZX
06-17-2008, 02:22 PM
Can any one help me, if i want to put a background image on it (like a water mark)?
And i last, is it possible to add a image next to a post title if an admin posted in it?
Thanks in advanced guys/girls!
Mastergumble
09-06-2008, 04:51 AM
I didn't got this working for me :/
What i want to change is the background color of the post for admin/moderators
Any help on how to do it ?
DataHero
12-31-2009, 04:23 PM
Pardon me for the major bump.
This didn't work here either. The top code that KBV posted ("=" instead of "==") results in the case where all users have this specified colour when posting. I tried the one Marco posted, but that one did not work in terms of colour (nor individually, I think).
It'd be greatly appreciated if I could get some assistance on this matter. :)
EDIT - nevermind, figured it out. Thanks anyway, nontheless.
r00028304
11-07-2010, 04:57 PM
anyone know how o make this work for vb 4.0.8 - can't find "$post[message] "
BirdOPrey5
11-07-2010, 05:41 PM
anyone know how o make this work for vb 4.0.8 - can't find "$post[message] "
in vb4 it's {vb:raw post.message}. Also if's in vb 4 are different... it's <vb:if condition ="..."> and </vb:if>
r00028304
11-07-2010, 07:46 PM
in vb4 it's {vb:raw post.message}. Also if's in vb 4 are different... it's <vb:if condition ="..."> and </vb:if>
thanks for that;
I have this but doesnt seem to work
<!-- message -->
<div>
<vb:if condition ="$post[usergroupid]==10">
<div style="color: #0000FF">
</vb:if>
{vb:raw post.message}
<vb:if condition ="$post[usergroupid]==10">
</div>
</vb:if>
</div>
<!-- / message -->
I think its the $post[usergroupid] no?
BirdOPrey5
11-07-2010, 09:00 PM
It's working for me... get rid of all that extra / useless code, simply replace:
{vb:raw post.message}
with:
<vb:if condition ="$post[usergroupid]==10">
<span style="color: #0000FF">
</vb:if>
{vb:raw post.message}
<vb:if condition ="$post[usergroupid]==10">
</span>
</vb:if>
It has to be <span> tags too... div doesn't work the same way.
Elder
02-15-2011, 05:37 PM
It's working for me... get rid of all that extra / useless code, simply replace:
{vb:raw post.message}
with:
<vb:if condition ="$post[usergroupid]==10">
<span style="color: #0000FF">
</vb:if>
{vb:raw post.message}
<vb:if condition ="$post[usergroupid]==10">
</span>
</vb:if>
It has to be <span> tags too... div doesn't work the same way.
Didnt work for me...
BirdOPrey5
02-16-2011, 01:10 PM
Didnt work for me...
Are you using vBulletin 4.x? If so what version exactly?
Ellendway
01-22-2012, 09:02 PM
Can I somehow add this thing to postbit_display_complete hook with forum ID? It's just a bit annoying to add code to every template..
Anyway can I somehow short whole code?
<vb:if condition ="$post[usergroupid]==6">
<span style="color: #0000FF">
</vb:if>
<vb:if condition ="$post[usergroupid]==2">
<span style="color: #CC0000">
</vb:if>
{vb:raw post.message}
<vb:if condition ="$post[usergroupid]==2">
</span>
</vb:if>
<vb:if condition ="$post[usergroupid]==6">
</span>
</vb:if>
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.