Results 1 to 2 of 2

Fancy Lightbox Popup

This is a discussion on Fancy Lightbox Popup within the New osCommerce Contributions forums, part of the osCommerce 2.2 Forums category; Support thread is at http://forums.oscommerce.com/index.php?showtopic=282726 No changes in this zip More......

      
  1. #1
    osCMax Developer

    michael_s's Avatar
    Join Date
    Jul 2002
    Location
    Phoenix, AZ
    Posts
    19,500
    Rep Power
    567


    Post Fancy Lightbox Popup

    Support thread is at

    http://forums.oscommerce.com/index.php?showtopic=282726

    No changes in this zip

    More...
    Michael Sasek
    osCMax Developer


    osCmax installation service - Have our professionals install osCmax on your server - same day service!
    osCmax 2.0 User Manual - the must have beginners guide to osCmax v2.0

    Stay Up To Date with everything osCMax:
    Free osCMax Newsletters - Security notices, New Releases, osCMax News
    osCMax on Twitter - Up to the minute info as it happens. Know it first.

    osCmax Documentation

  2. #2
    Member
    Join Date
    May 2005
    Posts
    43
    Rep Power
    0


    Default Re: Fancy Lightbox Popup

    I really like the Fancy Lightbox Popup contrib. It installed pretty easily, the lightbox appearance can be modified through CSS and it is much harder for casual users to right click and save the image.

    Instructions for installing the Lightbox subdirectory were fine. Script mods were oriented toward plain vanilla osCommerce.

    In osCMax with the fallback template, one edits product_info.tpl.php.

    At about line 89, replace:

    <script language="javascript" type="text/javascript"><!--
    document.write('<a href="javascriptopupImage(\'<?php echo tep_href_link(FILENAME_POPUP_IMAGE, 'pID=' . $product_info['products_id'] . '&type=' . $lg_image_ext); ?>\',\'<?php echo ((int)$image_size[1] + 30); ?>\',\'<?php echo ((int)$image_size[0] + 5); ?>\');"><?php echo tep_image(DIR_WS_IMAGES . $product_info['products_image'], addslashes($product_info['products_name']), SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT); ?><br /><span class="smallText"><?php echo TEXT_CLICK_TO_ENLARGE; ?></span></a>');
    //--></script>
    <noscript>
    <a href="<?php echo tep_href_link($image_lg . '.' . $lg_image_ext); ?>" target="_blank"><?php echo tep_image(DIR_WS_IMAGES . $product_info['products_image'], stripslashes($product_info['products_name']), SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT); ?><br /><span class="smallText"><?php echo TEXT_CLICK_TO_ENLARGE; ?></span></a>
    </noscript>

    With:

    <script language="javascript"><!--
    document.write('<?php echo '<a href="' . tep_href_link(DIR_WS_IMAGES . $product_info['products_image']) . '" target="_blank" rel="lightbox" title="'.$product_info['products_name'].'" >' . tep_image(DIR_WS_IMAGES . $product_info['products_image'], $product_info['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?>');
    //--></script>
    <noscript>
    <?php echo '<a href="' . tep_href_link(DIR_WS_IMAGES . $product_info['products_image']) . '" target="_blank" rel="lightbox" title="'.$product_info['products_name'].'" >' . tep_image(DIR_WS_IMAGES . $product_info['products_image'], $product_info['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?>');
    </noscript>

    We show a different shot in the popup and we didn't want to lose the work that went into the built-in Dynamic MoPics, so we use the following (changed DIR_WS_IMAGES TO DIR_WS_IMAGES . DYNAMIC_MOPICS_BIGIMAGES_DIR so the lightbox pulls the image from the defined big images directory:

    <script language="javascript"><!--
    document.write('<?php echo '<a href="' . tep_href_link(DIR_WS_IMAGES . DYNAMIC_MOPICS_BIGIMAGES_DIR . $product_info['products_image']) . '" target="_blank" rel="lightbox" title="'.$product_info['products_name'].'" >' . tep_image(DIR_WS_IMAGES . $product_info['products_image'], $product_info['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?>');
    //--></script>
    <noscript>
    <?php echo '<a href="' . tep_href_link(DIR_WS_IMAGES . DYNAMIC_MOPICS_BIGIMAGES_DIR . $product_info['products_image']) . '" target="_blank" rel="lightbox" title="'.$product_info['products_name'].'" >' . tep_image(DIR_WS_IMAGES . $product_info['products_image'], $product_info['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?>');
    </noscript>

    I hope this helps someone in the osCMax community.

    Regards,


    Paul
    Bulk Jewelry Chain, Findings, Jewelry Making Supplies: Shop OhioBeads.com (to see the lightbox in action)
    argentbeads

Similar Threads

  1. Fancy Lightbox Popup
    By michael_s in forum New osCommerce Contributions
    Replies: 0
    Last Post: 11-09-2007, 04:33 AM
  2. LIGHTBOX Image for STS
    By michael_s in forum New osCommerce Contributions
    Replies: 0
    Last Post: 11-08-2007, 11:32 AM
  3. LIGHTBOX Image for STS
    By michael_s in forum New osCommerce Contributions
    Replies: 0
    Last Post: 08-30-2007, 12:11 PM
  4. LIGHTBOX Image for STS
    By michael_s in forum New osCommerce Contributions
    Replies: 0
    Last Post: 06-25-2007, 06:55 PM
  5. product info lightbox
    By michael_s in forum New osCommerce Contributions
    Replies: 0
    Last Post: 06-04-2007, 08:30 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
  •