Without this feature, I can't use the copybox option... I fix it with this hack:
if ( $a4 && variable_get('permalink_display_node_copybox_'. $node->type, FALSE)) {
/**
* Implementation of hook_nodeapi().
*/
function permalink_nodeapi(&$node, $op, $a3 = NULL, $a4 = NULL) {
switch ($op) {
case 'view':
// If this node type is set to display a copybox
//if (variable_get('permalink_display_node_copybox_'. $node->type, FALSE)) {
if ( $a4 && variable_get('permalink_display_node_copybox_'. $node->type, FALSE)) {
$node->content['permalink'] = array(
'#value' => theme('permalink_copybox', $node),
'#weight' => 51,
);
}
break;
}
}
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | permalink-option_to_disable_copybox_in_teaser-1041104-1.patch | 3.43 KB | pverrier |
Comments
Comment #1
pverrier commentedI have the same need. Here's a patch providing two new global options (in admin/settings/permalink) :
These options are global, so the settings apply whatever the node type is, for me it's sufficient but perhaps some users would like to tune these settings for each node type, that's not what I did...
Comment #2
pverrier commentedChange to needs review.