DokuWiki

It's better when it's simple

User Tools

Site Tools


plugin:ajaxloader

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
plugin:ajaxloader [2014-10-30 13:25] Klap-inplugin:ajaxloader [2021-01-14 11:44] (current) annda
Line 1: Line 1:
-====== ajaxloader plugin ======+====== ajaxloader Plugin ======
  
 ---- plugin ---- ---- plugin ----
-description: FIXME+description: 
 author     : Adrian Lang  author     : Adrian Lang 
-email      : wiki@cosmocode.de  +email      : dokuwiki@cosmocode.de  
-type       : helper +type       : action, ajax 
-lastupdate : 2010-10-29 +lastupdate : 2010-10-06 
-compatible : 2009-12-25+, Anteater, Rincewind+compatible : 
 depends    :  depends    : 
 conflicts  conflicts 
 similar    :  similar    : 
-tags       : ajax+tags       : 
  
-downloadurl: https://github.com/cosmocode/ajaxloader/tarball/master+downloadurl: https://github.com/cosmocode/ajaxloader/zipball/master
 bugtracker : https://github.com/cosmocode/ajaxloader/issues bugtracker : https://github.com/cosmocode/ajaxloader/issues
 sourcerepo : https://github.com/cosmocode/ajaxloader/ sourcerepo : https://github.com/cosmocode/ajaxloader/
-donationurl: + 
 ---- ----
  
-[[http://www.cosmocode.de/en/open-source/dokuwiki-plugins/|{{ http://www.cosmocode.de/_media/en/wiki/dokuwiki/cosmologo.png|A CosmoCode Plugin}}]] +[[https://www.cosmocode.de/en/open-source/dokuwiki-plugins/|{{ http://cosmocode.de/static/img/dokuwiki/dwplugins.png?recache|A CosmoCode Plugin}}]] 
-Plugin doku and download is available on [[http://ickewiki.de/dokumentation/ajaxloader|ICKEwiki.de]].+ 
 +===== Installation ===== 
 + 
 +Install the plugin using the [[plugin:plugin|Plugin Manager]] and the download URL above, which points to latest version of the plugin. Refer to [[:Plugins]] on how to install plugins manually. 
 + 
 +===== Usage ===== 
 + 
 +The ajaxloader plugin aids in implementing both sides of an AJAX call: Calling and providing the endpoint. You can freely combine both parts with each other or with DokuWiki’s own facilities. 
 + 
 +===== Calling ===== 
 + 
 +The plugin provides two functions: ''doku_ajax(call, params)'' and ''serialize_form(form)''. doku_ajax should be used as a constructor. It expects the name of the ajax call in the format »plugin_PLUGINNAME« or »plugin_PLUGINNAME_CALLNAME«. You may optionally specify a hash with request parameters common to all requests made with this AJAX object. If you provide a form object, it is automatically serialized using ''serialize_form()''
 + 
 +===== Providing ===== 
 + 
 +The plugin provides a simpler way of developing the endpoint than hooking ''AJAX_CALL_UNKNOWN'': Just create a file ''ajax.php'' in your plugin directory. If you need multiple endpoints, create a directory ''ajax/'' instead and drop files ''CALLNAME.php'' in it. You may expect the same preprocessing as through ''lib/exe/ajax.php'', only a bit faster. Moreover, if you provide an array called ''$AJAX_JSON'', it is automatically echoed in JSON-encoding afterwards.
plugin/ajaxloader.1414671939.txt.gz · Last modified: 2014-10-30 13:25 by Klap-in

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