December 18th, 2010 1:35:28 pm pst by Sterling Camden
When we last left our valiant plugin, it had just succeeded in implementing all of the features requested by László Monda, except for one: László wanted to be able to use the rss.png from /wp-includes/images to avoid an extra GET request when loading the page. Although I had provided a way to override the location for the images, he didn’t want to put all of the images in /wp-includes/images, because that directory gets overwritten by upgrades to WordPress. He resorted to making a one-line custom modification to the code.
Well, I hate forcing people to patch my code for the functionality they desire. I can also see his point. Although the overhead of a single GET does not concern me much, I imagine in bandwidth-restricted circumstances every little bit helps. On the other hand, I don’t want to hard-code the location of this image, because existing users may be customizing the images used for the opml-browser plugin. So, I implemented László’s change as an option: the “Monda option” — or more verbosely, “Use rss.png from wp-includes/images?” This option overrides the “Image URL” option for rss.png only.
This one change accompanies a bump to version 2.4. Download links below.
Oh, and if you’re wondering about the word “legendary” in the title of this post, just ask Google a mindent tudni.
Posted in OPML, PHP, Web, WordPress | 6 Comments » RSS 2.0
December 11th, 2010 5:38:17 pm pst by Sterling Camden
I never seem to be able to stick my fingers in a WordPress plugin without getting them nasty. After I released version 2.2 of the OPML Browser, László came up with several more suggestions. I didn’t agree to all of them, but here are the ones I’ve included in version 2.3:
- Added option for “Show clickable folders for categories”, with a default value of true. You can now uncheck this option to suppress the folder icons. Of course, if you do that, the user cannot collapse categories.
- Escape any special HTML characters found in the text, title, description, xmlUrl, or htmlUrl attributes, but without double-escaping.
- Changed img tags to use the “id” attribute instead of the obsolete “name” attribute.
The last two items allow the widget to validate cleanly at html5.validator.nu.
I shall now go wash the PHP off my hands.
December 7th, 2010 2:55:34 pm pst by Sterling Camden
A user (I have users?!?) named László Monda offered some enhancement suggestions for my OPML Browser plugin for WordPress. I have implemented them in version 2.2, which you can download from the links below.
Specifically, I added the following options:
- Image URL, defaulting to the previous hard-coded location (images subdirectory). László wanted to be able to reuse the rss.png in the /wp-content/images directory instead of loading two RSS icons. He can do that now by changing the “Image URL” in the widget options to that directory and making sure that all of the needed images are located there.
- Include OPML descriptions as tooltips, with a default value of true. If you uncheck this option, then no tooltips will be displayed. I also added a delay of one second between the mouseover and the tooltip display.
- Include “Get this widget” link?, with a default value of true. If you uncheck this option, the link will not be displayed and you must either plaster my praises all over your blog or reconcile your conscience to your ingratitude in some other way.
I also took this opportunity to move the OPML Browser project into a Mercurial repository on BitBucket, and to offer a .tar.bz2 download in addition to a .zip format. Enjoy!
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 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.