Permanant watermark with undo possibility (GD2+IM working!) + better admin tools - Page 24 Permanant watermark with undo possibility (GD2+IM working!) + better admin tools - Page 24
 

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]

Main Menu

Permanant watermark with undo possibility (GD2+IM working!) + better admin tools

Started by Stramm, March 31, 2006, 03:33:15 PM

Previous topic - Next topic

0 Members and 9 Guests are viewing this topic.

Stramm

Try http://www.bukavuonline.com/coppermine/?lang=english to switch to english. The config setting won't work as you think it does. Search the board for more info.

bukavu

I am having problems to find where to set watermarking in my config.php file

I attach it for you to see if possible help me set it please


Stramm

it's not in config.inc.php ... do as suggested, switch to english US and call the configuration by clicking 'Config' in the admin menu.

bukavu

Quote from: Stramm on November 24, 2009, 08:13:00 AM
it's not in config.inc.php ... do as suggested, switch to english US and call the configuration by clicking 'Config' in the admin menu.

I don't have english US, I only have english_gb and english

I followed the suggestion from the first post but I believe I am still missing out to understand somewhere


bukavu

Quote from: Stramm on November 24, 2009, 04:03:08 PM
english.php = english US
again: http://www.bukavuonline.com/coppermine/?lang=english

hello Stramm, can i give you my album admin details to check why is not working for me please..

i've done evrything as directed here but still cannot make it to work

Stramm

you haven't uploaded all necessary modpack files correctly... please do that again as mentioned in the modpack announcemenmt thread

bukavu

Quote from: Stramm on December 09, 2009, 06:55:54 AM
you haven't uploaded all necessary modpack files correctly... please do that again as mentioned in the modpack announcemenmt thread

I have downloaded the picmgmt.inc.zip  which have got only one file inside picmgmt.inc.php

Where else can I download the module pack please

mybfolder

Hey Stramm,
First of all I would like to thank your for your effort, great work you're doing here!

I have a small problem though:
1) I edited all the files as stated in your first three posts.
2) I then replaced the one particular file from your first post with the old file.
3) I uploaded all those files after I made a backup.
4) I set CHMOD to 777/666.
5) I tried to run update.php but got the error config.inc.php was missing.
6) I made a new config.inc.php with user/pw to my db etc. after I discovered I had a config.inc.php.sample laying around somewhere.
7) I ran update.php again and it worked.
8) Now everything is working (watermarking shows up in config, not tested yet though) EXCEPT all my pictures are gone. They are not really gone but nobody can see them.

See for yourself:
http://mybfolder.org

If you need a testacc. please let me know, I figured you maybe don't so I didn't made one (yet).
The weird thing is, that everything works perfectly (top rated, most views, users etc.) just the images can't be displayed.

phill104

You are running version <!--Coppermine Photo Gallery 1.4.19 (stable)--> while the current version is 1.4.25. You will need to upgrade before we can help you.
It is a mistake to think you can solve any major problems just with potatoes.

mybfolder

Maybe I shouldn't overwrite /albums/  ::)
Everything is working again (and I even upgraded), thanks for the quick response anyway!

travelbuff

Sorry I cannot find out which files these are to edit as part of the watermark Mod?
Thanks

Quote from: Stramm on March 31, 2006, 03:34:30 PM
-delete.php
find

function output_table_header()
{
    global $header_printed, $need_caption, $lang_delete_php;

    $header_printed = true;
    $need_caption = true;

echo <<<EOT
<tr>
<td class="tableh2"><b>{$lang_delete_php['npic']}</b></td>
<td class="tableh2" align="center"><b>{$lang_delete_php['fs_pic']}</b></td>
<td class="tableh2" align="center"><b>{$lang_delete_php['ns_pic']}</b></td>
<td class="tableh2" align="center"><b>{$lang_delete_php['thumb_pic']}</b></td>
<td class="tableh2" align="center"><b>{$lang_delete_php['comment']}</b></td>
<td class="tableh2" align="center"><b>{$lang_delete_php['im_in_alb']}</b></td>
</tr>
EOT;
}

