Writing Your Own Plug-In

he Graffiti plug-in system allows developers to execute their own code at key events in the Graffiti application life cycle.

Graffiti's plug-in system very closely resembles ASP.Net's HttpModules or Community Server's CSModules.

In the simplest form, here is how you would write a custom plug-in:

  1. Create a new class which derives from Graffiti.Core.GraffiitiEvent.
  2. Override the Init method and wire up one more more Graffiti events.
  3. Compile your class and deploy the assembly to the bin directory.
  4. Once deployed, you will need to navigate to Control Panel > Site-Options > Plug-ins and enable/activate the plugin. By default, all Graffiti plug-ins are disabled.

Before we go over the available events, it is important to point out that similar to Widgets, events also support EditableForms.