Simple Machines Community Forum

SMF Support => SMF 2.0.x Support => Topic started by: 69Paull on August 06, 2015, 02:48:59 PM

Title: Avatar doesn't show up on topics
Post by: 69Paull on August 06, 2015, 02:48:59 PM
Hi guys! I'm having an issue here and I coudn't fix it by myself. When I upload an avatar to change my profile on the forum, it shows up everywhere but on topics, how to fix it? Here is some screenshots:

On the index:

(http://i.imgur.com/B6crW4R.png)

On topics:

(http://i.imgur.com/yT4AfzR.png)

Thank you.
Title: Re: Avatar doesn't show up on topics
Post by: Illori on August 06, 2015, 02:53:55 PM
does it do the samething if you use the default theme?
Title: Re: Avatar doesn't show up on topics
Post by: Sir Osis of Liver on August 06, 2015, 03:04:03 PM
If you right click on the question mark, does properties show a path to image?
Title: Re: Avatar doesn't show up on topics
Post by: Illori on August 06, 2015, 03:07:40 PM
Quote from: Krash on August 06, 2015, 03:04:03 PM
If you right click on the question mark, does properties show a path to image?


i think the question mark is a default avatar that the theme has added incorrectly. i bet right clicking on the question mark and getting its properties will lead to a path to that image.
Title: Re: Avatar doesn't show up on topics
Post by: Sir Osis of Liver on August 06, 2015, 03:50:50 PM
Probably right.  Which theme are you using?  Have you tried reinstalling it?
Title: Re: Avatar doesn't show up on topics
Post by: 69Paull on August 06, 2015, 04:39:50 PM
Quote from: Krash on August 06, 2015, 03:50:50 PM
Probably right.  Which theme are you using?  Have you tried reinstalling it?

I'm using a theme edited by me. Based on Redsy by SMFTricks.

Right clicking on the image it gives me that path:

extremeracingcrew.com/Themes/ExtremeRacing/images/noavatar.png
Title: Re: Avatar doesn't show up on topics
Post by: Sir Osis of Liver on August 06, 2015, 04:49:25 PM
Yep, that's what Illori said.  What is the path to the avatar you see elsewhere?
Title: Re: Avatar doesn't show up on topics
Post by: 69Paull on August 06, 2015, 04:58:52 PM
Quote from: Krash on August 06, 2015, 04:49:25 PM
Yep, that's what Illori said.  What is the path to the avatar you see elsewhere?

I don't know, it gives me that:

http://extremeracingcrew.com/index.php?action=dlattach;attach=5;type=avatar
Title: Re: Avatar doesn't show up on topics
Post by: 69Paull on August 06, 2015, 05:05:14 PM
Here is the screenshots from the avatar settings of my forum, is there something wrong?

http://i.imgur.com/As1CMg1.png
http://i.imgur.com/iQ5YALR.png
Title: Re: Avatar doesn't show up on topics
Post by: Sir Osis of Liver on August 06, 2015, 05:13:32 PM
Quote from: Illori on August 06, 2015, 02:53:55 PM
does it do the same thing if you use the default theme?
Title: Re: Avatar doesn't show up on topics
Post by: 69Paull on August 06, 2015, 05:20:37 PM
Quote from: Illori on August 06, 2015, 02:53:55 PM
does it do the same thing if you use the default theme?

Yes

(http://i.imgur.com/ebVOxKN.png)
Title: Re: Avatar doesn't show up on topics
Post by: Steve on August 06, 2015, 05:21:52 PM
Compared to my settings, in your second image, I have 'Specific Directory' selected in the dropdown box at the bottom, then the absolute path in the next box and the url in the last one.

Specific Directory

/home/*****/public_html/forums/avatars2

http://forums.**********.com/avatars2
Title: Re: Avatar doesn't show up on topics
Post by: 69Paull on August 06, 2015, 05:25:43 PM
Quote from: Steve on August 06, 2015, 05:21:52 PM
Compared to my settings, in your second image, I have 'Specific Directory' selected in the dropdown box at the bottom, then the absolute path in the next box and the url in the last one.

Specific Directory

/home/*****/public_html/forums/avatars2

http://forums.**********.com/avatars2

Like this?

(http://i.imgur.com/XfwBpQQ.png)
Title: Re: Avatar doesn't show up on topics
Post by: Steve on August 06, 2015, 05:28:26 PM
There shouldn't be a drive letter in the Upload directory box ... and compare what you have to mine format-wise ... obviously your path is going to be different but the format should be the same.

And I should stop responding as I didn't mean to take over Illori and Krash's assistance since they are far more knowledgeable than me.
Title: Re: Avatar doesn't show up on topics
Post by: 69Paull on August 06, 2015, 05:42:32 PM
So lets wait for them, thanks mate  :)
Title: Re: Avatar doesn't show up on topics
Post by: Illori on August 06, 2015, 05:50:05 PM
Quote from: Steve on August 06, 2015, 05:28:26 PM
There shouldn't be a drive letter in the Upload directory box ... and compare what you have to mine format-wise ... obviously your path is going to be different but the format should be the same.

there is a drive letter as the op has a windows server so it is setup differently.

really without being able to see your forum and the issue there is not a lot we can do to help.
Title: Re: Avatar doesn't show up on topics
Post by: 69Paull on August 06, 2015, 05:55:53 PM
Quote from: Illori on August 06, 2015, 05:50:05 PM
Quote from: Steve on August 06, 2015, 05:28:26 PM
There shouldn't be a drive letter in the Upload directory box ... and compare what you have to mine format-wise ... obviously your path is going to be different but the format should be the same.

there is a drive letter as the op has a windows server so it is setup differently.

really without being able to see your forum and the issue there is not a lot we can do to help.

I disabled the maintence mode already, now you can access it.
Title: Re: Avatar doesn't show up on topics
Post by: Illori on August 06, 2015, 06:35:25 PM
you are talking about http://extremeracingcrew.com/index.php?topic=2.0 ? what theme is this based on?

also the directory you are uploading avatars to, should NOT be the avatars directory, it should be another one. if it is the avatars directory that means that anyone that can select an avatar from the gallery will see everyones avatars to select from.
Title: Re: Avatar doesn't show up on topics
Post by: 69Paull on August 06, 2015, 07:21:04 PM
Quote from: Illori on August 06, 2015, 06:35:25 PM
you are talking about http://extremeracingcrew.com/index.php?topic=2.0 ? what theme is this based on?

also the directory you are uploading avatars to, should NOT be the avatars directory, it should be another one. if it is the avatars directory that means that anyone that can select an avatar from the gallery will see everyones avatars to select from.

Yes, I am talking about this. All forum is based on Redsy by SMFTricks.

I fixed the directory thing, thanks.
Title: Re: Avatar doesn't show up on topics
Post by: Illori on August 06, 2015, 08:00:43 PM
// Show avatars, images, etc.?
if (!empty($settings['show_user_images']) && empty($options['show_no_avatars']) && !empty($message['member']['avatar']['image']))
{
echo '
<a href="', $scripturl, '?action=profile;u=', $message['member']['id'], '">
<img src="', $message['member']['avatar']['href'], '" class="img-thumbnail img-circle" alt="*" />
</a>';
}
else
{
echo'
<a href="', $scripturl, '?action=profile;u=', $message['member']['id'], '">
<img src="',$settings['images_url'] ,'/noavatar.png" class="img-thumbnail img-circle" alt="*" />
</a>';
}
if you did not change that code i dont see why it should have this issue. after you changed the avatars folder did you upload the avatar again and see if that helps any?
Title: Re: Avatar doesn't show up on topics
Post by: 69Paull on August 06, 2015, 08:45:42 PM
In which file this code is placed?

e/ Yes, I tried to upload this again but no success, I tried to use one of the avatars from the gallery too but no success as well.

Would it be a modified permission maybe?
Title: Re: Avatar doesn't show up on topics
Post by: 69Paull on August 07, 2015, 02:03:42 PM
So?  :(
Title: Re: Avatar doesn't show up on topics
Post by: Kindred on August 07, 2015, 02:24:40 PM
it's unlikely to be a permissions problem, if that's even possible (I don't think there is any permissions that involves display of the avatar)

The file is Display.template.php -- and it certainly looks as if SOMETHING has improperly edited that file to screw up the avatar location
Title: Re: Avatar doesn't show up on topics
Post by: 69Paull on August 07, 2015, 02:35:41 PM
Quote from: Kindred on August 07, 2015, 02:24:40 PM
it's unlikely to be a permissions problem, if that's even possible (I don't think there is any permissions that involves display of the avatar)

The file is Display.template.php -- and it certainly looks as if SOMETHING has improperly edited that file to screw up the avatar location

I did not change anything on display.template.php while editing the theme. The code is still that:

// Show avatars, images, etc.?

if (!empty($settings['show_user_images']) && empty($options['show_no_avatars']) && !empty($message['member']['avatar']['image']))

{

echo '

<a href="', $scripturl, '?action=profile;u=', $message['member']['id'], '">

<img src="', $message['member']['avatar']['href'], '" class="img-thumbnail img-circle" alt="*" />

</a>';

}

else

{

echo'

<a href="', $scripturl, '?action=profile;u=', $message['member']['id'], '">

<img src="',$settings['images_url'] ,'/noavatar.png" class="img-thumbnail img-circle" alt="*" />

</a>';

}
Title: Re: Avatar doesn't show up on topics
Post by: Kindred on August 07, 2015, 02:47:33 PM
in that case... it would seem that something (default avatar mod?) is interfering with the actual value of
$message['member']['avatar']['image'] and/or $message['member']['avatar']['href']
Title: Re: Avatar doesn't show up on topics
Post by: 69Paull on August 07, 2015, 02:53:09 PM
Quote from: Kindred on August 07, 2015, 02:47:33 PM
in that case... it would seem that something (default avatar mod?) is interfering with the actual value of
$message['member']['avatar']['image'] and/or $message['member']['avatar']['href']

The mods that I have installed in my forums are just these:

(http://i.imgur.com/B1OhG5V.png)

e/ As I could check now, the signatures are not showing up as well.
Title: Re: Avatar doesn't show up on topics
Post by: Kindred on August 07, 2015, 03:05:45 PM
right...

so, if those are the only mods...  then please do the following

1- backup your files to your local drive.
2- reset everyone to the default theme (Curve)
3- Delete everything except the files Settings.php, Settings_bak.php and the Avatars and Attachments directories
4- upload a clean set of files (http://wiki.simplemachines.org/smf/How_to_upload_a_fresh_set_of_files)

Check and confirm if the avatars now show (using the default/curve theme)

If not, upload and run repair_settings.php
save
delete that file

check and confirm again...



Title: Re: Avatar doesn't show up on topics
Post by: 69Paull on August 07, 2015, 03:49:43 PM
Quote from: Kindred on August 07, 2015, 03:05:45 PM
right...

so, if those are the only mods...  then please do the following

1- backup your files to your local drive.
2- reset everyone to the default theme (Curve)
3- Delete everything except the files Settings.php, Settings_bak.php and the Avatars and Attachments directories
4- upload a clean set of files (http://wiki.simplemachines.org/smf/How_to_upload_a_fresh_set_of_files)

Check and confirm if the avatars now show (using the default/curve theme)

If not, upload and run repair_settings.php
save
delete that file

check and confirm again...

I uploaded the fresh set of files and it still doesn't show...

All the paths looks ok on repair_settings.php  :(

(http://i.imgur.com/BxZ5TYk.png)
Title: Re: Avatar doesn't show up on topics
Post by: Kindred on August 07, 2015, 04:07:12 PM
Ok... the broken image in that location is NOT the avatar....    the broken image is for the stars..
http://www.extremeracingcrew.com/Themes/default/images/fundador.png


Since this is not a standard image, and you deleted the files, it makes sense that the image is not visible.


The interesting thing about your thread display is that there is no section even DEFINED for the avatar....




DAMN IT! I found it...

current theme settings
Show user avatars in message view
make sure that is CHECKED
Title: Re: Avatar doesn't show up on topics
Post by: 69Paull on August 07, 2015, 04:17:11 PM
Quote from: Kindred on August 07, 2015, 04:07:12 PM
Ok... the broken image in that location is NOT the avatar....    the broken image is for the stars..
http://www.extremeracingcrew.com/Themes/default/images/fundador.png


Since this is not a standard image, and you deleted the files, it makes sense that the image is not visible.


The interesting thing about your thread display is that there is no section even DEFINED for the avatar....




DAMN IT! I found it...

current theme settings
Show user avatars in message view
make sure that is CHECKED

The broken image about the stars is an other thing, it was because the image was stored at the previous theme path, it's already fixed...

About the avatar: yes, this option is checked, it's kinda frustrating
Title: Re: Avatar doesn't show up on topics
Post by: Kindred on August 07, 2015, 04:24:25 PM
ok.... time to debug code then...

find this section again, in display.template.php
            if (!empty($settings['show_user_images']) && empty($options['show_no_avatars']) && !empty($message['member']['avatar']['image']))

Change it to
            if (empty($options['show_no_avatars']) && !empty($message['member']['avatar']['image']))

if that does not work, try
            if (!empty($settings['show_user_images']) && !empty($message['member']['avatar']['image']))

if not that, then
            if (!empty($settings['show_user_images']) && empty($options['show_no_avatars']))

finally.... if everything else fails, try this
            if (!empty($settings['show_user_images']))

let us know which one you got to before it started working...   that will help us figure out where the logic is failing...
Title: Re: Avatar doesn't show up on topics
Post by: 69Paull on August 07, 2015, 04:28:18 PM
if (!empty($settings['show_user_images']) && !empty($message['member']['avatar']['image']))

This one worked.

(http://i.imgur.com/nq795nG.png)
Title: Re: Avatar doesn't show up on topics
Post by: Steve on August 07, 2015, 04:40:13 PM
Nice work boss man. :)
Title: Re: Avatar doesn't show up on topics
Post by: 69Paull on August 07, 2015, 04:55:27 PM
Now that we have discovered where is the error, do I have to change something left?
Title: Re: Avatar doesn't show up on topics
Post by: Kindred on August 07, 2015, 09:14:18 PM
AH HA!!


Put the code back the way it was...

then go to
Admin > Themes & Layout > Member Options > Configure guest and new user options for this theme
index.php?action=admin;area=theme;th=1;sa=reset

Don't show users' avatars.
Make sure that is UNCHECKED

then
Admin > Themes & Layout > Member Options > Remove all members' options and use the defaults
index.php?action=admin;area=theme;th=1;sa=reset;who=2

I didn't even realize that was an option to be set in that location....
Title: Re: Avatar doesn't show up on topics
Post by: 69Paull on August 08, 2015, 01:16:39 AM
Quote from: Kindred on August 07, 2015, 09:14:18 PM
AH HA!!


Put the code back the way it was...

then go to
Admin > Themes & Layout > Member Options > Configure guest and new user options for this theme
index.php?action=admin;area=theme;th=1;sa=reset

Don't show users' avatars.
Make sure that is UNCHECKED

then
Admin > Themes & Layout > Member Options > Remove all members' options and use the defaults
index.php?action=admin;area=theme;th=1;sa=reset;who=2

I didn't even realize that was an option to be set in that location....

Holy s**t, I didn't know that was an option in that location too, rofl.

I fixed the signature issue using this same method.

Thanks a million mate, you're awesome!  ;)
Title: Re: Avatar doesn't show up on topics
Post by: Steve on August 08, 2015, 09:09:39 AM
So you're all good to go then? If so, just click the 'Mark Topic Solved' button. :)