About the Widget
To use this widget, all you have to do is include the HTML below on your page. It creates an iframe that, by default, displays 10 [ten] 25 pixel thumbnails of the most recent pictures (items) in the RSS Feed as an inline-div.
Listed below are the options which can be called to customize the widget:
» See some Widget calls that make use of the options above» Jump to the Widget Builder to test and customize your feed
- Number (of items/pictures) to Display | Add the following to the 'src' link &numtodisplay=## -- replacing '##' with the number of items you want displayed.
- Thumb Size | Add the following to the 'src' link &thumbsize=## (replacing '##' with the number of pixels tall you want the thumbnails to be. The default is 25 and the maximum is 200.
- Non Square Thumbs | By default, the widget makes square thumbs. Adding the following to the 'src' link will cause thumbs to be displayed as a standard height, allowing for various picture widths in the thumbs &square=FALSE.
- HTML Widget Spacing | By default, the Widget returns a row of pictures butting against one another, with no spacing between them. This option allows you to specify a number of pixels which will go between the pictures. To use this option, add the following to the 'src' link &htmlwidgetspacer=5 (for 5 pixels between pictures, adjust number as needed).
- NEW - Border Size and Color | The Widget uses no border by default. By specifying this option, you can set the size and color you wish your border to appear. To use these options, add the following to the 'src' link &bordersize=3 (for 3 pixel borders - adjust number as needed [px, em, or % are ignored]) and &bordercolor=red (standard web colors or hex [3-digit or 6-digit] with no '#' work).
- Link Options | The standard behavior of the Widget is to link to the image source defined in the RSS feed -- normally a 'photo' page, not the actual image source. This option allows you to disable links completely or request that the links attempt to open in a new tab/window. To use this option, add the following to the 'src' link &makelinks=no or &makelinks=external, respectively.
- Always Create Thumbs | By default, the widget creates a thumbnail and saves it for later use. If this needs to be overridden for some reason (causing thumbnails to be created each time the widget it called -- potentially slowing the page load), add the following to the 'src' link &alwayscreatethumbs=TRUE. (this is primarily used for debugging/troubleshooting)
Advanced PHP (updated 2013.09.02)
Due to the overwhelming preference for the HTML widget, public development of the php has all but ceased. I still maintain it, as it is the backbone for the website/html widget, but believe the interest barely warrants putlic upkeep. I'm thinking of (finally) using github, and may try to upload it there.
This is the most flexible solution available. It allows you to call a php function which will return an array containing information about the feed and each of the items in the feed, including the file location of the newly created thumbnails of the feed items. This gives you a great deal of flexibility, as you can do whatever you wish to the files at that point, styling them with CSS and displaying them as you see fit.
Here's how to get started
- Download the necessary files (pfd_getphotos_include.php, SimplePie/, Thumbs/, Cache/) and extract to your working directory. (updated to utilize php 5, SimplePie 1.3, and play nice [make thumbs] with PNG and GIF files)
- Include the following in your PHP code: include 'pfd_getphotos_include.php';
- In the config section of the above file, ensure that $localthumbs is set to FALSE. The other defaults should be fine.
- In your PHP code, call the function like this: $feedPhotos=getPhotos($photoFeedURL);
That's it. With the resulting array ($feedPhotos) from the function call above, you have access to quite a bit of information about the Feed. Try var_dump($feedPhotos) to see what the array contains, or have a look at pfd_getphotos_include.php for additional information (the top part is documented fairly well -- beware of the rest).
If you run into trouble, comment about it and I'll help out as quickly as I can. Consider this code in pre-alpha stage, so expect bugs especially if you get into anything fancy. The documentation is in the file, but was written more as margin notes for me than as a guide for the interested -- they will not be of much help. I'll try to clean up the documentation and code at some point.