TheMeyers.org Geek

July 6, 2009

WP-Phanfare plugin

Filed under: Uncategorized — admin @ 2:04 pm

This Wordpress plugin integrates your Phanfare images into any of your Posts or Pages. (Note: I started with the code from WP-SmugMug, and modified it to use the RSS feeds from Phanfare) Example Here are the first 4 images from a public feed of mine:

Example Album

The description text

Download WP-Phanfare:

Please download directly from wordpress. Here is an example of linking to the Phanfare Slide show.  Clicking on any of the following images will bring up the slideshow.

Installation Instructions:

  1. Download the plugin archive and expand it
  2. Place the ‘wp-phanfare’ folder into your wp-content/plugins/ directory. This directory should contain 2 files:
    • wp-phanfare.php
    • wp-phanfare.js
  3. Go to the Plugins page in your WordPress Administration area and click ‘Activate’ for WP-Phanfare.

Usage Instructions: After installation and activation, a panel labeled “WP-Phanfare” will appear at the bottom of your Wordpress Page or Post edit screen.  You can use this panel to create an shortcode command to fetch and display your Phanfare images.

WP-Phanfare_edit_panel

The Edit Panel has several options which you then fill in.

  • Phanfare RSS URL (required)
    • Read instructions below on how to get the Phanfare RSS feed for a given album.
  • Title (optional)
    • The entered text will be displayed centered, above your images.
  • Description (optional)
    • The entered text will be displayed centered, below the title, above the images.
  • Start with image number: (default = 1)
    • Use this to skip images
  • Number of images to display: (default = all)
    • How many thumbnails to display
  • Thumbnail size:
    • Phanfare creates 2 sizes of Thumbnail (79×119, 30×45)
  • Image size:
    • Phanfare has multiple sizes available
  • Clicking on Image, displays:
    • When an images is clicked, what will be displayed.
  • Checkbox Options:
    • Display any image captions.
    • Open all links, in a new browser window
    • Display a link to this Phanfare album, below the images.

WP-Phanfare Settings Panel (for defaults) From the Wordpress Administration Dashboard, in the left-bar, click on Settings, then WP-Phanfare.  Using this Panel, you can setup the default settings to be used when editing a Post or a Page. WP-Phanfare_Admin_Settings

In this Admin Settings Panel, there a few more options available:

  • SimplePie Cache Duration (in seconds, Default is: 3600, 60 minutes)
  • Advanced options
    • XHTML tag used to enclosed the title: (default is h4)
    • Custom CSS:
    • Custom CSS for (Internet Explorer V7 and earlier)

How to retreive your Phanfare RSS Feed URL

  • Using the Phanfare Web Interface:

  1. From Home page, click on the “Quick LinkEdit Albums
  2. Select the album for which you want the RSS feed URL.
  3. On the Action bar, click on Share Album
  4. Click on RSS Feed,  the browser will now display the contents of the feed
  5. Grab the URL from the Browsers location bar.
  6. The URL should look something like: http://www.phanfare.com/rss/media/1234567_1_4134321_d47a3e99
    • If it starts with feed://, change to http://
  7. Paste this string into the Phanfare RSS URL field
  • Using the Phanfare Client Application:
    1. In the Mac OS X version of the Client, I am not sure one can find the RSS Feed URL?

To Do List

  • Verify that the put phanfare album link at bottom, actually works?  I don’t think so.
  • Verify that we properly handle Cache Duration of zero (ie. no Cache)

