Jump to content
rigadin2

[Contribution] oscThumb

Recommended Posts

I am sorry to bother everyone but I just can't seem to find an answer or solution through searching the forum. When I try to access my site: http://www.stylizeyou.com/catalog/ I get the error that is seen when you click on my site. This happened after installing OSC thumb. It seems to be referencing phpthumb.sorceforge.net link. I am not sure where to change this since there wasn't anything in the instructions about it. Any help would be appreciated.

Share this post


Link to post
Share on other sites

I am having a problem with oscThumb 1.1. in osc 2.2 with Ultimate SEO installed. I initially installed it and it worked great. Since it was successfully thumbnailing the images and loading quickly, I decided to upgrade my image sizes to enhance the zoomed image.

I uploaded all of my higher resolution images through ftp, replacing the smaller (450pixel high) images with images varing in size up to 2500pixels high.

And that is where the problem began...now the product images and category images will not display.

If I click to enlarge the image, it displays just fine.

If I right-click an undisplayed product image, it show this as the url for example:

http://www.classiccustomer.com//oscthumb.p...1af0896f4277ab0

 

The /images/16057CHMC.jpg does exist in the image directory.

 

If I turn oscThumb off, all images load correctly.

 

How can I trouble-shoot this? If some of my jpg images have pathes embedded could this cause a problem? I had some images that were cymk, but I am pretty sure I changed all to RGB, if there are any cymk images I missed, would that cause NONE of the images to load?

 

Any help would be appreciated.

Share this post


Link to post
Share on other sites
I am having a problem with oscThumb 1.1. in osc 2.2 with Ultimate SEO installed. I initially installed it and it worked great. Since it was successfully thumbnailing the images and loading quickly, I decided to upgrade my image sizes to enhance the zoomed image.

I uploaded all of my higher resolution images through ftp, replacing the smaller (450pixel high) images with images varing in size up to 2500pixels high.

And that is where the problem began...now the product images and category images will not display.

If I click to enlarge the image, it displays just fine.

If I right-click an undisplayed product image, it show this as the url for example:

http://www.classiccustomer.com//oscthumb.p...1af0896f4277ab0

 

The /images/16057CHMC.jpg does exist in the image directory.

 

If I turn oscThumb off, all images load correctly.

 

How can I trouble-shoot this? If some of my jpg images have pathes embedded could this cause a problem? I had some images that were cymk, but I am pretty sure I changed all to RGB, if there are any cymk images I missed, would that cause NONE of the images to load?

 

Any help would be appreciated.

 

I see your thumbs now, did you just leave oscthumb off? I am having the same problem, but I didn't change anything. It just started today and only on one of my osc sites. If you fixed it, please let me know how.

 

Thanks!

Share this post


Link to post
Share on other sites
I see your thumbs now, did you just leave oscthumb off? I am having the same problem, but I didn't change anything. It just started today and only on one of my osc sites. If you fixed it, please let me know how.

 

Thanks!

 

My problem still exists, I just turned off ocsThumb.

If you find a solution, please post, I will do the same.

Share this post


Link to post
Share on other sites

My thumbnail not displaying is fixed.

I when through all 1600 of my images and found several that were in cymk mode, so I changed them to RGB, along with reducing images sizes to no more than 2500x2500 pixels.

This fixed my problem.

Share this post


Link to post
Share on other sites

This has been raised in one of my threads, so I thought I would repeat it here, in the hope that someone familier with the osCthumb code can find a solution.

 

osCthumb only watermarks popup images that are passed through popup_image.php which is only called (on an unmodified store) by the javascript popup function, that means all thats needed to get a non-watermarked image is to disable javascript in the browser!! :huh:

 

Would it be possible to watermark all popup images, regardless of the calling page? :)


Sam

 

Remember, What you think I ment may not be what I thought I ment when I said it.

 

Contributions:

 

Auto Backup your Database, Easy way

 

Multi Images with Fancy Pop-ups, Easy way

 

Products in columns with multi buy etc etc

 

Disable any Category or Product, Easy way

 

Secure & Improve your account pages et al.

Share this post


