Results 1 to 10 of 750

Hybrid View

  1. #1
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    13,942
    Plugin Contributions
    96

    Default Re: Image Handler 5 (for v1.5.5) Support Thread

    @GerriM, thanks for the report. I'll get that change in the works.

  2. #2
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    13,942
    Plugin Contributions
    96

    Default Re: Image Handler 5 (for v1.5.5) Support Thread

    Quote Originally Posted by lat9 View Post
    @GerriM, thanks for the report. I'll get that change in the works.
    Here's the preview, I'll be updating GitHub shortly. Change /includes/classes/observers/ColorBoxObserver.php, adding the bits highlighted:
    Code:
    <?php
    // -----
    // An observer-class to enable the "Colorbox" plugin to operate with the notification updates in the
    // main_product_image and additional_images processing, provided by "Image Handler" v5.0.0 and later.
    //
    // Copyright (c) 2017 Vinos de Frutas Tropicales
    //
    class ColorBoxObserver extends base 
    {
        public function __construct() 
        {
            if (defined('ZEN_COLORBOX_STATUS') && ZEN_COLORBOX_STATUS == 'true') {
                $this->attach(
                    $this,
                    array(
                        //- From /includes/modules/additional_images.php
                        'NOTIFY_MODULES_ADDITIONAL_IMAGES_SCRIPT_LINK',
                    )
                );
            }
        }
    
        public function update(&$class, $eventID, $p1, &$p2, &$p3, &$p4, &$p5, &$p6, &$p7, &$p8, &$p9) 
        {
            switch ($eventID) {
                // -----
                // This notifier gives notice that an additional image's script link is requested.  A monitoring observer sets
                // the $p2 value to boolean true if it has provided an alternate form of that link; otherwise, the base code will
                // create that value.
                //
                // $p1 ... (r/o) ... An associative array, containing the 'flag_display_large', 'products_name', 'products_image_large', 'large_link' and 'thumb_slashes' values.
                // $p2 ... (r/w) ... A reference to the $script_link value, set initially to boolean false; if an observer modifies that value, the
                //                     the default module's processing is bypassed.
                //
                case 'NOTIFY_MODULES_ADDITIONAL_IMAGES_SCRIPT_LINK':
                    $flag_display_large = $p1['flag_display_large'];
                    $products_name = $p1['products_name'];
                    $products_image_large = $p1['products_image_large'];
                    $thumb_slashes = $p1['thumb_slashes'];
                    $large_link = $p1['large_link'];
                    require DIR_WS_MODULES . zen_get_module_directory('zen_colorbox.php');
                    if (isset($script_link)) {
                        $p2 = $script_link;
                    }
                    break;
    
                default:
                    break;
            }
        }
    }

 

 

Similar Threads

  1. Attribute image replaces main product image on select [Support Thread]
    By exoticcorpse in forum All Other Contributions/Addons
    Replies: 176
    Last Post: 14 Dec 2025, 12:55 AM
  2. v150 Image Handler 4 (for v1.5.x) Support Thread
    By DivaVocals in forum All Other Contributions/Addons
    Replies: 1687
    Last Post: 17 Nov 2024, 07:26 PM
  3. v139h Image Handler 3 Support Thread (for ZC v1.3.9)
    By DivaVocals in forum All Other Contributions/Addons
    Replies: 1095
    Last Post: 2 Oct 2017, 12:42 PM
  4. v138a Image Handler 2 (for ZC v1.3.8 ONLY) Support
    By timkroeger in forum All Other Contributions/Addons
    Replies: 7098
    Last Post: 12 Oct 2014, 03:48 AM
  5. Image Handler Support Please
    By nadinesky in forum All Other Contributions/Addons
    Replies: 2
    Last Post: 30 Sep 2013, 03:47 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg