Skip to main content
Topic: Bug or feature? ("Don't show users' avatars" setting) (Read 3825 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Bug or feature? ("Don't show users' avatars" setting)

So someone just asked about this over at a test site. They set their profile to not show users' avatars, then wondered why the users' avatars had vanished in posts but were still all over the board index and message index. Their thinking was that if you are going to have a setting to get rid of avs, it should work everywhere. That's why they chose to enable that setting: because they wanted avs gone.

I hadn't thought of this before, but they have a point. Thoughts?
Master of Expletives: Now with improved family f@&king friendliness! :D

Sources code: making easy front end changes difficult since 1873. :P

Re: Bug or feature? ("Don't show users' avatars" setting)

Reply #1

My thoughts may not be important at all, but I think it is no bug. ;)

It is enough for members, that they are allowed to decide, if they want to see avatars in the posts or not. The big avatars in the posts sometimes  can be annoying oder confusing others, but not those little ones in the boardindex, the memberlist and so on. They are an important part of the styling of the forum and it don't will look nice, if they all have gone.

I think, if users don't want to see avatars at all, they should create or use a different theme without any avatars. But I would not like it, I want to "see" the person/the avatar when I write/talk with another user.

Re: Bug or feature? ("Don't show users' avatars" setting)

Reply #2

hmm... tough question.
To answer without answer, there is a bug indeed: because the wording is potentially ambiguous[1], so at the very least it should be expressed in a better way.

Now, let's get more "serious" Spoiler (click to show/hide)
.

First, let's remember that among the options we have also an "Hide the poster information area." that acts somehow similar to the one hiding the avatars (except it hides everything except the name of the member).
Second, I think an important part is understand why people want to hide the avatars: reduce bandwidth usage? Avoid annoying avatars? Just have a cleaner page? Others?
Depending on the reason there may be different answers to the original question I think.

And @Ruth any opinion is important.
In the current form it looks like avatars are removed all over the places, so it's either a bug in the wording or in the working of the feature.
Bugs creator.
Features destroyer.
Template killer.

Re: Bug or feature? ("Don't show users' avatars" setting)

Reply #3

Yeah I'm not sure either. Current way is definitely better for performance, since you don't have to check the members tables for settings all the time.

I was thinking that just for the moment, I might whip up a small mod package that does apply the profile setting to the index pages. Try that out and see how it goes.

Will also ask the person in question about why they want to hide avs.
Master of Expletives: Now with improved family f@&king friendliness! :D

Sources code: making easy front end changes difficult since 1873. :P

Re: Bug or feature? ("Don't show users' avatars" setting)

Reply #4

The addon could be pretty simple, the way I would do it is to tweak the avatars_on_indexes setting just after the value is loaded with the user's choice:
Code: [Select]
<?php

class NoAvatarsOnIndex_Integrate
{
public static function integrate_init_theme($id_theme, &$settings)
{
global $options;

$settings['avatars_on_indexes'] = $settings['avatars_on_indexes'] && empty($options['show_no_avatars']);
}
}
and attach that to the integrate_init_theme hook, so:
Code: [Select]
<hook hook="integrate_init_theme" function="NoAvatarsOnIndex_Integrate::integrate_init_theme" file="SOURCEDIR/NoAvatarsOnIndex.integrate.php" />
added to the package_info.xml.
Bugs creator.
Features destroyer.
Template killer.

Re: Bug or feature? ("Don't show users' avatars" setting)

Reply #5

Eh? :D Where is this stuffz hiding?

(I was going to just throw conditionals into the templates. MWAHAHAHA!)
Master of Expletives: Now with improved family f@&king friendliness! :D

Sources code: making easy front end changes difficult since 1873. :P

Re: Bug or feature? ("Don't show users' avatars" setting)

Reply #6

Apparently the usual reason for wanting to hide avs, at least for these people, is that some sites allow avs that are NSFW and/or not for kids. Which is why they were asking about hiding them everywhere.
Master of Expletives: Now with improved family f@&king friendliness! :D

Sources code: making easy front end changes difficult since 1873. :P

