VirtueMart Forum

VirtueMart 1.1.x [ Old version - no longer supported ] => Questions VM 1.1 ( the only active board for the old version) => Topic started by: Roderick1 on March 28, 2009, 15:31:18 pm

Title: Watermark virtuemart 1.1.3
Post by: Roderick1 on March 28, 2009, 15:31:18 pm
For all of you that want to watermark productimages with cache, here it is:

Download sript here:
http://www.dushiwebsites.nl/watermark-with-cache.zip (http://www.dushiwebsites.nl/watermark-with-cache.zip)

make a folder called "watermark" in your root and put in the files called:
 - cache
 - watermark.php
 - watermark.png --> change this picture to your picture!

Then set the permissions 777 to the folder "cache".

The change the htaccess.txt to the folowing parameters:
Code: [Select]
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} -f
RewriteRule \.(gif|jpeg|jpg)$ ../../../../watermark/watermark.php [QSA,NC]

Now upload the htaccess.txt to components/com_virtuemart/shop_image/product/
and if you want to the thumbnails in components/com_virtuemart/shop_image/product/resized.
AND RENAME TO .htaccess

And you are done  8)
Check my site as demo:
http://www.thulefietsdragershop.nl/index.php/Thule/Thule-EuroPower-916/flypage.tpl.html (http://www.thulefietsdragershop.nl/index.php/Thule/Thule-EuroPower-916/flypage.tpl.html)

Works on joomla 1.5.10 and virtuemart 1.1.3.
Title: Re: Watermark virtuemart 1.1.3
Post by: amorino on August 12, 2009, 07:07:19 am
that's great
thanks a lot man
Title: Re: Watermark virtuemart 1.1.3
Post by: Roderick1 on August 12, 2009, 09:53:02 am
Did it work for you ok?
Title: Re: Watermark virtuemart 1.1.3
Post by: amorino on August 12, 2009, 12:20:49 pm
I just said thank you for sharing but not yet installed!
It dosn't work?
Title: Re: Watermark virtuemart 1.1.3
Post by: Roderick1 on August 12, 2009, 13:25:19 pm
O no its works great, just was asking if your install went fine :)
Title: Re: Watermark virtuemart 1.1.3
Post by: amorino on August 12, 2009, 16:21:34 pm
It works like a charm
Thank youuuuuuuuuuuuuu

NB: permission for cache file 755 works perfect

Thanks
Title: Re: Watermark virtuemart 1.1.3
Post by: amorino on August 12, 2009, 16:25:53 pm
Is it possible to change the watermark image position?:)
Now it's showen on the bottom right
Title: Re: Watermark virtuemart 1.1.3
Post by: Roderick1 on August 12, 2009, 16:46:55 pm
i know it is but dont know how... sorry
Title: Re: Watermark virtuemart 1.1.3
Post by: amorino on August 13, 2009, 00:29:16 am
Well now is it possible to make 2 watermark images? One big for the image and one little for the thumb
Because the resized images dosn't read the big (relative) watermark.
Best regards
and thank you
Title: Re: Watermark virtuemart 1.1.3
Post by: Roderick1 on August 13, 2009, 10:48:36 am
with me both the images get watermarkt
Title: Re: Watermark virtuemart 1.1.3
Post by: u4david on August 19, 2009, 19:37:46 pm
I got it working !
Right now my absolute path is in the .htaccess specified as /home/user/www/joomla/watermark/watermark.php (www is root)

Is there a way to make the path to be NOT absolute so when I end up moving the test site to live hosting space it will not get broken?

i assume on the live hosting space it will be /watermark/watermark.php

Thanx u4davidatgmaildotcom
Title: Re: Watermark virtuemart 1.1.3
Post by: amorino on August 19, 2009, 19:41:08 pm
Hello
On the live site you should write :
../../../../watermark/watermark.php

