Contents
ImageBrowser macro
LlubNek - <llubnek AT gmail DOT com>
Description
Uses the Thumbnail action from MacroMarket/Thumbnail. You can easily use this without it but it won't look as nice and will take longer to load large images.
I might make a skinnable version later or change the way parameters work, but for now, this is what I've got:
Download & Release Notes
ImageBrowserContent
Download |
Release Version |
Moin Version |
Release Notes |
0.4 |
1.6 |
Automatically detects if Thumbnail action is installed. |
|
0.3 |
1.6 |
Opens a new window when clicking on the image itself or the view or edit button. |
|
0.2 |
1.6 |
Uses "float:left" CSS to allow text to flow to the right. Use MacroMarket/Clear to place text below instead of beside. The frame and button images are now stored in htdocs/<theme>/img/imgbrwsr instead of htdocs/common/imgbrwsr. Fixed bug after ?action=edit&backto=PageName |
|
0.1 |
1.5 |
Does not work for 1.6, use version 0.2 or higher |
ImageBrowser & ImageBrowserNoLoad
Download |
Release Version |
Moin Version |
Release Notes |
|
1.5 |
Does not work for 1.6 (probably...) |
|
|
1.5 |
Does not work for 1.6 (probably...) |
|
|
|
Found on the MacroMarket page during cleanup -- JordanCronin 2008-01-30 18:50:13 |
|
|
|
Found on the MacroMarket page during cleanup -- JordanCronin 2008-01-30 18:50:13 |
Example
ImageBrowserContent Macro
MoinMoin - ImageBrowserContent Macro Version 0.4 An image browser with a content panel which avoids surge protection [[ImageBrowserContent(index, file0, file1, ...)]] [[ImageBrowserContent(file0, file1, ...)]] [[ImageBrowserContent(index)]] [[ImageBrowserContent]] Where index is the 0 based index of the image to show by default, and file0, file1, ... are the images to display If omitted, index defaults to 0 (the first image) and file0, file1, ... defaults to all image attachments on the current page. @copyright: 2007 by Kenneth Bull @license: GNU GPL, see COPYING for details.
Click on <<, <, > and >> to navigate through the images. Click on the image itself to view the image at full size. Click on the three triangles to the right of the image to show/hide the content panel. Click on E or V to edit the page associated with an image or view it as a normal wiki page.
The text shown in the content panel is a subpage of the page containing the image. For example, the image something.png on the page PictureGallery would be associated with the page PictureGallery/something.png.
ImageBrowserNoLoad
does not work for 1.6 (probably...) ImageBrowserNoLoad.zip
MoinMoin - ImageBrowserNoLoad Macro Version 0.1 An image browser which avoids surge protection. [[ImageBrowserNoLoad(index, file0, file1, ...)]] [[ImageBrowserNoLoad(file0, file1, ...)]] [[ImageBrowserNoLoad(index)]] [[ImageBrowserNoLoad]] Where index is the 0 based index of the image to show by default, and file0, file1, ... are the images to display If omitted, index defaults to 0 (the first image) and file0, file1, ... defaults to all image attachments on the current page. Comment line 69 and uncomment 70 if you don't want to use the Thumbnail action (Javascript comment, not Python). @copyright: 2007 by Kenneth Bull @license: GNU GPL, see COPYING for details.
Click on <<, <, > and >> to navigate through the images. Click on the image itself to view the image at full size.
ImageBrowser
does not work for 1.6 (probably...) ImageBrowser.zip
MoinMoin - ImageBrowser Macro Version 0.1 An image browser. [[ImageBrowser(index, file0, file1, ...)]] [[ImageBrowser(file0, file1, ...)]] [[ImageBrowser(index)]] [[ImageBrowser]] Where index is the 0 based index of the image to show by default, and file0, file1, ... are the images to display If omitted, index defaults to 0 (the first image) and file0, file1, ... defaults to all image attachments on the current page. Comment line 99 and uncomment 100 if you don't want to use the Thumbnail action (Javascript comment, not Python). @copyright: 2007 by Kenneth Bull @license: GNU GPL, see COPYING for details.
Click on <<, <, > and >> to navigate through the images. Click on the image itself to view the image at full size.
ImageBrowserGenerator
Description
This action generates the code and content for a PHP image browser. This is probably useless to anybody but me and the company I'm working for, but if you want to try and make use of it, go ahead.
Download & Release Notes
Download |
Release Version |
Moin Version |
Release Notes |
|
1.5 |
|
|
|
1.5 |
|
MoinMoin - imgbrwsrgen Action Version 0.1 Generates the various components of a PHP or HTML image browser. @copyright: 2007 by Kenneth Bull @license: GNU GPL, see COPYING for details.
Bugs
Discussion
Very cool! I like that. Looks also great. What's the difference between those three image browsers? Didn't get that. ImageBrowserContent is an Extention of ImageBrowserNoLoad. But ImageBrowseer? -- OliverSiemoneit 2007-08-17 20:41:30
ImageBrowser preloads images so that there's no delay when switching from one image to the next. Unfortunately, it also tends to trigger surge protection if you have a lot of images. -- LlubNek 2007-08-21 15:20:39
Can anyone explain why this macro doesn't work on this page? http://Gnarlodious.com/SantaFe -- Gnarlodious 2007-08-27 22:54:58
You need to either install ImageMagick and the Thumbnail macro at MacroMarket/Thumbnail or comment out line 119 and uncomment line 120 in data/plugin/macro/ImageBrowserContent.py. Use // (javascript) not # (python). -- 76.66.63.103 2007-08-28 06:02:35
Thanks, that wasn't entirely clear in the instructions. -- Gnarlodious 2007-08-28 17:39:53
Tried installing ImageBroswerContent on version 1.7.2. First got an error that AbsPageName takes two arguments, but three were given. Looked at its syntax in wikiutil.py and removed the first argument. Then got an error that Request object has no attribute makeUniqueID. Any ideas how to fix this? -- AlexanderAgibalov 2008-12-26 07:52:18
see MoinMoin.request.__init__.make_unique_id. If you patch it please upload a new version including your patch. -- ReimarBauer 2008-12-26 08:44:35
Thanks for the hint! Here's the patch: -- AlexanderAgibalov 2008-12-29 07:14:27
--- ImageBrowserContent_orig.py 2007-08-28 18:25:48.000000000 +0400 +++ ImageBrowserContent.py 2008-12-29 10:00:22.333054700 +0300 @@ -62,7 +62,7 @@ def getPageContent(request, formatter, pagename): _ = request.getText - inc_name = wikiutil.AbsPageName(request, formatter.page.page_name, pagename) + inc_name = wikiutil.AbsPageName(formatter.page.page_name, pagename) this_page = formatter.page if not hasattr(this_page, '_macroInclude_pagelist'): @@ -88,8 +88,8 @@ strfile = StringIO.StringIO() request.redirect(strfile) try: - cid = request.makeUniqueID("Include_%s" % wikiutil.quoteWikinameURL(inc_page.page_name)) - inc_page.send_page(request, content_only=1, content_id=cid, + cid = request.make_unique_id("Include_%s" % wikiutil.quoteWikinameURL(inc_page.page_name)) + inc_page.send_page(content_only=1, content_id=cid, omit_footnotes=True) finally: request.redirect()