DokuWiki

It's better when it's simple

User Tools

Site Tools


devel:remote_plugins

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
devel:remote_plugins [2013-07-30 12:19] – [How to write a remote plugin?] dominikdevel:remote_plugins [2013-11-15 13:01] Klap-in
Line 25: Line 25:
 <?php  <?php 
 class remote_plugin_time extends DokuWiki_Remote_Plugin { class remote_plugin_time extends DokuWiki_Remote_Plugin {
-    function _getMethods() {+    public function _getMethods() {
         return array(         return array(
             'getTime' => array(             'getTime' => array(
Line 34: Line 34:
     }     }
  
-    function getTime() {+    public function getTime() {
         return $this->getApi()->toDate(time());         return $this->getApi()->toDate(time());
     }     }
Line 55: Line 55:
 Take a look at the ''rawPage()'' method from ''[[xref>inc/RemoteAPICore.php]]'' Take a look at the ''rawPage()'' method from ''[[xref>inc/RemoteAPICore.php]]''
 <code php> <code php>
-function rawPage($id,$rev=''){+public function rawPage($id,$rev=''){
     $id = cleanID($id);     $id = cleanID($id);
     if(auth_quickaclcheck($id) < AUTH_READ){     if(auth_quickaclcheck($id) < AUTH_READ){
Line 105: Line 105:
 In some circumstances you need a full custom name for the remote call. In some circumstances you need a full custom name for the remote call.
 The [[devel:event:rpc_call_add|RPC_CALL_ADD]] event allows you to write an [[action plugin]] to map a custom name to a remoteName of your plugin. The [[devel:event:rpc_call_add|RPC_CALL_ADD]] event allows you to write an [[action plugin]] to map a custom name to a remoteName of your plugin.
 +
 +===== Further reading =====
 +
 +  * [[Plugin programming tips]]
 +  * [[plugins|Plugin Development]]
 +  * DokuWikis [[custom_webservices|web services]]
 +    * [[xmlrpc|XML-RPC]]
 +  * [[plugintype>64#extension__table|Available remote plugins]]
devel/remote_plugins.txt · Last modified: 2024-02-06 14:12 by andi

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki