Acronym To Link Plugin
Last modified by Thomas Mortagne on 2026/02/26 15:38
| Converts Acronyms to Links |
| Type | Plugin |
| Category | |
| Developed by | xwiki:XWiki.zeljko |
| Rating | |
| License | GNU Lesser General Public License 2.1 |
Description
On order to recognize word as acronym, it should:
- have at least two letters
- start with upper case letter
- end with uppercase letter or number.
Some examples: TCP, VoIP, IPv6.
Installation
Installation is not standard, but it is also not complicated:
- go to your web application directory and find xwiki/WEB-INF/lib/xwiki.jar
- unzip xwiki.jar using any ZIP-compatible archiver
- inside unpacked folder:
- open radeox_markup_xwiki.properties
- add anywhere
filter.acronym.match=\\\\b\[A-Z\]\[A-Za-z0-9\]\*\[A-Z0-9\]\\\\b(?!\[^<\\\\[\]*\[>\\\\]\])
filter.acronym.print=[$0]- open /META-INF/services/com.xpn.xwiki.render.filter.XWikiFilter
- add
com.xpn.xwiki.render.filter.XWikiAcronymToLinkFilterbefore
com.xpn.xwiki.render.filter.XWikiLinkFilter
- put XWikiAcronymToLinkFilter.class to /com/xpn/xwiki/render/filter
- ZIP everything and replace original xwiki.jar
Example
Another use of a NAS would be in VoIP.
Result
Another use of a [NAS] would be in [VoIP].
Prerequisites & Installation Instructions
Follow these steps:
- Add the JAR in your container classpath (WEB-INF/lib)
- Edit xwiki.cfg and add the following line to the list of plugins :
xwiki.plugins=\ [...] ... ,\ <plugin package> - Restart your container
- Verify the plugin is properly installed by typing the following in a wiki page :
{{velocity}} $xwiki.<plugin name>.name {{/velocity}}If the installation has been successful, you will see <plugin name>.