By Fagault Eric on Friday, 28 July 2017
Posted in General
Replies 16
Likes 0
Views 232
Votes 0
Hello,
I would like to know if you can tell me which tables welcome the information of the groups and the pages?
Best regards.
Eric
Hi there,

Honestly, i am bit lost here actually. Did you meant Database table for both pages and groups? If yes, you can check those on this table "#__social_clusters".

If not, it would be best if you can provide us with more information regarding this for better understanding. Please advice.
·
Friday, 28 July 2017 18:42
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello,
Thank you very much, actually I'm looking for the table that hosts the information about groups and pages.
I'm preparing a module that will display data from its pages.

I see in the table some information about groups, pages ...
But what I'm looking for is where for example (for pages) the number of "I like" are stored, IDs of people who clicked "Like" ...

Best regards.
Eric
·
Friday, 28 July 2017 20:21
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello Eric,

A like on a page is almost identical as members joining a group but you can find all of these nodes under the table of #__social_clusters_nodes . You would want to filter by cluster_id (page id)
·
Friday, 28 July 2017 21:43
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello,
Thank you for your help.
I look at the social_clusters_nodes table, I'm not sure how I can count the amount of "I LOVE" a page for example or how many people are enrolled in a group.
I guess the cluster_id is the id that matches the id of the social_cluster table?

I need to count the number of times that this id is displayed in the cluster_id column of the social_cluster_node table to determine the amount of "LIKE" (for pages) or people enrolled (for groups) to have that amount.
Is it correct ?
Best regards.
Eric
·
Friday, 28 July 2017 23:12
·
0 Likes
·
0 Votes
·
0 Comments
·
Assuming that your page id is 10, running the following query would gather total number of likes per page,


select * from #__social_clusters_nodes where `cluster_id`=10;


Assuming that your group id is 11, running the following query would gather total number of members,


select * from #__social_clusters_nodes where `cluster_id`=11;
·
Friday, 28 July 2017 23:21
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello Mark,
To test I did this:


$idCluster = 3;

$db = JFactory::getDbo();
$query = $db->getQuery(true);
$query->select ('type');
$query->from($db->quoteName('#__social_clusters_nodes'));
$query->where($db->quoteName('cluster_id')." = ".$db->quote($idCluster));

$db->setQuery($query);
$NbUsers = $db->loadResult();


But this does not show the amount of values ​​found
·
Saturday, 29 July 2017 01:12
·
0 Likes
·
0 Votes
·
0 Comments
·
Do not take my previous message into account, I found what was wrong, the ID (idCluster) of the group I was using in my test did not correspond to reality
·
Saturday, 29 July 2017 01:23
·
0 Likes
·
0 Votes
·
0 Comments
·
Thanks for updating I believe your issues are resolved now ?
·
Saturday, 29 July 2017 13:07
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello,
I did what you suggested to count the amount of I like a page, but obviously it shows the number of action on the page (sharing, I like ...) not just the number of I love ?
Best regards.
Eric
·
Monday, 31 July 2017 22:16
·
0 Likes
·
0 Votes
·
0 Comments
·
Not sure what do you mean here eh? What do you mean by "number of action on the page" ?
·
Monday, 31 July 2017 22:38
·
0 Likes
·
0 Votes
·
0 Comments
·
For example:
1 click on I like = 1 action
1 share = 1 share

What I want is to count only the I love, then count the number of post in the thread of the page
·
Monday, 31 July 2017 22:48
·
0 Likes
·
0 Votes
·
0 Comments
·
I would prefer to use this following style, perhaps you can try this and see how it goes.


// your page ID
$idCluster = 29;
$db = JFactory::getDbo();

$query = "SELECT COUNT(*) FROM `#__social_clusters_nodes` AS a";
$query .= " LEFT JOIN `#__users` AS `u`";
$query .= " ON `a`.`uid` = `u`.`id`";
$query .= " WHERE `cluster_id` =" . $db->quote($idCluster);
// check for whether the member get blocked or not
$query .= " AND `u`.`block` = '0'";
// exclude the owner of page user
$query .= " AND `a`.`admin` = '0'";

$db->setQuery($query);
$result = $db->loadResult();
·
Tuesday, 01 August 2017 12:41
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post