<> = arnica = arnica is based on the [[ParserMarket/Gallery2]] parser. It is an [[http://hg.moinmo.in/moin/1.7-extensions/|extension]] for MoinMoin >= 1.7.2. The arnica extension gives you the opportunity to organize images and present them in your wiki. It supports some basic image processing operations by enabling an optional tool set. The action arnica_slides is used to play a slideshow of the selected images. == Installation == Download the [[attachment:arnica-1.7.2beta5.zip]] package file and upload it to your wiki. You can install it using the install dialog going to Attachments. For further informations on packages see HelpOnPackageInstaller. After installation and configuration (see next topic) the wiki needs to be restarted except for cgi deployment. /!\ !CopyThemeFile of !PackageInstaller is currently just supported on standalone-like servers. Separate htdocs theme files [[attachment:htdocs_arnica-1.7.2beta5.zip]] === 1.8 installation === Since 1.8 moin supports multiple plugin directories, you can also, instead of downloading the zip files, just check out the repository: {{{ cd /some/where hg clone http://hg.moinmo.in/moin/1.7-extensions }}} and add the appropriate configuration option in wikiconfig of 1.8: {{{ plugin_dirs = ['/some/where/1.7-extensions/data/plugin'] }}} You still need to use the htdocs as above, but you can just symlink from the repository checkout into your web server's directory. == Configuration == The action and the parser are based on css. You have to enter the config var html_head into your wikiconfig.py. {{{ html_head = ''' ''' % {"url_prefix_static": DefaultConfig.url_prefix_static} }}} == Parameters == ||'''name'''||'''default'''||'''description'''|| ||target_page||u`''`||page to read attachments from. empty pagename is current page|| ||columns||4|| number of columns for thumbnails. columns=0 means thumbnails flow onto new line is needed thumbnails are aligned on top now|| ||file_regex||u'.'||regex for selecting images || ||image_for_webnail||False||if set then the image is shown instead of the webnail || ||show_text||True||default shows description || ||show_date||True||default shows date from exif header if available || ||show_tools||False||default does not show icon toolbar|| ||show_album_title||True||default does show album_title of album|| ||sort_by||name||sorts images by the name further options are alias, date|| ||reverse_sort||False|| if set, the file list is sorted in reverse order|| ||only_items||False||if set, only images which are described in listitem are shown || ||template_itemlist||False||if set, an item list is shown which could be copied into the wiki page || ||album||False||if set, selects album mode, only thumbnail from first image is shown, related is album title and album_image|| ||album_title||unicode||default is pagename of the images for the album.|| ||album_image||u`''`||image to show on album. default is the first image. || ||album_link_page||False||default links to slideshow, setting to True links to the page.|| ||renew||False ||if set then all selected thumbnails_* and webnails_* are removed and will be recreated|| ||thumbnail_width||128||default width of thumbnail || ||webnail_width||640||default width of webnail || == itemlist == {{{ * [[image1.jpg|alias]] * [[image2.jpg|alias]] }}} == Usage == * This parser can be called using the [[HelpOnProcessingInstructions|processing instruction]] `#format`. {{{ #format arnica }}} * or as parser {{{{{ {{{ #!arnica * [[image1.jpg|alias1]] * [[image2.jpg|alias2]] }}} }}}}} * or by its wrapper macro. {{{ <> }}} = Examples = == one item to define an alias for an image == {{{{{ {{{ #!arnica * [[100_1185.JPG| Bremen, SpaceCenter]] }}} }}}}} Result:: {{{#!wiki comment #!arnica file_regex=100_11[8-9][0-9] * [[100_1185.JPG| Bremen, SpaceCenter]] }}} {{attachment:result1.png}} == only thumbnails, only_items text and date surpressed, tools shown == {{{{{ {{{ #!arnica show_text=0, show_date=0, show_tools=1, columns=2, only_items=1 * [[100_1185.JPG| BremenSpaceCenter]] * [[100_1194.JPG| Bremen]] }}} }}}}} Result:: {{{#!wiki comment #!arnica show_text=0, show_date=0, show_tools=1, columns=2, only_items=1,file_regex=100_11[8-9][0-9] * [[100_1185.JPG| BremenSpaceCenter]] * [[100_1194.JPG| Bremen]] }}} {{attachment:result2.png}} == only_items by two columns, date supressed == {{{{{ {{{ #!arnica columns=2, only_items=1, show_date=0 * [[100_1185.JPG| Bremen, SpaceCenter]] * [[100_1187.JPG| SpaceCenter, space suit]] * [[100_1194.JPG| Bremen behind SpaceCenter]] }}} }}}}} Result:: {{{#!wiki comment #!arnica columns=2, only_items=1, show_date=0, file_regex=100_11[8-9][0-9] * [[100_1185.JPG| Bremen, SpaceCenter]] * [[100_1187.JPG| SpaceCenter, space suit]] * [[100_1194.JPG| Bremen behind SpaceCenter]] }}} {{attachment:result3.png}} == file_regex used, date supressed, one column == {{{{{ {{{ #!arnica columns=1, file_regex=100_118[0-5], show_date=0 }}} }}}}} Result:: {{{#!wiki comment #!arnica columns=1, file_regex=100_118[0-5], show_date=0 }}} {{attachment:result4.png}} == macro arnica == {{{ ||<>||<>|| }}} Result:: {{{{{#!wiki comment {{{ ||<>||<>|| }}} }}}}} {{attachment:result5.png}} == renew means always new thumbnails and webnails of selection == {{{{{ {{{ #!arnica only_items=1, show_date=0, show_tools=0, renew=1 * [[100_1189.JPG | Bremen]]] }}} }}}}} Result:: {{{#!wiki comment #!arnica only_items=1, show_date=0, show_tools=0, renew=1, file_regex=100_11[8-9][0-9] * [[100_1189.JPG | Bremen]] }}} {{attachment:result6.png}} == text and only_items and sort_by=alias == {{{{{ {{{ #!arnica show_text=1, show_date=0, columns=2, only_items=1, sort_by=alias * [[100_1185.JPG| Bremen, SpaceCenter]] * [[100_1194.JPG| Bremen]] }}} }}}}} Result:: {{{#!wiki comment #!arnica show_text=1, show_date=0, columns=2, only_items=1, sort_by=alias, file_regex=100_11[8-9][0-9] * [[100_1185.JPG| Bremen, SpaceCenter]] * [[100_1194.JPG| Bremen]] }}} {{attachment:result7.png}} == text and only_items and sort_by=date, reverse order == {{{{{ {{{ #!arnica show_text=1, show_date=1, columns=2, only_items=1, sort_by=date, reverse_sort=1 * [[100_1185.JPG| Bremen, SpaceCenter]] * [[100_1194.JPG| Bremen]] }}} }}}}} Result:: {{{#!wiki comment #!arnica show_text=1, show_date=1, columns=2, only_items=1, sort_by=date, reverse_sort=1, file_regex=100_11[8-9][0-9] * [[100_1185.JPG| Bremen, SpaceCenter]] * [[100_1194.JPG| Bremen]] }}} {{attachment:result8.png}} == template itemlist == {{{{{ {{{ #!arnica template_itemlist=True }}} }}}}} Result:: {{{#!wiki comment #!arnica template_itemlist=True, file_regex=100_11[8-9][0-9] }}} Copy the following listitems into the script. Replace alias with the label you want. Afterwards disable template_itemlist by setting it to False: {{attachment:result9.png}} == slide show == When you click on the slide show icon or an thumbnail the arnica_slides action is called. {{attachment:result10.png}}