XOOPSCubeLegacy

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

xoops_version overview anchor.png

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

$modversion['name'] anchor.png

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

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

$modversion['description'] anchor.png

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

Page Top

$modversion['author'] anchor.png

Your name. ;)

Page Top

$modversion['credits'] anchor.png

A credit information of the module.

Page Top

$modversion['licence'] anchor.png

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

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

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

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

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

Page Top

$modversion['hasAdmin'] anchor.png


Front page   Freeze Diff Backup Copy Rename ReloadPrint View   New Page Page list Search Recent changes   Help   RSS of recent changes (RSS 1.0) RSS of recent changes (RSS 2.0) RSS of recent changes (RSS Atom) Powered by xpWiki
Counter: 16169, today: 3, yesterday: 8
Princeps date: 2007-01-09 (Tue) 21:27:31
Last-modified: 2007-02-07 (Wed) 13:50:54 (JST) (4330d) by minahito

Welcome | News | Overview | Documentation | Forum | Tutorialstop
Brasilian | French | German | Greek | Japanese | Korean | Russian | T-Chinese
Powered by XOOPS Cube 2001-2011 The XOOPS Cube Project