Contents |
[edit]
File Structure
Below is a very basic structure of a module in XOOPS Version1 RC3. Please note that not all directories/files listed below are required for each module.
xoops_version.php (Example)
Overview
The most important file for the module, which contains various module config variables.
header.php
Overview
Inclusion of required core files is done here.
index.php
Overview
Module main contents come here.
[edit]
/admin
===Overview===
All the admin related files for the module belong to this directory. Access to this directory must be restricted.
===Files in this directory===
*
admin_header.php
Permission checks, inclusion of mainfile.php and language files are done here.
*
index.php
Module administration contents come here.
*
menu.php
This file includes variables used for creating popup admin menu for the module.
[edit]
/language
===Overview===
This directory should at least contain 'english' directory, which in turn contains files that define language constants.
===Files in this directory===
*
english/main.php
Defines language constants used in module main contents.
*
english/admin.php
Defines language constants used in module admin sections. If there are not many language Constants used in the administration pages, this file may be merged with english/main.php.
*
english/modinfo.php
Defines language constants used in xoops_version.php
*
english/blocks.php
Defines language constants used in blocks/blocks.php
[edit]
/blocks
===Overview===
This directory contains files that define block display/edit functions
===Files in this directory===
* blocks.php
[edit]
/sql
===Overview===
SQL dump files used for module installation belong to this directory.
===Files in this directory===
*
mysql.sql
mysql dump file
*
postgresql.sql
postgreSQL dump file
[edit]
/images
===Overview===
Image files come here, if any.
===Files in this directory===
Any image files used in the module.
[edit]
/cache
===Overview===
Files that are created/updated dynamically belong to this directory. To create new files within the directory, the permission of this directory should be set writeable by the server (chmod 666 or 777 for UNIX/LINUX servers).
===Files in this directory===
The permission of files in this directory should be set writeable by the server (chmod 666 or 777 for UNIX/LINUX servers).
[edit]
/templates
===Overview===
HTML files for Xoops 2 RC3 and later module templates to be called by xoops_version.php &modversion array.
===Files in this directory===
all templates used in module.
[edit]
/templates/blocks
=== Overview ===
HTML files for Xoops 2 RC3 and later module blocks templates to be called by xoops_version.php &modversion array for 'blocks' items. Those files uses smarty vars to display module informations.
===Files in this directory===
all templates used in module blocks. Those files uses smarty blocks vars to display module blocks informations.
Back to the Main Page

![[Main Page]](/modules/mediawiki/images/mediawiki.png)





