function advanced_forum_forum_mark_read_content_type_render in Advanced Forum 7.2
Same name and namespace in other branches
- 6.2 plugins/content_types/forum_mark_read.inc \advanced_forum_forum_mark_read_content_type_render()
Render the content.
File
- plugins/
content_types/ forum_mark_read.inc, line 24 - Mark read.
Code
function advanced_forum_forum_mark_read_content_type_render($subtype, $conf, $panel_args, $context) {
if (!empty($context) && empty($context->data)) {
return;
}
$tid = 0;
if (!empty($context)) {
$tid = $context->data->tid;
}
$block = new stdClass();
$block->module = 'forum-mark-read';
$block->delta = $tid;
// By default this has no title.
$block->title = '';
_advanced_forum_add_files();
$mar_link = advanced_forum_get_mark_read_link($tid);
$block->content = empty($mar_link) ? '' : '<div class="forum-mark-read">' . advanced_forum_get_mark_read_link($tid) . '</div>';
return $block;
}