Skip to main content
Topic: The stats in the profiles (Read 2897 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

The stats in the profiles

Hello!

Some of our users dont't like the "likes" at all. ;)  I don't want to disable the function completely for now, it would be to early. ( And I am sure, that some of our members will use it very often)

 But I made a change in ProfileInfo.template.php here:

Code: [Select]
// What do they like?
/*if (!empty($modSettings['likes_enabled']))
echo '
<dt>', $txt['likes'], ': </dt>
<dd>', $txt['likes_profile_given'], ': ', $context['member']['likes']['given'], ' / ', $txt['likes_profile_received'], ': ', $context['member']['likes']['received'], '</dd>'; */

So they will see the number of Likes no longer in their own or other users profile info.


There is another and more important thing I always was not happy about:

It is not possible to differ beetween the permission of  "may see other users profiles" and "may see the stats in other users profiles". They always see both, if they are allowed to see the profiles.

I think, it would be very good, if this can be changed. Every member should see other members profiles, but they need not to see their personal stats. It is enough, if admins can see all of them. Members should not be so curios.  ;)

Not sure if it make sence, that users see their own personal stats, because they are not working proper. It is not really true, what you can see there, it is irritating, gives wrong impressions.

I cannot explain it well in english, but I try: The stats (in the profiles and in the stats in the boardindex as well) count and show posts, wich are less important in a forum where posts in the boards normally are not counted and if you use no or only some membergroups wich are based on the number of posts the users made. It also always had given a counted post, if you move a topic with a link, even in a board, where post are not counted. If there is a board in a forum, where users are not allowed to write, it will give the impression in the stats, that this is a board which - for example - the admin prefer for his activities in forum, but he is just the only one, who can write there. And so on...

Therefore our members are not allowed to see the stats in the board index. But I would like to show this stats to them, if this stats would be less irritating in a forum like ours.

Is there a possibility to disable it for members that they can see other users personal stats? I can not just "comment out" the link to the personal stats, this would be not a good solution.

It would be a very useful feature, if the stats in the profiles could have their own permissions.
Last Edit: June 03, 2016, 07:57:43 am by Ruth

Re: The stats in the profiles

Reply #1

QuoteIs there a possibility to disable it for members that they can see other users personal stats?
You could do that just by changing the conditional on whatever you want to hide.

Code: [Select]
	if ($context['user']['is_owner'] || $context['user']['is_admin'])
echo ' stuff you want to hide from some people
Master of Expletives: Now with improved family f@&king friendliness! :D

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

Re: The stats in the profiles

Reply #2

Thank you very much, Antechinus!

So - for example - it would be possible to hide the link to the personal stats for users, but still show it to admins?

First it seems to be very simple, but it is too difficult for me. O:-)

This change could be done somewhere here? Please, can you show me how?

Code: [Select]
	// Some links to this users fine work
echo '
<dt>', $txt['profile_activity'], ': </dt>
<dd>
<a href="', $scripturl, '?action=profile;area=showposts;u=', $context['id_member'], '">', $txt['showPosts'], '</a>
<br />';

if ($context['user']['is_owner'] && !empty($modSettings['drafts_enabled']))
echo '
<a href="', $scripturl, '?action=profile;area=showdrafts;u=', $context['id_member'], '">', $txt['drafts_show'], '</a>
<br />';
echo '
<a href="', $scripturl, '?action=profile;area=statistics;u=', $context['id_member'], '">', $txt['statPanel'], '</a>
</dd>';

Re: The stats in the profiles

Reply #3

Code: [Select]
	// Some links to this users fine work
echo '
<dt>', $txt['profile_activity'], ': </dt>
<dd>
<a href="', $scripturl, '?action=profile;area=showposts;u=', $context['id_member'], '">', $txt['showPosts'], '</a>
<br />';

if ($context['user']['is_owner'] && !empty($modSettings['drafts_enabled']))
echo '
<a href="', $scripturl, '?action=profile;area=showdrafts;u=', $context['id_member'], '">', $txt['drafts_show'], '</a>
<br />';
if ($context['user']['is_owner'] || $context['user']['is_admin'])
echo '
<a href="', $scripturl, '?action=profile;area=statistics;u=', $context['id_member'], '">', $txt['statPanel'], '</a>';
echo '
</dd>';

That should work.
Master of Expletives: Now with improved family f@&king friendliness! :D

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

Re: The stats in the profiles

Reply #4

Thank you, Antechinus!

I have tried it, it is working perfect for the link to the stats there.

But users still can see the personal stats from other users, if they use the drop-downs in their profiles. I had vorgotten about this possibility. I have to look where this could be changed, too...


Re: The stats in the profiles

Reply #5

Code: (controllers/Profile.controller.php) [Select]
					'statistics' => array(
'label' => $txt['statPanel'],
'file' => 'ProfileInfo.controller.php',
'controller' => 'ProfileInfo_Controller',
'function' => 'action_statPanel',
'permission' => array(
'own' => 'profile_view_own',
'any' => 'moderate_forum',
),
),

Taking a bit of a guess here, but this should do it. The moderate_forum permission is only available to people who have some admin permissions anyway.
Master of Expletives: Now with improved family f@&king friendliness! :D

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

Re: The stats in the profiles

Reply #6

Very clever! Thank you so much, Antechinus!

It is working perfect.