DokuWiki

It's better when it's simple

User Tools

Site Tools


plugin:codepad

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:codepad [2011-08-29 14:01] – made code block downloadable achplugin:codepad [2020-02-18 17:20] (current) Aleksandr
Line 2: Line 2:
  
 ---- plugin ---- ---- plugin ----
-description: uses interpreters on codepad.org to execute sourcecode+description: Uses interpreters on codepad.org to execute sourcecode
 author     : deshi  author     : deshi 
 email      :   email      :  
-type       : substitution+type       : syntax
 lastupdate : 2011-08-28 lastupdate : 2011-08-28
 compatible :  compatible : 
Line 13: Line 13:
 tags       : code tags       : code
  
-downloadurl: # eg. http://github.com//dokuwiki-plugin-codepad/zipball/master +downloadurl: # eg. https://github.com//dokuwiki-plugin-codepad/zipball/master 
-bugtracker : # eg. http://github.com//dokuwiki-plugin-codepad/issues +bugtracker : # eg. https://github.com//dokuwiki-plugin-codepad/issues 
-sourcerepo : # eg. http://github.com//dokuwiki-plugin-codepad/+sourcerepo : # eg. https://github.com//dokuwiki-plugin-codepad/
 donationurl:  donationurl: 
 ---- ----
Line 34: Line 34:
  */  */
 if (!defined('DOKU_INC')) die(); if (!defined('DOKU_INC')) die();
-if (!defined('DOKU_PLUGIN')) define('DOKU_PLUGIN',DOKU_INC.'lib/plugins/'); 
 if (!defined('DOKU_PLUGIN_CODEPAD')) define('DOKU_PLUGIN_CODEPAD',DOKU_PLUGIN.'codepad/'); if (!defined('DOKU_PLUGIN_CODEPAD')) define('DOKU_PLUGIN_CODEPAD',DOKU_PLUGIN.'codepad/');
-require_once (DOKU_PLUGIN.'syntax.php'); 
  
 class syntax_plugin_codepad extends DokuWiki_Syntax_Plugin { class syntax_plugin_codepad extends DokuWiki_Syntax_Plugin {
Line 47: Line 45:
  }  }
   
- function handle($match, $state, $pos, &$handler) {+ function handle($match, $state, $pos, Doku_Handler $handler) {
  $match_array = array();  $match_array = array();
  //strip ~~codepad: from start and ~~ from end  //strip ~~codepad: from start and ~~ from end
Line 59: Line 57:
  * Create output  * Create output
  */  */
- function render($mode, &$renderer, $data) {+ function render($mode, Doku_Renderer $renderer, $data) {
  global $conf;  global $conf;
             if($mode == 'xhtml'){             if($mode == 'xhtml'){
Line 113: Line 111:
 ~~codepad~~ ~~codepad~~
 </code> </code>
 +
 ===== Syntax ===== ===== Syntax =====
  
Line 118: Line 117:
 ~~codepad~~ ~~codepad~~
 </code> </code>
 +
 ===== Configuration and Settings ===== ===== Configuration and Settings =====
  
Line 127: Line 127:
  
 === Change Log === === Change Log ===
- 
  
   * **2011-08-28**   * **2011-08-28**
Line 147: Line 146:
  
 //Could be placed on an external page (e.g. plugin:pluginname:discussion) to have a distinction between user comments and author docs// //Could be placed on an external page (e.g. plugin:pluginname:discussion) to have a distinction between user comments and author docs//
- 
  
  
plugin/codepad.1314619316.txt.gz · Last modified: 2011-08-29 14:01 by ach

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