Extension talk:CurrentUsers

Latest comment: 6 years ago by Bozonbozon in topic Broken in 1.20.2

Robots & Friendly URL'sEdit

It works like a charm, thanx ;) Just have a problem with robots.txt because my wiki content is in a "/wiki" folder, so the extension doesn't display the bots. -- 03:48, 20 August 2007 (UTC)Reply[reply]

The extension can only display the bots if you're using friendly URL's. Even then it's only able to determine good bots who declare themselves, but many of the anonymous guests will be bad bots trying to pass themselves off as browsers. --Nad 20:11, 20 August 2007 (UTC)Reply[reply]

wobbly outputEdit

Hi Nad, excellent plugins, however, in my 1.5 Wiki setup I get nothing like the output you get from Current Users, I'm using the :

**{{{1}}}: {{#if:{{{2|}}}|[[User:{{{2}}}|{{{2}}}]]}}{{#if:{{{3|}}}|'''{{{3|}}}'''}}

template, but the output looks like this:

* * 14:34:{{#if:Nibb|Nibb}}{{#if:|'}}

Can't see whats going on that the template doesn't display right. I have no extra extensions yet, this is a fairly fresh install

thanks for the work, lovely looking site Organic Design, nice to see something not too Wikipedia like :)

If I understand you correctly you are using MediaWiki version 1.5.7, I would strongly recommend upgrading your MediaWiki installation to version 1.10.1. Also do you have the contributed extension Parser functions installed? This provides flow control functions such as if etc. --Sven 07:43, 7 September 2007 (NZST)
If you're unable to upgrade due to requiring PHP4.x, then at least upgrade to MW1.6.13 as this is there is practically no support at all for less than 1.6 and many changes were made to the fundamentals of the code in 1.6.0. --Nad 08:23, 7 September 2007 (NZST)
Acually no, its a 1.10 Wiki, my mistake! Nibb 15:01, 24 September 2007 (UTC)Reply[reply]
Ok so what output are you getting after installing Parser functions? --Nad 21:15, 24 September 2007 (UTC)Reply[reply]
I had the same problem with how it looked but installing ParserFunctions fixed it right up. Currently using it on fanhistory.com the main page of my wiki]. Looks nice though horizontal version would be nice. :) --PurplePopple 19:00, 5 October 2007 (UTC)Reply[reply]
You can make it horizontal and change any other style aspects using CSS, just put it in a div tag of some class then set li's within it to have their display style inline. --Nad 21:16, 5 October 2007 (UTC)Reply[reply]
Here is the code for you if you need it inline: <div style="display:inline"> | {{{1}}}: {{#if:{{{2|}}}|[[User:{{{2}}}|{{{2}}}]]}} {{#if:{{{3|}}}|'''{{{3|}}}'''}}</div> Have fun! --Anderl 22:15, 3 January 2008 (UTC)Reply[reply]

Some minor issuesEdit

Nad, the extension works first time ...

I created the template you provided and I can see my username when I am connected ...

If I refresh the page, the time changes to the current time each time ... Can't this time rather indicate the time the user logged on ?? .. The current time when the Page is accessed is pretty superfluous , don't you think ??

I used another browser on the same PC to access my wiki but as a guest while still logged in as a user and i don't see the 'guest' entry, only the logged user ??

Any ideas on that ??

I had the same problem. I suspected it was a cache issue and got it working with these lines in my Localsettings.php file

$egCurrentUsersTimeout = "60";
$wgEnableParserCache = false;
$wgCacheEpoch = gmdate( 'YmdHis', mktime() );

I am new to wiki code so you should run this by someone before you use it. I have had no ill side effects that i am aware of. --Archibald Horatio Vilanos III 16:42, 8 November 2008 (UTC)Reply[reply]

--Dick 07:59, 3 October 2007 (UTC)Reply[reply]

There could be a few problems with the detection currently, I'll check them out when I get some time. I'll keep the time stamp how it is now as it's about current users so the last time of access seems logical and is the basis of deciding when they're no longer current. --Nad 21:18, 5 October 2007 (UTC)Reply[reply]

Just a comment, this would complement wikichat quite well as you can quickly see whos online --Sven 11:35, 26 July 2007 (NZST)

Not working correctlyEdit

I used this extension and it worked without a glitch in 1.11.1. Now that I upgraded to 1.12.0, suddenly it stopped using the Template:CurrentUsers even if i define it in the localsettings.php. I just can't get it to format the output with Currentusers template page so i have to modify the source code. What's wrong?

I checked the source code and the new 1.12.0 version isn't even using the template - whereas the old version called the template to format the output. Why was the syntax changed?
Thanks for the swift update but now it seems that whenever I use currentusers on a page with other templates, it generates the good old dreaded UNIQ QINU -error string.
I have tested putting another template alongside {{#CurrentUsers:}}, and it worked ok. Can you identify exactly what is causing the GUIDs? --Zven 00:25, 3 April 2008 (UTC)Reply[reply]
I have Contribution Scores and PayPal extensions on the front page. They work well together, but when i add CurrentUsers, it breaks PayPal completely (UNIQ-error) and Contribution Scores partially (can't embed contribution stats to the page anymore). So, either there's something wrong with those two extensions (but they work together) or CurrentUsers is doing something that prevents either of them to work (even when only enabling either of them separately with CurrentUsers).

Dynamic Article List conflictEdit

It appears this extension has a conflict with another extension I have, Dynamic Article List...

It completly screws up the out of the Dynamic Article List...

I also had to install the Parser Functions extension to get the CurrentUsers extension to display properly, if that makes any difference...

Can anyone help? I would love to have this working on my main page, along with my Dynamic Article List...

My site: HTPCnz

Cheers --HTPCnz 13:50, 1 April 2008 (UTC)Reply[reply]

Do you get any php warning messages in your source code? You may need to turn error reporting on in LocalSettings.php.
ini_set("display_errors", 1);

I have had a quick look at Extension:Dynamic Article List, it looks like it may not be supported as MediaWiki versions develop, can you get it going on 1.12.0? --Zven 00:32, 3 April 2008 (UTC)Reply[reply]

  • I had the same problem. I resolved fixing the UNIQ bug listed down here. :) Example: MySite -- Eterea 17:00, 15 November 2009 (UTC)

UNIQ problem?Edit

I have ParserFunctions installed, but when I use it on a clear page it works fine, but it disables all following Template includes on existing pages.
Before the next include: the following include is just linked After other include: Destroys page completely: Crap like this shows up:
?UNIQ35fe428e5e3b070c-item-0--QINU? ?UNIQ35fe428e5e3b070c-item-1--QINU?
But I need to use it on the Main Page since the cache purge is working fine there. What I find odd is that the same UNIQ problem was reported on Extension_talk:Whos_online.
Maybe it's about NaodW..." or "UNIQ.... I've found "parser(" in the following extension files but no luck:

  • mwbb/topic.php
  • inputbox.php
  • SubPageList.php

It doesn't even work on a fresh MW 1.12.0rc installation :( --Subfader 19:42, 10 May 2008 (UTC)Reply[reply]

THink I found a solution: Extension_talk:NiceCategoryList#Fix_for_the_UNIQ_thing. Can somebody insert it to the code? --Subfader 20:49, 10 May 2008 (UTC)Reply[reply]
Is this still a current problem? --Nad 20:46, 17 September 2008 (UTC)Reply[reply]
Yes, ist is. -- Beyer 11:06, 3 October 2008 (UTC)Reply[reply]
Has anyone found a fix for this issue? How can I get this on the main page without mangling it entirely? -- Chuck

I seem to have a working fix for this issue, change the line:

$users = $parser->preprocess($users,$wgTitle,$parser->mOptions);


 $localParser = new Parser();
 $users = $localParser->preprocess($users,$wgTitle,$parser->mOptions);

I was able to then include this on my MainPage without the UNIQ issue showing up. --Chuck 14:29, 11 March 2009 (UTC)

Affirmative. Your solution works perfect! Thank your for your help. My problem occurred in conjunction with Extension:Inputbox Cheers --kgh 08:43, 15 September 2010 (UTC)Reply[reply]
This solution fixed a similar issue for me, whereby various templates and even category boxes were broken on the main page when installing CurrentUsers in conjuntion with other extensions. --Adamcox82 12:08, 24 September 2011 (UTC)Reply[reply]

Configuration settingsEdit

I seem to have found that using the variable $wgCurrentUsersTimeout in my LocalSettings.php does not work, whereas using $egCurrentUsersTimeout does.... --Carl 12:35, 17 September 2008 (UTC)Reply[reply]

Sorry, the globals were changed to $eg and I hadn't updated the docs, done now :-/ --Nad 20:46, 17 September 2008 (UTC)Reply[reply]

Undefined Index problemEdit

Hi Nad, folks, I have tried some of the fixes mentioned (just above here with the new parser line) to no avail, but, I notice that I now have an error

 Undefined index:  title in /srv/www/vhosts/www.ictskb.mmu.ac.uk/extensions/CurrentUsers/CurrentUsers.php on line 30

Which seems to be generated in this section of code

	if (strtolower($_REQUEST['title']) == 'robots.txt') $bot = 'bot';

I'm still getting output like | {{{1}}}:

best oops, useing MW 1.14.0

Nibb 09:16, 31 March 2009 (UTC)Reply[reply]

Hi, my server throws the same message as a notice, not as an error. It is indeed referring to the line indicated. However I experience no problems at all using this extension. Still having a look at to would not be bad anyway since notices are not there just for fun. There must be a reason. Cheers --kgh 00:14, 17 November 2010 (UTC)Reply[reply]
I have just seen that Nad released a new Version 1.0.8 on 2010-11-06 which fixes the issue. Thanks for your work Nad! Cheers --kgh 00:20, 17 November 2010 (UTC)Reply[reply]

Broken in 1.20.2Edit

I just performed an update and received an error from this extension. The error is:

( ! ) Fatal error: Call to undefined method User::isBot() in C:\wamp\www\wiki\extensions\CurrentUsers\CurrentUsers.php on line 44
Call Stack

  1. Time Memory Function Location

1 0.0007 369872 {main}( ) ..\index.php:0
2 0.0015 403992 require( 'C:\wamp\www\wiki\includes\WebStart.php' ) ..\index.php:55
3 0.0790 3218000 require_once( 'C:\wamp\www\wiki\includes\Setup.php' ) ..\WebStart.php:157
4 0.1921 12125488 call_user_func ( ) ..\Setup.php:551
5 0.1921 12125488 efSetupCurrentUsers( ) ..\Setup.php:551

I'll let you figure this out because I can't. 22:33, 22 February 2013 (UTC)Reply[reply]

swap isBot() for isAllowed( 'bot' ) Reedy (talk) 23:24, 22 February 2013 (UTC)Reply[reply]

As of MediWiki 1.27, the above substitution of isBot() is not enough anymore (there remain issues which I will not resolve). Should this extension be marked with status unknown or unmaintained? Bozonbozon (talk) 08:03, 30 November 2016 (UTC)Reply[reply]

Return to "CurrentUsers" page.