Documentation of Demo

Introduction

Demo module is a good place to start learning how to create a module for qEngine.

To use this module, please install it first, then you can learn from example.

See also /admin/module/demo/demo.zip to understand the file structure of a module. And finally, please refere to online documentation.

[ back to top ]


Installing

To create an installer for your module is quite simple, see /admin/module/demo/ini.xml for example. The .ini will be used by qEngine to create an automatic installer for you.

But you can also create your own installer, please see /admin/module/demo/_install.php for example.
Note: You have to rename it to install.php in order to make it work.

To install this this module in, follow these easy steps:

  1. Go to Admin CP > Configure Site > Modules.
  2. Click on Scan New Modules.
  3. On 'Available Modules', click 'Documentation' to read this manual.
  4. Click on 'Install' to begin install process.

[ back to top ]


Upgrading From Older Version

Upgrading usually done manually using an install.php file.

[ back to top ]


Configuring

For configuration, you have to create it manually. You can use qAdmin if you want to. While this demo module doesn't have any configuration example, you can refer to qe_config.php to see how it is made.

Configurator file must be named configure.php, and placed in /admin/module/yourmodule, eg: please see /admin/module/demo/configure.php.

Later you can access it in ACP > Modules > Install/Uninstall.

[ back to top ]


Usage

This module doesn't do anything actually.

After installed, you can see that Demo Module is added to Modules drop down menu. Modules > Module Demo > Manage Data. Where you can input your sample data for demo. The demo is using qAdmin for data entry.

There are two files required by qEngine to display your module.

  1. See /module/demo/window.php for example how to create an inline module, ie. module content displayed in other page contents. For example a random banner (qbanner), simple statistics (ztopwatch), etc.
  2. See /module/demo/main.php for example how to create an outline module, ie. module content displayed exclusively. For example qcomment, when you click "See more comments".
  3. If your module doesn't have outline mode, you can ignore main.php file. But window.php is always required even if your module doesn't have inline mode.

To add inline mode to your site:

  1. Open a skin file, for example: skins/default/outline.tpl (you can use any file)
  2. At the place you wish to display the module, add:
    <!-- BEGINMODULE demo -->
    ; while in demo module, there is no option, this is how option should be entered in windowed mode option = value
    <!-- ENDMODULE -->

To open outline mode of this demo, use this link: task.php?mod=demo

[ back to top ]


Modification

If your module needs any skin files, please put them in /skins/_common folder, eg: skins/_common/module_demo_window.tpl.

Later if you have multiple skins, you can create a special design for any skin by placing the same filename in your skin folder, eg: skins/myskin/module_demo_window.tpl

[ back to top ]


Uninstalling

To create an uninstaller for your module is quite simple, see /admin/module/demo/ini.xml for example. The .ini will be used by qEngine to create an automatic uninstaller for you. But you can also create your own uninstaller, please see /admin/module/demo/_uninstall.php for example. You have to rename it to uninstall.php in order to make it work.

To uninstall this module, follow these easy steps:

  1. Go to Admin CP > Configure Site > Modules.
  2. Find Demo module. Click Uninstall.
  3. You can choose to also remove database & files.

Uninstalling may require you to manually remove some files for 100% clean uninstall.

[ back to top ]


About This Module

Demo Module
This module is created by C97.net. You can contact us at: contact@c97.net, or visit the website in: http://www.c97.net
© C97.net

[ back to top ]