Geeklog Plugin Toolkit 0.3.0 Released
- Thursday, August 06 2026 @ 07:07 am EDT
- Contributed by: ::Ben
- Views: 209
I am pleased to announce the release of Geeklog Plugin Toolkit 0.3.0, a major update designed to simplify the creation of plugins for Geeklog 2.2.2 and PHP 8.1 or later.
The toolkit provides a command-line Plugin Generator called plgen.php. It creates an installable plugin skeleton containing the main files and structures required to start a new Geeklog plugin.
This release modernizes both the generator and the generated templates while making the creation process safer and more flexible.
What’s New in Version 0.3.0
Safer Plugin Generation
The generator now builds each plugin inside a temporary directory.
The final plugin directory is created only after all files have been generated successfully. Temporary files are automatically removed if an error occurs.
The generator also refuses to overwrite an existing plugin directory or ZIP archive, helping protect previous development work.
Versioned ZIP Archives
The toolkit can now automatically create a ZIP archive ready for testing, installation, or distribution.
Archives use the following naming format:
plugin-version-geeklogversion.zip
For example:
myplugin-1.0-2.2.2.zip
The generated archive contains the plugin directory as its root, making it suitable for installation through Geeklog’s plugin administration interface.
The generator uses PHP’s ZipArchive class when available. If it is unavailable, it attempts to use PharData.
Flexible Output Location
The toolkit no longer needs to be executed from its own directory.
You can keep the toolkit in one location and generate plugins inside separate project directories:
cd /path/to/my-projects
php /path/to/plugin-toolkit/plgen.php
The plugin directory and its optional ZIP archive will be created in the current working directory.
Improved Input Validation
The generator now validates important information before creating any files, including:
- the internal plugin name;
- the plugin version;
- the minimum Geeklog version;
- the author’s email address;
- the plugin homepage URL;
- yes-or-no answers.
A complete configuration summary is displayed before generation, allowing you to check the selected values before continuing.
Geeklog 2.2.2 and PHP 8 Support
The generated plugin skeleton now targets Geeklog 2.2.2 by default and requires PHP 8.1 or later.
The minimum Geeklog version remains configurable when running the generator.
Generated public and administration pages use modern Geeklog rendering functions such as:
COM_createHTMLDocument()
COM_output()
The templates also include updated autoinstall structures, modern error handling, UTF-8 recommendations, and examples compatible with current PHP versions.
Security and Permission Examples
Generated administration forms include examples using Geeklog’s CSRF protection functions:
SEC_createToken()
SEC_checkToken()
The plugin skeleton also contains examples of permission checks and access control.
These examples provide a safer starting point, but developers must still review and adapt them to their plugin’s actual requirements.
Updated Database Templates
Optional SQL templates now use modern defaults, including:
ENGINE=InnoDB
DEFAULT CHARSET=utf8mb4
COLLATE=utf8mb4_unicode_ci
Developers should review the generated schema and adapt field types, indexes, keys, upgrade procedures, and removal behavior before using it in production.
Improved Template Processing
Optional template sections now support nesting and stricter syntax validation.
Malformed or unclosed sections stop the generation process with a readable error instead of silently producing incomplete files.
PHP-only files are also generated without a closing PHP tag, reducing the risk of accidental whitespace output and HTTP header errors.
What the Toolkit Generates
Depending on the selected options, the generated plugin can include:
- an
autoinstall.phpfile; - a
functions.incfile; - public and administration pages;
- an administration icon;
- an English language file;
- optional MySQL and Microsoft SQL installation files;
- optional Geeklog Configuration UI defaults;
- installation, upgrade, and uninstallation support;
- a versioned ZIP distribution archive.
The toolkit creates the technical foundation of a Geeklog plugin. Developers must then implement the plugin’s features, database logic, administration actions, public pages, configuration options, and integrations.
How to Use It
The Plugin Generator requires the command-line version of PHP.
Clone or download the repository, then run:
cd plugin-toolkit
php plgen.php
Follow the questions displayed in the console. Default values appear in square brackets and can be accepted by pressing Enter.
Download and Contribute
The source code may soon be available on GitHub:
https://github.com/Geeklog-Core/plugin-toolkit
Developers are invited to test the generator, review the generated plugin structure, report issues, and suggest improvements.
Before releasing a generated plugin, it should be tested on a clean Geeklog 2.2.2 installation, with its generated archive, on supported PHP versions, and with different Geeklog themes.