Hi,
I upgraded copyright module to 5.x-1.5 and I noticed that if I select any copyright other than the site default, the copyright node notice gets displayed in the teaser.

Comments

ericbellot’s picture

Possible correction of this bug : the copyright notice must only appear in $page mode.

File : copyright.module ; Line 486 and follow (changes in bold)------


-----------------------------------------------------------------------
function copyright_nodeapi(&$node, $op, $teaser, $page) { // <=== CHANGE
if (variable_get('copyright-enable_'. $node->type, 0)) {
switch ($op) {
case 'view':
if ($page){ // <=== CHANGE
$node_license = copyright_get_node_license($node->nid);
if (!$node_license && $node->parent) {
// $node->parent set at node load time by book.module
$node_license = copyright_parent_node($node->parent);
}
if ($node_license && $node_license->cpyid != variable_get('copyright-default', 1)) {
// The node has a license other than the site's default
$license = copyright_get_license($node_license->cpyid);
$node->content['copyright'] = array(
'#value' => theme('copyright_footer', copyright_notice($license, $node, $node_license)),
'#weight' => 10,
);
drupal_add_css(drupal_get_path('module', 'copyright') .'/copyright.css');
} // <=== CHANGE
}
break;
----------------------------------------------------------------------

Christefano-oldaccount’s picture

Version: 5.x-1.5 » master
Status: Active » Reviewed & tested by the community
StatusFileSize
new1.97 KB

I'm not sure this is actually a bug but I'd like to hide the copyright on teasers, too.

adalan's code works perfectly for me, so here's a patch. I'm marking this RTBC.

Robrecht Jacques’s picture

Version: master » 5.x-1.6
Component: Code » User interface
Category: bug » feature
Priority: Critical » Normal
Status: Reviewed & tested by the community » Fixed

Some people want to display the license on teasers, some don't, so I've added more display options on 'admin/content/types/story' (for example) that allow you to:
1. display or hide the notice on full node pages,
2. display or hide the notice on teasers,
3. display or hide the notice if it is equal to the site-wide default.

This will be included in the next release of copyright (5.x-1.7).

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.

christefano’s picture

Thanks! I just updated and this is working perfectly.