clasf Posted December 12, 2007 Share Posted December 12, 2007 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 Quote Link to comment Share on other sites More sharing options...
dccsupplies Posted December 16, 2007 Share Posted December 16, 2007 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.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 Quote Link to comment Share on other sites More sharing options...
clasf Posted December 18, 2007 Share Posted December 18, 2007 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 Quote Link to comment Share on other sites More sharing options...
clasf Posted December 18, 2007 Share Posted December 18, 2007 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 Quote Link to comment Share on other sites More sharing options...
dscriptor Posted December 21, 2007 Share Posted December 21, 2007 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. =) Quote Link to comment Share on other sites More sharing options...
whimsicalities Posted January 2, 2008 Share Posted January 2, 2008 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. Quote Link to comment Share on other sites More sharing options...
phpgirl Posted January 6, 2008 Share Posted January 6, 2008 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 Quote Link to comment Share on other sites More sharing options...
Guest Posted January 6, 2008 Share Posted January 6, 2008 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;} } ?> Quote Link to comment Share on other sites More sharing options...
phpgirl Posted January 6, 2008 Share Posted January 6, 2008 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. Quote Link to comment Share on other sites More sharing options...
abrown1982 Posted January 11, 2008 Share Posted January 11, 2008 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. Quote Link to comment Share on other sites More sharing options...
clasf Posted January 28, 2008 Share Posted January 28, 2008 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. =) Thanks! It works, fine, I did the same thing but I forgot the first ",", so now it works. clasf Quote Link to comment Share on other sites More sharing options...
clasf Posted January 28, 2008 Share Posted January 28, 2008 Hi again, Now I have another small problem. oscThumb is working great, but when I install the greatlooking contrib Fancy Lightbox Popup http://addons.oscommerce.com/info/5532 the watermarking is not working on the popup-image anymore. I guess that has something to do with the call to the tep_image function. Does anyone have a clue how to include the oscThumb function instead? I really want to use the watermarks again. clasf Quote Link to comment Share on other sites More sharing options...
magicmycote Posted January 28, 2008 Share Posted January 28, 2008 I have 2.2 RC1 and STS 4.5.8 installed, and I cannot get my images to show up when I switch oscThumb "on". Install went well, I configured my directories and set the permissions - but when I switch it on, my existing product images (and all my other catalog images) no longer show up despite the fact I have oscThumb set to only process product images (Process Store's Graphics False). In place of the images is the alt text, and the popup only shows the alt text as well. If I right click on my thumbnail and choose view image (firefox), it says "No input file specified." and the url is: http://mydomain.com/oscdirectory/oscthumb.php?src=/images/tempimage.jpg&w=100&h=100&f=jpg&q=95&hash=a7476ef97a16710c48fc7459f1f4dcc2 I have encryption turned off, but it looks like it is still trying to do it. Also, if I click on the product, and then copy the link location from the javascript popup, this is the url: java script:popupWindow('http://mydomain.com/oscdirectory/popup_image.php?pID=41') ...but when I click it, the address appears correct (except it doesn't work as noted above): <img src="oscthumb.php?src=/images/tempimage.jpg&w=100&h=100&f=jpg&q=94&hash=17aef4ee81186501296cf72cc271cfc0" w="100" h="100" border="0" alt="50" LG Plasma TV" title="50" LG Plasma TV"> Quote Link to comment Share on other sites More sharing options...
magicmycote Posted January 28, 2008 Share Posted January 28, 2008 I did not need all of the functionality of this contrib, perhaps I'll revisit it later - but for now went with the old tried and tested one at http://www.oscommerce.com/community/contributions,841. Quote Link to comment Share on other sites More sharing options...
Fillllle Posted February 12, 2008 Share Posted February 12, 2008 I trying to install osctumb but i got this when i open url: Fatal error: Call to undefined function: tep_image() in /hsphere/local/home/mysite/mysite.se/webshop/catalog/includes/header.php on line 60 And this when i open my admin site: Warning: main(includes/classes/navigation_history.php): failed to open stream: No such file or directory in /hsphere/local/home/mysite/mysite.se/webshop/catalog/admin/includes/application_top.php on line 126 Fatal error: main(): Failed opening required 'includes/classes/navigation_history.php' (include_path='.:/hsphere/shared/apache/libexec/php4ext/php/') in /hsphere/local/home/mysite/mysite.se/webshop/catalog/admin/includes/application_top.php on line 126 Somone who like to help me? Quote Link to comment Share on other sites More sharing options...
HolgerS. Posted February 27, 2008 Share Posted February 27, 2008 Hi guys, I just installed oscthumbs, but get the following error by selecting the Watermark Image File in admin menue: Fatal error: Call to undefined function: tep_cfg_pull_down_installed_watermarks() in /homepages/25/d86601661/htdocs/referenzen/catalog/admin/configuration.php(125) : eval()'d code on line 1 This error appears both locally and on server. Has somebody an idea, how to fix that?! PS: Sorry for my bad english, but it's not my native language. Quote Link to comment Share on other sites More sharing options...
HolgerS. Posted February 27, 2008 Share Posted February 27, 2008 Hi, I just installed oscthumbs for the third or fourth time and now it's running. :thumbsup: I think I did a mistake somewhere during editing the code, but don't know where. :blush: Many, many thanks to the author of this great contrib!! Quote Link to comment Share on other sites More sharing options...
Eighteen48 Posted February 29, 2008 Share Posted February 29, 2008 Quick question kinda noobish, in the manual edits, the intructions for "catalog/includes/functions/html_output.php" read: FIND function tep_image and RENAME IT function tep_image_original AFTER this function, ADD: // START oscThumb // If you want to call the original function, you can call tep_image_original or call this one with $original=true. function tep_image($src, $alt = '', $width = '', $height = '', $params = '', $original = false, $thumbnail_type = 0) { global $oscthumb; // We are asked to return the result of the original function if ($original || $oscthumb->enabled==false) { return tep_image_original ($src, $alt, $width, $height, $params); } $oscthumb->set_type ($src, $width, $height, $thumbnail_type); // Detect the type of image we are currently processing if ($oscthumb->set_size ($src, $width, $height)==false) return false; // Choose the displayed width and height of the image, and if display something $image = $oscthumb->process($src); // Returns the beginning of the image tag, like <img src="oscthumb.php?src=... or <img src="images/logo.gif" // Add remaining image parameters if they exist if ($width) { $image .= ' w="' . tep_output_string($width) . '"'; } if ($height) { $image .= ' h="' . tep_output_string($height) . '"'; } if (tep_not_null($params)) $image .= ' ' . $params; $image .= ' border="0" alt="' . tep_output_string($alt) . '"'; if (tep_not_null($alt)) { $image .= ' title="' . tep_output_string($alt) . '"'; } $image .= '>'; return $image; } // END oscThumb My first question is am I suppose to change every instance of tep_image to tep_image_original in the file? Second Question it says after tep_image add the code above after, but the placement in your modified files is different. Where should I put this? I am editing it maunually becasue the section of code where the above is located in your modified files is slightly modified. Quote Powered By osC 2.2RC2a STS 4.5.8 - HTC 2.6.3 - FP 1.5.9 - BCH 1.0.0 Link to comment Share on other sites More sharing options...
Eighteen48 Posted February 29, 2008 Share Posted February 29, 2008 Quick question kinda noobish, in the manual edits, . . . . . . files is slightly modified. Never mind, after taking a break from it, I realized it was sitting right there smack dab in my face. Quote Powered By osC 2.2RC2a STS 4.5.8 - HTC 2.6.3 - FP 1.5.9 - BCH 1.0.0 Link to comment Share on other sites More sharing options...
Eighteen48 Posted February 29, 2008 Share Posted February 29, 2008 I have 2.2 RC1 and STS 4.5.8 installed, and I cannot get my images to show up when I switch oscThumb "on". Install went well, I configured my directories and set the permissions - but when I switch it on, my existing product images (and all my other catalog images) no longer show up despite the fact I have oscThumb set to only process product images (Process Store's Graphics False). Make sure that in Admin/STS that you put oscthumb.php as a file required for use in the templates. Quote Powered By osC 2.2RC2a STS 4.5.8 - HTC 2.6.3 - FP 1.5.9 - BCH 1.0.0 Link to comment Share on other sites More sharing options...
Eighteen48 Posted February 29, 2008 Share Posted February 29, 2008 hello, i am using oscommerce 2.2rc1 with sts 4.5.3. i received the following errors after the install of this contribution: any ideas what i do wrong? thanks dominik Make sure you put a copy of oscthumb.php in the includes/modules/sts_inc/ folder. Quote Powered By osC 2.2RC2a STS 4.5.8 - HTC 2.6.3 - FP 1.5.9 - BCH 1.0.0 Link to comment Share on other sites More sharing options...
Emily77 Posted March 7, 2008 Share Posted March 7, 2008 Hello, I have set $PHPTHUMB_CONFIG['nohotlink_enabled'] = false, but still constantly get error messages, no Thumbnail is displayed. please check it from www.bettereyes.com.au I didn't encounter this problem until yesterday, and I don't have this problem on my local testing server. Anyone can help me with that? Thanks! Emily Quote Link to comment Share on other sites More sharing options...
mendoh Posted April 3, 2008 Share Posted April 3, 2008 Hello everybody! I just installed this contribution which I believe is great! :thumbsup: It all works 100% except for the image watermark feature: despite I actually enabled "image watermark in pop-up images", no image watermark shows up inside the pop-up image. All other features, including graphic watermark work fine, without any error messages. Anybody has any idea of what could be wrong with my installation? Thanks a lot and keep up the good work! Mendoh Quote Link to comment Share on other sites More sharing options...
celina2007 Posted April 5, 2008 Share Posted April 5, 2008 Hi all, I have a serious problem with PHP OsThumb. I have migrated my os site from a shared server to a a dedicated one, but the products images no longer appear, i only see this message : phpThumb () v1.7.7..... /home/httpd/vhosts/mydomain.com/httpdocs//images/product012.jpg doesn't exist Please tell me what do do ??? It's really urgent Best regards. Quote Link to comment Share on other sites More sharing options...
lavoriamopervoi Posted April 18, 2008 Share Posted April 18, 2008 Hi, in your contribution does not work the size for admin! That is, in admin images are loaded at actual size, you know how can I solve? Thank you Antonello Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.