Plugin files: Difference between revisions
David Mudrak (talk | contribs) m (Mudrd8mz moved page Things that work the same in all plugin types to Plugin files: Shorten URL) |
David Mudrak (talk | contribs) mNo edit summary |
||
Line 1: | Line 1: | ||
{{Plugins development}} | |||
{{stub}} | {{stub}} | ||
There are some files that work the same in all plugin types (if they are present) | There are some files that work the same in all [[Plugin types|plugin types]] (if they are present). | ||
=== version.php === | |||
[[ | Meta-data about the plugin (like the version number, dependencies or the maturity level) are defined here. | ||
* [[version.php]] page provides detailed description of the file contents | |||
=== lang/en/plugintype_pluginname.php === | |||
English strings for the plugin are defined here. At least <tt>$string['pluginname']</tt> must be present. There is an exception for the [[Activity modules]], their expected file name is just <tt>pluginname.php</tt> (without the <tt>mod_</tt> prefix). | |||
* [[String API]] provides information about the string files | |||
=== lib.php === | |||
=== db/install.xml === | |||
The plugin's database scheme (tables, fields, indexes and keys) are defined here. You should always use the in-built XMLDB editor to generate this file. | |||
* [[XMLDB Documentation]] | |||
=== db/upgrade.php === | |||
Upgrade steps (such as database scheme changes and other things that must happen when the plugin is being upgraded) are defined here. The in-built [[XMLDB]] editor can be used to generate the code to change the database scheme. | |||
* [[Upgrade API]] | |||
=== db/access.php === | |||
Plugin capabilities are defined here. | |||
* [[Access_API]] | |||
=== classes === | |||
* [[Automatic class loading]] | |||
* [[Coding style#Namespaces]] |
Revision as of 08:46, 30 April 2015
There are some files that work the same in all plugin types (if they are present).
version.php
Meta-data about the plugin (like the version number, dependencies or the maturity level) are defined here.
- version.php page provides detailed description of the file contents
lang/en/plugintype_pluginname.php
English strings for the plugin are defined here. At least $string['pluginname'] must be present. There is an exception for the Activity modules, their expected file name is just pluginname.php (without the mod_ prefix).
- String API provides information about the string files
lib.php
db/install.xml
The plugin's database scheme (tables, fields, indexes and keys) are defined here. You should always use the in-built XMLDB editor to generate this file.
db/upgrade.php
Upgrade steps (such as database scheme changes and other things that must happen when the plugin is being upgraded) are defined here. The in-built XMLDB editor can be used to generate the code to change the database scheme.
db/access.php
Plugin capabilities are defined here.