Plugin Autoinstall

From GeeklogWiki
Revision as of 09:25, 12 February 2009 by Dirk (talk | contribs) (Started documenting the Plugin Autoinstall)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
(work in progress - scheduled for inclusion in Geeklog 1.6)

Introduction

Geeklog 1.6 brings two important changes regarding installation of plugins:

  • Plugins can be installed by uploading their tarball (from Geeklog's Plugins Admin panel)
  • Plugins can be bundled / unbundled by simply adding / removing their respective directories to / from the Geeklog tarball

In both of these scenarios, Geeklog needs a way to automatically run the install procedure for such a plugin.

The problem with the plugin install scripts used until now are that they were mainly aimed at being run by a human and that they also check permissions that simply may not be set when the install is done (e.g. when running Geeklog's install script).

The solution proposed here is the inclusion of a new file, autoinstall.php into every plugin that implements up to 4 new API functions (3 of which are optional).

autoinstall.php

The file autoinstall.php is to be located in the plugin's main directory, i.e. in the same directory as its functions.inc file:

/path/to/geeklog/plugins/
                         foo/
                             functions.inc
                             autoinstall.php
                         staticpages/
                             functions.inc
                             autoinstall.php
                         ...