[geeklog-cvs] geeklog: Removed the outdated plugin development page and link t...

geeklog-cvs at lists.geeklog.net geeklog-cvs at lists.geeklog.net
Sun Jun 7 12:09:09 EDT 2009


details:   http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/48e0663d018b
changeset: 7086:48e0663d018b
user:      Dirk Haun <dirk at haun-online.de>
date:      Sun Jun 07 10:41:55 2009 +0200
description:
Removed the outdated plugin development page and link to the wiki instead.

diffstat:

 public_html/docs/english/index.html  |    3 +-
 public_html/docs/english/plugin.html |  561 ----------------------------------------
 2 files changed, 1 insertions(+), 563 deletions(-)

diffs (truncated from 579 to 300 lines):

diff -r 4bb93b0a1040 -r 48e0663d018b public_html/docs/english/index.html
--- a/public_html/docs/english/index.html	Sun Jun 07 10:21:14 2009 +0200
+++ b/public_html/docs/english/index.html	Sun Jun 07 10:41:55 2009 +0200
@@ -44,9 +44,8 @@
   <li><a href="trackback.html">Trackback, Pingback, Ping</a></li>
   <li>Geeklog's API
     <ul>
-      <li><a href="plugin.html">Plugin Development</a></li>
+      <li><a href="http://wiki.geeklog.net/index.php/Plugin_Development">Plugin Development</a></li>
       <li><a href="theme.html">Theme Development</a></li>
-      <!-- <li>Writing Custom Functions</li> -->
     </ul></li>
   <li><a href="support.html">Support</a></li>
   <li><a href="changes.html">List of Changes</a></li>
