Notice

The forum is in read only mode.

Support Forum

Welcome! Support Forums have been reactivated
Welcome the Technical Support section. Help us in assisting you by providing us with a concise and descriptive elaboration of your issues. Be specific and if possible, provide us with a step-by-step instruction in replicating your problem.

"Get album Id" and "Get Album Thumb Cover"

9 years 20 hours ago
Licenses:
JomSocial Expired

Hi there,

Jomsocial documentation explains about a function to get user´s avatar thumb: getThumbAvatar()

I need to get users especific album id by name ( It is a default name to all users) and then get the path to the thumb
cover of this album.

How could I do that? Does exist a function like getThumbAvatar() that I could use in this solution?

I am customizing a thirdpart jomsocial geolocation plugin to show album covers in bubble in the map.

Thanks in advance

9 years 9 hours ago
Licenses:

Hi,

to get albums id you need to user user ID, here the example

include_once JPATH_ROOT.'/components/com_community/libraries/core.php';
include_once JPATH_ROOT.'/components/com_community/libraries/messaging.php';

$photoModel = CFactory::getModel( 'photos' );
$albums = $photoModel->getAllAlbums(644);

foreach ($albums as $album) {
    echo $album->id;
}

please replacing 644 with your user ID.

and about 3rd part, so far I cannot find it. because any 3rd part extensions never "reported" to jomsocial.

Regards

8 years 11 months ago
Licenses:
JomSocial Expired

Hello Albertus,

It worked for me using:

$albums = $photoModel->getAlbums(644);

instead of :

$albums = $photoModel->getAllAlbums(644);

My second question is how can I retrieve cover album thumbnail path? I can see that it is in the resultant array ($albums) but I dont know how to retrieve it because it is inside params.

Thanks in advance

8 years 11 months ago
Licenses:
JomSocial Expired

Sorry, clicked as fixed and it is not.

8 years 11 months ago
Licenses:
JomSocial Expired

Hello Albertus,

It worked for me using:

$albums = $photoModel->getAlbums(644);

instead of :

$albums = $photoModel->getAllAlbums(644);

My second question is how can I retrieve cover album thumbnail path? I can see that it is in the resultant array ($albums) but I dont know how to retrieve it because it is inside params.

Thanks in advance

8 years 11 months ago
Licenses:

Hi,

here the code

foreach ($albums as $album) {
    echo $album->thumbnail;
}

Regards

The following user(s) said Thank You: Daniel Antonio
8 years 11 months ago
Licenses:
JomSocial Expired

Hi Albertus,

It worked like a charm!

Thank you!

Moderators: Piotr Garasiński
Powered by Kunena Forum

Join 180,000 websites creating Amazing communities

JomSocial is the most complete, easy-to-use addon that turns Joomla CMS into a
full -fledged, social networking site

TRY NOW BUY NOW