function oa_user_submitted_render in Open Atrium Core 7.2
Run-time rendering of the body of the block (content type) See ctools_plugin_examples for more advanced info
1 string reference to 'oa_user_submitted_render'
- oa_users_submitted.inc in modules/
oa_users/ plugins/ content_types/ oa_users_submitted.inc
File
- modules/
oa_users/ plugins/ content_types/ oa_users_submitted.inc, line 31
Code
function oa_user_submitted_render($subtype, $conf, $args, $context = NULL) {
if (!isset($context->data)) {
return;
}
$block = new stdClass();
$block->title = '';
$node = $context->data;
$user = user_load($node->uid);
$vars['show_title'] = !empty($conf['node_title']) ? $conf['node_title'] : FALSE;
$vars['title'] = $vars['show_title'] ? theme('head_title') : '';
if (!empty($vars['title'])) {
// Used in the oa_pane_title to supress the page title
$GLOBALS['oa_hide_page_title'] = TRUE;
}
else {
$vars['show_title'] = FALSE;
}
$image_style = !empty($conf['image_style']) ? $conf['image_style'] : 'oa_medium_thumbnail';
$vars['userlink'] = l(format_username($user), 'user/' . $user->uid);
$vars['picture'] = empty($conf['picture']) ? oa_users_picture($user, $image_style) : '';
$vars['align'] = !empty($conf['align']) ? 'right' : 'left';
$vars['show_author'] = !empty($conf['hide_author']) ? FALSE : TRUE;
$date = !empty($conf['date']) ? $node->changed : $node->created;
$vars['label'] = !empty($conf['label']) ? !empty($conf['date']) ? t('Updated') : t('Posted') : '';
$vars['bylabel'] = !empty($conf['label']) ? ' ' . t('by') . ' ' : '';
$vars['date'] = oa_date_format_date($date) . ' - ' . format_date($date, 'custom', 'G:ia');
$block->content = theme('oa_users_submitted', $vars);
return $block;
}