Difference between revisions of "Plugin APIG2"

From GeeklogWiki
Jump to: navigation, search
m (very hot website)
m
 
(15 intermediate revisions by 4 users not shown)
Line 9: Line 9:
 
=== Plugin Overview ===
 
=== Plugin Overview ===
  
The GL2 plugin architecture will be event based. Each plugin will register to listen for events that are generated by the GL2 kernel and other plugins. The GL2 kernel will act as a router for these events. When an event occurs, the GL2 kernel will call all the plugins that have registered for that event.
+
The GL2 plugin architecture will be action based. Each plugin will register to listen for actions that are generated by the GL2 kernel and other plugins. The GL2 kernel will act as a router for these actions. When an action occurs, the GL2 kernel will call all the plugins that have registered for that action.
  
 
== The Plugin Interface Class ==
 
== The Plugin Interface Class ==
Line 16: Line 16:
  
 
<pre>
 
<pre>
class glPluginInterface {
+
class Geeklog_PluginInterface {
  
 
     /**
 
     /**
Line 22: Line 22:
 
     *
 
     *
 
     * Handles the creation of data structures, security setup, and
 
     * Handles the creation of data structures, security setup, and
     * registers for events.
+
     * registers for actions.
 
     *
 
     *
 
     * @access public
 
     * @access public
Line 33: Line 33:
 
     *
 
     *
 
     * Handles the removal of data structures, security setup, and
 
     * Handles the removal of data structures, security setup, and
     * deregisters events.
+
     * deregisters actions.
 
     *
 
     *
 
     * @access public
 
     * @access public
Line 44: Line 44:
 
     *
 
     *
 
     * Handles the update of data structures, security setup, and
 
     * Handles the update of data structures, security setup, and
     * alters the registered for events as needed.
+
     * alters the registered for actions as needed.
 
     *
 
     *
 
     * @access public
 
     * @access public
Line 64: Line 64:
  
 
     /**
 
     /**
     * Event handler
+
     * Action handler
 
     *
 
     *
     * Executes actions based on events passed to the function by the
+
     * Executes functionality based on action passed to the function by the
 
     * GL2 kernel.
 
     * GL2 kernel.
 
     *
 
     *
 
     * @access public
 
     * @access public
     * @return mixed    return type depends on event
+
    * @param  string  name of action that requires handling
 +
    * @param  mixed    variable type (and existence) dependent on action
 +
     * @return mixed    return type depends on action
 
     */
 
     */
     public function handleEvent( $event, $var = '');
+
     public function handleAction( $action, $var = '');
 +
 
 +
    /**
 +
    * HTML Page Generation
 +
    *
 +
    * Called by index.php (which is responsible for determining which
 +
    * plugin's getPage to call), this function generates a HTML page
 +
    * based upon user inputed data ($request). 
 +
    *
 +
    * @access public
 +
    * @param  array    Array of applicable GET and POST variables
 +
    * @return string    HTML of requested page
 +
    */
 +
    public function getPage( $request );
 
}
 
}
 
</pre>
 
</pre>
  
== Event Manager Class ==
+
== Action Manager Class ==
  
An instance of the class described below will be created globally by the GL2 core.  It will be available to all plugins and is responsible for handling plugin event registration and notification.  
+
An instance of the class described below will be created globally by the GL2 core.  It will be available to all plugins and is responsible for handling plugin action registration and notification.  
  
 
<pre>
 
<pre>
class glEventManager {
+
class Geeklog_ActionManager {
 
     /**
 
     /**
     * Array containing event keys and listener (arrays as) values
+
     * Array containing action keys and listener (arrays as) values
     * This takes the form of $listeners[<eventName>] =  
+
     * This takes the form of $listeners[<actionName>] =  
 
     *                            array(<pluginName1>, <pluginName2>, etc);
 
     *                            array(<pluginName1>, <pluginName2>, etc);
 
     */
 
     */
Line 90: Line 105:
  
 
     /**
 
     /**
     * PluginEventHandler Constructor
+
     * Geeklog_ActionManager Constructor
 
     *
 
     *
 
     * @author Vincent Furia <vfuria@gmail.com>
 
     * @author Vincent Furia <vfuria@gmail.com>
Line 101: Line 116:
  
 
     /**
 
     /**
     * Register a plugin to listen for an event
+
     * Register a plugin to listen for an action
 
     *
 
     *
 
     * @author Vincent Furia <vfuria@gmail.com>
 
     * @author Vincent Furia <vfuria@gmail.com>
 
     * @access public
 
     * @access public
     * @param  mixed  $event event(s) to listen for (string or array)
+
     * @param  mixed  $action action(s) to listen for (string or array)
 
     * @param  string  $plugin plugin to be registered as listener
 
     * @param  string  $plugin plugin to be registered as listener
 
     * @return boolean true on success
 
     * @return boolean true on success
 
     *
 
     *
 
     */
 
     */
     public function registerListener($events, $plugin) {
+
     public function registerListener($actions, $plugin) {
 
         // add the listener to the $listeners variable and the database
 
         // add the listener to the $listeners variable and the database
 
     }
 
     }
  
 
     /**
 
     /**
     * Unregister a plugin from listening for an event
+
     * Unregister a plugin from listening for an action
 
     *
 
     *
 
     * @author Vincent Furia <vfuria@gmail.com>
 
     * @author Vincent Furia <vfuria@gmail.com>
 
     * @access public
 
     * @access public
     * @param  mixed  $event event(s) to unregister (string or array)
+
     * @param  mixed  $action action(s) to unregister (string or array)
 
     * @param  string  $plugin plugin to be unregistered as listener
 
     * @param  string  $plugin plugin to be unregistered as listener
 
     * @return boolean true on success
 
     * @return boolean true on success
 
     *
 
     *
 
     */
 
     */
     public function unregisterListener($plugin, $events = '') {
+
     public function unregisterListener($plugin, $actions = '') {
       // remove the listener for the specified events from $listeners
+
       // remove the listener for the specified actions from $listeners
       // and the database.  If events is empty then unregister the plugin  
+
       // and the database.  If actions is empty then unregister the plugin  
       // for all events
+
       // for all actions
 
     }
 
     }
  
 
     /**
 
     /**
     * Get all the listeners for a specific event
+
     * Get all the listeners for a specific action
 
     *
 
     *
 
     * @author Vincent Furia <vfuria@gmail.com>
 
     * @author Vincent Furia <vfuria@gmail.com>
 
     * @access public
 
     * @access public
     * @param  string $event event to get listeners of
+
     * @param  string $action action to get listeners of
     * @return array  array of listeners to event $event
+
     * @return array  array of listeners to action $action
 
     *
 
     *
 
     */
 
     */
     public function getListeners($event) {
+
     public function getListeners($action) {
       // remove the listener for the specified events from $listeners
+
       // remove the listener for the specified actions from $listeners
 
       //  and the database.
 
       //  and the database.
 
     }
 
     }
  
 
     /**
 
     /**
     * Notify listener(s) that an event has occurred
+
     * Notify listener(s) that an action has occurred
 
     *
 
     *
 
     * @author Vincent Furia <vfuria@gmail.com>
 
     * @author Vincent Furia <vfuria@gmail.com>
 
     * @access public
 
     * @access public
     * @param  mixed $event event requiring notification
+
     * @param  mixed $action action requiring notification
     * @param  mixed $vars  event specific variables
+
     * @param  mixed $vars  action specific variables
 
     * @param  mixed $plugin NOTIFY_ALL, specific plugin, or array of plugins
 
     * @param  mixed $plugin NOTIFY_ALL, specific plugin, or array of plugins
     * @return mixed event specific return values (or array of)
+
     * @return mixed action specific return values (or array of)
 
     *
 
     *
 
     */
 