Version History

  • Future ideas
    • Expose the cache directory location in the Settings panel
    • Allow for customization of optional text at bottom of thumbnail display
    • (harder, but possible) Preload lightbox slideshow with all Feed images, even if the User only chooses to display a few thumbnails
    • Allow for customization of thumbnail size…
  • V1.2.10
    • Another oops! (Teaches me to do updates just before dinner!) Didn’t handle older thumbsize option values properly
  • V 1.2.9
    • Ooops! forgot to include the new OptionsClass.php file!
  • V 1.2.8
    • Properly fixed problem with creation of cache directory.  Now relative to wordpress installation, should more gracefully handle not being able to create or write to the directory.
    • Removed imagename caption, in Lightbox display (now shows untitled)
    • Created a new thumbnail size L (179×119), the choices are Tiny, Regular, Large
    • Cleaned up the original code to NOT create multiple wp-phanfare options in wordpress DB.  Instead create a single multi-value option record.  This makes the code cleaner, removes database clutter, allows for easier expansion in the future.
  • V 1.2.7
    1. Fixed a problem reporting cache directory creation errors (on the actual display page)
    2. Noticed that the RSS feed was being sorted (by date of each entry “image”). Removed any sorting, so images will appear in “album” order.
    3. The Phanfare RSS feed seems to use the image filename “IMG_1234.jpg” when there is no caption.  This clutters the display, so for now, when captions are desired, the plugin only displays “non-image-filename” captions.  (Meaning if the caption matches “IMG_n+.jpg” or just ends in “.jpg” it is assumed to be a filename, and not displayed as a caption.
  • Thanks to User Jeff for letting me know about these problems
  • I plan to roll out a version (in the future) with an updated Settings panel to allow more control of cache location, sorting of RSS feeds, and display of Image filenames in captions.
  • V 1.2.6
    • Fixed reported problem with wp_phanfare_cleanup() at line 268.  Caused by improper reference to class function.
  • V 1.2.5
    • Fixed footer “View album at Phanfare” to be correct url!
    • Cleaned up cache duration field validation.
  • V 1.2.0
    • Added Checking for WP version & requisite plugins (SimplePie & jQuery Lightbox) at Activation with proper error message
    • Updated screenshot for Admin Settings Panel (shows Cache Duration)
  • V 1.1.0
    • no code change
    • Documentation improved
    • added in the Requirements for SimplePie-Core and jQuery LightBox
    • Finally got screenshots working on WordPress.org site.
  • V 1.0.0 - based on WP-SmugMug written by Adam at tow.com

7 Comments »

  1. Any idea how to fix / work-around this error?

    Fatal error: Call to undefined function wp_phanfare_cleanup() in /home/dirname/public_html/sitename/wp-content/plugins/wp-phanfare/wp-phanfare.php on line 268

    Comment by Jeff — September 6, 2009 @ 1:08 pm

  2. Can you give me more information on how (or when) the error showed up? I want to try and re-create the problem myself, so I can fix it!

    Thank you for letting me know,

    Craig

    Update: Never mind, I looked at the code, and see the problem. Had you un-installed, and then re-installed this plugin?

    I will get a fix in, and let you know when it is up on WordPress.org

    Comment by admin — September 6, 2009 @ 1:39 pm

  3. I found the error, and fixed it, there is a new Version 1.2.6 on wordpress.org http://wordpress.org/extend/plugins/wp-phanfare/

    Sorry for the problems.

    Craig

    Comment by admin — September 6, 2009 @ 2:44 pm

  4. Thanks for a great plugin.

    Now that Phanfare supports video from the iPhone 3GS do you have any plans to add video support to the Wordpress plugin?

    Thanks,

    Joe.

    Comment by Joe Perrin — September 19, 2009 @ 1:04 am

  5. When activating this plugin I get the following messages:

    Warning: mkdir(wp-content/plugins/wp-phanfare/cache) [function.mkdir]: No such file or directory in /nfs/c01/h12/mnt/9508/domains/acmedomain.com/html/wp-content/plugins/wp-phanfare/wp-phanfare.php on line 427

    Warning: Cannot modify header information – headers already sent by (output started at /nfs/c01/h12/mnt/9508/domains/acmedomain.com/html/wp-content/plugins/wp-phanfare/wp-phanfare.php:427) in /nfs/c01/h12/mnt/9508/domains/acmedomain.com/html/wp-includes/functions.php on line 784

    Warning: Cannot modify header information – headers already sent by (output started at /nfs/c01/h12/mnt/9508/domains/acmedomain.com/html/wp-content/plugins/wp-phanfare/wp-phanfare.php:427) in /nfs/c01/h12/mnt/9508/domains/acmedomain.com/html/wp-includes/functions.php on line 785

    Please advise.

    Thanks,

    Joe.

    Comment by Joe Perrin — September 19, 2009 @ 2:05 am

  6. Joe,

    Thanks for letting me know. I have fixed this problem in the latest release V1.2.10. Please update, and the problem should be gone.

    If you have more questions, please let me know,

    Thanks,

    Craig

    Comment by admin — September 21, 2009 @ 7:01 pm

  7. Had install error on line 185. installed plugin on godaddy, (then) tried uninstall, got the following error;

    Fatal error: Call to undefined function: fprintf() in /home/content/j/o/c/jocampbe/html/hockey/wp-content/plugins/wp-phanfare/wp-phanfare.php on line 185

    Thanks for any help. I’ve got a ton of pics/videos I’d like to use on phanfare. thanks

    Comment by John Campbell — September 25, 2009 @ 11:26 am

RSS feed for comments on this post. TrackBack URL

Leave a comment

Powered by WordPress

Bad Behavior has blocked 5 access attempts in the last 7 days.