vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   How do I change a username color? (https://vborg.vbsupport.ru/showthread.php?t=168144)

Senzuri 01-19-2008 03:03 AM

How do I change a username color?
 
How can I do that without making a custom usergroup for the user?

--------------- Added [DATE]1200734672[/DATE] at [TIME]1200734672[/TIME] ---------------

Bump

Opserty 01-19-2008 09:16 AM

Do you mean in a post or everywhere? For just one user or for all users?

Senzuri 01-19-2008 09:22 AM

Quote:

Originally Posted by Opserty (Post 1424300)
Do you mean in a post or everywhere? For just one user or for all users?

Thanks for replying.

I'm looking for a possible hack that has already been made, or a way to change the color for a specific user. (not for a whole usergroup)

Opserty 01-19-2008 10:39 AM

Hmm I'm not sure if there is a mod about. If no-one else posts then you can try this.

1. Create a new Plugin (AdminCP > Plugins & Products > Add New Plugin)
2. Set Hook Location to 'fetch_musername'
3. Use the following Plugin code:
PHP Code:

if($user['userid'] == 1)
{
    
$user['musername'] = '<b>'$user['username'] .'</b>';


4. Change '1' to the userid of the person who's name you want to style.
5. Change the HTML in the single quotes to the markup you want.
6. Set "Plugin is Active" to Yes and hit Save.

Senzuri 01-19-2008 10:49 AM

Quote:

Originally Posted by Opserty (Post 1424337)
Hmm I'm not sure if there is a mod about. If no-one else posts then you can try this.

1. Create a new Plugin (AdminCP > Plugins & Products > Add New Plugin)
2. Set Hook Location to 'fetch_musername'
3. Use the following Plugin code:
PHP Code:

if($user['userid'] == 1)
{
    
$user['musername'] = '<b>'$user['username'] .'</b>';


4. Change '1' to the userid of the person who's name you want to style.
5. Change the HTML in the single quotes to the markup you want.
6. Set "Plugin is Active" to Yes and hit Save.

Thank you... Worked like a charm! :)

Joey Link 11-17-2008 04:03 AM

How would I change this code so I could specify a usergroup instead of a particular user?

BobbyDiesel 11-17-2008 04:47 AM

If you want to change the name color of a usergroup, go into usergroups, edit usergroups, and use the username HTML mark up. Click the question mark beside the box for details.

Joey Link 11-17-2008 04:54 AM

Unfortunately, that doesn't seem to work for me, as the users I want to change are specified in secondary groups and not primaries. I posted about it here -> https://vborg.vbsupport.ru/showthread.php?t=196510


All times are GMT. The time now is 01:44 PM.

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.01536 seconds
  • Memory Usage 1,729KB
  • 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
  • (2)bbcode_php_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (8)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