     */
     public function notify($event, $vars, $plugin = NOTIFY_ALL) {
+
     public function notify($action, $vars, $plugin = NOTIFY_ALL) {
         // call the handle event function for each plugin listening to the
+
         // call the handle action function for each plugin listening to the
         // relevant event (or, if $plugin specified, only that plugin)
+
         // relevant action (or, if $plugin specified, only that plugin)
 
     }
 
     }
  
Line 177: Line 192:
 
</pre>
 
</pre>
  
== Events ==
+
== Actions ==
  
=== Registering for Events ===
+
=== Registering for Actions ===
  
When a plugin's install() function is called it is expected to register for all the events it will need to handle. This is accomplished using the function registerListener() of the glEventManager class. Similarly within the uninstall() function, the function unregisterListener() of the glEventManager class should be used to deregister event watches.   
+
When a plugin's install() function is called it is expected to register for all the actions it will need to handle. This is accomplished using the function registerListener() of the Geeklog_ActionManager class. Similarly within the uninstall() function, the function unregisterListener() of the Geeklog_ActionManager class should be used to deregister action watches.   
  
A plugin should never register for its own events as this has the potential to create infinite loops (as such the glEventManager class will prevent such registrations). In any case such a feature should not be needed, as a plugin can execute any required tasks when an event is triggered.   
+
A plugin should never register for its own actions as this has the potential to create infinite loops (as such the Geeklog_ActionManager class will prevent such registrations). In any case such a feature should not be needed, as a plugin can execute any required tasks when an action is triggered.   
  
=== Handling Events ===
+
=== Handling Actions ===
  
When an event is triggered, either by the GL2 kernel or by a plugin, the handleEvent() function is called on all plugins registered for that event. At that point it is the responsiblitiy of the plugin to do any required processing and to return an appropriate value.
+
When an action is triggered, either by the GL2 kernel or by a plugin, the handleAction() function is called on all plugins registered for that action. At that point it is the responsiblitiy of the plugin to do any required processing and to return an appropriate value.
  
Each plugin will be responsible for preventing infinite loops caused by handling an event in such a way that the handled event is triggered. Infinite loops can avoided in many cases simply by not triggering any events inside the event handler (if possible).
+
Each plugin will be responsible for preventing infinite loops caused by handling an action in such a way that the handled action is triggered. Infinite loops can avoided in many cases simply by not triggering any actions inside the action handler (if possible).
  
=== Triggering Events ===
+
=== Triggering Actions ===
  
When a plugin requires input or believes other plugins may benefit from knowing that a given event has occured, the notify() function of the glEventManager class should be called.   
+
When a plugin requires input or believes other plugins may benefit from knowing that a given action has occured, the notify() function of the Geeklog_ActionManager class should be called.   
  
=== Event Naming Scheme ===
+
=== Action Naming Scheme ===
  
Event names should be prefixed with the plugin name. The actual event name should be descriptive and may contain subnames seperated by a period ('.'). The word 'core' cannot be used as the plugin name as it is resevered for events triggered by the GL2 kernel.   
+
Action names should be prefixed with the plugin name. The actual action name should be descriptive and may contain subnames seperated by a period ('.'). The word 'core' cannot be used as the plugin name as it is resevered for actions triggered by the GL2 kernel.   
  
Some example event names:
+
Some example action names:
  
 
*"links.delete" -- triggered when a link from the links plugin is deleted
 
*"links.delete" -- triggered when a link from the links plugin is deleted
Line 255: Line 270:
 
== Apendix A: Helper Functions==
 
== Apendix A: Helper Functions==
  
The GL2 kernel will provide a set helper functions to the plugins. These helper functions will provide functionality in areas such as access and authentication (A&A), search, comments, and event handling.
+
The GL2 kernel will provide a set helper functions to the plugins. These helper functions will provide functionality in areas such as access and authentication (A&A), search, comments, and action handling.
  
 
These functions include:
 
These functions include:
Line 264: Line 279:
  
 
*A&A
 
*A&A
*glEventManager
+
*Geeklog_ActionManager
 
*glLogger
 
*glLogger
 
*...many more
 
*...many more
  
== Apendix B: GL2 Core Events==
+
== Apendix B: GL2 Core Actions==
  
The following events will be triggered by the GL2 kernel. They are known as core events because they exist independent of any installed plugins.   
+
The following actions will be triggered by the GL2 kernel. They are known as core actions because they exist independent of any installed plugins.   
  
 
<table>
 
<table>
 
   <tr>
 
   <tr>
     <th>Event </th>
+
     <th>Action </th>
 
     <th>Description</th>
 
     <th>Description</th>
 
   </tr>
 
