Avatar IMG Path

All style (template, theme and imageset) related questions for the new release; advice, feedback here please.
Post Reply
Adric
Registered User
Posts: 40
Joined: Tue Feb 15, 2005 10:15 pm

Avatar IMG Path

Post by Adric »

ok, is there a variable for the Avatar IMG path? Currently if you use {AVATAR_IMG} it prints out the entire string, including the <img> bit...

I just need the path to the avatar...
User avatar
Arty
Former Team Member
Posts: 985
Joined: Wed Mar 06, 2002 2:36 pm
Location: Mars
Contact:

Re: Avatar IMG Path

Post by Arty »

{T_AVATAR_PATH}
User avatar
jojobarjo32
Registered User
Posts: 164
Joined: Wed Jun 22, 2005 7:38 pm
Location: France

Re: Avatar IMG Path

Post by jojobarjo32 »

{T_AVATAR_PATH} is just the path to the avatar directory, not to user's avatar ;)
There is no defined variable by default... if you really want one, add in memberlist.php (I assume you talk about the viewprofile...), around line 518 (after 'AVATAR_IMG' => $poster_avatar,) that line :

Code: Select all

			'AVATAR_IMG_PATH'	=> (!empty($member['user_avatar'])) ? (($member['user_avatar_type'] == AVATAR_GALLERY) ? $config['avatar_gallery_path'] . $member['user_avatar'] : $config['avatar_path'] . $member['user_avatar']) : '',
Then in your template, use the variable {AVATAR_IMG_PATH} ;)
User avatar
Highway of Life
Registered User
Posts: 1399
Joined: Tue Feb 08, 2005 10:18 pm
Location: I'd love to change the World, but they won't give me the Source Code
Contact:

Re: Avatar IMG Path

Post by Highway of Life »

Adric wrote: ok, is there a variable for the Avatar IMG path? Currently if you use {AVATAR_IMG} it prints out the entire string, including the <img> bit...

I just need the path to the avatar...
That would depend on where you are trying to call it.
There are built in functions in place to return this string, so if you give details, we’ll be able to point you in the correct direction. ;)
Image
Post Reply