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 /WEB-INF/classes/blojsom-plugins.xml file, add the following:
<bean id="macro-expansion" class="org.blojsom.plugin.macro.MacroExpansionPlugin" init-method="init" destroy-method="destroy">
</bean>
<bean id="macro-expansion-admin" class="org.blojsom.plugin.macro.admin.MacroExpansionAdminPlugin" init-method="init" destroy-method="destroy">
<property name="servletConfig">
<ref bean="servletConfigFactoryBean"/>
</property>
<property name="authorizationProvider">
<ref bean="authorizationProvider"/>
</property>
<property name="resourceManager">
<ref bean="resourceManager"/>
</property>
<property name="fetcher">
<ref bean="fetcher"/>
</property>
</bean>
You may then add "macro-expansion" to one of the flavor-based plugin chains.
Required Permissions
A user must have the following permissions in order to use the macro administration plugin.
macro_expansion_admin_permission
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 "