<?xml version="1.0" encoding="iso8859-1"?>
<rss version="2.0">
<channel>
<title>AKSW - Projects/OntoWiki/EventPluginArchitecture/PluginDevelopment</title>
<link>http://ontowiki.net/Projects/OntoWiki/EventPluginArchitecture/PluginDevelopment</link>
<description>History/revisions of AKSW/Projects/OntoWiki/EventPluginArchitecture/PluginDevelopment</description>
<language>en-us</language>
<item>
<title>2008-07-22 16:34:10</title>
<link>http://ontowiki.net/Projects/OntoWiki/EventPluginArchitecture/PluginDevelopment/show?time=2008-07-22+16%3A34%3A10</link>
<description>&lt;div class="pageBefore">&lt;img src="http://ontowiki.net/images/z.gif" width="1" height="1" border="0" alt="" style="display:block" align="top" />&lt;/div>&lt;div class="page">
&lt;b>Comparison for &lt;a name=".projects.ontowiki.eventpluginarchitecture.plugindevelopment" href="http://ontowiki.net/Projects/OntoWiki/EventPluginArchitecture/PluginDevelopment" class="">/Projects&amp;nbsp;/&amp;nbsp;Onto&amp;nbsp;Wiki&amp;nbsp;/&amp;nbsp;Event&amp;nbsp;Plugin&amp;nbsp;Architecture&amp;nbsp;/&amp;nbsp;Plugin&amp;nbsp;Development&lt;/a> of &lt;a href="http://ontowiki.net/Projects/OntoWiki/EventPluginArchitecture/PluginDevelopment?time=2008-07-22+16%3A34%3A10">2008-07-22 16:34:10&lt;/a> and &lt;a href="http://ontowiki.net/Projects/OntoWiki/EventPluginArchitecture/PluginDevelopment">2008-07-22 19:25:09&lt;/a>&lt;/b>&lt;br />
&lt;br />
&lt;b>Additions:&lt;/b>&lt;br />
&lt;div class="additions">&lt;!--notypo-->&lt;div class='floatbox'>&lt;div class='inner'>
&lt;a name="h1232-1">&lt;/a>&lt;h1>Plugins and&amp;nbsp;Events&lt;/h1>
&lt;br />
&lt;ul>&lt;li> &lt;a name=".projects.ontowiki.eventpluginarchitecture" href="http://ontowiki.net/Projects/OntoWiki/EventPluginArchitecture" class="" title="Projects&amp;nbsp;/&amp;nbsp;Onto&amp;nbsp;Wiki&amp;nbsp;/&amp;nbsp;Event&amp;nbsp;Plugin&amp;nbsp;Architecture">Overview: Plugins and&amp;nbsp;Events&lt;/a>
&lt;/li>&lt;li> &lt;a  href="http://ontowiki.net/Projects/OntoWiki/EventPluginArchitecture/PluginDevelopment" class="" title="Projects&amp;nbsp;/&amp;nbsp;Onto&amp;nbsp;Wiki&amp;nbsp;/&amp;nbsp;Event&amp;nbsp;Plugin&amp;nbsp;Architecture&amp;nbsp;/&amp;nbsp;Plugin&amp;nbsp;Development">Plugin Development&lt;/a>
&lt;ul>&lt;li> &lt;a name=".projects.ontowiki.plugincookbook" href="http://ontowiki.net/Projects/OntoWiki/PluginCookbook" class="" title="Projects&amp;nbsp;/&amp;nbsp;Onto&amp;nbsp;Wiki&amp;nbsp;/&amp;nbsp;Plugin&amp;nbsp;Cookbook">Plugin Cookbook&lt;/a> (work in&amp;nbsp;process)
&lt;/li>&lt;li> &lt;a name=".projects.ontowiki.eventpluginarchitecture.plugindevelopment.pluginexamples" href="http://ontowiki.net/Projects/OntoWiki/EventPluginArchitecture/PluginDevelopment/PluginExamples" class="" title="Projects&amp;nbsp;/&amp;nbsp;Onto&amp;nbsp;Wiki&amp;nbsp;/&amp;nbsp;Event&amp;nbsp;Plugin&amp;nbsp;Architecture&amp;nbsp;/&amp;nbsp;Plugin&amp;nbsp;Development&amp;nbsp;/&amp;nbsp;Plugin&amp;nbsp;Examples">Examples&lt;/a>&lt;/li>&lt;/ul>&lt;/li>&lt;/ul> &lt;/div>&lt;/div>
&lt;!--/notypo-->&lt;/div>&lt;/div>
</description>
</item>
<item>
<title>2008-07-22 16:30:41</title>
<link>http://ontowiki.net/Projects/OntoWiki/EventPluginArchitecture/PluginDevelopment/show?time=2008-07-22+16%3A30%3A41</link>
<description>&lt;div class="pageBefore">&lt;img src="http://ontowiki.net/images/z.gif" width="1" height="1" border="0" alt="" style="display:block" align="top" />&lt;/div>&lt;div class="page">
&lt;b>Comparison for &lt;a  href="http://ontowiki.net/Projects/OntoWiki/EventPluginArchitecture/PluginDevelopment" class="">/Projects&amp;nbsp;/&amp;nbsp;Onto&amp;nbsp;Wiki&amp;nbsp;/&amp;nbsp;Event&amp;nbsp;Plugin&amp;nbsp;Architecture&amp;nbsp;/&amp;nbsp;Plugin&amp;nbsp;Development&lt;/a> of &lt;a href="http://ontowiki.net/Projects/OntoWiki/EventPluginArchitecture/PluginDevelopment?time=2008-07-22+16%3A30%3A41">2008-07-22 16:30:41&lt;/a> and &lt;a href="http://ontowiki.net/Projects/OntoWiki/EventPluginArchitecture/PluginDevelopment?time=2008-07-22+16%3A34%3A10">2008-07-22 16:34:10&lt;/a>&lt;/b>&lt;br />
&lt;br />
&lt;b>Additions:&lt;/b>&lt;br />
&lt;div class="additions">&lt;a name="h711-1">&lt;/a>&lt;h3>Private configuration sections&lt;/h3>
In&amp;nbsp;case your plugin needs some configuration internally, we&amp;nbsp;encourage you&amp;nbsp;to&amp;nbsp;use one&amp;nbsp;or&amp;nbsp;more sections in&amp;nbsp;your &lt;tt>config.ini&lt;/tt> file, e.g. &lt;tt>[private]&lt;/tt>. You&amp;nbsp;also can&amp;nbsp;use another name for&amp;nbsp;the section or&amp;nbsp;define more than one&amp;nbsp;section, but&amp;nbsp;in&amp;nbsp;most cases a&amp;nbsp;&lt;tt>[private]&lt;/tt> section should fullfill your needs.&lt;br />
You&amp;nbsp;can access the&amp;nbsp;config in&amp;nbsp;your plugin class by&amp;nbsp;calling the&amp;nbsp;protected &lt;tt>_getPluginConfig()&lt;/tt> method. This method will return an&amp;nbsp;instance of&amp;nbsp;&lt;tt>Zend_Config&lt;/tt>. In&amp;nbsp;case your section is&amp;nbsp;called &lt;tt>[private]&lt;/tt> you&amp;nbsp;would access your configuration the&amp;nbsp;following way: &lt;tt>$this-&amp;gt;_getPluginConfig()-&amp;gt;private-&amp;gt;foo-&amp;gt;bar&lt;/tt>.&lt;a name="h711-2">&lt;/a>&lt;h3>Language configuration files&lt;/h3>
Your plugin can&amp;nbsp;have it's own&amp;nbsp;language configuration file in&amp;nbsp;order to&amp;nbsp;support multiple languages or&amp;nbsp;change the&amp;nbsp;default behaviour of&amp;nbsp;Onto&amp;nbsp;Wiki. You&amp;nbsp;just have to&amp;nbsp;create a&amp;nbsp;file called &lt;tt>string.ini&lt;/tt> in&amp;nbsp;your plugin root folder and&amp;nbsp;add at&amp;nbsp;least two&amp;nbsp;sections: &lt;tt>[english]&lt;/tt> and&amp;nbsp;&lt;tt>[default : english]&lt;/tt>. So&amp;nbsp;your file could look like this:&lt;br />
[english]&lt;br />
foo&amp;nbsp;= &amp;#147;Bar&amp;#148;&lt;br />
[default : english] &lt;a name="h711-3">&lt;/a>&lt;h3>Code definitions&lt;/h3>
&lt;em>Is coming later ...&lt;/em>&lt;/div>&lt;/div>
</description>
</item>
<item>
<title>2008-07-19 18:36:44</title>
<link>http://ontowiki.net/Projects/OntoWiki/EventPluginArchitecture/PluginDevelopment/show?time=2008-07-19+18%3A36%3A44</link>
<description>&lt;div class="pageBefore">&lt;img src="http://ontowiki.net/images/z.gif" width="1" height="1" border="0" alt="" style="display:block" align="top" />&lt;/div>&lt;div class="page">
&lt;b>Comparison for &lt;a  href="http://ontowiki.net/Projects/OntoWiki/EventPluginArchitecture/PluginDevelopment" class="">/Projects&amp;nbsp;/&amp;nbsp;Onto&amp;nbsp;Wiki&amp;nbsp;/&amp;nbsp;Event&amp;nbsp;Plugin&amp;nbsp;Architecture&amp;nbsp;/&amp;nbsp;Plugin&amp;nbsp;Development&lt;/a> of &lt;a href="http://ontowiki.net/Projects/OntoWiki/EventPluginArchitecture/PluginDevelopment?time=2008-07-19+18%3A36%3A44">2008-07-19 18:36:44&lt;/a> and &lt;a href="http://ontowiki.net/Projects/OntoWiki/EventPluginArchitecture/PluginDevelopment?time=2008-07-22+16%3A30%3A41">2008-07-22 16:30:41&lt;/a>&lt;/b>&lt;br />
&lt;br />
&lt;b>Additions:&lt;/b>&lt;br />
&lt;div class="additions">There every plugin has&amp;nbsp;its own&amp;nbsp;folder. A&amp;nbsp;plugin folder can&amp;nbsp;include several other plugin folders but&amp;nbsp;it&amp;nbsp;is not&amp;nbsp;possible to&amp;nbsp;have two&amp;nbsp;different plugins packages parallel in&amp;nbsp;one folder. Every plugin package can&amp;nbsp;include different plugin classes and&amp;nbsp;libraries, and&amp;nbsp;it&amp;nbsp;haves its&amp;nbsp;own &lt;tt>config.ini&lt;/tt> which must be&amp;nbsp;located in&amp;nbsp;the root folder of&amp;nbsp;the plugin package. For&amp;nbsp;example:&lt;br />
Every plugin package has&amp;nbsp;its own&amp;nbsp;&lt;tt>config.ini&lt;/tt> &amp;mdash; stored in&amp;nbsp;the root folder of&amp;nbsp;the plugin package &amp;mdash; to&amp;nbsp;make declarations about plugin's folder structure, event handlers or&amp;nbsp;translation files. Currently their are&amp;nbsp;four main parts: meta information about the&amp;nbsp;plugin, local folder structure, announcements for&amp;nbsp;event handlers and&amp;nbsp;announcing additional classes (e.g. for&amp;nbsp;simple integration of&amp;nbsp;APIs or&amp;nbsp;other libraries). It&amp;nbsp;also keeps information about the&amp;nbsp;plugin's state (enabled or&amp;nbsp;disabled). The&amp;nbsp;&lt;a href="http://code.google.com/p/ontowiki/source/browse/trunk/ontowiki/plugins/Example/config.ini-dist?r=2321" target="_blank" title="Outgoing link (in new window)" class="outerlink">&lt;img src="http://ontowiki.net/themes/aksw2007/icons/world_link.png" alt="" class="contexticon" />configuration file of&amp;nbsp;the Example plugin&lt;/a> can&amp;nbsp;be&amp;nbsp;found in&amp;nbsp;the SVN. Every plugin configuration has&amp;nbsp;to&amp;nbsp;start with &lt;tt>[general]&lt;/tt>.&lt;/div>&lt;br />
&lt;b>Deletions:&lt;/b>&lt;br />
&lt;div class="deletions">There every plugin has&amp;nbsp;its own&amp;nbsp;folder. A&amp;nbsp;plugin folder can&amp;nbsp;include several other plugin folders but&amp;nbsp;it&amp;nbsp;is not&amp;nbsp;possible to&amp;nbsp;have two&amp;nbsp;different plugins packages parallel in&amp;nbsp;one folder. Every plugin package can&amp;nbsp;include different plugin classes and&amp;nbsp;libraries, it&amp;nbsp;haves its&amp;nbsp;own &lt;tt>config.ini&lt;/tt>. For&amp;nbsp;example:&lt;br />
Every plugin package has&amp;nbsp;its own&amp;nbsp;&lt;tt>config.ini&lt;/tt> to&amp;nbsp;make declarations about plugin's folder structure, event handlers or&amp;nbsp;translation files. Currently their are&amp;nbsp;four main parts: meta information about the&amp;nbsp;plugin, local folder structure, announcements for&amp;nbsp;event handlers and&amp;nbsp;announcing additional classes (e.g. for&amp;nbsp;simple integration of&amp;nbsp;APIs or&amp;nbsp;other libraries). It&amp;nbsp;also keeps information about the&amp;nbsp;plugin's state (enabled or&amp;nbsp;disabled). The&amp;nbsp;&lt;a href="http://code.google.com/p/ontowiki/source/browse/trunk/ontowiki/plugins/Example/config.ini-dist?r=2321" target="_blank" title="Outgoing link (in new window)" class="outerlink">&lt;img src="http://ontowiki.net/themes/aksw2007/icons/world_link.png" alt="" class="contexticon" />configuration file of&amp;nbsp;the Example plugin&lt;/a> can&amp;nbsp;be&amp;nbsp;found in&amp;nbsp;the SVN. Every plugin configuration has&amp;nbsp;to&amp;nbsp;start with &lt;tt>[general]&lt;/tt>.&lt;/div>&lt;/div>
</description>
</item>
<item>
<title>2008-07-18 15:59:28</title>
<link>http://ontowiki.net/Projects/OntoWiki/EventPluginArchitecture/PluginDevelopment/show?time=2008-07-18+15%3A59%3A28</link>
<description>&lt;div class="pageBefore">&lt;img src="http://ontowiki.net/images/z.gif" width="1" height="1" border="0" alt="" style="display:block" align="top" />&lt;/div>&lt;div class="page">
&lt;b>Comparison for &lt;a  href="http://ontowiki.net/Projects/OntoWiki/EventPluginArchitecture/PluginDevelopment" class="">/Projects&amp;nbsp;/&amp;nbsp;Onto&amp;nbsp;Wiki&amp;nbsp;/&amp;nbsp;Event&amp;nbsp;Plugin&amp;nbsp;Architecture&amp;nbsp;/&amp;nbsp;Plugin&amp;nbsp;Development&lt;/a> of &lt;a href="http://ontowiki.net/Projects/OntoWiki/EventPluginArchitecture/PluginDevelopment?time=2008-07-18+15%3A59%3A28">2008-07-18 15:59:28&lt;/a> and &lt;a href="http://ontowiki.net/Projects/OntoWiki/EventPluginArchitecture/PluginDevelopment?time=2008-07-19+18%3A36%3A44">2008-07-19 18:36:44&lt;/a>&lt;/b>&lt;br />
&lt;br />
&lt;b>Additions:&lt;/b>&lt;br />
&lt;div class="additions">&lt;span class="cite">Your event handlers cannot be&amp;nbsp;private because the&amp;nbsp;event dispatcher must be&amp;nbsp;able to&amp;nbsp;call them.&lt;/span> If&amp;nbsp;you want to&amp;nbsp;write plugins only for&amp;nbsp;Erfurt you&amp;nbsp;may extend &lt;tt>Erfurt_Plugin&lt;/tt>. You&amp;nbsp;have to&amp;nbsp;name the&amp;nbsp;file like the&amp;nbsp;plugin class extended by&amp;nbsp;&lt;tt>.php&lt;/tt>, in&amp;nbsp;our example above it&amp;nbsp;is &lt;tt>YourPluginClass.php&lt;/tt>.&lt;br />
&lt;ul>&lt;li> &lt;tt>_setEnvironment()&lt;/tt>: this method tries to&amp;nbsp;allocate the&amp;nbsp;&lt;tt>$_action&lt;/tt> and&amp;nbsp;&lt;tt>$_view$&lt;/tt> objects, because they could change between application states when event handlers are&amp;nbsp;called&lt;/li>&lt;/ul>
Now&amp;nbsp;you have to&amp;nbsp;announce your event handler &lt;tt>replaceTemplate&lt;/tt> to&amp;nbsp;the &lt;tt>ZendPostDispatch&lt;/tt> event (may also work with Zend&amp;nbsp;Pre&amp;nbsp;Dispatch event). If&amp;nbsp;you only want to&amp;nbsp;replace a&amp;nbsp;template for&amp;nbsp;a&amp;nbsp;special action in&amp;nbsp;one controller then you&amp;nbsp;can add&amp;nbsp;their names as&amp;nbsp;prefix, dont forget &lt;tt>default&lt;/tt> as&amp;nbsp;prefix for&amp;nbsp;the module. Like in&amp;nbsp;the Example plugin we&amp;nbsp;only replace the&amp;nbsp;template for&amp;nbsp;the &lt;tt>view&lt;/tt> action of&amp;nbsp;the &lt;tt>resource&lt;/tt> controller, we&amp;nbsp;will get&amp;nbsp;&lt;tt>default_resource_view_ZendPostDispatch&lt;/tt> as&amp;nbsp;the name of&amp;nbsp;the event the&amp;nbsp;event handler has&amp;nbsp;to&amp;nbsp;be announced to. You&amp;nbsp;can specify those announcements in&amp;nbsp;the plugin's configuration file:&lt;br />
Now&amp;nbsp;announce this event handler in&amp;nbsp;your plugin's configuration file. Use&amp;nbsp;&lt;tt>ZendRouteShutdown&lt;/tt> for&amp;nbsp;new controllers, &lt;tt>ZendPreDispatch&lt;/tt> is&amp;nbsp;for replacing controllers.&lt;/div>&lt;br />
&lt;b>Deletions:&lt;/b>&lt;br />
&lt;div class="deletions">&lt;span class="cite">Your event handlers cannot be&amp;nbsp;private because the&amp;nbsp;event dispatcher must be&amp;nbsp;able to&amp;nbsp;call them.&lt;/span> If&amp;nbsp;you want to&amp;nbsp;write plugins only for&amp;nbsp;Erfurt you&amp;nbsp;may extend &lt;tt>Erfurt_Plugin&lt;/tt>. You&amp;nbsp;have to&amp;nbsp;name the&amp;nbsp;file like the&amp;nbsp;plugin class extended by&amp;nbsp;&lt;tt>.php&lt;/tt>, in&amp;nbsp;our example above it&amp;nbsp;is &lt;tt>Your&amp;nbsp;Plugin&amp;nbsp;Class.php&lt;/tt>.&lt;br />
&lt;ul>&lt;li> &lt;tt>_setEnvironment()&lt;/tt>: this method tires to&amp;nbsp;allocate the&amp;nbsp;&lt;tt>$_action&lt;/tt> and&amp;nbsp;&lt;tt>$_view$&lt;/tt> objects, because they could change between application states when event handlers are&amp;nbsp;called&lt;/li>&lt;/ul>
Now&amp;nbsp;you have to&amp;nbsp;announce your event handler &lt;tt>replaceTemplate&lt;/tt> to&amp;nbsp;the Zend&amp;nbsp;Post&amp;nbsp;Dispatch event (may also work with Zend&amp;nbsp;Pre&amp;nbsp;Dispatch event). If&amp;nbsp;you only want to&amp;nbsp;replace a&amp;nbsp;template for&amp;nbsp;a&amp;nbsp;special action in&amp;nbsp;one controller then you&amp;nbsp;can add&amp;nbsp;their names as&amp;nbsp;prefix, dont forget &lt;tt>default&lt;/tt> as&amp;nbsp;prefix for&amp;nbsp;the module. Like in&amp;nbsp;the Example plugin we&amp;nbsp;only replace the&amp;nbsp;template for&amp;nbsp;the #view# action of&amp;nbsp;the #resource# controller, we&amp;nbsp;will get&amp;nbsp;#default_resource_view_ZendPostDispatch## as&amp;nbsp;the name of&amp;nbsp;the event the&amp;nbsp;event handler has&amp;nbsp;to&amp;nbsp;be announced to. You&amp;nbsp;can specify those announcements in&amp;nbsp;the plugin's configuration file:&lt;br />
Now&amp;nbsp;announce this event handler in&amp;nbsp;your plugin's configuration file. Use&amp;nbsp;&lt;tt>Zend&amp;nbsp;Route&amp;nbsp;Shutdown&lt;/tt> for&amp;nbsp;new controllers, &lt;tt>Zend&amp;nbsp;Pre&amp;nbsp;Dispatch&lt;/tt> is&amp;nbsp;for replacing controllers.&lt;/div>&lt;/div>
</description>
</item>
<item>
<title>2008-07-18 15:17:29</title>
<link>http://ontowiki.net/Projects/OntoWiki/EventPluginArchitecture/PluginDevelopment/show?time=2008-07-18+15%3A17%3A29</link>
<description>&lt;div class="pageBefore">&lt;img src="http://ontowiki.net/images/z.gif" width="1" height="1" border="0" alt="" style="display:block" align="top" />&lt;/div>&lt;div class="page">
&lt;b>Comparison for &lt;a  href="http://ontowiki.net/Projects/OntoWiki/EventPluginArchitecture/PluginDevelopment" class="">/Projects&amp;nbsp;/&amp;nbsp;Onto&amp;nbsp;Wiki&amp;nbsp;/&amp;nbsp;Event&amp;nbsp;Plugin&amp;nbsp;Architecture&amp;nbsp;/&amp;nbsp;Plugin&amp;nbsp;Development&lt;/a> of &lt;a href="http://ontowiki.net/Projects/OntoWiki/EventPluginArchitecture/PluginDevelopment?time=2008-07-18+15%3A17%3A29">2008-07-18 15:17:29&lt;/a> and &lt;a href="http://ontowiki.net/Projects/OntoWiki/EventPluginArchitecture/PluginDevelopment?time=2008-07-18+15%3A59%3A28">2008-07-18 15:59:28&lt;/a>&lt;/b>&lt;br />
&lt;br />
&lt;b>Additions:&lt;/b>&lt;br />
&lt;div class="additions">You&amp;nbsp;will need methods from Zend's &lt;a href="http://framework.zend.com/manual/en/zend.controller.front.html" target="_blank" title="Outgoing link (in new window)" class="outerlink">&lt;img src="http://ontowiki.net/themes/aksw2007/icons/world_link.png" alt="" class="contexticon" />Front Controller&lt;/a> and&amp;nbsp;the &lt;a href="http://framework.zend.com/manual/en/zend.controller.request.html" target="_blank" title="Outgoing link (in new window)" class="outerlink">&lt;img src="http://ontowiki.net/themes/aksw2007/icons/world_link.png" alt="" class="contexticon" />Request object&lt;/a> to&amp;nbsp;add or&amp;nbsp;replace a&amp;nbsp;controller or&amp;nbsp;only one&amp;nbsp;action:&lt;br />
function addYourController()&lt;br />
{&lt;br />
&lt;div class="indent">// 1. get&amp;nbsp;front controller&lt;br />
$frontController = Zend_Controller_Front::getInstance();&lt;br />
// 2. get&amp;nbsp;request object&lt;br />
$request = $frontController-&amp;gt;getRequest();&lt;br />
// 3a. save controller name&lt;br />
$controller = $request-&amp;gt;getControllerName();&lt;br />
// 3b. you&amp;nbsp;can also save the&amp;nbsp;action's name if&amp;nbsp;you want to&amp;nbsp;replace only the&amp;nbsp;controller when a&amp;nbsp;special action is&amp;nbsp;called&lt;br />
$action     = $request-&amp;gt;getActionName(); // not&amp;nbsp;needed in&amp;nbsp;this example&lt;br />
// 4. check for&amp;nbsp;controller [/action] name (your new&amp;nbsp;controller)&lt;br />
if&amp;nbsp;($controller == 'yourcontroller') {&lt;br />
&lt;div class="indent">// add&amp;nbsp;the directory from your plugin folder where controllers are&amp;nbsp;located in&lt;br />
$frontController-&amp;gt;addControllerDirectory($this-&amp;gt;_getPluginRootDir().'/controller/');&lt;br />
// alltogether the&amp;nbsp;controller is&amp;nbsp;now PLUGINFOLDER/controller/Yourcontroller&amp;nbsp;Controller.php&lt;/div>&lt;/div>
Now&amp;nbsp;announce this event handler in&amp;nbsp;your plugin's configuration file. Use&amp;nbsp;&lt;tt>Zend&amp;nbsp;Route&amp;nbsp;Shutdown&lt;/tt> for&amp;nbsp;new controllers, &lt;tt>Zend&amp;nbsp;Pre&amp;nbsp;Dispatch&lt;/tt> is&amp;nbsp;for replacing controllers.&lt;/div>&lt;/div>
</description>
</item>
<item>
<title>2008-07-08 22:02:58</title>
<link>http://ontowiki.net/Projects/OntoWiki/EventPluginArchitecture/PluginDevelopment/show?time=2008-07-08+22%3A02%3A58</link>
<description>&lt;div class="pageBefore">&lt;img src="http://ontowiki.net/images/z.gif" width="1" height="1" border="0" alt="" style="display:block" align="top" />&lt;/div>&lt;div class="page">
&lt;b>Comparison for &lt;a  href="http://ontowiki.net/Projects/OntoWiki/EventPluginArchitecture/PluginDevelopment" class="">/Projects&amp;nbsp;/&amp;nbsp;Onto&amp;nbsp;Wiki&amp;nbsp;/&amp;nbsp;Event&amp;nbsp;Plugin&amp;nbsp;Architecture&amp;nbsp;/&amp;nbsp;Plugin&amp;nbsp;Development&lt;/a> of &lt;a href="http://ontowiki.net/Projects/OntoWiki/EventPluginArchitecture/PluginDevelopment?time=2008-07-08+22%3A02%3A58">2008-07-08 22:02:58&lt;/a> and &lt;a href="http://ontowiki.net/Projects/OntoWiki/EventPluginArchitecture/PluginDevelopment?time=2008-07-18+15%3A17%3A29">2008-07-18 15:17:29&lt;/a>&lt;/b>&lt;br />
&lt;br />
&lt;b>Additions:&lt;/b>&lt;br />
&lt;div class="additions">&lt;!--notypo-->&lt;fieldset>&lt;legend>&lt;strong> Contents   &lt;/strong>&lt;/legend>&lt;div class="toc1">&lt;a href="#h711-2">Folder structure for&amp;nbsp;plugins&lt;/a>&lt;/div>&lt;div class="toc1">&lt;a href="#h711-3">The plugin class&lt;/a>&lt;/div>&lt;div class="toc1">&lt;a href="#h711-4">What to&amp;nbsp;do&lt;/a>&lt;/div>&lt;div class="toc2">&lt;a href="#h711-5">Using the&amp;nbsp;interface, methods and&amp;nbsp;objects&lt;/a>&lt;/div>&lt;div class="toc2">&lt;a href="#h711-6">Replace a&amp;nbsp;template&lt;/a>&lt;/div>&lt;div class="toc2">&lt;a href="#h711-7">Add&amp;nbsp;/&amp;nbsp;Replace an&amp;nbsp;action controller&lt;/a>&lt;/div>&lt;div class="toc1">&lt;a href="#h711-8">Plugin configuration&lt;/a>&lt;/div>&lt;div class="toc2">&lt;a href="#h711-9">Meta information about the&amp;nbsp;plugin&lt;/a>&lt;/div>&lt;div class="toc2">&lt;a href="#h711-10">Describe folder structure&lt;/a>&lt;/div>&lt;div class="toc2">&lt;a href="#h711-11">Announcing event handlers&lt;/a>&lt;/div>&lt;div class="toc2">&lt;a href="#h711-12">Additional class registrations&lt;/a>&lt;/div>&lt;div class="toc2">&lt;a href="#h711-13">Private configuration sections&lt;/a>&lt;/div>&lt;div class="toc2">&lt;a href="#h711-14">Language configuration files&lt;/a>&lt;/div>&lt;div class="toc2">&lt;a href="#h711-15">Code definitions&lt;/a>&lt;/div>&lt;/fieldset>&lt;!--/notypo-->&lt;br />
The&amp;nbsp;parent plugin classes from OntoWiki and&amp;nbsp;Erfurt provide some methods and&amp;nbsp;objects as&amp;nbsp;an interface for&amp;nbsp;plugins to&amp;nbsp;core functionality. Currently provided interface objects are:&lt;br />
&lt;ul>&lt;li> &lt;tt>$_view&lt;/tt>: view object (instance of&amp;nbsp;&lt;a href="http://framework.zend.com/manual/en/zend.view.html" target="_blank" title="Outgoing link (in new window)" class="outerlink">&lt;img src="http://ontowiki.net/themes/aksw2007/icons/world_link.png" alt="" class="contexticon" />Zend_View&lt;/a>) provided by&amp;nbsp;current action controller or&amp;nbsp;the viewRenderer helper
&lt;/li>&lt;li> &lt;tt>$_viewRenderer&lt;/tt>: object of&amp;nbsp;currently used &lt;a href="http://framework.zend.com/manual/en/zend.controller.actionhelpers.html#zend.controller.actionhelpers.viewrenderer" target="_blank" title="Outgoing link (in new window)" class="outerlink">&lt;img src="http://ontowiki.net/themes/aksw2007/icons/world_link.png" alt="" class="contexticon" />viewRenderer helper&lt;/a> (if available)&lt;/li>&lt;/ul>
Please have a&amp;nbsp;look at&amp;nbsp;the referenced documents how&amp;nbsp;to&amp;nbsp;use the&amp;nbsp;methods of&amp;nbsp;these objects. Some of&amp;nbsp;those methods we&amp;nbsp;use in&amp;nbsp;our examples but&amp;nbsp;generally you&amp;nbsp;can do&amp;nbsp;more. Methods provided by&amp;nbsp;the parent plugin classes currently are:&lt;a name="h711-1">&lt;/a>&lt;h3>Replace a&amp;nbsp;template&lt;/h3>
OntoWiki provides standard templates for&amp;nbsp;all actions but&amp;nbsp;sometimes it&amp;nbsp;makes sense to&amp;nbsp;replace them by&amp;nbsp;your own, for&amp;nbsp;example if&amp;nbsp;you want to&amp;nbsp;add event triggers or&amp;nbsp;other new&amp;nbsp;stuff to&amp;nbsp;the template. This will become important for&amp;nbsp;delivering plugins when you&amp;nbsp;write event handlers for&amp;nbsp;your own&amp;nbsp;template triggers. Another case is&amp;nbsp;a new&amp;nbsp;template needed by&amp;nbsp;a new&amp;nbsp;controller action added by&amp;nbsp;a plugin.&lt;br />
To&amp;nbsp;replace a&amp;nbsp;template you&amp;nbsp;need at&amp;nbsp;least the&amp;nbsp;&lt;a href="http://framework.zend.com/manual/en/zend.view.controllers.html#zend.view.controllers.script-paths" target="_blank" title="Outgoing link (in new window)" class="outerlink">&lt;img src="http://ontowiki.net/themes/aksw2007/icons/world_link.png" alt="" class="contexticon" />addScriptPath method from Zend_View&lt;/a> (&lt;tt>_view&lt;/tt> object) and&amp;nbsp;the &lt;a href="http://framework.zend.com/manual/en/zend.controller.actionhelpers.html#zend.controller.actionhelper.viewrenderer.api" target="_blank" title="Outgoing link (in new window)" class="outerlink">&lt;img src="http://ontowiki.net/themes/aksw2007/icons/world_link.png" alt="" class="contexticon" />setScriptAction method of&amp;nbsp;the viewRenderer helper&lt;/a> (&lt;tt>_viewRenderer&lt;/tt>).&lt;br />
function replaceTemplate() {&lt;br />
&lt;div class="indent">// 1. Test for&amp;nbsp;_view and&amp;nbsp;_viewRenderer&lt;br />
$this-&amp;gt;_setEnvironment(); // getting the&amp;nbsp;right objects for&amp;nbsp;_view and&amp;nbsp;_viewRenderer&lt;br />
&lt;div class="indent">&lt;div class="indent">&lt;div class="indent">&lt;br />
&lt;/div>&lt;/div>&lt;/div>// 2. add&amp;nbsp;the template folder within the&amp;nbsp;plugin folder (use _view object)&lt;br />
$this-&amp;gt;_view-&amp;gt;addScriptPath($this-&amp;gt;_getPluginRootDir().'/templates/');&lt;br />
&lt;div class="indent">&lt;div class="indent">&lt;div class="indent">&lt;br />
&lt;/div>&lt;/div>&lt;/div>// 3. exchange the&amp;nbsp;template script (use _viewRenderer helper)&lt;br />
// within your new&amp;nbsp;template folder, the&amp;nbsp;script must be&amp;nbsp;in a&amp;nbsp;folder called like controller (lowercase!)&lt;br />
$this-&amp;gt;_viewRenderer-&amp;gt;setScriptAction('replace-template'); // set&amp;nbsp;name (NAME.php) of&amp;nbsp;template&lt;br />
// alltogether the&amp;nbsp;template is&amp;nbsp;now PLUGINFOLDER/templates/resource/replace-template.php&lt;/div>
Of&amp;nbsp;course the&amp;nbsp;example is&amp;nbsp;simplyfied, usually it&amp;nbsp;is better to&amp;nbsp;check the&amp;nbsp;obejects before, have a&amp;nbsp;look a&amp;nbsp;the &lt;a href="http://powl.svn.sourceforge.net/viewvc/powl/trunk/ontowiki/plugins/Example/Example.php?view=markup#l_75" target="_blank" title="Outgoing link (in new window)" class="outerlink">&lt;img src="http://ontowiki.net/themes/aksw2007/icons/world_link.png" alt="" class="contexticon" />similar event handler from our&amp;nbsp;Example plugin&lt;/a>.&lt;br />
Now&amp;nbsp;you have to&amp;nbsp;announce your event handler &lt;tt>replaceTemplate&lt;/tt> to&amp;nbsp;the Zend&amp;nbsp;Post&amp;nbsp;Dispatch event (may also work with Zend&amp;nbsp;Pre&amp;nbsp;Dispatch event). If&amp;nbsp;you only want to&amp;nbsp;replace a&amp;nbsp;template for&amp;nbsp;a&amp;nbsp;special action in&amp;nbsp;one controller then you&amp;nbsp;can add&amp;nbsp;their names as&amp;nbsp;prefix, dont forget &lt;tt>default&lt;/tt> as&amp;nbsp;prefix for&amp;nbsp;the module. Like in&amp;nbsp;the Example plugin we&amp;nbsp;only replace the&amp;nbsp;template for&amp;nbsp;the #view# action of&amp;nbsp;the #resource# controller, we&amp;nbsp;will get&amp;nbsp;#default_resource_view_ZendPostDispatch## as&amp;nbsp;the name of&amp;nbsp;the event the&amp;nbsp;event handler has&amp;nbsp;to&amp;nbsp;be announced to. You&amp;nbsp;can specify those announcements in&amp;nbsp;the plugin's configuration file:&lt;br />
announce.0.event  = &amp;#147;default_resource_view_ZendPostDispatch&amp;#148;&lt;br />
announce.0.class  = "Your&amp;nbsp;Plugin&amp;nbsp;Class"&lt;br />
announce.0.method = &amp;#147;replaceTemplate&amp;#148;&lt;br />
See&amp;nbsp;the corresponding announcement from our&amp;nbsp;&lt;a href="http://powl.svn.sourceforge.net/viewvc/powl/trunk/ontowiki/plugins/Example/config.ini-dist?view=markup#l_49" target="_blank" title="Outgoing link (in new window)" class="outerlink">&lt;img src="http://ontowiki.net/themes/aksw2007/icons/world_link.png" alt="" class="contexticon" />Example plugin's config.ini&lt;/a>.&lt;a name="h711-2">&lt;/a>&lt;h3>Add&amp;nbsp;/&amp;nbsp;Replace an&amp;nbsp;action controller&lt;/h3>&lt;/div>&lt;br />
&lt;b>Deletions:&lt;/b>&lt;br />
&lt;div class="deletions">The&amp;nbsp;generell plugin classes from OntoWiki and&amp;nbsp;Erfurt provide some methods and&amp;nbsp;objects as&amp;nbsp;an interface for&amp;nbsp;plugins to&amp;nbsp;core functionality. Currently provided interface objects are:&lt;br />
&lt;ul>&lt;li> &lt;tt>$_view&lt;/tt>: object of&amp;nbsp;currently used &lt;a href="http://framework.zend.com/manual/en/zend.controller.actionhelpers.html#zend.controller.actionhelpers.viewrenderer" target="_blank" title="Outgoing link (in new window)" class="outerlink">&lt;img src="http://ontowiki.net/themes/aksw2007/icons/world_link.png" alt="" class="contexticon" />viewRenderer helper&lt;/a> (if available)&lt;/li>&lt;/ul>
Please have a&amp;nbsp;look at&amp;nbsp;the referenced documents how&amp;nbsp;to&amp;nbsp;use the&amp;nbsp;methods of&amp;nbsp;these objects. Some of&amp;nbsp;their stuff we&amp;nbsp;will use&amp;nbsp;in&amp;nbsp;our examples but&amp;nbsp;generally you&amp;nbsp;can do&amp;nbsp;more. Methods provided by&amp;nbsp;the parent plugin classes are:&lt;a name="h711-1">&lt;/a>&lt;h3>Change a&amp;nbsp;template&lt;/h3>&lt;a name="h711-2">&lt;/a>&lt;h3>Replace an&amp;nbsp;action controller&lt;/h3>&lt;/div>&lt;/div>
</description>
</item>
<item>
<title>2008-05-18 22:45:24</title>
<link>http://ontowiki.net/Projects/OntoWiki/EventPluginArchitecture/PluginDevelopment/show?time=2008-05-18+22%3A45%3A24</link>
<description>&lt;div class="pageBefore">&lt;img src="http://ontowiki.net/images/z.gif" width="1" height="1" border="0" alt="" style="display:block" align="top" />&lt;/div>&lt;div class="page">
&lt;b>Comparison for &lt;a  href="http://ontowiki.net/Projects/OntoWiki/EventPluginArchitecture/PluginDevelopment" class="">/Projects&amp;nbsp;/&amp;nbsp;Onto&amp;nbsp;Wiki&amp;nbsp;/&amp;nbsp;Event&amp;nbsp;Plugin&amp;nbsp;Architecture&amp;nbsp;/&amp;nbsp;Plugin&amp;nbsp;Development&lt;/a> of &lt;a href="http://ontowiki.net/Projects/OntoWiki/EventPluginArchitecture/PluginDevelopment?time=2008-05-18+22%3A45%3A24">2008-05-18 22:45:24&lt;/a> and &lt;a href="http://ontowiki.net/Projects/OntoWiki/EventPluginArchitecture/PluginDevelopment?time=2008-07-08+22%3A02%3A58">2008-07-08 22:02:58&lt;/a>&lt;/b>&lt;br />
&lt;br />
&lt;b>Additions:&lt;/b>&lt;br />
&lt;div class="additions">Every plugin package has&amp;nbsp;its own&amp;nbsp;&lt;tt>config.ini&lt;/tt> to&amp;nbsp;make declarations about plugin's folder structure, event handlers or&amp;nbsp;translation files. Currently their are&amp;nbsp;four main parts: meta information about the&amp;nbsp;plugin, local folder structure, announcements for&amp;nbsp;event handlers and&amp;nbsp;announcing additional classes (e.g. for&amp;nbsp;simple integration of&amp;nbsp;APIs or&amp;nbsp;other libraries). It&amp;nbsp;also keeps information about the&amp;nbsp;plugin's state (enabled or&amp;nbsp;disabled). The&amp;nbsp;&lt;a href="http://code.google.com/p/ontowiki/source/browse/trunk/ontowiki/plugins/Example/config.ini-dist?r=2321" target="_blank" title="Outgoing link (in new window)" class="outerlink">&lt;img src="http://ontowiki.net/themes/aksw2007/icons/world_link.png" alt="" class="contexticon" />configuration file of&amp;nbsp;the Example plugin&lt;/a> can&amp;nbsp;be&amp;nbsp;found in&amp;nbsp;the SVN. Every plugin configuration has&amp;nbsp;to&amp;nbsp;start with &lt;tt>[general]&lt;/tt>.&lt;a name="h711-1">&lt;/a>&lt;h2>The plugin class&lt;/h2>
Like we&amp;nbsp;said before one&amp;nbsp;plugin can&amp;nbsp;be&amp;nbsp;composed of&amp;nbsp;different plugin classes. Each of&amp;nbsp;those plugin classes can&amp;nbsp;provide methods for&amp;nbsp;API functions or&amp;nbsp;&amp;mdash; most important for&amp;nbsp;plugin developement &amp;mdash; event handlers for&amp;nbsp;OntoWiki/Erfurt events. A&amp;nbsp;plugin class may&amp;nbsp;extend the&amp;nbsp;general plugin classes of&amp;nbsp;OntoWiki or&amp;nbsp;Erfurt. This is&amp;nbsp;not is&amp;nbsp;not necessary but&amp;nbsp;it&amp;nbsp;prevents a&amp;nbsp;lot of&amp;nbsp;problems and&amp;nbsp;it&amp;nbsp;provides a&amp;nbsp;better interface to&amp;nbsp;OntoWiki/Erfurt.&lt;br />
%%(php)&lt;br />
class Your&amp;nbsp;Plugin&amp;nbsp;Class extends Onto&amp;nbsp;Wiki_&amp;nbsp;Plugin {&lt;br />
&lt;div class="indent">public function yourEventHandler() {&lt;br />
&lt;div class="indent">// your event handler without event data&lt;br />
&lt;/div>}&lt;br />
public function yourOtherEventHandler(&amp;$data) {&lt;br />
&lt;div class="indent">// your event handler with data passed&lt;br />
// now&amp;nbsp;you can&amp;nbsp;do&amp;nbsp;something with $data (but do&amp;nbsp;not overwrite it&amp;nbsp;accidently)&lt;br />
&lt;/div>}&lt;br />
// your other stuff for&amp;nbsp;the plugin class&lt;/div>
}&lt;br />
&lt;span class="cite">Your event handlers cannot be&amp;nbsp;private because the&amp;nbsp;event dispatcher must be&amp;nbsp;able to&amp;nbsp;call them.&lt;/span> If&amp;nbsp;you want to&amp;nbsp;write plugins only for&amp;nbsp;Erfurt you&amp;nbsp;may extend &lt;tt>Erfurt_Plugin&lt;/tt>. You&amp;nbsp;have to&amp;nbsp;name the&amp;nbsp;file like the&amp;nbsp;plugin class extended by&amp;nbsp;&lt;tt>.php&lt;/tt>, in&amp;nbsp;our example above it&amp;nbsp;is &lt;tt>Your&amp;nbsp;Plugin&amp;nbsp;Class.php&lt;/tt>.&lt;br />
If&amp;nbsp;you write event handler methods for&amp;nbsp;events passing data, you&amp;nbsp;must use&amp;nbsp;references (&lt;tt>&lt;strong>&amp;&lt;/strong>$var&lt;/tt>).&lt;a name="h711-2">&lt;/a>&lt;h2>What to&amp;nbsp;do&lt;/h2>
Writing plugins for&amp;nbsp;OntoWiki is&amp;nbsp;based on&amp;nbsp;using events, writing event handlers, and&amp;nbsp;using functionality provided by&amp;nbsp;OntoWiki or&amp;nbsp;Erfurt or&amp;nbsp;by Zend helper classes (eg. the&amp;nbsp;view helpers for&amp;nbsp;OntoWiki to&amp;nbsp;manipulate/extend the&amp;nbsp;output). You&amp;nbsp;can change templates/views, replace or&amp;nbsp;insert action controllers, and&amp;nbsp;doing smaller tasks like adding tabulators or&amp;nbsp;menu options to&amp;nbsp;windows and&amp;nbsp;so&amp;nbsp;on.&lt;a name="h711-3">&lt;/a>&lt;h3>Using the&amp;nbsp;interface, methods and&amp;nbsp;objects&lt;/h3>
The&amp;nbsp;generell plugin classes from OntoWiki and&amp;nbsp;Erfurt provide some methods and&amp;nbsp;objects as&amp;nbsp;an interface for&amp;nbsp;plugins to&amp;nbsp;core functionality. Currently provided interface objects are:&lt;br />
&lt;ul>&lt;li> &lt;tt>$_erfurtApp&lt;/tt>: Erfurt object to&amp;nbsp;use the&amp;nbsp;&lt;a href="http://docs.ontowiki.net/erfurt/doc/" target="_blank" title="Outgoing link (in new window)" class="outerlink">&lt;img src="http://ontowiki.net/themes/aksw2007/icons/world_link.png" alt="" class="contexticon" />Erfurt API&lt;/a>
&lt;/li>&lt;li> &lt;tt>$_eventDispatcher&lt;/tt>: the&amp;nbsp;&lt;a href="http://docs.ontowiki.net/erfurt/doc/plugin/Erfurt_EventDispatcher.html" target="_blank" title="Outgoing link (in new window)" class="outerlink">&lt;img src="http://ontowiki.net/themes/aksw2007/icons/world_link.png" alt="" class="contexticon" />event dispatcher&lt;/a> object
&lt;/li>&lt;li> &lt;tt>$_pluginManager&lt;/tt>: the&amp;nbsp;&lt;a href="http://docs.ontowiki.net/erfurt/doc/plugin/Erfurt_PluginManager.html" target="_blank" title="Outgoing link (in new window)" class="outerlink">&lt;img src="http://ontowiki.net/themes/aksw2007/icons/world_link.png" alt="" class="contexticon" />plugin manager&lt;/a> object
&lt;/li>&lt;li> &lt;tt>$_action&lt;/tt>: object of&amp;nbsp;currently used action controller (if available)
&lt;/li>&lt;li> &lt;tt>$_view&lt;/tt>: object of&amp;nbsp;currently used &lt;a href="http://framework.zend.com/manual/en/zend.controller.actionhelpers.html#zend.controller.actionhelpers.viewrenderer" target="_blank" title="Outgoing link (in new window)" class="outerlink">&lt;img src="http://ontowiki.net/themes/aksw2007/icons/world_link.png" alt="" class="contexticon" />viewRenderer helper&lt;/a> (if available)&lt;/li>&lt;/ul>
Please have a&amp;nbsp;look at&amp;nbsp;the referenced documents how&amp;nbsp;to&amp;nbsp;use the&amp;nbsp;methods of&amp;nbsp;these objects. Some of&amp;nbsp;their stuff we&amp;nbsp;will use&amp;nbsp;in&amp;nbsp;our examples but&amp;nbsp;generally you&amp;nbsp;can do&amp;nbsp;more. Methods provided by&amp;nbsp;the parent plugin classes are:&lt;br />
&lt;ul>&lt;li> &lt;tt>_setEnvironment()&lt;/tt>: this method tires to&amp;nbsp;allocate the&amp;nbsp;&lt;tt>$_action&lt;/tt> and&amp;nbsp;&lt;tt>$_view$&lt;/tt> objects, because they could change between application states when event handlers are&amp;nbsp;called
&lt;/li>&lt;li> &lt;tt>_getPluginRootDir()&lt;/tt>: returns the&amp;nbsp;server dir&amp;nbsp;where the&amp;nbsp;plugin is&amp;nbsp;located (as string)
&lt;/li>&lt;li> &lt;tt>_getPluginBaseUri()&lt;/tt>: returns the&amp;nbsp;URL of&amp;nbsp;the plugin folder, needfull when a&amp;nbsp;plugin tries to&amp;nbsp;add own&amp;nbsp;javascript or&amp;nbsp;stylesheet files to&amp;nbsp;the theme
&lt;/li>&lt;li> &lt;tt>_getOntoWikiBaseUri()&lt;/tt>: returns the&amp;nbsp;URL of&amp;nbsp;the OntoWiki installation
&lt;/li>&lt;li> &lt;tt>_getActiveModel()&lt;/tt>: returns the&amp;nbsp;URI of&amp;nbsp;the currently choosen knowledge base&lt;/li>&lt;/ul>
Maybe there will be&amp;nbsp;new methods in&amp;nbsp;future. If&amp;nbsp;you have any&amp;nbsp;requests for&amp;nbsp;new simplyfied interfaces to&amp;nbsp;OntoWiki/Erfurt/Zend functionality, please add&amp;nbsp;your request to&amp;nbsp;our &lt;a href="http://code.google.com/p/ontowiki/issues/list" target="_blank" title="Outgoing link (in new window)" class="outerlink">&lt;img src="http://ontowiki.net/themes/aksw2007/icons/world_link.png" alt="" class="contexticon" />issue tracker&lt;/a>.&lt;a name="h711-4">&lt;/a>&lt;h3>Change a&amp;nbsp;template&lt;/h3>&lt;a name="h711-5">&lt;/a>&lt;h3>Replace an&amp;nbsp;action controller&lt;/h3>&lt;/div>&lt;br />
&lt;b>Deletions:&lt;/b>&lt;br />
&lt;div class="deletions">Every plugin package has&amp;nbsp;its own&amp;nbsp;&lt;tt>config.ini&lt;/tt> to&amp;nbsp;make declarations about plugin's folder structure, event handlers or&amp;nbsp;translation files. Currently their are&amp;nbsp;four main parts: meta information about the&amp;nbsp;plugin, local folder structure, announcements for&amp;nbsp;event handlers and&amp;nbsp;announcing additional classes (e.g. for&amp;nbsp;simple integration of&amp;nbsp;APIs or&amp;nbsp;other libraries). It&amp;nbsp;also keeps information about the&amp;nbsp;plugin's state (enabled or&amp;nbsp;disabled). The&amp;nbsp;&lt;a href="http://code.google.com/p/ontowiki/source/browse/trunk/ontowiki/plugins/Example/config.ini-dist#" target="_blank" title="Outgoing link (in new window)" class="outerlink">&lt;img src="http://ontowiki.net/themes/aksw2007/icons/world_link.png" alt="" class="contexticon" />configuration file of&amp;nbsp;the Example plugin&lt;/a> can&amp;nbsp;be&amp;nbsp;found in&amp;nbsp;the SVN. Every plugin configuration has&amp;nbsp;to&amp;nbsp;start with &lt;tt>[general]&lt;/tt>.&lt;/div>&lt;/div>
</description>
</item>
<item>
<title>2008-05-18 22:40:48</title>
<link>http://ontowiki.net/Projects/OntoWiki/EventPluginArchitecture/PluginDevelopment/show?time=2008-05-18+22%3A40%3A48</link>
<description>&lt;div class="pageBefore">&lt;img src="http://ontowiki.net/images/z.gif" width="1" height="1" border="0" alt="" style="display:block" align="top" />&lt;/div>&lt;div class="page">
&lt;b>Comparison for &lt;a  href="http://ontowiki.net/Projects/OntoWiki/EventPluginArchitecture/PluginDevelopment" class="">/Projects&amp;nbsp;/&amp;nbsp;Onto&amp;nbsp;Wiki&amp;nbsp;/&amp;nbsp;Event&amp;nbsp;Plugin&amp;nbsp;Architecture&amp;nbsp;/&amp;nbsp;Plugin&amp;nbsp;Development&lt;/a> of &lt;a href="http://ontowiki.net/Projects/OntoWiki/EventPluginArchitecture/PluginDevelopment?time=2008-05-18+22%3A40%3A48">2008-05-18 22:40:48&lt;/a> and &lt;a href="http://ontowiki.net/Projects/OntoWiki/EventPluginArchitecture/PluginDevelopment?time=2008-05-18+22%3A45%3A24">2008-05-18 22:45:24&lt;/a>&lt;/b>&lt;br />
&lt;br />
&lt;b>Additions:&lt;/b>&lt;br />
&lt;div class="additions">&lt;a name="h711-1">&lt;/a>&lt;h1>How to&amp;nbsp;develop an&amp;nbsp;OntoWiki Plugin&lt;/h1>
This wiki page introduces how&amp;nbsp;to&amp;nbsp;develop plugins for&amp;nbsp;OntoWiki. Developing Erfurt plugins is&amp;nbsp;basically the&amp;nbsp;same but&amp;nbsp;you don't have Zend events, views and&amp;nbsp;action controllers.&lt;/div>&lt;br />
&lt;b>Deletions:&lt;/b>&lt;br />
&lt;div class="deletions">&lt;a name="h711-1">&lt;/a>&lt;h1>How to&amp;nbsp;develope an&amp;nbsp;OntoWiki Plugin&lt;/h1>
This wiki page introduces how&amp;nbsp;to&amp;nbsp;develope plugins for&amp;nbsp;OntoWiki. Developing Erfurt plugins is&amp;nbsp;basically the&amp;nbsp;same but&amp;nbsp;you don't have Zend events, views and&amp;nbsp;action controllers.&lt;/div>&lt;/div>
</description>
</item>
<item>
<title>2008-05-16 20:55:03</title>
<link>http://ontowiki.net/Projects/OntoWiki/EventPluginArchitecture/PluginDevelopment/show?time=2008-05-16+20%3A55%3A03</link>
<description>&lt;div class="pageBefore">&lt;img src="http://ontowiki.net/images/z.gif" width="1" height="1" border="0" alt="" style="display:block" align="top" />&lt;/div>&lt;div class="page">
&lt;b>Comparison for &lt;a  href="http://ontowiki.net/Projects/OntoWiki/EventPluginArchitecture/PluginDevelopment" class="">/Projects&amp;nbsp;/&amp;nbsp;Onto&amp;nbsp;Wiki&amp;nbsp;/&amp;nbsp;Event&amp;nbsp;Plugin&amp;nbsp;Architecture&amp;nbsp;/&amp;nbsp;Plugin&amp;nbsp;Development&lt;/a> of &lt;a href="http://ontowiki.net/Projects/OntoWiki/EventPluginArchitecture/PluginDevelopment?time=2008-05-16+20%3A55%3A03">2008-05-16 20:55:03&lt;/a> and &lt;a href="http://ontowiki.net/Projects/OntoWiki/EventPluginArchitecture/PluginDevelopment?time=2008-05-18+22%3A40%3A48">2008-05-18 22:40:48&lt;/a>&lt;/b>&lt;br />
&lt;br />
&lt;b>Additions:&lt;/b>&lt;br />
&lt;div class="additions">There every plugin has&amp;nbsp;its own&amp;nbsp;folder. A&amp;nbsp;plugin folder can&amp;nbsp;include several other plugin folders but&amp;nbsp;it&amp;nbsp;is not&amp;nbsp;possible to&amp;nbsp;have two&amp;nbsp;different plugins packages parallel in&amp;nbsp;one folder. Every plugin package can&amp;nbsp;include different plugin classes and&amp;nbsp;libraries, it&amp;nbsp;haves its&amp;nbsp;own &lt;tt>config.ini&lt;/tt>. For&amp;nbsp;example:&lt;br />
&lt;div class="indent">&lt;div class="indent">&lt;div class="indent">|-another-folder/&lt;br />
| |-Plugin-three-&amp;nbsp;B.php&lt;br />
|-api/&lt;/div>&lt;/div>&lt;/div>
It&amp;nbsp;may be&amp;nbsp;necessary to&amp;nbsp;split a&amp;nbsp;plugin into different classes in&amp;nbsp;several sub&amp;nbsp;folders (e.g. see&amp;nbsp;'plugin-three' in&amp;nbsp;our directory example above). If&amp;nbsp;you add&amp;nbsp;those folders to&amp;nbsp;the configuration file they will be&amp;nbsp;managed automatically by&amp;nbsp;the plugin manager. Declare folders relative to&amp;nbsp;the plugin's root folder (the folder where the&amp;nbsp;configuration file is&amp;nbsp;located):&lt;br />
; Which folders are&amp;nbsp;needed                                                     ;&lt;br />
folder.0 = &amp;laquo;./&amp;raquo; ; its&amp;nbsp;not necessary to&amp;nbsp;declare './' (plugin root itself)&lt;br />
folder.1 = &amp;laquo;./another-folder&amp;raquo;&lt;br />
folder.2 = &amp;laquo;./api&amp;raquo;&lt;br />
It's important to&amp;nbsp;declare all&amp;nbsp;folders you&amp;nbsp;want use&amp;nbsp;plugin classes from.&lt;br />
You&amp;nbsp;can announce methods from a&amp;nbsp;plugin class as&amp;nbsp;event handlers, you&amp;nbsp;have to&amp;nbsp;declare the&amp;nbsp;event name, name of&amp;nbsp;the plugin class and&amp;nbsp;name of&amp;nbsp;the method from that class:&lt;br />
; Announcements of&amp;nbsp;event handlers                                              ;&lt;br />
announce.0.event  = "Zend&amp;nbsp;Post&amp;nbsp;Dispatch"           ; name of&amp;nbsp;event&lt;br />
announce.0.class  = &amp;#147;Plugin-three-A&amp;#148;             ; name of&amp;nbsp;plugin class&lt;br />
announce.0.method = &amp;#147;changeTitleAtPostDispatch&amp;#148;  ; name of&amp;nbsp;method from plugin class&lt;br />
announce.1.event  = &amp;#147;default_resource_view_ZendPostDispatch&amp;#148;&lt;br />
announce.1.class  = &amp;#147;Plugin-three-B&amp;#148;&lt;br />
announce.1.method = &amp;#147;changeViewTemplate&amp;#148;&lt;br />
You&amp;nbsp;can declare additional plugin classes which do&amp;nbsp;not provide event handlers (e.g. providing an&amp;nbsp;API or&amp;nbsp;library for&amp;nbsp;other plugins) because access to&amp;nbsp;those classes will be&amp;nbsp;easier through the&amp;nbsp;plugin manager.&lt;br />
; Announce additional Classes                                                  ;&lt;br />
add.0.class = "Class&amp;nbsp;Name"&lt;/div>&lt;br />
&lt;b>Deletions:&lt;/b>&lt;br />
&lt;div class="deletions">In&amp;nbsp;that folder every plugin has&amp;nbsp;its own&amp;nbsp;folder. A&amp;nbsp;plugin folder can&amp;nbsp;include several other plugin folders but&amp;nbsp;it&amp;nbsp;is not&amp;nbsp;possible to&amp;nbsp;have two&amp;nbsp;different plugins packages parallel in&amp;nbsp;one folder. Every plugin package can&amp;nbsp;include different plugin classes and&amp;nbsp;libraries, it&amp;nbsp;haves its&amp;nbsp;own &lt;tt>config.ini&lt;/tt>. For&amp;nbsp;example:&lt;br />
&lt;div class="indent">&lt;div class="indent">&lt;div class="indent">&lt;div class="indent">|-another-folder/&lt;br />
| |-Plugin-three-&amp;nbsp;B.php&lt;br />
|-api/&lt;/div>&lt;/div>&lt;/div>&lt;/div>
It&amp;nbsp;may be&amp;nbsp;necessary to&amp;nbsp;split a&amp;nbsp;plugin into several plugin class in&amp;nbsp;several sub&amp;nbsp;folders (e.g. see&amp;nbsp;plugin-three in&amp;nbsp;our directory example above).&lt;/div>&lt;/div>
</description>
</item>
</channel>
</rss>
