Extension talk:SimpleViewer.php

From Organic Design wiki
Revision as of 22:07, 7 April 2008 by Rob (talk | contribs) (Features)

This extension is designed to integrate the SimpleViewer flash gallery into MediaWiki. SimpleViewer is available for use free of charge for commercial and non-commercial purposes.

Example

Features

  • A nice flash gallery to display images in your wiki
  • Uses MediaWiki's image resizing functions so no extra work is required to resize images - that they are uploaded to the wiki is enough
  • Integrates with other wiki extentions such as Dynamic Page List to provide dynamic galleries based on category, namespace, image name, user or any other query provided by DPL.
  • Uses a standard script to detect the flash browser plugin
  • Fetches the content of the image article and provides this text as a caption when then image is displayed in the gallery. This text may contain links and all the normal HTML markup supported by flash.

Installation

Note.svg Note: MW:Extension:SyntaxHighlight GeSHi contains nice concepts for installation in conjunction with third party software


  • Create a folder called SimpleViewer inside your wiki extensions folder
  • Download the SimpleViewer.php script
  • Save the script into the SimpleViewer folder as SimpleViewer.php
  • Download the SimpleViewer flash application from Airtight Interactive
  • Unpack the zip and save the resulting simpleviewer folder inside exensions/SimpleViewer
  • Make sure all the files are readable by the web server. On most hosting platforms this means giving them a Unix mode of 755 - making them readable by everybody.
  • Add this line to LocalSettings.php
require('$IP/extensions/SimpleViewer/SimpleViewer.php');
  • Check that the extension in installed by looking at Special:Version on your wiki. SimpleViewer should appear under Parser hooks
  • Create a test page containing the text:
{{simpleviewer:src=Gallery test}}
  • Create an article called Gallery test with the content
*Image:Foo.jpg
*Image:Bar.jpg
*Image:Pic.jpg

Where the image names are replaced with the names of images you have uploaded to your wiki.

  • Go to the test page. You should see the gallery appear.

Bugs

  • Parameters other than src in the parser function don't work

Fixed bugs

  • Does not parse wikitext of gallery src article so DPL queries and templates will not work as expected
  • For some reason the head script containing swfobject.js only seems to load when action=purge other wise the non-flash message is displayed.

Further work

  • Allow in-line specification of images so that a separate article is not required. Also support DPL to do this.
  • Image thumbnail requests are sent a redirect header so it takes two HTTP requests instead of one to fetch each thumb and image (inefficient)
  • Provide full control and pass all available parameters to SimpleViewer via parser params
  • Thumb and image sizes are currently hard-wired. Provide a heiristic to send appropriate parameters to thumb.php based on the regular SimpleViewer parameters