vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.7 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=228)
-   -   Miscellaneous Hacks - Automiatc Specific User Text Colouring (https://vborg.vbsupport.ru/showthread.php?t=193517)

Renny 10-12-2008 10:00 PM

Automiatc Specific User Text Colouring
 
Hello,

I asked how to do this a while back and was told how and thought id post it incase everyone else would like to do this.

The mod is simple, it allows you to set a specific colour for a usergroup you set so when a member of that usergroup post it is automaticly posted as the colour you've set. however the colour can be changed if the user seletes a different colour from the text colours

>>> I take no credit for this coding, full credit to Karri <<<

Please note you will have to edit the code to any layout(s) you have and want it to show on.



First login to your admincp --> Style Manager --> Edit Templates

In your postbit find
PHP Code:

<!-- message -->
<
div id="post_message_$post[postid]">$post[message]</div>
<!-- / 
message --> 

replace with
PHP Code:

<!-- message -->             
<if 
condition="(in_array($post['usergroupid'],  array('6', '#', '#', '#')))">
    <
div class="VIP_$post[usergroupid]id="post_message_$post[postid]">$post[message]</div>
<else />
<
div id="post_message_$post[postid]">$post[message]</div>
</if>

<!-- / 
message --> 

where the # are you put the user groups id for example if i wanted to set my admin, id put
PHP Code:

<if condition="(in_array($post['usergroupid'],  array('6')))"

after you are happy with this click save.

If your using legacy, make sure you edit postbit_legacy instead of or aswell as postbit.

once this is done go to your Main CSS and add in "Additional CSS Definitions" the following

Code:

.VIP_# { color:#000000 }
.VIP_# { color:#ffffff }

# replace with the group id and click Save.

Remember that if you have more then one forum skin you will have to edit the code thoughout them inorder for it to show.

i hope this helps and can understand my guide. I will look in to trying to make it in to a mod. if you have any further questions please ask.

Renny

Show your support by clicking installed;)

Renny 10-13-2008 01:34 PM

*Reserved*

rooban12 10-14-2008 07:05 AM

thanks for the hack but if you attach a screenshot that would be fine

Magnumutz 10-14-2008 02:58 PM

This is a template edit, NOT a product.

Renny 10-15-2008 12:55 PM

Quote:

Originally Posted by rooban12 (Post 1644699)
thanks for the hack but if you attach a screenshot that would be fine

Picture Added =]

Quote:

Originally Posted by Magnumutz (Post 1644918)
This is a template edit, NOT a product.

Never said it was a product? :S

Fynnon 10-15-2008 07:00 PM

great, thank you !

TilkiBey 10-16-2008 04:17 PM

Quote:

Originally Posted by Renny (Post 1645561)
Never said it was a product? :S

yes u did
why? coz u opened this thread in ADD-ON FORUMS

modifications' for 37x forum


All times are GMT. The time now is 05:29 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.00975 seconds
  • Memory Usage 1,735KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (3)bbcode_php_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (7)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete