| SigmaPro Plug-In Manager
The OnyakTech Plug-In Manager was developed for SigmaPro to allow you to add additional functionality to SigmaPro (it’s just like adding modules to DotNetNuke). The Plug-In Manager is a required install even if you have no intentions of using plug-ins.
Install the Plug-In manager just like any other module in DotNetNuke. Then add it to a page secured to administrators. In order to use Plug-Ins, your site must run with Full Trust security. You can not use plug-ins in a Medium Trust environment.
Installing the sample Quick Find Plug-IN
The Quick Find plug-in (this plug-in is just a sample, since it's release the functionality that this plug-in provides has been added to the core SigmaPro module) adds a section to the master Task view that allows users to quickly load a specific task by entering the Task ID into the field provided.
- To install this plug-in, open the page you have added the Plug-IN Manager to. Click Browse, locate the plug-in DLL “OnyakTech.SigmaPro.PlugIn.QuickFind.dll” and click the Install Plug-In link.
- Plug-ins are not activated after they are installed. To activate them, click on the Plug-In name in the Plug-Ins list, check the Activate checkbox and then click Update.

Developing Your Own SigmaPro Plug-Ins
A quick way to get started is to download the source code for the QuickFind plug-in provided by OnyakTech. Note that the source code is only available to source code subscribers.
SigmaPro Plug-Ins are very simple to develop while also very powerful. To build a plug-in, follow the steps below:
-
Set the Microsoft Visual Studio project to the type “Class Library”
-
Add references to DotNetNuke, OnyakTech.PlugIns and OnyakTech.SigmaPro.Extensions.
-
You must have at least one class in the project that implements the IsigmaProPlugIn interface that also uses the OnyakTech Plug-In custom attributes.
As an example, we’ll look at the Quick-Find plug-in for SigmaPro. The class declaration is listed below.
[ExtensionInfo("OnyakTech","09/13/2006","Chris Onyak","http://www.OnyakTech.com","6.0","N/A","QuickFind {IssueList}", SigmaProPlugInType.IssueList)]
[ExtensionType((ExtensionTypeAttribute.ExtensionType.DotNetNukeModule))]
public class QuickFindPlugIn : ISigmaProPlugin
The ExtensionInfo attribute defines your plug-in to the Plug-In Manager and the module that executes the plug-in. These attributes are mandatory.
The last parameter of the attribute defines the type of plug-in, this is used by SigmaPro when loading Plug-Ins to direct where and how the plug-in is executed. Current types are WorkFlow, Events, TaskBody, TaskTab, WindowsModule, Editor, ToolbarItem and IssueList.
The IsigmaProPlugIn interface definition is listed below:
public interface ISigmaProPlugin
{
string Name {get;}
string Description {get;}
string Author {get;}
string Version {get;}
string TaskTabName{get;}
string TaskTabImage{get;}
string TaskTabPage{get;}
string ControlPath{get;}
bool HideDefault{get;}
void Install(string AbsoluteUri, string PhysicalApplicationPath);
void UnInstall(string AbsoluteUri, string PhysicalApplicationPath);
bool SaveItem(int ItemID, int SavedBy, string AdditionalDetails);
void Initialize();
void Dispose();
}
Note that the interface contains an Install and Uninstall method. These methods are executed by the Plug-In Manager when activating/deactivating plug-ins. Use these methods to execute TSQL or to load any embedded resources onto the web server (such as user controls, images, flash, etc.).
The HideDefault property controls the rendering of the function related to the plug-in. For example, if you wanted to create a plug-in that replaces the master Task View of SigmaPro you would set this value to True. But if you wanted to simply add functionality you would set this field to false.
The SaveItem method is executed by SigmaPro when the related “type” is saved. For example, if you’re plug-in was of type TaskBody the SaveItem method of your plug-in will be called when a Task is saved by a user or some external source (Email Monitor, Visual Studio Add-In, etc.)
The installation of plug-ins are through a single DLL; therefore you should store all files, user controls, images, etc. as Embedded Resources.
|