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

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 4 Guests are viewing this topic.

Stramm

don't chmod anything except albums folder and stuff in here
and these instructions. If you messed something up when applying the mod... bad luck
http://forum.coppermine-gallery.net/index.php?topic=29817.msg137994#msg137994

Jarvhix

Right, so I'm just going to remove the mod then. I've already noticed some strange things happening. I can't do anything with it if it's not working. Thanks. T/C

Jarvhix

I posted in a forum for support on the hits count/stats. After I applied your mod, somehow my hits stats changed from 127,000 to 0. How can I correct that?

Stramm

This mod doesn't have anything to do with 'hit stats'. I have no clue at all what you've done. Even with messing up code while applying it, there's no obvious part where it may affect hit stats.

edit: You've written you ran the admin tools... by default 'Reset view counters' is set. If you've missed to click 'Update thumbs and/or resized photos' you can imagine what happened... -> you've reseted your view counts.

If you don't have a backup of your db nothing can be done to undo that. In general before applying mods it's advisable to make backups of everything (db and files). Before playing with the admin tools double check it's set to what you want

Stramm

a mod for the mod...
Atm on all images (intermediate and fullsized) the same watermark gets applied. However it may look oversized on the intermediate. Now it's possible to let the watermark mod calculate a reduced watermark size for small images.

I just copy the description from my modpack.
Automatically downsizing of the watermark image when the uploaded picture is smaller than the width you set (Downsize watermark if width of an picture is smaller than entered value. That is the 100% reference point. Resizing of the watermark is linear (0 to disable)).
If you eg. enter here 1024 (like I did on my demo site), then the 100% reference is at images with a width of 1024px or bigger. If you upload pics > 1024px the watermark image won't get resized and attached with its full size. If you let coppermine create an intermediate image with a width of 400 pics, then the watermark will get downsized to 39% of it's original size. Is the fullsized eg. 512px, then the watermark will have 50% of it's orig size. Of course this sucks some CPU. And it's working excellent together with (example: http://stramm.st.funpic.org/displayimage.php?pos=-96 )
Files and thumbnails settings -> Auto resize images that are larger than max width or height (set it to the same as you used for the 100% reference... in the example 1024)
this way the watermark will always fit perfectly onto your images.

I assume you already applied the watermark mod in this thread and you have it working. That's the changes you have to do then.

sql/update.sql
at the end of this file add

INSERT INTO CPG_config (name, value) values ('reduce_watermark', '0');


lang/english.php
find

  array('Transparency 0-100 for entire image', 'watermark_transparency', 0),

below add

  array('Downsize watermark if width of an picture is smaller than entered value. That is the 100% reference point. Resizing of the watermark is linear (0 to disable)', 'reduce_watermark', 0),



now download the attached file, unpack it and upload it in your include folder replacing the existing file (include/picmgmnt.inc.php)
run update.php

have fun

PS: I've attached a test watermark png... feel free to experiment with it. The watermark file has a layer transparency of ~60-70% (have forgotten what value exactly) so you should see the image through it. Usually I have it in the images/ directory, if you do the same, then the path is images/watermark.png

an example: http://stramm.st.funpic.org/displayimage.php?album=7&pos=5


new attached file.... picmgmnt.inc.1.4.6.zip is the latest picmgmnt.inc.php file for CPG 1.4.6-1.4.8

DarioDN

i've replace the file attached, modify the files.
I've update the old images by Admin Tools, but the watermark doesn't appears on the old images.

Stramm

you need to enable the watermark in config
you need check twice if you followed the instructions 100%
make sure albums folder and it's subfolders are chmod 777 or 755 (depending on your system) and the files at least 644

CanadianGuy

Help, i have the new Coppermine 1.4.5 and i have it install and all, and i want to put watermark on the pics. can someone help me out please :(
it would be great help?
is there step by step i can follow to have watermark? please help, it would mean alot

ty
Joey from Canada


war59312

Hey,

Awesome mod!  ;D

However, there is no "sql/sql.inc" . lol

Thanks a lot,

Will
God Bless America

Stramm


war59312

Hey,

And I quote:

Quote from: Stramm on April 29, 2006, 05:54:49 PM
sql/sql.inc
at the end of this file add

INSERT INTO CPG_config (name, value) values ('reduce_watermark', '0');

Right there, lol . A few posts up. That is reply 24.

Yeah I took it, as you meant update.sql. ;)

Take Care,

Will
God Bless America

Stramm

ahh.. OK, the enhancement on this site. I've edited my post above ;)
But I guess it wasn't a problem to find the correct file (at least after applying the main hack)

Thanks

AmanM

sorry not working on my gallery i only find some strange stuff.In english gb i dont find the watermark in it but in us and than i cant see the listbox whith bottom right an so on its in the page ive you open the config you will find the entries before general settings

Stramm

lang/english.php = English US

If you can't see the watermark settings in config while your language is set to english US you probably made a mistake or two while applying the hack.

Solution:
-> replace your modified files with original ones and start again.
-> use a predone hack (like my modpack, the watermark hack is included there)

gerdo


ISBB

Strahm is there anything to worry about... I previously had 1.4.3 and upon upgrading to 1.4.6 i seem to have overwritten the files that were modded by this mod..   Is there any issue w/ me replacing the files that came w/ 1.4.6 w/ the ones i modded in 1.4.3??
Its gaurunteed.. until it breaks

Lifted trucks are like boob jobs, no matter what size shape or dimension they are always fun to look at.

Stramm

as far as I remember there were small changes in editpics and searchnew. But nothing critical.
Also there was a little bugfix in picmgmnt.inc.php. Up to date is always the picmgmnt.inc.php from the modpack. I'll attach a new one to the downsize enhancement (within this thread)

CubaLibre

Hi, i follow instruction, but can't see option in config, i run update.php it say me OK for the line added, in admin.php all is done.
What can i check?

Thank you