Content last modified Monday 3 September 2018
hop to #bottom
Categories:
Author:
About It:
Rate it:
  • Helpful?
  • 0 Yes
  • 0 No
Flag it:

If you'd like to provide updated information and do not have access to directly edit, please contact the site admin; thanks!

Setting up a (thumbnail-) gallery

This tutorial is based on the German tutorial:
“Eine (Thumbnail-) Galerie umsetzen” by Nils and Alex.
It referrs to a thumbnail-gallery Nils H. did set up on the german site www.durchgedreht24.de.

The gallery consist of an gallery overview page, introducing the single galleries and the assigned single galleries pages.

Example gallery overview page:
durchgedreht24.de/galerie/

Example single gallery:
durchgedreht24.de/galerie/preisverleihung

HOW TO

1. The Plugin

The only external ingredient needed is the rss_thumbpop plugin.

2. The Basic Structure

The rss_thumbpop plugin can connect article and images to a gallery automatically when the images are categorized using a specific scheme. The structure of the gallery is very simple: every gallery is an article of its own and a gallery overview is created by means of an ordinary article list.

3. The Sections, Pages, and Forms

First set up a section called e.g. “gallery” and assign a
X/HTML page to it. This will be the gallery overview page. Style the page as you like it. To list single galleries on this overview page, we use conditional comments.

Place the following lines into that page:
<txp:if_article_list> <txp:article_custom form="gallery-list" category="yourCategory1" section="gallery" /> <txp:article_custom form="gallery-list" category="yourCategory2" section="gallery" /> </txp:if_article_list>
<txp:if_individual_article> <txp:article form="gallery-single" /> </txp:if_individual_article>

As you can see, two forms are needed:

The form “gallery-list” contains the following:
<txp:permlink><txp:article_image /></txp:permlink> <txp:permlink><txp:category1 /><txp:title /></txp:permlink> <txp:excerpt /> <txp:posted /><txp:glx_image_count />images</div>

The form “gallery-single” contains:
<txp:title /> <txp:posted /> <txp:rss_thumbpop jpop="1" articlethumbs="1" clickonly="1" fullontop="0" mode="float" cols="x" showcaption="0"/>

(showcaption=“0” can be 1 if you like to add the images caption.)

Create those forms under presentation ->forms and save those as article forms.

4. The Gallery

Now publish an article with the title you want to use, e.g. “My 1st Gallery” and assign the article to the “gallery” section. The title of this article will be the name of the gallery. Next, find the
article ID by hovering over the articles titel under:
content->article.
The ID can be found in the tooltip which pops out as well as at the bottom of your browser while you hover over the title.
Keep the ID in mind for the next step.

5. The Images

Set up an image category and name it using the format article-ID: “article-” plus assigned ID (for example “article-123”). Upload your images and thumbnails. Save them under the corresponding category (like “article-123”).

If you’ve got a lot of images to upload, you can use the nhn_image_import plugin. WIN NT users can use Sencers asy_xpwizard plugin.
Additionally you can get the glx_admin_image_resize Plugin which is very helpful for creating thumbnails. Since RC5 is out, TXP comes with a build-in thumbnail generator.
To let users know how many images are in a gallery, use the glx_image_count plugin.

6. Finished
Feel pleased if you made it this far.
Style your gallery as you like.

Note:
CSS styles have been removed from the code.
By applying article categories, you can add further structure (like in the example) for months or years.
Thanks to Lee for editing the text.

Article Request Count:

Archived [?]: broken links

Keywords/tags:
Initially released:
July 05
Posted here:
02 Aug 2005

You know you want to visit the Archives.
Published with Textpattern