General PHP Nuke Help - How to set Default Avatar image for Forums??
Bazil - Fri Apr 01, 2005 10:06 pm
Post subject: How to set Default Avatar image for Forums??
How do you set it so that a default image is set for a user if he/she does not set there own avatar image...
There is a file names blank.gif but unless the user chooses an image the URL location for the avatar is SITE/modules/Forums/images/avatars/... and thats it, it does not pull the image..
If a user chooses an avatar, then it works fine, as it is now, I have some test users that have a red X as an avatar.. elllh..
Also the only avatars that do work are the default BS ones that come with it, if a user tries to upload, it will take it, but produce a red X in there avatar...ugg..
Thanks again.
veef - Fri Apr 01, 2005 11:32 pm
Post subject: re: How to set Default Avatar image for Forums??
In modules/Forums/config.php you can set what images you want used like so
<?php
@include("../../mainfile.php");
define('PHPBB_INSTALLED', true);
$images['default_avatar'] = "modules/Forums/images/blank.gif";
$images['guest_avatar'] = "modules/Forums/images/blank.gif";
?>
$images['default_avatar'] = "modules/Forums/images/avatars/gallery/blank.gif";
$images['guest_avatar'] = "modules/Forums/images/avatars/gallery/blank.gif";
//
// Default Avatar MOD - Begin
//
if ( empty($poster_avatar) && $poster_id != ANONYMOUS)
{
$poster_avatar = '<img src="'. $images['default_avatar'] .'" alt="" border="0" />';
}
if ( $poster_id == ANONYMOUS )
{
$poster_avatar = '<img src="'. $images['guest_avatar'] .'" alt="" border="0" />';
}
//
// Default Avatar MOD - End