Extension:FlickrSet
From MediaWiki.org
|
FlickrSet Release status: stable |
|
|---|---|
| Implementation | Tag |
| Description | Embed Image Viewer of Flickr photo-set in MediaWiki pages. Slideshow and Geotag are available. |
| Author(s) | Shohei Yokoyama |
| Last version | 1 (2010-07-06) |
| License | Creative Commons Attribution-ShareAlike 3.0 |
| Download | Original page |
| Example | Author's Wiki |
|
Check usage (experimental) |
|
Contents |
[edit] What can this extension do?
This extension is an image viewer for Flickr's photo-set. The main features are follows:
- Simple setting
- Just write <flickrset>Photo set id of Flickr</flickrset>
- Rich presentation
- Thumbnail List
- Slideshow
- Geotag (on Google Maps)
- Extra
- Banner-style link
[edit] Dependency
- This extension uses four external libraries.
[edit] Installation
[edit] HTTP_Request2
- Install HTTP_Request2
yum install php-pear-HTTP-Request2
[edit] Flickr API
- Get API key and secret
- Read terms of use
- Get key and secret
[edit] Ext.core
- Download Ext.core and install
- Ext.core download page
- Ex:
wget http://www.sencha.com/products/core/download.php?dl=extcore31
unzip ext-core-3.1.0.zip
cp ext-core-3.1.0/ext-core.js /path/to/the/mediawiki/script
unzip ext-core-3.1.0.zip
cp ext-core-3.1.0/ext-core.js /path/to/the/mediawiki/script
[edit] Google Maps v3 API
- Nothing to do
[edit] FlickrSet Extention
- Download FlickrSet extension and extract into the extensions/FlickrSet directory
wget http://shohei.yokoyama.ac/images/a/a1/Mediawiki_flickrset_v1.tar.gz
mkdir extensions/FlickrSet
tar -xvzf mediawiki_flickrset_v1.tar.gz -C extensions/FlickrSet
mkdir extensions/FlickrSet
tar -xvzf mediawiki_flickrset_v1.tar.gz -C extensions/FlickrSet
- Set permission for the cache directory
chmod 666 extensions/FlickrSet/cache
- or
chown apache:apache extensions/FlickrSet/cache
chmod 600 extensions/FlickrSet/cache
chmod 600 extensions/FlickrSet/cache
- Set Flickr API key and secret in FlickrSet.php
define("wfFLICKRSET_APIKYE", "abababababababababababababababab"); //<----Change!
define("wfFLICKRSET_SECRET", "cdcdcdcdcdcdcdcd"); //<--------------------Change!
define("wfFLICKRSET_SECRET", "cdcdcdcdcdcdcdcd"); //<--------------------Change!
- External JavaScript libraries' setting
// Google Maps V3 API
define("wfFLICKRSET_LOADGMAP",true); //If it is loaded by the other extension then set "false".
define("wfFLICKRSET_GMAPURL",'http://maps.google.com/maps/api/js?sensor=false');
// Ext core 3
define("wfFLICKRSET_LOADEXT",true); //If it is loaded by the other extension then set "false".
define("wfFLICKRSET_EXTPATH",$wgScriptPath.'/scripts/ext-core.js');//<---Change!
define("wfFLICKRSET_LOADGMAP",true); //If it is loaded by the other extension then set "false".
define("wfFLICKRSET_GMAPURL",'http://maps.google.com/maps/api/js?sensor=false');
// Ext core 3
define("wfFLICKRSET_LOADEXT",true); //If it is loaded by the other extension then set "false".
define("wfFLICKRSET_EXTPATH",$wgScriptPath.'/scripts/ext-core.js');//<---Change!
- Add this line at the end of LocalSettings.php
require_once "$IP/extensions/FlickrSet/FlickrSet.php";
- Try!
<flickrset>72157624120056693</flickrset>
/
[edit] Download
Alternatively you can download the file from the link here.
[edit] Usage
[edit] Image Viewer
- Create Image Viewer from Flickr photo-set
- Save the viewer source code into cache directory
- Load Image Viewer from cache
- Show the viewer
<flickrset>photo-set-id1</flickrset>;
[edit] Cache Control
- Basis
- If the viewer source code does not exist in cache directory then it is created using Flickr APIs. This process is complicated, takes some time to create cache.
- If the viewer source code exists in cache directory then the photo viewer is loaded from cache.
- Cache update
- Change plus/minus sign
- Ex.:
<flickrset>77777777777</flickrset> ⇒ <flickrset>-77777777777</flickrset>
- Ex.:
<flickrset>-77777777777</flickrset> ⇒ <flickrset>+77777777777</flickrset>
[edit] Image Viewer Secondary
- No cache creation
- No cache rebuild
- Show Image Viewer from cache
<flickrset2>photo-set-id1</flickrset2>;
[edit] Banner-style Link
- Create a banner from Flickr photo-sets
- Save the banner source code into cache directory
- Show the banner with a page-link
<flickrsetbanner>photo-set-id1,photo-set-id2,photo-set-id3.....|PageTitle|LinkText</flickrsetbanner>;
[edit] Examples and More Information
See my Wiki page for further examples and more information.
