Difference between revisions of "Plugin Developers Handbook"

From GeeklogWiki
Jump to: navigation, search
m (added Category:Plugin Developers Handbook)
m (Minor corrections)
Line 6: Line 6:
 
== Contents ==
 
== Contents ==
  
#[[Plugin_Developers_Handbook#Introduction and Foreword|Introduction and Foreword]]
+
# [[Plugin_Developers_Handbook#Introduction and Foreword|Introduction and Foreword]]
#[[Programming Style]]
+
# [[Programming Style]]
#[[Using Templates and Language Files]]
+
# [[Using Templates and Language Files]]
#[[Geeklog's way of doing things]]  
+
# [[Geeklog's way of doing things]]  
#[[Blocks and Plugins]]  
+
# [[Blocks and Plugins]]  
#[[How to get Started: A Development Overview]]  
+
# [[How to get Started: A Development Overview]]  
#[[Suggested and Required Directory Layout and Files]]  
+
# [[Suggested and Required Directory Layout and Files]]  
#[[Plugin Installation]]  
+
# [[Plugin Installation]]  
##[[Sample Install Documentation]]  
+
## [[Sample Install Documentation]]  
##[[Sample install.php]]
+
## [[Sample install.php]]
#Advanced Integration with Geeklog:
+
# Advanced Integration with Geeklog
##[[Extending Site Statistics with your plugin]]  
+
## [[Extending Site Statistics with your plugin]]  
##[[Integrating the Comment Engine]]  
+
## [[Integrating the Comment Engine]]  
##[[Using Geeklog's Search Engine]]  
+
## [[Using Geeklog's Search Engine]]  
##[[Adding Moderation Capability]]  
+
## [[Adding Moderation Capability]]  
#[[Distribution]]  
+
# [[Distribution]]  
#[[Universal Plugin ToolKit]]  
+
# [[Universal Plugin ToolKit]]  
#[[functions.inc  - Listing of the Plugin Functions]]  
+
# [[functions.inc  - Listing of the Plugin Functions]]  
#Other Included Documentation Files:
+
# Other Included Documentation Files
##[http://project.geeklog.net/src/Geeklog/_public_html---lib-common.php.html lib-common.php documentation]  
+
## [http://project.geeklog.net/src/Geeklog/_public_html---lib-common.php.html lib-common.php documentation]  
##[http://project.geeklog.net/src/Geeklog/_system---lib-security.php.html lib-security.php documentation]  
+
## [http://project.geeklog.net/src/Geeklog/_system---lib-security.php.html lib-security.php documentation]  
##[http://gplugs.sourceforge.net/pluginman/plugin.php Original Plugin Help File by Tony Bibbs]
+
## [http://gplugs.sourceforge.net/pluginman/plugin.php Original Plugin Help File by Tony Bibbs]
 +
 
  
 
== Introduction and Foreword ==
 
== Introduction and Foreword ==
  
This document and accompanying files are intended to make developing plugins and blocks for Geeklog - The Ultimate Weblog System 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, and Tane Piper. 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 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.3 series. The next major version of Geeklog (v 2) will have a different plugin interface.
+
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.
 
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 for the original Geeklog Plugin Developer Documentation by Tony Bibbs aptly summarizes the place plugins play in the Geeklog project.
+
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).  
 
: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).  
Line 43: Line 44:
 
: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:  
 
: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.  
+
:* 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 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 your plugin to be searched via the Geeklog search page.  
:*Allow stats for your plugin to show up on the site statistics 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 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 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.
+
:* Allow you full flexibility on what your plugin does. Geeklog does not dictate your plugin's power.
 +
 
  
 
[[Category:Plugin Developers Handbook]] [[Category:Plugin Development]]
 
[[Category:Plugin Developers Handbook]] [[Category:Plugin Development]]

Revision as of 09:16, 5 May 2009

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
  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 Included Documentation Files
    1. lib-common.php documentation
    2. lib-security.php documentation
    3. Original Plugin Help File by Tony Bibbs


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.