NiO PhotoShelter RSS Gallery Widget


Early this year, I created this photography website by combining the image archiving and e-commerce capabilities of PhotoShelter and WordPress’s publishing platform (using a Graph Paper Press theme).

Powered by PhotoShelter. Join PhotoShelter & Save!

One of things left on the list of things to do, was to add a thumbnail gallery to my blog’s sidebar of images recently added to my PhotoShelter image archive. 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 PhotoShelter 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!

The widget was last updated on August 20th, 2011: version 1.5.4 now available for download (in this version the timthumb version used has been replaced to deal with a security issue)! Please also make sure to check out the new animation add-on for the widget and the possibilities for using the widget on facebook!

What the widget does

The NiO PhotoShelter RSS Gallery widget creates dynamic thumbnail galleries of images recently added to a PhotoShelter archive. It does this, by reading either the general PhotoShelter RSS feed (for instance: ‘’), 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.

The widget makes it possible to showcase galleries of recent images on web sites that run blog software like WordPress and Joomla, without having to manually update the gallery each time something changes on the PhotoShelter side of life. In addition, the widget does the following:

  • 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 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 enable 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). I used this approach myself to make a dedicated PhotoShelter page with Recently added images.


Let’s have a look at some examples of what is possible with this widget:

Example with simple spaced squares in two rows

A simple gallery with the thumbs from the general PhotoShelter RSS feed in two rows with some spacing. The spacing can be eliminated.

Example of a gallery box with background color

A background color and borders are added to the thumbs in this example. The square thumbnails are crops of the original image. Images can be hovered to show the caption and photographer.

More images …

Example of a gallery with captions and more borders

A border is created around the widget and each thumb has a background color. In this case the IPTC title is used for the caption.

See more Not so Wildlife images

Example with larger IPTC captions instead of IPTC title

This example uses large thumbnails and the IPTC caption, instead of IPTC title/headline, for the thumbnail captions. The thumbnail border has a hover effect. The text that appears upon hovering is fixed. This example shows that you can get pretty close to how a gallery image display looks in PhotoShelter. For this example, I included larger images with a watermark.

Example of a gallery with thumbnails with maximized height

A simple gallery with thumbnails which have been maximized on height.

Example of a gallery with rounded borders

An example of the use of CSS styles to further enhance the widget, for instance to round the borders of the gallery and the images, can be found here: Gallery with rounded borders.

Live implementations

I have included the widget on my home page (click the “recent work” tab above the slideshow), my sidebar and on a temporary iFrame based PhotoShelter page.

You can also see the widget in action at:

  • Dave Pattinson Photography: Dave Pattinson is an Alberta, Canada, based photographer specializing in stock and fine art photography with a focus on western Canada. His site is based on Joomla and he has just implemented the widget in the sidebar of his blog.
  • Pare and Focus – Photography Simplified: Pare and Focus is run by Kat Landreth. Kat’s main focus is to give digital photography beginners photography tips and original tutorials for using editing software and to provide simple and not too technical ways of making digital photos look better. Her site is based on WordPress and she has just implemented the widget on her blog’s sidebar.
  • Mediasculp – Harald Walker: for Harald Walker, Mediasculp serves as a platform for some of his creative activities, from web-design to video art. In the recent years the focus has mainly been on food and travel photography as well as making films. Harald uses the F8 WordPress theme of Graph Paper Press. He has just included the widget in the “View work” section of his home page and in the sidebar of his blog.
  • Stephen Harrison Photography: Stephen is an event and commercial photographer located in Ottawa, Canada. Stephen has included the widget in the sidebar of his blog.
  • RDKPHOTOBANK: RDKPHOTOBANK is a photo stock and photographic agency run by Gaudencio García. The agency is located and specialized in Spain. Gaudencio has included the widget on the frontpage of RDKPHOTOBANK’S blog. Gaudencio uses WordPress for the blog.
  • Clarence Holmes Photography: Clarence is a photographer with a focus on nature, wildlife (particularly birds and dragonflies) and landscape photography. He has included the widget on his home page as well as his birds and odonata stock pages. Clarence uses WordPress for his photography web site.
  • Richard King Fine Art photography: Richard included the widget as a recent work display in the sidebar of his blog. Richard also uses wordpress for his Fine Art Photographic Prints & Stock Photography web site.
  • Marco Secchi Photographer: Marco is a Press and Editorial London Photographer and he included the widget as a latest images display on his home page. Marco’s site is based on WordPress.
  • Warren Diggles Photography & Design: Warren included the widget as a dynamic gallery display on his Commercial Photographer Colorado Photography portfolio page. Warren’s site is custom-built.
  • Greg Stechishin Photographer: Greg is a Canadian photgrapher, based in Switzerland. Greg included the widget in the footer of his site, both in WordPress and in PhotoShelter.
  • Randall Murrow Wedding Photographer: Randall is a wedding photographer from London, UK. I think Randall has fallen in love with the widget, as he is using it as the main image showcase on his as well as in many posts. Make sure to check out this example of how Randall combined a large featured image with the gallery widget display in a post.
  • Jeff League Mixed Media Fine Art Photography: Jeff League is an award winning Florida artist who explores the possibilities of photography on canvas. His recent mixed media work combines fine art photography with the rare medium of encaustic painting. Jeff uses the widget on his bio page and blog sidebar.


