Difference between revisions of "Plugin Autoinstall"

From GeeklogWiki
Jump to: navigation, search
(Started documenting the Plugin Autoinstall)
(No difference)

Revision as of 09:25, 12 February 2009

(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
                         ...