How Do i add an avatar on the forumhome? please help!
How Do I..
Collapse
X
-
I know what you mean with forumhome - but I don't know where there.
Anyway, this is one way :
Create a plugin, hook global_start and put in the following code :
Code:if ($vbulletin->userinfo['avatarid']) { $avatar = $db->query_first("SELECT avatarpath FROM " . TABLE_PREFIX . "avatar WHERE avatarid = " . $vbulletin->userinfo[avatarid] . ""); $avatarid = $avatar['avatarid']; $navbaravatar = "<img src=\"" . $vbulletin->options[bburl] . "/$avatar[avatarpath]\" alt=\"Your Avatar\" border=\"0\" />"; } else { if ($avatar = $db->query_first("SELECT dateline, userid FROM " . TABLE_PREFIX . "customavatar WHERE userid = " . $vbulletin->userinfo[userid] . "")) { $navbaravatarurl = ($vbulletin->options['usefileavatar']) ? "" . $vbulletin->options[avatarurl] . "/avatar$avatar[userid]_" . $vbulletin->userinfo[avatarrevision] . ".gif" : "" . $vbulletin->options[bburl] . "/image.php?u=" . $vbulletin->userinfo['userid'] . "&dateline=" . $avatar['dateline'] . ""; $navbaravatar = "<img src=\"$navbaravatarurl\" alt=\"Your Avatar\" border=\"0\" />"; } else { $nouseavatarchecked = HTML_CHECKED; $avatarchecked[0] = ''; $navbaravatar = "<img src=\"" . $vbulletin->options[bburl] . "/$stylevar[imgdir_misc]/noavatar.gif\" alt=\"Your Avatar\" border=\"0\" />"; // "<span class=\"smallfont\">No Avatar<br/ >Specified</span>"; } }
Code:<else /> <td class="alt2" nowrap="nowrap" style="padding:0px"> <!-- login form -->
Code:<td class="alt1"><a href="$vboptions[bburl]/profile.php?do=editavatar">$navbaravatar</a></td>
Or put the code above anywhere you want. Since the hook is global_start you can use it everywhere in your templates.Last edited by Gomjaba; Wed 23 Aug '06, 4:47pm.I'm not under the alkafluence of inkahol like some thinkle peep I am!Comment
widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
Comment