Back to page

− Links

 Print 

Source of XOOPSCubeLegacy​/Reference​/xoops_version :: Web Application Platform

Source of wiki:XOOPSCubeLegacy/Reference/xoops_version

« Prev[3]  
[[XOOPSCubeLegacy]]

This document explains the description of xoops_version.php for module developers.

* xoops_version overview [#z3cd4f2d]
xoops_version is a kind of manifesto of modules for ''Legacy''. xoops_version is simply PHP file for quick parsing. This program file defines array '$modversion' which is parsed by Legacy. ''You must understand this reason.'' You can write code in your xoops_version.php, but Legacy doesn't vouch for its efficiency. Basically, you should write code to describe $mod_version only.

Some notes are here;
- You can reference documents in Japanese [[here>http://www.xc-tokai.com/modules/smartsection/item.php?itemid=31]].

** $modversion['name'] [#cbb44929]
A name of the module. ''This is must''. You should use the constant which defines name for each languages.

** $modversion['version'] [#nfa00686]
A version number of the module. ''This is must''. This value is converted to integer and stored to DB.

 $storedVersion = (int)($modversion['version'] * 100);

Therefore, you must write a version with 'x.xx' format. 

 $modversion['version'] = '2.08';

The following examples are not handled correctly.

 [BAD EXSAMPLES]
 $modversion['version'] = '1.0.2.1';
 $modversion['version'] = '2.5 beta';

** $modversion['description'] [#z6c4c4e1]
A simple description of the module. You should use the constant which defines name for each languages.

** $modversion['author'] [#baa5cf92]
Your name. ;)

** $modversion['credits'] [#x993594d]
A credit information of the module.

** $modversion['licence'] [#h31ec2ec]
A title of the module licence. Basically, this may be "GPL see LICENSE". But, if you supply the kernel for Cube layer, the module can contain another licence module. You may clear the licence in this information.

** $modversion['help'] [#bc5aa164]
A file name of the help file, if it exists. Because this key has been reserved by XOOPS2 (But, it has never been used), you need another declaration to activate this information. That's the ''cube_style'' declaration.

 $modversion['cube_style'] = true;

** $modversion['official'] [#o11a0915]
This is a ''deprecated information item'' in Legacy 2.1. All modules are unofficial, even if the module is developed by the dev team.

** $modversion['image'] [#j38dd9fa]
A icon file name of the module. You put the icon file to the 'images' directory of your module.

** $modversion['dirname'] [#h9cfe9c8]
A directory name of the module. ''This is must.'' Normally, this value uses just dirname. If your module is contained to 'myarticle', the dirname is 'myarticle'.

This value is used to solve the file path for many files under your module.

** $modversion['hasMain'] [#w9f584b1]
** $modversion['hasAdmin'] [#w5def768]

« Prev[3]