You are here

function shoutbox_block_view in Shoutbox 7

Same name and namespace in other branches
  1. 7.2 shoutbox.module \shoutbox_block_view()

Implements hook_block_view().

File

./shoutbox.module, line 138
Shoutbox module displays a block for users to create short messages for the whole site. Uses AHAH to update the database and display content.

Code

function shoutbox_block_view($delta) {
  switch ($delta) {
    case 'shoutbox':
      if (user_access('access shoutbox')) {

        // Prevent block from showing on Shoutbox pages.
        if (arg(0) != 'shoutbox') {

          // Load block data.
          $block['subject'] = t('Shoutbox');
          $block['content'] = shoutbox_view(TRUE);
          return $block;
        }
      }
  }
}