Slashcode Log In
HOWTO For Plugins
HOWTO-Plugin - How to write and use Slash plugins
A plugin is an extension to the Slash system that adds some sort of functionality to the site. It should inherit its basic look and feel from the currently running theme (for example, backgroun/foreground colors, calling header and footer components, etc. will be handled by the installed theme).
There are two ways to do this. First, you can put it in the
plugins directory with the distribution. During the install it
will be copied to the plugins directory in (by default,
If you look at the plugins that come with Slash you will find a file called PLUGIN. This handles how the plugin installer will see your plugin. The syntax is that each keyword must appear on a line by itself with a '=' seperating it and the directive. The following are the keywords it knows:
- What will be displayed during the install for the user, describing what the plugin does
- Schema for MySQL
- Dump for MySQL
- Schema for PostgreSQL
- Dump for PostgreSQL
- A document to be installed in the htdocs directory for the Slash site
- A template to be installed in the database
- An image to be installed in the image directory
- A note to show the user when the install is over. Good place to put notes about aditional libraries needed, or other dependencies.
Use the install-plugin tool. If you call it with a -? it will give you its basic syntax. If run it will list what plugins it knows about and you can then select which plugins you want (just like the install).
Yes, you can find it in the Slash::Install library.
I have a really cool plugin and I would like to see it added to the Slash distribution. Will you distribute mine?
Maybe. We don't have any rules concerning this at the moment, so it will be on a case by case basis. At some point in the future we will come up with a much better answer.