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 ... 7 8 9 10 [11] 12 13 14 15 ... 26   Go Down

Author Topic: Permanant watermark with undo possibility (GD2+IM working!) + better admin tools  (Read 385110 times)

0 Members and 1 Guest are viewing this topic.

Stramm

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 6006
    • Bettis Wollwelt

Now a little word to your statement I haven't read what you've written. Of course I have. I admit that sometimes I do not quite understand what some people mean. However what you've written I understood without having to read it a second time.

1st post:
Quote
Can't you somehow put a chmod() command into one of the PHP files to automatically set the image permissions to 666?

I've answered that question and I can't give you another answer. Short explanation of permissions.

2nd post:
Quote
... but what I'm asking is wouldn't it be more simple to actually write a chmod command into the PHP file that handles batch uploaded images?

I answered that question too, that coppermine already chmods files but not the original you uploaded by FTP. Again I explained permissions.

and without further explaining your thoughts you've written
Quote
Esp. read this comment: http://www.php.net/manual/en/function.chmod.php#73147

Hmm, you've talked about php chmodding, now you introduce a link to php ftp commands. And as said without explaining what you want to do with it. I ignored that link cause it'll mean
a) you ask me to rewrite the batch upload process? But this is a watermark mod thread, not in any way related to modifying the batch uploading
b) the already mentioned timeout problems
c) ftp functions aren't enabled by default. Means 500% more support requests. My time is limited
d) again, batch uploading isn't related
 
3rd post:
Quote
Yeah,  I guess you are still not understanding me.   Huh

If you actually followed the links I showed you in the last post,  you'd see that you're able to use PHP code to connect ****VIA FTP**** and change the file permissions on the fly. So this would in a sense "automate" the Batch Uploading process as it was originally intended,  instead of uploading, changing permissions, and then finally batch uploading in Coppermine.  No extra steps,  no extra hassle,  no constantly forgetting to change the damn file permissions after you upload.

finally you explain what you mean and what shall I say... my fears came true, see my thought to your 2nd post. Again I answered your post.

So now tell me what was wrong with all my answers. If you reread what you've written you'll notice that your understanding of the permissions concept isn't really clear. At least I never was sure if you  got it. And as it looks like, GauGau is thinking the same. So he explained permissions again to you.

That he's making fun of me shouldn't be your concern. Neither GauGau nor I'm native english speaking (not difficult to see) so I now just assume you didn't get what he meant. In any case, calm down, no one here wanted to make fun of you but all tried to help you and answered your questions.

Still, my patience is limited so I'm out of this discusson.

jw0ollard

  • Coppermine newbie
  • Offline Offline
  • Posts: 12

Everything mean I said was directed towards GauGau.  No hard feelings toward you, Stramm. :)   No need to explain yourself, either.. I never thought anything you said was wrong.

I fully understand all of your reasoning about not including something like this.  I'm sorry my simple question/suggestion turned into an argument,  but I *could* tell that you weren't fully understanding me.  Sorry I wasn't more clear.

And about the Transparency option.   Sorry, didn't read the first post!  :)  I'll just remove the non-GD2 options then.  I'm setting up the CPG for someone else and it will only confuse them if I don't remove it.  This was also the reason I was asking about a way to make the Batch Upload process work better with your mod,  since I wasn't sure the person would know how to CHMOD files.
Logged

jackbremer

  • Coppermine newbie
  • Offline Offline
  • Posts: 9

bloomin' marvellous!  ;D
I backed everything up, followed the instructions, and when I re-read them found I needed to access update.php - once I'd done that it was plain sailing!
Many thanks for a useful plugin - can't wait for this to be included in the core code by default.
Logged

Gatsu

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 3
    • www.philthursotn.net

Hey! ok I thought I had this working I went into my config menu and the Image watermarking option was available and there was one in admin tools as well. Just the Settings don't get saved. I have re put in the code but this problem is still there. I put all my permissions for files to 644 Now I have tried to run the update.php but this is what I get:

