« Bay Area Law School Technology Conference, 2005 | Editing old posts in b2evolution » |
Acronym support for b2evolution quicktags toolbar
blogging, hacks, open sourceI've always wanted to be able to easily markup <acronym>
tags in b2evolution.
There is a plugin, autoacro, for b2evolution that automagically turns certain pre-defined acronyms into markup with the <acronym>
tag. That's not what I wanted, so I created my own hack to the b2evolution quicktags editing toolbar to support adding a random acronym to your text.
For example, Let's say you have the following text in a post:
CAPTCHA is an acronym
With my new hack to the _quicktags.toolbar.php
plugin, you could select CAPTCHA
, hit CTRL-Z (ALT-Z on Windoze) and enter Completely Automated Public Turing Test to Tell Computers and Humans Apart
and it would produce the following markup:
If you run b2evo and would like to add this functionality to your blog, do the following (I'm assuming that you have the _quicktags.toolbar.php
shipped with version 0.9.0.10 of b2evo):
Download my patchfile for the
_quicktags.toolbar.php
plugin (located in theplugins/toolbars/
directory of your b2evo install).Type:
patch < quicktags_toolbar_acronym.patch
That should do it. You should now be able to see the "acronym" button in the editing toolbar (as in the above image). You can also hit CTRL-Z (ALT-Z on Windoze) to activate this function without using the mouse. Note: if this doesn't work for you, you can type
patch -R < quicktags_toolbar_acronym.patch
and this should restore the_quicktags.toolbar.php
file to what it was before.
UPDATE [2005-04-08 13:32:30]: I've changed the tag from <acronym>
to <abbr>
according to suggestions on the Markdown list. I've also added support for adding mouse-over footnotes using <a class="footnote" title="text of footnote">
.