Jump to content



Photo
* * * * * 3 votes

[Contribution] oscThumb


  • Please log in to reply
443 replies to this topic

#41   arrowmodels

arrowmodels
  • Members
  • 25 posts
  • Real Name:Peter Muirhead

Posted 25 November 2007 - 23:41

Further to my previous post.

I managed to find the solution to the error messages. I cleaned out the caches in admin/cofiguration/tools/cache control and they disappeared.
I must admit it didn't make sense but it certainly worked.

This might also be the fix for jeebus's probems wth similar error messages.

Still appear to have problems with changes to cash culling parameters.

Peter

#42   adamluz

adamluz
  • Members
  • 22 posts
  • Real Name:Adam Luz

Posted 26 November 2007 - 16:49

I have installed the resize script and it works great on the product page and the index.php. However if you go to a category or new_products.php the images map to the original file name and do not resize. They don't even attempt to run through the resize script. Website is at platinum585.com

#43   finker

finker
  • Members
  • 9 posts
  • Real Name:john smeer

Posted 27 November 2007 - 21:51

Hi,

I just installed this today on a RC1 installation, but for some reason it is now throwing an error!

Fatal error: Call to undefined function: tep_image() in C:\xampp\htdocs\site\catalog\includes\languages\english\index.php on line 13


I'm thinking this has something to do with the html_output.php , but I swear I edited this correctly!
Also maybe worth noting I've got other mods working fine such as csv import, spambot reviews, spambot tell a friend and anti robot registration 1.5a prior to installing this.



Any Ideas?


Any form of help very much appreciated!

Edited by finker, 27 November 2007 - 21:53.


#44   CVPeters

CVPeters
  • Members
  • 2 posts
  • Real Name:Carolyn V Peters

Posted 01 December 2007 - 13:21

Hello:

I installed oscThumb and it was working just fine. Then, the following message began to show up on the browser:

phpThumb() v1.7.7 - 200612252156
AntioffsiteLinking() -"www.thequiltedshingle.com" is NOT in $this->config_nonoffsitelink_valid_domains (thequiltedshingle.com)

This is displayed where thumbnail images should be displayed.

I checked the phpthumb.config.php file and found the following coding, which I believe is the appropriate portion to modify -

// * Off-server Linking Configuration:
$PHPTHUMB_CONFIG['nooffsitelink_enabled'] = true; // If false will allow thumbnails to be linked to from any domain, if true only domains listed below in 'nooffsitelink_valid_domains' will be allowed.
$PHPTHUMB_CONFIG['nooffsitelink_valid_domains'] = array(@$_SERVER['HTTP_HOST']); // This is the list of domains for which thumbnails are allowed to be created. The default value of the current domain should be fine in most cases, but if neccesary you can add more domains in here, in the format 'www.example.com'
$PHPTHUMB_CONFIG['nooffsitelink_require_refer'] = false; // If false will allow standalone calls to phpThumb(). If true then only requests with a $_SERVER['HTTP_REFERER'] value in 'nooffsitelink_valid_domains' are allowed.
$PHPTHUMB_CONFIG['nooffsitelink_erase_image'] = false; // if true thumbnail is covered up with $PHPTHUMB_CONFIG['nohotlink_fill_color'] before text is applied, if false text is written over top of thumbnail
$PHPTHUMB_CONFIG['nooffsitelink_watermark_src'] = '/demo/images/watermark.png'; // webroot-relative image to overlay on hotlinked images
$PHPTHUMB_CONFIG['nooffsitelink_text_message'] = 'Image taken from '.@$_SERVER['HTTP_HOST']; // text of error message (used if [nooffsitelink_watermark_src] is not a valid image)

I am having a dense day and need assistance to modify the phpthumb.config.php file to include "thequiltedshingle.com" Where is the domain name inserted, (1) after the array code but before the ; (2) after the array code but before the ; or instead (3) in place of the array code?

Please advise. I have temporarily disabled the nonoffsitelink_enable to be "false" until such time as I am able to resolve this issue.

