sultanos Posted October 31, 2007 Share Posted October 31, 2007 i solved with this lines.. $PHPTHUMB_CONFIG['document_root'] = realpath((getenv('DOCUMENT_ROOT') && ereg('^'.preg_quote(realpath(getenv('DOCUMENT_ROOT'))), realpath(__FILE__))) ? getenv('DOCUMENT_ROOT') : str_replace(dirname(@$_SERVER['PHP_SELF']), '', str_replace($phpThumb->osslash, '/', dirname(__FILE__)))).'/app/webroot/catalog'; Hope it helps Quote If you are not part of the solution, you are part of the problem Link to comment Share on other sites More sharing options...
twjnorth Posted November 3, 2007 Share Posted November 3, 2007 It's a really nice addon to oscommerce. Didnt have too many problems installing it locally but did notice the following issues On the Osc 2.2 MS2 version, if you switch on Search Engine Safe URLs in the configuration section of the admin screens, it changes the name of the url so the 'Click To Enlarge' URL becomes i.e. popup_image.php is no longer the basename localhost/dashuk/catalog/popup_image.php/pID/28?osCsid=bc4484c83ed81c3c880b8a5c25dc59f7 The code can no longer use this to determine the image being displayed is a popup and so displays the original image without any watermarking - i presume other SEO URL rewrite addons will have the same issue. If i switch off this option in configuration, then the 'Click to Enlarge' URL becomes localhost/dashuk/catalog/popup_image.php?pID=29&osCsid=bc4484c83ed81c3c880b8a5c25dc59f7 and it does add the watermark text. Ideally i think it would need a difference watermark text size for the SMALL images compared to the POPUP ones because a font size of 10 is fine for a thumbnail of about 100 pixels wide but when you show the same font size on a full size image, it's way too small. The same issue with URL rewrite stops the difference size for the product_info.php page working if you are using search engine safe/friendly URLs so it doesnt create a thumbnail in the new size Hope this information is helpful Quote Link to comment Share on other sites More sharing options...
fmucar Posted November 6, 2007 Share Posted November 6, 2007 I am having problems with the addon. I have 2 copies of my site, one is local for testing purposes and the production site hosted on godaddy.com Installed the addon on my local computer and everything is fine and working but when i installed to the prod. site I could not make it work. when I turn off it via admin everything works fine but if it is set to on, then all images shows their alt texts. I think I having some path issues but could not figure it out. does anyone has faced sth like this? below are one of the pictures URLs. http://www.hediyesehri.com/catalog/oscthum...8fe898bdae50994 <img src="oscthumb.php?src=o93S1NvZ55TX6tijx9_V2NnE5eni4srlotvdyw..&w=100&h=80&f=gif&bg=FFFFFF&q=95&hash=9ccf01fd6f0dc07bd8fe898bdae50994" w="100" h="80" border="0" alt="Blade Runner - Director's Cut" title="Blade Runner - Director's Cut"> what am I doing wrong? hope someone can help me, thanks. Quote Link to comment Share on other sites More sharing options...
twjnorth Posted November 6, 2007 Share Posted November 6, 2007 Merhaba fmucar, Nasil siniz ? I went to your website and navigated through to the blade runner DVD but if you right click on the "Click to enlarge" text, choose "Copy Shortcut" and then paste this into a text editor such as notepad, it gives the URL java script:popupWindow('http://www.hediyesehri.com/catalog/popup_image.php?pID=5') which indicates that you have switched off the thumbnails in the control panel. I noted Godaddy.com also seems to be putting a banner across the top of your popup window which shows above the thumbnail image which might not be what you want. As to your problem, if i go to your homepage (www.hediyesehri.com), your host indicates that you have not uploaded your site correctly so it might be something to do with an absolute path that assumes website_home/thumbs_directory so see if you are able to change the starting directory for the domain name to be //your_webspace/catalog or if you arent using the webspace for anything else, see if you can move the whole website up a level so that everything in /catalog is at the top level of your webspace. (You only want to do this if you dont want to run more than one website on your webspace). Did you upload the oscthumbs mod into the catalog directory or into the top level of your webspace ? Hope that helps Iyi Gunler Trevor Quote Link to comment Share on other sites More sharing options...
fmucar Posted November 7, 2007 Share Posted November 7, 2007 Merhaba fmucar, Nasil siniz ? I went to your website and navigated through to the blade runner DVD but if you right click on the "Click to enlarge" text, choose "Copy Shortcut" and then paste this into a text editor such as notepad, it gives the URL java script:popupWindow('http://www.hediyesehri.com/catalog/popup_image.php?pID=5') which indicates that you have switched off the thumbnails in the control panel. I noted Godaddy.com also seems to be putting a banner across the top of your popup window which shows above the thumbnail image which might not be what you want. As to your problem, if i go to your homepage (www.hediyesehri.com), your host indicates that you have not uploaded your site correctly so it might be something to do with an absolute path that assumes website_home/thumbs_directory so see if you are able to change the starting directory for the domain name to be //your_webspace/catalog or if you arent using the webspace for anything else, see if you can move the whole website up a level so that everything in /catalog is at the top level of your webspace. (You only want to do this if you dont want to run more than one website on your webspace). Did you upload the oscthumbs mod into the catalog directory or into the top level of your webspace ? Hope that helps Iyi Gunler Trevor merhaba, cevap için tşk ederim. Devamını herkesin anlaması için ingilizce yazacagım. Turkiye'de mi ogrendiniz Türkçeyi? İyi günler. I have switched off the addon cause when it is on I cant see any pictures. About the banners on top of the page; The site is not live yet and I am using a trial version for hosting from godaddy.com for testing purposes. The catalog folder is at the top path for the domain. Copied the catalog directory to the web root and installed it from there. You are right, I also think that there is sth wrong with the paths but instead of copying all content of catalog/ to web root, I think it would be better if I change the path to the domain to ../webroot/catalog/. oscthumbs dir is in the catalog directory. I think I should be editing some files so that the path to "oscthumbs/" is like "/catalog/oscthumbs" but I could not find the right place to edit. Currently I dont have access to the ftp of my domain but in 7 hours from now I will be copying oscthumbs/ directory to web root and will test it to see if it works. Thx. Quote Link to comment Share on other sites More sharing options...
fmucar Posted November 7, 2007 Share Posted November 7, 2007 I also turned on the oscthumb, if you need to see what it looks like :-) Quote Link to comment Share on other sites More sharing options...
jeebus Posted November 7, 2007 Share Posted November 7, 2007 (edited) So I have another question relating to speed/load times. It seems to take a long time to load or generate images. Is this contribution creating the thumbnails on every page load? Is there anything I can do to help speed up the product image load times? I'm fairly new to OSC so I don't know of any settings or options that I may need to change in order to make this work better. Here is a link to the site. It's not "live" yet so there's no other traffic then just me. http://comotorsports.net/osCommerce/catalog/index.php The page always takes a bit to load initially however after that it works very quick other then the images itself. The images tend to always take a while to load. Edited November 7, 2007 by jeebus Quote Link to comment Share on other sites More sharing options...
Guest Posted November 8, 2007 Share Posted November 8, 2007 oscThumb has a cache feature. By default, cached files are stored is in catalog/phpThumb/cache, this directory must be writeable. You can watch there if you have thumbnails or not. There are some options about the cache in catalog/phpThumb/phpThumb.config.php (delete cached files based on age, size, nbr of files). To increase speed, you can reduce the quality of the generated thumbnails (see config parameters). You have to check also other images, like on your home page, can you make them smaller. - Chris Quote Link to comment Share on other sites More sharing options...
jeebus Posted November 8, 2007 Share Posted November 8, 2007 oscThumb has a cache feature. By default, cached files are stored is in catalog/phpThumb/cache, this directory must be writeable. You can watch there if you have thumbnails or not. There are some options about the cache in catalog/phpThumb/phpThumb.config.php (delete cached files based on age, size, nbr of files). To increase speed, you can reduce the quality of the generated thumbnails (see config parameters). You have to check also other images, like on your home page, can you make them smaller. - Chris Thanks however, when I view the phpThumb/cache folder and there are about 20 folders with hundreds of sub folders. When I dig down through the 5 or 6 sub folders there's only 1 or two thumbnails in each. I've searched through a bunch of them and it's the same. Is this the way it should be? Quote Link to comment Share on other sites More sharing options...
AndreD Posted November 13, 2007 Share Posted November 13, 2007 is this addon ment to resize pictures for proper viewing as well (correct aspect ratio?) thanks Quote Link to comment Share on other sites More sharing options...
dominik3000 Posted November 13, 2007 Share Posted November 13, 2007 hello, i am using oscommerce 2.2rc1 with sts 4.5.3. i received the following errors after the install of this contribution: Warning: chdir(): No such file or directory (errno 2) in D:\wwwroot\shop\includes\classes\oscthumb.php on line 273 Warning: main(includes/classes/message_stack.php): failed to open stream: No such file or directory in D:\wwwroot\shop\includes\application_top.php on line 514 Fatal error: main(): Failed opening required 'includes/classes/message_stack.php' (include_path='.;c:\php4\pear') in D:\wwwroot\shop\includes\application_top.php on line 514 any ideas what i do wrong? thanks dominik Quote Link to comment Share on other sites More sharing options...
fmucar Posted November 13, 2007 Share Posted November 13, 2007 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 can u see this file at this path? D:\wwwroot\shop\includes\classes\oscthumb.php Quote Link to comment Share on other sites More sharing options...
dominik3000 Posted November 13, 2007 Share Posted November 13, 2007 can u see this file at this path? D:\wwwroot\shop\includes\classes\oscthumb.php yes, i can... Quote Link to comment Share on other sites More sharing options...
jeebus Posted November 17, 2007 Share Posted November 17, 2007 (edited) 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. Edited November 17, 2007 by jeebus Quote Link to comment Share on other sites More sharing options...
arrowmodels Posted November 25, 2007 Share Posted November 25, 2007 I am a relative novice so bear with me. Installed and basically seems to be working although I haven't tested all features. I mainly wanted it for the cached thumbnails. After installation, I decided to disable Filename Encryption in Admin and none of my thumbnails were displayed and I got website error messages saying that the images could not be found. It seems that I need to clear out the cache or something before I make changes because it isn't dynamic. What is the recommended way to do this? Is it just a case of directly deleting the cache files via ftp? There also appears to be a problem when you change the user configuration section in catalog/phpThumb/phpThumb.config.php. Again I tried to amend the parameters in the cash culling section (line 52 onwards) but with no apparent affect. I get the feeling that either it can only be set up before initial installation or I have to reset something before the changes take effect. I also spotted an error in that line 60 $PHPTHUMB_CONFIG['cache_maxfiles'] = null; should be commented out or the $PHPTHUMB_CONFIG['cache_maxfiles'] = 200; will never be actioned. Thanks Peter Quote Link to comment Share on other sites More sharing options...
arrowmodels Posted November 25, 2007 Share Posted November 25, 2007 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 Quote Link to comment Share on other sites More sharing options...
Guest Posted November 26, 2007 Share Posted November 26, 2007 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 Quote Link to comment Share on other sites More sharing options...
finker Posted November 27, 2007 Share Posted November 27, 2007 (edited) 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 November 27, 2007 by finker Quote Link to comment Share on other sites More sharing options...
CVPeters Posted December 1, 2007 Share Posted December 1, 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 Quote Link to comment Share on other sites More sharing options...
jeebus Posted December 5, 2007 Share Posted December 5, 2007 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. Quote Link to comment Share on other sites More sharing options...
ziron Posted December 5, 2007 Share Posted December 5, 2007 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 ? Quote Link to comment Share on other sites More sharing options...
Lisa Allman Posted December 9, 2007 Share Posted December 9, 2007 (edited) 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 December 9, 2007 by Lisa Allman Quote Link to comment Share on other sites More sharing options...
arbr Posted December 12, 2007 Share Posted December 12, 2007 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! Quote Link to comment Share on other sites More sharing options...
arbr Posted December 12, 2007 Share Posted December 12, 2007 (edited) 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 December 12, 2007 by arbr Quote Link to comment Share on other sites More sharing options...
arbr Posted December 12, 2007 Share Posted December 12, 2007 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. 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.