Extension:FlickrSet

From MediaWiki.org
Jump to navigation Jump to search
MediaWiki extensions manual
Crystal Clear action run.svg
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
Latest version 1 (2010-07-06)
License Creative Commons Attribution-ShareAlike 3.0
Download Original page
Example Author's Wiki
Translate the FlickrSet extension if it is available at translatewiki.net
Check usage and version matrix.

What can this extension do?[edit]

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

Dependency[edit]

Installation[edit]

HTTP_Request2[edit]

  • Install HTTP_Request2
    yum install php-pear-HTTP-Request2

Flickr API[edit]

Ext.core[edit]

    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

Google Maps v3 API[edit]

  • Nothing to do

FlickrSet Extention[edit]

  • 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
  • Set permission for the cache directory
    chmod 666 extensions/FlickrSet/cache
  • or
    chown apache:apache 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!
  • 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!
  • Add this line at the end of LocalSettings.php
    require_once "$IP/extensions/FlickrSet/FlickrSet.php";
  • Try!
    <flickrset>72157624120056693</flickrset>

/

Download[edit]

Alternatively you can download the file from the link here.

Usage[edit]

Image Viewer[edit]

  • 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>;

Cache Control[edit]

  • 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>
      

Image Viewer Secondary[edit]

  • No cache creation
  • No cache rebuild
  • Show Image Viewer from cache
    <flickrset2>photo-set-id1</flickrset2>;

[edit]

  • 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>;

Examples and More Information[edit]

See my Wiki page for further examples and more information.