DokuWiki

It's better when it's simple

User Tools

Site Tools


plugin:whoisonline

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:whoisonline [2018-05-31 00:43] – [Installation] Klap-inplugin:whoisonline [2022-07-17 22:20] (current) coastGNU
Line 7: Line 7:
 type       : syntax type       : syntax
 lastupdate : 2013-06-20 lastupdate : 2013-06-20
-compatible : Hrun, Weatherwax+compatible : Hrun, Weatherwax, Greebo, !Hogfather, Igor 
 depends    :  depends    : 
 conflicts  conflicts 
Line 21: Line 21:
 ---- ----
  
 +=== For Hogfather and Igor support ===
 +  * Edit ''lib/plugins/whoisonline/syntax.php'' and replace (line 108 & 123)<code>public function handle($match, $state, $pos, $handler) {
 +public function render($mode, $renderer, $data) {</code>
 +  * with<code>public function handle($match, $state, $pos, Doku_Handler $handler) {
 +public function render($mode, Doku_Renderer $renderer, $data) {</code>
 ===== Installation ===== ===== Installation =====
  
Line 81: Line 86:
 The idea from this came from this link http://tutorialzine.com/2010/03/who-is-online-widget-php-mysql-jquery/  The idea from this came from this link http://tutorialzine.com/2010/03/who-is-online-widget-php-mysql-jquery/ 
 which had a great code example. I formatted it for my needs and made a Dokuwiki plugin out of it. which had a great code example. I formatted it for my needs and made a Dokuwiki plugin out of it.
 +
 +===== Adding Email to Substitution List ===== 
 +On line 48 of syntax.php, replace:
 +
 +<code php>
 +
 +if( isset($INFO['userinfo']) || ($this->getConf('ignoreAnonymous')==0)){ 
 + $userdisplay = str_replace( array( "{username}"
 + "{pageid}" ,
 + "{fullname}" ,
 + "{url}" ) ,
 + array( $INFO["client"] ,
 + $INFO["id"] ,
 + $INFO["userinfo"]["name"] ,
 + $_SERVER["REQUEST_URI"] ) ,
 + $displaypattern );
 +</code>
 +
 +with:
 +<code php>
 +
 +if( isset($INFO['userinfo']) || ($this->getConf('ignoreAnonymous')==0)){ 
 + $userdisplay = str_replace( array( "{username}"
 + "{pageid}" ,
 + "{fullname}" ,
 + "{email}" ,
 + "{url}" ) ,
 + array( $INFO["client"] ,
 + $INFO["id"] ,
 + $INFO["userinfo"]["name"] ,
 + $INFO["userinfo"]["mail"] ,
 + $_SERVER["REQUEST_URI"] ) ,
 + $displaypattern );
 +</code>
 +
 +on line 10 of settings.php
 +
 +replace:
 +<code php>
 +$lang['displayline'] = 'HTML to use when making the popup user list. Possible replacement strings are: {username}, {fullname}, {pageid}, {url}';
 +</code>
 +with:
 +<code php>
 +$lang['displayline'] = 'HTML to use when making the popup user list. Possible replacement strings are: {username}, {fullname}, {email}, {pageid}, {url}';
 +</code>
  
 ===== Discussion ===== ===== Discussion =====
  
plugin/whoisonline.1527720227.txt.gz · Last modified: 2018-05-31 00:43 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