www.webdeveloper.com
Results 1 to 3 of 3

Thread: Easy Content Managed Gallery

  1. #1
    Join Date
    Feb 2014
    Location
    Cambridge, UK
    Posts
    2

    Cool Easy Content Managed Gallery

    Hello,

    Just looking for other developers opinion on content managed galleries.

    I have created a simple, small site using HTML & PHP for a client. They are now looking for a simple gallery which they can manage themselves.

    The requirements are simple:
    Able to remove and add images
    The gallery view will have all the thumbnails, which when clicked will use the JQuery lightbox to display a larger image.
    When the image is displayed larger (above) a 'PinIt' button will be visible which will share that image to Pinterest.

    I was thinking using ZenPhoto - However, it seems on the forums people are having issues with the PinIt button.

    Interested in hearing thoughts on this. I guess this post will also be handy for others looking to plugin a simple gallery into an existing (non-CMS) website.

    Many thanks
    Lewis

  2. #2
    Join Date
    Feb 2014
    Location
    Managua, Nicaragua
    Posts
    45

    Thumbs up

    Its easy to do it... For the 'lightbox' effect, i recomend u 'prettyPhoto' is the one i use... and 4 the gallery, u can use a little bite of PHP, an css 4 the thumnails...

    1. set a main carpet 4 all the pictures of the gallery.
    2. read the content of the carpet using PHP and then use a 'while' bucle to get each pic in the array to generate the gallery that u re looking for

    PHP Code:
    <?php
    $tu_carpeta_de_imagenes 
    '/images/';
    $d dir($_SERVER['DOCUMENT_ROOT'] . $tu_carpeta_de_imagenes);
    while(
    false !== ($entry $d->read())){
        if(
    strtolower(substr($entry, -3) == "jpg") || strtolower(substr($entry, -3) == "png")){ echo '<a href="' $tu_carpeta_de_imagenes $entry '" rel="prettyPhoto[Gallery]"><img src="' $tu_carpeta_de_imagenes $entry '" class="imagengaleria" /></a>'; }
    }
    $d->close(); ?>
    This will be the code, i hope to be clear

  3. #3
    Join Date
    Feb 2014
    Location
    Cambridge, UK
    Posts
    2
    Hello :-)

    Many thanks for your reply. I have looked at PrettyPhoto and it seems great for the lightbox effect!

    However, I still need a solution for the client to upload and delete images.

    Lewis :-)

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles