Plugin XML reference
This reference describes the elements and attributes that make up a plugin configuration XML file.
A plugin includes the following elements in no particular order.
<plugin>
<!-- The following in any order. -->
<class>
<name>
<description>
<author>
<authorURL>
<pluginURL>
<version>
<minServerVersion>
<maxServerVersion>
<databaseKey>
<databaseVersion>
<components>
<css>
<javascript>
<soy>
<widget>
<macro>
<urlmapping>
<sitemesh>
</plugin>
<author> element
The name of the individual or company that created this plugin.
<author>xs:string</author>
<authorURL> element
URL location relating to the author, such as the author's web site.
<authorURL>xs:string</authorURL>
<class> element
The name of the class that implements com.jivesoftware.base.plugin.Plugin for this plugin.
<class>xs:string</class>
<components> element
Specifies user interface components added by this plugin. For more on the XML used here, see UI components XML reference.
<css> element
Specifies a CSS stylesheet for use in the plugin.
<css src="xs:string" />
Attributes
- src
- A path to the CSS file based from the root of the src (for example,
/resources/plugin.css
).
<databaseKey> element
Key representing this plugin's database schema in the Jive SBS database. Used in the jiveVersion table to store schema version information. Only required if the plugin has a DB schema.
<databaseKey>xs:string</databaseKey>
<databaseVersion> element
The version of the database schema supported by this version of the plugin. Increment this value to provoke schema updates when the plugin is upgraded. Only required if the plugin has a DB schema. Not supported in version 2.5.
<databaseVersion>xs:integer</databaseVersion>
<decorator> element
Specify a custom SiteMesh decorator for the plugin.
<decorator
name="xs:string"
page="xs:string">
<pattern>
</decorator>
Attributes
- name
- The name of the custom decorator; this must be unique.
- page
- The name of the custom decorator page; this must live under the plugin.
<defaults> element
A set of default values for a macro parameter. Include more than one value when the set of possible values is known in advance.
<defaults>
<value>xs:string</value>
</defaults>
<description> element
A short description of this plugin.
<description>xs:string</description>
<excludes> element
Specifies URL patterns that SiteMesh should not decorate.
<excludes>
<pattern>
</excludes>
<javascript> element
Used to define custom Javascript information from a plugin.
<javascript
src="xs:string" />
Attributes
- src
- A path to the Javascript file based from the root of the src (for example,
/resources/plugin.js
).
<soy> element
Specifies a list of soy templates to be automatically imported as client-side templates on every page. (Client-side Soy templates are converted into Javascript that needs to be imported into a page for the templates to be used).
<soy src="xs:string" />
Attributes
- src
- Comma-separated list of paths to the Soy files that should be automatically included.
<macro> element
Describes a custom macro.
<macro
name="xs:string"
type="text | inline | image"
url="xs:string"
hasBody="xs:boolean"
class="xs:string"
script="xs:string"
icon="xs:string"
showInRTE="xs:boolean"
isButton="xs:boolean"
order="xs:integer">
<parameterSet>
</macro>
Attributes
- name
- The macro's name as it should appear in the editor's Insert menu.
- type
- How this macro will display when it's published. Available values:
- text
: Displays text typed by the user (usually formatted by the macro).- inline
- url
- A URL where the macro can be found.
- hasBody
true
to specify that this macro- class
- Fully-qualified name of the macro's Java class. The class must implement com.jivesoftware.base.plugin.Macro.
- script
- A macro script. The following languages are supported:
- groovy
,- python
,- ruby
,- javascript
,- NetRexx
,- Tcl
,- XSLT
. - icon
- The icon used in the content editor to visually represent the macro. The image will be loaded from the images directory of the plugin. The following image file formats are supported: gif, jpeg, jpg, png
- showInRTE
true
to enable this macro for use in the rich text editor.- isButton
- true to render the macro as a button in the RTE toolbar instead of the insert button's menu.
- order
- The order in which this macro is processed when rendering the content. Higher numbers are rendered later. So a higher number is needed for a macro that relies on particular content already having been rendered.
<maxServerVersion> element
The minimum version of the server that this plugin requires.
<maxServerVersion>xs:string</maxServerVersion>
<minServerVersion> element
The minimum version of the server that this plugin requires.
<minServerVersion>xs:string</minServerVersion>
<name> element
The name of this plugin to be displayed when viewed in the Admin Console.
<name>xs:string</name>
<parameter> element
Defines a macro parameter, along with default values, if any.
<parameter
name="xs:string"
value="xs:string">
<defaults>
<value>xs:string</value>
</defaults>
</parameter>
Attributes
- name
- The parameter's name.
- value
- The parameter's value.
<parameterSet> element
Defines a named macro parameter set. A parameter set provides an easy way to set several macro properties at once.
<parameterSet
name="xs:string">
<parameter>
</parameterSet>
Attributes
- name
- The parameter set's name as it should appear in the editor Insert menu.
<pattern> element
A URL pattern used by either of the SiteMesh tag children: decorator or excludes. Examples
of a pattern would be: - /foo*
, - *.bar
<pattern>xs:string</pattern>
<pluginURL> element
URL of where the plugin lives.
<pluginURL>xs:string</pluginURL>
<sitemesh> element
<sitemesh>
<!-- The following in any order. -->
<decorator>
<excludes>
</sitemesh>
<urlmapping> element
<urlmapping
prefix="xs:string"
class="xs:string" />
Attributes
- prefix
- The URL prefix to map actions to. An example would be
/foo
. - class
- The class of the URL mapper.
<value> element
Specifies a possible default value for a macro parameter.
<value>xs:string</value>
<version> element
The version of this plugin.
<version>xs:string</version>
<widget> element
Configuration for a custom widget.
<widget class="xs:string" />
Attributes
- class
- The widget's fully-qualified class name. The widget class must extend com.jivesoftware.community.widget.BaseWidget.