function output_caption()
{
    global $lang_delete_php
    ?>
<tr><td colspan="6" class="tableb">&nbsp;</td></tr>
<tr><td colspan="6" class="tableh2"><b><?php echo $lang_delete_php['caption'?></b></tr>
<tr><td colspan="6" class="tableb">
<table cellpadding="1" cellspacing="0">
<tr><td><b>F</b></td><td>:</td><td><?php echo $lang_delete_php['fs_pic'?></td><td width="20">&nbsp;</td><td><img src="images/green.gif" border="0" width="12" height="12" align="absmiddle"></td><td>:</td><td><?php echo $lang_delete_php['del_success'?></td></tr>
<tr><td><b>N</b></td><td>:</td><td><?php echo $lang_delete_php['ns_pic'?></td><td width="20">&nbsp</td><td><img src="images/red.gif" border="0" width="12" height="12" align="absmiddle"></td><td>:</td><td><?php echo $lang_delete_php['err_del'?></td></tr>
<tr><td><b>T</b></td><td>:</td><td><?php echo $lang_delete_php['thumb_pic'?></td></tr>
<tr><td><b>C</b></td><td>:</td><td><?php echo $lang_delete_php['comment'?></td></tr>
<tr><td><b>D</b></td><td>:</td><td><?php echo $lang_delete_php['im_in_alb'?></td></tr>
</table>
</td>
</tr>
<?php
}

and replace with

function output_table_header()
{
    global $header_printed, $need_caption, $lang_delete_php;

    $header_printed = true;
    $need_caption = true;

echo <<<EOT
<tr>
<td class="tableh2"><b>{$lang_delete_php['npic']}</b></td>
<td class="tableh2" align="center"><b>{$lang_delete_php['fs_pic']}</b></td>
<td class="tableh2" align="center"><b>{$lang_delete_php['ns_pic']}</b></td>
<td class="tableh2" align="center"><b>{$lang_delete_php['orig_pic']}</b></td>
<td class="tableh2" align="center"><b>{$lang_delete_php['thumb_pic']}</b></td>
<td class="tableh2" align="center"><b>{$lang_delete_php['comment']}</b></td>
<td class="tableh2" align="center"><b>{$lang_delete_php['im_in_alb']}</b></td>
</tr>
EOT;
}


function output_caption()
{
    global $lang_delete_php
    ?>
<tr><td colspan="7" class="tableb">&nbsp;</td></tr>
<tr><td colspan="7" class="tableh2"><b><?php echo $lang_delete_php['caption'?></b></tr>
<tr><td colspan="7" class="tableb">
<table cellpadding="1" cellspacing="0">
<tr><td><b>F</b></td><td>:</td><td><?php echo $lang_delete_php['fs_pic'?></td><td width="20">&nbsp;</td><td><img src="images/green.gif" border="0" width="12" height="12" align="absmiddle"></td><td>:</td><td><?php echo $lang_delete_php['del_success'?></td></tr>
<tr><td><b>N</b></td><td>:</td><td><?php echo $lang_delete_php['ns_pic'?></td><td width="20">&nbsp</td><td><img src="images/red.gif" border="0" width="12" height="12" align="absmiddle"></td><td>:</td><td><?php echo $lang_delete_php['err_del'?></td></tr>
<tr><td><b>O</b></td><td>:</td><td><?php echo $lang_delete_php['orig_pic'?></td></tr>
<tr><td><b>T</b></td><td>:</td><td><?php echo $lang_delete_php['thumb_pic'?></td></tr>
<tr><td><b>C</b></td><td>:</td><td><?php echo $lang_delete_php['comment'?></td></tr>
<tr><td><b>D</b></td><td>:</td><td><?php echo $lang_delete_php['im_in_alb'?></td></tr>
</table>
</td>
</tr>
<?php
}


find

    $files = array($dir . $file, $dir . $CONFIG['normal_pfx'] . $file, $dir . $CONFIG['thumb_pfx'] . $file);

replace with

    $files = array($dir . $file, $dir . $CONFIG['normal_pfx'] . $file, $dir . $CONFIG['orig_pfx'] . $file, $dir . $CONFIG['thumb_pfx'] . $file);



find

        starttable("100%", $lang_delete_php['del_pic'], 6);
        output_table_header();
        $aid = delete_picture($pid);
        output_caption();
        echo "<tr><td colspan=\"6\" class=\"tablef\" align=\"center\">\n";

replace with

        starttable("100%", $lang_delete_php['del_pic'], 7);
        output_table_header();
        $aid = delete_picture($pid);
        output_caption();
        echo "<tr><td colspan=\"7\" class=\"tablef\" align=\"center\">\n";



editpics.php
find

                        $files=array($dir.$file, $dir.$CONFIG['normal_pfx'].$file, $dir.$CONFIG['thumb_pfx'].$file);

replace with

                        $files=array($dir.$file, $dir.$CONFIG['normal_pfx'].$file, $dir.$CONFIG['thumb_pfx'].$file, $dir.$CONFIG['orig_pfx'].$file);


searchnew.php
find

            if (strncmp($file, $CONFIG['thumb_pfx'], strlen($CONFIG['thumb_pfx'])) != 0 && strncmp($file, $CONFIG['normal_pfx'], strlen($CONFIG['normal_pfx'])) != 0 && $file != 'index.html') {

replace with

            if (strncmp($file, $CONFIG['orig_pfx'], strlen($CONFIG['orig_pfx'])) != 0 && strncmp($file, $CONFIG['thumb_pfx'], strlen($CONFIG['thumb_pfx'])) != 0 && strncmp($file, $CONFIG['normal_pfx'], strlen($CONFIG['normal_pfx'])) != 0 && $file != 'index.html') {


                  
                                    
now just replace include/picmgmnt.inc.php with the attached one

if you want to have the 'automatically downsize watermark on small images' functionality go here http://forum.coppermine-gallery.net/index.php?topic=29817.msg143122#msg143122
(just a minute of extra work and well worth it ;) )

Stramm

First line you quoted:
Quote-delete.php
find

Further down one can read:
Quoteeditpics.php
find
and
Quotesearchnew.php
find

What was the question?

travelbuff

Stramm
I'm sorry again, I didn't realize the first file was actually named delete.  I have done all of the code changes, changed the .zip file to the new one and ran update.php but I do not show any watermark settings in the config section.
When I run update.php I have some files that show a green OK on the right and all of the rest show already done.  Is this correct?
I'm really trying to get this to work.
Thanks

Stramm

That's as it should be. Make sure you switch to the language that you've edited (e.g. english.php -> English US). For that use the language dropdown selector.

travelbuff

Stramm
Ok I removed my coppermine file, reloaded it and updated to the latest version, went slowly through you whole mod and the photo shop. I now see the image watermark in the config.  I added your sample watermark image and I have it set to work on both images but I don't see anything over the photo.  Is there something else I'm missing or a piece of code I can double check.  I went through it twice already.

Thanks

Stramm

Quote from: Stramm on March 31, 2006, 03:33:15 PM
... If you want old images to get the watermark too, then you have to run the admin tools. To make it more comfortable for you I've added an 'auto refresh' feature.
When you're recreating thumbs/ images in the admin tools then you can set an auto refresh flag. If set, the update process auto refreshes and you won't need to click 'continue' anymore.
The big advantage.... you can set the number of images to process to a  low value eg (2-5). Now the chances the script times out are limited. Means you don't need to restart the entire process and sit in front of your monitor for hours clicking 'continue' (if you've a huge number of pics in your db)
You can turn auto refresh on/ and off on the admin tools page
Update thumbs and/or resized photos (1) - (checkbox) Auto refresh (no need to click continue button anymore)
...




travelbuff

Well, I tried that also but still no watermark over the image.  I started with a empty photo gallery so I only have one image in there. I wanted to make sure it worked first.  Anything else I can try?

???

Joachim Müller

Posting the details might help, e.g. a link to your gallery and a deep link to your watermarking image.

Stramm

http upload a file... once that works take care of existing ones (read this thread, look out for chmod and permissions).

If http won't work, check if the path to the watermark file is correct.