Plugin Developers Handbook

From GeeklogWiki
Revision as of 19:53, 21 April 2010 by Rasade (talk | contribs) (Contents: Added link to page on autoinstall)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Geeklog Plugin Developers Handbook

By Blaine Lang and Tom Willett December, 2002


Contents

  1. Introduction and Foreword
  2. Programming Style
  3. Using Templates and Language Files
  4. Geeklog's way of doing things
  5. Blocks and Plugins
  6. How to get Started: A Development Overview
  7. Suggested and Required Directory Layout and Files
  8. Plugin Installation
    1. Sample Install Documentation
    2. Sample install.php
    3. Autoinstall Feature
  9. Advanced Integration with Geeklog
    1. Extending Site Statistics with your plugin
    2. Integrating the Comment Engine
    3. Using Geeklog's Search Engine
    4. Adding Moderation Capability
  10. Distribution
  11. Universal Plugin ToolKit
  12. functions.inc - Listing of the Plugin Functions
  13. Other Documentation Files
    1. lib-common.php documentation
    2. lib-security.php documentation
    3. Geeklog Plugin Development Documentation

Introduction and Foreword

This document and accompanying files are intended to make developing plugins and blocks for Geeklog easier. Our work is dependent upon the developers who wrote Geeklog and continue to expand and support it: Tony Bibbs, Dirk Haun, Jeffrey Schoolcraft, Jason Whittenburg, Matt Braafhart, Mark Limburg, Gene Wood, Yanick Bourbeau, Tane Piper and others. It is based on the earlier documentation written by Tony Bibbs and the collective knowledge contained in the mailing lists and websites devoted to Geeklog. The Moderation API documentation was provided by Vincent Furia.

This documentation was developed with Geeklog version 1.3.7 in mind, but it should work with minor variations for earlier 1.3 versions and should apply to future versions in the 1.x series.

The following suggestions about Programming Style, the use of Templates and Language Files, and Geeklog's Way of Doing Things are simply that -- suggestions. You can choose not to follow them and have a perfectly valid plugin or block. Following these suggestions will make your job easier in the long run and make your code more usable by others.

This excerpt from the original Geeklog Plugin Developer Documentation by Tony Bibbs aptly summarizes the place plugins play in the Geeklog project:


Geeklog is becoming more and more popular each day and we, the Geeklog developers, are amazed at some of the great hacks people have made to extend their Geeklog installation to fit their own needs. At the same time, the Geeklog development team is continually adding new features that make Geeklog even better. We have realized the need for Geeklog to support two threads of development: core Geeklog code and plugin code. By building in the infrastructure needed to extend Geeklog's functionality through plugins we can make a clean separation between the Geeklog codebase and plugin code so that we can concentrate on making Geeklog's core code better while others can develop plugins so that Geeklog fits their needs. With that said, Geeklog now has a Plugin application program interface (API).
At the highest level, the Geeklog Plugin API is generic code that is called in strategic places in the Geeklog codebase that allow function of plugins to be called. This will allow your plugin the following features:
  • Ability for your plugin to be submission-based so that users can submit objects to your plugin. You can then visit the command and control center in Geeklog to moderate the submissions for your plugin.
  • Allow your plugin to show up in the Admin block and User block on each Geeklog page.
  • Allow your plugin to be searched via the Geeklog search page.
  • Allow stats for your plugin to show up on the site statistics page.
  • Allow your plugin the ability to use Geeklog's comment engine.
  • Allow you to use the power of Geeklog's code library (lib-common.php) in your own plugin code.
  • Allow you full flexibility on what your plugin does. Geeklog does not dictate your plugin's power.