diff -r 4bb93b0a1040 -r 48e0663d018b public_html/docs/english/plugin.html
--- a/public_html/docs/english/plugin.html	Sun Jun 07 10:21:14 2009 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,561 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
-<html>
-<head>
-  <title>Geeklog Documentation - Plugin Development</title>
-  <link rel="stylesheet" type="text/css" href="../docstyle.css" title="Dev Stylesheet">
-</head>
-
-<body>
-<p><a href="http://www.geeklog.net/" style="background:transparent"><img src="../images/newlogo.gif" alt="Geeklog" width="243" height="90"></a></p>
-<div class="menu"><a href="index.html">Geeklog Documentation</a> - Plugin Development</div>
-
-<h1>Plugin Development</h1>
-
-<p><strong>Note:</strong> Unfortunately, this document is slightly out of date.
-While the API functions described in here are still correct, several new
-functions are missing. If in doubt, please also see the file
-<tt>system/lib-plugins.php</tt> which implements the plugin interface.</p>
-
-<p>If you find these API descriptions too terse, you may also want to consult
-the more extensive <a href="http://wiki.geeklog.net/index.php/Plugin_Developers_Handbook">Plugin Developers Guide</a>.</p>
-
-<ul>
-  <li><a href="#overview">Overview</a></li>
-  <li><a href="#Functions_for_writing">Geeklog Plugin API Functions</a>
-    <ul>
-      <li><a href="#mod_functions">Moderation Functions</a></li>
-      <li><a href="#admin_user_functions">Admin and User Menu Functions</a></li>
-      <li><a href="#Search_Functions">Search Functions</a></li>
-      <li><a href="#Comment_Functions">Comment Functions</a></li>
-      <li><a href="#Stats_Function">Stats Function</a></li>
-      <li><a href="#Uninstall_Function">Uninstall Function</a></li>
-      <li><a href="#User_Functions">User Functions</a></li>
-      <li><a href="#Profile_Functions">Profile Functions</a></li>
-      <li><a href="#Misc_Functions">Misc. Functions</a></li>
-      <li><a href="#Feed_Functions">Feed Functions</a></li>
-    </ul></li>
-  <li><a href="#Implementing_your_Admin_Interface">Implementing your Admin Interface</a></li>
-  <li><a href="#Preparing_your_Geeklog_Plugin">Preparing your Geeklog Plugin Distribution</a></li>
-  <li><a href="#How_Geeklog_Installs_Plugins">How To Install A Geeklog Plugin</a></li>
-  <li><a href="#Deliver_Your_Plugin">Deliver Your Plugin!</a></li>
-</ul>
-
-<h2><a name="overview">Overview</a></h2>
-
-<p>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 seperation    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).
-
-<p>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:
-
-<ul>
-  <li>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.</li>
-  <li>Allow your plugin to show up in the Admin block and User block on each
-    Geeklog page.</li>
-  <li>Allow your plugin to be searched via the Geeklog search page.</li>
-  <li>Allow stats for your plugin to show up on the site statistics page.</li>
-  <li> Allow your plugin the ability to use Geeklog's comment engine.</li>
-  <li>Allow you to use the power of Geeklog's code library (lib-common.php) in
-    your own plugin code.</li>
-  <li>Allow you full flexibility on what your plugin does. Geeklog does not
-    dictate your plugins power.</li>
-</ul>
-
-<h2><a name="Functions_for_writing">Functions for writing plugins</a></h2>
-
-<p>The below functions are what you need to write your own plugin including
-any extra parameters that you need to pass in. Towards the end of the
-page,    there is also a Description of the API, just incase you need it to
-help  understand  in the plugin process.
-
-<p>
-<strong>Note about <plugin name>:</strong> You will see references to
-<plugin name> in all the functions below.  The <plugin
-name> values will come from you the name of your plugin tarfile. All plugin
-tarfiles have a strict naming convention that they <em>must</em> follow and it is:</p>
-
-<p style="margin-left:4em;">
-  <plugin name>_<plugin version>_<geeklog version>.tar.gz
-</p>
-
-<p>e.g. <tt>photos_1.0_1.3.tar.gz</tt></p>
-
-
-<h2><a name="mod_functions">Moderation functions</a></h2>
-
-<p>First note that there are limitations in the current Geeklog codebase that
-will force you to name your plugin tables used  for submission in a
-specific manner.  All moderated Geeklog items such  as stories and
-links are comprised of two tables.  The first is a main  table where
-all visible items are stored.  The second is a submission table where
-submitted user items sit until an administrator approves them.  When
-approved the item is moved from the submission table to the main
-table.     So for example, if you are writing a book review plugin
-that  allows users    to submit book reviews then we will pick bookreviews
-for your main table   (this MUST also be your plugin name you pick) and
-then your submission table   MUST be named bookreviewssubmission.  Why
-force the names? Because in  the geeklog code the submission table for all
-stories is coded as <main   name>submission.  So since we picked
-bookreviews for our main table   (and plugin name) the submission table
-must be named  bookreviewssubmission.
-
-<p>If you want your plugin to be moderated like Geeklog stories
-and links then you must implement these functions.</p>
-
-<table cellpadding="2" cellspacing="2" border="1" width="90%">
-<caption style="caption-side:bottom">Table 1. Moderation functions<br></caption>
-<tr>
-  <th valign="top">Function</th>
-  <th valign="top">Description of Function</th></tr>
-<tr>
-  <td valign="top" class="codeheader">plugin_submit_<plugin name></td>
-  <td valign="top" class="code">Shows the submission form for your plugin.</td>
-  </tr>
-<tr>
-  <td valign="top" class="codeheader">plugin_itemlist_<plugin name></td>
-  <td valign="top" class="code">Shows any items needing moderation for your plugin on moderation.php</td>
-  </tr>
-<tr>
-  <td valign="top" class="codeheader">plugin_savesubmission_<plugin name></td>
-  <td valign="top" class="code">Saves submitted item from a user in <plugin name>submission table</td>
-  </tr>
-<tr>
-  <td valign="top" class="codeheader">plugin_moderationdelete_<plugin name></td>
-  <td valign="top" class="code">Takes an ID into <plugin name>submission table and deletes it</td>
-  </tr>
-<tr>
-  <td valign="top" class="codeheader">plugin_moderationapprove_<plugin name></td>
-  <td valign="top" class="code">Takes an ID into <plugin name>submission and moves it to the main table called <plugin name></td>
-  </tr>
-<tr>
-  <td valign="top" class="codeheader">plugin_moderationvalues_<plugin name></td>
-  <td valign="top" class="code">Returns the primary key column name, the main
-    table name (called <plugin name>) and the list of fields from that
-    table that you'd like to have show up on the moderation page.</td>
-  </tr>
-</table>
-
-<h2><a name="admin_user_functions">Admin and User Menu functions</a></h2>
-
-<p>If you want your plugin to effect the Admin and User Function blocks
-that show up on every Geeklog page then you must implement these
-functions.</p>
-
-      <table cellpadding="2" cellspacing="2" border="1" width="90%">
-        <caption style="caption-side:bottom">Table 2. Admin and User functions</caption>
-          <tr>
-            <th valign="top">Function</th>
-            <th valign="top">Description of Function</th>
-          </tr>
-          <tr>
-            <td valign="top" class="codeheader">plugin_adminoptions_<plugin name></td>
-            <td valign="top" class="code">Will show options under the Admin
-      Functions block for your plugin</td>
-          </tr>
-          <tr>
-            <td valign="top" class="codeheader">plugin_getuseroption_<plugin
-      name></td>
-            <td valign="top" class="code">Will show options under the User
-      Functions block for your plugin</td>
-          </tr>
-          <tr>
-            <td valign="top" class="codeheader">plugin_adminedit_<plugin
-      name></td>
-            <td valign="top" class="code">Shows the links at the top of admin/plugins/<plugin
-     name>.php for New and Admin Home. This is for consistency sake only</td>
-          </tr>
-          <tr>
-            <td valign="top" class="codeheader">plugin_submissioncount_<plugin
-      name></td>
-            <td valign="top" class="code">Shows the number of submissions
-      pending for you plugin.  This is usually just "dbcount(<plugin
-   name>submission);"</td>
-          </tr>
-          <tr>
-            <td valign="top" class="codeheader">plugin_cclabel_<plugin
-      name></td>
-            <td valign="top" class="code">Returns array of your plugin image
-      and a label for your plugin.  This is called to show your plugin
-  in   the command and control block on moderation.php</td>
-          </tr>
-      </table>
-
-<h2><a name="Search_Functions">Search Functions</a></h2>
-
-<p>If you want your plugin to be searchable, implement these functions.</p>
-
-      <table cellpadding="2" cellspacing="2" border="1" width="90%">
-        <caption style="caption-side:bottom">Table 3. Search functions</caption>
-          <tr>
-            <th valign="top">Function</th>
-            <th valign="top">Description of Function</th>
-          </tr>
-          <tr>
-            <td valign="top" class="codeheader">plugin_getsearchtypes_<plugin
-     name></td>
-            <td valign="top" class="code">You will probably want to add a
-     new type in the Type drop down on search.php.  This function prints
-    the option tags needed. make sure that the value tag is <plugin name></td>
-          </tr>
-          <tr>
-            <td valign="top" class="codeheader">plugin_dopluginsearch_<plugin
-     name></td>
-            <td valign="top" class="code">Takes the search criteria and lets
-     you build search results for your plugin.  This returns a string
- array    of table rows, one row for each record returned by your search.</td>
-          </tr>
-      </table>
-
-<h2><a name="Comment_Functions">Comment Function</a></h2>
-
-<p>If you want your plugin to support comments and use the Geeklog comment
-engine, then you need to implement these functions in your plugin
-functions.inc file:</p>
-
-<table cellpadding="2" cellspacing="2" border="1" width="90%">
-<caption style="caption-side:bottom">Table 4. Comment functions</caption>
-  <tr>
-    <th valign="top">Function</th>
-    <th valign="top">Description of Function</th>
-  </tr>
-  <tr>
-    <td valign="top" class="codeheader">plugin_handlecomment_<plugin name></td>
-    <td valign="top" class="code">
-    This function expects the comment id (primary index in the comment table) and and type of operation (either 'save' or 'delete') to perform on the comment. It will update the plugin record with the total number of comments for this plugin item. It then handles the refresh or redirection of the user back to the plugin instead of the main site page.</td>
-  </tr>
-  <tr>
-    <td valign="top" class="codeheader">plugin_commentform_<plugin name></td>
-    <td valign="top" class="code">
-    This function expects a number of parameters and is called from Geeklog article.php and comment.php. Parameters are: comment_id (primary key), comment_mode (nested, flat, threaded, none, order (Ascending or Descending) and reply (Was the reply submit button used on the comment bar).<br>
-    Only comment_id is mandatory.</td>
-  </tr>
-  <tr>
-    <td valign="top" class="codeheader">plugin_commentparent_<plugin name></td>
-    <td valign="top" class="code">
-    Optional function which can be called from your plugin_commentform function to also display the plugin parent above the comments. This is how Geeklog articles are displayed with the story and then the comment bar and associated comments.</td>
-  </tr>
-</table>
-
-
-<h2><a name="Stats_Function">Stats Function</a></h2>
-
-<p>If you want your plugin to show up on the stats page then you must
-implement this function.</p>
-
-      <table cellpadding="2" cellspacing="2" border="1" width="90%">
-        <caption style="caption-side:bottom">Table 5. Stats function</caption>
-          <tr>
-            <th valign="top">Function</th>
-            <th valign="top">Description of Function</th>
-          </tr>
-          <tr>
-            <td valign="top" class="codeheader">plugin_showstats_<plugin
-     name></td>
-            <td valign="top" class="code">This function takes a showsitestats
-     flag.  If set to 1, this function shows the overall stats for your
-   plugin  in the site statistics box.  If it is set to 2 it shows the
-  statistic  blocks for you plugin (similar to Top Ten Viewed Stories and
-Top  Ten Commented  Stories).</td>
-          </tr>
-      </table>
-
-<h2><a name="Uninstall_Function">Uninstall Function</a></h2>
-
-<p>If you want to give your plugin the ability to uninstall itself then you must implement this function.</p>
-
-      <table cellpadding="2" cellspacing="2" border="1" width="90%">
-        <caption style="caption-side:bottom">Table 6. Uninstall function</caption>
-          <tr>



More information about the geeklog-cvs mailing list