Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: Copyright notice with every image  (Read 4685 times)

0 Members and 1 Guest are viewing this topic.

PeteW1959

  • Coppermine newbie
  • Offline Offline
  • Posts: 16
Copyright notice with every image
« on: April 05, 2012, 04:53:24 pm »

I have just installed Coppermine it seems to do everything I am looking for, great product and thank you!

The only thing I want to do and can't find out how is copyright notices for each image. I am going to have several albums, one for each of several photographers. I want to have a copyright notice displayed with each image, but it needs to be different for each album e.g. Fred Bloggs' album will have "Image copyright Fred Bloggs" and John Doe's album will have "Image copyright John Doe".

Is there a way to do this with just a single entry for each album, or do I have to add it to each image manually?

Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Copyright notice with every image
« Reply #1 on: April 06, 2012, 11:26:46 am »

Do you want to apply a watermark to each album's image, or do you just want to display that text somewhere in the thumbnail/intermediate-view pages?
Logged

PeteW1959

  • Coppermine newbie
  • Offline Offline
  • Posts: 16
Re: Copyright notice with every image
« Reply #2 on: April 06, 2012, 11:36:11 am »

I just want a message displayed somewhere on the intermediate view page. The images already have the photographer's watermark; I just want a reminder that the watermark must stay with the image.
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Copyright notice with every image
« Reply #3 on: April 06, 2012, 11:41:19 am »

I cannot create a mod where that notice is displayed 'somewhere' ;) Please choose a location.

Additionally, how should the
Quote
Image copyright Fred Bloggs
be generated? Is the photographer's name their user name? If so, we can generate it automatically for each page. If not, I need to know how your gallery is structured more detailed. Do they upload their images themselves? Does every photographer have a (or several) separate albums or are there albums which contain pictures from several photographers? A link to your gallery will also help to find the best solution.
Logged

PeteW1959

  • Coppermine newbie
  • Offline Offline
  • Posts: 16
Re: Copyright notice with every image
« Reply #4 on: April 06, 2012, 12:01:04 pm »

The gallery isn't live yet and only has one test album in it. When we go live there will be an album for each photographer, but the album name won't necessarily be the photographer's name, and in addition there will be some general albums that won't need the message. The message is likely to be totally different for each album.

If the message could be displayed under each intermediate image in the album that would be great. It could be set when creating the album in the album properties page (where the album description etc. is entered), that way there can be a custom message for each album, or none at all.

In case it makes a difference I am using a theme, acidtechpurple V2.0.

Regards
Pete
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Copyright notice with every image
« Reply #5 on: April 07, 2012, 04:22:26 pm »

The easiest way would be to abuse the album keyword field (or even better the album description box) and then add a simple mod to display its content next to each album's pictures. Using the album keyword field may cause some unwanted behavior, displaying pictures from other albums in the current album (please read the docs to understand what the album keyword feature does), so it's recommended to use the album description field.

Is it possible in your gallery to use one of the fields to store that information?
Logged

PeteW1959

  • Coppermine newbie
  • Offline Offline
  • Posts: 16
Re: Copyright notice with every image
« Reply #6 on: April 08, 2012, 12:06:57 pm »

The album description box will be needed for album descriptions; there will be sub-albums within each photographer's album and will require a description.

We are unlikely to be using keywords so it could go in there, but as you say it may cause strange behaviour so it is probably not a good idea.

This is turning out to be far more complicated than I thought!
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Copyright notice with every image
« Reply #7 on: April 08, 2012, 02:32:42 pm »

So we either have to add a new field to the albums' properties or we disable the album keyword feature, if you won't use/need it in your gallery.
Logged

PeteW1959

  • Coppermine newbie
  • Offline Offline
  • Posts: 16
Re: Copyright notice with every image
« Reply #8 on: April 10, 2012, 12:13:17 pm »

Obviously the easiest way is to modify an existing field, and I have no plans at the moment to use the keyword field, but it would be good to still have the option in the future.

Putting a new field in would also make the mod useful to a wider range of users, as it could be used for more than just copyright notices.
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Copyright notice with every image
« Reply #9 on: April 16, 2012, 03:37:49 pm »

1. Download the attached file, upload its extracted content to your gallery root and access the file with your browser while logged in as admin

2. Open modifyalb.php, find
Code: [Select]
array($icon_array['keyword'].$lang_modifyalb_php['alb_keyword'].$help['album_keywords'], 'keyword', 0),and below, add
Code: [Select]
array('Copyright info', 'copyright_info', 0),
3. Open db_input.php, find
Code: [Select]
$query = "UPDATE {$CONFIG['TABLE_ALBUMS']} SET title = '$title', description = '$description', category = $category, thumb = $thumb, comments = '$comments', votes = '$votes', visibility = $visibility, alb_password = '$password', alb_password_hint = '$password_hint', keyword = '$keyword'";and replace with
Code: [Select]
$query = "UPDATE {$CONFIG['TABLE_ALBUMS']} SET title = '$title', description = '$description', category = $category, thumb = $thumb, comments = '$comments', votes = '$votes', visibility = $visibility, alb_password = '$password', alb_password_hint = '$password_hint', keyword = '$keyword', copyright_info = '".$superCage->post->getEscaped('copyright_info')."'";
4. Copy the function theme_html_picture from the sample theme to your theme's theme.php file if it doesn't exist. Then, find
Code: [Select]
$CURRENT_PIC_DATA['footer'] = '';and replace with
Code: [Select]
$CURRENT_PIC_DATA['footer'] = mysql_result(cpg_db_query("SELECT copyright_info FROM {$CONFIG['TABLE_ALBUMS']} WHERE aid = {$CURRENT_PIC_DATA['aid']}"), 0);
« Last Edit: April 17, 2012, 11:49:07 am by Αndré »
Logged

