Dear all,

I need help to get G2 RSS link per user available at Drupal. The idea is, I need to present a link per user at user profile (Advance Profile), that will direct visitor to this user's G2 RSS feed.

Previously, I have integrate grid block + user album link into Advance profile (see http://drupal.org/node/300336#comment-1097637). However, I am lost because I am not really sure how G2 RSS link work.

Can anyone please help? Thanks in advance.

Comments

lismail’s picture

Dear all,

I think the way G2 RSS (simple RSS) link work is by assigning AlbumID. Therefore, does anyone have ever translate Drupal $user->uid into G2 AlbumID? What function need to be executed?

Thank you in advance.

lismail’s picture

Status: Active » Closed (fixed)

Got it!

Here is the code to print current user album_id:

global $user;
$uid = $user->uid;
if (_gallery_init(TRUE)) {
require_once(drupal_get_path('module', 'gallery') .'/gallery_user.inc');
$g2_user = _gallery_user_map($uid, TRUE);
list($ret, $album_id) = GalleryCoreApi::getPluginParameter('module', 'useralbum', 'albumId', $g2_user[$uid]);
print_r ($album_id);
}