Chip's Tips for Developers

Contains coding, but not narcotic.

OPML Browser with class

March 30th, 2007 3:52:28 pm pst by Sterling Camden

Well, the OPML Browser plugin for WordPress has only been released for two days and already we’re up to version 1.1. Hopefully this one will last a while longer.

I added a new feature: start with all folders closed. Selecting this option will display the browser with all categories collapsed initially, unless the browser doesn’t support Javascript (otherwise the user wouldn’t be able to open them!).

I also completely reworked the code, using a class for the rendering engine. That allowed me to eliminate all global variables (almost always a good thing) and reduce the number of parameters being passed around. I still say PHP’s object syntax sucks, but it’s a good bit better than what I had before.

I even added some comments.

Let me know how you like it.

UPDATE: Get the latest version here.

Posted in JavaScript, OPML, PHP, RSS, Web, Wildly popular, WordPress | 16 Comments » RSS 2.0 | Sphere it!

16 Responses to “OPML Browser with class”

  1. [...] users, check out the new OPML Browser for WordPress. Paul McGillivary likes it — it’s already up on ContentQuake. Many thanks to Paul and [...]

  2. Chip – You have outdone yourself again! Works like a charm and is actually a milestone in WPplugins if you ask me!

  3. Glad you like it, Tony! And I’m also glad to hear that the URL filtering is working correctly for you now.

  4. Ugh… Any odds there’s a short, dummy proof version of the license somewhere?

    D.

  5. Basically it means you can use it for anything you want, even commercial sites. You just can’t claim it’s your work — give credit where credit is due (CCD).

  6. If you put it on a public site, let me know and I’ll link to you. I like to give link-love to users.

  7. Chip – Is there anyway to add a function to allow the OPML to change the order of categories rather than the default alpha order? ie. I would like to put partner sites category above info sites category.

    I found a plugin that allows just that but ofcourse that only affect if you use the WP blogroll rather than your most excellent script.

  8. I found a “bug” – the URL Address is case sensitive – so if I have http://www.Dellnews.info (in the blog roll) on http://www.dellnews.info with the option to exclude same site urls it would still display the URL since it assumes Dellnews.info and dellnews.info is two different domains. :/

  9. Tony, the OPML Browser plugin does not sort the items, so you should be able to order them as you like them in the OPML file.

    I’ll see about fixing that case-sensitivity thing.

  10. [...] Get the latest version here. Tags:Chip’s Tips for Developers: blogroll opml php phpopmlbrowse widget wordpress [...]

  11. [...] watch:  Shack Dougall uses the OPML Browser widget for WordPress, and even gave me a good suggestion for it. Tags:Chip’s Quips: [...]

  12. [...] watch:  1Stein.org (nice pun in German) uses the OPML browser widget.  Dollyrock (a blog for a fashion store within Second Life) uses the tag cloud widget, along [...]

  13. [...] now ignores differences in case when comparing domain names.  Thanks to Tony Lindskog for finding that [...]

Leave a Reply

Better Tag Cloud