6. My First Module

info To continue learning about modules, please download demo module. The following information will be based on demo module.

This chapter will cover how to create an installer and share your module.

After you finished your module, you may want to create an installer and share your module.

  1. Gather your module files.
  2. Create a documentation file.
  3. Create an ini.xml file.
  4. Distribute.

Module Files

Gather your module files, use the included _template/ inside demo module to make sure you don't leave out some files. All module files should be placed with the folder structure.

If your module has some .tpl files, make sure to place them inside default/ skin folder. qE will try to load module skin from current skin folder, and then from default skin folder.

And if your module uses other javascript files, make sure to place them inside etc/js/ folder.

Documentation File

A documentation file is a HTML file, without <head> area. It should at least cover installation, uninstallation, usage, skin-modification and copyright notes.

Place your documentation in /admin/module/[mod_name]/info.html.

ini.xml File

ini.xml contains [un]installation information for qE. A sample of ini.xml (taken from demo module, removing remarks):

<?xml version="1.0" encoding="iso-8859-1"?>
<qmodule type="module" version="1.0.0">

Initialization. Type should be 'module', and installer version should be '1.0.0'.

	<name>Module Demo</name>
<copyright>C97.net. All rights reserved.</copyright>
<description>This is a demo. Not a real module!</description>

Self explanatory

`idx` int(10) unsigned NOT NULL AUTO_INCREMENT,
`ddate` date NOT NULL DEFAULT '0000-00-00',
`dname` varchar(255) NOT NULL,
`daddress` varchar(255) NOT NULL,
`dsex` char(1) NOT NULL,
`dnotes` text NOT NULL,

MySQL queries for installation. You should use __PREFIX__ which later be replace with proper table prefix.


Empty files & folders to create, relative to admin/ folder.



Uninstallation mysql queries & removing created files & folders.



Create configuration values to be stored to [prefix]_mod_config. You can later access it from $module_config[mod_name], eg $module_config['demo']

<adminTitle>Manage Data</adminTitle>

Create administration menu, which later can be accessed in ACP > Modules > [Mod Name] > [My Menu]

<note>news search</note>

Create search menu for this module, which later can be accessed from UI.


For more information for each field, please see demo module.

Share It!

After creating a module, sharing it is a good way to improve your script. Just like qE, Kemana & Cart2, we have a great benefit by sharing them, we found many new bugs, security issues, which improve the scripts to be better and better.

You can share you script by:

  1. Placing it in your own web, and promote it using our forum.
  2. Using our forum to promote and to host it.
  3. Or, send us the mod, and we will post it in Download page. Using this method, users don't need to search the web or the forum to get your mod.

Can I sell my module? Yes, you can. We don't limit you to sell your modules. May be in the future we will create a market place, where you can sell your modules in one place. But for now, if you want to sell your module, you have to provide your own place & payment method to sell it.

There is no comment. Why not be the first?

More Comments/Post Your Own