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 ... 5 6 7 8 [9] 10   Go Down

Author Topic: Permanent Watermark with GD2  (Read 247501 times)

0 Members and 1 Guest are viewing this topic.

undeshila

  • Coppermine newbie
  • Offline Offline
  • Posts: 14
Re: Permanent Watermark with GD2
« Reply #160 on: August 05, 2005, 12:58:25 pm »

you'll have to modify the code for that
open util.php and find function updatethumbs()
a few lines below you'll see
Code: [Select]
    $query = "SELECT * FROM $picturetbl WHERE aid = '$albumid'";
replace it with
Code: [Select]
    $query = "SELECT * FROM $picturetbl";

now it doesn't matter what album you set in the admin tools... coppermine will just process them all




i did the modification , but unfortunatelly its only watermarking the album chosen , not all of them
Logged

Stramm

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 6006
    • Bettis Wollwelt
Re: Permanent Watermark with GD2
« Reply #161 on: August 05, 2005, 01:12:41 pm »

Then you've changed the wrong line... read again, find the function updatethumbs() and a few lines below find the line you'll have to edit

undeshila

  • Coppermine newbie
  • Offline Offline
  • Posts: 14
Re: Permanent Watermark with GD2
« Reply #162 on: August 05, 2005, 01:33:57 pm »

no , there's only one part of the code with both specifications