Thanks in advance.

Carolyn V Peters
www.thequiltedshingle.com/eshop/catalog

#45   jeebus

jeebus
  • Members
  • 24 posts
  • Real Name:Dave

Posted 05 December 2007 - 01:02

Alright I need some help, this one should be an easy one but I can't seem to figure out exactly what I should have here.

My thumbnails show up for comotorsports.net but they do not show up for www.comotorsports.net. I want them to show up for www.comotorsports.net as well as comotorsports.ca and www.comotorsports.ca

I believe I need to change it in the phpThumb.config file on this line....

$PHPTHUMB_CONFIG['nohotlink_valid_domains']	 = array(@$_SERVER['HTTP_HOST']);			// This is the list of domains for which thumbnails are allowed to be created. The default value of the current domain should be fine in most cases, but if neccesary you can add more domains in here, in the format 'www.example.com'
But I have no idea where to put them? I tried and tried and nothing worked.

The instructions seem easy in that line... but I just can't figure it out. Sorry if this is an absolute rediculous question.


Can anyone help me with this one? I want to be able to link pics on my sister site which is a different domain.

#46   ziron

ziron
  • Members
  • 1 posts
  • Real Name:Yoan Larochelle

Posted 05 December 2007 - 08:16

For some reasons, when I turn on OSCThumb in admin, every spacer ( <?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?> ) on every php pages seems to be disabeled or bypassed. When I turn it off, everything is back to normal. Except that, the contribution works fine.

Anyone ?

#47   Lisa Allman

Lisa Allman
  • Members
  • 4 posts
  • Real Name:Lisa Allman
  • Location:Briery Branch, VA

Posted 09 December 2007 - 13:28

I just installed this contribution but my pix are not loading properly. I'm getting an error message in a gray box that says invalid hash.

ERROR: invalid hash


I'm not a programmer by any stretch of the imagination so any help would be appreciated!

Lisa

Edited by Lisa Allman, 09 December 2007 - 13:29.


#48   arbr

arbr
  • Members
  • 6 posts
  • Real Name:Arne

Posted 12 December 2007 - 21:43

Here's an interesting one:

- Installed oscThumb, without a single problem
- Contrib works fine, resizes images just the way i want it
- BUT: some background images run into trouble. As soon as i turn on the contrib some background gif's and jpeg's just repeat themselves or become transparant. To be clear: these are the page images, not product images, the product images work fine.
- AND: it seems it works with more contribs like this.
- SO: might this be a GD problem, is it in the contrib or am i overlooking something. I have the most current version of GD2 on PHP5

- by the way: VERY nice plug-in, easy to install, simple configuration, good job!

#49   arbr

arbr
  • Members
  • 6 posts
  • Real Name:Arne

Posted 12 December 2007 - 22:18

Problem located:

if ($width) {
$image .= ' w="' . tep_output_string($width) . '"';
}

if ($height) {
$image .= ' h="' . tep_output_string($height) . '"';
}

The original html_output sets width and height for all images, the contrib only when it has to change dimensions. This results in the strange problems with the images.

Anybody a suggestion on how i can force that for every picture there is dimension specified, even if the image is already that size?

Correction: it seems that the script sometimes loads some essential images like spacers with 'h=' and 'w=', which messes up the design. The only problem is, when changing h to height and w to width, the design is fine, but the product do not load properly resized...

Edited by arbr, 12 December 2007 - 22:23.


#50   arbr

arbr
  • Members
  • 6 posts
  • Real Name:Arne

Posted 12 December 2007 - 22:49

Ok, played around a bit more. The main issue is that the contrib also affects the tep_draw_separator function. If we can find someway to avoid the contrib messing with this function and just let it put 'height and 'wídth' in the HTML, than all should be fine. There is no need to mess with the size of spacer.gif or comparable images as this will almost always result in design issues.

#51   clasf

clasf
  • Members
  • 17 posts
  • Real Name:Clas
  • Gender:Male
  • Location:Sweden

Posted 12 December 2007 - 23:04

