How Do I..

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • vbcore
    Senior Member
    • Sep 2004
    • 370
    • 3.0.7

    How Do I..

    How Do i add an avatar on the forumhome? please help!
  • Gomjaba
    Senior Member
    • Jan 2005
    • 970
    • 3.5.x

    #2
    Originally posted by vbcore
    How Do i add an avatar on the forumhome? please help!
    Not sure what you mean ... where exactly do you want to have it ?
    I'm not under the alkafluence of inkahol like some thinkle peep I am!

    Comment

    • slappy
      Senior Member
      • Apr 2003
      • 1206

      #3
      Using the search button with "avatars on forumhome" (without the quotes) I found this suggestion:



      Might help.

      Regards,
      Slappy

      Comment

      • Gomjaba
        Senior Member
        • Jan 2005
        • 970
        • 3.5.x

        #4
        Originally posted by slappy
        Still don't quite get where this will be displayed tbh ..
        I'm not under the alkafluence of inkahol like some thinkle peep I am!

        Comment

        • vbcore
          Senior Member
          • Sep 2004
          • 370
          • 3.0.7

          #5
          It would be displayed on my forumhome - but I just tried that and it failed miserable Any other suggestions? Do i possibly need to add something to my index.php file?

          Comment

          • Gomjaba
            Senior Member
            • Jan 2005
            • 970
            • 3.5.x

            #6
            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'] . "&amp;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>";
            	} 
            }
            Now look in your navbar template for

            Code:
            	<else />
            		
            		<td class="alt2" nowrap="nowrap" style="padding:0px">
            			
            		<!-- login form -->
            and add above

            Code:
            <td class="alt1"><a href="$vboptions[bburl]/profile.php?do=editavatar">$navbaravatar</a></td>
            This will be the result :



            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.
            Working...