Not signed in (Sign In)

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

    • CommentAuthorgroundloop
    • CommentTimeMay 31st 2008
     
    Hello all,
    First of all tx to all the people who developped plogger. it is an unvaluable ressources for people like me who are not computer wiz, but wish to create nice and professionnal website.

    As for my question: I am working on a portefolio website using the Mike's Lightbox theme.
    I would like to display in the lightbox, the Image description instead of image number and count, right under the image caption.

    I can't seems to find the line of code that i need to modifiy.

    Tx.

    here is the url of the gallery
    http://www.lareinedagobert.com/gallery3/
    • CommentAuthorkokuda
    • CommentTimeJun 4th 2008
     
    I don't know about the lightbox script included in that theme, but I've been working on my own theme with this lightbox script http://plugins.jquery.com/project/jquerylightbox_bal. It has the ability to set title and description text.

    I based my theme from the default theme, and this is an example of the head.php. It uses rel="lightbox" so you can probably swap in the different script and CSS with your existing lightbox theme, and it may just work.


    <link rel='stylesheet' type='text/css' href='<?php echo THEME_URL ?>gallery.css' />
    <link rel='stylesheet' type='text/css' href='<?php echo THEME_URL ?>jquery_lightbox/css/jquery.lightbox.packed.css' />
    <script src="http://www.google.com/jsapi"></script>
    <script>
    // Load jQuery
    google.load("jquery", "1.2");
    </script>
    <script type='text/javascript' src='<?php echo THEME_URL ?>jquery_lightbox/js/jquery.lightbox.packed.js'></script>
    <script type='text/javascript' src='<?php echo THEME_URL ?>dynamics.js'></script>


    This lightbox script uses jquery, and I am using the Google version to, hopefully, make it faster and more standard if the Google hosting of standard script libraries becomes more popular.
    • CommentAuthorlocust
    • CommentTimeJul 21st 2008
     
    Tx for the info.
    Unfortnatly, it doesn't do the trick. Loads the collection and album a lot faster though but kills the lightbox altogether. The larger images show up in blank html page. No description and No caption.

    There is in the js file the following lines to display caption and image count :

    // updateDetails()
    // Display caption, image number, and bottom nav.
    //
    updateDetails: function() {

    Element.show('caption');
    Element.setInnerHTML( 'caption', imageArray[activeImage][1]);

    // if image is part of set display 'Image x of x'
    if(imageArray.length > 1){
    Element.show('numberDisplay');
    Element.setInnerHTML( 'numberDisplay', "Image " + eval(activeImage + 1) + " of " + imageArray.length);
    }

    myLightbox.updateNav();

    Can I edit these lines to show the description ?

    Tx
    •  
      CommentAuthorsidtheduck
    • CommentTimeAug 18th 2008
     
    locust,

    You should be able to add the description to the title attribute along with the caption. To do this, you should look for the following code in 'album.php' in the lightbox theme folder:
    $capt = plogger_get_picture_caption();
    $img_id = "thumb-".plogger_get_picture_id();
    $imgtag = '<img id="' . $img_id . '" class="photos"
    src="'.plogger_get_picture_thumb().'" title="'.$capt.'" alt="'.$capt.'" />';

    print '<li class="thumbnail"><a title="'.$capt.'" href="' . plogger_get_picture_thumb(THUMB_LARGE) . '" rel="lightbox">' . $imgtag . "</a>";

    and edit it to read:
    $capt = htmlspecialchars(plogger_get_picture_caption());
    $desc = htmlspecialchars(plogger_get_picture_description());
    $img_id = "thumb-".plogger_get_picture_id();
    $imgtag = '<img id="' . $img_id . '" class="photos"
    src="'.plogger_get_picture_thumb().'" title="'.$capt.'" alt="'.$capt.'" />';

    print '<li class="thumbnail"><a title="'.$capt.'&lt;br /&gt;'.$desc.'" href="' . plogger_get_picture_thumb(THUMB_LARGE) . '" rel="lightbox">' . $imgtag . "</a>";


    That should do it for you!
  1.  
    I used this code and my gallery worked properly but now I had upgraded plogger to VERSION: 1.0-RC1-RevLastChangedRevision .Now I don't know how to implement the above code in this version as the new version use echo() rather than print().Can any body help me.
    Thanks
    •  
      CommentAuthorsidtheduck
    • CommentTimeOct 7th 2009
     
    sariga,

    "print" and "echo" are pretty much the same thing in PHP (print just returns a "1" on completion) and so are virtually interchangeable. If you are using the new themes, it may be that you need to wrap the code above in php tags since the new themes are attempting to combine the PHP where necessary, but keep the HTML cleaner for easier manipulation by theme developers.
    Like so:
    <?php
    ***your PHP code here***
    ?>
    Thankful People: sarigamanakodam