In 2011, I started with this photography website by combining the image archiving and e-commerce capabilities of PhotoShelter and Wordpress's publishing platform.
One of things things I wanted to do, was displaying galleries of images as hosted on PhotoShelter in pages, posts and sidebars within Wordpress. I could obviously achieve something similar by manually adding recent images to a gallery and using a slideshow to display them. I wanted something more dynamic however, something that reads a RSS feed and displays the image thumbnails as found in the feed as a gallery.
While hunting for a standard solution, I decided to try and create a widget myself, geared specifically towards PhotoShelter. It's never to late to learn something new and it actually worked out!
A new version of the NiO PhotoShelter RSS Gallery Widget (1.5.5) was released on July 14th 2017. This new version deals with the consequences of PhotoShelter moving to SSL. In addition, the new version now is PHP7 compatible!
What the widget does
The NiO PhotoShelter RSS Gallery widget creates dynamic thumbnail galleries of images recently added to a PhotoShelter in general or to a specific gallery. It does this, by reading either the general PhotoShelter RSS feed (for instance: 'https://niophoto.photoshelter.com/?feed=rss'), the RSS feed of a specific PhotoShelter Gallery or the RSS feed of a PhotoShelter search. The thumbnail galleries are automatically updated each time an image is made searchable respectively is added to a specific gallery at PhotoShelter.
- Add a header and description to the gallery, if these are specified.
- Automatically add hyperlinks to the thumbnails that link back to the source images as archived at PhotoShelter.
- Automatically add the IPTC title and photographer name to the "title" tag of the thumbnail. This title appears on hovering the thumbnail. It can however also be fixed for all images (for instance as "Image by NiO Photography").
- Automatically add the IPTC keywords of the original image to the "alt" tag of the thumbnail, to help improve SEO.
- Style the gallery and its thumbnails via parameters or via CSS styles. It is for instance possible to:
- Set the size of the thumbnails and specify if they need to be square or if you want to fix the height.
- Determine whether a high quality thumbnail with a watermark should be used or a small lower quality thumbnail without a watermark.
- Set the background color, border, width and padding of the thumbnail gallery as a whole as well as the background color, border, width and padding of each individual thumbnail.
- Tentatively create a caption for each thumbnail based on the IPTC title or IPTC caption of the source image.
The widget can be used multiple times, based on different RSS feeds, on a single page.
The NiO PhotoShelter RSS Gallery widget is written in PHP and uses the PHP extensions SimpleXML and Xpath to read RSS feeds and a secure version of TimThumb to process thumbnails. The widget can be installed on any domain server that supports PHP5 and Curl.
The widget was primarily designed for use with Wordpress (in posts, pages and text widgets) as well as Joomla (in articles and modules). For both, a plug-in will need to be activated to allow the use of PHP. Obviously the widget code can also be included in any PHP document even if Wordpress or Joomla are not used. In addition, it can be used on pages without PHP support, for instance PhotoShelter, by using an Iframe based approach (as long as the php code is hosted elsewhere).
ExamplesLet's have a look at some examples of what is possible with this widget:
Responsiveness and mobile-friendliness
I am using the widget on my Recent Work page. To make the image gallery responsive and mobile friendly, I wrote additional CSS code. The CSS is not included in the widget out-of-the-box.