The Arcive of vBulletin Modifications Site. | 
    |
| 
		 
			 
			#1  
			
			
			
			
			
		 
		
	 | 
||||
		
		
  | 
||||
| 
		
	
		
		
			
			 
			
			When a user logs in, how do you make their avatar show on a specified location of forum?
		 
		
		
		
		
		
		
		
		
	
	 | 
| 
		 
			 
			#2  
			
			
			
			
			
		 
		
	 | 
||||
		
		
  | 
||||
| 
		
	
		
		
			
			 
			
			you'll have to use something like this at the desired location 
		
		
		
		
		
		
		
		
	
	Code: 
	<td class="$bgclass"> <if condition="!$show['guest']"> <if condition="$avatarurl"> <a href="$vboptions[bburl]/profile.php?$session[sessionurl]do=editavatar"><img src="$avatarurl" border="0" alt="$vbphrase[edit_avatar]" /></a></if></if> </td>  | 
| 
		 
			 
			#3  
			
			
			
			
			
		 
		
	 | 
||||
		
		
  | 
||||
| 
		
	
		
		
			
			 
			
			That didn't do it. I have nothing showing up on the forum after pasting this in the header
		 
		
		
		
		
		
		
		
		
	
	 | 
| 
		 
			 
			#4  
			
			
			
			
			
		 
		
	 | 
||||
		
		
  | 
||||
| 
		
	
		
		
			
			 
			
			that code i simply copied from the vbadvanced page... 
		
		
		
		
		
		
		
		
	
	okay try this then, this is from the postbit template Code: 
	<if condition="$show['avatar']"><td class="alt2"><a href="member.php?$session[sessionurl]u=$post[userid]"><img src="$post[avatarurl]" $post[avwidth] $post[avheight] alt="<phrase 1="$post[username]">$vbphrase[xs_avatar]</phrase>" border="0" /></a></td></if>  | 
| 
		 
			 
			#5  
			
			
			
			
			
		 
		
	 | 
||||
		
		
  | 
||||
| 
		
	
		
		
			
			 
			
			That will not work, as the variables required in that statement do not exist until you view a post. You need to create a plugin to fetch the avatar URL, then use that URL.
		 
		
		
		
		
		
		
		
		
	
	 | 
| 
		 
			 
			#6  
			
			
			
			
			
		 
		
	 | 
||||
		
		
  | 
||||
| 
		
	
		
		
			
			 
			
			Wow, that would be too advanced for me.  
		
		
		
		
		
		
		
		
	
	I guess I'd have to look for something else.  | 
| 
		 
			 
			#7  
			
			
			
			
			
		 
		
	 | 
|||
		
		
  | 
|||
| 
		
	
		
		
			
			 
			
			This is what I do for the user avatar on every page. 
		
		
		
		
		
		
		
		
	
	Put this in your config.php PHP Code: 
	
			
	Hook Location: fetch_userinfo Execution order: 5 PHP code: PHP Code: 
	
			
	Also I am using 3.7.0 for the moment and it is working. I just download 3.7.1 about 2 hours ago and haven't got to it yet.  | 
| 
		 
			 
			#8  
			
			
			
			
			
		 
		
	 | 
||||
		
		
  | 
||||
| 
		
	
		
		
			
			 
			
			Just out of curiosity, could you explain what the 3 array items refer to and where they are defined? 
		
		
		
		
		
		
		
		
	
	Code: 
	fetch_avatar_from_userinfo($user, false, true);  | 
| 
		 
			 
			#9  
			
			
			
			
			
		 
		
	 | 
|||
		
		
  | 
|||
| 
		
	
		
		
			
			 
			
			In the function fetch_userinfo(), the userinfo is contain in $user. The second parameter is to fetch the avatar thumb. The third parameter is return fake avatar or no avatar. You can read more info about fetch_avatar_from_userinfo() here.
		 
		
		
		
		
		
		
		
		
	
	 | 
| 
		 
			 
			#10  
			
			
			
			
			
		 
		
	 | 
||||
		
		
  | 
||||
| 
		
	
		
		
			
			 
			
			I don't get it.. I've done how you said and it's still not showing anything :S
		 
		
		
		
		
		
		
		
		
	
	 | 
![]()  | 
	
	
		
		
  | 
	
		
  | 
| X vBulletin 3.8.12 by vBS Debug Information | |
|---|---|
						
  | 
				|
  More Information | 
				|
| 
						 Template Usage: 
						
 Phrase Groups Available: 
						
  | 
					
						 Included Files: 
						
 Hooks Called: 
						
  |