News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

Avatar doesn't show up on topics

Started by 69Paull, August 06, 2015, 02:48:59 PM

Previous topic - Next topic

69Paull

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?


Kindred

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
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

69Paull

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>';

}

Kindred

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']
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

69Paull

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:



e/ As I could check now, the signatures are not showing up as well.

Kindred

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...



Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

69Paull

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  :(


Kindred

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
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

69Paull

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

Kindred

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...
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

69Paull

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

This one worked.


Steve

DO NOT pm me for support!

69Paull

Now that we have discovered where is the error, do I have to change something left?

Kindred

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....
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

69Paull

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!  ;)

Steve

So you're all good to go then? If so, just click the 'Mark Topic Solved' button. :)
DO NOT pm me for support!

Advertisement: