PDA

View Full Version : Show member avatar for guests on custom template page


gigaenvy
03-22-2009, 01:19 PM
Hi,

I am trying to display the avatar of members on a custom template page for non-registered guests who visit. The avatar shows fine if the user is logged in, but for guests and those not logged in I get the GD default Vbulletin image being pulled from image.php?u=0.

Is there a way to show member avatars on custom pages served by Vbulletin?

Current code is the following:



<a href="http://www.domain.com/forums2/profile.php?$session[sessionurl]do=view"><img src="http://www.domain.com/forums2/image.php?u=$bbuserinfo[userid]" alt="Some avatar" border="0" /></a>


Thanks for any help that can be provided.

Dismounted
03-23-2009, 10:11 AM
So you want to show a random avatar for guests?

gigaenvy
03-24-2009, 06:24 PM
So you want to show a random avatar for guests?

Not exactly. I created a new template in my style that serves as a homepage. In the middle column is a listing of threads displayed with postbit of the posting user and the first 100 words to grab the visitors attention and then pull them into a discussion. The template is called from a custom index.php file that fetches this template. Everything works great, except I cannot show the avatar of the user who made the post for either a guest or registered user.

Any ideas on how a guest or registered member can show the avatar of the poster on a custom template page that is driven by VB? There must be something in global.php or somewhere else.