Using the gallery extension

OK, I guess I must be missing something obvious but I just can’t see
how it works. I’ve created public/galleries, create a “Test” one, put
a picture in it and… where is it supposed to appear?
/galleries/? /galleries/Test? Do I have to create an new Page
with one of the gallery layouts, probably with a Gallery page type?
Is it documented somewhere??

Thanks.

Hi Ollivier. …some of this you might have already figured out.

Create a new gallery by going to the Admin UI and clicking on the
“Galleries” tab. Click on the “New Gallery” button and from there
upload some pics, edit the gallery description, etc. Name the gallery
“MyPics” for example.

Then go to the “Pages” tab and create a new page, call it “Photos” for
example, and make sure you select the “Gallery” page type from the
“Page Type” drop-down selections. In the body of this page, you’ll put
some html and radiant tags to display pics from your “MyPics” gallery.
Here’s the code I use for my galleries with some explanations added:

  <!-- galleries -->
  <r:gallery:if_galleries>
    <div class="galleries">

I have several galleries, so the next statement loops through each

of them, producing links to the individual

galleries. You can still do this even with only one gallery.

      <r:galleries:each level="current">
        <div class="gallery">
          <r:gallery:if_items>
            <div class="thumb" style="background-image:

url(’<r:gallery:item:thumb width=“120” position=“first” />’);">

<r:gallery:name />


</r:gallery:if_items>


<r:gallery:link />


<r:gallery:description />





</r:galleries:each>

</r:gallery:if_galleries>

<r:gallery:unless_galleries>

<r:gallery:item:unless_current>
<r:gallery:if_items>

<r:gallery:description />

This next loop picks up information about each item (ie. photo) in

the gallery and creates thumbnails and links

to each of the photos. This is what you see when you click on the

gallery link produced above.
<r:gallery:items:each>


<div class=“thumb” style=“background-image:
url(’<r:gallery:item:thumb width=“150” />’)”>
<a href="<r:gallery:item:thumb width=“500” />"
rel=“lightbox[<r:gallery:name />]” title="<r:gallery:item:name />">
<r:gallery:item:name />




</r:gallery:items:each>


</r:gallery:if_items>
</r:gallery:item:unless_current>

This next bit is what formats the page for individual photos, with

navigation links to next/previous items.
<r:gallery:item:if_current>
<r:gallery:item:current>




<r:gallery:item:if_prev>
«
prev

</r:gallery:item:if_prev>


<r:gallery:item:if_next>
next
»

</r:gallery:item:if_next>




<r:gallery:item:name />




<r:gallery:item:description />



</r:gallery:item:current>
</r:gallery:item:if_current>

</r:gallery:unless_galleries>

Most of the above code will be in the sample gallery, if you installed
it.

Assuming you used my example names, you can go to
/photos (the Photos gallery-type page) and the
above code should display your “MyPics” gallery (and any others you
add later).

Hope this helps.

Hey, thank you Marshal,
I was wondering the same thing too! The documentation around this one
didn’t
say much about the displaying portion, but then again, I’m new to the
CMS
world.
-Thembile.

On Thu, May 22, 2008 at 12:15 PM, Ollivier R. [email protected]
wrote:

On Tue, May 20, 2008 at 12:59 AM, Marshal L. [email protected] wrote:

Hi Ollivier. …some of this you might have already figured out.

Thanks a lot for the explanations. I manage to get running by creating an
empty page with the Gallery Cached type and it works fine. It is
looking quite good
and simple. Any idea on adding comments on individual pictures in the future?

What I am ultimately looking is a gallery2 clone to be able to ditch
php completely… :slight_smile:

I want to add this feature, but unfortunately I’ve no time to work on
it right now.
I’ll do it as soon as I can, If you want to contribute you are welcome
:slight_smile:


Andrea F.
http://gravityblast.com - http://nimboo.net

On Tue, May 20, 2008 at 12:59 AM, Marshal L. [email protected]
wrote:

Hi Ollivier. …some of this you might have already figured out.

Thanks a lot for the explanations. I manage to get running by creating
an
empty page with the Gallery Cached type and it works fine. It is
looking quite good
and simple. Any idea on adding comments on individual pictures in the
future?

What I am ultimately looking is a gallery2 clone to be able to ditch
php completely… :slight_smile:

Thanks.