Jump to content
Sign in to follow this  
orient

On The Fly Watermark Enhanced 1.1

Recommended Posts

This is the coolest thing and WHAT a time-saver!!!

 

Hat's off to Orient!

 

I had it working in just a few minutes.

 

I do have one question tho.

 

Which line in the php file do I change (and how) so that there is no watermark on the thumbnails, only the enlarged jpgs?

 

I'm looking at the code, but not too good at that stuff.

 

thanks!

 

Lobo

Share this post


Link to post
Share on other sites

Hi Lobo,

 

Thanks for your compliments! Please also salute to Rob O'Donnell, the original script writer.

 

This script works on the basis of image types. That means all jpeg images under protected directories will be watermarked. The size difference of images only determines which watermark (logo) image is incorporated with the original images. Therefore, if you don't want very small images to be watermarked in the protected directories, there's only one way out for you:

 

Reformat the very samll jpeg image files to .gif files.

 

I'm working hard on my online store now, hope to launch a live one for you guys soon.

Share this post


Link to post
Share on other sites

Orient,

 

I appreciate your reply.

 

But, to tell you the truth, it's working the way I want it to. The small images do not have a watermark and the large images do.

 

I installed Rob's "On The Fly Thumbnail and Watermark" then, when I didn't exactly like the way it did the watermark, I replaced image.php with yours. (I prefer the watermark in the center).

 

Then, I modified the php file and deleted references to the small watermark, including the way it treats images less than 300px.

 

So, now it works.

 

I'm not real good at this stuff, but once and a while, I get lucky!

 

Lobo

Share this post


Link to post
Share on other sites

Oh yeah, if you sacrifice the feature of displaying different watermark images according to image size of the version 1.1, you are able to prevent watermark to be added onto very small iamges.

Share this post


Link to post
Share on other sites

I'd like so much to get this contribution to work :).

 

So... I followed all of the instructions in the Read Me file. I've been working with OSC everyday for two months now, so I'm starting to get the hang of it.

 

If this is my shop:

 

/shop

then I put the uploaded files in:

/shop/watermark

 

I then add the full path in water.htacess to image.php , upload it my images directory (/shop/images), and change the filename to .htaccess

 

But, when I look at my shop all of the images under product_listing have no watermark. And when I click to view the larger version (popup), it's just a red X

