DOCUMENTATION

Search »

module.php

The module.php contains all "meta" information about your module, required by Form Tools to access and list your module in the administrator's Module section. It should be located in the module folder's root.

Here's an example of this file contents, taken from the Export Manager.

Setting
Explanation
author
(required) the name of the author, or company name.
author_email
(optional) the email address of the author / company email.
author_link
(optional) a URL to the author's website.
version
(required) the current module version. You can give your versions any numbering scheme you want. We use the commonly used technique of X.Y.Z, where X is the major release number, Y is the minor release and Z is for bug fix releases.
date
(optional) the release date of the module version in the format YYYY-MM-DD.
origin_language
(required) the name of the language file, minus the .php extension.
supports_ft_versions
A comma delimited list of supported Form Tools versions. This setting should ignore beta and release candidate releases - just the final versions.
nav
(required) This setting defines your module's menu items. It is an array, whose keys correspond to entries in your language file. The values are an array with two indexes: the URL of the page, and whether it should appear as a submenu item or not.
The "module_name", "word_settings" and "word_help" have corresponding entries in the module's lang/en_us.php language file (i.e. $L["module_name"] = "Export Manager" etc.). The values each contain the {$module_dir} Smarty placeholder. This is a convenient way to refer to the module root URL. Often you find you won't need it, but if your module arranges its files in subfolders, this wards against invalid links.