   </tr>
Line 414: Line 429:
 
*Version 0.3 (08/07/2004): reformated for the wikit and incorporated comments from [http://www.geeklog.net/article.php/2004063000385164#comments geeklog.net].
 
*Version 0.3 (08/07/2004): reformated for the wikit and incorporated comments from [http://www.geeklog.net/article.php/2004063000385164#comments geeklog.net].
 
*Version 0.2 (06/30/2004): updated document with comments from [http://www.geeklog.net/forum/viewtopic.php?forum=12&showtopic=34166 geeklog.net], other improvements as needed. Added Apendix with potential plugins.
 
*Version 0.2 (06/30/2004): updated document with comments from [http://www.geeklog.net/forum/viewtopic.php?forum=12&showtopic=34166 geeklog.net], other improvements as needed. Added Apendix with potential plugins.
*Version 0.1 (04/27/2004): initial release of the documentation for comments[http://www.funasia.cn 装修] [http://www.funasia.cn 装修 http://www.funasia.cn] [http://www.funasia.cn 团购] [http://www.funasia.cn 团购http://www.funasia.cn] [http://www.haishun.net 门禁] [http://www.haishun.net 门禁http://www.haishun.net] [http://haishun11.51.net 虚拟主机 http://haishun11.51.net] [http://haishun11.51.net 虚拟主机] [http://fireworks.garrywa.com fireworks] [http://fireworks.garrywa.com fireworks http://fireworks.garrywa.com] [http://global.garrywa.com/index1.htm gemstone globe http://global.garrywa.com/index1.htm] [http://global.garrywa.com/index1.htm gemstone globe] [http://www.haishun.net 监控] [http://www.haishun.net 监控 http://www.haishun.net] [http://www.fm360.net 网址大全 http://www.fm360.net] [http://www.fm360.net 网址大全] [http://www.tjwatch.com 手表 http://www.tjwatch.com] [http://www.tjwatch.com 手表] [http://www.hdfix.com.cn 数据恢复 http://www.hdfix.com.cn] [http://www.hdfix.com.cn 数据恢复 http://www.hdfix.com.cn] [http://www.conjhost.com 虚拟主机] [http://www.conjhost.com 虚拟主机 http://www.conjhost.com] [http://fireworks.garrywa.com/fireworks/fireworks.htm fireworks http://fireworks.garrywa.com/fireworks/fireworks.htm] [http://fireworks.garrywa.com/fireworks/fireworks.htm fireworks http://fireworks.garrywa.com/fireworks/fireworks.htm] [http://www.feilun.com.cn 离心机 http://www.feilun.com.cn离心机] [http://www.feilun.com.cn 离心机 http://www.feilun.com.cnhttp://www.feilun.com.cn] [http://www.3335555.com 化学试剂 http://www.3335555.com化学试剂] [http://www.3335555.com 化学试剂 http://www.3335555.comhttp://www.3335555.com] [http://www.33335556.com 媒体 http://www.33335556.com媒体] [http://www.33335556.com 媒体 http://www.33335556.comhttp://www.33335556.com] [http://www.33335556.com 媒体 http://www.33335556.comhttp://www.33335556.com] [http://www.3332226.com 二手笔记本 http://www.3332226.com二手笔记本] [http://www.3332226.com 二手笔记本 http://www.3332226.comhttp://www.3332226.com] [http://www.3335558.com 手套 http://www.3335558.com手套] [http://www.3335558.com 手套 http://www.3335558.comhttp://www.3335558.com] [http://www.3332228.com 发动机 http://www.3332228.com发动机] [http://www.3332228.com 发动机 http://www.3332228.comhttp://www.3332228.com] [http://www.3336668.com 免费下载电影 http://www.3336668.com 免费下载电影] [http://www.3336668.com 免费下载电影 http://www.3336668.com http://www.3336668.com] [http://www.3332228.com 发动机 http://www.3332228.com发动机] [http://www.3332228.com 发动机 http://www.3332228.comhttp://www.3332228.com] [http://www.5556661.com 水泥 http://www.5556661.com水泥] [http://www.5556661.com 水泥 http://www.5556661.comhttp://www.5556661.com] [http://www.5556663.com 塑料制品 http://www.5556663.com塑料制品] [http://www.5556663.com 塑料制品 http://www.5556663.comhttp://www.5556663.com] [http://www.5556668.com http://www.5556668.com 机床] [http://www.5556668.com http://www.5556668.com http://www.5556668.com] [http://www.5556669.com 免费音乐下载 http://www.5556669.com免费音乐下载] [http://www.5556669.com 免费音乐下载 http://www.5556669.comhttp://www.5556669.com] [http://www.5558881.com 随身听 http://www.5558881.com随身听] [http://www.5558881.com 随身听 http://www.5558881.comhttp://www.5558881.com] [http://www.5558882.com 防水材料 http://www.5558882.com防水材料] [http://www.5558882.com 防水材料 http://www.5558882.comhttp://www.5558882.com] [http://www.5558883.com 纺织机械 http://www.5558883.com纺织机械] [http://www.5558883.com 纺织机械 http://www.5558883.comhttp://www.5558883.com] [http://www.5558886.com 耐火材料 http://www.5558886.com耐火材料] [http://www.5558886.com 耐火材料 http://www.5558886.comhttp://www.5558886.com] [http://www.5558889.com 肺结核 http://www.5558889.com肺结核] [http://www.5558889.com 肺结核 http://www.5558889.comhttp://www.5558889.com] [http://www.6668883.com 肺炎 http://www.6668883.com肺炎] [http://www.6668883.com 肺炎 http://www.6668883.comhttp://www.6668883.com] [http://www.6668886.com 风机 http://www.6668886.com风机] [http://www.6668886.com 风机 http://www.6668886.comhttp://www.6668886.com] [http://www.6668889.com 家居装饰 http://www.6668889.com家居装饰] [http://www.6668889.com 家居装饰 http://www.6668889.comhttp://www.6668889.com] [http://www.7773336.com 啤酒 http://www.7773336.com啤酒] [http://www.7773336.com 啤酒 http://www.7773336.comhttp://www.7773336.com] [http://www.7775556.com 脱发 http://www.7775556.com脱发] [http://www.7775556.com 脱发 http://www.7775556.comhttp://www.7775556.com] [http://www.7775558.com 钢板 http://www.7775558.com钢板] [http://www.7775558.com 钢板 http://www.7775558.comhttp://www.7775558.com] [http://www.7775559.com 汽车美容 http://www.7775559.com汽车美容] [http://www.7775559.com 汽车美容 http://www.7775559.comhttp://www.7775559.com] [http://www.6667773.com 网络电话 http://www.6667773.com网络电话] [http://www.6667773.com 网络电话 http://www.6667773.comhttp://www.6667773.com] [http://www.6667775.com 监理 http://www.6667775.com监理] [http://www.6667775.com 监理 http://www.6667775.comhttp://www.6667775.com] [http://www.6667776.com 减速机 http://www.6667776.com减速机] [http://www.6667776.com 减速机 http://www.6667776.comhttp://www.6667776.com] [http://www.6667777.com 钢板网 http://www.6667777.com钢板网] [http://www.6667777.com 钢板网 http://www.6667777.comhttp://www.6667777.com] [http://www.6667778.com 钢管 http://ww.6667778.com钢管] [http://www.6667778.com 钢管 http://ww.6667778.comhttp://ww.6667778.com] [http://www.6667779.com 网络设备 http://www.6667779.com网络设备] [http://www.6667779.com 网络设备 http://www.6667779.comhttp://www.6667779.com] [http://www.8883335.com 洗衣机 http://www.8883335.com洗衣机] [http://www.8883335.com 洗衣机 http://www.8883335.comhttp://www.8883335.com] [http://www.8883336.com 显卡 http://www.8883336.com显卡] [http://www.8883336.com 显卡 http://www.8883336.comhttp://www.8883336.com] [http://www.8883338.com 显示器 http://www.8883338.com显示器] [http://www.8883338.com 显示器 http://www.8883338.comhttp://www.8883338.com] [http://www.8883339.com 橡胶 http://www.8883339.com橡胶] [http://www.8883339.com 橡胶 http://www.8883339.comhttp://www.8883339.com] [http://www.8885553.com 刀具 http://www.8885553.com刀具] [http://www.8885553.com 刀具 http://www.8885553.comhttp://www.8885553.com] [http://www.8885556.com 电视机 http://www.8885556.com电视机] [http://www.8885556.com 电视机 http://www.8885556.comhttp://www.8885556.com] [http://www.8885558.com 锅炉 http://www.8885558.com锅炉] [http://www.8885558.com 锅炉 http://www.8885558.comhttp://www.8885558.com] [http://www.8886663.com 二手车 http://www.8886663.com二手车] [http://www.8886663.com 二手车 http://www.8886663.comhttp://www.8886663.com] [http://www.8886665.com 滑板 http://www.8886665.com滑板] [http://www.8886665.com 滑板 http://www.8886665.comhttp://www.8886665.com] [http://www.8886668.com 眼镜 http://www.8886668.com眼镜] [http://www.8886668.com 眼镜 http://www.8886668.comhttp://www.8886668.com] [http://www.8886669.com 办公用品 http://www.8886669.com办公用品] [http://www.8886669.com 办公用品 http://www.8886669.comhttp://www.8886669.com] [http://www.8888886.com 防盗门 http://www.8888886.com防盗门] [http://www.8888886.com 防盗门 http://www.8888886.comhttp://www.8888886.com] [http://www.8888885.com 包装机 http://www.8888885.com包装机] [http://www.8888885.com 包装机 http://www.8888885.comhttp://www.8888885.com] [http://www.9993333.com 仪器 http://www.9993333.com仪器] [http://www.9993333.com 仪器 http://www.9993333.comhttp://www.9993333.com] [http://www.9993335.com 保温材料 http://www.9993335.com保温材料] [http://www.9993335.com 保温材料 http://www.9993335.comhttp://www.9993335.com] [http://www.9993336.com 继电器 http://www.9993336.com继电器] [http://www.9993336.com 继电器 http://www.9993336.comhttp://www.9993336.com] [http://www.9993338.com 变频器 http://www.9993338.com变频器] [http://www.9993338.com 变频器 http://www.9993338.comhttp://www.9993338.com] [http://www.9993339.com 包装机械 http://www.9993339.com包装机械] [http://www.9993339.com 包装机械 http://www.9993339.comhttp://www.9993339.com] [http://www.9995555.com http://www.9995555.com 办公家具] [http://www.9995555.com 办公家具 http://www.9995555.com http://www.9995555.com具] [http://www.9995556.com 复印机 http://www.9995556.com复印机] [http://www.9995556.com 复印机 http://www.9995556.comhttp://www.9995556.com] [http://www.9995558.com 货运 http://www.9995558.com货运] [http://www.9995558.com 货运 http://www.9995558.comhttp://www.9995558.com] [http://www.9995559.com 高尔夫 http://www.9995559.com高尔夫] [http://www.9995559.com 高尔夫 http://www.9995559.comhttp://www.9995559.com] [http://shipintj.51.net 视频 http://shipintj.51.net视频] [http://shipintj.51.net 视频 http://shipintj.51.nethttp://shipintj.51.net] [http://tjunderwear.51.net 内衣 http://tjunderwear.51.net内衣] [http://tjunderwear.51.net 内衣 http://tjunderwear.51.nethttp://tjunderwear.51.net] [http://jessica00.51.net 糖尿病 http://jessica00.51.net糖尿病] [http://jessica00.51.net 糖尿病 http://jessica00.51.nethttp://jessica00.51.net] [http://ticai.51.net 体育彩票 http://ticai.51.net体育彩票] [http://ticai.51.net 体育彩票 http://ticai.51.nethttp://ticai.51.net] [http://e2008net.51.net 网页制作 http://e2008net.51.net网页制作] [http://e2008net.51.net 网页制作 http://e2008net.51.nethttp://e2008net.51.net] [http://tomcat00.51.net 性病 http://tomcat00.51.net性病] [http://tomcat00.51.net 性病 http://tomcat00.51.nethttp://tomcat00.51.net] [http://cisco00.51.net CISCO http://cisco00.51.netCISCO] [http://cisco00.51.net CISCO http://cisco00.51.nethttp://cisco00.51.net] [http://ohmyvod.51.net VOD http://ohmyvod.51.netVOD] [http://ohmyvod.51.net VOD http://ohmyvod.51.nethttp://ohmyvod.51.net] [http://notebook1.51.net 笔记本 http://notebook1.51.net笔记本] [http://notebook1.51.net 笔记本 http://notebook1.51.nethttp://notebook1.51.net] [http://notebook2.51.net 笔记本电脑 http://notebook2.51.net笔记本电脑] [http://notebook2.51.net 笔记本电脑 http://notebook2.51.nethttp://notebook2.51.net] [http://adult001.51.net 成人用品 http://adult001.51.net成人用品] [http://adult001.51.net 成人用品 http://adult001.51.nethttp://adult001.51.net] [http://cancer007.51.net 癌症 http://cancer007.51.net癌症] [http://cancer007.51.net 癌症 http://cancer007.51.nethttp://cancer007.51.net] [http://translateone.51.net 翻译 http://translateone.51.net翻译] [http://translateone.51.net 翻译 http://translateone.51.nethttp://translateone.51.net] [http://drinkery.51.net 酒店 http://drinkery.51.net酒店] [http://drinkery.51.net 酒店 http://drinkery.51.nethttp://drinkery.51.net] [http://manager007.51.net 管理咨询 http://manager007.51.net管理咨询] [http://manager007.51.net 管理咨询 http://manager007.51.nethttp://manager007.51.net] [http://bigscreen.51.net 大屏幕 http://bigscreen.51.net大屏幕] [http://bigscreen.51.net 大屏幕 http://bigscreen.51.nethttp://bigscreen.51.net] [http://mp3first.51.net mp3 http://mp3first.51.netmp3] [http://mp3first.51.net mp3 http://mp3first.51.nethttp://mp3first.51.net] [http://present.51.net 礼品 http://present.51.net礼品] [http://present.51.net 礼品 http://present.51.nethttp://present.51.net] [http://studyabroad.51.net 留学 http://studyabroad.51.net留学] [http://studyabroad.51.net 留学 http://studyabroad.51.nethttp://studyabroad.51.net] [http://tour123.51.net 旅游 http://tour123.51.net旅游] [http://tour123.51.net 旅游 http://tour123.51.nethttp://tour123.51.net] [http://train123.51.net 培训 http://train123.51.net培训] [http://train123.51.net 培训 http://train123.51.nethttp://train123.51.net] [http://ourauto.51.net 汽车 http://ourauto.51.net汽车] [http://ourauto.51.net 汽车 http://ourauto.51.nethttp://ourauto.51.net] [http://mobiletele.51.net 手机 http://mobiletele.51.net手机] [http://mobiletele.51.net 手机 http://mobiletele.51.nethttp://mobiletele.51.net] [http://freshflowers.51.net 鲜花 http://freshflowers.51.net鲜花] [http://freshflowers.51.net 鲜花 http://freshflowers.51.nethttp://freshflowers.51.net] [http://migration.51.net 移民 http://migration.51.net移民] [http://migration.51.net 移民 http://migration.51.nethttp://migration.51.net] [http://myapply.51.net 招聘 http://myapply.51.net招聘] [http://myapply.51.net 招聘 http://myapply.51.nethttp://myapply.51.net] [http://decorate.51.net 装修 http://decorate.51.net装修] [http://decorate.51.net 装修 http://decorate.51.nethttp://decorate.51.net] [http://zufang001.51.net 租房 http://zufang001.51.net租房] [http://zufang001.51.net 租房 http://zufang001.51.nethttp://zufang001.51.net] [http://videomarket.51.net MBA http://videomarket.51.netMBA] [http://videomarket.51.net MBA http://videomarket.51.nethttp://videomarket.51.net] [http://email8888bada.51.net 门禁 http://email8888bada.51.net门禁] [http://email8888bada.51.net 门禁 http://email8888bada.51.nethttp://email8888bada.51.net] [http://asp169.51.net 乙肝 http://asp169.51.net乙肝] [http://asp169.51.net 乙肝 http://asp169.51.nethttp://asp169.51.net] [http://cnnet21.51.net 游戏 http://cnnet21.51.net游戏] [http://cnnet21.51.net 游戏 http://cnnet21.51.nethttp://cnnet21.51.net] [http://asp169net.51.net 游戏下载 http://asp169net.51.net游戏下载] [http://asp169net.51.net 游戏下载 http://asp169net.51.nethttp://asp169net.51.net] [http://guanghui16.51.net 仪器 http://guanghui16.51.net仪器] [http://guanghui16.51.net 仪器 http://guanghui16.51.nethttp://guanghui16.51.net] [http://juyolo.51.net 数码相机 http://juyolo.51.net数码相机] [http://juyolo.51.net 数码相机 http://juyolo.51.nethttp://juyolo.51.net] [http://guanghui6.51.net 网站建设 http://guanghui6.51.net网站建设] [http://guanghui6.51.net 网站建设 http://guanghui6.51.net网站建设 http://guanghui6.51.net] [http://guanghui1.51.net erp http://guanghui1.51.neterp] [http://guanghui1.51.net erp http://guanghui1.51.nethttp://guanghui1.51.net] [http://guanghui4.51.net flash http://guanghui4.51.netflash] [http://guanghui4.51.net flash http://guanghui4.51.nethttp://guanghui4.51.net] [http://guanghui5.51.net mp3下载 http://guanghui5.51.netmp3下载] [http://guanghui5.51.net mp3下载 http://guanghui5.51.nethttp://guanghui5.51.net] [http://guanghui7.51.net 爱滋病 http://guanghui7.51.net爱滋病] [http://guanghui7.51.net 爱滋病 http://guanghui7.51.nethttp://guanghui7.51.net] [http://guanghui8.51.net 办公自动化 http://guanghui8.51.net办公自动化] [http://guanghui8.51.net 办公自动化 http://guanghui8.51.nethttp://guanghui8.51.net] [http://guanghui9.51.net 出国 http://guanghui9.51.net出国] [http://guanghui9.51.net 出国 http://guanghui9.51.nethttp://guanghui9.51.net] [http://guanghui11.51.net 短信 http://guanghui11.51.net短信] [http://guanghui11.51.net 短信 http://guanghui11.51.nethttp://guanghui11.51.net] [http://guanghui12.51.net 对讲机 http://guanghui12.51.net对讲机] [http://guanghui12.51.net 对讲机 http://guanghui12.51.nethttp://guanghui12.51.net] [http://guanghui13.51.net 干燥设备 http://guanghui13.51.net干燥设备] [http://guanghui13.51.net 干燥设备 http://guanghui13.51.nethttp://guanghui13.51.net] [http://guanghui14.51.net 会计师事务所 http://guanghui14.51.net会计师事务所] [http://guanghui14.51.net 会计师事务所 http://guanghui14.51.nethttp://guanghui14.51.net] [http://guanghui15.51.net 货架 http://guanghui15.51.net货架] [http://guanghui15.51.net 货架 http://guanghui15.51.nethttp://guanghui15.51.net] [http://guanhui21.51.net 交友 http://guanhui21.51.net交友] [http://guanhui21.51.net 交友 http://guanhui21.51.nethttp://guanhui21.51.net] [http://guanghui71.51.net 聊天 http://guanghui71.51.net聊天] [http://guanghui71.51.net 聊天 http://guanghui71.51.nethttp://guanghui71.51.net] [http://guanhui585.51.net 美女 http://guanhui585.51.net美女] [http://guanhui585.51.net 美女 http://guanhui585.51.nethttp://guanhui585.51.net] [http://www.haishun.net 监控 http://www.haishun.net监控] [http://www.haishun.net 监控 http://www.haishun.nethttp://www.haishun.net] [http://www.haishun.net 门禁 http://www.haishun.net门禁] [http://www.haishun.net 门禁 http://www.haishun.nethttp://www.haishun.net] [http://www.tjwatch.com 手表 http://www.tjwatch.com手表] [http://www.tjwatch.com 手表 http://www.tjwatch.com http://www.tjwatch.com] [http://www.fm360.net 网址大全 http://www.fm360.net网址大全] [http://www.fm360.net 网址大全 http://www.fm360.nethttp://www.fm360.net] [http://www.ss-cn.com 不锈钢 http://www.ss-cn.com不锈钢] [http://www.ss-cn.com 不锈钢 http://www.ss-cn.comhttp://www.ss-cn.com] [http://www.printer-cn.com 打印机 http://www.printer-cn.com打印机] [http://www.printer-cn.com 打印机 http://www.printer-cn.comhttp://www.printer-cn.com] [http://www.stst-cn.com 钢结构 http://www.stst-cn.com钢结构] [http://www.stst-cn.com 钢结构 http://www.stst-cn.comhttp://www.stst-cn.com] [http://www.cn-computer.com 计算机 http://www.cn-computer.com计算机] [http://www.cn-computer.com 计算机 http://www.cn-computer.comhttp://www.cn-computer.com] [http://www.joinin-cn.com 加盟 http://www.joinin-cn.com加盟] [http://www.joinin-cn.com 加盟 http://www.joinin-cn.comhttp://www.joinin-cn.com] [http://www.coma-cn.com 建筑材料 http://www.coma-cn.com建筑材料] [http://www.coma-cn.com 建筑材料 http://www.coma-cn.comhttp://www.coma-cn.com] [http://www.t-agency.com 旅行社 http://www.t-agency.com旅行社] [http://www.t-agency.com 旅行社 http://www.t-agency.comhttp://www.t-agency.com] [http://www.cor-admin.com 企业管理 http://www.cor-admin.com企业管理] [http://www.cor-admin.com 企业管理 http://www.cor-admin.comhttp://www.cor-admin.com] [http://www.human-cn.com 人力资源 http://www.human-cn.com人力资源] [http://www.human-cn.com 人力资源 http://www.human-cn.comhttp://www.human-cn.com] [http://www.webpage-cn.com 网页设计 http://www.webpage-cn.com网页设计] [http://www.webpage-cn.com 网页设计 http://www.webpage-cn.comhttp://www.webpage-cn.com] [http://www.168marketing.com 市场营销 http://www.168marketing.com市场营销] [http://www.168marketing.com 市场营销 http://www.168marketing.comhttp://www.168marketing.com] [http://www.66interior.com 室内设计 http://www.66interior.com室内设计] [http://www.66interior.com 室内设计 http://www.66interior.comhttp://www.66interior.com] [http://www.66cellphone.com 手机 http://www.66cellphone.com手机] [http://www.66cellphone.com 手机 http://www.66cellphone.comhttp://www.66cellphone.com] [http://www.88feedstuff.com 饲料 http://www.88feedstuff.com饲料] [http://www.88feedstuff.com 饲料 http://www.88feedstuff.comhttp://www.88feedstuff.com] [http://www.china-dope.com 涂料 http://www.china-dope.com涂料] [http://www.china-dope.com 涂料 http://www.china-dope.comhttp://www.china-dope.com] [http://www.cn-Satellite-tv.com 卫星电视 http://www.cn-Satellite-tv.com卫星电视] [http://www.cn-Satellite-tv.com 卫星电视 http://www.cn-Satellite-tv.comhttp://www.cn-Satellite-tv.com] [http://www.66logistics.com 物流 http://www.66logistics.com物流] [http://www.66logistics.com 物流 http://www.66logistics.comhttp://www.66logistics.com] [http://www.168Education.com 远程教育 http://www.168Education.com远程教育] [http://www.168Education.com 远程教育 http://www.168Education.comhttp://www.168Education.com] [http://www.cn-exhibition.com 展览 http://www.cn-exhibition.com展览] [http://www.cn-exhibition.com 展览 http://www.cn-exhibition.comhttp://www.cn-exhibition.com] [http://www.66machine.com 包装机械 http://www.66machine.com包装机械] [http://www.66machine.com 包装机械 http://www.66machine.comhttp://www.66machine.com] [http://www.66packing.com 包装设计 http://www.66packing.com包装设计] [http://www.66packing.com 包装设计 http://www.66packing.comhttp://www.66packing.com] [http://www.88fiber.com 玻璃钢 http://www.88fiber.com玻璃钢] [http://www.88fiber.com 玻璃钢 http://www.88fiber.comhttp://www.88fiber.com] [http://www.66ceramic.com 瓷砖 http://www.66ceramic.com瓷砖] [http://www.66ceramic.com 瓷砖 http://www.66ceramic.comhttp://www.66ceramic.com] [http://www.66floor.com 地板 http://www.66floor.com地板] [http://www.66floor.com 地板 http://www.66floor.comhttp://www.66floor.com] [http://www.66battery.com 电池 http://www.66battery.com电池] [http://www.66battery.com 电池 http://www.66battery.comhttp://www.66battery.com] [http://www.66tools.com 电动工具 http://www.66tools.com电动工具] [http://www.66tools.com 电动工具 http://www.66tools.comhttp://www.66tools.com] [http://www.88telephone.com 电话 http://www.88telephone.com电话] [http://www.88telephone.com 电话 http://www.88telephone.comhttp://www.88telephone.com] [http://www.66cable.com 电缆 http://www.66cable.com电缆] [http://www.66cable.com 电缆 http://www.66cable.comhttp://www.66cable.com] [http://www.appliances66.com 电器 http://www.appliances66.com电器] [http://www.appliances66.com 电器 http://www.appliances66.comhttp://www.appliances66.com] [http://www.168wire.com 电线电缆 http://www.168wire.com电线电缆] [http://www.168wire.com 电线电缆 http://www.168wire.comhttp://www.168wire.com] [http://www.66supply.com 电源 http://www.66supply.com电源] [http://www.66supply.com 电源 http://www.66supply.comhttp://www.66supply.com] [http://www.66sculpture.com 雕塑 http://www.66sculpture.com雕塑] [http://www.66sculpture.com 雕塑 http://www.66sculpture.comhttp://www.66sculpture.com] [http://www.earphone168.com 耳机 http://www.earphone168.com耳机] [http://www.earphone168.com 耳机 http://www.earphone168.comhttp://www.earphone168.com] [http://www.computer666.com 二手电脑 http://www.computer666.com二手电脑] [http://www.computer666.com 二手电脑 http://www.computer666.comhttp://www.computer666.com] [http://www.house222.com 二手房 http://www.house222.com二手房] [http://www.house222.com 二手房 http://www.house222.comhttp://www.house222.com] [http://www.cn-dynamotor.com 发电机 http://www.cn-dynamotor.com发电机] [http://www.cn-dynamotor.com 发电机 http://www.cn-dynamotor.comhttp://www.cn-dynamotor.com] [http://www.door168.com 防盗门 http://www.door168.com防盗门] [http://www.door168.com 防盗门 http://www.door168.comhttp://www.door168.com] [http://www.textile88.com 纺织 http://www.textile88.com纺织] [http://www.textile88.com 纺织 http://www.textile88.comhttp://www.textile88.com] [http://www.ticket88.com 机票 http://www.ticket88.com机票] [http://www.ticket88.com 机票 http://www.ticket88.comhttp://www.ticket88.com] [http://www.copy168.com 复印机 http://www.copy168.com复印机] [http://www.copy168.com 复印机 http://www.copy168.comhttp://www.copy168.com] [http://www.888steel.com 钢铁 http://www.888steel.com钢铁] [http://www.888steel.com 钢铁 http://www.888steel.comhttp://www.888steel.com] [http://www.machine88.com 工程机械 http://www.machine88.com工程机械] [http://www.machine88.com 工程机械 http://www.machine88.comhttp://www.machine88.com] [http://www.chinaad-design.com 广告设计 http://www.chinaad-design.com广告设计] [http://www.chinaad-design.com 广告设计 http://www.chinaad-design.comhttp://www.chinaad-design.com] [http://www.relay888.com 继电器 http://www.relay888.com继电器] [http://www.relay888.com 继电器 http://www.relay888.comhttp://www.relay888.com] [http://www.jiadian666.com 家电 http://www.jiadian666.com家电] [http://www.jiadian666.com 家电 http://www.jiadian666.comhttp://www.jiadian666.com] [http://www.551111.com 建筑设计 http://www.551111.com建筑设计] [http://www.551111.com 建筑设计 http://www.551111.comhttp://www.551111.com] [http://www.switch88.com 交换机 http://www.switch88.com交换机] [http://www.switch88.com 交换机 http://www.switch88.comhttp://www.switch88.com] [http://www.jieju-china.com 洁具 http://www.jieju-china.com洁具] [http://www.jieju-china.com 洁具 http://www.jieju-china.comhttp://www.jieju-china.com] [http://www.switch168.com 开关 http://www.switch168.com开关] [http://www.switch168.com 开关 http://www.switch168.comhttp://www.switch168.com] [http://www.musical88.com 乐器 http://www.musical88.com乐器] [http://www.musical88.com 乐器 http://www.musical88.comhttp://www.musical88.com] [http://www.china-wood-floor.com 木地板 http://www.china-wood-floor.com木地板] [http://www.china-wood-floor.com 木地板 http://www.china-wood-floor.comhttp://www.china-wood-floor.com] [http://www.leather168.com 皮革 http://www.leather168.com皮革] [http://www.leather168.com 皮革 http://www.leather168.comhttp://www.leather168.com] [http://www.beer-china.com 啤酒 http://www.beer-china.com啤酒] [http://www.beer-china.com 啤酒 http://www.beer-china.comhttp://www.beer-china.com] [http://www.cn-vcr.com 润滑油 http://www.cn-vcr.com润滑油] [http://www.cn-vcr.com 润滑油 http://www.cn-vcr.comhttp://www.cn-vcr.com] [http://www.china-vcr.com 摄像机 http://www.china-vcr.com摄像机] [http://www.china-vcr.com 摄像机 http://www.china-vcr.comhttp://www.china-vcr.com] [http://www.331111.com 摄像头 http://www.331111.com摄像头] [http://www.331111.com 摄像头 http://www.331111.comhttp://www.331111.com] [http://www.china-digital-camera.com 数码摄像机 http://www.china-digital-camera.com数码摄像机] [http://www.china-digital-camera.com 数码摄像机 http://www.china-digital-camera.comhttp://www.china-digital-camera.com] [http://www.661111.com 塑料机械 http://www.661111.com塑料机械] [http://www.661111.com 塑料机械 http://www.661111.comhttp://www.661111.com] [http://www.china-sports-kit.com 体育用品 http://www.china-sports-kit.com体育用品] [http://www.china-sports-kit.com 体育用品 http://www.china-sports-kit.comhttp://www.china-sports-kit.com] [http://www.665555.com 网络电话 http://www.665555.com网络电话] [http://www.665555.com 网络电话 http://www.665555.comhttp://www.665555.com] [http://www.663333.com 望远镜 http://www.663333.com望远镜] [http://www.663333.com 望远镜 http://www.663333.comhttp://www.663333.com] [http://www.662222.com 文具 http://www.662222.com文具] [http://www.662222.com 文具 http://www.662222.comhttp://www.662222.com] [http://www.885555.com 五金工具 http://www.885555.com五金工具] [http://www.885555.com 五金工具 http://www.885555.comhttp://www.885555.com] [http://www.8881111.com 显示器 http://www.8881111.com显示器] [http://www.8881111.com 显示器 http://www.8881111.comhttp://www.8881111.com] [http://www.8887777.com 相机 http://www.8887777.com相机] [http://www.8887777.com 相机 http://www.8887777.comhttp://www.8887777.com] [http://www.8886666.com 香水 http://www.8886666.com香水] [http://www.8886666.com 香水 http://www.8886666.comhttp://www.8886666.com] [http://www.8885555.com 蓄电池 http://www.8885555.comhttp://www.8885555.com] [http://www.8883333.com 仪表 http://www.8883333.com仪表] [http://www.8883333.com 仪表 http://www.8883333.comhttp://www.8883333.com] [http://www.8882222.com 中央空调 http://www.8882222.com中央空调] [http://www.8882222.com 中央空调 http://www.8882222.comhttp://www.8882222.com] [http://www.36788.com 珠宝 http://www.36788.com珠宝] [http://www.36788.com 珠宝 http://www.36788.comhttp://www.36788.com] [http://www.26788.com 平面设计 http://www.26788.com平面设计] [http://www.26788.com 平面设计 http://www.26788.comhttp://www.26788.com] [http://www.sensor168.com 传感器 http://www.sensor168.com传感器] [http://www.sensor168.com 传感器 http://www.sensor168.comhttp://www.sensor168.com] [http://www.moto-cn.com 摩托车 http://www.moto-cn.com摩托车] [http://www.moto-cn.com 摩托车 http://www.moto-cn.comhttp://www.moto-cn.com] [http://www.glass8888.com 玻璃 http://www.glass8888.com玻璃] [http://www.glass8888.com 玻璃 http://www.glass8888.comhttp://www.glass8888.com] [http://www.motor2008.com 电机 http://www.motor2008.com电机] [http://www.motor2008.com 电机 http://www.motor2008.comhttp://www.motor2008.com] [http://www.craftwork2008.com 工艺品 http://www.craftwork2008.com工艺品] [http://www.craftwork2008.com 工艺品 http://www.craftwork2008.comhttp://www.craftwork2008.com] [http://www.chem888.com 化工 http://www.chem888.com化工] [http://www.chem888.com 化工 http://www.chem888.comhttp://www.chem888.com] [http://www.cosmetics2008.com 化妆品 http://www.cosmetics2008.com化妆品] [http://www.cosmetics2008.com 化妆品 http://www.cosmetics2008.comhttp://www.cosmetics2008.com] [http://www.machine168.com 机械 http://www.machine168.com机械] [http://www.machine168.com 机械 http://www.machine168.comhttp://www.machine168.com] [http://www.ac8888.com 空调 http://www.ac8888.com空调] [http://www.ac8888.com 空调 http://www.ac8888.comhttp://www.ac8888.com] [http://www.cn-fashion.com 时装 http://www.cn-fashion.com时装] [http://www.cn-fashion.com 时装 http://www.cn-fashion.comhttp://www.cn-fashion.com] [http://www.food-cn.com 食品 http://www.food-cn.com食品] [http://www.food-cn.com 食品 http://www.food-cn.comhttp://www.food-cn.com] [http://www.plastic168.com 塑料 http://www.plastic168.com塑料] [http://www.plastic168.com 塑料 http://www.plastic168.comhttp://www.plastic168.com] [http://www.ceramic168.com 陶瓷 http://www.ceramic168.com陶瓷] [http://www.ceramic168.com 陶瓷 http://www.ceramic168.comhttp://www.ceramic168.com] [http://www.toy-china.com 玩具 http://www.toy-china.com玩具] [http://www.toy-china.com 玩具 http://www.toy-china.comhttp://www.toy-china.com] [http://www.hardware888.com 五金 http://www.hardware888.com五金] [http://www.hardware888.com 五金 http://www.hardware888.comhttp://www.hardware888.com] [http://www.cn-press.com 印刷 http://www.cn-press.com印刷] [http://www.cn-press.com 印刷 http://www.cn-press.comhttp://www.cn-press.com] [http://www.chinaaxletree.com 轴承 http://www.chinaaxletree.com轴承] [http://www.chinaaxletree.com 轴承 http://www.chinaaxletree.comhttp://www.chinaaxletree.com] [http://www.steel168.com 钢材 http://www.steel168.com钢材] [http://www.steel168.com 钢材 http://www.steel168.comhttp://www.steel168.com] [http://www.china-af.com 汽车配件 http://www.china-af.com汽车配件] [http://www.china-af.com 汽车配件 http://www.china-af.comhttp://www.china-af.com] [http://www.chinalatex.com 橡胶 http://www.chinalatex.com橡胶] [http://www.chinalatex.com 橡胶 http://www.chinalatex.comhttp://www.chinalatex.com] [http://www.china-transformer.com 变压器 http://www.china-transformer.com变压器] [http://www.china-transformer.com 变压器 http://www.china-transformer.comhttp://www.china-transformer.com] [http://www.booking-room.com 订房 http://www.booking-room.com订房] [http://www.booking-room.com 订房 http://www.booking-room.comhttp://www.booking-room.com] [http://www.tb-china.com 订票 http://www.tb-china.com订票] [http://www.tb-china.com 订票 http://www.tb-china.comhttp://www.tb-china.com] [http://www.china-wp.com 水处理 http://www.china-wp.com水处理] [http://www.china-wp.com 水处理 http://www.china-wp.comhttp://www.china-wp.com] [http://www.screencn.com 显示屏 http://www.screencn.com显示屏] [http://www.screencn.com 显示屏 http://www.screencn.comhttp://www.screencn.com] [http://www.cn-present.com 礼品 http://www.cn-present.com礼品] [http://www.cn-present.com 礼品 http://www.cn-present.comhttp://www.cn-present.com] [http://www.2008travel.com 旅游 http://www.2008travel.com旅游] [http://www.2008travel.com 旅游 http://www.2008travel.comhttp://www.2008travel.com] [http://www.china-am.com 汽车 http://www.china-am.com汽车] [http://www.china-am.com 汽车 http://www.china-am.comhttp://www.china-am.com] [http://www.cn-clothing.com 服装 http://www.cn-clothing.com服装] [http://www.cn-clothing.com 服装 http://www.cn-clothing.comhttp://www.cn-clothing.com] [http://www.commovie-china.com 电影 http://www.commovie-china.com电影] [http://www.commovie-china.com 电影 http://www.commovie-china.comhttp://www.commovie-china.com] [http://www.china-cp.com 手机 http://www.china-cp.com手机] [http://www.china-cp.com 手机 http://www.china-cp.comhttp://www.china-cp.com] [http://www.stst-cn.com 钢结构 http://www.stst-cn.com钢结构] [http://www.stst-cn.com 钢结构 http://www.stst-cn.comhttp://www.stst-cn.com] [http://www.coma-cn.com 建筑材料 http://www.coma-cn.com建筑材料] [http://www.coma-cn.com 建筑材料 http://www.coma-cn.comhttp://www.coma-cn.com] [http://www.cor-admin.com 企业管理 http://www.cor-admin.com 企业管理] [http://www.cor-admin.com 企业管理 http://www.cor-admin.com http://www.cor-admin.co] [http://www.88feedstuff.com 饲料 http://www.88feedstuff.com饲料] [http://www.88feedstuff.com 饲料 http://www.88feedstuff.com饲料] [http://www.china-dope.com 涂料 http://www.china-dope.com涂料] [http://www.china-dope.com 涂料 http://www.china-dope.comhttp://www.china-dope.com] [http://www.cn-Satellite-tv.com 卫星电视 http://www.cn-Satellite-tv.com卫星电视] [http://www.cn-Satellite-tv.com 卫星电视 http://www.cn-Satellite-tv.comhttp://www.cn-Satellite-tv.com] [http://www.66packing.com 包装设计 http://www.66packing.com包装设计] [http://www.66packing.com 包装设计 http://www.66packing.comhttp://www.66packing.com] [http://www.88fiber.com 玻璃钢 http://www.88fiber.com玻璃钢] [http://www.88fiber.com 玻璃钢 http://www.88fiber.comhttp://www.88fiber.com] [http://www.66ceramic.com 瓷砖 http://www.66ceramic.com瓷砖] [http://www.66ceramic.com 瓷砖 http://www.66ceramic.comhttp://www.66ceramic.com] [http://www.66floor.com 地板 http://www.66floor.com地板] [http://www.66floor.com 地板 http://www.66floor.comhttp://www.66floor.com] [http://www.66cable.com 电缆 http://www.66cable.com电缆] [http://www.66cable.com 电缆 http://www.66cable.comhttp://www.66cable.com] [http://www.168wire.com 电线电缆 http://www.168wire.com电线电缆] [http://www.168wire.com 电线电缆 http://www.168wire.comhttp://www.168wire.com] [http://www.66supply.com 电源 http://www.66supply.com电源] [http://www.66supply.com 电源 http://www.66supply.comhttp://www.66supply.com] [http://www.66sculpture.com 雕塑 http://www.66sculpture.com雕塑] [http://www.66sculpture.com 雕塑 http://www.66sculpture.comhttp://www.66sculpture.com] [http://www.551111.com 建筑设计 http://www.551111.com建筑设计] [http://www.551111.com 建筑设计 http://www.551111.comhttp://www.551111.com] [http://www.jieju-china.com 洁具 http://www.jieju-china.com洁具] [http://www.jieju-china.com 洁具 http://www.jieju-china.comhttp://www.jieju-china.com] [http://www.switch168.com 开关 http://www.switch168.com开关] [http://www.switch168.com 开关 http://www.switch168.comhttp://www.switch168.com] [http://www.china-wood-floor.com 木地板 http://www.china-wood-floor.com木地板] [http://www.china-wood-floor.com 木地板 http://www.china-wood-floor.comhttp://www.china-wood-floor.com] [http://www.leather168.com 皮革 http://www.leather168.com皮革] [http://www.leather168.com 皮革 http://www.leather168.comhttp://www.leather168.com] [http://www.beer-china.com 啤酒 http://www.beer-china.com啤酒] [http://www.beer-china.com 啤酒 http://www.beer-china.comhttp://www.beer-china.com] [http://www.661111.com 塑料机械 http://www.661111.com塑料机械] [http://www.661111.com 塑料机械 http://www.661111.comhttp://www.661111.com] [http://www.china-transformer.com 变压器 http://www.china-transformer.com变压器] [http://www.china-transformer.com 变压器 http://www.china-transformer.comhttp://www.china-transformer.com] [http://www.screencn.com 显示屏 http://www.screencn.com显示屏] [http://www.screencn.com 显示屏 http://www.screencn.comhttp://www.screencn.com] [http://www.camera-cn.com 数码相机 http://www.camera-cn.com数码相机] [http://www.camera-cn.com 数码相机 http://www.camera-cn.comhttp://www.camera-cn.com] [http://www.pre-machine.com 稳压器 http://www.pre-machine.com稳压器] [http://www.pre-machine.com 稳压器 http://www.pre-machine.comhttp://www.pre-machine.com] [http://www.Invite-cn.com 招聘 http://www.Invite-cn.com招聘] [http://www.Invite-cn.com 招聘 http://www.Invite-cn.comhttp://www.Invite-cn.com] [http://www.hold-screen.com 触摸屏 http://www.hold-screen.com触摸屏] [http://www.hold-screen.com 触摸屏 http://www.hold-screen.comhttp://www.hold-screen.com] [http://www.ma-cabinet.com 机柜 http://www.ma-cabinet.com机柜] [http://www.ma-cabinet.com 机柜 http://www.ma-cabinet.comhttp://www.ma-cabinet.com] [http://www.screen-cn.com 显示屏 http://www.screen-cn.com显示屏] [http://www.screen-cn.com 显示屏 http://www.screen-cn.comhttp://www.screen-cn.com] [http://www.wine-booking.com 酒店预定 http://www.wine-booking.com酒店预定] [http://www.wine-booking.com 酒店预定 http://www.wine-booking.comhttp://www.wine-booking.com] [http://www.molding-tool.com 模具 http://www.molding-tool.com模具] [http://www.molding-tool.com 模具 http://www.molding-tool.comhttp://www.molding-tool.com] [http://www.movie-online123.com 在线电影 http://www.movie-online123.com在线电影] [http://www.movie-online123.com 在线电影 http://www.movie-online123.comhttp://www.movie-online123.com] [http://www.notebook555.com 笔记本 http://www.notebook555.com笔记本] [http://www.notebook555.com 笔记本 http://www.notebook555.comhttp://www.notebook555.com] [http://haishun11.51.net 虚拟主机 http://haishun11.51.net虚拟主机] [http://haishun11.51.net 虚拟主机 http://haishun11.51.nethttp://haishun11.51.net] [http://www.management666.com 管理咨询 http://www.management666.com管理咨询] [http://www.management666.com 管理咨询 http://www.management666.comhttp://www.management666.com] [http://www.dn-register.com 域名注册 http://www.dn-register.com域名注册] [http://www.dn-register.com 域名注册 http://www.dn-register.comhttp://www.dn-register.com] [http://www.ki-disease.com 肾病 http://www.ki-disease.com肾病] [http://www.ki-disease.com 肾病 http://www.ki-disease.comhttp://www.ki-disease.com] [http://www.freemovie-cn.com 免费电影 http://www.freemovie-cn.com免费电影] [http://www.freemovie-cn.com 免费电影 http://www.freemovie-cn.comhttp://www.freemovie-cn.com] [http://www.tumor-cn.com 肿瘤 http://www.tumor-cn.com肿瘤] [http://www.tumor-cn.com 肿瘤 http://www.tumor-cn.comhttp://www.tumor-cn.com] [http://www.microscope-cn.com 显微镜 http://www.microscope-cn.com显微镜] [http://www.microscope-cn.com 显微镜 http://www.microscope-cn.comhttp://www.microscope-cn.com] [http://www.marriage666.com 婚介 http://www.marriage666.com婚介] [http://www.marriage666.com 婚介 http://www.marriage666.comhttp://www.marriage666.com] [http://www.stock-cn.com 股票 http://www.stock-cn.com股票] [http://www.stock-cn.com 股票 http://www.stock-cn.comhttp://www.stock-cn.com] [http://www.ex-machine.com 交换机 http://www.ex-machine.com交换机] [http://www.ex-machine.com 交换机 http://www.ex-machine.comhttp://www.ex-machine.com] [http://www.diabetes-cn.com 糖尿病 http://www.diabetes-cn.com糖尿病] [http://www.diabetes-cn.com 糖尿病 http://www.diabetes-cn.comhttp://www.diabetes-cn.com] [http://www.b-mailbox.com 企业邮箱 http://www.b-mailbox.com企业邮箱] [http://www.b-mailbox.com 企业邮箱 http://www.b-mailbox.comhttp://www.b-mailbox.com] [http://www.hardware123.com 五金 http://www.hardware123.com五金] [http://www.hardware123.com 五金 http://www.hardware123.comhttp://www.hardware123.com] [http://www.b-liver.com 乙肝 http://www.b-liver.com乙肝] [http://www.b-liver.com 乙肝 http://www.b-liver.comhttp://www.b-liver.com] [http://www.interphone555.com 对讲机 http://www.interphone555.com对讲机] [http://www.interphone555.com 对讲机 http://www.interphone555.comhttp://www.interphone555.com] [http://www.cosmetics666.com 化妆品 http://www.cosmetics666.com化妆品] [http://www.cosmetics666.com 化妆品 http://www.cosmetics666.comhttp://www.cosmetics666.com] [http://www.bdi-bone.com 股骨头坏死 http://www.bdi-bone.com股骨头坏死] [http://www.bdi-bone.com 股骨头坏死 http://www.bdi-bone.comhttp://www.bdi-bone.com] [http://www.website-expansion.com 网站推广 http://www.website-expansion.com网站推广] [http://www.website-expansion.com 网站推广 http://www.website-expansion.comhttp://www.website-expansion.com] [http://www.beauty333.com 美女 http://www.beauty333.com美女] [http://www.beauty333.com 美女 http://www.beauty333.comhttp://www.beauty333.com] [http://www.ups123.com UPS http://www.ups123.comUPS] [http://www.ups123.com UPS http://www.ups123.comhttp://www.ups123.com] [http://www.lcd-cn.com 液晶 http://www.lcd-cn.com液晶] [http://www.lcd-cn.com 液晶 http://www.lcd-cn.comhttp://www.lcd-cn.com] [http://www.stationery555.com 文具 http://www.stationery555.com文具] [http://www.stationery555.com 文具 http://www.stationery555.comhttp://www.stationery555.com] [http://www.upoisoning.com 尿毒症 http://www.upoisoning.com尿毒症] [http://www.upoisoning.com 尿毒症 http://www.upoisoning.comhttp://www.upoisoning.com] [http://www.room-ordering.com 订房 http://www.room-ordering.com订房] [http://www.room-ordering.com 订房 http://www.room-ordering.comhttp://www.room-ordering.com] [http://www.bc-printer.com 条码打印机 http://www.bc-printer.com条码打印机] [http://www.bc-printer.com 条码打印机 http://www.bc-printer.comhttp://www.bc-printer.com] [http://www.wine-shop001.com 酒店 http://www.wine-shop001.com酒店] [http://www.wine-shop001.com 酒店 http://www.wine-shop001.comhttp://www.wine-shop001.com] [http://www.computer888.com 电脑 http://www.computer888.com电脑] [http://www.computer888.com 电脑 http://www.computer888.comhttp://www.computer888.com] [http://www.jewelry666.com 珠宝 http://www.jewelry666.com珠宝] [http://www.jewelry666.com 珠宝 http://www.jewelry666.comhttp://www.jewelry666.com] [http://www.furniture135.com 家具 http://www.furniture135.com家具] [http://www.furniture135.com 家具 http://www.furniture135.comhttp://www.furniture135.com] [http://www.cast-shadow.com 投影幕 http://www.cast-shadow.com投影幕] [http://www.cast-shadow.com 投影幕 http://www.cast-shadow.comhttp://www.cast-shadow.com] [http://www.dress-cn.com 服饰 http://www.dress-cn.com服饰] [http://www.dress-cn.com 服饰 http://www.dress-cn.comhttp://www.dress-cn.com] [http://www.websitespace-cn.com 网站空间 http://www.websitespace-cn.com网站空间] [http://www.websitespace-cn.com 网站空间 http://www.websitespace-cn.comhttp://www.websitespace-cn.com] [http://www.tire-cn.com 轮胎 http://www.tire-cn.com轮胎] [http://www.tire-cn.com 轮胎 http://www.tire-cn.comhttp://www.tire-cn.com] [http://www.shopping-cn.com 网上购物 http://www.shopping-cn.com网上购物] [http://www.shopping-cn.com 网上购物 http://www.shopping-cn.comhttp://www.shopping-cn.com] [http://www.packing-machine.com 包装机械 http://www.packing-machine.com包装机械] [http://www.packing-machine.com 包装机械 http://www.packing-machine.comhttp://www.packing-machine.com] [http://www.barcode555.com 条码 http://www.barcode555.com条码] [http://www.barcode555.com 条码 http://www.barcode555.comhttp://www.barcode555.com]
+
*Version 0.1 (04/27/2004): initial release of the documentation for comments

Latest revision as of 03:37, 23 January 2005

Introduction

Geeklog 2 (GL2) is the next generation of content management systems in the popular Geeklog family. Geeklog is becoming a very popular backend for many sites. However, as development continues in the 1.3.x branch of Geeklog and features continue to be added, several architechural problems have been uncovered. These issues include scalability, performance and weakness is the plugin API.

The goal of the GL2 project is to improve all of these areas. This document draws out the plans for the GL2 plugin API. Until the first official release of GL2, this document can be considered a work in progress. For history details please seen the history section at the end of this document (for releases) or refer to the wiki change log (for a detailed list of changes).

It is especially important to note that it is planned for GL2 to use PHP 5 and make extensive use of the PEAR extenstions to php. These choices, along with a authentication and access engine developed by Tony Bibbs, will shape the implementation of the plugin API.

Plugin Overview

The GL2 plugin architecture will be action based. Each plugin will register to listen for actions that are generated by the GL2 kernel and other plugins. The GL2 kernel will act as a router for these actions. When an action occurs, the GL2 kernel will call all the plugins that have registered for that action.

The Plugin Interface Class

The main component of GL2 plugins will be the plugin interface class. This class will need to be implemented by all GL2 plugins. The interface class is outlined below:

class Geeklog_PluginInterface {

    /**
     * Installs and registers the plugin with the GL2 kernel
     *
     * Handles the creation of data structures, security setup, and
     * registers for actions.
     *
     * @access public
     * @return boolean    true for success, false for failure
     */
    public function install();

    /**
     * Uninstalls and deregisters the plugin with the GL2 kernel
     *
     * Handles the removal of data structures, security setup, and
     * deregisters actions.
     *
     * @access public
     * @return boolean    true for success, false for failure
     */
    public function uninstall();

    /**
     * Upgrades the plugin
     *
     * Handles the update of data structures, security setup, and
     * alters the registered for actions as needed.
     *
     * @access public
     * @return boolean    true for success, false for failure
     */
    public function upgrade();

    /**
     * Gets the plugins version information
     *
     * Gets the plugin version information such as version number,
     * minimum GL2 version, version date, plugin name, and possibly
     * other information such as dependencies.
     *
     * @access public
     * @return version structure
     */
    public function getVersion();

    /**
     * Action handler
     *
     * Executes functionality based on action passed to the function by the
     * GL2 kernel.
     *
     * @access public
     * @param  string   name of action that requires handling
     * @param  mixed    variable type (and existence) dependent on action
     * @return mixed    return type depends on action
     */
    public function handleAction( $action, $var = '');

    /**
     * HTML Page Generation
     *
     * Called by index.php (which is responsible for determining which
     * plugin's getPage to call), this function generates a HTML page 
     * based upon user inputed data ($request).  
     *
     * @access public
     * @param  array     Array of applicable GET and POST variables
     * @return string    HTML of requested page
     */
    public function getPage( $request );
}

Action Manager Class

An instance of the class described below will be created globally by the GL2 core. It will be available to all plugins and is responsible for handling plugin action registration and notification.

class Geeklog_ActionManager {
    /**
    * Array containing action keys and listener (arrays as) values
    * This takes the form of $listeners[<actionName>] = 
    *                             array(<pluginName1>, <pluginName2>, etc);
    */
    private $listeners = array();

    /**
    * Geeklog_ActionManager Constructor
    *
    * @author Vincent Furia <vfuria@gmail.com>
    * @access public
    *
    */
    public function __construct() {
        // fetch registered listeners from database, populate $listeners
    }

    /**
    * Register a plugin to listen for an action
    *
    * @author Vincent Furia <vfuria@gmail.com>
    * @access public
    * @param  mixed   $action  action(s) to listen for (string or array)
    * @param  string  $plugin plugin to be registered as listener
    * @return boolean true on success
    *
    */
    public function registerListener($actions, $plugin) {
        // add the listener to the $listeners variable and the database
    }

    /**
    * Unregister a plugin from listening for an action
    *
    * @author Vincent Furia <vfuria@gmail.com>
    * @access public
    * @param  mixed   $action  action(s) to unregister (string or array)
    * @param  string  $plugin plugin to be unregistered as listener
    * @return boolean true on success
    *
    */
    public function unregisterListener($plugin, $actions = '') {
       // remove the listener for the specified actions from $listeners
       // and the database.  If actions is empty then unregister the plugin 
       // for all actions
    }

    /**
    * Get all the listeners for a specific action
    *
    * @author Vincent Furia <vfuria@gmail.com>
    * @access public
    * @param  string $action  action to get listeners of
    * @return array  array of listeners to action $action
    *
    */
    public function getListeners($action) {
       // remove the listener for the specified actions from $listeners
       //   and the database.
    }

    /**
    * Notify listener(s) that an action has occurred
    *
    * @author Vincent Furia <vfuria@gmail.com>
    * @access public
    * @param  mixed $action  action requiring notification
    * @param  mixed $vars   action specific variables
    * @param  mixed $plugin NOTIFY_ALL, specific plugin, or array of plugins
    * @return mixed action specific return values (or array of)
    *
    */
    public function notify($action, $vars, $plugin = NOTIFY_ALL) {
        // call the handle action function for each plugin listening to the
        // relevant action (or, if $plugin specified, only that plugin)
    }


    /**
    * Creates a plugin and returns it
    * 
    * @author Tony Bibbs <tony@geeklog.net>
    * @access public
    * @param string $pluginName Name of the plugin to create
    * @return object An instance of the given plugin name
    *
    */
    private function &getPlugin($pluginName) {
        // creates a instance of a plugin so the plugin can be referenced
        // by other functions in this Class (i.e. notify).
    }
}

Actions

Registering for Actions

When a plugin's install() function is called it is expected to register for all the actions it will need to handle. This is accomplished using the function registerListener() of the Geeklog_ActionManager class. Similarly within the uninstall() function, the function unregisterListener() of the Geeklog_ActionManager class should be used to deregister action watches.

A plugin should never register for its own actions as this has the potential to create infinite loops (as such the Geeklog_ActionManager class will prevent such registrations). In any case such a feature should not be needed, as a plugin can execute any required tasks when an action is triggered.

Handling Actions

When an action is triggered, either by the GL2 kernel or by a plugin, the handleAction() function is called on all plugins registered for that action. At that point it is the responsiblitiy of the plugin to do any required processing and to return an appropriate value.

Each plugin will be responsible for preventing infinite loops caused by handling an action in such a way that the handled action is triggered. Infinite loops can avoided in many cases simply by not triggering any actions inside the action handler (if possible).

Triggering Actions

When a plugin requires input or believes other plugins may benefit from knowing that a given action has occured, the notify() function of the Geeklog_ActionManager class should be called.

Action Naming Scheme

Action names should be prefixed with the plugin name. The actual action name should be descriptive and may contain subnames seperated by a period ('.'). The word 'core' cannot be used as the plugin name as it is resevered for actions triggered by the GL2 kernel.

Some example action names:

  • "links.delete" -- triggered when a link from the links plugin is deleted
  • "core.userlogin" -- triggered by the GL2 kernel when a user logs in
  • "core.userprofile.update" -- triggered by the GL2 kernel when a user profile is updated

Plugin Framework

It is recommended that all plugins be implemented using the MVCnPHP (cvs) class developed by Tony Bibbs. Each plugin will have its own controller and its own set of views and commands.

Directory Structure

All of the files for a plugin are to be kept in a single sub directory of the GL2 plugin directory. The plugin's internal directory structure is based on the MVC framework. The file structure within the plugin directory should look approximate this:

  • <plugin name> (dir)
    • commands (dir)
      • <command1>.class.php
      • <command2>.class.php
      • ...
    • views (dir)
      • <view1>.class.php
      • <view2>.class.php
      • ...
      • templates (dir)
        • default (dir or softlink)
        • <layout1> (dir)
        • <layout2> (dir)
        • ...
    • index.php (controller)
    • mvcconfig.php
    • config.php
    • main.class.php (implemented interface class)
    • includes (dir)
    • sql (dir)
      • mysql.sql
      • mssql.sql
      • ...
      • updates (dir)
        • mysql_0.1_0.2.sql
        • mssql_0.1_0.2.sql
        • ...

Function Naming Conventions

To prevent clashes within the namespace (two functions or classes with identical names will cause an error in PHP), the names of all classes and all functions not contained within a class should be prefixed with the plugin's name.

Templates

GL2 will use HTML_Template_Flexy as its template library. Plugins authors are recommended to use this template library for efficiency and consistency.

Logging

Logging will be handled using PHP's built in logging functionality. Specifically, use the trigger_error() function to log errors and messages. Error number constants include: FATAL, ERROR, WARNING, INFO, and DEBUG.

Apendix A: Helper Functions

The GL2 kernel will provide a set helper functions to the plugins. These helper functions will provide functionality in areas such as access and authentication (A&A), search, comments, and action handling.

These functions include:

  • ...

In addition, GL2 plugins will have access to the following global classes:

  • A&A
  • Geeklog_ActionManager
  • glLogger
  • ...many more

Apendix B: GL2 Core Actions

The following actions will be triggered by the GL2 kernel. They are known as core actions because they exist independent of any installed plugins.

Action Description
core.begin GL2 begins processing a page request
core.end GL2 finishes processing a page request
core.adduser A new user gets added (not self registered)
core.newuser A new user registers with the site
core.updateuser A users info gets modified
core.deleteuser A user account is deleted
core.userprofile.display Builds the userprofile is display
core.userprofile.update The userprofile is udpated
core.userlogin A user logs in
core.userlogout A user logs out
core.menuitems.display Builds the header menu items
core.usermenu.display Builds the user menu display
core.adminmenu.display Builds the admin menu display
core.searchtypes Gets available search types
core.search Performs search
core.admincontrol.display Builds the administrative display control
core.listsblocks.display Builds a list of available blocks
core.blocks.display Builds the blocks for display
core.moderation.list.display Should we have a moderation plugin? Or should it be part of the core?
core.moderation.display "
core.moderation.approve "
core.moderation.delete "
core.submissioncount "
core.header.display Insert javascript/CSS in html <header>

Some items that are currently handled by Geeklog's 1.3.x plugin system will be implmented as a plugin. This includes items such as the "What's New Block", statistics, and the handling of RSS Feeds.

Apendix C: Potential Plugins

Below are two lists indicating an initial ideas for plugins that could be created for GL2. This list is in no way comprehensive. The categories of Application Plugin and Helper plugin are arbitrary and will not effect how the plugins are created or run. Plugins highlighted in red indicate features that are currently implemented in the base Geeklog 1.3.x branch.

Application Plugins

  • Articles
  • Links
  • Calendar
  • Polls
  • Staticpages
  • File Management
  • Forum
  • Gallery
  • Contacts
  • E-Commerce
  • Quote of the Day
  • Blog/Journel
  • Webmail
  • Stats/System Status

Helper Plugins

  • Cron -- execute delayed/timed events
  • Moderation? -- administer moderation of plugin items
  • Configuration? -- web based method for changing plugin configuration
  • RSS/RDF Feeds -- xml content syndication
  • What's New -- shows recently updated/added content

Apendix D: Example

An example plugin is in the works (or will be soon).

Apendix E: Document History

  • Version 0.3 (08/07/2004): reformated for the wikit and incorporated comments from geeklog.net.
  • Version 0.2 (06/30/2004): updated document with comments from geeklog.net, other improvements as needed. Added Apendix with potential plugins.
  • Version 0.1 (04/27/2004): initial release of the documentation for comments