function shoutbox_group_js_view in Shoutbox 7.2
Same name and namespace in other branches
- 6.2 shoutbox_group/shoutbox_group.module \shoutbox_group_js_view()
- 7 shoutbox_group/shoutbox_group.module \shoutbox_group_js_view()
Javascript callback to handle auto-update shouts
Parameters
$group: The group node
1 string reference to 'shoutbox_group_js_view'
- shoutbox_group_menu in shoutbox_group/
shoutbox_group.module - Implementation of hook_menu().
File
- shoutbox_group/
shoutbox_group.module, line 206
Code
function shoutbox_group_js_view($group) {
// Check URL input
if (is_array($group)) {
$nid = $group['gid'];
}
else {
$node = $group;
}
//$nid=isset($group->etid) ? $group->etid : $group->gid;
//$node=node_load($nid);
if (!og_is_group_type('node', $node->type)) {
print t('Invalid argument supplied.');
exit;
}
// Reset the group context
og_context($group);
// Fetch items as usual
shoutbox_js_view();
}