vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Graveyard (https://vborg.vbsupport.ru/forumdisplay.php?f=224)
-   -   Mini Mods - Custom Usernames (https://vborg.vbsupport.ru/showthread.php?t=157287)

AllenSam 09-06-2007 10:00 PM

Custom Usernames
 
This is a very simple modification that involves a simple plug-in. I'm sure almost everyone already knows how to do this, but I've had a few people who are new to vBulletin ask me how to do this, so I thought I would post it up for other people like that to find.

With this plug-in, you can mask any user's username with a custom name. You can even have an image as a name.

Set the hook location to fetch_musername and use the following code:

PHP Code:

if ($user['userid']==1){
    
$user['musername'] = "<b><i><u><font color=\"#005599\">AllenSam</font></u></i></b>";


Change the 1 to the user's userid and change the html within the quotes to anything you want your name to be. To use an image you would put:

PHP Code:

if ($user['userid']==1){
    
$user['musername'] = "<img src=\"imageurl.gif\" border=\"0\">";


Make sure you add \'s before any quotes you use within the HTML, or it will result in an error. You can also use single quotes.

If you don't want to make a single plug-in for each user, you can put them all in the same plug-in like this:


PHP Code:

if ($user['userid']==1){
    
$user['musername'] = "<b><i><u><font color=\"#005599\">AllenSam</font></u></i></b>";
}
if (
$user['userid']==2){
    
$user['musername'] = "<img src=\"imageurl.gif\" border=\"0\">";
}
if (
$user['userid']==3){
    
$user['musername'] = "<blink><sub>BillyBob</sub></blink>";



iogames 09-07-2007 09:11 PM

And the purpose? or one sample? :(

Derek Chai 09-07-2007 10:13 PM

Nice.

KHALIK 09-07-2007 10:16 PM

file ? download ... where is the product ?

AllenSam 09-07-2007 10:21 PM

All you need is the plug-in I posted. If you don't know how to add a plug-in, just go down to "Plugins & Products" in the Admin CP, expand it, then click "Add New Plugin."

Vesica 09-08-2007 12:29 AM

Is this what IPB does and makes a username and nickname.

AllenSam 09-08-2007 12:41 AM

It's basically just a mask. You still log in with your normal username, but in posts and stuff your name will show as whatever you put in the HTML. In some places, like where it says "Last post by: Username, it doesn't work though. I'm trying to figure out how to make it so. I'm sure one of the gurus on this site knows, so maybe they'll post it up.

Vesica 09-08-2007 12:54 AM

Quote:

Originally Posted by AllenSam (Post 1334601)
It's basically just a mask. You still log in with your normal username, but in posts and stuff your name will show as whatever you put in the HTML. In some places, like where it says "Last post by: Username, it doesn't work though. I'm trying to figure out how to make it so. I'm sure one of the gurus on this site knows, so maybe they'll post it up.

Yes, what IPB does, this sounds like a great mod, I will install when you finish it.

Iskib 09-08-2007 01:08 AM

To bad there wasn't a mod that would let each user do this on there from usercp

FreshFroot 09-08-2007 08:58 AM

what's the point of masking a username? why not just change it?

Spank 09-08-2007 09:12 AM

^ I suppose so people can change their username and you can keep track of who everybody is.

FreshFroot 09-08-2007 08:07 PM

yeah, but there are addons to request or change usernames :p

As for keeping track? technically only admins would know, what the users unmasked name is..?

corbin joshua 09-09-2007 01:11 AM

Thanks Sammage, this is me - Nightmare!

Chris M 09-09-2007 03:44 AM

There was a Username History Mod that allowed Users to change their Username and it kept a History of the last x Usernames the user had, and had time limits etc built into it, but I'm not sure if it was updated to the latest vB version...

Just so you are aware, you will need to replace the "username" value with an unformatted version of the new username as well as the "musername" value, but to do that you will also need to change the location of where the plugin is activated ;)

Chris

AllenSam 09-09-2007 07:50 PM

Quote:

Originally Posted by FreshFroot (Post 1334727)
what's the point of masking a username? why not just change it?

Quote:

Originally Posted by Spank (Post 1334734)
^ I suppose so people can change their username and you can keep track of who everybody is.

Quote:

Originally Posted by FreshFroot (Post 1334997)
yeah, but there are addons to request or change usernames :p

As for keeping track? technically only admins would know, what the users unmasked name is..?



The point of this isn't to mask your username with another username, it's meant to allow users to use custom formatting or images. For example, instead having AllenSam, I could have AllenSam and someone with the username Zero could use this image as their username:

http://www.rpgpalace.net/images/zeroname.gif


Quote:

Originally Posted by Iskib (Post 1334611)
To bad there wasn't a mod that would let each user do this on there from usercp

Yeah, that's probably possible, but then people could abuse it and mask their name with stupid stuff and it would be hard to keep track of who everyone is, like everyone has been saying in previous posts.

FreshFroot 09-11-2007 04:43 AM

this hack reminds me of vbplaza... with the username changes to image or different formats.

music legend 11-29-2007 02:33 PM

any updates to this??

Evolution06 11-29-2007 03:31 PM

I think this is what Zero Tolerance uses on his site only with the bb code color.. Nice hack.

Derek Chai 11-30-2007 11:58 PM

So where do we put this? How do you add fonts etc..

AllenSam 12-01-2007 06:53 PM

You can use basic HTML to change the font and format.

Derek Chai 12-01-2007 07:10 PM

Yeah I figured that out.

Kreativmind 12-01-2007 07:22 PM

looks nice :)


All times are GMT. The time now is 05:50 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.01258 seconds
  • Memory Usage 1,763KB
  • 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
  • (3)bbcode_php_printable
  • (5)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (22)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