Announcement

  •  » Requests
  •  » Smoothgallery plugin ?

#1 2008-11-07 11:20:11

Mouskouyouss
Guest

Smoothgallery plugin ?

Hi,

Has anyboby tried to implement a plugin for the smoothgallery (http://smoothgallery.jondesign.net) ?
It seems really nice...
SPIP and Wordpress have a plugin for it.

Do you think it's possible to integrate it with PWG ?

mouskouyouss

 

#2 2008-11-07 17:18:58

VDigital
Former Piwigo Team
Paris (FR)
2005-05-04
17680

Re: Smoothgallery plugin ?

Currently complex (PhpWebGallery 1.7.x).

Coming release (Piwigo 2.0.0) much easier. To integrate it:

1 - Create a smooth dir in template-extension, and copy there:
- css, images/bg, scripts folders and resizer.php
([aside] How can be efficient a such resized gallery on user access? [/aside])

2 - Create your template (smooth.tpl) in the smooth dir. It should be like this:

{if !empty($thumbnails)}
{html_head}
<link rel="stylesheet" href="css/layout.css" type="text/css" media="screen" charset="utf-8" />
<link rel="stylesheet" href="css/jd.gallery.css" type="text/css" media="screen" charset="utf-8" />
<script src="scripts/mootools.v1.11.js" type="text/javascript"></script>
<script src="scripts/jd.gallery.js" type="text/javascript"></script>
{/html_head}
<script type="text/javascript">
{literal}
    function startGallery() {
        var myGallery = new gallery($('myGallery'), {
            timed: false
        });
    }
    window.addEvent('domready',startGallery);
{/literal}
</script>
<div id="myGallery">
{foreach from=$thumbnails item=thumbnail}
    <div class="imageElement">
        {if !empty($thumbnail.NAME)}<h3>{$thumbnail.NAME}</h3>{/if}
        <p>Item {$thumbnail.iteration} Description</p>
        <a href="#" title="{$thumbnail.TN_TITLE}" alt="{$thumbnail.TN_ALT}" class="open"></a>
        <img src="{$thumbnail.IMAGE_PATH}"  class="full" />
        <img src="{$thumbnail.TN_SRC}"  class="thumbnail" />
    </div>
{/foreach}
</div>
{/if}

But currently {$thumbnail.IMAGE_PATH} is not available and it must be.
(category_default.inc.php have to generate it...).
I didn't check at all this draft concept.
So, when this could work: next step.

3 - (Optional) For the category you want to use it (.if only one for a test.)
Create a permalink for this category.

4 - Admin > Configuration > Template
There associate your new template (smooth.tpl) to thumbnails.tpl (and to your permalink if there is, without it all categories will be concerned).

No plugin =>  Less errors
8-)


Piwigo.com: Start and run your own photo gallery. Signup and get 30 days to try for free, no commitment.
8-)

Offline

 
  •  » Requests
  •  » Smoothgallery plugin ?

Board footer

Powered by FluxBB

github twitter newsletter Donate Piwigo.org © 2002-2024 · Contact