Results 1 to 3 of 3

Hybrid View

  1. #1
    Join Date
    Apr 2007
    Location
    Vietnam
    Posts
    9
    Plugin Contributions
    0

    Default [Tutorial] Display image with LightBox script

    Go to: "http://www.dynamicdrive.com/dynamicindex4/lightbox/index.htm"
    and download lightbox.zip then unzip, upload to your hosting where zen-cart is installed

    ex:
    public_html/lightbox/close.gif
    public_html/lightbox/lightbox.css
    public_html/lightbox/lightbox.js and other files included
    Then do steps following:
    - open file lightbox.css >> find
    #overlay{ background-image: url(yourLink); }
    edit yourLink (url(http://yoursite.com/lightbox/overlay.png))
    and find:
    background-image: url(http://yoursite/lightbox/blank.gif);
    edit it...
    and
    filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="http://yoursite/lightbox/overlay.png", sizingMethod="scale");
    2. open file lightbox.js
    then find:
    var loadingImage = 'http://yoursite/lightbox/loading.gif';
    var closeButton = 'http://yoursite/lightbox/close.gif';
    save it

    3. still connect to your server by fpt
    go to includes/templates/your-template/templates/tpl_modules_main_product_image.php
    find:
    <script language="javascript" type="text/javascript"><!--
    document.write('<?php echo '<a href="javascript:popupWindow(\\\'' . zen_href_link(FILENAME_POPUP_IMAGE, 'pID=' . $_GET['products_id']) . '\\\')">' . zen_image($products_image_medium, addslashes($products_name), MEDIUM_IMAGE_WIDTH, MEDIUM_IMAGE_HEIGHT) . '<br /><span class="imgLink">' . TEXT_CLICK_TO_ENLARGE . '</span></a>'; ?>');
    //--></script>
    end replace by script below
    <script language="javascript" type="text/javascript"><!--
    document.write('<?php echo '<a href="'.$products_image_medium.'" rel="lightbox">'.zen_image($products_image_medium, addslashes($products_name), MEDIUM_IMAGE_WIDTH, MEDIUM_IMAGE_HEIGHT).'</a>'; ?>');
    //--></script>
    4. go to: includes/templates/your-template/common/html_header.php
    find (before):
    $directory_array = $template->get_template_part($template->get_template_dir('.css',DIR_WS_TEMPLATE, $current_page_base,'css'), '/^print/', '.css');

    sort($directory_array);

    while(list ($key, $value) = each($directory_array)) {

    echo '<link rel="stylesheet" type="text/css" media="print" href="' . $template->get_template_dir('.css',DIR_WS_TEMPLATE, $current_page_base,'css') . '/' . $value . '" />'."\n";
    }
    and replace =: (after)
    $directory_array = $template->get_template_part($template->get_template_dir('.css',DIR_WS_TEMPLATE, $current_page_base,'css'), '/^print/', '.css');

    sort($directory_array);

    while(list ($key, $value) = each($directory_array)) {

    echo '<link rel="stylesheet" type="text/css" media="print" href="' . $template->get_template_dir('.css',DIR_WS_TEMPLATE, $current_page_base,'css') . '/' . $value . '" />'."\n";

    $link="http://yoursite/lightbox/lightbox.css";
    echo '<link rel="stylesheet" type="text/css" media="screen" href="'.$link.'" />'."\n";

    }
    then at ahead of </head> tag
    add:
    PHP Code:
    <?php echo '<script src="http://yoursite/lightbox/lightbox.js"></script>' ?>
    meaning:
    <?php echo '<script src="http://yoursite/lightbox/lightbox.js"></script>' ?>
    </head>
    i hope you understand
    i am trying write down by english
    my english so bad
    if have problem you can post it here, i will help you
    you can visit following link for see demo site:
    Demo: http://shoponline.com.vn/index.php?m...0f0eab2189abb4
    click on television image and see

    thanks

  2. #2
    Join Date
    Aug 2007
    Posts
    95
    Plugin Contributions
    0

    Default Re: [Tutorail] Display image with LightBox script

    hi that didnt work it just messed up the layout of my page

    does any one now how to add this one to your ite as its better then the first one with out messing up my page layout thanks

    http://www.huddletogether.com/projects/lightbox2/

  3. #3
    Join Date
    Jul 2007
    Posts
    10
    Plugin Contributions
    0

    Default Re: [Tutorail] Display image with LightBox script

    thats a good post havent used it but maybe it can help some people out.

 

 

Similar Threads

  1. v139h lightbox and IH2 - additional image not working in the lightbox
    By kitcorsa in forum All Other Contributions/Addons
    Replies: 1
    Last Post: 2 Aug 2013, 10:45 AM
  2. Lightbox - how to open a flash script
    By Barracus in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 5 Jul 2010, 06:58 PM
  3. Followed tutorial, image still won't display
    By nadsab in forum Templates, Stylesheets, Page Layout
    Replies: 8
    Last Post: 14 Feb 2010, 06:53 PM
  4. Problem with: Can I Use An Image For the Sidebox Header? Tutorial
    By mipavluk in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 12 Oct 2008, 09:59 PM
  5. Replies: 1
    Last Post: 5 Oct 2008, 11:45 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