FWIW, I think the reccomended way of adding a module is to add an entry to either ModuleRepositories[] or ExtensionRepositories[] under [ModuleSettings] in module.ini.append.
Then, place your modules in the folder you add to ModuleRepositories[] or in a "modules/" subfolder inside the folder you add to ExtensionRepositories[].
So, if you need to add a module named "bar", you could add the file:
/foo/modules/bar/module.php
and add "ExtensionRepositories[]=foo" to the file /settings/override/modules.ini.append
Note that some modules also have functions and operations, which are ? respectively ? defined in the files
/kernel/<module_name>/function_definition.php
and /kernel/<module_name>/operation_definition.php
The functions and operations are executed by the files:
/lib/ezutils/classes/ezmodulefunctioninfo.php /lib/ezutils/classes/ezmoduleoperationinfo.php
1. You are right.
2. Yes you are right.
ViewList is set of views defined for module, for each view you define:
'functions' - to which functions user should have access to to be able to execute this view. so it used for permission system.
'default_navigation_part' - navigation part which should be active when this view is executed.
'single_post_functions' and 'post_action_parameters' is a mapping between post variables (buttons, input fields) and actions inside view.
'script' - php file which should be executed when user acceses this view.
'params' - params in url. for example url is 'content/edit/29658/1', content is modeule name, edit is view name and the last two numbers will be interpreted as parameters for the view.
"params" => array( "ObjectID", "EditVersion", 'EditLanguage' )
So inside a view you will be able to access
$Params["ObjectID"]; and $Params["EditVersion"]; they will get values 29658 and 1 by order. $Params["EditLanguage"]; will be empty since in url we have only two parts after view name separated with '/' 3.You are right.
about these two lines
$http =& eZHTTPTool::instance(); If you don't use it, it is not nessesary to put this line in view file
$Module =& $Params["Module"]; The same with this one. $Module object you get in this line gives you a lot of control on execution. For example you can use http redirections using its methods.
Will someone from eZ please correct me if I'm wrong, but the proper way to add modules is via the extention system. This way you do not have to modify any ezpublish code only the configuration files. Upgrades a whole lot simpler if you use this method!
I looked at the ezRSS and glossary contributions as well as the online editor which all work this way and used these to create my own modules as extentions. These examples proved invaluable.
Extensions allows you to gather actions, datatypes, design, eventtypes, modules, settings and probably more in one convenient folder, improving portability and upgradability.
You must be logged in to post messages in this topic!