Jump to content


Tutorial info Visit support topic

  • Added on: Oct 27 2005 03:29 AM
  • Date Updated: Aug 09 2007 08:33 PM
  • Views: 1241


* * * * *
0 Ratings

Default avatar

Set a default avatar for members that have yet to select one.

Posted by Michael on Oct 27 2005 03:29 AM
This will allow you to define a default avatar image that will be used for members that have not selected an avatar.

Open sources/functions.php. Find:
		if (!$member_avatar or $member_view_avatars == 0 or !$ibforums->vars['avatars_on'])
		{
			return "";
		}
		
		if (preg_match ( "/^noavatar/", $member_avatar ))
		{
			return "";
		}
		
		if ( (preg_match ( "/\.swf/", $member_avatar)) and ($ibforums->vars['allow_flash'] != 1) )
		{
			return "";
		}
Change To:
		if (!$member_avatar or $member_view_avatars == 0 or !$ibforums->vars['avatars_on'])
		{
			return "<img src='{$ibforums->vars['AVATARS_URL']}/noavatar.gif'>";
		}
		
		if (preg_match ( "/^noavatar/", $member_avatar ))
		{
			return "<img src='{$ibforums->vars['AVATARS_URL']}/noavatar.gif'>";
		}
		
		if ( (preg_match ( "/\.swf/", $member_avatar)) and ($ibforums->vars['allow_flash'] != 1) )
		{
			return "<img src='{$ibforums->vars['AVATARS_URL']}/noavatar.gif'>";
		}
Save and upload.

Upload the following image (or an image of your choice) into your forum's html/avatars directory:

Posted Image
Powered by Tutorials 1.3.1 © 2012, by Michael McCune