Archive for Category ‘Wordpress‘

 
 

Setup RSS Feeds using FeedBurner

I’m sure everyone has experienced this: you’re reading their feeds and all of the sudden one of them has 20 new entries. Did the author of that feed suddenly go wild and start posting? Maybe they’re at a special event and posting about it? No, usually it’s just an error in the RSS feed where somehow the timestamps of the entries are different, causing your feedreader of choice to show you 19 articles that you’ve already read. This used to be very annoying, but now a days it happens so often I barely notice it — just click over to that feed, click ‘mark all as read’, and go on to the next feed.

One of the easiest ways to get around this is not to rely on your website to host your RSS feed. Setting up your blog to use FeedBurner is so trivially easy, that it should be one the first time for you to do with a new Wordpress installation. Really simple steps to do it to. You ready?

Install the Wordpress Plugin

Install the FeedSmith plugin. Directions and plugin link on the Google support page, so it’s pretty straightforward. Just upload the plugin and activate it from the plugins panel.

Update your .htaccess file

Update your .htaccess file to rewrite your /feed link. This will allow people to actually add your local feed link to feedreaders, then if the destination changes it won’t affect your users. For instance, if someone adds http://adamfortuna.com/feed to their feedreader, right now it’ll just redirect to FeedBurner. Later on this might go somewhere else, but I can do that without worrying about losing my (tiny) readership.

Very easy to do – and worth setting up if you plan on having your blog around for a while. Also it greatly reduces your server load not having to rely on your feed being checked every minute by loads of feed readers.

Railscast Style Syntax Highlighting for Wordpress

Railscasts has easily been the best learning tool for Ruby on Rails that I’ve used. When moving over into Rails, chances are your question will be answered somewhere in 173 episode show archive that grows weekly. If not you can always suggest a idea and Ryan Bates might just make a show out of it. If you’ve never been there then go check it out. I’ll wait.

All that looking at the Railscast textmate theme will make you completely fall for the colors. Just about everyone I know at IZEA uses the Railscast Textmate Theme because of this. It’s extremely easy on the eyes, with an indescribable comfort to it. It seemed only natural to want to apply that theme here on the blog as a step towards posting more code. Luckily creating any kind of markup theme with a point of reference is a piece of cake, just need some kind of Wordpress plugin to do the heavy lifting. There’s plenty of syntax highlighters out there, with one that called out as being the most feature rich and easy to implement. SyntaxHighlighter Plus is the winner for today.

Implementation

Very simple install, as with any Wordpress plugin. Just upload and activate. After that you’ll want to start changing the way you markup your code within your posts to use this new syntax. Instead of using <pre> tags like a number of other plugins, SyntaxHighlighter Plus uses bracket notation. For instance, this block would output some ruby code:

[sourcecode language='ruby'] CONSTANT="first" [/sourcecode]

In it’s finished form, here’s what it looks like. Complete with Javascript hooks for showing just the code, or printing.

# This is a comment
class Test
  @testingalongname = "Something here"
  CONSTANT = 2323
  def test
    return (1*5)
  end
end

Download it

Feel free to grab my very quickly hacked up SyntaxHighlighter Plus Railscast theme, and use if you’re using SyntaxHighlighter Plus. It’s still far from complete as far as syntax highlighters go, but if anyone else out there has any improvements on it, please drop me a line. I’m also looking for some thoughts on other syntax highlighter Wordpress plugins out there. Finding the right Wordpress plugin can sometimes be a bit overwhelming when there’s dozens that accomplish the same goal, so if you know of any that do it better, I’d love to look into them.

On Github

I added a project on github for this. If you want to make a change to my code, or add support for another Wordpress plugin, feel free to push your changes out to me and I’ll add them. Eventually maybe we’ll have railscast themes for all Wordpress plugins!

Adding a Lifestream to Wordpress

Sometimes a new service comes around that you know is powerful but you have trouble finding an actual use for it. Two of those that I’ve recently been looking into are FriendFeed and Yahoo Pipes. By themselves they’re nothing, but once you have a goal in mind both become powerful allies.

Adding some kind of a “lifestream” seems like all the rage these days, so I decided to give it a try using FriendFeed. I have to admit they make this extremely easy. Creating a page via a single js call is about as easy as it gets, although if the page was going to be hit often it’d be a good idea to do some kind of caching. FriendFeed is nice enough to provide some css hooks into the generated HTML that help with the finishing touches.

There is one type of service that wasn’t available on FriendFeed that I wanted to add to it though — movie reviews. Most movie sites are still walled gardens, despite the outcry from the open web community. IMDB has absolutely no API, although they do provide their data in txt files. That won’t help for getting your specific info though. FriedFeed does integrate with NetFlix, but it looks to be only for receiving queue notifications. Flixster seemed like the best choice for movie reviews, despite the awful interface of their website. Luckily you can do just about everything from Facebook. The problem is, Flixster doesn’t have any sort of API! Actually, no movie sites I’ve found provide so much as an RSS feed of your reviews (if you know of any, let me know). Enter Yahoo Pipes. Just a few weeks ago, someone created a Yahoo Pipe for transforming the XML that Flixster uses for it’s site widget into an RSS feed. Quite effective, and looks good (example). I still have my problems with Flixster, but at least it’s a start in integrating movie reviews.

The end result is a very basic lifestream page. There’s a lot more than can be done with this though. What if you were able to jump to a specific date and see activity? Or if there were check boxes to show/hide specific services? Not to mention all the styling you can do to it. Interested to see what people end up doing with their FriendFeed data.