Are there any good up-to-date module development howto's out there?
I found this one (in Dutch, which I am) but that is missing the part about how to create the admin panel:
http://wiki.cmsms.nl/index.php/User_Han ... utorial/nl
I have an idea for a module, know how to write PHP code, but I don't have any experience with making a module for CMSMS.
Any tips?
Module development howto's
-
- Support Guru
- Posts: 8169
- Joined: Tue Oct 19, 2004 6:44 pm
- Location: Fernie British Columbia, Canada
Re: Module development howto's
There are a minimum 2 steps to creating an admin interface.
1. make sure the HasAdmin() method in the module class returns TRUE.
- if it was previously set to return FALSE then you will need to bump the version number of the module.
2. Override the VisibleToAdminUser() method to determine WHO the module is visible to.
3. Begin filling in the 'defaultadmin' action. Typically this is in the action.defaultadmin.php
1. make sure the HasAdmin() method in the module class returns TRUE.
Code: Select all
public function HasAdmin() { return TRUE; }
2. Override the VisibleToAdminUser() method to determine WHO the module is visible to.
Code: Select all
public function VisibleToAdminUser() {
return $this->CheckPermission('Modify Site Preferences');
}
Code: Select all
<?php
if( !isset($gCms) ) exit;
echo __FILE__;
?>
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
-
- Support Guru
- Posts: 8169
- Joined: Tue Oct 19, 2004 6:44 pm
- Location: Fernie British Columbia, Canada
Re: Module development howto's
The API's work identically in the frontend to the backend. with the following exceptions:
a: There is no concept of a returnid or 'page' in the admin interface.
so the returnid passed to actions is always the same
b: There is no concept of inline vs. non inline in the admin interface.
a: There is no concept of a returnid or 'page' in the admin interface.
so the returnid passed to actions is always the same
b: There is no concept of inline vs. non inline in the admin interface.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.