Creating an OpenDocMan™ Plug-In
Note: The plug-in feature is only available for OpenDocMan 1.2.6beta and upwards
We will use the HelloWorld example plugin to show how to create your own. Lets say you are creating a new plug-in for doing some reports. Here is how you would get started….
- Download the HelloWorld plug-in from OpenDocMan.com
- Extract the plug-in inside the plug-ins/ folder. You should have plug-ins/HelloWorld now.
- Rename the `HelloWorld` folder to `Reports`
- Edit the plug-ins/Reports/readme.txt file
- Rename the `plug-ins/Reports/HelloWorld_class.php` file to `plug-ins/Reports/Reports_class.php`.
- Edit the plug-ins/Reports/index.php file
- Ensure the plug-ins/Reports/templates_c folder is writeable.
- Edit the Reports_class.php file
Your views go inside of plug-ins/Reports/templates. They are Smarty template engine files.
You can view the Plugin_class.php file for all the current methods available. You would over-ride the inherited methods with your own. If you search for those method names inside the OpenDocMan code you will find where they are being called. Each method is called in one unique spot. For example, the onFailedLogin() method is being called in index.php right after it is determined that the user authentication failed.
For more information on the available API methods visit our Plug-in API page.