Content last modified Monday 6 March 2017
hop to #bottom
Current version:
About It:
Get it:
Rate it:
  • Helpful?
  • 0 Yes
  • 0 No
Flag it:

If you'd like to provide updated information and do not have access to directly edit, please contact the site admin; thanks!

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.


  1. Help text is in Textile format
  2. No need to escape quotes in your code
  3. Plugin code syntax will be checked at compile time
  4. 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.

Download tar.gz or zip

Article Request Count:
Initially released:
20 January 2005
Posted here:
22 Mar 2005
Article modified:
04 Oct 2005

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:

Commenting is closed for this article.

Commented (3)

The download links on Alex’s site do not appear to be working. I get the following message when I try to download:

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.

You know you want to visit the Archives.




There are also tag clouds, 'cause those are fun.
Published with Textpattern