function shoutbox_block_view in Shoutbox 7.2
Same name and namespace in other branches
- 7 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;
}
}
}
}