Flickr plugin

This is a simple Flickr plugin for Geeklog. All it does right now is to provide autotags.

[flickr:] will display a photo's thumbnail which links to the actual photo page on Flickr.

[flickr_gallery:] will embed super flexible galeries from any flickr account or group, using different parameters to customise it.

[flickr_slideshow:] will embed the same super slideshow that you can see on flickr site.

This is the documentation page and you could also visit the demo page.

Usage

[flickr:] autotag

Once installed (see below), all you need to include a photo thumbnail in your stories or comments is the photo's id. When viewing a photo on flickr.com, you'll notice the URL looks something like this:

http://www.flickr.com/photos/dhaun/1512521418/

So here “1512521418” is the photo's id. Now you simply add that id in the [flickr:] autotag after the colon:

Another beach

[flickr:1512521418 size:square]

Another beach

[flickr:1512521418 size:thumbnail]

Another beach

[flickr:1512521418 size:small]

Another beach

[flickr:1512521418 size:medium]

When the story (comment, …) is displayed, it will show the photo's thumbnail instead of the autotag. Clicking on the thumbnail will take you to the photo page on flickr (the above URL, in this example).

The plugin will get the photo's title from Flickr and display it as a title attribute when you hover your mouse over the thumbnail. If you'd rather provide your own title, simply enter it after the id:

Vamos a la playa

[flickr:1512521418 size:square Vamos a la playa]

New with flickr plugin 1.3: If you do not provide parameter, the thumbnail will be replace by the picture title or your alternate title.

Another beach | La playa

[flickr:1512521418] | [flickr:1512521418 La playa]

Extended Syntax

You can also change the alignment of the image: What's this country?

[flickr:1512521418 align:right size:small What's this country?]

The “align:” attribute accepts “left” and “right” as alignments.

The “size:” attribute accepts “square”, “thumbnail” (which is the default when no size is given), “small”, and “medium”.

The order of the two attributes doesn't matter, but they have to be listed before the photo's title text.

Caching

Please note that using [flickr:] autotags may significantly slow down your site, as the plugin will have to do 2 Flickr API calls for every thumbnail. And then your browser will do another request to get the actual thumbnail image.

Fortunately, phpFlickr provides caching to minimize the number of requests.

Two types of caching are provided: In the database or on the filesystem. Database caching is faster but requires the PEAR::DB package to be installed (not included with this plugin). Filesystem caching will store cache files on your webserver's filesystem (in Geeklog's “data” directory, unless changed in the plugin's config.php).

To enable caching, set 'Use cache' to true and then select either 'database' or 'filesystem' for the cache type. There are more configuration variables that let you choose the expiration timeout for cached items, the name of the cache table, and the location of the cache files. See the plugin's online config (new in version 1.1.0) for details.

[flickr_gallery:] autotag

The first parameter is the thumbnail limit. flick_gallery:5 will show 5 thumbnails.

The second parameters are optional

A last optional parameter allow you to add a caption. Every text before the closing bracket will be use as the caption gallery.

Autotag flickr_gallery | [flickr_gallery:48 tags:green Green is the color]

[flickr_slideshow:] autotag

The first parameter is the flickr user ID.

Optional parameters allow you to specify:

Autotag slideshow | [flickr_slideshow:21913923@N03 width:100% height:400]

Installation

With Flickr plugin 1.3.0+ you will need to install jQuery plugin before you can install the Flickr plugin.

Automatic install

1. As one of your site's Root users

2. If the installation completed successfully you are ready to go. Otherwise, check the geeklog error.log for errors.

Manual install

1. Unpack the tarball in /path/to/geeklog/plugins/ (or unpack it on your PC and then upload the “flickr” folder to that directory)

2. Rename the “admin” folder to “flickr” and move it to /path/to/geeklog/public_html/admin/plugins/

3. Log into your site as the Admin user, select “Plugins” from the “Admins only” block, find the “flickr” entry and click on “install”

4. There's no step 4 - the plugin should be ready for use now. Check that you have a [flickr:] autotag in the list of available HTML tags when you create a new story or comment.

Upgrade

To upgrade from an earlier version, please upload all the files from this archive to their respective location, replacing the older versions of the same files or use the automatic way (see Automatic install above).

Once you've done that, log into your site as a member of the Root group (e.g. as user Admin). Go to the Admin's “Plugins” panel.

You can upgrade just by clicking the icon “Update” or click on the “edit” link for the Flickr plugin. You will be presented with an “Update” button. Click that button and you should get a message that the upgrade was successful. That's all.

Configuration

With Flickr plugin version 1.1.0 the plugin configuration is now online. Visit {site_url}/admin/configuration.php

Cache

See caching above.

jQuery

Use CND for jQuery library : Use google as a content network delivery for jQuery or use the javascript included file version (ver. 1.4)

Theme

Mini gallery pictures format : Could be square (default), Thumbnail (100px), Thumbnail (240px), Thumbnail (500px), Thumbnail (640px), Thumbnail(1024px), Original.

Changelog

Version 1.2 July 17th 2011

Version 1.1.1 Feb. 2010

Version 1.1.0 Feb. 2010

Version 1.0.0

Version 0.2.0

Version 0.1.2

Version 0.1.1

Version 0.1.0

Know Issues

Update from version 0.2.0 do not create the settings config. Delete and install the plugin again will solve this.

Authors