Elgg plugin settings

Often plugins require or allow users to define certain parameters. This makes plugins more robust and user-friendly. Elgg allows developers to build very simple to very complex interfaces to collect this data from users. This section covers the how and why of creating user-friendly plugins settings interfaces.

We would be creating a custom spotlight plugin called xspot. Spotlight is the block that appears at the bottom of the page and is very useful for providing links to help files and other useful information.

To create the plugin, we need to first create a directory inside the mod directory

$ cd mod
$ mkdir xspot

Then we create a manifest file (manifest.xml) inside this xspot directory:

<?xml version="1.0" encoding="UTF-8"?>
<plugin_manifest>
    <field key="author" value="Nazim Rahman" />
    <field key="version" value="0.1" />
    <field key="description" value="Provides custom spotlight content" />
    <field key="website" value="molecularsciences.org" />
    <field key="copyright" value="Copyright 2011" />
    <field key="licence" value="GNU Public License version 2" />
    <field key="elgg_version" value="2011072201" />
</plugin_manifest>