oh man i would love to have this working on one of my drupal 6 sites.... any plans for porting it?

CommentFileSizeAuthor
#11 watermark_5to6.patch5.66 KBDavid Stosik
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

kbahey’s picture

As usual, the answer is when one of the following happens:

- Someone submits a working and tested patch.
- We need it for a client site.
- A clients funds the development.
- We have free time to do it (unlikely).

DannyPfeiffer’s picture

Fair enough. thanks for the response.

David Stosik’s picture

Version: 5.x-1.x-dev » 5.x-1.0
Component: Miscellaneous » Code
Assigned: Unassigned » David Stosik
Category: support » task
Priority: Normal » Critical
Status: Active » Needs work

Hellon
Here is a first attempt 5 to 6 patch that applies to 1.0 version.
I was not able to make it work on node create, but it works a treat on node update, so any help is welcome.
Here is the link: watermark_5to6.patch.

Regards,
David

As I just realize there's a more recent dev version, going to make a patch for it. :)

Edit: OK, I think I spotted a part of my problem: in Drupal 6, validate operation seems to occur to early in node creation. Thus, image data is not filled in $node object...
Need to find a better hook than nodeapi.

Edit2: here is a link to the same patch applying to 5.x-dev version of watermark module: watermark_5to6_dev.patch.

The problem is the same as stated before: when creating image node, the watermark is not applied, as the "validate" operation of "hook_nodeapi" occurs before image module fills $node (thus, $node->new_file and $node->images are empty...).
I thought of using hook_image_alter, but this would imply that watermark is applied to original file, before resizing (then all images will get the watermark), so this is not a good solution.

Regards,
David

kbahey’s picture

Priority: Critical » Normal

The patch does not apply.

Please create the patch against a check out from CVS with the tag DRUPAL-5.

See http://drupal.org/patch for details.

Also, attach patches here rather than to some remote site.

David Stosik’s picture

I did not attach patch because I have not been able to attach files to my Drupal posts for a while (don't know why...).
The patches I provided apply to: 1.0 for the first, and 1.x-dev (the one available on the project page) for the second.
I don't know how to check out CVS repository, could you tell me please?

Thanks,
David

I forgot to say: to create the patch, I used "diff -Naurp watermark.old watermark", where watermark.old is directory of the version I started with (1.0 or 1.x-dev as I said before), and watermark is the directory I developped in.

kbahey’s picture

The dev patch does not apply.

patching file watermark.module
Hunk #2 FAILED at 140.
Hunk #3 succeeded at 174 (offset 5 lines).
Hunk #4 succeeded at 255 with fuzz 1 (offset 5 lines).
Hunk #5 FAILED at 285.
Hunk #6 succeeded at 501 (offset 5 lines).
2 out of 6 hunks FAILED -- saving rejects to file watermark.module.rej

This is how you checkout from the cvs repository. http://drupal.org/node/321

Then you use cvs diff, as per here http://drupal.org/patch/create

David Stosik’s picture

Do you try to apply it to 1.x-dev (the one I can download from project page), or do you still try on HEAD, which will never work, I know? :)

David

David Stosik’s picture

David Stosik’s picture

Why is HEAD older than DRUPAL-5 tag?

kbahey’s picture

Version: 5.x-1.0 » 5.x-1.x-dev

Why are you confusing yourself?

I said use the DRUPAL-5 tag. Which was updated 5 weeks (for .module) and 2 weeks (for .info).

Why are you asking about HEAD?

Please follow the instructions I gave you.

David Stosik’s picture

Version: 5.x-1.x-dev » 5.x-1.0
FileSize
5.66 KB

Here it is, sorry the confusion.
I was not able to make a patch that renames po/ folder to translations/, so this patch only patchs .module and .info files. :)
PS: I seem to be able to attach file again. :)

The problem I had is still here: watermark is not applied on image creation, but it is well applied on image edition. :-\

kbahey’s picture

Version: 5.x-1.0 » 6.x-1.x-dev
Status: Needs work » Fixed

Thank you.

The Drupal 6 dev version will appear here in 24 hours.

http://drupal.org/node/274032

David Stosik’s picture

Status: Fixed » Needs work

As I said, it is not completely OK. :)

David Stosik’s picture

Any help?

BartVG’s picture

subscribing

Starminder’s picture

subscribing

Starminder’s picture

Will there be an official 6x dev release?

kbahey’s picture

Yes. As soon as enough people test the -dev version and find it working well.

There are a few issues in the queue that says otherwise, so this will not happen spontaneously nor in a short time.

Starminder’s picture

any new news? thanks

jarizaro’s picture

waiting for news too.
Is this module working now in drupal 6? or is there any similar module working?
Thanks.

inforeto’s picture

subscribing

scotjam’s picture

subscribing

parasolx’s picture

subscribing

Hara Kim’s picture

Is this project dead?

kbahey’s picture

It is not dead. If there are tested patches I will apply it.

Hara Kim’s picture

Is this currently working for Drupal 6? I downloaded the dev version and tried using with no luck

riversidekid’s picture

Subscribing too

kakajoe’s picture

subscribing

Marat’s picture

Subscribing too

nonom’s picture

subscribing

HS’s picture

According to the stats here: http://drupal.org/project/usage/watermark

There are 165 people using the Dev version...but no input from them yet..sad!

riversidekid’s picture

Input: When I first applied the watermark module it only worked when I added _one_ image at a time; although my goal was to apply 8,600 images, so I really need a solution that will work for multiple images at once.

Once I upgraded Drupal 6.14 to 6.15 and the Image module from Beta 3 to Beta 4 about the same time, watermark stopped working even for a single image.

Today I upgraded image from Beta 4 to Beta 5 and no change, I get no watermark at all from either single image upload or Image Import.

I await either a breakthrough in this module; or another alternative. Until then gallery.menalto works for me ;).

superflyman’s picture

subscribing

Brian Keller-Heikkila’s picture

I use Drupal 6.15 and it does not work for me at all. No errors, but no watermark either with 1 image or multiple.

Balbo’s picture

I saw you can use http://drupal.org/project/imagecache_actions to do watermarking.

MakeOnlineShop’s picture

Hi,

No confirmation that this module now works for D6 ? (or D7 ?)

Everybody using the Image cache action ?

Thanks.