fiwswe Wiki

fiwswe's ramblings

User Tools

Site Tools


blog:embedded_php_plugin

Embedded PHP Plugin

I have published my first DokuWiki plugin: Embedded PHP Plugin

It was created to replace the <php> and <PHP> functionality that was removed in DokuWiki “Jack Jackrum”.

Apart from a learning experience w.r.t. the actual plugin development the publishing part was interesting as well.

  • For example I did not know that GitHub allows for automated downloads of .zip archives using a very generic URL.
  • I also did not know that the name of the top level directory in the .zip archive is automatically replaced with the base name of the plugin during installation.
  • Debugging plugins is a pain! I did my development on a remote machine and the only debugging tools where \dokuwiki\Logger::debug() statements and in rare cases modified HTML output (in the render() method of the plugin). Caching often gets in the way as well.
  • There is no way to test the ---- plugin ---- block at the top of the Embedded PHP Plugin page ahead of time. A special plugin interprets the content and apparently there is a database involved as well.
  • The rest of the Embedded PHP Plugin can be prebuilt and tested in a private wiki. However any links to the https://www.dokuwiki.org website must be set to doku>… on the test site and changed to :… on the real website.
blog/embedded_php_plugin.txt · Last modified: by fiwswe