Show Avatar Anywhere
This modification is in the archives.
Okay, I searched all over for this and finally found something that works for 3.0.7 in a post, to help those who don't look outside the Mod Forums for answers I am going to post it here.
I did not code it or figure it out, all credit goes to Gellpak in this post Spoiler (click to open)
Got it. Here's the code. Place this in phpinclude_start
Code:
require_once('./includes/init.php'); require_once('./includes/functions_user.php'); $bbuserinfo['user_avatar']=fetch_avatar_url($bbuserinfo['userid']); $bbuserinfo['user_avatar']="<img src='$vboptions[bburl]/{$bbuserinfo['user_avatar']}' border='0'>"; $bbuserinfo['user_avatar']="<a href='$vboptions[bburl]/profile.php?{$session['sessionurl']}&do=editavatar'>{$bbuserinfo['user_avatar']}</a>"; $welcome_avatar=$bbuserinfo['user_avatar']; Close
Place this at the end of phpinclude_start: Code:
require_once('./includes/init.php'); require_once('./includes/functions_user.php'); $bbuserinfo['user_avatar']=fetch_avatar_url($bbuserinfo['userid']); if ($bbuserinfo['user_avatar']=='') ($bbuserinfo['user_avatar']='images/misc/noavatar.gif'); $bbuserinfo['user_avatar']="<img src='$vboptions[bburl]/{$bbuserinfo['user_avatar']}' border='0'>"; $bbuserinfo['user_avatar']="<a href='$vboptions[bburl]/profile.php?{$session['sessionurl']}&do=editavatar'>{$bbuserinfo['user_avatar']}</a>"; $welcome_avatar=$bbuserinfo['user_avatar']; I corrected his code a bit for people who do not have avatars. Check the URL and file name for whatever image you use for those without an avatar. Also, if you use vBadvanced and want this on the main page somewhere add welcome_avatar to the variable list in vBa CMPS Default Settings in the AdminCP. Download No files for download. Supporters / CoAuthors
|
Similar Mods
Show "No Avatar" Image If No Avatar is Selected | vBulletin 2.x Full Releases |