wiki:GalleryTemplate

For the really busy (or lazy) people: Create a new page by going to http://www.opensg.org/wiki/Gallery/<YourProjectNameWithoutSpaces>, Click 'Create this page', enter a quick description and a link to your homepage (if applicable), press 'Submit Changes' and use 'Attach File' to attach the images to the page. I will add all the rest when I check the changes to the Wiki next.

But if you want to have a little control over what it looks like, read on:

Adding a new page in the Gallery is very easy. All you have to do is click the 'Edit This Page' button on the Application Gallery page.

On the page you will see some lines like these:

|| [[TemplInclude(Templ/GalleryEntryAT, project=Siena, img=image1.thm.jpg, caption=Siena Cathedral)]] || [[TemplInclude(Templ/GalleryEntry, project=Fishtank, img=fishtank_thumb.jpg, caption=Fishtank)]]

To add your application, copy-and-paste one of those entries ("||[[TemplInclude(Templ/GalleryEntryAT, project=xxx, img=xxx, caption=xxx)]] ") and adapt it to your project. An empty line denotes a line break in the table. We generally do it after 5 applications to keep the page small enough to fit on most screens. Make sure that there is no newline after the entry before you, as that counts as a linebreak for the table, too. Just put a space there.

The gallery entries are created using a little template called GalleryEntry with 3 parameters. The first one is the project name, it's the name of the directory the data is stored in and should not have spaces to avoid confusing the scripts. The second one is the name of the image you want to show as a thumbnail. There are two versions of the template, GalleryEntry uses a thumbnail that is manually created and attached to your project gallery page (i.e. you need to create a 100 pixel high image for your project), GalleryEntryAT will use one of the automatically generated thumbnails (see below). If you use the generic name 'auto_thumbnail.jpg' with this one, the system will randomly switch images every 20 minutes. The third parameter is the title of the image.

Once you added that, click Preview. You will see the link to your new project. Open that link in a new tab or window of your browser, and click 'Create this page'.

This new page is your page, you can design it pretty much any way you want. You can look at the other gallery pages for inspiration, and you can look at how they did things by using the 'Download in other formats: Plain Text' button.

You can attach the pictures directly to the page, which has some advantages, or just link to the pictures on your server somewhere. If you do attach them to the page, the system will automatically create thumbnails for you, unless the name contains the phrase 'NoThumb'. These are updated every 20 minutes, so don't be alarmed if they don't show up immediately, and they come in a 100 pixel high ('*.thm.jpg'), a 200 pixel high ('*.thm2.jpg') and a 50 pixel high ('*.thm5.jpg') version. We recommend using JPG as the file format, to keep the file sizes small and the pages fast. Even high-quality JPG is usually noticeably smaller than other formats like PNG.

We highly recommend to have the site menu on your page, as otherwise people get lost easily. To do that you need the first line of your page to be '[[Include(Templ/PageHeader)]]'. After that I would put a short text description of the project and what is visible on the pictures. If you want to put a description of your group, please put that under Users and link to it from your gallery.

The simplest galleries only have one big picture (e.g. Gallery/Siena). This can be easily done using the Trac Image macro (e.g. '[[Image(image1.jpg)]]'). If your image is more than 800 pixel wide, please use the optional width to scale it down to 800 (e.g. '[[Image(image1.jpg, 800)]]'

For multiple images in the gallery we recommend using 200 pixel high thumbnails (like the auto-generated ones) that link to the full resolution image and just putting the images into the page, see Gallery/NetODrom for an example. This gallery uses the 'GalleryThumbnailAT' template to automate the process. It has 3 parameters, the first is the project/directory name (similar to GalleryEntry), the second one is the filename of the image file (without extension) and the last one is the extension of the image, e.g. '[[TemplInclude(Templ/GalleryThumbnailAT, project=NetODrom, img=screenshot_lndf_03, type=jpg)]]'. It is also possible to access the auto-thumbnails explicitly, but it takes HTML to do that. Take a look at the source of the GalleryThumbnailAT Template to get an idea how.

If you need captions on your pictures there are at least two ways of doing it. You can either split your pictures into groups and just use regular text for captions (see Gallery/SortLastRendering for an example). This makes sense for longer captions. If you just need a title, you can use Wiki tables. The easiest way to get the picture and the caption into a table cell is using the [[BR]] command. The Gallery page uses it, here's the basic idea:

||[[TemplInclude(Templ/GalleryEntryAT, project=Siena, img=image1.thm.jpg, caption=Siena Cathedral)]] [[BR]] My caption for this picture || <more pictures...>

And that's pretty much it. Have fun making your work known and help us show the many different things OpenSG can be used for!

Last modified 7 years ago Last modified on 02/13/10 04:34:49