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>";
}
|