Go Back   vb.org Archive > Community Discussions > Modification Requests/Questions (Unpaid)
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 06-04-2006, 09:57 PM
Gaileypoo Gaileypoo is offline
 
Join Date: Mar 2006
Posts: 9
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Mods have different background color in posts?

Hello,

I'm not sure if this has been done or not, but.. I'll give it a go anyway

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
Reply With Quote
  #2  
Old 06-04-2006, 10:36 PM
calorie calorie is offline
 
Join Date: May 2003
Posts: 2,804
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Assuming vB 3.5.4...

In the postbit template find:
Code:
	<td class="alt1" id="td_post_$post[postid]">
	<!-- message, attachments, sig -->
And replace with the following:
Code:
	<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:
Code:
	<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:
Code:
	<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.
Reply With Quote
  #3  
Old 06-04-2006, 10:56 PM
Gaileypoo Gaileypoo is offline
 
Join Date: Mar 2006
Posts: 9
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #4  
Old 06-04-2006, 11:03 PM
calorie calorie is offline
 
Join Date: May 2003
Posts: 2,804
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Code:
<if condition="in_array($post[userid],array(1,2,3))"> style="background: #C0EEEE; color: #000000;"</if>
Reply With Quote
  #5  
Old 06-04-2006, 11:25 PM
Gaileypoo Gaileypoo is offline
 
Join Date: Mar 2006
Posts: 9
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I don't understand.. do I replace that with something?

Thanks in advance~
Reply With Quote
  #6  
Old 06-05-2006, 12:51 AM
calorie calorie is offline
 
Join Date: May 2003
Posts: 2,804
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Replace:
Code:
<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:
Code:
<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.
Reply With Quote
  #7  
Old 06-05-2006, 01:05 AM
Gaileypoo Gaileypoo is offline
 
Join Date: Mar 2006
Posts: 9
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ah, got it. Thank you so much !
Reply With Quote
  #8  
Old 06-06-2006, 10:11 AM
Antiblank Antiblank is offline
 
Join Date: May 2005
Location: PDX
Posts: 61
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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?
Reply With Quote
  #9  
Old 06-06-2006, 10:17 AM
peterska2 peterska2 is offline
 
Join Date: Oct 2003
Location: Manchester, UK
Posts: 6,504
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

yes, that will work for their usergroup
Reply With Quote
  #10  
Old 06-06-2006, 11:31 AM
Antiblank Antiblank is offline
 
Join Date: May 2005
Location: PDX
Posts: 61
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 06:17 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04539 seconds
  • Memory Usage 2,251KB
  • Queries Executed 13 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (7)bbcode_code
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete