Dashboard > blojsom > ... > Available Plugins > Macro Expansion Plugin
  blojsom Log In   View a printable version of the current page.  
  Macro Expansion Plugin
Added by David Czarnecki, last edited by David Czarnecki on Jan 23, 2005  (view change)
Labels: 
(None)

Description

The macro expansion plugin expands $macro$ references that it finds in your blog description and expands them into its full form.

It is a timesaver plugin to save you from repeatedly typing in portions of blog entries that you use over and over again. For example, you might want to be able to expand friend's names into URLs that point to their blogs.

Installation and Setup

In your global /WEB-INF/plugin.properties file, add the following line:

macro-expansion=org.blojsom.plugin.macro.MacroExpansionPlugin
macro-expansion-admin=org.blojsom.plugin.macro.admin.MacroExpansionAdminPlugin

You may then add "macro-expansion" to one of the flavor-based plugin chains. These plugin chains can be found in the individual user's plugin.properties file. For example:

html.blojsom-plugin-chain=macro-expansion

The macro expansion plugin has its own configuration file that is referenced in /WEB-INF/web.xml. For example:

<init-param>
    <param-name>plugin-macros-expansion</param-name>
    <param-value>macros.properties</param-value>
</init-param>

The macros.properties file will be located in the respective /WEB-INF/(blog-id) directory and contains key=value pairs like the following:

blojsom=http://blojsom.sf.net

ypm=Yeah, Pretty Much

Required Permissions

A user must have the following permissions in order to use the macro administration plugin.

macro_expansion_admin

Usage and URL Parameters

Usage

In your entries, simply reference your macros using the $macro$ syntax. The $macro$ references are also case insensitive.

For example, "... and then he said, $ypm$ " in your blog description would expand to "... and then he said, Yeah, Pretty Much "

Site running on a free Atlassian Confluence Open Source Project License granted to blojsom. Evaluate Confluence today.
Powered by Atlassian Confluence, the Enterprise Wiki. (Version: 2.5.4 Build:#809 Jun 12, 2007) - Bug/feature request - Contact Administrators