webmages

June 14, 2005

External Link Icons

Filed under: Uncategorized — Mark Andrachek @ 9:04 pm

I’ve just finished my very first WordPress Plugin! It’s called External Link Icons,. It expands upon the idea in my earlier post, applying styles to external links. Instead of just changing colors and setting a target, this time around I use javascript to alter all external links to include the wikipedia external link icon.

It should be very easy to install (unarchive it in your plugins directory, and enable the plugin in wp-admin). See the readme.txt for more info.

If you use it, and like it, let me know.

Get the latest here:
.zip
.tar.gz
.tar.bz2
browse old releases

Revision history
Version 1.2
This fixes a couple of minor bugs, and adds a user-customizable url target in the admin. Release now includes .tar.bz2, .tar.gz, and .zip.

Version 1.1
Some folks were having problems with php warnings. I’ve modified everything to be “good code” that doesn’t generate any warnings — at least on PHP5. Since the javascript and css are actually output by PHP, a warning being output in the middle of a javascript can be disasterous to the script.

You might consider, if you have the control, to disable warning and error messages on production systems — send them to a file or syslog instead. You can do this through the php.ini, or through your .htaccess file.

Version 1.0
Why the big version jump? Well, it now includes an admin page allowing you to easily change the class that gets applied to the links, the containers to which the automatic css gets applied, and best of all, it lets you set the unique identifier that’s used to to exclude your local site from being linked. The ability to easily define multiple images (like changing colors on mouseover), as well as easily changing images, will be coming in Version 2.0. It also no longer overrides your specified link colors and decorations.

Version 0.3
- fixed javascript to be compatible with other onload scripts.

Version 0.2
- fixed internal anchor url’s (they’re local now).
- added styles for .entrytext

Version 0.1
- first release.

Blog at WordPress.com.