This page and the OPML Renderer are deprecated. In a few seconds, you will be automatically redirected to the page for Optimal, which now can be installed as a WordPress plugin.
OPML Renderer renders valid OPML from any source as an expandable/collapsible list.
XSL stylesheets are used to transform the OPML from XML to HTML. Two XSL stylesheets are included: one for use in pages or posts and one for use as a sidebar item .
OPML Renderer is invoked through either a new content filter or a new template function.
To access the content filter, use the following in a page or post (without spaces):
!OPMLRender : url,updatetime,page|sidebar
To access the template function, use the following:
<? OPMLRender('url','updatetime','page|sidebar'); ?>
- 'updatetime' is the number of seconds to cache a file before requesting an update
- 'page' or 'sidebar' indicates which XSL transform to use
Click here to download the latest version.
This is beta software, so please use with caution and report any problems.
Images are included as of version 0.5.
Thanks to iconophobia and the inlineRSS plugin for some code and ideas.
And great thanks to Dave Winer for his work on OPML.
Installation
- Unzip opmlRenderer.zip into your plugins directory. It should automatically create a new subdirectory.
- Activate the plugin.
That's about it!
You may want to edit the XSL stylesheets to use your own icons or change the appearance of the rendered HTML. Links to do so are provided in the plugin's description on the Plugin pane of the Admin panel.
I'm very sorry. At least I didn't destroy your data, right?
Version 0.6
opmlRenderer.php - Bug in OPMLContent function prevents usage of content filter with remote URLs that have a query string. (fixed in development version)
Version 0.5
opmlRenderer.php - Error in error message handling. (fixed in development version)
Should probably find a way to indicate that remote OPML is being fetched. (done in development version)
Need to rework the XSL stylesheets' determination as to whether or not to use bulleted lists or bullet certain list items. (done in development version)
Maybe bullet all lists but nobullet list items with children, opml list items and rss list items.
Need to see if plugin works as expected with WordPress 2.0 (done in development version) and PHP 5+ (OPEN)
Need to turn off caching of local files. (done in development version)
Need to fix XPath expressions, e.g., from @htmlUrl to @htmlUrl!="". (done in development version)
Long-term goals:
Add inclusion of RSS/RDF/Atom feeds
Add more flexibility in initial expand/collapse state
Move caching to database
Improve administrative interface, such as including the ability to add user XSL stylesheets
Version 0.4
Currently generating valid XHTML 1.0 Transitional. If you're using a different version, your pages probably won't validate unless you tweak the XSL stylesheets.
Version 0.3
Not generating valid XHTML. My mistake! I'm fixing this for the next release.
Using a variable with the same name as a parameter. Will fix.
Version 0.2
If you're using the :before CSS selector to generate "fancy" bullets on list items, you probably will still want to edit your CSS to eliminate those fancy bullets. For example, here's my stylesheet.
Version 0.1
Dies on any failure to grab your OPML file. I will change this behavior so that instead it loads the cache file, if available, and if no cache file is available, it will die more gracefully.
Uses CSS classes in the XSL stylesheets, which you probably have not defined. I will change them to use explicit CSS styles.

Verions 0.6
(There should be stuff here, but I seem to have over written this file with an older version. Basically, I fixed all the errata in version 0.5.)
Version 0.5
New feature - OPML inclusion.
All files - Having learned more about creating WP plugins, the javascript was moved to the document head.
Images are now included.
Version 0.4
opmlRenderer.php - Deletes cache file upon XSLT processing error, because this error is usually caused by a corrupt cache file (usually, an error page cached when trying and failing to grab a remote OPML file).
opmlRenderer.php - Changed the regex to capture and discard paragraph elements that get added by the wpautop filter. Necessary to enable the page to validate.
opmlRenderer-page.xsl, opmlRenderer-sidebar.xsl - Corrected some invalid XHTML.
opmlRenderer-page.xsl, opmlRenderer-sidebar.xsl - Renamed a variable that had the same name as a parameter.
opmlRenderer-page.xsl, opmlRenderer-sidebar.xsl - Added a div wrapper to rendered text to give user more flexability to change the presentation.
Version 0.3
opmlRenderer.php - Added a check to ensure that allow_url_fopen is enabled if a remote OPML file is requested. Will emit an error message upon failure without dying.
opmlRenderer-page.xsl, opmlRenderer-sidebar.xsl - Cleanup and more CSS class sanitizing. No classes are used. Lists should render better on Internet Explorer.
opmlRenderer-page.xsl, opmlRenderer-sidebar.xsl - Changed the rendering of reading lists. The title always links to the home page (if available), and the feed may be viewed by clicking the XML icon.
Version 0.2
opmlRenderer.php - Changed behavior upon failure to grab the specified OPML file or XSL stylesheet. Now, instead of dying upon failure to grab the OPML file, the cache file is displayed, and if there is no cache file, an error message is displayed and script execution continues. If the XSL stylesheet cannot be read, an error message is displayed and script execution continues.
opmlRenderer.php - Added a comment to the end of the rendered HTML if the cache file was used.
opmlRenderer-page.xsl, opmlRenderer-sidebar.xsl - Changed to use CSS styles instead of CSS classes, since users (other than the author) would not likely have those CSS classes (nobullet, blogrollbutton, opmlFolder) defined. N.B. - continues to use "nobullet", but only certain users should be affected (see errata).
Version 0.1
Created

WordPress › Plugin: OPML Renderer « WordPress Support