vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Prepared Avatar URL or Thumbnail (https://vborg.vbsupport.ru/showthread.php?t=201684)

Digital Jedi 01-13-2009 10:42 PM

Prepared Avatar URL or Thumbnail
 
Is there anyway to get the $prepared[avatarurl] or a user's thumbnail avatar in another template besides the Member Info Templates? And can it be done with just a template edit and without the need for a plugin or product?

Bellardia 01-13-2009 11:45 PM

I've been unable to find any other way to access it (that's not to be said there isn't a way).

As it seems the only way I think you'll be able to get it is with a plugin, but I still don't know any defined variables that store it.

Dismounted 01-14-2009 03:40 AM

There is no way to do this without plugins or file edits. If you are wanting to fetch the current user's avatar, set the "AVATAR_ON_NAVBAR" constant to true and use fetch_avatar_from_userinfo(). If you are wanting to fetch another user's avatar, use fetch_avatar_url().

See functions_user.php for both functions.

Digital Jedi 01-14-2009 04:40 AM

That's too bad. I was hoping to pull the thumbnail as part of a style. Can the regular avatar be displayed using just the style? It seemed I did this once before but I can't seem to find where I tired it.

Dismounted 01-14-2009 05:17 AM

Quote:

Originally Posted by Digital Jedi (Post 1711759)
Can the regular avatar be displayed using just the style?

If avatars are stored in the database, you can use image.php?u=USERID.

Digital Jedi 01-14-2009 07:03 AM

Hrm, looks like I'll have to breakdown and delve into a working plugin if I want this to work the way I want. This is new territory for me.

I found the fetch_avatar functions, but where is this AVATAR_ON_NAVBAR constant exactly?

Dismounted 01-14-2009 07:09 AM

You define it as true at init_startup.
PHP Code:

define('AVATAR_ON_NAVBAR'true); 


Digital Jedi 01-14-2009 07:35 AM

Oh, I see. The hook. I'm having trouble understanding how I tie it all together. I guess continued PHP tutorials are in order?

Dismounted 01-14-2009 09:38 AM

A handy tool is a mass search tool (I personally use Actual Search & Replace). Search for "AVATAR_ON_NAVBAR" and you will see what it does.


All times are GMT. The time now is 05:27 AM.

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.01123 seconds
  • Memory Usage 1,727KB
  • 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_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (9)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