DokuWiki

It's better when it's simple

User Tools

Site Tools


plugin:random_page

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:random_page [2012-11-10 10:15] goldseedplugin:random_page [2023-03-04 15:43] (current) Aleksandr
Line 1: Line 1:
-====== random page plugin ======+====== randompage Plugin ======
  
 ---- plugin ---- ---- plugin ----
-description: A Random Page Action plugin, like MediaWiki's Random Page function. +description: A Random Page Action plugin, like MediaWiki's Random Page function 
-author     : Jean Marc Massou+author     : Jean Marc Massou, Pete Prodoehl
 email      : massou at gmail dot com email      : massou at gmail dot com
 type       : action type       : action
-lastupdate : 2009-01-03 +lastupdate : 2022-12-02 
-compatible : +compatible : Igor,Binky
 depends    :  depends    : 
 conflicts  conflicts 
-similar    :  +similar    : randompage2 
-tags       : random page, random, mediawiki+tags       :  mediawiki, page, random
  
-downloadurl: http://massou.tk/v2/lib/exe/fetch.php?id=blogw%3Aa_random_page_v2_for_2009&cache=cache&media=blogw:random_page.zip+downloadurl: https://github.com/dryoo/DokuWiki-randompage/zipball/master 
 +bugtracker : https://github.com/dryoo/DokuWiki-randompage/issues 
 +sourcerepo https://github.com/dryoo/DokuWiki-randompage/ 
 +screenshot_img :http://jeanmarcmassou.free.fr/random.png
 ---- ----
-{{http://jeanmarcmassou.free.fr/random.png}}{{http://jeanmarcmassou.free.fr/random.png}}{{http://jeanmarcmassou.free.fr/random.png}}{{http://jeanmarcmassou.free.fr/random.png}}{{http://jeanmarcmassou.free.fr/random.png}}{{http://jeanmarcmassou.free.fr/random.png}}+ 
  
  
Line 39: Line 42:
 <code php> <code php>
 <?PHP <?PHP
-echo '<a href=/cgi-bin/anon-www.cgi/http://www.dokuwiki.org/"'. $conf['baseurl'] . $conf['basedir'] .'/doku.php?do=randompage" >'; +echo '<a href=/cgi-bin/anon-www.cgi/https://www.dokuwiki.org/"'. $conf['baseurl'] . $conf['basedir'] .'/doku.php?do=randompage" >'; 
-?><img src=/cgi-bin/anon-www.cgi/http://www.dokuwiki.org/"<?php echo DOKU_BASE?>lib/plugins/random_page/random.png" alt="Random"> A Random Page</a>+?><img src=/cgi-bin/anon-www.cgi/https://www.dokuwiki.org/"<?php echo DOKU_BASE?>lib/plugins/random_page/random.png" alt="Random"> A Random Page</a>
 </code> </code>
  
Line 108: Line 111:
    * Register its handlers with the DokuWiki's event controller    * Register its handlers with the DokuWiki's event controller
    */    */
-function register(&$controller)+function register(Doku_Event_Handler $controller)
  {  {
         $controller->register_hook('ACTION_HEADERS_SEND', 'BEFORE', $this, 'init', 'header');         $controller->register_hook('ACTION_HEADERS_SEND', 'BEFORE', $this, 'init', 'header');
Line 220: Line 223:
  
 <code> <code>
-        <form class="button" method="get" action=/cgi-bin/anon-www.cgi/http://www.dokuwiki.org/"<?php wl($ID)?>">+        <form class="button" method="get" action=/cgi-bin/anon-www.cgi/https://www.dokuwiki.org/"<?php wl($ID)?>">
           <div class="no">           <div class="no">
             <input type="submit" value="Random Page" class="button" />             <input type="submit" value="Random Page" class="button" />
Line 262: Line 265:
  
 Anyone would do this? I have pretty different contents in namespaces...like medicine and games.. I need to limit random pages..  --- [[user>goldseed|S.C. Yoo]] //2012/11/10 10:14// Anyone would do this? I have pretty different contents in namespaces...like medicine and games.. I need to limit random pages..  --- [[user>goldseed|S.C. Yoo]] //2012/11/10 10:14//
 +> I did this myself. Refer https://github.com/dryoo/DokuWiki-randompage . You can ''?do=randompage'' & ''?do=nsrandompage''  Download [[https://github.com/dryoo/DokuWiki-randompage/archive/master.zip|here]] --- [[user>goldseed|S.C. Yoo]] //2014-10-21 02:51//
  
 + 
 === Fix for Dokuwiki Angua === === Fix for Dokuwiki Angua ===
 In Dokuwiki Angua you must delete the underscore in the Foldername (rename it to "randompage") and edit line 13 at the action.php like this: In Dokuwiki Angua you must delete the underscore in the Foldername (rename it to "randompage") and edit line 13 at the action.php like this:
plugin/random_page.1352538924.txt.gz · Last modified: 2012-11-10 10:15 by goldseed

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