function addtoany_nodeapi in AddToAny Share Buttons 6.2
Same name and namespace in other branches
- 6.3 addtoany.module \addtoany_nodeapi()
Implementation of hook_nodeapi().
File
- ./
addtoany.module, line 57 - Standalone module file to handle AddToAny button integration
Code
function addtoany_nodeapi(&$node, $op, $a3 = NULL, $a4 = NULL) {
switch ($op) {
case 'view':
// Only show comments on the full non-teasered page
if (!$a3 && $a4) {
$types = variable_get('addtoany_nodetypes', array());
$show = !empty($types[$node->type]) && variable_get('addtoany_display_in_nodecont', '0');
$weight = variable_get('addtoany_display_weight', 40);
if ($show) {
$node->content['addtoany'] = array(
'#value' => _addtoany_create_button($node, FALSE),
'#weight' => $weight,
);
}
}
break;
}
}