The NiO PhotoShelter RSS Gallery Widget can be downloaded from our Download page:

Visit the Download page

If you like this widget and decide to use it, please donate, blog about it or provide a credit on your site with a link to my site (

Subscription discounts

If you are interested in using either PhotoShelter or Graph Paper Press and want to sign up for a trial, please consider using the image buttons below to get yourself (and me) a discount …

Join PhotoShelter & Save!
Graph Paper Press WordPress Themes

126 Responses to “NiO PhotoShelter RSS Gallery Widget”

  1. Nick C says:

    Having gone through what must be some similar trials during the making of this, I have to say well done! I will definitely tune in to see the code you release and will scour it for ideas on how to make my project better as well.

    I'm a little sad that I wasn't a little faster, as I think the recently released Advanced PHP for the Photo Feed Display would have allowed you to do this with (potentially) less overall work for you. That said, I still really enjoy the challenges of writing up some good code and know that if you do, also, there was much reward in undertaking this project.

    Thanks for the comments on my project! They helped me by reminding me that my code just might be useful to some people and that was enough inspiration to make some changes that I had put on the back burner. It is appreciated!

    I'll link to this project in the comments for now and on some type of 'Links' page if I make one.

    One other thing, if you have an option to 'opt out' or 'opt in' to subscribing to comment notifications, I'd add it. I, personally, like the option.

    • NiO says:


      Thanks for the feedback! I will definitely look add your advanced PHP version in the coming week. The main reason why I went ahead with developing this anyway, was that I also wanted the option of showing large thumbnails (above 200px) and use a different image source then the one provided by the RSS feed. That image source can be derived from the RS feed by applying logic that I embedded in the script.

      Re opting in/out: you can opt in by clicking on RSS 2.0 in the banner below the ShareThis button or in the browser address field. I'll test the opting out, as I haven't done that yet.

      Cheers and good luck, Johan

  2. […] Update May 17, 2010: I have just posted an article with an explanation and output examples of the custom PhotoShelter RSS Gallery Widget I have developed myself. For more info go here: PhotoShelter RSS Gallery Widget by NiO. […]

  3. The gallery widget was exactly what I was looking for. I needed something that would automatically update my images as my RSS feeds updated. Johan's widget was perfect for my website!!!

  4. very cool! let us know when you're ready for prime time. i bet a lot of people will want this!

  5. I can’t wait for the release- This will make so much more sense than having a flickr gallery or next-gen gallery in my sidebar.

    Will the number of thumbnails per row and per column be customizable?

    Love that you’re using css too. Should make it much easier from me to style the widget to match my site. Thanks!

    • NiO says:

      Hi Kat,

      Thanks for commenting! Yes, you can play with the number of thumbs per row and columns. You basically set the size of the thumbs, the spacing in between them and subsequently how much width you give to the gallery. The number of rows then depends on the number of thumbs you want to set.

      CSS is indeed possible. The default however is just feeding it with parameters like color, border, padding. The widget then generates the styling in the background. If you leave the parameters blank, you need to include styles in your style sheet … hope that makes sense.


  6. John Dunne says:

    Wow, this would be so useful Johan. Looking forward to seeing it released.

  7. […] Photoshelter user and Dutch landscape photographer Johan Peijnenburg has been busy creating a php widget to display most recently added photos from Photoshelter galleries on a WordPress site like this […]

  8. Nick C says:

    Any progress? I wanna peruse your code and use it to improve my widget. Is that allowed? ;-p

    Really, without knowing more about it, it seems like the only advantage my widget has is the html implementation for non php coders (yeah…using iframes. boo. i want to do a javascript implementation, but my JS needs lots of help).

    Yours works for various properly formed feeds, right?

    • NiO says:

      Hi Nick,

      Testing of the widget is more or less finished. I don’t expect issues anymore and will be creating documentation and a downloadable version in the coming weeks. Have to do it in between other stuff though, so it will probably be end of June.
      Yes, the widget will work for any properly formed RSS feed.

      Cheers, Johan

  9. Siggi says:

    Just what I've been waiting for. I'll be standing in the line waiting…

    Great site by the way and some stunning photos.

    Greetings from Iceland,

    Siggi Sigurdsson

  10. John says:

    Well done Johan this plugin will be so usefull to the PS community. I can't wait to implement it on my site and have the exact location in mind :-)



  11. […] are uploaded to the archive. Therefore I have created a separate recent images page using the NiO PhotoShelter RSS Gallery widget. It gives new images more attention and they get found by Google immediately with the full caption […]

  12. Matthew Oldfield says:

    Johan – Looks like a great tool. Not planning on using right now as vast majority of my new images are not for public viewing – clients only at the moment. But in the future, I think it will be a useful addition.

    I'm also impressed that you have gone to the effort of doing this yourself for free. Im a big fan of open source development – just imagine if PS opened its doors to developers etc!


  13. Johan,

    Just want to congratulate you on developing a great widget. I have implemented the widget on three of my site pages:

    Home Page – showing the latest images added

    Stock Page (Birds) – showing the latest bird images

    Stock Page (Odonata) – showing the latest dragonfly images

    I found everything to work as described in your documentation. I added a link to your website to the top of the list of my favorite sites.


    • NiO says:

      Hi Clarence,

      Glad you like it! Thanks for the feedback and the link!


      • Johan,

        On my homepage, I am currently using the widget to show recently added images, but it really is showing the most recently “taken” images. Do you know of any way to have the Photoshelter RSS feed sort by most recently “added or uploaded” images? Since I am constantly adding older images I want these to show up as most recently added, when applicable.


        • I think I have a workable solution. I did a search of my images with no search parameters. The search results display all public images showing the most recently added images first. I then used the RSS feed from this search. This works.

          • NiO says:

            Hi Clarence,

            Unfortunately I cannot change how PhotoShelter outputs the RSS. I think the workaround you use is a pretty smart one! An alternative would be to create a “recently added” gallery in PS, copy the images you want to show in there and subsequently use the RSS feed from that gallery.

            Cheers, NiO

          • Well… I thought my workaround worked, but I don't think it does consistently. So for now I'll be happy showing the most recently "taken" images and continue to think about how to show most recently "added" on a global basis.

  14. Thad says:

    This is great stuff NiO! Really psyched that you made this!

    I have one minor code tweak/recommendation. There is a deprecated function in timthumb.php that will cause it to break on servers using PHP 5.3. Change this:


    to this:


    And you will be good to go. Again, really nicely done!


  15. This is the perfect widget to add to my WordPress / Graph Paper Press blog. I really can’t wait to add it.

    However, I am not technically minded and having read the installation instructions feel I don’t really understand how to implement it.

    This is a great shame as you have obviously put a great deal of effort into developing and testing this excellent plug-in.

    Best Regards


    • NiO says:

      I have just mailed you to find out how I can help.
      Cheers, Johan

      • Johan,

        How can I thank you enough for your help and guidance in getting the plug-in up an running on my blog. It looks fantastic and is an incredible boost to my productivity – All my latest work will automatically appear on the top of my blog page in the sidebar.

        It really looks great! A must for all I would think!

        Best Regards

  16. gary says:

    I tried to install the plugin. I received a message that "there is no valid header file".

    What to do.


    • NiO says:

      Hi Gary,
      See my email. Wll try to help where possible.
      Cheers, Johan

      • James says:

        Hi Johan,

        I really look forward to using your widget. But I am having the same problem as Gary. As I try to install it, I get the following error message:

        The plugin does not have a valid header.
        Internal Server Error

        The server encountered an internal error or misconfiguration and was unable to complete your request.

        Please contact the server administrator, and inform them of the time the error occurred, and anything you might have done that may have caused the error.

        More information about this error may be available in the server error log.

        Any ideas??


  17. Sven says:

    Saw your website a while ago and love how you integrated GPP into Photoshelter. Do you offer customization / programming by any chance? Shoot me an email if you do!

    Thanks & keep up the great work!

  18. […] Photoshelter based slideshow (you can see the first prototype already on my homepage) and with the NiO PhotoShelter RSS Gallery Widget it is possible to show the images of a gallery as […]

  19. […] RSS Thumbnail Gallery, widget for Photoshelter created by Johan Peijnenburg of Nio […]

  20. gary says:

    Johan, This is without a doubt one of the best plugins. I can’t tell how much this has improved my outlook and productivity. Your extra help was invaluable. I only wish other developers were are helpful and cooperative as you. You don’t give up till it works!!!

    Regards, Gary

  21. John Dunne says:

    Hi Johan,

    Eventually got round to setting this up but am having a problem, if you have some time to help?

    In the notes it states to copy the folder to the root of the site. As my site is hosted under a primary domain it's root is /public_html/johndunnephotography. I have followed the instructions and copied it their but when I try and test it using the sample pages it does not find anything. I have confirmed the permissions are set correctly.

    Any ideas where I went wrong?



    oh btw sent you this by mail but I got it bounced back today. Are you having email problems on your side?

  22. Tiff says:


    This is brilliant, thanks for sharing!

    I’m trying to add the widget to my Blogger site as I don’t use wordpress. Seem to have succeeded in getting it looking right and working as a page, but when I paste that code into blogger it doesn’t display the images.

    Any help?



    • NiO says:

      Hi Tiff,
      Your images look great in that sample! Re blogger: I am not sure whether Blogger supports PHP. If not, you will have to go the iFrame route. I will contact you directly to see if I can help.
      Cheers, Johan

  23. charles says:

    Like you photos and site.

    your plug in link is broken on the photoshelter site.


  24. Martin says:


    I love the plugin, but I seem to have a problem getting it to work. Whenever I specify that I want square thumbs the thumbs do not load (everything else works, though). I had a feeling that it might be a problem with the timthumb.php, so I tried calling the timthumb.php directly (as specified in the file) and get a 403 Access Denied error. Changing permissions to 755 does not help.

    I know this is most likely not an issue with your widget, but if anyone knows how to solve this I would really appreciate the help.


    • NiO says:

      Hi Martin,
      I'll contact you directly to troubleshoot.

      • Freeman says:

        Same issue here with S square thumbs. Any further information on this?

        With thanks


        • NiO says:

          Hi Freeman,

          Martin's issue was solved. If the square thumbs don't work, it is usually a matter of setting the the permissions for the cache and temp directories correctly. I'll also contact you directly to support.

          Cheers, Johan

  25. […] something that would pull images from a RSS feed.  Fellow Photoshelter user and photographer  Johan Peijnenburg designed this script to allow this and we spent the past few days testing it and finally got it […]

  26. Randy says:

    Thanks Johan, fantastic plugin!

  27. […] I discovered Johan, aka NiOPhoto, and his Photoshelter RSS Gallery php widget. Instead of using it as a sidebar/footer widget, I planted a photowall gallery onto my […]

  28. Robbie says:

    Hi thanks for the plugin, works like a dream until I try to pull in the following feed to a 'gallery-collection'. Any ideas?

    • NiO says:

      Hi Robbie,

      I am afraid that you are correct. The widget won't work with collections. For some reason, the RSS feed of collections has a very different format. I will try to address this at some point, but I am waiting until PS makes some the changes to the set-up of galleries that have been expected for a while.


  29. Cathy says:

    Hi, brilliant plug in. I had it all working up until a few minutes ago, and then decided to change my RSS feed. And now it's broken! I really can't see what i'm doing wrong, all I've done is change the URL…



  30. Hey Johan, just a quick shout-out here in the thread. Great work on this widget! I followed the disscussions on it in the PS forums from the earliest point and have always planned to try it out. Just got the time to do so over the past weekend, and it dropped into my Nucleus-based site with no muss & no fuss. Lots of ways to tune and tweak the look, I’ve only scratched the surface with a simple photo wall on my main site home page. Hope to use it for a few more things as well in the future.

    Thanks so much for building and sharing this tool!

  31. […] In the spring of last year I released the first version of the NiO PhotoShelter RSS gallery widget. It reads the general RSS feed of a PhotoShelter archive or PhotoShelter gallery, and creates a gallery of image thumbnails with or without captions. If you are not familiar with the widget yet, please check out the widget’s information page. […]

  32. […] and GPP was instrumental in helping me get over any obstacles I had.  As well he had to update his widgets that he had created for this blog.   Now back to my Daily […]

  33. Griffin says:

    Hi – really good site you have made. I enjoyed reading this posting. I did want to publish a remark to tell you that the design of this site is very aesthetically delightful. I used to be a graphic designer, now I am a copy editor for a magazine firm. I have always enjoyed playing with computing machines and am attempting to learn code in my free time (which there is never enough of lol).

  34. I added it to my plugins folder, but don’t see anything appear in the plugins or widgets page to configure. What am I not doing right here?

    • Hi Quinn,

      This widget does not work like the traditional WordPress widget, as it has been created for multiple platforms. The readme.pdf which is included in the download, describes the installation in detail.


  35. Toni says:


    I’m having problems installing your widget, I have godaddy wordpress hosting, unable to find root directory on FTP. Any help would be appreciated.

  36. David says:

    Is there a way to put this in a different directory other than root so that it can work with WordPress MU sites?

  37. David says:

    Is there a way to specify a different directory other than the root directory so that it’ll work with a WordPress MU site?

  38. grerfadia says:

    hi, new to the site, thanks.

  39. Tom says:

    Woah! I’m really loving the template/theme of this blog. It’s simple, yet effective. A lot of times it’s difficult to get that “perfect balance” between user friendliness and appearance. I must say you have done a fantastic job with this. Additionally, the blog loads very quick for me on Chrome. Superb Blog!

  40. Mari says:

    Is it possible to use this for a gallery of images from websites that you prescribe RSS Feeds from?

  41. Regula says:

    I have some problems activating the Plugin. I have On Assignment theme. After loading the plugin, trying to activate it, I get the message: The plugin does not have a valid header.
    Do you know what might be the problem?
    Thanks for any help. Regula

    • Hi Regula,
      You probably tried to install it as it was a normal WordPress plugin. That won’t work. The readme.pdf that is part of the package describes the steps you need to follow.

  42. John Bush says:

    Hello! Very good job(this site)! Thank you man.

  43. […] PhotoShelter Gallery Widget Plugin: lets you display recently created galleries in WordPress.My own NiO PhotoShelter RSS Gallery Widget: let’s you include a gallery of recently added PhotoShelter images in your blog.My own NiO […]

  44. […] a gallery (photo wall) with recent images from my PhotoShelter image archive. I did this using the NiO PhotoShelter RSS Gallery widget. So, no uploading of images to Facebook and the gallery automatically refreshes when new work is […]

  45. […] and GPP was instrumental in helping me get over any obstacles I had.  As well he had to update his widgets that he had created for this blog.   Now back to my Daily Photo.Tweet← Previous postNext […]

  46. […] something that would pull images from a RSS feed.  Fellow Photoshelter user and photographer  Johan Peijnenburg designed this script to allow this and we spent the past few days testing it and finally got it […]

  47. Paul says:

    Hi. I’m attempting to get this working and i’m having no luck. I’ve set the folders to 775 and running tests results in:

    You do not have permission to access this document.

    Any help would be appreciated.

  48. Johan,

    This morning, I am seeing error messages like the following on some of my widget pages:

    Warning: SimpleXMLElement::__construct() [simplexmlelement.–construct]: Entity: line 42: parser error : Entity ‘copy’ not defined in /home1/clarenc6/public_html/niorssgallery/niorssgallery.php on line 68

    Warning: SimpleXMLElement::__construct() [simplexmlelement.–construct]:”>(Clarence Holmes)</a><br />Copyright: © in /home1/clarenc6/public_html/niorssgallery/niorssgallery.php on line 68

    Warning: SimpleXMLElement::__construct() [simplexmlelement.–construct]: ^ in /home1/clarenc6/public_html/niorssgallery/niorssgallery.php on line 68

    Any help would be appreciated.


    • Hi Clarence,
      Looks like you used a special character in the description somewhere. You are using “©” and the widget is not happy with the “&” character.

      • Well I haven’t changed anything from yesterday to today. However, I have been using a lightroom plugin which has changed the way the copyright symbol is exported to Photoshelter. I think my best solution for the long run is going to be to eliminate the copyright symbol from my copyright field. Thanks.

        • Think that is the best way forward. I can’t do something myself to change it … this issue is an PHP issues I can’t work around.
          Cheers, Johan

          • I dug into the PHP a little bit (I know very little PHP). I don’t know why this started happening today, but the errors were coming from the parsing of the data from the RSS file which contained the “&” character. I found these issues:

            – the lightroom publish service was sending the copyright symbol to Photoshelter as ©
            – I used “B&W” as a keyword for some of my images
            – I had “&” instead of “and” in some of my captions

            I added the following lines to the niorssgallery.php file

            $data = str_replace(‘©’, ‘©’ , $data);
            $data = str_replace(‘B&W’, ” , $data);
            $data = str_replace(‘ & ‘, ‘ and ‘ , $data);

            just before this line

            $content = new SimpleXMLElement($data);

            Don’t know what caused this or if this is the best way in PHP to solve it, but this is my workaround for today.


          • Hi Clarence,
            Thanks, that is a good temporary solution! Meanwhile I have been in contact with Paul Kamphuis. He wrote the LR plugin for PS and is aware of the problem. He expects to release an updated version in the near future.
            For now I wil wait with including a workaround like you suggested, but I might include it to avoid issues with other accented latin characters in the future.
            Cheers, Johan

          • By the way, I see that the lines of code I inserted were changed showing the character equivalents. I’m not sure how to insert the code so its not decoded. What I meant with the first line was:

            $data = str_replace(‘ampersandcopy;’, ‘ampersandamp;#0169;’ , $data);

            just substitute “&” for “ampersand” above.


          • Thanks Clarence. I can see it correctly in the raw comments in the WP admin, but thanks for the explanation!

      • Hi Johan! I can confirm that my instance of the NiO gallery just broke on my site this morning, as well. It was running fine until yesterday. I’ve adjusted nothing, tweaked no captions or keywords, not even uploaded anything to my PS archive for a few days.

        Perhaps PhotoShelter has changed something in their RSS feed that is now clobbering the XML parser. Since I see reference to “B&W” in the PHP stack trace on my home page, I have no doubt it’s the same kind of issue Clarence is describing…

        • I just put a fix similar to Clarence’s in my niorssgallery.php, and that cleared up the immediate problem. But if PhotoShelter has changed the way their RSS feed sends special characters, you can probably expect to see more instances of this kind of thing shortly. :)

        • All instances of the gallery widget also stopped functioning on my site on Sept 30 with no instigation on my part – I hadn’t added or changed anything in my PS account for days but the widgets (which draw on two separate PS RSS feeds) just stopped without warning. It certainly does seem like PhotoShelter are doing some ‘tweaking'; they’re getting rather good at breaking things lately.

          Thanks to Clarence and his fix in the comments above, which worked for me too, and continued thanks to Johan for the widget’s existence :-)

          • Thanks for the feedback Nick. I am surprised by the 30 sep date. I haven’t experiences any issues so far and a few other sites I am involved with either. I did release a new version a month ago to fix a security some web hosts have with the version of Timthumb that was used. The new version fixes that issue.
            … looks like I might need to include a permanent fix in line with what Clarence submitted :-)

  49. No worries, Johan. Looking at my calendar it was in fact early afternoon (UK) on the 29th when the widgets stopped working – I always have my sites open here and had looked at something that morning; later on when I accessed a page to get a link for someone the site barely worked at all! Because the sidebar gallery widget was failing to parse the RSS feed, the page load stopped right there so the footer wasn’t appearing either. A temporary disaster rectified by switching off the gallery widget. All reinstated now!

    I struggled for a while to find out the cause, and was baffled. Checking my feeds in the feed validator ( did indicate that I was using ampersands in some IPTC titles, but why that should suddenly become an issue is beyond me :-) The PS RSS feeds still work everywhere else, feed readers, browsers etc. And I had long ago already updated my timthumb.php files when that security issue became apparent.

    I don’t know what the knock-on effects elsewhere might be of including those few extra lines of code, but it certainly got my website back together.

    • Hi Nick,
      I will wait with hacking my widget. I just ran into a similar problem when including a Photoshelter image in a post using their plugin. The plugin crashes on the keyword “B&W” … so they have obviously done something that isn’t liked by software based on PHP. I have contacted PS to see what their plans are and based on that I will change my widget or not.
      Cheers, JOhan

  50. PhotoShelter has just informed me that they addressed the issue with characters and it should no longer impact the use of the widget. Please do let me know if you run into issues again!

  51. Hello,
    just came on this thread. also, have been having recent probs with the PS widget. can only pull the top level feed of my PS site with no errors. no prob with cut & paste from your sample .php’s though. lemme kno’ when you can have a look or i’ll try to call one of my own galleries to get the error message if you’d like to look.
    sWitt @MeanPony

  52. I would like to be able to implement your gallery widget but believe there is a problem caused by how your instructions ask to install the niorssgallery154 folder in the root of our domain. I use the pro hosting service page.ly3 partner with GraphPaper Press. I both can’t install anything in root and I do not have a public-html with them. I host my domain with It would appear to me, though I do not program in PHP, that the following section of each of your sample pages needs to be changed to reflect my server requirements: // THE LOCATION OF THE DIRECTORY THAT HOLDS THE NIORSSGALLERY.PHP FILE. PLEASE DO NOT CHANGE!!
    if (!class_exists(‘niogallery’)) {
    $path = $_SERVER[‘DOCUMENT_ROOT’] . “/niorssgallery/niorssgallery.php”;


    If the above is correct what is the change I should make to each sample post and page as I use in in my posts and pages?


    Phil Knouf

    • Hi Philip,
      Try changing:
      $path = $_SERVER[‘DOCUMENT_ROOT’] . “/niorssgallery/niorssgallery.php”;
      $path = “”;

      …. assuming that the niorssgallery sits in the root of the joker domain :-)


      • Johan,

        Sorry for the confusion. My domain is only registered with It is not hosted by them as I do not use their name servers but use the name servers of I don’t know if it is pertinent but I do not use a Cname with Photoshelter nor is one used with Therefore I am not sure what to do to use your widgets. Does the niorssgallery folder have to sit in the root? Do you know of other users who have their domain registered with a site other than where their actual website is hosted?


        • Hi Philip,
          The niorssgallery directory needs to be installed somewhere to make sure it can run. If the package you have doesn’t allow you to, you will not be able to use it I am afraid …

  53. Adam says:

    Hello – when I go to activate the plugin, I get this error:

    The plugin does not have a valid header.

    Help please?

  54. NiO,

    I just wanted to say thank you for creating such a great plugin! For some reason the PhotoShelter Gallery Widget never worked properly for me, but yours outdoes it in many ways!

    My only question is how do you add your fade effect to your gallery photos? When I see the examples on your website… it just makes the gallery really pop! Maybe I’m not seeing the correct coding for me in the readme file.


  55. max says:

    Hello, I think is a good script but I couldn’t make it work, I try so long but nothing…
    this is the error if i leave the path = $_SERVER[‘DOCUMENT_ROOT’] . “/niorssgallery/niorssgallery.php”;

    Warning: include(//niorssgallery/niorssgallery.php): failed to open stream: No such file or directory in /demo/niorssgallery/samples/advancedsample.php on line 26 Warning: include(): Failed opening ‘//niorssgallery/niorssgallery.php’ for inclusion (include_path=’.:/usr/share/php:/usr/share/pear’) in /demo/niorssgallery/samples/advancedsample.php on line 26 Fatal error: Class ‘niogallery’ not found in /demo/niorssgallery/samples/advancedsample.php on line 69

    If I modify the path manually with the exact address

    Warning: include(): http:// wrapper is disabled in the server configuration by allow_url_fopen=0 in /demo/niorssgallery/samples/simplesample.php on line 25 Warning: include( failed to open stream: no suitable wrapper could be found in /demo/niorssgallery/samples/simplesample.php on line 25 Warning: include(): Failed opening ‘’ for inclusion (include_path=’.:/usr/share/php:/usr/share/pear’) in /demo/niorssgallery/samples/simplesample.php on line 25 Fatal error: Class ‘niogallery’ not found in /demo/niorssgallery/samples/simplesample.php on line 68

    php 5 and curl enable

    thank you!

  56. Grant says:

    Hi there, I had to implement the iframe version [] due to Pagely not playing nicely with timthumb.
    What is the maximum pixel size I can generate using your tool? I’ve setup a Windows Desktop Wallpaper RSS but the image quality is not great pulling from photoshelter.
    Here it is if you are interested
    Thanks, Grant

    • Hi Grant,

      Depends a bit on whether you set the parameters to use high quality images or not (parameter $Tc). If High Quality is set, 500 pixel images will be used as a basis for the thumbnails. It is possible to go further then that, but that would require a small code hack and you would receive a bit of a performance penalty …


  57. jonna says:

    Do you know if the RSS feed is limited to 25 photos? I’ve noticed when the gallery has more than one page (each page having 25 photos) that only 25 photos show.

    • Hi Jonna,

      25 is the default, but you can increase the number by adding a number to the feed url like this:

      $Za = ‘';

      Please also make sure to also change the number in the $Zb parameter.


  58. don norris says:

    Hi Johan,
    Great plugin, many thanks for your work.
    I am trying to work out a way to have images link to their parent gallery.
    Effectively, I guess I’m trying to overcome the plugin’s incapacity to link to a collection of galleries.
    About the best I’ve been able to manage so far is to include a link to the relevant gallery in an image’s caption. This is okay, but I think the average viewer who’d like to see more images will probably click on the image – and go to PS’s single image view (where the link to the containing gallery is not glaringly obvious to a first time visitor).
    Any thoughts appreciated and thank you once again

    • Hi Don,

      You are very welcome!

      The problem is that the general RSS feed returns general url’s for each image, because images can reside in more than one gallery. As soon as you use the RSS feed of a gallery, you will get the url’s that relate to that gallery … like I did here:

      There is not a lot in the code I can do to overcome the behavior of the general RSS feed. So it is either use that or set up a specific galler that contains the images you want to showcase. Or maybe use multiple instances of the widget on one page, which is possible.

      Cheers, Johan

  59. Chris says:

    I’d like to use this widget with galleries other than PhotoShelter (copper gallery and zenphoto), are you working on the general rrs feed that will work with other galleries?

Leave a Reply

We’d love to hear from you! Your email address will not be published.

Follow responses to this post