AcronymToLink Plugin

This plugin isn't bundled with any XWiki product by default.
Plugin contributed by Zeljko Trogrlic.
This plugin can be downloaded.

AcronymToLink Plugin

Have pages with lot of acronyms? Don't want to convert them to links one by one? Then grab this plugin; it will convert all acronyms to links!

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]
      Warning: Double all backslashes, I cannot enter them that way
    • open /META-INF/services/com.xpn.xwiki.render.filter.XWikiFilter
    • add
      com.xpn.xwiki.render.filter.XWikiAcronymToLinkFilter
      before
      com.xpn.xwiki.render.filter.XWikiLinkFilter
    • put XWikiAcronymToLinkFilter.class to /com/xpn/xwiki/render/filter
  • ZIP everything and replace original xwiki.jar
    Warning: Check that directory structure inside JAR file same as in original! Some archivers will add parent directory that will cause malfunction. Safest way to go is to enter directory and do the zipping rather than zipping top level directory.

Example

Another use of a NAS would be in VoIP.

Result

Another use of a [NAS] would be in [VoIP].

Tags:
Created by zeljko on 2007/03/29 18:47
Last modified by Vincent Massol on 2007/12/10 08:57

This wiki is licensed under a Creative Commons license
2.2.1.27354