The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
Please Help me with Custom Avatar Code
I need some help modifying code for 3.7 to make custom avatar display on user profile
I have got code displaying the gallery pre defined avatar on a users memberpage Here is the code im using: Code:
$avaurlData = $vbulletin->db->query_first("
SELECT avatarpath FROM " . TABLE_PREFIX . "avatar AS ava2
WHERE ava2.avatarid = " . $vbulletin->userinfo[avatarid] . "
LIMIT 1");
$predefined_url = "<img src=\"" . $vbulletin->options[bburl] . "/$avaurlData[avatarpath]\" alt=\"Avatar\" border=\"0\" />";
Anyone know where I can start for custom avatars or have any code to help me? thanks |
#2
|
||||
|
||||
Have you tried the fetch_avatar_url function?
Code:
require_once('./includes/functions_user.php'); $userid = $user['userid']; $avatarurl = fetch_avatar_url($userid); |
#3
|
||||
|
||||
Ok ive got it done now, Boofo to the rescue again!
I used: Code:
require_once('./includes/functions_user.php'); $userid = $userinfo['userid']; $avatarurl = fetch_avatar_url($userid); if ($avatarurl == '') { $avatarmod = "<a href='member.php?u=$userid'><img src='images/avatars/noavatar.gif' border='0' alt='Avatar'></a></div>"; } else { $avatarmod = "<a href='member.php?u=$userid'><img src='$avatarurl[0]' border='0' alt='Avatar'></a></div>"; } |
#4
|
||||
|
||||
Use this to display the avatar:
HTML Code:
<img class="inlineimg" src="$avatarurl[0]" alt="$user[username]'s Avatar" border="0" />
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|