I just installed this contrib and it creates great thumbnails. But I have one problem, I want to use the cache function, but I cant find the thumbs in the cache directory, I have tried alot of things and different paths in the phpThumb.config.php but no luck yet. Anyone got some useful instructions?

Regards

clasf

#52   dccsupplies

dccsupplies
  • Members
  • 7 posts
  • Real Name:Harold
  • Gender:Male

Posted 16 December 2007 - 16:52

Hi,
I've just installed this contrib, thanks for posting it, as it is exactly what I need.
- Everything works great, other than when I click on a thumbnail for a pop-up image, the <alt> text appears.
I can't figure out why this isn't working, I don't have any other problems that have been reported.
The image urls are:
Thumbnail.
http://www.dccsuppli...473232460cf2560
Pop-up.
http://www.dccsuppli...p...;h=960[]=fram|4|4|CCCCCC|FFFFFF|000000&f=jpg&q=95&hash=67ca8ad6692326c9674d1c199e9ae109

If anyone has any suggestions, I'd be grateful!
Rgds
Andy

#53   clasf

clasf
  • Members
  • 17 posts
  • Real Name:Clas
  • Gender:Male
  • Location:Sweden

Posted 18 December 2007 - 09:15

I just installed this contrib and it creates great thumbnails. But I have one problem, I want to use the cache function, but I cant find the thumbs in the cache directory, I have tried alot of things and different paths in the phpThumb.config.php but no luck yet. Anyone got some useful instructions?

Regards

clasf


I just solved my own problem. This value was set to 4 before, $PHPTHUMB_CONFIG['cache_directory_depth'] = 0;
I changed it to 0. With a 4 as value it tries to create 4 subdirs to put the files in.

What it does is that it does not build any subdirs inside the cache directory when it's changed to 0 instead of 4. Before the cache function could not create any subdirs inside the 777 chmodded cache-dir, but when changed to 0 it just saves the thumbnails in the root of /cache/ and that works fine. This is probably different at different ISP's but this solution works fine for me.

clasf

#54   clasf

clasf
  • Members
  • 17 posts
  • Real Name:Clas
  • Gender:Male
  • Location:Sweden

Posted 18 December 2007 - 13:46

Hello:

I installed oscThumb and it was working just fine. Then, the following message began to show up on the browser:

phpThumb() v1.7.7 - 200612252156
AntioffsiteLinking() -"www.thequiltedshingle.com" is NOT in $this->config_nonoffsitelink_valid_domains (thequiltedshingle.com)

This is displayed where thumbnail images should be displayed.

I checked the phpthumb.config.php file and found the following coding, which I believe is the appropriate portion to modify -

// * Off-server Linking Configuration:
$PHPTHUMB_CONFIG['nooffsitelink_enabled'] = true; // If false will allow thumbnails to be linked to from any domain, if true only domains listed below in 'nooffsitelink_valid_domains' will be allowed.
$PHPTHUMB_CONFIG['nooffsitelink_valid_domains'] = array(@$_SERVER['HTTP_HOST']); // This is the list of domains for which thumbnails are allowed to be created. The default value of the current domain should be fine in most cases, but if neccesary you can add more domains in here, in the format 'www.example.com'
$PHPTHUMB_CONFIG['nooffsitelink_require_refer'] = false; // If false will allow standalone calls to phpThumb(). If true then only requests with a $_SERVER['HTTP_REFERER'] value in 'nooffsitelink_valid_domains' are allowed.
$PHPTHUMB_CONFIG['nooffsitelink_erase_image'] = false; // if true thumbnail is covered up with $PHPTHUMB_CONFIG['nohotlink_fill_color'] before text is applied, if false text is written over top of thumbnail
$PHPTHUMB_CONFIG['nooffsitelink_watermark_src'] = '/demo/images/watermark.png'; // webroot-relative image to overlay on hotlinked images
$PHPTHUMB_CONFIG['nooffsitelink_text_message'] = 'Image taken from '.@$_SERVER['HTTP_HOST']; // text of error message (used if [nooffsitelink_watermark_src] is not a valid image)

