zem_tpl Textpattern Plugin Template
An improved template for Textpattern plugins.
zem_tpl is an improved template for Textpattern plugins. It’s intended mainly for use with the PHP command line client, though it will work fine running on a web server.
Features:
- Help text is in Textile format
- No need to escape quotes in your code
- Plugin code syntax will be checked at compile time
- Works with syntax-highlighting text editors
The package contains two files, zem_tpl.php and zem_plugin.php.
zem_tpl.php contains the code to compile plugins into the format required by the Textpattern plugin installer. zem_plugin.php is the template itself. Make a copy of this file and edit it to write your plugin.
Typical use, at the command line:
$ cp zem_plugin.php abc_myplugin.php
[edit abc_myplugin.php]
$ php abc_myplugin.php > abc_myplugin-0.1.txt
abc_myplugin-0.1.txt is the finished plugin, ready to install.
In order to use Textile in the help section, classTextile.php must be in the include_path. The simplest way to ensure this is to copy it to the current directory.
Alternatively, both classTextile.php and zem_tpl.php may be placed elsewhere in the include_path.









If there is a comment form at the Information URL, you may want to leave your comments/questions there for quicker feedback. Otherwise, comment away:
Commented (3)
publish.php cannot be called directly. If you just updated and are calling index.php, make sure to update the files in the root dir.Hi, when clicking the download link I get ‘Database Unavailable’.
This site has so many broken download links that instead of flagging the ones that aren’t working, it should be the opposite. There’s been some talk on the TXP forum about doing an update for this directory, but nothing has yet happened.
Subscribe to this article's comments RSS feed. [ ? ] View Recent Comments across the site.