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
plugin:fortune [2020-10-01 00:13] Klap-inplugin:fortune [2024-03-01 12:49] (current) – old revision restored (2024-03-01 12:38) Aleksandr
Line 7: Line 7:
 type       : Syntax type       : Syntax
 lastupdate : 2005-08-01 lastupdate : 2005-08-01
-compatible : Greebo+compatible :
 depends    : depends    :
 conflicts  : conflicts  :
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.1601504007.txt.gz · Last modified: 2020-10-01 00:13 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