Best regards
Amorino
Title: Re: Watermark virtuemart 1.1.3
Post by: Roderick1 on August 19, 2009, 23:25:59 pm
Oeps... forgot to mension that :)
Title: Re: Watermark virtuemart 1.1.3 HELP
Post by: cdwc on October 24, 2009, 14:50:25 pm
i can not get this to work...
i uploaded the files, changed permission and renamed htaccess.txt to .htaccess but no watermark shows up..
help :-[ :-[ :-[ :-[ :-[ :-[ :-[ :-[!!
Title: Re: Watermark virtuemart 1.1.3
Post by: Roderick1 on October 25, 2009, 19:34:48 pm
did you do this:
On the live site you should write :
../../../../watermark/watermark.php
Title: Re: Watermark virtuemart 1.1.3
Post by: Jerry Innemee on February 12, 2010, 08:46:59 am
Hey Rod,

Found your thread and am interested in this to. Looked at your site, are you not using it anymore?

I'm working local on windows with xampp, I need to know how to config the .htaccess file cause images are not loading anymore.

regards Jerry
NL
Title: Re: Watermark virtuemart 1.1.3
Post by: Roderick1 on February 12, 2010, 13:33:52 pm
Hello Jerry,

(Schrijf dit in engels zodat iedereen het kan lezen)

I have no experience with local servers and this script and would not know if this would work or not..
Is there a way you can test it on a live website?
My client did not want to use it anymore so i took it off.
But it should work out of the box without any problems.
Title: Re: Watermark virtuemart 1.1.3
Post by: Jerry Innemee on February 12, 2010, 14:25:12 pm
OKey then,

Whel I was hacked early januari and going back live soon.

It is only not easy when I'm developping and pics don't load because of the watermark. But it not the worst. I'll come back to you when I'm live.

I do think I will need a little help  :-[

regards Jerry
Title: Re: Watermark virtuemart 1.1.3
Post by: Roderick1 on February 12, 2010, 14:27:20 pm
Jerry look me up on the internet and find my email adress " Dushiwebsites "
Title: Re: Watermark virtuemart 1.1.3
Post by: dodog on February 24, 2010, 03:08:53 am
Amorino, if you want to change the position of watermark,
in watermark.php on line 32 change:
Code: [Select]
imagecopy($image, $watermark, $w-$ww, $h-$wh, 0, 0, $ww, $wh);
to one of the following lines, where you want the watermark appear
Code: [Select]
// (top left)
imagecopy($image, $watermark, 0, 0, 0, 0, $ww, $wh);

// (top center)
imagecopy($image, $watermark, (($w/2)-($ww/2)), 0, 0, 0, $ww, $wh);

// (top right)
imagecopy($image, $watermark, $w-$ww, 0, 0, 0, $ww, $wh);

// (left centre)
imagecopy($image, $watermark, 0, (($h/2)-($wh/2)), 0, 0, $ww, $wh);

// (centre)
imagecopy($image, $watermark, (($w/2)-($ww/2)), (($h/2)-($wh/2)), 0, 0, $ww, $wh);

// (right centre)
imagecopy($image, $watermark, $w-$ww, (($h/2)-($wh/2)), 0, 0, $ww, $wh);

// (bottom left)
imagecopy($image, $watermark, 0, $h-$wh, 0, 0, $ww, $wh);

// (bottom center)
imagecopy($image, $watermark, (($w/2)-($ww/2)), (($h)-($wh)), 0, 0, $ww, $wh);

// (bottom right)
imagecopy($image, $watermark, $w-$ww, $h-$wh, 0, 0, $ww, $wh);

The watermark script works well on my localhost, but I am not able to configure it to run properly on live site. Using "../../../../watermark/watermark.php" I get an error, that the file was not found.
Title: Re: Watermark virtuemart 1.1.3
Post by: Roderick1 on February 24, 2010, 10:19:23 am
You need to check if the file is there or not, and check that the path is the same as on your localhost server.
Title: Re: Watermark virtuemart 1.1.3
Post by: dodog on February 24, 2010, 14:21:57 pm
Roderick1, yes, the file si there, but it is not shown. When I rename htaccess, the file is shown.
Title: Re: Watermark virtuemart 1.1.3
Post by: Roderick1 on February 24, 2010, 14:29:58 pm
Did you do this:
Now upload the htaccess.txt to components/com_virtuemart/shop_image/product/
and if you want to the thumbnails in components/com_virtuemart/shop_image/product/resized.
AND RENAME TO .htaccess

Explain what you are doing to me..
Title: Re: Watermark virtuemart 1.1.3
Post by: fjoncour on March 16, 2010, 16:15:08 pm
For all of you that want to watermark productimages with cache, here it is:
Hello, I try to use watermark with joomla 1.5.15 and Virtuemart 1.1.4 and it doesn't work. No watermark is created. My install is local php5-gd and PCRE are installed. Somebody have the same problem ? Thank's a lot for your help.
Frédéric
Title: Re: Watermark virtuemart 1.1.3
Post by: Roderick1 on March 16, 2010, 18:27:32 pm
please triple check your path to the folder ../../../../
Title: Re: Watermark virtuemart 1.1.3
Post by: fjoncour on March 17, 2010, 10:51:22 am
please triple check your path to the folder ../../../../
Hello,
Problem is apache config (mod_rewrite) with ubuntu linux...
Thank's for your help
Frédéric
Title: Re: Watermark virtuemart 1.1.3
Post by: Roderick1 on March 17, 2010, 12:50:24 pm
So it has been fixed and is working now?
Title: Re: Watermark virtuemart 1.1.3
Post by: fjoncour on March 19, 2010, 22:13:27 pm
So it has been fixed and is working now?
No, because it's not a priority for the moment =:o)
Thank's for your messages
Title: Re: Watermark virtuemart 1.1.3
Post by: erwin_m on April 03, 2010, 22:01:20 pm
At first it looked very good. But now I'm having errors when I add multiple images. When I'm looking in the mediamanager and trying to look at a file, I'm getting the next error.

Warning: file_get_contents(/var/www/vhosts/mydomain.nl/httpdocs/joomla/components/com_virtuemart/shop_image/product/21004%20%20[website].jpg4ba776fde8b73.jpg) [function.file-get-contents]: failed to open stream: No such file or directory in /var/www/vhosts/mydomain.nl/httpdocs/joomla/watermark/watermark.php on line 24

Warning: imagecreatefromstring() [function.imagecreatefromstring]: Empty string or invalid image in /var/www/vhosts/mydomain.nl/httpdocs/joomla/watermark/watermark.php on line 24

Warning: imagesx(): supplied argument is not a valid Image resource in /var/www/vhosts/mydomain.nl/httpdocs/joomla/watermark/watermark.php on line 26

Warning: imagesy(): supplied argument is not a valid Image resource in /var/www/vhosts/mydomain.nl/httpdocs/joomla/watermark/watermark.php on line 27

Warning: imagecopy(): supplied argument is not a valid Image resource in /var/www/vhosts/mydomain.nl/httpdocs/joomla/watermark/watermark.php on line 35

Warning: imagejpeg(): supplied argument is not a valid Image resource in /var/www/vhosts/mydomain.nl/httpdocs/joomla/watermark/watermark.php on line 44

Warning: Cannot modify header information - headers already sent by (output started at /var/www/vhosts/mydomain.nl/httpdocs/joomla/watermark/watermark.php:24) in /var/www/vhosts/mydomain.nl/httpdocs/joomla/watermark/watermark.php on line 56

Warning: readfile(cache/efbef59cc9513d7ddd4800b218888967) [function.readfile]: failed to open stream: No such file or directory in /var/www/vhosts/mydomain.nl/httpdocs/joomla/watermark/watermark.php on line 67


In the front end there's only a placeholder visible.

Can anyone tell me what's going wrong?
Title: Re: Watermark virtuemart 1.1.3
Post by: xms on June 13, 2010, 11:36:26 am
Hi Roderick1,

The link http://baglan.web.tr/media/watermark-with-cache/watermark-with-cache.zip not available.
Please correct this.

Thanks
xms
Title: Re: Watermark virtuemart 1.1.3
Post by: Anticore on June 17, 2010, 14:38:15 pm
I am also looking for an updated link, want to use this for my store
Title: Re: Watermark virtuemart 1.1.3
Post by: ronydjohan on July 09, 2010, 12:17:25 pm
didn't work for me, i use joomla 1.5.18, VM 1.1.4, and sh404sef, when i activated it, full product images didn't show up. After I delete it, it comes to normal. http://foto.maubikinweb.com, any solution for this? thanks
Title: Re: Watermark virtuemart 1.1.3
Post by: toysfriend on August 06, 2010, 14:44:16 pm
Hi Roderick1,

The link http://baglan.web.tr/media/watermark-with-cache/watermark-with-cache.zip not available.
Please introduce me with How to setting that.

Thanks for kindly.
Title: Re: Watermark virtuemart 1.1.3
Post by: Roderick1 on August 06, 2010, 20:05:50 pm
The link has been updated :)
Title: Re: Watermark virtuemart 1.1.3
Post by: DansKO on August 11, 2010, 18:34:41 pm
thanks! this comes in handy! :)
well, but the shop pictures now suffer bad quality. maybe because of the recompressing by GD Lib?
hmm, how to improve that?
Title: Re: Watermark virtuemart 1.1.3
Post by: Roderick1 on August 11, 2010, 18:52:48 pm
Do you have a link for me DansKO?
Title: Re: Watermark virtuemart 1.1.3
Post by: ronsweet2 on October 19, 2010, 03:52:31 am
Hi: We are now using this watermarking tool for our VirtueMart install.  I am wondering if anyone found a fix so that the tool would ONLY watermark the full image and NOT the thumbnail images? If so, please post what we need to do in this thread!!
Title: Re: Watermark virtuemart 1.1.3
Post by: mbit on January 04, 2011, 10:00:23 am
it didnt worked for me when i tested it local.
Title: Re: Watermark virtuemart 1.1.3
Post by: Roderick1 on January 04, 2011, 10:26:23 am
dont test it local but live
Title: Re: Watermark virtuemart 1.1.3
Post by: mbit on January 04, 2011, 10:36:57 am
dont test it local but live
this doesnt get in complex with the main htaccess thats in root direcotry right?
Title: Re: Watermark virtuemart 1.1.3
Post by: Roderick1 on January 04, 2011, 10:53:15 am
nope :)
Title: Re: Watermark virtuemart 1.1.3
Post by: mbit on January 11, 2011, 18:37:30 pm
i did that and it worked with some issues that i am trying to figure out.
in the flypage my thumbnail is 130x130 but the watermark doesnt resize. there must be a thumb of the watermark as well?/
Title: Re: Watermark virtuemart 1.1.3
Post by: ronsweet2 on January 11, 2011, 18:44:34 pm
If there is a way to correctly watermark the thumbnail (with a "mini" version of the mark in the lower right corner, just like the mark on the full sized image), I would be very interested in learning how.  Ron
Title: Re: Watermark virtuemart 1.1.3
Post by: Roderick1 on January 11, 2011, 19:03:21 pm
Hi, simple... make two versions of this script and two sets of css :)
Title: Re: Watermark virtuemart 1.1.3
Post by: Ricsca on January 19, 2011, 15:10:55 pm
Hi: We are now using this watermarking tool for our VirtueMart install.  I am wondering if anyone found a fix so that the tool would ONLY watermark the full image and NOT the thumbnail images? If so, please post what we need to do in this thread!!

Up!!!
Title: Re: Watermark virtuemart 1.1.3
Post by: Roderick1 on January 19, 2011, 15:45:19 pm
hat do you mean by UP?  ???
Title: Re: Watermark virtuemart 1.1.3
Post by: k043 on February 15, 2011, 04:42:21 am
Does this work for Virtuemart 1.1.7 and joomla 1.5.22?
Title: Re: Watermark virtuemart 1.1.3
Post by: loiseau on February 15, 2011, 13:23:05 pm
Does this work for Virtuemart 1.1.7 and joomla 1.5.22?

Everything works perfectly for me on this configuration.
Title: Re: Watermark virtuemart 1.1.3
Post by: bogusj on March 15, 2011, 13:58:35 pm
Hi,

Thanks for this, I was looking all over for it.
However, is there any way to apply this functional to the rest of the pictures in the product description? In my site I use also pictures in the product description, in case I have a product zoom, or additional photos.

Thanks :D

Edit: I tried to put the .htaccess file inside the folder that contains the images, however it does not show the pictures any more, so I had to delete the file to fix it.
The path to the images is: images/stories/products/fotl/ which is the same depth as components/com_virtuemart/shop_image/product/ and so RewriteRule \.(gif|jpeg|jpg)$ ../../../../watermark/watermark.php should be working, but it doesn't. I'm so puzzled. Please help.
Title: Re: Watermark virtuemart 1.1.3
Post by: welshay on June 05, 2011, 21:13:27 pm
I have attempted to add this to virtuemart version 1.1.8

...however the product images are now being completely removed in the front end.

In order to get this to work in the newer version what modifications would I need to make?


Thanks in advance
Title: Re: Watermark virtuemart 1.1.3
Post by: mariommoreno on June 09, 2011, 17:10:41 pm
Any idea why I'm getting a 500 Server Error?

500 Server Error A misconfiguration on the server caused a hiccup. Check the server logs, fix the problem, then try again.

[Thu Jun 09 08:57:46 2011] [error] [client 61.247.204.36] Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace.


It looks like watermark.php is passing also throw the products\.htaccess to get the path of the image, creating a hiccup.

I'm using this watermark in the same server (another joomla site, same versions) without any problem :(

Any idea?
Title: Re: Watermark virtuemart 1.1.3
Post by: stout_77 on June 23, 2011, 04:57:57 am
Hi there,

unfortunately this is nor working on my website vinyldesign.com.au (http://vinyldesign.com.au)...
my virtuemart template uses phatfusion slideshow, and I guess this is the reason why no images are shown when I put te .htaccess file in the required folder.
Anyone else having the same problem? Possible solutions?
Title: Re: Watermark virtuemart 1.1.3
Post by: JanJ on June 23, 2011, 14:17:02 pm
Hi: We are now using this watermarking tool for our VirtueMart install.  I am wondering if anyone found a fix so that the tool would ONLY watermark the full image and NOT the thumbnail images? If so, please post what we need to do in this thread!!

I would be very greatfull for that kind of fix, because I would like to do exactly the same.

Title: Re: Watermark virtuemart 1.1.3
Post by: loiseau on June 23, 2011, 19:05:51 pm
You have to disable the .htaccess in the thumbnails folder.
(components/com_virtuemart/shop_image/product/resized)
Title: Re: Watermark virtuemart 1.1.3
Post by: JanJ on June 24, 2011, 08:52:58 am
Hi,

thanks for your answer. I disabled the watermark for thumbnails, but the main thumbnail image on product page still has watermark. Is possible to disable this one to?

Here is the product page: http://www.fetis.si/sl/cevlji-in-skornji/sandali/detail/59/flypage/174.html?sef=hcfp
Title: Re: Watermark virtuemart 1.1.3
Post by: wadeglennwork1 on June 25, 2011, 15:24:17 pm
What do you mean when you say "Up". Can you please have this elaborated?
Title: Re: Watermark virtuemart 1.1.3
Post by: stout_77 on July 06, 2011, 07:30:45 am
I manages to make it work in the fly page, but it doesn't work in the browse pages. Anyone knows how to fix this?
Title: Re: Watermark virtuemart 1.1.3
Post by: sagio on September 30, 2011, 16:57:25 pm
I did everything you said. But my virtuemart-site is a subdomain, and domain is another site on joomla. This really works on my localhost. But not on a real site. Can you tell me what should I do to fix this and to see watermark on my virtuemart products?

tanks
Title: Re: Watermark virtuemart 1.1.3
Post by: u4david on October 20, 2011, 23:01:15 pm
I used the water mark with high success on local server.
I head to specify the absolute path instead of the ../../../../.

On live server @ godaddy linux hosting (that id do not recommend ).

I can not make it work.
My cache is empty and 777
tried the original ../../../../ and I get redirected back to the homepage that goes fro any other path in that tree that I tried.The link on the home page points to the image but the home page is what is loaded on the pop up window.
Only when I leave /watermark/watermark.php I get error message.

I think there is problem with link rewriting in environments  on the server.Some servers have redirect,schroots......
Any clue how to properly detect what is happening when this redirect  rewrite runs?

Title: Re: Watermark
Post by: titanman on January 13, 2012, 23:25:57 pm
I have same problem too, I use vm 1.1.19 an Joomla 1.5.25 .
how we can fix this line:
../../../../watermark/watermark.php
or others?

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} -f
RewriteRule \.(gif|jpeg|jpg)$ ../../../../watermark/watermark.php [QSA,NC]
Title: Re: Watermark virtuemart 1.1.3
Post by: bmw2182 on April 10, 2012, 21:57:50 pm
I am trying to install this on a site using Joomla 1.5.25 and Virtuemart 1.1.9. I created my Watermarks folder in my joomla directory and uploaded the files there.  I created the .htaccess file as follows:

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} -f
RewriteRule \.(gif|jpeg|jpg)$ ../../../../watermark/watermark.php [QSA,NC]

When I upload new pictures nothing happens.  What am I doing wrong?
Title: Re: Watermark virtuemart 1.1.3
Post by: vladast on April 10, 2012, 23:59:45 pm
this is great, and works on local...
when I upload, I will know is it working, but for now, it is ok...

something more interesting...
is there any chance to make watermark repeat, in some angle, etc 30o
you know... repeating watermark to whole product image...
Title: Re: Watermark virtuemart 1.1.3
Post by: vladast on April 11, 2012, 22:52:44 pm
don't work on images on browse page...?
Title: Re: Watermark virtuemart 1.1.3
Post by: emart on May 13, 2012, 14:34:58 pm
Hi,

Thanks for the script. It works really well. However, if my images have spaces in it, somehow the image is not loaded at all.
Anyone encountered this issue? Please help.
Title: Re: Watermark virtuemart 1.1.3
Post by: emart on May 14, 2012, 17:22:02 pm
Fixed the problem. Reason was because when it stream, it was replacing spaces with %20. Added the "$path_new" parameter.

Code: [Select]
$generated = CACHE.md5($_SERVER['REQUEST_URI']);
$path_new = str_replace("%20"," ",$path);

if (file_exists($generated))
$generated_at = filectime($generated);

// Generate image?
if (
!file_exists($generated) /* if generated file doesn't exist */
|| $generated_at<=filectime($path_new ) /* or generated file is older than the original */
|| $generated_at<=filectime(WATERMARK) /* or generated file is older than watermark file */
|| $generated_at<=filectime(__FILE__) /* or generated file is older than this script file */
) {
// Load image
$image = imagecreatefromstring(file_get_contents($path_new));
Title: Re: Watermark virtuemart 1.1.3
Post by: baseplayer on June 27, 2012, 16:03:57 pm
Hi,

I am using virtuemart 1.1.9 and if I place the .htaccess in the folder, but like others then my pictuers don,t show,
maybe the answer to that is already in this  discussion but I cant,t seem to get it work.
can anybody help. Thanks
Title: Re: Watermark virtuemart 1.1.3
Post by: cirrus on September 16, 2012, 10:56:11 am
Same here guys,
product image is not shown at all. A broken image is shown instead.
Joomla 2.5.7, VM 2.0.10
Title: Re: Watermark virtuemart 1.1.3
Post by: laithdarant on September 21, 2012, 17:46:33 pm
I do have the same problem, the broken images appear when .htaccess is in the folder...
Title: Re: Watermark virtuemart 1.1.3
Post by: amilaraja on September 28, 2012, 11:15:27 am
This works like clock work! ! ! ! ! ! ! ! ! ! ! ! !
What a smart solution!!!!

tried on Joomla 1.5.26 + VirtueMart 1.1.9 . caching and all works superbly!

Thanks a lot for sharing!!!

 :-*  :-*  :-* 
Title: Re: Watermark virtuemart 1.1.3
Post by: RomanWeb on October 08, 2012, 21:31:24 pm
Hi,

It worked for me on my local test PC, but on the hosting, they enforce
RewriteBase / which seems to complicate things a bit.

.htaccess placed in .../product/ folder does not do the job,
and whatever I try as far as changes to Rewrite rules 
does not seem to help..

Some of the latest version is:
Code: [Select]
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} -f
RewriteRule ^images/stories/virtuemart/product/(.*)\.(jpeg|jpg)$ /watermark/watermark.php [QSA,NC]

I also tried to put the same in the root .htaccess

Somehow I suspect that the issue might be with relating the URI to watermark.php, i.e. maybe something needs to be changed here:
Code: [Select]
$path = $_SERVER['DOCUMENT_ROOT'].$_SERVER['REQUEST_URI'];
preg_match('@\.(gif|jpg|jpeg|png)$@i',$_SERVER['REQUEST_URI'],$m);
$ext = strtolower($m[1]);
$generated = CACHE.md5($_SERVER['REQUEST_URI']);

or Rules should store some more parameters, like in:

Code: [Select]
RewriteCond %{REQUEST_URI}  ...
But I'm complete noob in php, so would hope someone could help me.

I'm using it in Joomla 2.5.6 / VM 2.0.10
Title: Re: Watermark virtuemart 1.1.3
Post by: RomanWeb on October 13, 2012, 16:42:23 pm
Solved my problem. It appears that the paths are returned differently on Linux vs my PC XAMPP.

So, eventually, I have htaccess in images folder, stating something like:

Code: [Select]
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} -f
RewriteRule ^(.*)\.(jpg)$ /watermark/watermark.php [QSA,NC]

And then a bit modified code in watermark.php, which is in the /watermark/ in the root.
Code: [Select]
$path = '../'.$_SERVER['REQUEST_URI'];
Title: Re: Watermark virtuemart 1.1.3
Post by: Roderick1 on October 13, 2012, 18:46:01 pm
Glad to you guys are still using this script, even in joomla 2.5  ;D
Title: Re: Watermark virtuemart 1.1.3
Post by: Yngwiedis on October 23, 2012, 13:47:45 pm
Hello...

With the included .htaccess file i always get 400 error when i try to load any picture.
If i remove the htaccess the pictures is loading fine but of course without watermark.

Can someone help me with that ?

Thank you.
Title: Re: Watermark virtuemart 1.1.3
Post by: Yngwiedis on October 25, 2012, 11:25:41 am
Anyone ?
Title: Re: Watermark virtuemart 1.1.3
Post by: Roderick1 on October 25, 2012, 12:28:42 pm
Nope... i really do not know why it would give you a 400 error, contact your hosting guys and ask them if they know why..
Title: Re: Watermark virtuemart 1.1.3
Post by: Yngwiedis on October 25, 2012, 13:21:15 pm
I already contact them.
They cant provide me with coding help.
They just tell me that i need to change the command in .htaccess file because the Apache can't handle the request.


This is the error they get:

Quote
It seems this code renderes the following apache error:

###
[Tue Oct 23 11:41:20 2012] [error] [client xxx.xxx.xxx.xxx] Invalid URI in request GET /estore/components/com_virtuemart/shop_image/product/100000/100203.jpg HTTP/1.0
###

Can you please please help me ? 
Title: Re: Watermark virtuemart 1.1.3
Post by: Roderick1 on October 25, 2012, 13:42:57 pm
It maybe sounds crazy, but change hosting, if their apache cant handle this you are bound to get more problems in the future
Title: Re: Watermark virtuemart 1.1.3
Post by: Yngwiedis on October 25, 2012, 13:45:05 pm
I can't change hosting right now...
I have payed for one year in advance just 2 months ago :(

We can't do anything for the problem ?
Title: Re: Watermark virtuemart 1.1.3
Post by: Roderick1 on October 25, 2012, 14:43:26 pm
Maybe somebody else can here but i dont see it, sorry
Title: Re: Watermark virtuemart 1.1.3
Post by: Yngwiedis on October 25, 2012, 14:55:49 pm
:(
There is no other way to "get" the picture from the .htaccess ?

They give me 2 links as a reference, but i am not so familiar with apache commands.
Maybe you can find something there ?


http://stackoverflow.com/questions/12800733/modifying-rewrite-rules-in-subfolder-when-rewritebase-is-enforced
http://stackoverflow.com/questions/9044054/htaccess-and-watermark
Title: Re: Watermark virtuemart 1.1.3
Post by: Yngwiedis on October 28, 2012, 00:14:51 am
Any help please ?
Title: Re: Watermark virtuemart 1.1.3
Post by: Yngwiedis on October 28, 2012, 20:43:10 pm
Please please please !!!
Title: Re: Watermark virtuemart 1.1.3
Post by: svito on December 06, 2012, 23:07:23 pm
Works well as a category where the images are without watermark.
I think it does not work because there are pictures link ->
Code: [Select]
http://www.domain.com/components/com_virtuemart/show_image_in_imgtag.php?filename=resized%2F__pir__la_1_6_mm_50c10e2fd1628_300x300.jpg&newxsize=300&newysize=300&fileout=
What should I do to be a watermark on the images displayed in the category?
Title: Re: Watermark virtuemart 1.1.3
Post by: robertosalemi on January 15, 2013, 16:03:16 pm
Hi,
compliment to the script, very useful.

The watermak can be clearly seen on the product page, ie in the flypage, but if I wanted to see it even in the browse page? What to do?

Thank you.
Title: Re: Watermark virtuemart 1.1.3
Post by: Roderick1 on January 28, 2013, 16:56:16 pm
Hi to all,

Im the original poster of this script.

Im going to update this script with more options, and its going to become an official plugin to be used in joomla 1.5 - 2.5 - 3.0 and also for new version of virtuemart.
We will be up and running with this in two weeks. details will follow on our new website at http://www.top-motion.be

So be patient just a while longer :)

regards,
Roderick.
Title: Re: Watermark virtuemart 2.0.20
Post by: fkeller on April 01, 2013, 21:15:37 pm
Hello,

I have Joomla 2.5 and VM2.0.20
It works well with JPG and GIF files, but it wont display the watermark on PNG's.

Does someone also have this problem...?


cheers,
Flex
Title: Re: Watermark virtuemart 1.1.3
Post by: Roderick1 on April 01, 2013, 23:34:30 pm
Dont worry, im building the new version as we speak, and it will have a lot of options :)

Hello,

I have Joomla 2.5 and VM2.0.20
It works well with JPG and GIF files, but it wont display the watermark on PNG's.

Does someone also have this problem...?


cheers,
Flex
Title: Re: Watermark virtuemart 1.1.3
Post by: Adam Bazaroff on October 17, 2013, 08:53:19 am
Dont worry, im building the new version as we speak, and it will have a lot of options :)
And how is going? Some news?
Title: Re: Watermark virtuemart 1.1.3
Post by: Roderick1 on October 17, 2013, 17:02:46 pm
Dont worry, im building the new version as we speak, and it will have a lot of options :)
And how is going? Some news?

My programmer quit on me :( but i will get back on this soon
Title: Re: Watermark virtuemart 1.1.3
Post by: lecer on November 03, 2013, 09:29:25 am
Really need watermark on related products (=browse) too.
Hope that you will have enough time to do that  ;)
Title: Re: Watermark virtuemart 1.1.3
Post by: adi2014 on April 05, 2014, 07:06:54 am
Hello,

I am using Joomla 2.5 nad VM 2.0.26d latest version.

I have found similar tutorial how add watermark here

http://mtkcode.blogspot.com/2013/07/apply-watermark-image-into-product.html

but I am facing similar issues like many users described above. My pictures do not show on VM (like it would be broken link). I have try to add permissions to chache folder to 777 but that didn't change anything.

Any suggestions?

Thank you!
Adi