vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Image as Username (https://vborg.vbsupport.ru/showthread.php?t=210723)

Mysterious2207 04-09-2009 03:29 AM

Image as Username
 
Well ive seen on other vB forums that users have Images as their username. Not sure if its a mod because i cant find it. How can i do this?

Example:
https://vborg.vbsupport.ru/external/2011/07/1.png

Thanks in advance,
Mysterious2207

Cryo 04-09-2009 01:29 PM

There's a couple ways to do this. You can either do a template conditional...

Code:

<if condition="$post[username] == "InsertUN">
    <img src="http://link.to/image" />
<else />
    $post[musername]
</if>

Or add a plug-in to do it. You would hook it to postbit_complete... the code should look like this...

PHP Code:

if ($this->post["username"] == "Username") {
    
$this->post["musername"] = "<img src=\"http://link.to/image\">";
    } 

Obviously if you want more usernames to have it you would keep adding if statements. If you wanted to make it more involved you could add a custom profile field and just do something like...

PHP Code:

if ($this->post["fieldXX"] != "") {
    
$this->post["musername"] = "<img src=\""$this->post["musername"] ."\">";
    } 

Obviously replace "XX" with the number of the field you created. You put a URL in there and it will switch their username to that image.

I can't test all this at the moment, but everything should be correct.

merk_aus 04-10-2009 04:51 AM

Hey mate
Don't know if this will help but am just trying to help
https://vborg.vbsupport.ru/showthread.php?t=198287


All times are GMT. The time now is 04:59 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.01161 seconds
  • Memory Usage 1,718KB
  • 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
  • (2)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (3)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