Link to post
Share on other sites
This has been raised in one of my threads, so I thought I would repeat it here, in the hope that someone familier with the osCthumb code can find a solution.

 

osCthumb only watermarks popup images that are passed through popup_image.php which is only called (on an unmodified store) by the javascript popup function, that means all thats needed to get a non-watermarked image is to disable javascript in the browser!! :huh:

 

Would it be possible to watermark all popup images, regardless of the calling page? :)

 

i tought oscthumb know an image to process because of the size (diemnsions) of it that correspond to the one set in configuration ... and if it s has a code that checkthe calling page we should just check if we can override it, but most important is the way popup image is called:

echo '<a  rel="image_group" title="'.$product_info['products_name'].'" href="' .[b] tep_href_link(DIR_WS_IMAGES . $value)[/b] . '" target="_blank">' . tep_image(DIR_WS_IMAGES . $value, $product_info['products_name'], TINY_IMAGE_WIDTH, TINY_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br />' . '</a>';

 

the big popu image is called by a link , not a tep_image so oscthmb would not be used because of that

 

what do you think ?


MS2

Share this post


Link to post
Share on other sites

Watermarks with scripts disabled:

 

You're right azer, I did'nt look close enough at the code (it was a very late night/morning last night!!) :blush:

 

This is my solution for an unmodified product_info.php

 

find(112):

 

<?php echo '<a href="' . tep_href_link(DIR_WS_IMAGES . $product_info['products_image']) . '" target="_blank">' . tep_image(DIR_WS_IMAGES . $product_info['products_image'], $product_info['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?>

 

replace with:

 

<?php if (class_exists('oscthumb') && CFG_MASTER_SWITCH == 'On') { preg_match('/"([^"]+)"/',htmlentities ( tep_image(DIR_WS_IMAGES . $product_info['products_image'],'','','','','',5), ENT_NOQUOTES), $image);  $source=str_replace('&','&',$image[1]); } else { $source = DIR_WS_IMAGES . $product_info['products_image']; }
 echo '<a href="' . tep_href_link($source) . '" target="_blank">' . tep_image(DIR_WS_IMAGES . $product_info['products_image'], $product_info['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?>

 

you could apply the same to product_reviews etc. :)


Sam

 

Remember, What you think I ment may not be what I thought I ment when I said it.

 

Contributions:

 

Auto Backup your Database, Easy way

 

Multi Images with Fancy Pop-ups, Easy way

 

Products in columns with multi buy etc etc

 

Disable any Category or Product, Easy way

 

Secure & Improve your account pages et al.

Share this post


Link to post
Share on other sites

Watermarks with scripts disabled:

 

There is a bug the code I posted last, if the image is not on the server & image required is set to false a unable to determine page link error will occur, to fix use the following:

 

 

This is my updated solution for an unmodified product_info.php

 

find(112):

 

<?php echo '<a href="' . tep_href_link(DIR_WS_IMAGES . $product_info['products_image']) . '" target="_blank">' . tep_image(DIR_WS_IMAGES . $product_info['products_image'], $product_info['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?>

 

replace with:

 

<?php $source = ''; if (class_exists('oscthumb') && CFG_MASTER_SWITCH == 'On') { preg_match('/"([^"]+)"/',htmlentities ( tep_image(DIR_WS_IMAGES . $product_info['products_image'],'','','','','',5), ENT_NOQUOTES), $image);  $source=str_replace('&','&',$image[1]); } 
echo '<a href="' . tep_href_link($source ? $source : DIR_WS_IMAGES . $product_info['products_image']) . '" target="_blank">' . tep_image(DIR_WS_IMAGES . $product_info['products_image'], $product_info['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?>

 

you could apply the same to product_reviews etc. :)

 

 


Sam

 

Remember, What you think I ment may not be what I thought I ment when I said it.

 

Contributions:

 

Auto Backup your Database, Easy way

 

Multi Images with Fancy Pop-ups, Easy way

 

Products in columns with multi buy etc etc

 

Disable any Category or Product, Easy way

 

Secure & Improve your account pages et al.

Share this post


Link to post
Share on other sites

I have a new issue with this, I hope someone can provide a solution.

 

Using this with FancyBox popups there is problem if filename encryption is used, as the image extension is also encrypted FancyBox will not recognise the file as an image.

 

Can the image extension remain un-encrypted, or a flag added to the url to indicate the extension?


Sam

 

Remember, What you think I ment may not be what I thought I ment when I said it.

 

Contributions:

 

Auto Backup your Database, Easy way

 

Multi Images with Fancy Pop-ups, Easy way

 

Products in columns with multi buy etc etc

 

Disable any Category or Product, Easy way

 

Secure & Improve your account pages et al.

Share this post


Link to post
Share on other sites

I was wanting to try out this contrib but spybot snd is saying the zip files have Eblaster threats for both downloads of version 1.1.1 and oscThumb 1.1 :(

Anyone else getting this?

Share this post


Link to post
Share on other sites

I was wanting to try out this contrib but spybot snd is saying the zip files have Eblaster threats for both downloads of version 1.1.1 and oscThumb 1.1 sad.gif

Anyone else getting this?

 

My version of spybot does not report any issue, niether does kaspersky!!


Sam

 

Remember, What you think I ment may not be what I thought I ment when I said it.

 

Contributions:

 

Auto Backup your Database, Easy way

 

Multi Images with Fancy Pop-ups, Easy way

 

Products in columns with multi buy etc etc

 

Disable any Category or Product, Easy way

 

Secure & Improve your account pages et al.

Share this post


Link to post
Share on other sites

My version of spybot does not report any issue, niether does kaspersky!!

 

I decided to try again with the file uploaded yesterday oscThumb 1.1.2 and that one scans clean :) thanks for uploading looking forward to giving this contrib a try

Share this post


Link to post
Share on other sites

Hi,

 

I have a problem with my installation, and I did not find anyone complaining about it yet.

I installed oscThumb on both my local installation (using WAMP) and to my server without any major problems. Except that not all thumbnails appear (on both installations)... The source image is present because if I disable the contribution it appears. The thumbnails are missing from the products list and also from the products info page, but when I click on the link to enlarge the full size image appears.

The problem seems to be related with the encryption because when I change the encription key the missing thumbnail appears but some others, somewhere, disappears.

I was not able to find a link between the encription key and the missing images. I did not find a link between the parameters sent to oscthumb.php in the link and the file name and/or path in cache folder to see if the picture was created or not.

 

I need to debug this issue, but I don't know where to start. I think a good starting point is to see the if the generated file name for the cache is really created or not, but how can I do that and where?

Can someone help?

 

Br

Pedro

Share this post


Link to post
Share on other sites

can u make it clear what settings your using & if error occurs in both firefox & ie


Sam

 

Remember, What you think I ment may not be what I thought I ment when I said it.

 

Contributions:

 

Auto Backup your Database, Easy way

 

Multi Images with Fancy Pop-ups, Easy way

 

Products in columns with multi buy etc etc

 

Disable any Category or Product, Easy way

 

Secure & Improve your account pages et al.

Share this post


Link to post
Share on other sites

can u make it clear what settings your using & if error occurs in both firefox & ie

I don't know if the question is for me or not, but here it goes anyway...

I have the problem in both Firefox 3.5 and IE8. And it happens with both GIF and JPG images. Some categories images also suffer from this strange disapearement.

For the oscThumbs settings I have:

- master switch=on

- Process Store's Graphics =False

- Encrypt Image Filenames =True

- a string with capital and small letters and spaces as the encryption key

- Output GIFs as JPEGs = False

- Use Zoom Crop? = False

- JPEG Quality = 95 for all

no image or text wattermarks, but if I activete them it still has the issue

all the other settings are the default ones

 

Thanks for the help!

Share this post


Link to post
Share on other sites

Does anyone have ideas where to start?

I don't need that anyone does it for me, I just need some ideas where to start. I tried to use the echo command as in most of my debugging but it does not show anything in most of the files (form class and oscThumb folders). Is there any other way to show messages from these files?

Please note that I'm not a php expert, but I can easily understand the code to try to fix it.

 

Br,

Pedro

Share this post


Link to post
Share on other sites

encription causes missing thumbnail images

 

 

I have been able to duplicate this to an extent.

 

It would appear the issue is due to the encryption removing the file extension, causing problems identifying file type.

 

I do not have any solution to date.


Sam

 

Remember, What you think I ment may not be what I thought I ment when I said it.

 

Contributions:

 

Auto Backup your Database, Easy way

 

Multi Images with Fancy Pop-ups, Easy way

 

Products in columns with multi buy etc etc

 

Disable any Category or Product, Easy way

 

Secure & Improve your account pages et al.

Share this post


Link to post
Share on other sites

encription causes missing thumbnail images

 

 

 

I have been able to duplicate this to an extent.

 

It would appear the issue is due to the encryption removing the file extension, causing problems identifying file type.

 

I do not have any solution to date.

 

Thanks for the information!

I thinks it's a weird behaviour because most thumbnails work, and I guess the file extension is removed from all of them, so the question that remains is why if the extension is removed some thumbnails appear and some others don't. Even weider is that the small thumbnails that are missing, we can see the larger picture from the Product Info.

 

I checked also the forum of phpThumb (where oscThumbs is based on) and I saw no one complaining on this...

 

Do you know if there is a rule on defining the encryption key (characters that can't be used, characters that should always be used, etc.)?

 

Br,

Pedro

Share this post


Link to post
Share on other sites

I installed oscThumb and everything looks and works great...only thing is that when it processes the image and then when the new image from oscThumb displays its on #FCFEFC background. All of my images were on #FFFFFF background when i uploaded them. Now if you closely look you can see that it doesnt fit in how i would like it on my page. Where can i change that?

Share this post


Link to post
Share on other sites

I have recently added the oscThumb contribution, but cannot get it to work. The problem seems to be caused by the application_top.php file:

 

I have manually edited it, by adding the following code as instructed:

 

"// START oscThumb

require(DIR_WS_CLASSES . 'oscthumb.php');

$oscthumb = new oscthumb;

$oscthumb->check_hash(); // Check if parameters have changed. Delete cache if yes.

// END oscThumb"

 

immediately before

 

"// initialize the message stack for output messages

require(DIR_WS_CLASSES . 'message_stack.php');

$messageStack = new messageStack;"

 

 

When I do this, I get the following message on my site (and just a white screen with nothing else on it):

 

 

"phpThumb() v1.7.7-200612252166

 

ERROR: missing hash"

 

 

Can anyone suggest what I should do?

 

Many thanks.

 

Bob

Share this post


Link to post
Share on other sites

 

 

Check your install again, tips given here may help.


Sam

 

Remember, What you think I ment may not be what I thought I ment when I said it.

 

Contributions:

 

Auto Backup your Database, Easy way

 

Multi Images with Fancy Pop-ups, Easy way

 

Products in columns with multi buy etc etc

 

Disable any Category or Product, Easy way

 

Secure & Improve your account pages et al.

Share this post


Link to post
Share on other sites

HERE it says that the folder "you have to make the cache directory writeable (CHMOD 777)"

this is not dangerous for the security of my site, you know hackers and so on.

Share this post


Link to post
Share on other sites

Found another bug:

 

When you choose to have a watermark on the image, even in encrypted mode, if you grab the image location and remove the watermark part, the image is displayed in it's original form, so I guess there is no validation of the hash part of the link.

Exampe:

http://localhost/loja/oscthumb.php?src=lqrhxtPO2KHP1tDX1Kbj5ZTUz7_d1crR1qbnlNnKydfI1sKiy6jj5MbS04He4tA.&w=160&h=160&fltr[]=wmi|/phpThumb/watermarks/car.png|C|75|0&f=jpg&q=95&hash=7a0c683ed6fb47e15f946eaeef3f6c66

shows a picture with a watermark but if you remove &fltr[]=wmi|/phpThumb/watermarks/car.png|C|75|0 the original image is shown at the specified size without the watermark and without any error.

 

There is the same behavior if you change the width and height settings.

 

Is it a bug or a bad setting on my configuration? There are no encrypted examples on phpThumb() source page to test.

 

Does someone knows of another good contribution to create thumbnails and watermarks that works?

 

Regards

Edited by pedro.antunes

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

×