SimonRyan

Follow the trail.. SimonRyan

Author of the inspirational MoinMoinGallery ;-) -- Adam.

Sample Galleries:

Message Board

22nd July 2006 - Wow! It has been a while. Once again, the script has been updated to address a few issues and also to keep up with changes in Moin.

19th August 2005 - I've updated the script to address a number of issues. Check the MoinMoinGallery page - Simon


I also made some simular gallery and used this code to show also Movies, Flash Movies and Panoramas (Image Ending with _panorama.jpg automatically assumed as Panorama). Maybe the HTML Snippets in the Code are helpfull.

Especially the embed tag is very simple and shows up nice in the browser.

        if isinstance(item, gallery.ImageItem):
            print util.makeUrl(
                    item.path,
                    '<img width="%s" height="%s" src="%s" border="0" alt="%s">' %(
                        item.thumb_width, item.thumb_height, urllib.quote(item.thumb), item.path),
                    title=item.thumb)

        elif isinstance(item, gallery.MovieItem) or isinstance(item, gallery.MusicItem) or isinstance(item, gallery.FlashItem):
            print '''<embed src="%s" width="%s" height="%s" autostart="true">^M
                </embed>''' %(item.path, image_width, (image_height, 40)[isinstance(item, gallery.MusicItem)])

        elif isinstance(item, gallery.PanoramaItem):
            print '''<APPLET archive="panoramen/ptviewer.jar" code="ptviewer.class" width=%(image_width)s height=250>
                    <PARAM name=file value="%(panorama_image)s">
                    <param name=auto value="-0.2">^M
                    <param name=antialias value="true">^M
                    </APPLET>
            ''' %{'panorama_image' : urllib.quote(item.path), 'image_width':image_width}

The above snippets would be the "webnail". For a thumbnail u can show a icon (Apache Icon) for example.

fallada@gmx.net


Simon - could you post some documentation on how to get the annotations in there please ? I tried creating attachments such as appear there in your sample gallery <imageName>.txt with the content but that didn't work.

andy

ok - now I know why I didn't know. Discovered a feature - if you only put one image in you don't get the entry field and rotate buttons :) (I didn't know they were there and wondered why you hadn't documented how to do it). Now you might say having only one image in is not a good way to use a gallery but consider if you want to make structures where you have one or two images here, larger groups there and so on .. one way to achieve that is to put a gallery on a page then include the page. I was playing with what it could do - and still we might want one image in a gallery so the annotation appears in the same style as other galleries in the same site.

andy


CategoryHomepage

SimonRyan (last edited 2006-07-21 21:11:22 by SimonRyan)