:( :(.

 

I already use "On The Fly Autothumbnailer" (which uses the GD Libraries), it is set to cache the thumbnailed photos. I'm pretty sure that the root of this problem is a conflict with On The Fly Autothumbnailer and On The Fly Watermark.

 

Any ideas on how to make them work together?

Share this post


Link to post
Share on other sites

Hi there and thanks fot A great Contrib.

 

 

My Problem lies in the fact that my rivials ar steeling my pics and using them for there own website they have removed them once we caught them but we wonder who we havent caught. <_<

 

We came across you contrib and looks Great we have started installing it on our test site (my Pc and have encounted a few problems) as soon as the .htaccess is loded all pics exsept .SWF Swish file dissapeer.

 

I assomed it must be the root link in the.ht file and here is what i have tried

C:/apache2triad/htdocs/catalog/images/image.php?%{REQUEST_FILENAME}
/apache2triad/htdocs/catalog/images/image.php?%{REQUEST_FILENAME}
/htdocs/catalog/images/image.php?%{REQUEST_FILENAME}
/catalog/images/image.php?%{REQUEST_FILENAME}
/localhost/catalog/images/image.php?%{REQUEST_FILENAME}

None of the above work

have you any sugestions

 

Or where could i find the tool

Please use tools like env.php

 

 

Many Thanks for any help you could give

 

 

Marc T

Share this post


Link to post
Share on other sites

This contrib only effects files with the extention .jpg if you don't make any modification. Therefore, it has nothing to do with .swf files. You'd better check if there's some other contrib or scripts developed by yourself manipulating .swf files or not, or there may be some conflicts between them. Moreover, you'd see if there are other commands in you .hta files other than the Watermark contrib commands.

Share this post


Link to post
Share on other sites

Just a quick note to say that I have installed this contribution and am using both the watermark and thumbnail feature.

 

I am so pleased with the way it works.

 

Hat's off - a job well done!

 

Lobo

Share this post


Link to post
Share on other sites
$main_img = imagecreatefromgif($mimage);

 

looks awful tho  :D

 

Works with jpg, doesn't work with gif:-(

 

When I add

 

$main_img = imagecreatefromjpeg($mimage);

$main_img = imagecreatefromgif($mimage);

 

and

 

RewriteEngine on

RewriteRule ^(.*)\.jpg /home/www/public_html/watermark/image.php?%{REQUEST_FILENAME}

RewriteRule ^(.*)\.gif /home/www/public_html/watermark/image.php?%{REQUEST_FILENAME}

 

all files get proken.

 

How can I make it work for BOTH jpg and gif?

Share this post


Link to post
Share on other sites

Great contrib

 

Unfortunatly i cannot get it to work. GD is enabled and works, did everything in instructions, they are pretty simple. Only thing is it could be the .htaccess in the image directory, the path or something. this is what i got.

 

RewriteEngine on

RewriteRule ^(.*)\.jpg /inetpub/webroot/image.php?%{REQUEST_FILENAME}

RewriteRule ^(.*)\.gif /inetpub/webroot/image.php?%{REQUEST_FILENAME}

 

 

Thanks

 

 

Eitan

Share this post


Link to post
Share on other sites

Hi,

I have installed this contribution fine and it works great, however i am using shared ssl and when i go to the ssl area the images don't show?

 

I have been told this is because the shared ssl uses the rewrite rules different, so the .htaccess file can not work

 

I have put the .htaccess in the main folder.

 

Any help appreciated :)

thanks

Share this post


Link to post
Share on other sites

Great simple contribution. But as others have stated as well I can't seem to get it to work. The images come up as blank boxes with the infamous X is the top left corner. Here is my Apache directory configuration information and my .htaccess file:

 

http.conf

#

# OsCommerce On the Fly Watermark Contribution

#

 

#

# Enable .htaccess in images directory

#

<Directory "C:/www/webroot/history/images">

Options FollowSymLinks

AllowOverride FileInfo

Order allow,deny

Allow from all

</Directory>

 

.htaccess

RewriteEngine on

RewriteRule ^(.*)\.jpg C:/www/webroot/watermark_image.php?%{REQUEST_FILENAME}

 

Can someone post their Apache <directory> configuration information or help me out here. Obviously I don't appear to know how to setup Apache properly.

Thanks in advance

Share this post


Link to post
Share on other sites

Never mind, I found the problem. It seems that fully qualifying the directory structure in the .htaccess doesn't work properly. It doesn't get an error anywhere that I could find but it doesn't execute. After changing the .htaccess to the root location it works.

 

RewriteEngine on

RewriteRule ^(.*)\.jpg /watermark_image.php?%{REQUEST_FILENAME}

 

Hope this helps others with a problem using Apache 2 and WinXp

Share this post


Link to post
Share on other sites

My manufacturers are displayed with watermark! Some other images too. Is there any way to exclude specific files and maybe it would be better to specify the minimum image size for watermark?

Share this post


Link to post
Share on other sites
My manufacturers are displayed with watermark! Some other images too. Is there any way to exclude specific files and maybe it would be better to specify the minimum image size for watermark?

 

Is there anyway to rewrite the "RewriteRule ^(.*)\.jpg" part in the .htaccess file so that only jpg files with a "-" character in the filename get watermarked?

 

 

Thanks,

Eric

Share this post


Link to post
Share on other sites

This is a great and very easy to use contribution. But is there anyway to use it with the On the fly thumbnailer so all thumbnails will be watermarked as well??

 

The script works for JPEG extension. The thumbnails are cached and their path looks like

http://www.domain.com/catalog/product_thumb.php?img=images/acessories/a0002a.jpg&w=85&h=100

 

How to apply the watermark on them??

 

Tks for any help.

Edited by Patty

Patty

Share this post


Link to post
Share on other sites
Hi,

I have installed this contribution fine and it works great, however i am using shared ssl and when i go to the ssl area the images don't show?

 

I have been told this is because the shared ssl uses the rewrite rules different, so the .htaccess file can not work

 

I have put the .htaccess in the main folder.

 

Any help appreciated :)

thanks

 

Did you find a fix for this at all? I'm having the same issue, other than that, it works great.

 

Thanks

Share this post


Link to post
Share on other sites
RewriteRule ^(.*)\.jpg C:/www/webroot/watermark_image.php?%{REQUEST_FILENAME}

 

Can someone post their Apache <directory> configuration information or help me out here. Obviously I don't appear to know how to setup Apache properly.

Thanks in advance

path here should be like URL path from your root webserver

For example if you install your watermark script to the htttp://you.shop/watermark/ folder then you rewrite rule should be:

 

RewriteRule ^(.*)\.jpg /watermark/image.php?%{REQUEST_FILENAME}

Edited by slako

Share this post


Link to post
Share on other sites

Hi, this is a great contrib, but I am having some bugs while trying to make it work.

 

First of when I add a new product through the Administrator Control Panel it automatically puts up the "Image Not Available" PNG. But then when I browse through the store it will show the small thumbnail fine. Then if you click on the Click to Enlarge link I just get a red X.

 

I have followed the instructions, made sure I have the fool root directory and I am not sure where to go from here. Any ideas and suggestions appreciated.

Share this post


Link to post
Share on other sites

I've got to say, this is a fantastic contribution and works brilliantly once I'd figured out the correct document root path on my 1&1 web space (tip for anyone else on 1&1...add /htdocs/ to the end of the root path shown in the 1&1 domains list).

 

The only issue I'm encountering is rather sluggish loading of watermarked images in the popup window. The window appears straight away, but remains blank for around 20 seconds until the watermarked image finally appears. My images aren't particularly large (about 40KB on average), so are there any settings I can modify to speed up the watermarking process?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×