Re: Bug or feature? ("Don't show users' avatars" setting)

Reply #7

Quote from: Antechinus – (I was going to just throw conditionals into the templates. MWAHAHAHA!)
I knew you were going to make things more complicated. :P
 emanuele does happy dance

Quote from: Antechinus – Apparently the usual reason for wanting to hide avs, at least for these people, is that some sites allow avs that are NSFW and/or not for kids. Which is why they were asking about hiding them everywhere.
Good point I feel.
Bugs creator.
Features destroyer.
Template killer.

Re: Bug or feature? ("Don't show users' avatars" setting)

Reply #8

Well I just threw the conditionals in because that's the easiest way of getting it working for that site. Anyway, if it's going to be regarded as a bug and fixed in future versions, you'll be changing the conditionals in the templates, right? You'll be changing them to exactly what I changed them to. ;)

I did look at the Elk docs but they don't say anything much about hooks. :P
Master of Expletives: Now with improved family f@&king friendliness! :D

Sources code: making easy front end changes difficult since 1873. :P

Re: Bug or feature? ("Don't show users' avatars" setting)

Reply #9

Not really, I don't plan to touch the template for something like that. Most likely I'd do what I posted above[1] in Load.php.

The reason I wouldn't change the template is because this is not a "theme" setting, but really an admin/user option and as such it should not be overridden by the theme.
Actually, the Best Way to "fix" this would be not to load the avatars entirely, but for patches it may be a bit too harsh.

That said, I see (still) other potential options:
1) instead of "no avatar" have "show default" (at that point it would be the admin's fault if it is NSFW... and honestly if people browse websites like that should take some responsibility :P),
2) give users not only a all-or-nothing setting (for both avatars and signatures), but make it granular enough to allow for controlling the display of each member (if one particular avatar annoys me, I don't see why I should be forced to hide all of them),
actually, it would be really cool to create patches that use hooks to work instead of change files, but that's not for now.
Bugs creator.
Features destroyer.
Template killer.

Re: Bug or feature? ("Don't show users' avatars" setting)

Reply #10

Well it's already done in the theme anyway, at the moment. At least as far as GenericMessages goes, so I just followed the same pattern. Largely because I couldn't be bothered writing a mod package on my lunch break yesterday. Whereas I can do the template edits, and test them and zip the edited templates, in a couple of minutes.

2) sounds good for fun and games, but would be more of a performance hit. IIRC, anything that calls $options requires hauling up the members table, which is generally not such a good thing. I suppose it comes down to how many performance hits you want to build into default, and how many you want to be able to blame on mods. :D
Master of Expletives: Now with improved family f@&king friendliness! :D

Sources code: making easy front end changes difficult since 1873. :P

Re: Bug or feature? ("Don't show users' avatars" setting)

Reply #11

1) not really: in message index, the way I did it saves at least a couple of JOINs of the attachments table (when loading members data, in the setting is off then the avatar is not even loaded that means the query doesn't have to JOIN twice the attachments table to get any uploaded attachment), so the way I did is a performance saver. ;)

2) ehm... no, $options is loaded irrespective of any usage you do, so there is no performance impact of any kind in using or not the data inside the variable. And $options is not connected to the members table, it was (in the previous life) improperly connected to the themes table, not it has its own table.

In general on the performances: if shared hosts can handle wordpress, they can handle any kind of JOIN I have in mind. :P
Last Edit: June 05, 2016, 01:53:23 pm by Skull Knight
Bugs creator.
Features destroyer.
Template killer.

Re: Bug or feature? ("Don't show users' avatars" setting)

Reply #12

Ok. I stand corrected then. :) Can always do the kosher version later, just for practice, but the quick and dirty version is good for what I wanted yesterday.
Master of Expletives: Now with improved family f@&king friendliness! :D

Sources code: making easy front end changes difficult since 1873. :P

Re: Bug or feature? ("Don't show users' avatars" setting)

Reply #13

Quote it was (in the previous life) improperly connected to the themes table, not it has its own table.
awesomeness!
LiveGallery - Simple gallery addon for ElkArte