Optionally provide private feedback to help us improve this article...

Thank you for your feedback!

How to register Plug-Ins with InstantForum

Once you've created your InstantForum plug-in you should have a DLl file containing all your plug-in code and a ASP.NET user control (.ascx) file containing your plug-ins controls & mark-up.

If we use our Hello World example we'll need to simply copy the user control (.ascx file) into the "Plugins" folder within the root of your InstantForum folder. You can set the location to look for your .ascx file from within your plug-ins code-behind by setting the SkinFileName property within your plug-in constructor. This is used to tell the code where to look for your plug-in user control. 

Copy your plug-ins DLL into the InstantForum bin directory...

Make InstantForum aware of your plug-in

Once you've copied your plug-in user control & DLL you'll need to let InstantForum know to use your plug-in. This is very simple and will require a couple of lines of code within your InstantForum web.config file.

let the .NET framework know which class to us to process our custom configuration section within the web.config. If your using InstantForum 2010 or above this section is already included within your web.config file.

<sectionGroup name="InstantASP.Common">
<section name="Plugins" type="InstantASP.Common.Plugins.PluginSectionHandler" />

Then add your custom plug-ins within the web.config as shown below...

<Plugin type="InstantForum.Plugins.HelloWorld, InstantForum.Plugins.HelloWorld" />

The "type" attribute within the Plugin element conains the full path to your plug-ins class and the plug-ins assembly name. 

For example...

<Plugin type="YourNameSpace.YourClassName, YourAssemblyName" />

In our example our Hello World Class is located within the InstantForum.Plugins namespace and this is compiled into an assembly with an identical name. So our HelloWorld Plugin element reads..

<Plugin type="InstantForum.Plugins.HelloWorld, InstantForum.Plugins.HelloWorld" />

You can of course add as many plug-ins as you wish here.

Once you've added your plug-ins to the web.config file you should open your instance of InstantForum within a web browser to test your plug-in is working correctly.