DokuWiki

It's better when it's simple

User Tools

Site Tools


plugin:fortune

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
plugin:fortune [2020-10-01 00:13] – old revision restored (2018-05-31 00:15) Klap-inplugin:fortune [2022-01-29 13:45] – [Description] patric
Line 22: Line 22:
 The plugin uses code written by Henrik Aasted Sorensen, henrik@aasted.org Read more at http://www.aasted.org/quote The plugin uses code written by Henrik Aasted Sorensen, henrik@aasted.org Read more at http://www.aasted.org/quote
  
-Fortune files can be found e.g. from [[http://freshmeat.net/browse/895/?topic_id=895|freshmeat]]\\ and one nice from here [[http://www.splitbrain.org/Fortunes/hitchhiker]]+Fortune files can be found e.g. from [[http://freshmeat.net/browse/895/?topic_id=895|freshmeat]] FIXME Dead link (404)  --- [[user>patric|patric]] //2022-01-29 13:44//\\ and one nice from here [[http://www.splitbrain.org/Fortunes/hitchhiker]]
  
 ===== Usage ===== ===== Usage =====
Line 52: Line 52:
  * @author     Otto Vainio <oiv-plugins@valjakko.net>  * @author     Otto Vainio <oiv-plugins@valjakko.net>
  */  */
- 
-if(!defined('DOKU_INC')) define('DOKU_INC',realpath(dirname(__FILE__).'/../../').'/'); 
-if(!defined('DOKU_PLUGIN')) define('DOKU_PLUGIN',DOKU_INC.'lib/plugins/'); 
-require_once(DOKU_PLUGIN.'syntax.php'); 
  
 /** /**
Line 109: Line 105:
      * Handle the match      * Handle the match
      */      */
-    function handle($match, $state, $pos, &$handler){+    function handle($match, $state, $pos, Doku_Handler $handler){
         return $match;         return $match;
     }     }
Line 116: Line 112:
      * Create output      * Create output
      */      */
-    function render($mode, &$renderer, $data) {+    function render($mode, Doku_Renderer $renderer, $data) {
  
         if($mode == 'xhtml'){         if($mode == 'xhtml'){
Line 325: Line 321:
   }   }
 }// End of class }// End of class
-?> 
 </code> </code>
  
plugin/fortune.txt · Last modified: 2024-03-01 12:49 by Aleksandr

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