$file); } } closedir($dir); return $thumbs; } elseif ($folder == $search_folder) { // Search folder is the same as coppermine images folder; just return the array return $thumbs; } else { // Search folder is the different; check for files in the given folder $results = array(); foreach ($thumbs as $thumb) { if (is_file($search_folder.$thumb['filename'])) { $results[] = array('filename' => $thumb['filename']); } } return $results; } } // ----------------------------- TEST FUNCTIONS ---------------------------- // function test_sql_connection() { global $errors, $CONFIG; if (! $connect_id = @mysql_connect($CONFIG['dbserver'], $CONFIG['dbuser'], $CONFIG['dbpass'])) { $errors .= "
Could not create a mySQL connection, please check the SQL values in include/config.inc.php

MySQL error was : " . mysql_error() . "

"; } elseif (! mysql_select_db($CONFIG['dbname'], $connect_id)) { $errors .= "
mySQL could not locate a database called '{$CONFIG['dbname']}' please check the value entered for this in include/config.inc.php

"; } } // ------------------------- HTML OUTPUT FUNCTIONS ------------------------- // // Moved to include/update.inc.php -- chtito // ------------------------- SQL QUERIES TO CREATE TABLES ------------------ // function update_tables() { global $errors, $CONFIG; //$PHP_SELF = $_SERVER['PHP_SELF']; $gallery_dir = strtr(dirname($_SERVER['PHP_SELF']), '\\', '/'); $gallery_url_prefix = 'http://' . $_SERVER['HTTP_HOST'] . $gallery_dir . (substr($gallery_dir, -1) == '/' ? '' : '/'); $db_update = 'sql/update.sql'; $sql_query = fread(fopen($db_update, 'r'), filesize($db_update)); // Update table prefix $sql_query = preg_replace('/CPG_/', $CONFIG['TABLE_PREFIX'], $sql_query); $sql_query = remove_remarks($sql_query); $sql_query = split_sql_file($sql_query, ';'); ?>
Performing Database Updates
"; if (@mysql_query($q)) { echo ""; } else { echo ""; } } echo "
$q   OK   Already Done
"; } // --------------------------------- MAIN CODE ----------------------------- // // The defaults values $table_prefix = $_POST['table_prefix']; $DFLT = array('lck_f' => 'install.lock', // Name of install lock file 'cfg_d' => 'include', // The config file dir 'cfg_f' => 'include/config.inc.php', // The config file name 'alb_d' => 'albums', // The album dir 'upl_d' => 'userpics' // The uploaded pic dir ); $errors = ''; $notes = ''; // The installer html_header("Coppermine - Upgrade"); html_logo(); test_fs(); if ($errors != '') html_prereq_errors($errors); else { test_sql_connection(); if ($errors == '') { update_tables(); update_system_thumbs(); } else { html_error($errors); } if ($errors == '') { html_install_success($notes); } else { html_error($errors); } } html_footer(); ?>

Do you think I did something wrong?
Logged
[

Stramm

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 6006
    • Bettis Wollwelt

Have you carefully read the first post of this thread? And is there a reason for the code mess you posted?

Gatsu

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 3
    • www.philthursotn.net

I'm sorry I will use simple words.

I followed everything
I repeat everything

problem:
Watermark Config not save.
Update.php not work.

Update.php result:
Code: [Select]
Server error!

The server encountered an internal error and was unable to complete your request.

Error message:
Premature end of script headers: update.php

If you think this is a server error, please contact the webmaster.
Error 500
family.philthurston.net
Sat Jul 7 03:18:52 2007
Apache/2.0.54 (Debian GNU/Linux) mod_auth_pgsql/2.0.2b1 mod_ssl/2.0.54 OpenSSL/0.9.7e

sql/update.sql= yes updated

Yes I read 1st post
again and again and again

Code mess was update.php from FTP interface
Logged
[

Stramm

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 6006
    • Bettis Wollwelt

Make sure your changes to update.sql match the instructions. Reupload sql/update.sql and update.php (from the coppermine package). Make sure you overwrite the files and do not append.

Gatsu

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 3
    • www.philthursotn.net

Thank you

It works

I forget most users are german

New Problem:

ImageMagick is supported on my webhost but is not core. I change ImageMagick settings in config menu. it not work. I know there is no support for imagemagick here.

Do you know of a program to change http://family.philthurston.net/images/sitelogosmall.png to 49% Transparency?
Logged
[

Stramm

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 6006
    • Bettis Wollwelt

Every image editing should be able to do that (layer transparency). Photoshop, Gimp, Corel Paint ...

AvrilBoi

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 61

Oh one thing.
I dont want that the script makes orign_flie.jpg cause i dont need.
How can i disable this option??
you'll have to modify picmgmnt.inc.php
delete
Code: [Select]
if (!file_exists($orig) && $CONFIG['enable_watermark'] == '1' && ($CONFIG['which_files_to_watermark'] == 'both' || $CONFIG['which_files_to_watermark'] == 'original'))  {
// if copy of full_sized doesn't exist and if watermark enabled and if fullsized pic watermark=true -> then we need a backup
if (!copy($image, $orig))
                return false;
else
$work_image = $orig;
}

not tested, no guarantee ;)
after that modification you're not able to undo the watermarking
I still get the orig_ file saved in the album folder... Could you please look better into it? I really don't want that file to be saved :-[
Logged

Stramm

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 6006
    • Bettis Wollwelt

have you read my posting??
Quote
... not tested, no guarantee ...

however, if you really did as said and you deleted that code, then no backup file will be created for all files uploaded after that modification. Test that. To get rid of the backup images for pics uploaded before the modification... use the shell (if you o not know how to do that -> google).

 

AvrilBoi

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 61

Sorry, I didn't specify one important thing.
I am watermarking old files with the admin utility, I didn't try to upload new files yet. So it is through the admin utility that the orig_ file gets saved, and I don't want it to be saved.
Logged

Stramm

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 6006
    • Bettis Wollwelt

The code modification doesn't create new backup images. If they already are on your server do what I've posted above and delete the orig_ files using the shell. The admin tools won't delete them.

http://man.linuxquestions.org/index.php?query=rm&section=0&type=2

AvrilBoi

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 61

I think it creates orig_ files instead.
The old albums contain unwatermarked images. After I watermark them, in the directory of files there are the orig_* files. So before deleting the orig_files using the shell, I'd like the admin utility not to create them.
Logged

Stramm

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 6006
    • Bettis Wollwelt

upload a test file, check if you've made the changes and if you've overwritten include/picmgmnt.inc.php with your modified version

post a link and a testuser account, zip up and attach your picmgmnt.inc.php with your next post

AvrilBoi

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 61

I PMed you with all the necessary info.
Logged

Stramm

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 6006
    • Bettis Wollwelt

A nonadmin testuser account is enough. I do not need to batch add cause it's using the same functions as the http upload. If that works as expected, then the batch add does the same. Before I can test, you should get it installed properly. I'm getting errors when trying to http upload -> search the board for that.
Your modified picmgmnt.inc.php looks OK, means it can't create backup images anymore. The necessary command is gone. If you replaced the one on the server with the one you sent me, all should be smooth. Then you just need to delete old backup images from your server. As already said two times, not with the admin tools but using the shell.

AvrilBoi

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 61

But I just need it to watermark old albums, since the images I'm going to upload are already watermarked. That's why I need to use the admin tool to watermark old albums...
Logged

Stramm

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 6006
    • Bettis Wollwelt

We're talking here about the backup images?? Don't we

ashbash85

  • Coppermine newbie
  • Offline Offline
  • Posts: 1

Hi, this is my first post on the forum so please forgive me if i've missed somebody else's reply to the same question.

I was using a version of coppermine gallery, 1.4.10 without this addin, I have not upgraded to version 1.4.12 and I've applied the mod to it. However I cannot get the images added tot he gallery before the mod was applied to watermark. If I upload a new image, or several into an album and then run the resize admin tool it works fine. But if I run the same on an old album it wont add the watermark.

Hope that makes sense,

Thanks

Ash  :)
Logged
Pages: 1 ... 7 8 9 10 [11] 12 13 14 15 ... 26   Go Up
 

Page created in 1.321 seconds with 27 queries.