Update 4/4/2011: This plugin does not currently work with WordPress 3.0+ and, due to time constraints, I may have to deprecate it entirely.
——–
After writing my first WordPress plugin (which creates an XML file of your blog using every post’s title, excerpt, permalink and custom fields), I started getting several requests from people who wanted post-specific XML that pulls out images stored in a post’s gallery to populate a Flash gallery.
Since there are several Flash gallery solutions out there that all require different XML structures, I decided to focus on one at a time. First up: Simpleviewer (free version).
The Simpleviewer gallery above is populated by a dynamically generated XML file for this particular post. With my new plugin, Post XML for Simpleviewer, every post on my site has its own associated XML file that lists all of the post’s attachments, as well as captions and thumbnails.
After installing and activing the plugin, the XML files are generated simply by visiting a single post in a browser. Basically, the file generates each time someone looks at a specific post (not an index or archive page), so the XML is updating each time a single post is visited. If you get a ton of traffic, this might not be the best solution for you due to potential server overload.
The XML generated for each post will be located in a folder called “SVxmlfiles” within your wp-content folder. Each filename will be galleryXXX.xml where the XXX is your post ID number. For example, the location of the XML for this post is:
http://www.lauragentry.com/wordpress/wp-content/SVxmlfiles/gallery343.xml
You can set your preferences for Simpleviewer parameters by visiting the options page which is located under “Settings” in your dashboard.
I’m making the assumption with this plugin that you’re already familiar with Simpleviewer and are just looking for a way to dynamically generate the content with your WordPress blog.
If you think you’ll want every post to have a Flash gallery, I’d recommend putting the embed code in your template. If not, you can do it within the body of your WordPress post or page.
If you are going to have more than one gallery, you’ll need to give the “flashContent” a unique ID to match your blog post ID. Something like “flashContent343″ would be good for this post. Here’s the embed code I used for the gallery above:
<script type=”text/javascript”>// <![CDATA[
var flashvars = {};
flashvars.galleryURL = "http://www.lauragentry.com/wordpress/wp-content/SVxmlfiles/gallery343.xml";
var params = {};
params.allowscriptaccess = "always";
params.allowfullscreen= "true";
params.bgcolor = "555555";
swfobject.embedSWF("/wordpress/wp-content/uploads/simpleviewer.swf", "flashContent343", "600", "550", "9.0.124", false, flashvars, params);
// ]]></script>
<div id=”flashContent343″>SimpleViewer requires JavaScript and the Flash Player.</div>
THE BASICS
1) Download and install the plugin into your WordPress plugins folder
2) Activate the plugin. You can tell the plugin is working by visiting any of your single posts and then visiting http://www.yoursite.com/wordpress/wp-content/SVxmlfiles/galleryXXX.xml where XXX is the post’s ID.
3) Download and install Simpleviewer (free) somewhere on your site
4) In the Simpleviewer embed code, replace the gallery.xml reference with http://www.yoursite.com/wordpress/wp-content/SVxmlfiles/galleryXXX.xml where XXX is the post’s ID. If you’re placing the embed code in a template rather than a post or page, be sure to have the template dynamically generate that post ID.
THE PROBLEMS
1) There’s no way to exclude a photo from a gallery if it’s one of the post’s attachments. That’s outside the scope of this plugin, as I’m working within the confines of the WordPress gallery feature.
2) It does not currently differentiate between photos and other types of post attachments, so it will attempt to treat documents, videos and images the same. I’ll get that fixed in the near future.
3) As mentioned above, this generates XML on the fly every time someone visits a single post. If you’ve got a lot of images and a lot of traffic, there could be a site performance issue. If anyone experiences this, let me know.
UP NEXT
I plan on tackling Simpleviewer Pro and Autoviewer next. If anybody knows a way to reliably embed Autoviewer into a WordPress post without using iframes, hit me up at its.the.general@gmail.com!
This is my first attempt at a WordPress plugin. I implemented it on The News Tribune‘s homepage several months ago and there haven’t been any disasters, so I’m considering it a success.
This plugin takes post data from your WordPress blog and creates an XML feed of that data. I suppose it could have several uses, but it is optimized to feed data to Flash photo galleries with info from the Title and Excerpt fields as well as each post’s permalink.
Download the plugin: Photo Gallery XML Export v1.0.0
I’ve also added the ability to include up to five custom fields (good for thumbnails) and the option of limiting to just one category.
Here’s a screenshot of the options page:

