The structure of a GPTEngine plugin begins with its name.
Every plugin must have an user friendly name and a system name.
The system name (lets call it shortname
) must be a lowercase alphanumeric
string (16 characters max) that uniquely identifies your plugin within your system
(the name libs
is reserved and must not be used), while the user friendly name -- 24 characters max -- (lets call it displayname
the way your plugin will be identified by users (administrators).
A (installable) plugin file is simply a tar
compressed folder (whose contents
will be discussed below) which is later renamed by changing the tar
extension to gptl
The resulting file name, as the name of the original uncompressed folder, must be your
shortname (folder) ⇒ shortname.tar ⇒ shortname.gptl
The contents of a minimal working plugin folder should be as described below:
- The file pics/icon.jpg (pics/icon.svg in GPTEngine 3 and up) is a 48px × 48px JPEG icon that visually identifies
your plugin in the admin area.
- The XML file xml/info.xml must be formatted as follows:
- version (16 characters max) is a version number of your plugin, e.g.,
1.0.12, 0.17.1.123, 3.0.final, etc.
- author (16 characters max) is the name of the plugin's author/developer/distributor.
- contact (32 characters max) is the author's email address/Website/IM/etc for contact.
- description (127 characters max) is a short statement describing your plugin.
- The file php/info.php is basically a PHP version of the xml.info.xml
file, which must be formatted as follows:
$gpte_plugin->name = 'displayname';
$gpte_plugin->short_name = 'shortname';
$gpte_plugin->version = 'version';
$gpte_plugin->author = 'author';
$gpte_plugin->contact = 'contact';
$gpte_plugin->description = 'description';
- The file php/admin.php is responsible for the plugin's functionality and content
when clicked on the admin page. Its basic structure is:
// -------- content and functionality go here -------- //
For the sake of organization, any other files should be placed into categorized folders,
for PHP code, html
for static pages, jscript
The GPTEngine's plugin API enables seamless integration of your plugin content into
your admin and CMS site.
The different types of plugin rendered pages are:
- Admin pages.
- CMS pages.
- Non-integrated pages.
For a list of available plugin functions and usability, refer to
PHP plugin API