Thursday 12 June 2003 2:18:05 am
I have scoured the forums, contributed docs, etc but can't find any really useful documentation on writing new modules. I have tried going through the source code to figure out what to do, but it is very obscure.
All I have managed to figure out so far is:
1. Create a directory for the new module under /kernel/.
2. Create a file named module.php that contains a set of associative arrays that do various things.
I can't find any docs that describe these arrays, their parameters and what they do though.
e.g. $ViewList has a whole bunch of elements including: 'functions', 'default_navigation_part', 'single_post_functions', 'post_action_parameters', 'post_actions', 'script' and 'params'. Where are these documented.
What role do the $ClassID, $ParentClassID, $SectionID, $Status, $Assigned, $Node, $Subtree and $FunctionList arrays play?
3. Add files for the various views of the module under the /kernel/mymodule/ directory. The output of each of these views is passed to the $Result associative array... 4. Admin interface can then be extended to accomodate the new function by supplying a set of new default and override templates. I think I have the basics (please comment on any mistakes above), but it isn't enough to do anything useful at the moment.
Also, all of the existing code for the module views contains the following two lines:
$http =& eZHTTPTool::instance(); $Module =& $Params["Module"]; Why are they there? If I comment them out, the modules still work fine. I know what the first line does, but why is it there if the modujle doesn't need it? The second line is a complete mystery to me... Perhaps I am missing something in the docs? I will be eternally grateful to anyone that can shed some light here.
|