take a look @ the photo (https://forum.coppermine-gallery.net/proxy.php?request=http%3A%2F%2Fwww.undecided.ro%2Fcode.jpg&hash=83937673343786b6655e8e77b2a2a09b6fda7fd5)
Logged

Stramm

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 6006
    • Bettis Wollwelt
Re: Permanent Watermark with GD2
« Reply #163 on: August 05, 2005, 01:55:28 pm »

OK, reverse engineering.. the author has introduced a new function vesileimaathumbit() that's modifying the watermarked pics. I just used the existing one.. therefore the confusion

find it and a few lines below you'll see
Code: [Select]
   $query = "SELECT * FROM $picturetbl WHERE aid = '$albumid'";replace with
Code: [Select]
   $query = "SELECT * FROM $picturetbl";

sigepjedi

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 111
Re: Permanent Watermark with GD2
« Reply #164 on: August 24, 2005, 04:50:41 pm »

Any update for 1.4?
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Permanent Watermark with GD2
« Reply #165 on: August 26, 2005, 05:41:53 pm »

cpg1.4 goes unsupported, please stop posting issues related to it.
Logged

pisaleve

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 1
  • PisaLeve
    • BoaFoto
Re: Permanent Watermark with GD2
« Reply #166 on: August 27, 2005, 11:40:44 pm »

it is possible to place watermark in the original image and resize?
 I modified form in the page: config.php

       <td class="tableb" valign="top">
                               <input type="Checkbox" name="$name" class="listbox" value="both" $both_selected>{$lang_config_php['wm_both']}</option>
                               <input type="Checkbox" name="$name" class="listbox" value="original" $original_selected>{$lang_config_php['wm_original']}</option>
                               <input type="Checkbox" name="$name" class="listbox" value="resized" $resized_selected>{$lang_config_php['wm_resized']}</option>
               </td>

But exactly selecting both, he does not function ...
An image only is with watermark

Soulmaster

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 5
    • The biggest weathersite in the Netherlands
Re: Permanent Watermark with GD2
« Reply #167 on: September 22, 2005, 10:00:22 am »

getting this error

Warning: imagecreatefrompng(/c://apachefriends/xampp/htdocs/gallery/images/watermark.png) [function.imagecreatefrompng]: failed to open stream: Invalid argument in C:\apachefriends\xampp\htdocs\gallery\include\picmgmt.inc.php on line 302

Warning: imagesx(): supplied argument is not a valid Image resource in C:\apachefriends\xampp\htdocs\gallery\include\picmgmt.inc.php on line 303

Warning: imagesy(): supplied argument is not a valid Image resource in C:\apachefriends\xampp\htdocs\gallery\include\picmgmt.inc.php on line 304

Warning: imagecopy(): supplied argument is not a valid Image resource in C:\apachefriends\xampp\htdocs\gallery\include\picmgmt.inc.php on line 321

Warning: imagecreatefrompng(/c://apachefriends/xampp/htdocs/gallery/images/watermark.png) [function.imagecreatefrompng]: failed to open stream: Invalid argument in C:\apachefriends\xampp\htdocs\gallery\include\picmgmt.inc.php on line 302

Warning: imagesx(): supplied argument is not a valid Image resource in C:\apachefriends\xampp\htdocs\gallery\include\picmgmt.inc.php on line 303

Warning: imagesy(): supplied argument is not a valid Image resource in C:\apachefriends\xampp\htdocs\gallery\include\picmgmt.inc.php on line 304

Warning: imagecopy(): supplied argument is not a valid Image resource in C:\apachefriends\xampp\htdocs\gallery\include\picmgmt.inc.php on line 321

dunno what it means
Logged
Whoeps wrong planet

sigepjedi

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 111
Re: Permanent Watermark with GD2
« Reply #168 on: September 25, 2005, 03:43:37 am »

cpg1.4 goes unsupported, please stop posting issues related to it.

i didnt realize asking about a MOD or HACK fell into ANYTHING to do with the fact that 1.4 is unsupported.
Are you implementing that a "HACK" is supported????

- Now back to your regularly sched program.
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Permanent Watermark with GD2
« Reply #169 on: September 25, 2005, 08:47:05 am »

This is a mod that was made for cpg1.3.x. You repeatedly asked for this mod to be ported for cpg1.4.x. That's very selfish behaviour in the first place, you could have ported it yourself and shared your findings. However, you chose to bump, that's why I told you to stop. In fact, we don't want you to use cpg1.4.x yet if you have no idea how to port the mods and hacks you need over from cpg1.3.x to cpg1.4.x, as this means that you're not experienced enough to use cpg1.4.x yet. Of course we can't stop you from using cpg1.4.x, but we can try to stop you from cluttering threads that deal with cpg1.3.x stuff with your questions that are related to an unsupported version. Imo we have a different concept of what "unsupported actually means, however I suggest you respect our concept of the word.

@all: please do not reply to this thread to ask for a port to another version, will you?
Logged

RJPotts

  • Coppermine newbie
  • Offline Offline
  • Posts: 9
Re: Permanent Watermark with GD2
« Reply #170 on: October 04, 2005, 02:15:53 am »

Hello!
I used this mod and added an ability to choose between image watermark and a simple text watermark.
<snip>

Hi,

I had this text watermark mod added to my gallery, working successfully both for uploaded files and admin use on previously uploaded files.

I was recently notified of an error during uploading, ".....failed to open stream: Permission denied.....", I did some digging around on here and discovered that it was a result of the CHMOD settings on the albums directory which I then changed to 755.  I can only presume that my hosts recent 'upgrade' of their servers accounted for the permissions having been changed as several hundred pictures had been uploaded and no coppermine / mod files altered.

After setting the permissions back to what they should be I tried uploading a sample file, it uploaded ok but when I selected the folder etc for in to be placed in I got the error message "Fatal error: Call to undefined function: imagettftext() in /home/cameyinf/public_html/gallery/include/picmgmt.inc.php on line 356".  As that line was related to the mod I removed the modded files and replaced them with the original coppermine versions and I was able to upload successfully. 

I then added the image watermark mod & it worked as advertised, when I (very carefully!) added the text watermark mod the problem (Fatal error: Call to undefined function: imagettftext() in /home/cameyinf/public_html/gallery/include/picmgmt.inc.php on line 356) returns.

Has anyone come across this problem before & is able to tell me whats gone wrong?  I did try searching the library but couldnt find anything relevant, if it has been discussed before I apologise & hope someone might point me in the right direction.

TIA
Richard

PS, I never had config menu entries for the text watermark mod (during original install or the new install today) but it didnt really matter as set it up manually in phpmyadmin, did anyone else find this?
« Last Edit: October 04, 2005, 02:21:04 am by RJPotts »
Logged

Stramm

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 6006
    • Bettis Wollwelt
Re: Permanent Watermark with GD2
« Reply #171 on: October 04, 2005, 09:16:46 am »

you need to recompile php with support for imagettftext enable-gd-native-ttf

RJPotts

  • Coppermine newbie
  • Offline Offline
  • Posts: 9
Re: Permanent Watermark with GD2
« Reply #172 on: October 04, 2005, 10:51:38 am »

you need to recompile php with support for imagettftext enable-gd-native-ttf

Many thanks indeed.

I've just been on a googling trip to try & find out how to do the above.  However, as I havnt got a clue what I'm doing with PHP etc I have no idea if the stuff I'm finding is relevant / what I need to do.

As the problem has only surfaced after server changes I've just contacted the host with the above info & will see what they say.  In anticipation of their reply not being particularly useful might I trouble you to point me in the direction of instructions on how a PHP (complete!) newbie can recompile?

Rgds & many thanks
Richard
Logged

Tranz

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Female
  • Posts: 6149
Re: Permanent Watermark with GD2
« Reply #173 on: October 04, 2005, 05:16:54 pm »

Sorry, only your host can recompile PHP.
Logged

RJPotts

  • Coppermine newbie
  • Offline Offline
  • Posts: 9
Re: Permanent Watermark with GD2
« Reply #174 on: October 05, 2005, 07:41:01 am »

Sorry, only your host can recompile PHP.

Ah, ok, it's probably quite good that I cant meddle with it :)

They were actually quite useful and have recompiled PHP with 'freetype' support, while the original error msg has cleared I now get another one when I try to add watermarks "Warning: imagettftext(): Could not find/open font in /home/cameyinf/public_html/gallery/include/picmgmt.inc.php on line 356".  That line points to 'home/cameyinf/public_html/arial.ttf' (as it always did) and the font is still where it previously was.

I've just emailed the hosting company again but in the meantime, do any of the experts here know of a fix I can make?

Rgds & many thanks
Richard
Logged

Stramm

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 6006
    • Bettis Wollwelt
Re: Permanent Watermark with GD2
« Reply #175 on: October 05, 2005, 11:42:33 am »

check if that's really the absolute path. After a reconfig things may have changed. When it was before /home... it may be now /usr/home...
Open a ssh session cd to your fontfile and type pwd. This will spitz out the path... now that you're already there, check permissions (and owners) and change permissions if necessary

vincenzo_hk

  • Coppermine newbie
  • Offline Offline
  • Posts: 1
Re: Permanent Watermark with GD2
« Reply #176 on: October 05, 2005, 08:42:48 pm »

Every day I need to update 1000 pics in some of the albums, Is it possible only watermark the New Pics? not run the Whole albums files once again!

Thanks
Logged

TheGamer1701

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 52
    • PartyNation.tv - Always the newest Party Facs from North Germany
Re: Permanent Watermark with GD2
« Reply #177 on: October 14, 2005, 02:39:37 pm »

Hello,

this is really a great mod, but I'm missing a little feature here:

I don't want to watermark private albums.
So, how can I modify this hack?

Any idea?
I tried it with the picmgmt.php file with the first entry, but that did not work.
If you could give me a hint to the right location in the code, I guess I can do this on my own then..

Thx,
André
Logged

nytemare

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 26
Re: Permanent Watermark with GD2
« Reply #178 on: October 27, 2005, 10:55:16 am »

I am having a problem with the MOD, i installed it and it sorta worked fine, had no problems and got it to watermark pictures. However, i noticed that it didn't watermark everything, a few files were missed out. Here's a link to an album which i tried to watermark http://www.azngirls.net/gallery/thumbnails.php?album=7 You will find that the original pictures, which are the bigger ones would have been watermarked where as the smaller sized pictures (not the small thumbnails) which you click on to see the larger image does not get watermarked.

Has anyone else come across similar problems?
Logged

nytemare

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 26
Re: Permanent Watermark with GD2
« Reply #179 on: October 27, 2005, 11:14:56 am »

Another thing just happened.. check out the first 2 thumbnails or rather in all of the thumbnails you can see my watermark, but in a previous album i watermarked, the thumbnails didn't get affected. And what's weird is that some of the thumbnails have the watermark when you click and see the normal resized image it doesn't show a watermark.. and when you view the original picture than you can see a watermark again. It's all so confusing.
Logged
Pages: 1 ... 5 6 7 8 [9] 10   Go Up
 

Page created in 0.028 seconds with 20 queries.