Not signed in (Sign In)

Vanilla 1.1.4 is a product of Lussumo. More Information: Documentation, Community Support.

    • CommentAuthorbellamy
    • CommentTimeFeb 11th 2008
     
    Hi, I'm designing a portfolio site for a friend of mine, he's a photographer. In order to simplify everything to the bare bone, we decided to start lightview from a single <a href> link, to view his gallery of photos. So there will be no gallery thumbnails involved here. My question is if there is a way to do this? Probably by inserting something similar to this:


    startNoHref: function(imageNum, imagesArray) {

    hideSelectBoxes();

    // stretch overlay to fill page and fade in
    var arrayPageSize = getPageSize();
    Element.setHeight('overlay', arrayPageSize[1]);
    new Effect.Appear('overlay', { duration: 0.2, from: 0.0, to: 0.8 });

    imageArray = [];

    for (var i=0; i<imagesArray.length; i++){
    imageArray.push(new Array(imagesArray[i], ""));
    }
    imageArray.removeDuplicates();

    // calculate top offset for the lightbox and display
    var arrayPageSize = getPageSize();
    var arrayPageScroll = getPageScroll();
    var lightboxTop = arrayPageScroll[1] + (arrayPageSize[3] / 15);

    Element.setTop('lightbox', lightboxTop);
    Element.show('lightbox');

    this.changeImage(imageNum);
    },


    So the lightview can be activated using:


    <a href="#" onclick="myLightbox.startNoHref(0, new Array(
    '/images/001.jpg',
    '/images/002.jpg'
    )); return false;">Start Gallery</a>


    But the thing is, I'm no JavaScript wiz, so I'm still figuring the way to start modding functions like this to fit in lightview.

    I know that lightbox can do this (the function above came from one of the mods of lightbox), but since I'm using Prototip as well and lightbox is not compatible with Prototype 1.6.0 and Scriptaculous 1.81, lightview has become my only option.

    Thanks in advance.
  1.  
    Can't wait for an answer to this one, I'm looking at doing the exact same thing (without using Prototip though) for an e-commerce site -- have a button saying "more images" for any given product and once clicked Lightview takes over with a gallery (set) listing (ie: http://www.passengersonly.com/catalog/tumi-t-tech-pulse-rector-sport-duffel).

    I would handle this a lot different than bellamy's examples, utilizing Prototype to stop the click event and build the appropriate array for Lightview to handle using either data from within the DOM when the page was built, or from an Ajax request made based on the image that was clicked, only I'm not sure how to invoke Lightview accordingly -- and since Lightview has been obfuscated I can't tell crap from looking at the code (other than traversing the object using Firebug), nor could I change/modify it if I wanted to because of the CC ND license [blah, should use the SA license in my opinion].
  2.  
    You won't need to modify lightview, you can hide links individualy or with a wrapper like:

    <div style='display:none'>
    <a id='gallery1_image1' ...></a>
    <a id='gallery1_image2' ...></a>
    ...
    </div>


    Then fire up the gallery using the id.

    Lightview.show('gallery1_image1')
    • CommentAuthortenzin
    • CommentTimeFeb 18th 2008
     
    HI Nick Thanks for the Tip.
    It fires up script in all browser accept IE 7. Do you know what can be the causes ? In IE 7 it says "this.sets is null of not an Object".

    Thanks a lot
    • CommentAuthorkipcole9
    • CommentTimeFeb 20th 2008
     
    I have a similar issue as tenzin, aiming to start a slideshow from a hidden set of links. I have the links set up as described. My link to execute the slideshow is:

    <a href='#' onclick='Lightview.show("gallery_119");'>Click for slideshow</a>

    Neither Safari 3 nor Firefox 2 will display the show (not tested in IE so far). The Javascript console for Firefox reports the following when I click (all my other uses of Lightview are fine):

    Error: this.getSet(this.element.rel) has no properties
    Source File: http://localhost:3000/javascripts/lightview.js
    Line: 57

    I am on Lightview 1.0.4. Any and all suggestions welcome,

    Cheers --Kip
    • CommentAuthortenzin
    • CommentTimeFeb 21st 2008
     
    To anyone who might be interested,

    I solved the problem by calling the function "Lightview.show('ID')" inside another function namely setTimeout as below --
    <script type="text/javascript">
    function x() {
    setTimeout("Lightview.show('img1')",10);
    }
    window.onload = x;
    </script>

    Now it works flawlessly in IE6 & IE7 too, all the best
Add your comments

    Username PasswordPlease enter the following code:
  • Format comments as