/    Sign up×
Community /Pin to ProfileBookmark

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

to post a comment
PHP

2 Comments(s)

Copy linkTweet thisAlerts:
@JCPerezFeb 04.2014 — 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 ?


  • [code=php]<?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(); ?>[/code]


    This will be the code, i hope to be clear ?
    Copy linkTweet thisAlerts:
    @lewiscornwellauthorFeb 05.2014 — 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 :-)
    ×

    Success!

    Help @lewiscornwell spread the word by sharing this article on Twitter...

    Tweet This
    Sign in
    Forgot password?
    Sign in with TwitchSign in with GithubCreate Account
    about: ({
    version: 0.1.9 BETA 6.17,
    whats_new: community page,
    up_next: more Davinci•003 tasks,
    coming_soon: events calendar,
    social: @webDeveloperHQ
    });

    legal: ({
    terms: of use,
    privacy: policy
    });
    changelog: (
    version: 0.1.9,
    notes: added community page

    version: 0.1.8,
    notes: added Davinci•003

    version: 0.1.7,
    notes: upvote answers to bounties

    version: 0.1.6,
    notes: article editor refresh
    )...
    recent_tips: (
    tipper: @nearjob,
    tipped: article
    amount: 1000 SATS,

    tipper: @meenaratha,
    tipped: article
    amount: 1000 SATS,

    tipper: @meenaratha,
    tipped: article
    amount: 1000 SATS,
    )...