I am having a dense day and need assistance to modify the phpthumb.config.php file to include "thequiltedshingle.com" Where is the domain name inserted, (1) after the array code but before the ; (2) after the array code but before the ; or instead (3) in place of the array code?

Please advise. I have temporarily disabled the nonoffsitelink_enable to be "false" until such time as I am able to resolve this issue.

Thanks in advance.

Carolyn V Peters
www.thequiltedshingle.com/eshop/catalog


Hi,

I am also very intrested in this topic. I cant get it working without setting this to false " $PHPTHUMB_CONFIG['nooffsitelink_enabled'] = true;"
but I want to use the function and add the domains myself. I have tried in different ways like Carolyn, but cant get it to work. Please some help here.

Br

Clas

#55   dscriptor

dscriptor
  • Members
  • 1 posts
  • Real Name:Jeremiah Togonon

Posted 21 December 2007 - 02:29

Hi,

I am also very intrested in this topic. I cant get it working without setting this to false " $PHPTHUMB_CONFIG['nooffsitelink_enabled'] = true;"
but I want to use the function and add the domains myself. I have tried in different ways like Carolyn, but cant get it to work. Please some help here.

Br

Clas


hi,
what i did is i just make $PHPTHUMB_CONFIG['nooffsitelink_enabled'] = true;
$PHPTHUMB_CONFIG['nooffsitelink_enabled']	   = true;

then add the domain names in $PHPTHUMB_CONFIG['nooffsitelink_valid_domains'], separated by comma.

like this:
$PHPTHUMB_CONFIG['nooffsitelink_valid_domains']= array(@$_SERVER['HTTP_HOST'],'www.mysite.com','http://www.mysite.com', 'mysite.com');

everthing works fine now... i hope this help.

=)

#56   whimsicalities

whimsicalities
  • Members
  • 13 posts
  • Real Name:Michael Hayes

Posted 02 January 2008 - 05:04

For some reasons, when I turn on OSCThumb in admin, every spacer ( <?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?> ) on every php pages seems to be disabeled or bypassed. When I turn it off, everything is back to normal. Except that, the contribution works fine.

Anyone ?


Change the tep_draw_separator function in html_output.php

from:

// Output a separator either through whitespace, or with an image
function tep_draw_separator($image = 'pixel_black.gif', $width = '100%', $height = '1') {
return tep_image(DIR_WS_IMAGES . $image, '', $width, $height);
}

////

to:

// Output a separator either through whitespace, or with an image
function tep_draw_separator($image = 'pixel_black.gif', $width = '100%', $height = '1') {
return tep_image_original(DIR_WS_IMAGES . $image, '', $width, $height);
}

////

Note that the function returns the parameters to the renamed 'tep_image_original'

To the authors - this is a really excellent contribution. The installation and documentation was excellent too. Many Thanks.

#57   phpgirl

phpgirl
  • Members
  • 31 posts
  • Real Name:joel
  • Location:New York

Posted 06 January 2008 - 07:26

Hi everyone,

I have oscthumb installed and it works good, but I just installed SSL and some of the images dont work all the time, is there some setting somewere to fix this?

Please let me know

Thanks

#58   redbulladdict

redbulladdict
  • Members
  • 35 posts
  • Real Name:Q-Tonium

Posted 06 January 2008 - 08:09

I have installed this contribution and everything works fine except it doesn't work well with my "Extra Images" contribution.

You know the one where you can have multiple thumbnails on one product in the product_info page.

Here is a link to the contribution I'm referring too.
link to contribution


Anyway when you scroll over any of the thumbnails the whole thing wacks out and shows a full sized images in place of all the thumbnails. Unlike before if you rolled over any of the small thumbnails it displays in the top larger thumbnail.

Anyone else having this issue or can help me out? I'd really appreciate it

Below is where I suspect the problem lies....

