A couple of days ago I stated that I hadn’t yet begun looking for a navigation link plugin for WordPress yet, because I imagined that I could write one just as quickly myself rather than sift through a zillion plugins that all do the same thing in addition to suffering from bad cases of optionitis.
But I didn’t exactly start to write a plugin after I penned that. Nor did I start to look for one.
Until today. Writing one that is.
Features
- Adds a “Start” relational resource link pointing to the front page.
- Adds “Previous”/“Next”, “First”/“Last” relational resource links in the head, for quick navigation of posts or archives.
- Adds an “Author” relational resource link pointing to the archive for the author when single posts are shown.
- If the Creative Commons Configurator plugin is active a relational copyright resource link pointing to the license deed will be added.
Compatibility
This plugin has not yet been tested with WordPress 2.1 for compatibility. However, it has been audited following the notes from the WordPress developers and it should be compatible. As reported in the comments below, the plugin is not yet compatible with WordPress 2.1. Stay tuned for an update.
Download
The latest version (version 1.3) of the plugin can be downloaded as dahnielson_rellink_v13.zip.
Installation
- Download the dahnielson_rellink_v13.zip archive.
- Unpack the zip archive into your WordPress
pluginsdirectory. - Activate the plugin in the WordPress administrator panel.
- Important: You have to specify a language by setting the
WPLANGconstant in thewp-config.phpfile, even if you use English as default.
Usage
When activated, the plugin add a number of relational resource links to the (X)HTML head. Browsers that recognise and support such links will use them to enhance the users experience of your site by providing additional in-browser navigation.
If the visitor are using Opera, and by enabling the “Navigation Toolbar”, an additional navigation bar with the supported links will be shown at the top of the browser making browsing of a site easier.
The links also provide accessibility enhancement for non-traditional browsers.
Example
This site is currently running the latest version. Take a look at the head in the source or if your browser implement it, turn on the “navigation bar” and try to navigate the site. Handy, eh?
ChangeLog
- 1.0: Initial release.
- 1.1: Minor fix
- 1.2: Added permalink as
rel-bookmarkfor single posts, andrel-upfor navigation from daily to monthly to yearly archives to frontpage. - 1.3: The “I can’t believe I didn’t think of that in the previous one” release. Added
rel-upto single posts.
9 comments
I like the looks of it, but unfortunately it failed to load in my WordPress installation (WP 2.0.4). I get this error:
just after activating the plugin and on every subsequent page access. Any thoughts?
That’s weird. Looks like your WordPress installation doesn’t include the
CachedFileReaderclass found inwp-includes/streams.php. If the file exists, maybe it has the wrong file permissions set.The error occur when the plugin try to load the MO file containing translated strings. As a temporary solution, comment out line 28 in
dahnielson_rellink.php. But I strongly recommend fixing thestreams.phpfile for obvious reasons.I found the reason, by pure accident!
Apparently, you have to set the
WPLANGconstant , even if the blog use default English, since the plugin use gettext. Add the following to your wp-config.php:I think this behavior is a bug in WordPress. If no language is specified it shouldn’t try to load any translation at all. But it do no harm to specify a language: if no translation exist for a string, it will use the original untranslated string as fallback.
Great instincts! That did the trick. In actuality, my wp-config.php file had this line already:
I added the “
en_US” locale and your plugins are working now. Thanks for the reply.Hi, Your plugin worked fine for me, except that it works only on default template.
The one I use, instead, doesn’t show the relational links (in particular the previous and the next ones).
My site is italian, and I correctly configured the WPLANG in wp_config.php.
No error … just, it works only on default.
Have you any ideas ?
you can take a look at the site(don’t bother the language), if you want.
Thank you
Regards
Ehol
no longer works with wp 2.1… SQL query errors
Thanks for pointing it out!
I will update the plugin once I’ve upgraded WP myself (probably tomorrow).
I’ve upgraded WP now and see the SQL error. The quick fix for the moment is to comment out the
elsestatement in the functiondahnielson_get_max_page($max_page)function. That way the plugin will almost work, meaning it provide correct links on post pages but not on the front page and archive pages. But don’t worry, I’ll figure out how to fix it properly.I am glad I found this page.. Thanks for posting the solution to “/wp-includes/wp-l10n.php Fatal error: Class ‘CachedFileReader’ not found in” problem.
Cheers.
One Trackback/Pingback
[…] Visit […]
Post a comment