Introducing the smugmugRSS Plugin…

So, I’ve been mucking around and and have decided to play around and display my images on the site. One thing led to another and before you know it, I’m writing a plug-in.

smugmugRSS is based on the plug-in, tailored for smugmug. It basically allows one to embed photos from their Smugmug account into their Wordpress site (pages, posts and templates). It only supports interfaces available via RSS Feeds. smugmugRSS is created as a plugin, so to use it – just add the get_smugmugRSS call on any template. Using additional plug-ins like runPHP or PhPExec (the one I’m using here), you can also call this plug-in in posts and pages.

get_smugmugRSS takes the following arguments:

  • rss_url – Feed URL
  • num_items – Number of Images to display
  • display – tells the plug-in to display: image only (0), caption only (1) or both (2)
  • before_block – this is the HTML to apply before the whole block, normally used for sidebar (titles) and opening <ul> tag
  • after_block – this is the HTML to apply after the whole block, normally the closing </ul> tag
  • before_image – this is the HTML to apply before the image, i.e., <li> tags or <div> tags
  • after_image – this is the HTML to apply after the image, i.e., </li> tags or </div> tags
  • before_caption – this is the HTML to apply before the caption, i.e., <span> tags or <div> tags
  • after_caption – this is the HTML to apply after the caption, i.e., </span> tags or </div> tags

All arguments are optional. If not provided, it will use the values specified in Options.

Let me know what you think!

Here are some examples of smugmugRSS in action:

It just so happens that smugmug provides these :

Recent Galleries – show latest 10, captions only

Keyword – show all smugmugRSS photos, images and captions


Gallery – show 5, images only
SmugMug's photoSmugMug's photoSmugMug's photoSmugMug's photoSmugMug's photo


Popular Photos – show 3, images only


Recent Photosstarted working all of a sudden! yay!
mnmdl's photomnmdl's photomnmdl's photomnmdl's photo

Now, for some reason – the Recent Photos does not work. I thought initially this was my code, but since all other feeds are working, it has to be with the built-in magpieRSS parser. After fetch_rss, there are no item elements returned and there are no errors raised.

ETA: Feb 9, 2007 10:25PM – Whoa! all of a sudden Recent Photos is now working! I didn’t touch anything

Download, instructions and other FAQ are available in the Projects/smugmugRSS page.

4 comments to Introducing the smugmugRSS Plugin…

  • msim

    this is the best smugmug plugin that i have found so far for wordpress. and highly unpublicized. kudos!

    Q1: can i show larger thumbnails than the default thumbnails that smugmug pushes out? i.e. can i resize (say small) into size of my choice?

    Q2: can i show random images from the recent images feed?

  • marie

    Thanks! I’m glad someone else can use the plug-in other than me… hee

    Answers to your questions:
    A1: Yes, you can show larger thumbnails, you just need to specify a custom size that you need/want to use. Any of the Smugmug sizes (Th, Tiny, S, M, L, XL, etc) works or custom sizes (200×200). Check out all the details about the plug-in, http://www.mariedeluna.com/projects/

    A2: I don’t think this is available in the current version of the plug-in.

  • msim

    Re A1. As far as I can tell, size appears to be the space that the plugin leaves for the image, but it does not resize the original (say S) to the specified smaller size. It instead adds scroll bars. Am I doing something wrong.

    Re A2, random image capability would be awesome!

  • msim

    and while we are at it, is there a way i can lift your header random image serving code. i know nothing about java script or php for that matter. so i cannot tell by studying your code… possible?

    cheers.

Leave a Reply

 

 

 

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>