By User on Wednesday, 19 October 2022
Posted in EasySocial
Replies 1
Likes 0
Views 309
Votes 0
Hello. "All albums" section display users' and cluster's albums.

I'm looking for the way to display cluster (group) title if album was created in cluster. Like on attached screen.

It's important in this case: For example moderator see some "forbidden adult album" in "all photos section". He is angry and ready to delete it. But with this "mark" moderator can understand that album was added to "private adult group" and visible for few users.

I edit file: ...components/com_easysocial/themes/wireframe/albums/items/item.php

In this post we can see similar solution for Videos: https://stackideas.com/forums/ho-to-display-video-s-cluster-title-in-all-videos-page#reply-584596

$cluster = $video->getCluster();
$clusterTitle = null;

if ($cluster) {
$clusterTitle = $cluster->getTitle();
}
But seems for albums there is another method?
Code will not work if simply change $video to $album.
Can you please give me a hint? Thanks.
Hey there,

You can try the following code:

$albumLib = ES::albums($album->uid, $album->type, $album->id);

$cluster = $albumLib->getCluster();
$clusterTitle = null;

if ($cluster) {
$clusterTitle = $cluster->getTitle();
}
·
Wednesday, 19 October 2022 10:27
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post