Editing version 3 of page Plugins (the most recent revision is 10)
Use template:
None
API_Template
DevTrack_Template
Version_Template
Developing plugins for Aneuch is easy and fun. Plugins are simple PERL scripts that allow you to extend the feature set of Aneuch.
All plugins will reside in a folder called 'plugins' that lives within the $DataDir. Plugin names will end in either '.pl' or '.pm'. If you want to disable a plugin, simply add '.disabled' (or anything, really) to the end of its name and it will not be loaded.
Plugins should have a hash-bang (#!) line at the very top that points at PERL, normally **`#!/usr/bin/perl`**. The next line will say **`package Aneuch;`**. Following that should be a line that says **`push @Plugins`** followed by a string which contains plugin name, version, and a description and link to plugin homepage. An example would be:
**`push @Plugins, "<a href='http://aneuch.myunixhost.com/Plugins_PlainHTML'>plainhtml.pl</a>, version 1.0 - Allows the use of plain HTML pages (instead of markup)";`**
After this, a plugin may begin defining variables and subs as it sees fit.
A plugin may replace a built-in sub by doing the following:\\
**`*OldMarkup = *Markup;\\*Markup = *NewMarkup;`**
\\And then go on to define sub NewMarkup.
==Hooks==
It's relatively easy to hook in to certain subsystems within Aneuch. For example, if you want to create a plugin that adds some functionality to the administrative back-end, you simply add an entry to the **%AdminActions** and **%AdminList** hashes.
**%AdminActions** defines the action and it's associated subroutine. If you want to create an action called "deleteall" and have it call the sub "DoAdminDeleteAll", you would define it as: **`$AdminActions{deleteall} = \&DoAdminDeleteAll;`**
You must then also add an entry to **%AdminList** so that this feature shows up in the administration back-end. Using our above example, you would create a new entry in the **%AdminList** hash with the same name as the one you added to **%AdminActions**. For our example, it would be defined as: **`$AdminList{deleteall} = 'Delete all pages';`** This page is a template
Summary:
User name:
Upload a file
By contributing to this wiki, you acknowledge that you waive your right to claim copyright of your individual contributions. The text of this site is uncopyrighted and released to the public domain.
Show markup help Styling **bold **, //italic //, __underline __, --strikethrough--, `teletype ` Headers = Level 1 =, == Level 2 ==, === Level 3 ===, ==== Level 4 ====, ===== Level 5 ===== (ending ='s optional) Lists * Unordered List, # Ordered List, ** Level 2 unordered, ### Level 3 ordered (up to 5 levels, NO SPACES IN FRONT) Links [[Page]], [[Page|description]], [[http://link]], [[http://link|description]] Images {{image.jpg}}, {{right:image.jpg}} (right aligned), [[link|{{image.jpg}}]] (image linked to link), {{image.jpg|alt text}} Extras ---- (horizonal rule), ~~~~ (signature)