Jump to content
Sign in to follow this  
SGershon

ThumbNails and WaterMarks OnTheFly

Recommended Posts

I don't see full path to your image.php file it should be like this(lime my server):

 

RewriteEngine         on
RewriteRule        ^(.*)\.jpg                /home/user12435/web/com/webdomain/www/watermark/image.php?%{REQUEST_FILENAME}

 

I contacted my host for the full path and changed the htaccess file to

 

RewriteEngine  on
RewriteRule	^(.*)\.jpg  /home/thecolla/public_html/catalog/images/image.php?%{REQUEST_FILENAME}

 

Unfortunately, I still get the same result. Broken images and then blank screen if I right click.

 

Rayzak - would you post a link to your site so I could see the contribution in action? Thanks

Share this post


Link to post
Share on other sites

Ok, you should create a watermark directory in the catalog root directory and copy all files in there.

 

After, fix the .htaccess and put it in to the images directory.

 

RewriteEngine  on
RewriteRule ^(.*)\.jpg  /home/thecolla/public_html/catalog/watermark/image.php?%{REQUEST_FILENAME}

 

Sorry, I got open issues with this contribution and I don't use it yet.

Share this post


Link to post
Share on other sites
Rayzak - would you post a link to your site so I could see the contribution in action? Thanks

Hey, you can always look ar Rob's site: http://www.russianglass.co.uk/

 

(Rob is the one who came up with this contribution, long ago)


If at first you don't succeed, you must be a programmer.

 

Tip Posted: Languageless Reviews

Share this post


Link to post
Share on other sites
Ok, you should create a watermark directory in the catalog root directory and copy all files in there.

 

Which files am I putting in the watermark directory? image.php and watermark.png?

 

Thank you for your assistance. :)

Share this post


Link to post
Share on other sites

hey, how to handle 2 different thumbnail-sizes?

 

tried to add the following to .htaccess:

RewriteRule ^(.*)\.thumb thumb.php?%{REQUEST_FILENAME}

RewriteRule ^(.*)\.thumb640 thumb640.php?%{REQUEST_FILENAME}

 

then i uploaded a two files thumb.php (for 130*130) and thumb640.php (for 640*480).

 

then in product_info.php i changed the line

 

----

document.write('<?php echo '<a href="java script:popupWindow(\\\'' . tep_href_link(FILENAME_POPUP_IMAGE, 'pID=' . $product_info['products_id']) . '\\\')">' . tep_image(DIR_WS_IMAGES . $product_info['products_image'], addslashes($product_info['products_name']), SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?>');

---- to ---

document.write('<?php echo '<a href="java script:popupWindow(\\\'' . tep_href_link(FILENAME_POPUP_IMAGE. ".thumb640", 'pID=' . $product_info['products_id']) . '\\\')">' . tep_image(DIR_WS_IMAGES . $product_info['products_image'], addslashes($product_info['products_name']), SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?>');

----

 

i also made the changes to html_output.php as described.

so now it works for 130*130 thumbs but not for the pop up window with the large images...

 

how can i fix this/get this working?

Edited by flom

Share this post


Link to post
Share on other sites

well i found out 2 things:

 

you have to change the line

$mimage=str_replace(".thumb",".jpg",$QUERY_STRING);

to

$mimage=str_replace(".thumb640",".jpg",$QUERY_STRING);

in thumb640.php

 

and the main problem is the .htaccess file:

because the first rule handles everything that has the following extensions:

 

.thumb

.thumb640

.thumbxy

.thumb123

etc

 

so the rewriterule thumb640 cannot do its job.

how to fix this?

 

quite easy:

just turn it around

 

RewriteRule ^(.*)\.thumb640 thumb640.php?%{REQUEST_FILENAME}

RewriteRule ^(.*)\.thumb thumb.php?%{REQUEST_FILENAME}

Edited by flom

Share this post


Link to post
Share on other sites

Flow, I've downloaded your edited version, but I have no clue as to how to install your changes. You have added the files popup_image.php - popup_image7.php. Your instructions only mention that I have to change something in these files, but not where I should put them. Also these 7 files make a database query, but the row isn't in the standard database, so you've forgot to add the SQL file/code to do that.

Share this post


Link to post
Share on other sites

you have to install the contribution "more pics" first.... in this file you can find the popup_image files...

Share this post


Link to post
Share on other sites
you have to install the contribution "more pics" first.... in this file you can find the popup_image files...

Ah OK, I missed that that was essential. Do you mean this contribution?

Edited by computeramstelveen

Share this post


Link to post
Share on other sites

Hi there,

 

I've got a problem to get this nice contrib to work.

 

I placed all files in /catalog/thumbs.

 

I edited the code in /includes/functions/html_out.php

so that all images are requested with the .thumb ending.

 

But now the rewrite rule in my htaccess seems to be the problem.

 

I already have a htaccess file, which makes my testsystem password-protected.

 

The content:

AuthUserFile /srv/www/test/.htpasswd
AuthType Basic
AuthName "am"
require valid-user

RewriteEngine on
RewriteRule ^(.*)\.thumb_big /thumbs/thumb_big.php?%{REQUEST_FILENAME}
RewriteRule ^(.*)\.thumb_medium /thumbs/thumb_medium.php?%{REQUEST_FILENAME}
RewriteRule ^(.*)\.thumb /thumbs/thumb.php?%{REQUEST_FILENAME}

 

But then I only get a 500 - Internal server error.

 

Please be so kind and give me some further advice to get this contrib working.

 

Thanks in advance,

Regards

Andreas

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  

×