vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=113)
-   -   User's avatar placeable everywhere (trivial, but requested) (https://vborg.vbsupport.ru/showthread.php?t=100254)

The M.I.P. 11-05-2005 10:00 PM

User's avatar placeable everywhere (trivial, but requested)
 
This trivial plugin allows to place a user's avatar (nearly) everywhere in the templates (it defines $vbulletin->userinfo['avatarurl'] and $vbulletin->userinfo['avatarsize'] or - when using legacy variables - $bbuserinfo['avatarurl'] and $bbuserinfo['avatarsize']).

Sorry for posting something that simple, but it was requested.

EXAMPLE USAGE:
(install "avatarplaceableeverywhere.xml" plugin before)
HTML Code:

<if condition="$bbuserinfo[avatarurl]">
        <img src="$bbuserinfo[avatarurl]" $bbuserinfo[avatarsize] alt="<phrase 1="$bbuserinfo[username]">$vbphrase[xs_picture]</phrase>" />
</if>

SCREENSHOT:

jugo 11-06-2005 11:06 PM

That is by far one of the most useful "trivial" hacks yet.

I'm sure many will agree when I say, THANK YOU!!!

rb290 11-06-2005 11:39 PM

hey how did you make yours look like that

this is what mines looks like and it makes it have some empty space that doesnt look good:

https://vborg.vbsupport.ru/external/2005/11/14.jpg

lexx27 11-07-2005 12:52 AM

Great! Thanks

The M.I.P. 11-07-2005 03:00 AM

Quote:

Originally Posted by rb290
hey how did you make yours look like that

this is what mines looks like and it makes it have some empty space that doesnt look good:

http://tinypic.com/fdvo1i.jpg

This is a matter of the HTML code you used in your templates, not a problem of this plugin.

At the first glance, it looks like you placed your avatar pic in a different table cell than the welcome message, but without posting relevant parts of your template or the generated HTML output, it's not possible to tell what could be changed to get the results you want.

Oblivion Knight 11-07-2005 05:19 AM

Does this run any extra queries on pages where the avatar is additionally added to?

The M.I.P. 11-07-2005 05:46 AM

Quote:

Originally Posted by Oblivion Knight
Does this run any extra queries on pages where the avatar is additionally added to?

Yes - it calls fetch_avatar_url() function from includes/functions_user.php which in turn needs one query to pull the avatar data from the database.

Cyricx 11-07-2005 11:13 AM

Nice!! This will actually help me out alot :)

lexx27 11-07-2005 02:42 PM

Great but how can i get it to work on the header of the vbadvanced?

edit: I mean that on the forums it works great. But on the vba pages it shows a X. What should i do abou it???
I placed the code inside the header template

Madmp3zz 11-07-2005 03:05 PM

Pretty cool hack..

I was just checking out your message board.
I was wondering if you could tell me how you added the left column with the links.

I have found the add left column hack but, I would like to know how you got the sub-menu dropdown to work.
I want mine to look almost like that.

Can u point me in the right direction or can u PM me the code?


All times are GMT. The time now is 11:18 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.01092 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
  • (1)bbcode_html_printable
  • (2)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