og_block_notifications

Versions
5
og_block_notifications()

Code

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;
    }
  }
}
?>

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.
  • You may post code using <code>...</code> (generic) or <?php ... ?> (highlighted PHP) tags.
  • Web page addresses and e-mail addresses turn into links automatically.

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
Image CAPTCHA
Enter the characters (without spaces) shown in the image.