- og_block in contributions/og/og.module
- Implementation of hook_block().
og_block_notifications()contributions/og/og.module, line 2450
<?php
function og_block_notifications() {
global $user;
if ($groupnode = og_get_group_context()) {
// only members can see this block
if (in_array($groupnode->nid, array_keys($user->og_groups))) {
$content = t('This group offers a !groupfeed and an !email.', array('!groupfeed' => l(t('RSS feed'), "node/$groupnode->nid/feed"), '!email' => l(t('email subscription'), 'og/manage/'. $groupnode->nid)));
if (module_exists('views') && module_exists('views_rss')) {
// NOTE: See og.css for styling specific to these lists
$content .= t(' Or subscribe to these personalized, sitewide feeds:');
$inline = array('class' => 'links inline');
$l1[] = array('title' => t('feed'), 'href' => 'group/myunread/feed');
$l1[] = array('title' => t('page'), 'href' => 'group/myunread');
$links['my_unread'] = t('my unread: '). theme('links', $l1, $inline);
$l2[] = array('title' => t('feed'), 'href' => 'group/mytracker/feed');
$l2[] = array('title' => t('page'), 'href' => 'group/mytracker');
$links['my_group'] = t('my group: '). theme('links', $l2, $inline);
$l3[] = array('title' => t('feed'), 'href' => 'group/tracker/feed');
$l3[] = array('title' => t('page'), 'href' => 'group/tracker');
$links['all_posts'] = array('data' => t('all posts: '). theme('links', $l3, $inline));
$content .= theme('item_list', $links);
}
$block['content'] = $content;
$block['subject'] = t('Group notifications');
return $block;
}
}
}
?>