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?


All times are GMT. The time now is 02:03 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.01387 seconds
  • Memory Usage 1,738KB
  • 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
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete