[Contribution] oscThumb
#181
Posted 27 September 2009, 03:55
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.
#182
Posted 02 October 2009, 10:48
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!!
Would it be possible to watermark all popup images, regardless of the calling page?
Remember, What you think I ment may not be what I thought I ment when I said it.
Post osC questions don't PM them. Vampire?
Contributions:
Multi Images with Fancy Popups, Easy way
Products in columns with multi buy etc etc
Disable any Category or Product, Easy way
Secure & Improve your account pages et al.
#183
Posted 02 October 2009, 15:53
spooks, on Oct 2 2009, 12:48 PM, said:
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!!
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 ?
#184
Posted 02 October 2009, 16:52
You're right azer, I did'nt look close enough at the code (it was a very late night/morning last night!!)
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.
Remember, What you think I ment may not be what I thought I ment when I said it.
Post osC questions don't PM them. Vampire?
Contributions:
Multi Images with Fancy Popups, Easy way
Products in columns with multi buy etc etc
Disable any Category or Product, Easy way
Secure & Improve your account pages et al.
#185
Posted 03 October 2009, 20:18
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):
replace with:
you could apply the same to product_reviews etc.
[/quote]
Remember, What you think I ment may not be what I thought I ment when I said it.
Post osC questions don't PM them. Vampire?
Contributions:
Multi Images with Fancy Popups, Easy way
Products in columns with multi buy etc etc
Disable any Category or Product, Easy way
Secure & Improve your account pages et al.
#186
Posted 04 October 2009, 20:26
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?
Remember, What you think I ment may not be what I thought I ment when I said it.
Post osC questions don't PM them. Vampire?
Contributions:
Multi Images with Fancy Popups, Easy way
Products in columns with multi buy etc etc
Disable any Category or Product, Easy way
Secure & Improve your account pages et al.
#187
Posted 05 October 2009, 04:55
Anyone else getting this?
#188
Posted 05 October 2009, 09:26
sugarsnow, on 05 October 2009, 04:55, said:
Anyone else getting this?
My version of spybot does not report any issue, niether does kaspersky!!
Remember, What you think I ment may not be what I thought I ment when I said it.
Post osC questions don't PM them. Vampire?
Contributions:
Multi Images with Fancy Popups, Easy way
Products in columns with multi buy etc etc
Disable any Category or Product, Easy way
Secure & Improve your account pages et al.
#189
Posted 05 October 2009, 22:03
spooks, on 05 October 2009, 09:26, said:
I decided to try again with the file uploaded yesterday oscThumb 1.1.2 and that one scans clean
#190
Posted 05 October 2009, 22:42
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
#191
Posted 05 October 2009, 23:01
Remember, What you think I ment may not be what I thought I ment when I said it.
Post osC questions don't PM them. Vampire?
Contributions:
Multi Images with Fancy Popups, Easy way
Products in columns with multi buy etc etc
Disable any Category or Product, Easy way
Secure & Improve your account pages et al.
#192
Posted 05 October 2009, 23:21
spooks, on 05 October 2009, 23:01, said:
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!
#193
Posted 07 October 2009, 09:35
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
#194
Posted 07 October 2009, 10:09
pedro.antunes, on 07 October 2009, 09:35, said:
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.
Remember, What you think I ment may not be what I thought I ment when I said it.
Post osC questions don't PM them. Vampire?
Contributions:
Multi Images with Fancy Popups, Easy way
Products in columns with multi buy etc etc
Disable any Category or Product, Easy way
Secure & Improve your account pages et al.
#195
Posted 07 October 2009, 13:45
spooks, on 07 October 2009, 10:09, said:
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
#196
Posted 07 October 2009, 16:36
#197
Posted 11 October 2009, 08:37
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
#198
Posted 11 October 2009, 08:56
Remember, What you think I ment may not be what I thought I ment when I said it.
Post osC questions don't PM them. Vampire?
Contributions:
Multi Images with Fancy Popups, Easy way
Products in columns with multi buy etc etc
Disable any Category or Product, Easy way
Secure & Improve your account pages et al.
#199
Posted 12 October 2009, 22:49
this is not dangerous for the security of my site, you know hackers and so on.
#200
Posted 13 October 2009, 22:19
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, 13 October 2009, 22:19.