$products_extra_images_query = tep_db_query("SELECT products_extra_image, products_extra_images_id FROM " . TABLE_PRODUCTS_EXTRA_IMAGES . " WHERE products_id='" . $product_info['products_id'] . "'");
if (tep_db_num_rows($products_extra_images_query) >= 1){
	$rowcount_value=4;  //number of extra images per row	
	$rowcount=1;
?>
		<table border="0" width="100%" cellspacing="2" cellpadding="1" class="br">
		  <tr>
<?php	
					
	//$products_extra_images_query = tep_db_query("SELECT products_extra_image, products_extra_images_id FROM " . TABLE_PRODUCTS_EXTRA_IMAGES . " WHERE products_id='" . $product_info['products_id'] . "'");
	while ($extra_images = tep_db_fetch_array($products_extra_images_query)) {
?>
		<TD CLASS="infoBoxContents" align ="center">
		<?php echo "<a href=\"java script:popupWindow('" . tep_href_link(FILENAME_POPUP_EXTRA_IMAGES, 'peiID=' . $extra_images['products_extra_images_id']) . "')\">" . tep_image(DIR_WS_IMAGES . $extra_images['products_extra_image'], SMALL_IMAGE_WIDTH/2, SMALL_IMAGE_HEIGHT/2, "hspace='5' vspace='5'". " onMouseOver=\"java script:window.document.prodimg.src='" . DIR_WS_IMAGES . $extra_images['products_extra_image'] . "'\" onMouseOut=\"java script:window.document.prodimg.src='" . DIR_WS_IMAGES . $product_info['products_image'] . "'\"" ) . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?>
		</td>
<?php
	if ($rowcount == $rowcount_value){echo '</tr><tr>'; $rowcount=1;}
	else {$rowcount=$rowcount+1;}
	}
?>


#59   phpgirl

phpgirl
  • Members
  • 31 posts
  • Real Name:joel
  • Location:New York

Posted 06 January 2008 - 21:14

Hi everyone,

I have oscthumb installed and it works good, but I just installed SSL and some of the images dont work all the time, when its under "https" is there some setting somewere to fix this?

Please let me know

Thanks



Is it againest the rules if I offer a donation if somebody helps me solve this SSL images problem? I really need this thing to work asap.

Somebody please let me know.

#60   abrown1982

abrown1982
  • Members
  • 2 posts
  • Real Name:Allan

Posted 11 January 2008 - 09:53

Just a quick comment to hopefully help someone.

The contribution is great, but theres a bug if you try to upload images with a space in them. You get an invalid hash error. To fix this simply strip out the spaces from the filenames.

This can be done in the code.

in file: admin/includes/classes/upload.php about line 41 change

if (isset($_FILES[$this->file])) {
$file = array('name' => $_FILES[$this->file]['name'],
'type' => $_FILES[$this->file]['type'],
'size' => $_FILES[$this->file]['size'],
'tmp_name' => $_FILES[$this->file]['tmp_name']);
} elseif (isset($HTTP_POST_FILES[$this->file])) {
$file = array('name' => $HTTP_POST_FILES[$this->file]['name'],
'type' => $HTTP_POST_FILES[$this->file]['type'],
'size' => $HTTP_POST_FILES[$this->file]['size'],
'tmp_name' => $HTTP_POST_FILES[$this->file]['tmp_name']);
}

to

if (isset($_FILES[$this->file])) {
$newFilename = str_replace(" ", "-", $HTTP_POST_FILES[$this->file]['name']);

$file = array('name' => $newFilename,
'type' => $_FILES[$this->file]['type'],
'size' => $_FILES[$this->file]['size'],
'tmp_name' => $_FILES[$this->file]['tmp_name']);
} elseif (isset($HTTP_POST_FILES[$this->file])) {
$file = array('name' => $newFilename,
'type' => $HTTP_POST_FILES[$this->file]['type'],
'size' => $HTTP_POST_FILES[$this->file]['size'],
'tmp_name' => $HTTP_POST_FILES[$this->file]['tmp_name']);
}

And any spaces in the filename will be changed to a dash which fixes the bug.