View Full Version : Mods have different background color in posts?
Gaileypoo
06-04-2006, 09:57 PM
Hello,
I'm not sure if this has been done or not, but.. I'll give it a go anyway :D
I'm looking for a hack that will change a mod/supermod/admin/etc 's background color when they post a reply or thread, so that someone of a higher status post will stand out.
Something like that.. anyone wanna try it? haha.. ;) ;)
Thanks :)
calorie
06-04-2006, 10:36 PM
Assuming vB 3.5.4...
In the postbit template find:
<td class="alt1" id="td_post_$post[postid]">
<!-- message, attachments, sig -->
And replace with the following:
<td class="alt1" id="td_post_$post[postid]"<if condition="can_moderate(0,'cancontrolpanel',$post[userid],'')"> style="background: #C0EEEE; color: #000000;"<else /><if condition="can_moderate(0,'ismoderator',$post[userid],'')"> style="background: #EEC0EE; color: #000000;"</if></if>>
<!-- message, attachments, sig -->
In the postbit_legacy template find:
<if condition="$show['moderated']">
<td class="alt2" id="td_post_$post[postid]">
<else />
<td class="alt1" id="td_post_$post[postid]">
</if>
And replace with the following:
<if condition="$show['moderated']">
<td class="alt2" id="td_post_$post[postid]"<if condition="can_moderate(0,'cancontrolpanel',$post[userid],'')"> style="background: #C0EEEE; color: #000000;"<else /><if condition="can_moderate(0,'ismoderator',$post[userid],'')"> style="background: #EEC0EE; color: #000000;"</if></if>>
<else />
<td class="alt1" id="td_post_$post[postid]"<if condition="can_moderate(0,'cancontrolpanel',$post[userid],'')"> style="background: #C0EEEE; color: #000000;"<else /><if condition="can_moderate(0,'ismoderator',$post[userid],'')"> style="background: #EEC0EE; color: #000000;"</if></if>>
</if>
Tweak as desired.
Gaileypoo
06-04-2006, 10:56 PM
Thank you! I was wondering if there was a way to do this via userid (multiple user ids) .. like specify the userids who's posts stand out? or via usergroup?
Thanks for the help :)
calorie
06-04-2006, 11:03 PM
<if condition="in_array($post[userid],array(1,2,3))"> style="background: #C0EEEE; color: #000000;"</if>
Gaileypoo
06-04-2006, 11:25 PM
I don't understand.. do I replace that with something?
Thanks in advance~
calorie
06-05-2006, 12:51 AM
Replace:
<if condition="can_moderate(0,'cancontrolpanel',$post[userid],'')"> style="background: #C0EEEE; color: #000000;"<else /><if condition="can_moderate(0,'ismoderator',$post[userid],'')"> style="background: #EEC0EE; color: #000000;"</if></if>
With:
<if condition="in_array($post[userid],array(1,2,3))"> style="background: #C0EEEE; color: #000000;"</if>
And then edit the template.
Note: change 1,2,3 to a comma separated list of userids.
Gaileypoo
06-05-2006, 01:05 AM
Ah, got it. Thank you so much :)!
Antiblank
06-06-2006, 10:11 AM
If you wanted this to work for an entire usergroup would you replace
$post[userid],array(1,2,3)
with
$post[usergroupid],array(10,11,12)
for example?
peterska2
06-06-2006, 10:17 AM
yes, that will work for their usergroup
Antiblank
06-06-2006, 11:31 AM
This was outstanding and simple, tons of thanks for this gem. I'm going to try and play with it to see if I can figure out how to do two usergroupids use two seperate colors.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2024, vBulletin Solutions Inc.