[Contribution] oscThumb
#41
Posted 25 November 2007 - 11:41 PM
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
Posted 26 November 2007 - 04:49 PM
#43
Posted 27 November 2007 - 09:51 PM
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 - 09:53 PM.
#44
Posted 01 December 2007 - 01:21 PM
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
Posted 05 December 2007 - 01:02 AM
jeebus, on Nov 17 2007, 05:31 PM, said:
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
Posted 05 December 2007 - 08:16 AM
Anyone ?
#47
Posted 09 December 2007 - 01:28 PM
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 - 01:29 PM.
#48
Posted 12 December 2007 - 09:43 PM
- 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
Posted 12 December 2007 - 10:18 PM
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 - 10:23 PM.
#50
Posted 12 December 2007 - 10:49 PM
#51
Posted 12 December 2007 - 11:04 PM
Regards
clasf
#52
Posted 16 December 2007 - 04:52 PM
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.dccsupplies.com/shop/oscthumb.p...473232460cf2560
Pop-up.
http://www.dccsupplies.com/shop/oscthumb.p...;h=960&fltr[]=fram|4|4|CCCCCC|FFFFFF|000000&f=jpg&q=95&hash=67ca8ad6692326c9674d1c199e9ae109
If anyone has any suggestions, I'd be grateful!
Rgds
Andy
#53
Posted 18 December 2007 - 09:15 AM
clasf, on Dec 13 2007, 12:04 AM, said:
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
Posted 18 December 2007 - 01:46 PM
CVPeters, on Dec 1 2007, 02:21 PM, said:
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
Posted 21 December 2007 - 02:29 AM
clasf, on Dec 18 2007, 01:46 PM, said:
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
Posted 02 January 2008 - 05:04 AM
ziron, on Dec 5 2007, 07:16 PM, said:
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
Posted 06 January 2008 - 07:26 AM
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
Posted 06 January 2008 - 08:09 AM
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
Posted 06 January 2008 - 09:14 PM
phpgirl, on Jan 6 2008, 02:26 AM, said:
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
Posted 11 January 2008 - 09:53 AM
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.









