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 [2013-10-30 14:32] – [Discussion] 194.119.85.99plugin: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 : 2013-05-10 "Weatherwax"+compatible : Hrun, Weatherwax, Greebo, !Hogfather, Igor 
 depends    :  depends    : 
 conflicts  conflicts 
Line 13: Line 13:
 tags       : users, ajax tags       : users, ajax
  
-downloadurl: http://github.com/millsdude/dokuwiki-plugin-whoisonline/zipball/master +downloadurl: https://github.com/millsdude/dokuwiki-plugin-whoisonline/zipball/master 
-bugtracker : http://github.com/millsdude/dokuwiki-plugin-whoisonline/issues +bugtracker : https://github.com/millsdude/dokuwiki-plugin-whoisonline/issues 
-sourcerepo : http://github.com/millsdude/dokuwiki-plugin-whoisonline/+sourcerepo : https://github.com/millsdude/dokuwiki-plugin-whoisonline
 donationurl:  donationurl: 
  
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 =====
  
 Copy the whoisonline folder into the /lib/plugins folder and that should do it. Please keep the name the same since the ajax portion is specifically looking for that location. The plugin uses a file to store the active users, no database necessary. Copy the whoisonline folder into the /lib/plugins folder and that should do it. Please keep the name the same since the ajax portion is specifically looking for that location. The plugin uses a file to store the active users, no database necessary.
  
-Install the plugin using the [[plugin:plugin|Plugin Manager]] and the download URL above, which points to latest version of the plugin. Refer to [[:Plugins]] on how to install plugins manually.+Search and install the plugin using the [[plugin:extension|Extension Manager]]. Refer to [[:Plugins]] on how to install plugins manually.
  
 ===== Examples/Usage ===== ===== Examples/Usage =====
Line 37: Line 42:
   ~~whoisonline~~   ~~whoisonline~~
  
-The popup list can be customized in the admin configuration. The default is {username} but you can add all sorts of HTML to make it link to places. Here is what I use on my site...+The popup list can be customized in the admin configuration. The default is ''{username}'', but you can add all sorts of HTML to make it link to places. Here is what I use on my site...
  
   <a href="/users:{username}">{fullname}</a> - <a href="/{pageid}">{pageid}</a>   <a href="/users:{username}">{fullname}</a> - <a href="/{pageid}">{pageid}</a>
Line 43: Line 48:
 This will make the popup list have their fullname that links to their user page on the wiki, and then the current page they are looking at which you can click to. This will make the popup list have their fullname that links to their user page on the wiki, and then the current page they are looking at which you can click to.
  
-If you want to track the users but not show the count or the list just add the NOSHOW option on some footer to record their presence, then you can do the regular ~~whoisonline~~ on an admin page to view the results.+If you want to track the users but not show the count or the list just add the NOSHOW option on some footer to record their presence, then you can do the regular ''~~whoisonline~~'' on an admin page to view the results.
  
   ~~whoisonline:NOSHOW~~   ~~whoisonline:NOSHOW~~
Line 53: Line 58:
   ~~whoisonline:nolist~~   ~~whoisonline:nolist~~
   ~~whoisonline:noshow~~   ~~whoisonline:noshow~~
- 
  
 ===== Configuration and Settings ===== ===== Configuration and Settings =====
Line 65: Line 69:
 === Change Log === === Change Log ===
  
-  * **20013-06-20**+  * **2013-06-20**
     * Initial release      * Initial release 
  
Line 83: Line 87:
 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.
  
-===== Discussion =====+===== Adding Email to Substitution List =====  
 +On line 48 of syntax.php, replace:
  
-Great pluginsimple and useful! There is a small bughoweververified on two different machinesboth running Firefox 24.0 on Windows XP. The text typed on the chat textbox doesn't show up. Commenting the line: +<code php> 
-<code css> + 
--moz-box-sizing: border-box;+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> </code>
-on the css file solves the problem.+ 
 +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 listPossible replacement strings are: {username}, {fullname}, {email}, {pageid}, {url}'; 
 +</code> 
 + 
 +===== Discussion ===== 
plugin/whoisonline.1383139939.txt.gz · Last modified: 2013-10-30 14:32 by 194.119.85.99

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