Back to page

− Links


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



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

Table of contents
  • xoops_version overview
    • $modversion['name']
    • $modversion['version']
    • $modversion['description']
    • $modversion['author']
    • $modversion['credits']
    • $modversion['licence']
    • $modversion['help']
    • $modversion['official']
    • $modversion['image']
    • $modversion['dirname']
    • $modversion['hasMain']
    • $modversion['hasAdmin']

xoops_version overview anchor.png[2]

xoops_version is a kind of manifesto of modules for Legacy. xoops_version is simply PHP[3] 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[4].
Page Top

$modversion['name'] anchor.png[5]

A name of the module. This is must. You should use the constant which defines name for each languages.

Page Top

$modversion['version'] anchor.png[6]

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.

$modversion['version'] = '';
$modversion['version'] = '2.5 beta';
Page Top

$modversion['description'] anchor.png[7]

A simple description of the module. You should use the constant which defines name for each languages.

Page Top

$modversion['author'] anchor.png[8]

Your name. ;)

Page Top

$modversion['credits'] anchor.png[9]

A credit information of the module.

Page Top

$modversion['licence'] anchor.png[10]

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.

Page Top

$modversion['help'] anchor.png[11]

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;
Page Top

$modversion['official'] anchor.png[12]

This is a deprecated information item in Legacy 2.1. All modules are unofficial, even if the module is developed by the dev team.

Page Top

$modversion['image'] anchor.png[13]

A icon file name of the module. You put the icon file to the 'images' directory of your module.

Page Top

$modversion['dirname'] anchor.png[14]

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.

Page Top

$modversion['hasMain'] anchor.png[15]

Page Top

$modversion['hasAdmin'] anchor.png[16]

Last-modified: 2007-02-07 (Wed) 13:50:54 (JST) (4980d) by minahito