Results 1 to 10 of 1096

Threaded View

  1. #11
    Join Date
    Jun 2011
    Posts
    85
    Plugin Contributions
    0

    Default Re: Image Handler 3 Support Thread

    First off, Thank you for your help and prompt reply.

    Info:
    v1.3.9h
    PHP Version 5.3.2

    1) my guess is that it came with lightbox b/c I never installed it. I guess I had it b/c my site had functions that lightbox has(blacking everything out)

    2ndly, yes 2/3 of the files that got replaced were different. The 2 that were different were under the folders named "popup" which is the exact problem I am having. The 3rd file that was replaced was only different by version number, so I dont conclude that is truly different, however I will list the code here.


    I am going to list the original code my template and hopefully you can help me out by comparing to IH3 CODES. All IH3 Code can be found under core edit folder.

    The Following is my template code:

    File 1: Includes>Modules>Pages>Popup_Image>Header_php.php

    Code:
    <?php
    /**
     * Pop up Image Header
     *
     * @package page
     * @copyright Copyright 2003-2009 Zen Cart Development Team
     * @copyright Portions Copyright 2003 osCommerce
     * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
     * @version $Id: header_php.php 14141 2009-08-10 19:34:47Z wilt $
     */
    /**
     * Header code file for the product-larger-images popup window
     *
     */
    
    // This should be first line of the script:
      $zco_notifier->notify('NOTIFY_HEADER_START_POPUP_IMAGES_ADDITIONAL');
    
      $_SESSION['navigation']->remove_current_page();
    
      $products_values_query = "SELECT pd.products_name, p.products_image
                                FROM " . TABLE_PRODUCTS . " p
                                left join " . TABLE_PRODUCTS_DESCRIPTION . " pd
                                on p.products_id = pd.products_id
                                WHERE p.products_status = 1
                                and p.products_id = :productsID
                                and pd.language_id = :languagesID ";
    
      $products_values_query = $db->bindVars($products_values_query, ':productsID', $_GET['pID'], 'integer');
      $products_values_query = $db->bindVars($products_values_query, ':languagesID', $_SESSION['languages_id'], 'integer');
    
      $products_values = $db->Execute($products_values_query);
      $products_image = $products_values->fields['products_image'];
    
      //auto replace with defined missing image
      if ($products_image == '' and PRODUCTS_IMAGE_NO_IMAGE_STATUS == '1') {
        $products_image = PRODUCTS_IMAGE_NO_IMAGE;
      }
    
      $products_image_extension = substr($products_image, strrpos($products_image, '.'));
      $products_image_base = preg_replace('/'.$products_image_extension.'/', '', $products_image);
      $products_image_medium = $products_image_base . IMAGE_SUFFIX_MEDIUM . $products_image_extension;
      $products_image_large = $products_image_base . IMAGE_SUFFIX_LARGE . $products_image_extension;
    
      // check for a medium image else use small
      if (!file_exists(DIR_WS_IMAGES . 'medium/' . $products_image_medium)) {
        $products_image_medium = DIR_WS_IMAGES . $products_image;
      } else {
        $products_image_medium = DIR_WS_IMAGES . 'medium/' . $products_image_medium;
      }
      // check for a large image else use medium else use small
      if (!file_exists(DIR_WS_IMAGES . 'large/' . $products_image_large)) {
        $products_image_large = $products_image_medium;
      } else {
        $products_image_large = DIR_WS_IMAGES . 'large/' . $products_image_large;
      }
    
      // This should be last line of the script:
      $zco_notifier->notify('NOTIFY_HEADER_END_POPUP_IMAGES');
    ?>

    File 2: Includes>Modules>Pages>Popup_Image_additional>Header_php.php

    Code:
    <?php
    /**
     * pop up image additional
     *
     * @package page
     * @copyright Copyright 2003-2006 Zen Cart Development Team
     * @copyright Portions Copyright 2003 osCommerce
     * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
     * @version $Id: header_php.php 4635 2006-09-30 18:48:26Z drbyte $
     */
    // This should be first line of the script:
      $zco_notifier->notify('NOTIFY_HEADER_START_POPUP_IMAGES_ADDITIONAL');
    
      $_SESSION['navigation']->remove_current_page();
    
      $products_values_query = "SELECT pd.products_name, p.products_image
                                FROM " . TABLE_PRODUCTS . " p
                                left join " . TABLE_PRODUCTS_DESCRIPTION . " pd
                                on p.products_id = pd.products_id
                                WHERE p.products_status = 1
                                and p.products_id = :productsID
                                and pd.language_id = :languagesID ";
    
      $products_values_query = $db->bindVars($products_values_query, ':productsID', $_GET['pID'], 'integer');
      $products_values_query = $db->bindVars($products_values_query, ':languagesID', $_SESSION['languages_id'], 'integer');
    
      $products_values = $db->Execute($products_values_query);
    
    
      $products_image = $products_values->fields['products_image'];
    
      $products_image_extension = substr($products_image, strrpos($products_image, '.'));
      $products_image_base = str_replace($products_image_extension, '', $products_image);
      $products_image_medium = $products_image_base . IMAGE_SUFFIX_MEDIUM . $products_image_extension;
      $products_image_large = $products_image_base . IMAGE_SUFFIX_LARGE . $products_image_extension;
    
      // This should be last line of the script:
      $zco_notifier->notify('NOTIFY_HEADER_END_POPUP_IMAGES_ADDITIONAL');
    ?>

    File 3: ZC_admin>Includes>Modules>Category_Product_listing.php I was going to leave code for this however it is too long to be posted here. It shouldne be important however.

    I Hope this helps, once again thank you!
    Last edited by wildchick; 13 Aug 2011 at 11:44 AM. Reason: Code too long

 

 

Similar Threads

  1. 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
  2. AJAX IMAGE Swapper support thread
    By jaycode in forum All Other Contributions/Addons
    Replies: 785
    Last Post: 13 Jan 2016, 11:48 PM
  3. 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
  4. Image Titles Support Thread
    By gjh42 in forum All Other Contributions/Addons
    Replies: 155
    Last Post: 9 Sep 2014, 04:51 AM
  5. Image Handler Support Please
    By nadinesky in forum All Other Contributions/Addons
    Replies: 2
    Last Post: 30 Sep 2013, 03:47 PM

Bookmarks

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
Zen-Cart, Internet Selling Services, Klamath Falls, OR