Jumat, 02 Maret 2012

autoGallery 1.0.RC2 - colorbox intergration



  • Replycool work with the autoGallery http://modxcms.com/extras/package/?package=535 
    I Have some hints for integration with Modx 1.0 and colorbox

    install as mention in autoGallery

    add this tags in the autoGalleryItem chunk
    (add small gallery pictures that link to colorbox )
    1
    <a class="cboxelement"href=[+imgpath+] rel="gallery" title=[+filename+]> <img src=[+tnpath+]></a>


    The colorbox is already implemented in modx 1.0
    and you only need to add this in the head of the template
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    <script type="text/javascript" src="assets/js/jquery-1.3.2.min.js"></script>
    <script src="assets/js/jquery.colorbox-min.js" type="text/javascript"></script>
    <link href="assets/js/colorbox.css" rel="stylesheet" media="screen" type="text/css" />
     
    <script type="text/javascript">
        var $s = jQuery.noConflict();
        $s(document).ready(function($){
            $("a[rel='gallery']").colorbox({transition:"none", width:"75%", height:"75%"});
        });
    </script>


    and add this code in the top of the body of the template

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    <div style="display: none; cursor: auto; opacity: 0.9;" id="cboxOverlay"></div>
    <div class="" style="padding-bottom: 42px; padding-right: 42px; display: none; height: 471px; width: 700px;
         top: 142.5px; left: 268px; opacity: 1;" id="colorbox"><div style="height: 513px; width: 742px;" id="cboxWrapper">
         <div><div style="float: left;" id="cboxTopLeft"></div>
            <div style="float: left; width: 700px;" id="cboxTopCenter"></div>
            <div style="float: left;" id="cboxTopRight"></div></div>
        <div><div style="float: left; height: 471px;" id="cboxMiddleLeft"></div>
            <div style="float: left; height: 471px; width: 700px;" id="cboxContent">
                <div style="display: none; height: 471px;" class="" id="cboxLoadingOverlay"></div>
                <div style="display: none; height: 471px;" class="" id="cboxLoadingGraphic"></div>
                <div style="display: none;" class="" id="cboxTitle"></div>
                <div style="display: none;" class="" id="cboxCurrent"></div>
                <div style="display: none;" class="" id="cboxSlideshow"></div>
                <div style="display: none;" class="" id="cboxNext"></div>
                <div style="display: none;" class="" id="cboxPrevious"></div>
                <div style="display: none;" class="" id="cboxClose"></div></div>
            <div style="float: left; height: 471px;" id="cboxMiddleRight"></div></div>
        <div><div style="float: left;" id="cboxBottomLeft"></div>
        <div style="float: left; width: 700px;" id="cboxBottomCenter"></div>
        <div style="float: left;" id="cboxBottomRight"></div></div>
    </div></div>


    for gallery usage with Frontend manger with out any conflicts:
    please update the file placed: assets/plugins/qm/qm.inc.php
    add a line after line 155

    1
    $("a[rel='."'gallery'".']").colorbox({transition:"none", width:"75%", height:"75%"});

    or just replace the attach file

aaa