The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
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?
|
#2
|
|||
|
|||
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. |
#3
|
||||
|
||||
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. |
#4
|
||||
|
||||
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.
|
#5
|
||||
|
||||
If avatars are stored in the database, you can use image.php?u=USERID.
|
#6
|
||||
|
||||
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? |
#7
|
||||
|
||||
You define it as true at init_startup.
PHP Code:
|
#8
|
||||
|
||||
Oh, I see. The hook. I'm having trouble understanding how I tie it all together. I guess continued PHP tutorials are in order?
|
#9
|
||||
|
||||
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.
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|