History: FeatureCreationDev
Preview of version: 8
Getting Started With Feature Development
So, you've built a Module ( ModuleCreationDev ) or two and are ready to build a full Feature?
I won't be delving too deeply into the internals of your feature, but instead focusing more heavily on the current system of integrating that feature into the rest of the TikiWiki framework. Basically, a feature needs to do several things:
- Use AdminFeatures to turn itself On/Off
- Initialize itself in php-setup
- Display a menu in the ApplicationMenu
- Expose itself for administration in either the Admin Menu or Section
Turning a Feature On/Off
In tikiwiki, all features are enabled or disabled through the use of the Admin Control Panel Features which can be found in the control panel. It is quite simple to add your feature to this list. Just copy a line from an existing feature in the template file ( tiki/tiki-admin-include-features.tpl ) and replace the old feature name with the new. Then do the same thing in the php file ( /tiki/tiki-admin.php ) so that the setting is recorded.
Example from tiki/tiki-admin-include-features.tpl
Initialization in tiki-setup.php
All tiki pages include tiki-setup.php and therefore you need to place your initialization code here. Any pages that you develop within your feature should include this page as well. Some permissions may need to be set in tiki-setup_base.php as well, but that is more rare.
Adding to the ApplicationMenu
The ApplicationMenu is a module that doesn't actually include a single line of php code. It is entirely made up of a single SmartyTemplate ( /tiki/templates/modules/mod-application_menu.tpl ). To integrate you feature's menu, just copy an existing menu section and edit it to fit your needs.
Adding to the AdminMenu
The AdminMenu is another module without php code. It is a single SmartyTemplate ( /tiki/templates/modules/mod-admin_menu.tpl ). To integrate you feature's admin entry, just copy an existing menu item and edit it to fit your needs.
For the future
I am hoping that more of this config information can get moved to the database for version 2.0, but as for now, this file needs to be edited directly. If TikiWiki is to rule the world, this whole process needs to be pulled apart and made much more packageable...
Please feel free to edit, remove or re-write this page