Hi,
I have a need where i would like to display photo albums of one particular user only instead of all the users.Currently I am using the following code:
return BxDolService::call('photos', 'get_profile_albums_block', array($this->oProfileGen->_iProfileID), 'Search');
It shows the user's albums only if the user is logged in but I want to show it all across the site for this paticular user. Does anyone has any ideas on how to do that?
Thanks
Armaan
Facebook, Twitter & Instagram Combo - http://bit.ly/1h5CarP |
If it's just one member then just do this.
return BxDolService::call('photos', 'get_profile_albums_block', array(ID of Member), 'Search');
You just replace $this->oProfileGen->_iProfileID with the ID of the member.
So to display albums for the admin, normally member id 1 just do this.
return BxDolService::call('photos', 'get_profile_albums_block', array(1), 'Search'); https://www.deanbassett.com |
Awesome, that worked like a charm...thanks Deano...
Do you know if its possible to extend it to 2 user Ids?
Thanks again,
Armaan
Facebook, Twitter & Instagram Combo - http://bit.ly/1h5CarP |
No. The server call only accepts one ID.
However you can do multiple service calls. The call returns an array usually 4 elements in that array and the first one contains the data you need, so you could do this to display albums of 2 members.
$aCode1 = BxDolService::call('photos', 'get_profile_albums_block', array(1), 'Search'); $aCode2 = BxDolService::call('photos', 'get_profile_albums_block', array(2), 'Search'); echo $aCode1[0] . $aCode2[0]; https://www.deanbassett.com |
No. The server call only accepts one ID.
However you can do multiple service calls. The call returns an array usually 4 elements in that array and the first one contains the data you need, so you could do this to display albums of 2 members.
$aCode1 = BxDolService::call('photos', 'get_profile_albums_block', array(1), 'Search'); $aCode2 = BxDolService::call('photos', 'get_profile_albums_block', array(2), 'Search'); echo $aCode1[0] . $aCode2[0];
Awesome, thanks deano :)
Facebook, Twitter & Instagram Combo - http://bit.ly/1h5CarP |
Thank you for the Code!
It works. But! With the bug...
In this block in the right bottom we can see buttons "Forward" and "To the last Album" (> and ||>).
If I click one of these buttons all the block with albums ... disappears!
So, is it possible to delete these buttons from Albums block or to repair them?
|