Go Back   vb.org Archive > vBulletin 4 Discussion > vB4 Design and Graphics Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 04-09-2012, 08:51 PM
Aleks Aleks is offline
 
Join Date: Dec 2011
Posts: 26
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Need Help Changing Post Color for Administrators!

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!
Reply With Quote
  #2  
Old 04-09-2012, 09:21 PM
ForceHSS ForceHSS is offline
 
Join Date: Apr 2008
Posts: 6,357
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

only way would be to code it or a custom plugin
Reply With Quote
  #3  
Old 04-09-2012, 09:55 PM
SEOvB's Avatar
SEOvB SEOvB is offline
 
Join Date: May 2007
Location: Indianapolis
Posts: 2,451
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hey There,

This is a quick & dirty fix.

Add this plugin to your postbit_display_start hook:

PHP Code:
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:
HTML Code:
<div class="postrow">
After:
HTML Code:
<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
Reply With Quote
  #4  
Old 04-09-2012, 10:14 PM
Aleks Aleks is offline
 
Join Date: Dec 2011
Posts: 26
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by SEOvB View Post
Hey There,

This is a quick & dirty fix.

Add this plugin to your postbit_display_start hook:

PHP Code:
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:
HTML Code:
<div class="postrow">
After:
HTML Code:
<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;
Code:
 
        $this->post['is_admin'] = true; 
}
Reply With Quote
  #5  
Old 04-09-2012, 10:31 PM
SEOvB's Avatar
SEOvB SEOvB is offline
 
Join Date: May 2007
Location: Indianapolis
Posts: 2,451
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Aleks View Post
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;
Code:
 
        $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:

PHP Code:
if($this->post->usergroupid == OR $this->post->usergroup == OR $this->post->usergroup == 3
You can find out which usergroup has which id in the Usergroup Manager.

-Nick, SEOvB Developer
Reply With Quote
  #6  
Old 04-09-2012, 10:46 PM
Aleks Aleks is offline
 
Join Date: Dec 2011
Posts: 26
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by SEOvB View Post
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:

PHP Code:
if($this->post->usergroupid == OR $this->post->usergroup == 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?
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 05:01 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.06027 seconds
  • Memory Usage 2,227KB
  • Queries Executed 11 (?)
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
  • (2)bbcode_code
  • (4)bbcode_html
  • (4)bbcode_php
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (6)post_thanks_box
  • (6)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (6)post_thanks_postbit_info
  • (6)postbit
  • (6)postbit_onlinestatus
  • (6)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_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