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 [2010-10-10 14:51] – downloadurl lupo49plugin:fortune [2024-03-01 12:49] (current) – old revision restored (2024-03-01 12:38) Aleksandr
Line 4: Line 4:
 description: Show QOTD (Fortune cookie) description: Show QOTD (Fortune cookie)
 author     : Otto Vainio author     : Otto Vainio
-email      : oiv-plugins@valjakko.net+email      : otto@valjakko.net
 type       : Syntax type       : Syntax
 lastupdate : 2005-08-01 lastupdate : 2005-08-01
Line 18: Line 18:
 ===== Description ===== ===== Description =====
  
-This [[plugins|plugin]] Show a Quote of the Day on your page. It should change every time the page is rendered again.+This plugin Show a Quote of the Day on your page. It should change every time the page is rendered again.
  
 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 29: Line 29:
  
 ===== Installation ===== ===== Installation =====
 +Search and install the plugin using the [[plugin:extension|Extension Manager]]. Refer to [[:Plugins]] on how to install plugins manually.
  
-Using Plugin Manager from [[http://koti.mbnet.fi/oiv/pubtest/fortune.zip|here]] 
-> Fixed link to correct archive. 
  
-or +Download: [[http://koti.mbnet.fi/oiv/pubtest/fortune.zip|here]]
- +
-Create a new folder ''lib/plugin/fortune/'' and place the following file in it: ''syntax.php''.+
  
 Create a new folder ''lib/plugin/fortune/dat/'' and set it to be writable for the web server.  Create a new folder ''lib/plugin/fortune/dat/'' and set it to be writable for the web server. 
Line 55: 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 112: 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 119: 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 328: Line 321:
   }   }
 }// End of class }// End of class
-?> 
 </code> </code>
  
plugin/fortune.1286715075.txt.gz · Last modified: 2010-10-10 14:51 by lupo49

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