Jump to content

marcello

Members
  • Content count

    122
  • Joined

  • Last visited

  • Days Won

    3

Everything posted by marcello

  1. marcello

    PayPal App for osCommerce Online Merchant

    Noticed that if the browser is zoomed in to 120% the PayPal Iframe checkout button, in shopping cart, is distorted. Any suggestions on how to correct?
  2. marcello

    View Counter

    No problem. Just a heads up. If you decide to go with the filter next to the ip address. You will need to move the form creation for radio button options after this form. echo tep_draw_form('view_counter_form', FILENAME_VIEW_COUNTER, '', 'post') . tep_hide_session_id() . tep_draw_hidden_field('action', 'process_list'); would need to be shifted to <td class="borderCell" width="3%" align="center"><?php echo tep_draw_form('view_counter_form_ip_number', FILENAME_VIEW_COUNTER, '', 'post') . tep_hide_session_id() . tep_draw_hidden_field('action', 'process_list') . '<input type="radio" name="ban_ip_' . $view['ip_number'] . '", value="' . $view['ip_number'] . '", onchange="this.form.submit();">'; ?></td> and the </form> would need to shifted before the </tr>
  3. marcello

    View Counter

    Just a suggestion. admin/view_counter.php @ line 721: how about add a little button to auto filter on the ip address. this would save the copy n paste. This would be for 2.3.4. Find <td class="borderCell" width="10%"><span style="vertical-align:bottom;"><?php echo $flag . '<a onMouseover="ddrivetip(\'' . ShowIPDetails($domainInfo) . '\',\'' . $colors[COLOR_CART_POPUP_BACK] . '\',\'' . $showWidth . '\' )"; onMouseout="hideddrivetip()"' . '>' . $view['ip_number'] . '</a></span></span>'; ?></td> Replace with <td class="borderCell" width="10%"><span style="vertical-align:bottom;"><?php echo $flag . '<a onMouseover="ddrivetip(\'' . ShowIPDetails($domainInfo) . '\',\'' . $colors[COLOR_CART_POPUP_BACK] . '\',\'' . $showWidth . '\' )"; onMouseout="hideddrivetip()"' . '>' . $view['ip_number'] . '</a></span></span>' . tep_draw_form('filter_' . $view['ip_number'], 'view_counter.php', '', 'post') . tep_hide_session_id() . tep_draw_hidden_field('action', 'process') . tep_draw_hidden_field('submit_only_this_ip', TEXT_SHOW_ONLY_IP) . tep_draw_hidden_field('only_this_ip', $view['ip_number']) . tep_draw_button('', 'zoomin', null, 'primary');?></form></td>
  4. marcello

    View Counter

    I took a look at the addon today and came across php notification warnings. Of course these are not critical; however, I like to keep my logs clean. See attached and run a compare to find the modifications. Also note, that on 2.3.4BS the admin side calls the language files in app_top. I commented out the calls that were not needed i two of the files in admin. Your reference to this being "Who's Online on steroids" is an understatement. :thumbsup: NewFiles.zip
  5. marcello

    ship2pay for 2.3.x

    Hey there John. Thanks for putting this together. I took a quick look a the code and noticed a few php notification that were generated due to not checking if variable isset. Attached is the modified code for the admin page.ship2pay.php
  6. Yo @Tsimi I can take a look at the code you've uploaded. What are your thoughts about using hooks? This way we could consolidate most core changes to one liners while centralizing the code needed into one file.
  7. marcello

    [Contribution] Ship In Cart

    fyi, http_client.php is now removed as of pull #545 // shipping cost require('includes/classes/http_client.php'); // shipping in basket I haven't tested; however, I do not see any calls for this class in the latest code.
  8. @vampirehunter When you click on the link do any errors appear in your browsers developers tool console? I've not experienced any issues with this code as of yet.
  9. @auzStar :thumbsup: I just added this to a modified dev site and it works great. I will test some more. Awesome work!!!
  10. @auzStar Great news. I'm glad the info was useful. I'll do my best to test the new code when it's available. Most important, thank you for your efforts. :beers:
  11. @auzStar Wanted to say that this is a great idea. :thumbsup: I haven't been able to test it on my own site; however, I noticed that the demo site experiences this issue when using the Back button on the browser. It appears that Html5 does have a possible solution that update the browser to reflect the change made with the ajax selection. I came across an article that explains in more details. http://www.codemag.com/Article/1301091 Hope this is helpful and something of interest.
  12. marcello

    KissIT Image Thumnailer

    Unable to edit above message. Just wanted to state that a category page with 13 products listed was reduced overall by 22kb (not all images were gifs, a few jpg in there as well) with the external compression. That was a reduction of approximately 10% from the original page size. Again, this is just testing and I'm still scratching my head as how to do this within GD; however, it appears your code already does all that GD has to offer.
  13. marcello

    KissIT Image Thumnailer

    @raiwa Always happy to help. Thank you for doing all that you do to support this addon. An update to the compression testing. I was able to reduce thumbnails further using an external tool in a Linux environment. I feel a bit dirty as I wasn't able to find a solution with GD. This solution would output png file for a gif source file. None of this is production or one I am recommending. Just trying to find a way that we can eliminate complaints regarding lossless compression and to overall reduce the page size without compromising on quality. Original image size: 55937 Original image format: gif Thumbnail size: 300x200 Result: 35% reduction from original gif thumbnail with no lossless compression complaint imagecreate 24204 test.gif 23788 test.png (converted to png without external compression) 14766 test.png (converted to png with external compression) imagecreatetruecolor (original thumb method) 22863 test.gif 67170 test.png (converted to png without external compression) 18748 test.png (converted to png with external compression) Original image size: 55937 Original image format: gif Thumbnail size: 100x80 Result: 37% reduction from original gif thumbnail with no lossless compression complaint imagecreatetruecolor (original thumb method) 5589 test.gif imagecreate 5510 test.png (converted to png without external compression) 3516 test.png (converted to png with external compression)
  14. marcello

    KissIT Image Thumnailer

    @raiwa It may seem insignificant; however, in my testing, I have not visually noticed any loss of quality and file sizes are smaller. Also, considering we are using the quality setting for JPEG to set the compression for PNG, I would either separate (not worth the effort) or hard code it to 9. So in my book, it's easiest to configure for max compression. But I do understand what you are getting at regarding the differences being very insignificant. So leaving it as it is fine as well.
  15. marcello

    KissIT Image Thumnailer

    @raiwa Just an update. I was able to integrate pngquant into the thumbnailer. Again, this is just a simple hack at trying to reduce the files sizes and improve on compression. I will keep testing though this tweak improved a category page by reducing gif files to a png files while saving approximately 24kb on a category page. The funny part now is that GT is stating that all the png files should be added to a CSS sprite. Note that this is a solution for linux based environments where one has the ability to add additional tools to their environment. I haven't been able to locate a solution within the GD features of PHP.
  16. marcello

    KissIT Image Thumnailer

    Thank you and I'm glad I can help out. You are correct regarding the array(). I had a module that was disabling my error reporting that kept it from me. If you like, this defines the var in one line. $original_img_size = ( is_file($src ) ? getimagesize($src) : null ); Testing the watermark modification did remove the notice as well. However, I only received the notice when watermark was > 0. Your comments above stated that when it was set to 0. Not sure if I am missing something. Otherwise, my dev site isn't outputting any errors.
  17. marcello

    KissIT Image Thumnailer

    I did notice that in the code PNG compression could be tweaked if you agree. This allows the default compression of 75 for jpg to equate to a 9 for png. Considering 9 provides the best compression (smallest files) but takes a longer time to compress (quality doesn't change). For the record, I think we should set PNG compression to 9 by default as the 0-99 quality range of jpg into the 0-9 range of png have opposite relevance. Note that for jpg 99 is minimum compression (maximum quality) while for png 9 is maximum compression. case self::IMAGETYPE_PNG : $quality = is_null ( $quality ) ? 1 : $quality; $quality = ($quality > 9) ? $quality=floor($quality / 10) : $quality; to case self::IMAGETYPE_PNG : $quality = is_null ( $quality ) ? 1 : ceil($quality * 1.1); $quality = ($quality > 9) ? 9 : $quality; or case self::IMAGETYPE_PNG : $quality = 9;
  18. marcello

    KissIT Image Thumnailer

    Hey there Rainer. I spent several hours yesterday looking into the lossless compression. To say the least I haven't come up with a solution within PHP as of yet. To summarize my findings (some of this may already be known to some; however, to help others understand I may be stating the obvious): 1. GIFs are not capable of being lossless (must convert to png or jpg) 2. PNG is lossless by default 3. I made a few mods to the addon to convert GIF to PNG (Lossless resolved. Unfortunately, PNG file sizes are larger than GIFs) 4. I made a few mods to the addon to convert GIF to JPG (Lossless remains. However, JPG file sizes are much smaller than GIFs. Loss of transparency as well) I'll keep trying to figure this out and get back to you if I come up with anything.
  19. marcello

    KissIT Image Thumnailer

    @raiwa, Everything is functioning as expected. Visually, the sharpen does appear to improve the thumbnails. Regarding file sizes the following are a few examples regarding losslessly compression (I understand that this feature is not intended to change this; however, I wanted to provide some data regarding different settings): Image1 (gif) Prior 238B (10% reduction) Strong 497B (17% reduction) Medium 459B (16% reduction) Soft 467B (16% reduction) Image2 (jpg) Prior 399B (17% reduction) Strong 385B (15% reduction) Medium 381B (15% reduction) Soft 391B (16% reduction) Image3 (gif) Prior 468B (9% reduction) Strong 575B (11% reduction) Medium 531B (10% reduction) Soft 538B (10% reduction) Image4 (jpg) Prior 379B (16% reduction) Strong 374B (14% reduction) Medium 380B (15% reduction) Soft 388B (15% reduction) From my research it doesn't appear that PHP is capable of removing the data that would improve on lossless compression. It appears that the thumbnails would need to be passed to an external tool in order to remove the unnecessary information. The question is how to identify a universal software that handles all image types, is open source, and can run on different OS. Maybe the best way to handle this is to offer separate instructions to the addon in order for those wanting to install can chose to. Just as you refer to the product_info page outside of the base install.
  20. marcello

    KissIT Image Thumnailer

    @raiwa, I just read your above post. I was in the middle of installing the new version and will take a look at what you mentioned. Testing v24 now. Very minor recommendation, the following change would eliminate any php notices of $original_img_size not being defined if ( is_file($src )) $original_img_size = getimagesize($src); to $original_img_size = ( is_file($src ) ? getimagesize($src) : array() );
  21. marcello

    KissIT Image Thumnailer

    I understand and think it makes sense to add a feature to trigger thumbnails based on size. Though I am always for a configurable option in the admin. Anything that keeps one from having to get into the code to make a tweak, I am for.
  22. marcello

    KissIT Image Thumnailer

    That's great Rainer. Every bit counts. Some stats for reference. The transparent feature improved several thumbnails sizes to reduce a category page with 12 products by 4k. This saved 3 requests when loading a page. It may be insignificant to some; however, every bit counts. I am grateful for your efforts. PM me if you need any help with this. I am more than happy to help where ever I can.
  23. marcello

    KissIT Image Thumnailer

    Awesome work Rainer. I was able to test it with a few transparent gifs and all worked perfectly. I know you have done a great deal to allow for the quality of the image compression to be configurable via the admin; however, from my understanding (which is in no way close to yours) the thumbnails still are tagged with "losslessly compressing" on PageSpeed and YSlow. It appears that there isn't much that can be done within PHP other than to call on some external software or to program your server to do so with some added modules. Any thoughts regarding this?
  24. marcello

    KissIT Image Thumnailer

    :thumbsup: Yep. I downloaded the 23 version and started testing yesterday. Must have missed the new updates. I'll give it a try now.
  25. marcello

    KissIT Image Thumnailer

    Hey there @raiwa, Thanks for working to improve this addon. I tested the most recent version and came across an issue. It appears you reference KISSIT_TRANSPARENT_BACKGROUND without defining it in the configuration. This causes the image to be filled with black. Not sure if I am missing something. Image.php if ( KISSIT_TRANSPARENT_BACKGROUND == true ) { $background_color = imagecolorallocatealpha ( $thumb_background, 0, 0, 0, 127 ); } else { $background_color = imagecolorallocate ( $thumb_background, $this->_thumb_background_rgb['red'], $this->_thumb_background_rgb['green'], $this->_thumb_background_rgb['blue'] ); }
×