PM Name Suggestions

avatar shows broken link icon - PM Name Suggestions

avatar shows broken link icon

by moose5 » Fri Sep 16, 2016 1:37 am

First, thanks for the great extension!

On my board it shows the no_avatar.gif properly for users that don't have an avatar. Those users that have an avatar, only the broken link picture is shown.

Do you have an idea where I could look to fix that?
Thanks!

V 1.0.4 of this extension.
phpBB 3.1.9
moose5
Registered User
Posts: 31
Joined: Fri Dec 11, 2015 12:05 pm
Contact:

Re: avatar shows broken link icon

by moose5 » Thu Sep 22, 2016 8:59 pm

I did some digging, I think is is because the forum is installed in a folder.
The link goes to a file here: /download/file.php?avatar=6_kkkkkkkkkk.jpeg
When it actually needs to go to here: /forum/download/file.php?avatar=6_kkkkkkkkkk.jpeg

Does anyone know how I can force it to do that?
Avatars in all other locations on the forum show up fine.

Thanks for any suggestions!
moose5
Registered User
Posts: 31
Joined: Fri Dec 11, 2015 12:05 pm
Contact:

Re: avatar shows broken link icon

by moose5 » Sun Oct 30, 2016 2:38 pm

Hardcoding fix:

in /controller/controller.php
find

Code: Select all

if ($avatar_image == '')
                        {
                            $avatar_image = '<img src="' . $default_avatar_url . '"/>';
                        }

then add in a new line below

Code: Select all

else
                  {
                     $pos=strpos($avatar_image, "." ,4);
                     $avatar_image = substr_replace($avatar_image, "forum/" , $pos, 0);   
                  }


Replace

Code: Select all

"forum/"
with the name of the subfolder your forum is in.

Yes, I am aware this is not a perfect solution that works in all circumstances, but fixed it for me.
moose5
Registered User
Posts: 31
Joined: Fri Dec 11, 2015 12:05 pm
Contact:

Re: avatar shows broken link icon

by MarkusWME » Wed Dec 07, 2016 9:53 pm

I have searched a while, but with the new release v1.0.5 which is now available on GitHub it should work without any problems.

It can be downloaded here: https://github.com/MarkusWME/phpBB---PM ... -1.0.5.zip

It worked in my test environment. Please tell me if it works for you too or if it solved the problem just for me.
User avatar
MarkusWME
Registered User
Posts: 49
Joined: Thu Mar 17, 2016 1:04 am
Contact: