♥raiwa Posted September 16, 2020 Author Share Posted September 16, 2020 Hi Ed, I suppose you are using the latest KissIT image thumbnailer 3.4.1. : I checked in my develp store and can't see this error. These constants are defined in the KissIt Gallery module. Please try to uninstall and reinstall the module. Quote About Me: http://www.oscommerce.com/forums/user/249059-raiwa/ Need help? How To Get The Help You Need Is your version of osC up to date? You'll find the latest osC community version CE Phoenix here. Public Phoenix Change Log Cheat Set on Google Sheets Link to comment Share on other sites More sharing options...
edfaught Posted September 16, 2020 Share Posted September 16, 2020 (edited) I uninstalled and reinstalled with no change. Here's the list of scalars etc. from an Xdebug breakpoint at pi_gallery_kissit.php line 84. I noticed it shows KISSIT_IMAGE_MODULE at 3.4.0 but I'm pretty sure I installed 3.4.1. Since I had a little trouble getting the upload files in the right places I wouldn't be surprised to find something out of place. I'll double check that. Edited September 16, 2020 by edfaught I always edit the first draft. Quote Link to comment Share on other sites More sharing options...
edfaught Posted September 18, 2020 Share Posted September 18, 2020 On 9/16/2020 at 1:59 AM, raiwa said: These constants are defined in the KissIt Gallery module. I have found my problem I think: I have overridden class pi_options_attributes and I know that I have to define the constants myself (Though I don't know why). As my learning curve is somewhat hampered I ask you if this make sense? Quote Link to comment Share on other sites More sharing options...
♥raiwa Posted September 19, 2020 Author Share Posted September 19, 2020 (edited) Hi Ed, The attributes module is not related. However I found now the confusion. It was created by using the wrong content module constant in the pi module. That's why I checked the content module, but you are using the pi module. The pi module has the constants missing, apart of using the wrong one in the output. I fixed it now. Please try this one: includes/modules/pi/product_info/pi_gallery_kissit.php pi_gallery_kissit.php You need to uninstall yours, replace it and install again. Please confirm and I'll update the package. Thanks Rainer Edited September 19, 2020 by raiwa Quote About Me: http://www.oscommerce.com/forums/user/249059-raiwa/ Need help? How To Get The Help You Need Is your version of osC up to date? You'll find the latest osC community version CE Phoenix here. Public Phoenix Change Log Cheat Set on Google Sheets Link to comment Share on other sites More sharing options...
edfaught Posted September 19, 2020 Share Posted September 19, 2020 Quote Warning : Use of undefined constant MODULE_CONTENT_PI_GALLERY_KISSIT_MAIN_IMAGE_WIDTH - assumed 'MODULE_CONTENT_PI_GALLERY_KISSIT_MAIN_IMAGE_WIDTH' (this will throw an Error in a future version of PHP) in C:\Users\Ed_2\My Websites\nationalvnwarmuseumfriends.org\giftshop\includes\modules\pi\product_info\pi_gallery_kissit.php on line 73 At least the error on line 88 went away... Quote Link to comment Share on other sites More sharing options...
♥raiwa Posted September 19, 2020 Author Share Posted September 19, 2020 Seems this is whitched. This should be ok now: pi_gallery_kissit.php edfaught 1 Quote About Me: http://www.oscommerce.com/forums/user/249059-raiwa/ Need help? How To Get The Help You Need Is your version of osC up to date? You'll find the latest osC community version CE Phoenix here. Public Phoenix Change Log Cheat Set on Google Sheets Link to comment Share on other sites More sharing options...
♥raiwa Posted September 20, 2020 Author Share Posted September 20, 2020 Uploaded update with the above fix: KissIT image thumbnailer 3.4.2. Requires Phoenix 1.0.7.4+ Tested with Phoenix 1.0.7.7 Change log 3.4.2: - fixed wrong and missing constant in pi gallery kissit module. Thanks to @edfaught - added missing alt tag valquiria23 and edfaught 1 1 Quote About Me: http://www.oscommerce.com/forums/user/249059-raiwa/ Need help? How To Get The Help You Need Is your version of osC up to date? You'll find the latest osC community version CE Phoenix here. Public Phoenix Change Log Cheat Set on Google Sheets Link to comment Share on other sites More sharing options...
vmn Posted November 8, 2020 Share Posted November 8, 2020 (edited) Hi, I just installed this addon (3.4.2) into 1.0.7.9. One fix needed in /catalog/includes/modules/pi_gallery_kissit.php move the line #94 containing $other_img_indicator = $other_img = null; upwards after the comment line #81 // now create the thumbs (just like in the stock pi_gallery.php) to get rid of "Notice: Undefined variable: other_img_indicator " later on. Question: Is it really necessary to create .htaccess into every thumbs subfolder? The .htaccess from an upper level folder, like images, will be inherited by every subfolder and should be enough. Edited November 8, 2020 by vmn Quote Link to comment Share on other sites More sharing options...
♥raiwa Posted November 8, 2020 Author Share Posted November 8, 2020 (edited) Thanks @vmn, Quote One fix needed in /catalog/includes/modules/pi_gallery_kissit.php Quote The .htaccess from an upper level folder, like images, will be inherited by every subfolder and should be enough. You are right. I'll change both issues in the next update. To avoid creating the .htaccess in subdirectories, in the includes/functions/kiss_it_image.php function, just remove line 83-90: // create .htacces protection like in main image dir if (($i==$n-1) && (!is_file($thumbs_dir . '.htaccess')) ) { $hpname = $thumbs_dir . '.htaccess'; if ($hp = fopen($hpname,'w')) { fwrite($hp,$htacces); fclose($hp); } } Edited November 8, 2020 by raiwa Quote About Me: http://www.oscommerce.com/forums/user/249059-raiwa/ Need help? How To Get The Help You Need Is your version of osC up to date? You'll find the latest osC community version CE Phoenix here. Public Phoenix Change Log Cheat Set on Google Sheets Link to comment Share on other sites More sharing options...
vmn Posted November 8, 2020 Share Posted November 8, 2020 Thanks, actually, for testing purposes, I commented out everything related creating .htaccess in the file above file before notifying you.The images folder .htaccess already contains the required protection. Quote Link to comment Share on other sites More sharing options...
♥raiwa Posted November 8, 2020 Author Share Posted November 8, 2020 4 minutes ago, vmn said: actually, for testing purposes, I commented out everything related creating .htaccess in the file above file before notifying you.The images folder .htaccess already contains the required protection. Yep, I forgot that the thumbs folder is always inside the image directory. In earlier versions it was in the kissit directory and I supposed it can be still configured to be elsewhere. Quote About Me: http://www.oscommerce.com/forums/user/249059-raiwa/ Need help? How To Get The Help You Need Is your version of osC up to date? You'll find the latest osC community version CE Phoenix here. Public Phoenix Change Log Cheat Set on Google Sheets Link to comment Share on other sites More sharing options...
vmn Posted November 8, 2020 Share Posted November 8, 2020 (edited) OK, it might be safer to always add .htaccess into the thumbs top-level folder. Edited November 8, 2020 by vmn Quote Link to comment Share on other sites More sharing options...
vmn Posted November 10, 2020 Share Posted November 10, 2020 You can also create all folders without looping: if(!is_dir($thumbs_dir_path)) { mkdir($thumbs_dir_path,0777,true); } Quote Link to comment Share on other sites More sharing options...
vmn Posted December 6, 2020 Share Posted December 6, 2020 Hi, I've upgraded Phoenix from 1.0.7.9->1.0.7.10->1.0.7.11 and noticed that the Gallery Kissit setup stopped working. I think I managed to upgrade pi_gallery_kissit.php to be compatible with 1.0.7.11. Maybe you already have done that. Here's my stuff. pi_gallery_kissit.zip raiwa 1 Quote Link to comment Share on other sites More sharing options...
gritsop Posted December 13, 2020 Share Posted December 13, 2020 (edited) Hello all. I have seen that the watermark image appears on top of an image on the checkout_payment.php page. All the images on the rest of the pages are shown normally. I have cleared the cache but no change. The KissIT version is 3.4.2 and the OC Phoenix is 1.0.7.11 Edited December 13, 2020 by gritsop Quote Link to comment Share on other sites More sharing options...
♥raiwa Posted December 13, 2020 Author Share Posted December 13, 2020 (edited) Then the image uses a watermark incompatible image format like png. Convert the image to GIF por JPG or don't use watermark for this image. See Instructions: Chart for supported image types and KissIt settings: Edited December 13, 2020 by raiwa Quote About Me: http://www.oscommerce.com/forums/user/249059-raiwa/ Need help? How To Get The Help You Need Is your version of osC up to date? You'll find the latest osC community version CE Phoenix here. Public Phoenix Change Log Cheat Set on Google Sheets Link to comment Share on other sites More sharing options...
gritsop Posted December 13, 2020 Share Posted December 13, 2020 (edited) Hello Rainer. Which image should i convert? If you mean the Credit Card Logos image, this cant be converted as the source code should be changed and it is something that I cant do as the code is encrypted by the Bank. The Credit Card Logos image is in PNG format. How can the watermark not be applied for the specific image on the specific page? Edited December 13, 2020 by gritsop Quote Link to comment Share on other sites More sharing options...
♥raiwa Posted December 13, 2020 Author Share Posted December 13, 2020 (edited) Instructions: 3. Optional if you are using watermark and wish to leave some images like the Store Logo without watermark applied: If you mean the Credit Card Logos image, this cant be converted as the source code should be changed You can replace the tep_image function by calling the image via html "image src:......". Then no watermark will be applied Edited December 13, 2020 by raiwa Quote About Me: http://www.oscommerce.com/forums/user/249059-raiwa/ Need help? How To Get The Help You Need Is your version of osC up to date? You'll find the latest osC community version CE Phoenix here. Public Phoenix Change Log Cheat Set on Google Sheets Link to comment Share on other sites More sharing options...
vmn Posted December 20, 2020 Share Posted December 20, 2020 Hi, I'm using Phoenix 1.0.7.11 and KissIT 3.4.2 and noticed that it creates empty folders for gallery images. I verified this using stock versions of 1.0.7.11 and KissIT. The function tep_image in kiss_it_image.php first creates a folder and the function _generateThumbnail in Image_Helper.php does not need it, because thumbs are not used for gallery images. This fix works for me. No empty folders will be created after applying it. In kiss_it_image.php tep_image replace the lines between // Create thumbs sub dirs and .htaccess. and // End create subdirectory and .htaccess. as follows //VMN NOT NEEDED Create thumbs sub dirs and .htaccess. //VMN build thumbs sub dir path, in case it's needed $thumbs_dir_path = str_replace('images/', 'images/' . KISSIT_THUMBS_MAIN_DIR . $width .'_'.$height.'/', dirname($src) . '/'); //VMN MOVED TO Image_Helper _generateThumbnail if(!is_dir($thumbs_dir_path)) { //VMN MOVED TO Image_Helper _generateThumbnail mkdir($thumbs_dir_path,0775,true); //VMN MOVED TO Image_Helper _generateThumbnail } //VMN NOT NEEDED because sub dirs are created using mkdir('path',mode,true) //VMN NOT NEEDED $thumbs_dir = ''; //VMN NOT NEEDED $thumbs_dir_paths = explode("/",$thumbs_dir_path); //VMN NOT NEEDED for ($i=0, $n=sizeof($thumbs_dir_paths); $i<$n; $i++) { //VMN NOT NEEDED $thumbs_dir .= $thumbs_dir_paths[$i] . '/'; //VMN NOT NEEDED if(!is_dir($thumbs_dir)) { //VMN NOT NEEDED mkdir($thumbs_dir, 0775); //VMN NOT NEEDED } //VMN NOT NEEDED create .htacces protection like in main image dir //VMN NOT NEEDED if (($i==$n-1) && (!is_file($thumbs_dir . '.htaccess')) ) { //VMN NOT NEEDED $hpname = $thumbs_dir . '.htaccess'; //VMN NOT NEEDED if ($hp = fopen($hpname,'w')) { //VMN NOT NEEDED fwrite($hp,$htacces); //VMN NOT NEEDED fclose($hp); //VMN NOT NEEDED } //VMN NOT NEEDED } //VMN NOT NEEDED} // end for //VMN NOT NEEDED End create subdirectory and .htaccess. There is no unnecessary creation of thumbs subfolders and htaccess files. The main thumbs folder htaccess will protect supbfolders as well. The only reference of $thumbs_dir_path is in $image = new Image_Helper(...). ================ in Image_Helper.php _generateThumbnail below the line: //make sure the thumbnail directory exists. 1. comment out/remove the lines //VMN NOT NEEDED if ( !is_writable ( $this->thumbs_dir_path ) ) { //VMN NOT NEEDED trigger_error ( 'Cannot detect a writable thumbs directory!', E_USER_NOTICE ); //VMN NOT NEEDED } //VMN The check below is already done in _checkImage returning 'no_thumb_required' //VMN NOT NEEDED if ( is_readable ( $this->_thumb_src ) ) { //VMN NOT NEEDED $this->_calculated_width = (int)$this->attributes['width']; //VMN NOT NEEDED $this->_calculated_height = (int)$this->attributes['height']; //VMN NOT NEEDED return $this->src = $this->_thumb_src; //VMN NOT NEEDED } 2. add //VMN moved from kiss_it_image.php if(!is_dir($this->thumbs_dir_path)) { mkdir($this->thumbs_dir_path,0775,true); // true ->Allows the creation of nested directories specified in the pathname } Do you see any problems with this approach? raiwa 1 Quote Link to comment Share on other sites More sharing options...
♥raiwa Posted December 20, 2020 Author Share Posted December 20, 2020 (edited) Quote because thumbs are not used for gallery images. They are used if watermark is used. Your solution looks good to me. I was also already thinking to move all the directory stuff into the helper class. I'll check and test it for the next update. Thank You 😀 Edited December 20, 2020 by raiwa Quote About Me: http://www.oscommerce.com/forums/user/249059-raiwa/ Need help? How To Get The Help You Need Is your version of osC up to date? You'll find the latest osC community version CE Phoenix here. Public Phoenix Change Log Cheat Set on Google Sheets Link to comment Share on other sites More sharing options...
vmn Posted December 21, 2020 Share Posted December 21, 2020 You're welcome. I'm not using watermarks. I also tried admin side thumbs. Empty folders are created there, too. For some reason multiple thumbs were placed on some product lines in the category product listing, because your jquery code found multiple th elements to prepend the image to. I couldn't figure out why, so I removed the admin side thumbs functionality. It's not important to me. I was just curious:). Quote Link to comment Share on other sites More sharing options...
♥Smoky Barnable Posted December 22, 2020 Share Posted December 22, 2020 @raiwa Curious if this might work with webP images? Quote The water in a vessel is sparkling; the water in the sea is dark. The small truth has words which are clear; the great truth has great silence. - Rabindranath Tagore Link to comment Share on other sites More sharing options...
♥raiwa Posted December 22, 2020 Author Share Posted December 22, 2020 (edited) As far as I know, WebP images are not (yet) supported by the GD library which is used to generate the thumbs. Edit: just checked and the latest version has it added: https://www.php.net/manual/en/function.imagetypes.php but the support needs to be added to kiss it. I’ll check for the next update. But I don’t know if that version is already widely installed on the servers. Edited December 22, 2020 by raiwa Smoky Barnable 1 Quote About Me: http://www.oscommerce.com/forums/user/249059-raiwa/ Need help? How To Get The Help You Need Is your version of osC up to date? You'll find the latest osC community version CE Phoenix here. Public Phoenix Change Log Cheat Set on Google Sheets Link to comment Share on other sites More sharing options...
kudos Posted December 28, 2020 Share Posted December 28, 2020 HI using Phoenix Edition v1.0.7.12 KissIT_image_thumbnailer_Pro_3.4.2 i have an error after i installed the addon,. i reload the website with the addon installed and get a blank index page and in the logs i am getting [28-Dec-2020 16:18:01 Europe/London] PHP Fatal error: Uncaught Error: Call to undefined function tep_image() in /templates/default/includes/components/product_card.php:1 thanks Quote Link to comment Share on other sites More sharing options...
dculley Posted December 29, 2020 Share Posted December 29, 2020 Hi its me. I have tried to figure this out but with no success. Running under 7.12 php 7.4. I went live and copied all the files over to the live URL. The catalog side is working fine. (as far as in tell) The admin side lost the connection to the images. At first I was missing the Phoenix images, but when I went to the admin > includes > configure.php and removed the / from the the "const DIR_WS_CATALOG = '/'; 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.