PeteW1959

  • Coppermine newbie
  • Offline Offline
  • Posts: 16
Re: Copyright notice with every image
« Reply #10 on: April 16, 2012, 07:33:09 pm »

Hi Αndré,

Thanks so much for this. I have followed the instructions but there is a slight problem.

The box to enter the copyright message appears on the album properties screen, but if I enter anything in it and click update I get a message 'No update needed' and the message is not displayed.

If I enter the message directly in the table field it displays correctly.
Logged

PeteW1959

  • Coppermine newbie
  • Offline Offline
  • Posts: 16
Re: Copyright notice with every image
« Reply #11 on: April 16, 2012, 07:42:10 pm »

Also just noticed that the © symbol does not display
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Copyright notice with every image
« Reply #12 on: April 17, 2012, 11:49:49 am »

Please apply step 3 again, I just updated the code.
Logged

PeteW1959

  • Coppermine newbie
  • Offline Offline
  • Posts: 16
Re: Copyright notice with every image
« Reply #13 on: April 17, 2012, 12:29:50 pm »

Hi Αndré,

That did the trick! Thank you so much for your work on this. My gallery is now ready to go live.

Pete
Logged

PeteW1959

  • Coppermine newbie
  • Offline Offline
  • Posts: 16
Re: Copyright notice with every image
« Reply #14 on: April 18, 2012, 11:55:08 am »

Hi Αndré,

I have made a minor modification to your modification to allow multiple lines for the copyright notice.

Step 2. Changed
Code: [Select]
array('Copyright info', 'copyright_info', 0),To
Code: [Select]
array('Copyright info', 'copyright_info', 3),
Added Step 5. Open theme.php and find
Code: [Select]
$params = array('{CELL_HEIGHT}' => '100',
        '{IMAGE}' => $CURRENT_PIC_DATA['header'].$CURRENT_PIC_DATA['html'].($CURRENT_PIC_DATA['footer']),
Replace with
Code: [Select]
$params = array('{CELL_HEIGHT}' => '100',
        '{IMAGE}' => $CURRENT_PIC_DATA['header'].$CURRENT_PIC_DATA['html'].bb_decode($CURRENT_PIC_DATA['footer']),

Not sure if this is the best way to do it, but it works.
Logged

PeteW1959

  • Coppermine newbie
  • Offline Offline
  • Posts: 16
Re: Copyright notice with every image
« Reply #15 on: April 18, 2012, 12:27:54 pm »

Hi Αndré,

Whoops, hadn't tested it properly and the changes are a little more extensive

Database table cpg15x_albums field copyright_info: Changed field type to Text

Step 2. Changed
Code: [Select]
array('Copyright info', 'copyright_info', 0),To
Code: [Select]
array('Copyright info', 'copyright_info', 10),
Find
Code: [Select]
function form_textarea($text, $name)
{
    global $ALBUM_DATA;

    $value = $ALBUM_DATA[$name];

    echo <<< EOT
    <tr>
        <td valign="top">
            $text
        </td>
        <td valign="top">
            <textarea name="$name" rows="5" cols="40" class="textinput" style="width: 98%;">{$ALBUM_DATA['description']}</textarea>
        </td>
    </tr>

EOT;
}
Insert after
Code: [Select]
function form_copyrighttextarea($text, $name)
{
    global $ALBUM_DATA;

    $value = $ALBUM_DATA[$name];

    echo <<< EOT
    <tr>
        <td valign="top">
            $text
        </td>
        <td valign="top">
            <textarea name="$name" rows="5" cols="40" class="textinput" style="width: 98%;">{$ALBUM_DATA['copyright_info']}</textarea>
        </td>
    </tr>

EOT;
}
Find
Code: [Select]
case 9:
                form_password_protect($element[0], $element[1]);
                break;
Insert after
Code: [Select]
case 10:
form_copyrighttextarea($element[0], $element[1]);
                break;

Added Step 5. Open theme.php and find
Code: [Select]
$params = array('{CELL_HEIGHT}' => '100',
        '{IMAGE}' => $CURRENT_PIC_DATA['header'].$CURRENT_PIC_DATA['html'].($CURRENT_PIC_DATA['footer']),
Replace with
Code: [Select]
$params = array('{CELL_HEIGHT}' => '100',
        '{IMAGE}' => $CURRENT_PIC_DATA['header'].$CURRENT_PIC_DATA['html'].bb_decode($CURRENT_PIC_DATA['footer']),

Not sure if this is the best way to do it, but it works.
Logged
Pages: [1]   Go Up
 

Page created in 0.032 seconds with 19 queries.