How to set Default Avatar image for Forums??

  Post new topicReply to topicPrintable Version
<< View previous topic View next topic >>
Share: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
#1   How to set Default Avatar image for Forums??
Bazil
CZ Super Newbie
Bazil has been a member for over 20 year's 20 Year Member
usa.gif florida.gif
Website:
Status: Offline
Joined: Dec 09, 2004
0.01 posts per day
Posts: 49
Points: 1,505
   
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.



Back to top Reply with quote
#2   re: How to set Default Avatar image for Forums??
veef
CZ Super Newbie
veef has been a member for over 19 year's 19 Year Member
Gender: Male
Status: Offline
Joined: Dec 30, 2004
0.01 posts per day
Posts: 59
Points: 1,422
   
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";

?>


and for the uploaded avatars check to make sure the avatar directory has write permissions


Back to top Reply with quote
#3   re: How to set Default Avatar image for Forums??
Bazil
CZ Super Newbie
Bazil has been a member for over 20 year's 20 Year Member
usa.gif florida.gif
Website:
Status: Offline
Joined: Dec 09, 2004
0.01 posts per day
Posts: 49
Points: 1,505
   
I had added the 2 lines :
$images['default_avatar'] = "modules/Forums/images/avatars/blank.gif";
$images['guest_avatar'] = "modules/Forums/images/avatars/blank.gif";

to that file in the propper place but it still will not call to the image... gonna have to dig into it more..

as for checking to see if that file is writable, how would I do that ?

Thanks again...



Back to top Reply with quote
#4   re: How to set Default Avatar image for Forums??
veef
CZ Super Newbie
veef has been a member for over 19 year's 19 Year Member
Gender: Male
Status: Offline
Joined: Dec 30, 2004
0.01 posts per day
Posts: 59
Points: 1,422
   
Sorry that was what i had done for an older version, the newer version the code is in viewtopic.php
        $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


As for the write permissions you need to ftp into your server and CHMOD it to 755, it depends on which ftp client you use but generally if you right click the directory you should see the CHMOD command.


Back to top Reply with quote
#5   re: How to set Default Avatar image for Forums??
Bazil
CZ Super Newbie
Bazil has been a member for over 20 year's 20 Year Member
usa.gif florida.gif
Website:
Status: Offline
Joined: Dec 09, 2004
0.01 posts per day
Posts: 49
Points: 1,505
   
OK getting closer now, haha..

I added the 2 lines of:
$images['default_avatar'] = "modules/Forums/images/avatars/gallery/blank.gif";
$images['guest_avatar'] = "modules/Forums/images/avatars/gallery/blank.gif";
Just before the line:
// Default Avatar MOD - Begin

and that worked for the forums postings if the user did not choose a default or if an anon. posts.. but as for the users profiles itself under the YOUR account link it still does not pull any avatar data red X again.. If I am undestanding this correct I think I will need to add those 2 lines to every page that renders the avatar. Am I getting closer?? I hope so. LOL


as for the uploads I found that too, I had changed it via FTP client to 777 for the folder, done..


Baby steps the only way to learn, I love it...thanks for the help !!



Back to top Reply with quote
#6   re: How to set Default Avatar image for Forums??
veef
CZ Super Newbie
veef has been a member for over 19 year's 19 Year Member
Gender: Male
Status: Offline
Joined: Dec 30, 2004
0.01 posts per day
Posts: 59
Points: 1,422
   
No you do not need to add these lines anywhere else they are just to set what image you would like for users who do not choose an avatar, and anon users. For users who choose an avatar from the gallery that should show up if the path is correct in your forum configuration(which by default should be unless changed), for usesr who had uploaded they will need to upload again as it was never saved because the directory did not have write permissions. This applies to the avatar shown on your account page as well.



Back to top Reply with quote
Display posts from previous:      
Add To: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
<< View previous topic View next topic >>
Post new topicReply to topic

Jump to 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum