FlickrFeed

From e107 Wiki

Jump to: navigation, search

Contents

FlickrFeed

a plugin by nlstart.

FlickrFeed v1.2 is out since December 24, 2008.

(initial version published August 5, 2008)

FlickrFeed is a simple plugin to integrate Flickr photo streams into e107.

Purpose of the FlickrFeed plugin

  • GOAL: integrate unlimited Flick photo streams in e107.

Latest version

version v1.2

Prerequisites

E107 core v0.7.7 (or newer) installed.

Support

Download: FlickrFeed download

Download mirror: FlickrFeed download mirror on plugins@e107.org

Forum: FlickrFeed forum

Bugs: FlickrFeed bug reports

Requests: FlickrFeed requests

Installation

  • a. Upload FlickrFeed files into your 'e107_plugins' folder. Although 'Upload plugin' from the Admin section might work, uploading your files by using an FTP client program is recommended.
  • b. When working on Linux or Unix based server set the CHMOD settings of directories to 755 and set CHMOD of all .php files to 644.
  • d. Login as an administrator into e107, go to Plugin Manager, install FlickrFeed
  • e. Go to Admin area > FlickrFeed > Configuration and create settings for a menu.
  • f. Go to Admin area > Menus and activate the FlickrFeed menu in one of your areas.
  • f. Additionaly; go to a text field with BBcode enabled (can be found in news, forums, custom page/menu etc) and use the flickrfeed BBcode.

Updates

Not applicable; no database updates since v1.0!

Important background information

With the FlickrFeed plugin you can integrate Flickr photo streams in your e107 website. Not just in a menu, but site wide! After installation there is a flickrfeed BBcode icon added that allows you to add FlickrFeed in news items, custom pages, forum threads, etc.

The plugin also supports a number of settings.

  1. $num_items - how many photos you want to appear
  2. $type - specify user, set, favorite, group or community photo stream
  3. $tags - a comma separated list of tags (with no spaces)
  4. $imagesize - square, thumbnail, medium or large
  5. $before_image - html appearing before each photo
  6. $after_image - html appearing after each photo
  7. $id_number - specify a user id (or group name)
  8. $set_id - specify the set id (found in set url), only with type 'set'


How to use the BBcode

You can simply create a new menu with Admin area > Custom page > Create new menu. Give the menu a title, use the flickrfeed BBcode in the text field. Save the menu. Go to Admin area > Menus and select your newly created menu. Go to your home page and the requested Flickr photo stream should be visible.

You can use it in any text field that accepts BBcode (usually visible by the presentation of the BBcode icons underneath the text field).

Example 1

FlickrFeed (with admin settings: num_items=5, type="community", tags="amsterdam,people")

This would show the 5 most recent public photos tagged with amsterdam and people.

Use BBcode:

[flickrfeed=5|community|amsterdam,people][/flickrfeed]

Example 2

FlickrFeed (with admin settings: num_items=8, type="set", tags="", image_size="thumbnail", before_image="< l i >", after_image="< / l i >", id_number"44124462494@N01", set_id="72157601681097311")

This would show the 8 most recent thumbnail sized photos from the specified user's set, each foto wrapped in list tags.

Use BBcode:

[flickrfeed=8|set||thumbnail|<li>|</li>|44124462494@N01|72157601681097311][/flickrfeed]

Example 3

FlickrFeed (with admin settings: num_items=5, type="group", tags="", image_size="square", before_image="", after_image="", id_number="34427469792@N01")

This would show the 5 most recent square sized photos from the FlickrCentral (Pool) group.

Use BBcode:

[flickrfeed=5|group||square|||34427469792@N01|][/flickrfeed]

Example 4

FlickrFeed (with admin settings: num_items=4, type="user", tags="nlstart", image_size="square", before_iamge="", after_image="", id_number="28720982@N06")

This would show the 4 most recent square sized photos tagged with 'nlstart' of user NLSTART (id = 28720982@N06).

Use BBcode:

[flickrfeed=4|user|nlstart|square|||28720982@N06|][/flickrfeed]


Changelog

  • 1.2 - Bugfix release (December 24, 2008)
  •     - class_flickrfeed.php: renamed function flickrfeed to get_flickrfeed (to prevent from PHP 5.2.8 Fatal error: Non-static method)
        - flickrfeed.bb: changed call for function flickrfeed into get_flickrfeed
        - flickrfeed_menu.php: changed call for function flickrfeed into get_flickrfeed
        - readme.txt: corrected example 4
        - plugin.php: fixed upgrade to 1.2
    
  • 1.1 - Bugfix release (06 August, 2008)
  •     - admin_config.php: made Flickr display type and image size language independent
        - class_flickrfeed.php: fixed language error message
        - class_rss_feed.php: fixed error "Could not open a feed called" that could break a complete forum thread
        - plugin.php: fixed upgrade to 1.1
        - English.php: adjusted error message and added some language tags for admin_config.php
    
  • 1.0 - Initial release (05 August, 2008)

Future roadmap

  • actually monitor the buglist
  • monitor what features end users want

Technical aspects

Directory Structure

After a straight installation of FlickrFeed the directory structure in the e107_plugins folder should be as follows:

 e107_plugins
     |- flickrfeed
             |- images
             |- languages

  • The images folder contains the images 'logo_16.png' and 'logo_32.png' which are called by plugin.php
  • The languages folder contains default language file English.php with all terms used by all modules of this plugin

Plugin Modules

The plugin consists of nine different files forming one integrated module. Each .php file contains a standard set of instructions to run properly under e107. The plugin files are heavily commented in order to show starting plugin developers why certain things are done.

admin_config.php

Task is to display and store the current plugin settings. A valid e-mail address is mandatory.

admin_menu.php

Task is to show the administator menu.

admin_readme.php

Task is to show the readme.txt from the menu.

class_flickrfeed.php

Generic function class to call the flickrfeed BBcode.

class_rss_feed.php

Generic function class to call the RSS stream from Flickr.

e_bb.php

Task is to support the BBcode for flickrfeed.

flickrfeed.bb

Task is to perform the actual BBcode for flickrfeed.

flickrfeed_menu.php

Task is to present a simple menu with flickrfeed with values from the configuration file.

help.php

Task is to display help text on the left side column of the administrator menu.

plugin.php

General set-up of e107 plugin to tell e107 Plugin Manager where files reside, which logo to use, etc.

readme.txt

Not really a module but called by admin_readme.php to display all relevant plugin background info, installation instructions etc.

Personal tools