By Philippe on Saturday, 04 November 2017
Posted in Technical Issues
Likes 0
Views 841
Votes 0
Hello,

All my users have asked their questions from an EasySocial Group.
And I noticed that on the EasyDiscuss user profile, the statistics are wrong.
It is indicated 0 everywhere.

However, if the question is asked from the main menu of EasyDiscuss, it is reflected in the Dashboard.

I conclude that this is a bug, the statistics do not take into account questions asked from EasySocial Groups.

Thank you.
Philippe
It is not a bug and the reason that the counter doesn't reflect the posts they made in the group is due to privacy concerns. If a group is private or invite only, these posts wouldn't show up and we cannot merge the queries in EasyDiscuss with EasySocial as it is going to be too heavy.
·
Saturday, 04 November 2017 18:48
·
0 Likes
·
0 Votes
·
0 Comments
·
Ok I see.
I only use EasyDiscuss from EasySocial Groups.
This dasboard therefore has no interest if I leave it as well.

Can you tell me what files can I modify to include posts related to Groups ?

Thank you Mark
·
Saturday, 04 November 2017 21:25
·
0 Likes
·
0 Votes
·
0 Comments
·
It's a little tricky to modify them but you can look at the method getPostsNumCount in /administrator/components/com_easydiscuss/tables/profile.php
·
Saturday, 04 November 2017 22:07
·
0 Likes
·
0 Votes
·
0 Comments
·
Thank you Mark.
I managed to include on the counter the number of questions from Groups for :

Number Post Posted
I delete this :

// Do not include anything from cluster.
$query .= ' AND '. $db->nameQuote('cluster_id') . '=' . $db->Quote('0');

Number Post Unresolved
DELETE

// Do not include anything from cluster.
$query .= ' AND a.'. $db->nameQuote('cluster_id') . '=' . $db->Quote('0');

Number of Favorites Posts
DELETE

$query[] = 'AND b.' . $db->nameQuote('cluster_id') . '=' . $db->Quote(0);


But I did not manage to include the value of the number of Replies.
Neither to display the posts corresponding to the different tables.
A hint please ?


Thank you.
Philippe
·
Sunday, 05 November 2017 19:34
·
0 Likes
·
0 Votes
·
0 Comments
·
Great This is also from the same model file, http://take.ms/mK3Nd
·
Sunday, 05 November 2017 20:55
·
0 Likes
·
0 Votes
·
0 Comments
·
Thank you Mark!

In the file /administrator/components/com_easydiscuss/models/posts.php, I made this and it works !

Show Questions Posts

$includeCluster = isset($options['includeCluster']) ? $options['includeCluster'] : null;
REPLACED BY (Line 672)

$includeCluster = isset($options['includeCluster']) ? $options['includeCluster'] : true;


Show Unresolved Posts
DELETE

// We do not want to include anything from cluster here.
$query .= ' AND b.' . $db->nameQuote('cluster_id') . ' = ' . $db->Quote(0);


Show Replies Posts

$respectPrivacy = ($this->my->id == $userId) ? false : true;
$includeCluster = false;
REPLACED BY (Line 2887)

$respectPrivacy = ($this->my->id == $userId) ? false : true;
$includeCluster = true;



The only thing left is the Replies counter.
it should be logically in: /administrator/components/com_easydiscuss/tables/profile.php
But no...

A suggestion Mark ?
Thank you again.
·
Sunday, 05 November 2017 21:38
·
0 Likes
·
0 Votes
·
0 Comments
·
That replies count is under this file -> JoomlaFolder/administrator/components/com_easydiscuss/models/users.php

getTotalReplies method
·
Monday, 06 November 2017 09:28
·
0 Likes
·
0 Votes
·
0 Comments
·
Perfect !

I just replaced

$includeCluster = false;
by

$includeCluster = true;

Thank you very much Arlex and Mark for your help.

Otherwise, at each update I should obviously redo the changes.
Do you know software or a way to automate changes?
·
Monday, 06 November 2017 17:08
·
0 Likes
·
0 Votes
·
0 Comments
·
Hey Philippe,

Hm, I am not aware of any software that applies these changes automatically
·
Monday, 06 November 2017 18:22
·
0 Likes
·
0 Votes
·
0 Comments
·
Ok.
·
Monday, 06 November 2017 18:49
·
0 Likes
·
0 Votes
·
0 Comments
·
Thanks Will mark this thread as resolved for now.
·
Monday, 06 November 2017 21:34
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post