How you might use this in the real world:
If you have a photo blog or a blog that usually includes at least one photo per post, you could use exported XML data from your blog to feed a Flash content rotator that you would use to promote that blog on another page of your site.
Or, if you have a special feature on your blog — say, “Recipe of the Week” — that includes a photo, you could assign that special feature a category (like “recipeoftheweek”) and use exported XML data from just that category to feed a Flash content rotator to promote that special content.
Here’s an example of my blog’s content as XML generated from this plugin:

And here’s a live example of a Flash content rotator that’s pulling data from XML generated by this plugin:
A few suggestions for Flash content rotators:
• Flash Image Rotator using XML Playlist
Some notes:
1) The XML declaration is hard-coded to be: <?xml version=”1.0″ encoding=”UTF-8″ ?> … I don’t have any plans to change that unless I get requests for other declarations.
2) You can name most XML elements however you see fit, but right now the parent element is hard-coded to “images” and each blog post parent element is hard-coded to “pic.” I’m hoping to make that customizable in the future.
3) If your excerpt isn’t populated, it will pull from your blog post. Not entirely ideal, but that’s how WordPress excerpts work by default.
After four Lakewood police officers were shot at a Forza coffee shop in Parkland on Sunday, November 29, police from Seattle and Pierce County scoured the region for the suspect, Maurice Clemmons. During the 40 or so hours following the crime, there was a dizzying amount of police activity in the region, including a failed hours-long standoff in the Leschi neighborhood of Seattle.
View Manhunt! in a larger map
I live in the nearby neighborhood of Mount Baker and was on news-junky high alert as helicopters circled Seattle’s central area all night long. After the police came up empty from the standoff in Leschi, they headed to Beacon Hill and Columbia City on separate tips, both neighborhoods that border mine on the south side.
Because it had become a national story at this point, family members and friends of mine in other states were asking how far away the police activity was happening from where I lived, so I created a simple Google map to show them. After I sent the link, it occurred to me none of the stories online were using a map to tell this particular story yet. So I kept adding to it from what I was learning on news sites, the police scanner and Twitter via the #washooting hash tag. Local media big and small started taking notice of the map, linked to it and traffic started pouring in.
Two things this unintentional experiment taught me about breaking news online:
1) People crave simplicity when things get complicated. There will always be a need for someone to distill information and make sense of it. I think maps, in general, are overused in the news business. But in this case – with this story – it couldn’t be told without a map. Seattle residents were worried about the police activity and having a suspected murderer on the loose. They wondered when it might affect their neighborhood or when it might stop affecting their neighborhood. There was an overwhelming amount of information out there, but scattered in a hundred different places, and not everybody has the patience to sift through all of it.
Side note: The best use I’ve seen of this type of breaking news via Google map came from the San Diego Union-Tribune in 2007 with their wildfire map. Another instance where residents felt surrounded by the news and needed to make visual sense of what was happening.
2) West Seattle Blog must get a SICK amount of traffic. At least half of the traffic sent to the map came from West Seattle Blog. Local advertisers would be crazy not to get their businesses on that blog asap.
I recently found myself wanting to tweet a message with audio I captured from my iPhone voice memo app but discovered there isn’t an app that does that (yet). There are a couple of apps out there like TweetMic that you can use to capture audio and tweet, but I really like the ease of Voice Memo’s editing feature. And, in general, I like using native applications whenever possible, so I stumbled around for a bit and set up a flow that works great for me and is super easy to do after a simple initial setup.
Posting iPhone voice memos to Twitter
1) Set up an account at Posterous.com. To do this, simply email anything to post@posterous.com and your account will be set up for you.
2) Once you’ve logged into Posterous.com, go to Manage > Auto-post > Add a service and authorize Posterous to post to Twitter.
3) From here on, whenever you have a voice memo you want to share, email it to post@posterous.com or twitter@posterous.com and voila!
The subject line of your email will be your tweet and the headline of your Posterous post. You can add more text to the body of the email that will show up in the body of your Posterous post, but not the tweet.
About me
I'm a web developer, designer, writer, communications professional, former newspaper journalist, Wordpress evangelist, news junkie, pop culture addict AND MORE! Currently employed as the Technical Communications Specialist at the Seattle Housing Authority.
My Favorite Thing Ever Right Now
Tim Tebow 80 Yard Game Winning Touchdown Pass to Demaryius Thomas - 2011-2012 AFC Wildcard (by TheNFLonDemand)
Latest from Twitter
Current Favorites from Twitter
-
matthewbaldwin Matthew BaldwinI'm lucky it's a beautiful day for a walk because my bike tire just burst and I don't have a spare and I'm 4 miles from work. So, so lucky.
-
matthewbaldwin Matthew BaldwinRoses are red / Violets are blue / Oh god I forgot you are colorblind / I am an insensitive ass
-
matthewbaldwin Matthew BaldwinI dislike this trend of people being younger than me.
-




