Difference between revisions of "Extension talk:SimpleViewer.php"
From Organic Design wiki
m |
(progress so far) |
||
Line 1: | Line 1: | ||
+ | ==Example== | ||
+ | *http://mintmedia.co.nz/research/index.php/Mint_Media:Sandbox?action=purge | ||
==Installation== | ==Installation== | ||
*Create a folder called ''SimpleViewer'' inside your wiki ''extensions'' folder | *Create a folder called ''SimpleViewer'' inside your wiki ''extensions'' folder | ||
Line 18: | Line 20: | ||
Where the image names are replaced with the names of images you have uploaded to your wiki. | 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. | *Go to the test page. You should see the gallery appear. | ||
+ | ==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== | ||
+ | *Image thumbnail requests are sent a redirect header so it takes two HTTP requests instead of one to fetch each thumb and image (inefficient) | ||
+ | *Perhaps hook to ''ParserBeforeStrip'' to get around the fact that we don't have a parser object available at this stage. | ||
+ | *Parameters other than ''src'' in the parser function don't work | ||
+ | *Provide full control and pass all available parameters to SimpleViewer via parser params | ||
+ | *''file_get_contents with HTTP wrappers is used to obtain the HTML of the image article contents to display when the image is clicked (inefficient) | ||
+ | *Thumb and image sizes are currently hard-wired are ready to be hooked in with params |
Revision as of 09:41, 2 April 2008
Contents
Example
Installation
- 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
- 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
- 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
- Image thumbnail requests are sent a redirect header so it takes two HTTP requests instead of one to fetch each thumb and image (inefficient)
- Perhaps hook to ParserBeforeStrip to get around the fact that we don't have a parser object available at this stage.
- Parameters other than src in the parser function don't work
- Provide full control and pass all available parameters to SimpleViewer via parser params
- file_get_contents with HTTP wrappers is used to obtain the HTML of the image article contents to display when the image is clicked (inefficient)
- Thumb and image sizes are currently hard-wired are ready to be hooked in with params