Extension talk:WhosOnline/Archive 1

Users/Installers: Don't forget the prefix
In case your wiki uses a prefix (e.g. "mw") for the database tables, change the first line of the SQL instruction into something like: CREATE TABLE `mw_online` (    .....

Other than that: ** Special:WhosOnline|Who is online - Daniel / edutechwiki.unige.ch
 * This extension works fine with Mediwiki version 1.12.0
 * If you want to make a quicklink from the sidebar, edit MediaWiki:Sidebar and add something like:

List visitors?
I would use this extensions since it's stable and hasn't got the UNIQ problem but as a special page it's not very useful. I think most users want to integrate the stats on Main Page or another exisiting page. E.g. Guests: 75, Users (2): Bob, Paul. WHat brings me to the next point. Ignoring the anonymous visitors is what makes me ignore this extension ;)
 * Btw: Works fine in 1.12 for me as well --Subfader 13:12, 12 May 2008 (UTC)

Works also fine in my 1.12 without any fiddling, but Subfader is right: connectable to a "$footerlinks" in "MyModifiedSkin.php" it would be even better. Difficult to implement? --michael 10:00, 16 May 2008 (UTC)
 * Thanks for this nice extension!


 * I also agree with Subfader. My wish list is integrable throughout the wiki and accounting for guests.

Having problem with sql table
I can't seem to add the sql table.

After entering this: CREATE TABLE mw_online (`userid` int(5) NOT NULL default '0',`username` varchar(255) NOT NULL default ,`timestamp` char(14) NOT NULL default , PRIMARY KEY USING HASH (`userid`, `username`),INDEX USING BTREE (`timestamp`)) TYPE=MEMORY;

I get this response -bash: syntax error near unexpected token `('

I think it's to do with the INDEX USING BTREE (`timestamp`) section.

Any ideas how to fix this?

Thanks

--LizK 09:23, 20 August 2008 (UTC)


 * No idea, sorry.


 * Assuming you have the extension files in $IP/extensions/WhosOnline, why don't you cd extensions/WhosOnline, edit whosonline.sql with your favorite text editor (nano, vim etc.), replace $wgDBprefix with mw_ and then run mysql -u [your mysql username here] -p [database name here] < whosonline.sql? That's a lot easier (for me, anyway) than copying and pasting stuff. :) -- Sayuri 13:54, 20 August 2008 (UTC)

For $wgDBprefix, do I remove the /* */ that surrounds them too? Thanks. Fader 23:51, 26 March 2009 (UTC)

Allow inclusion of the page
This patch allows inclusion of the Special page, in a similar way to Special:Newpages (eg. ). If you use   it will only show 10 users and will have the navigation controls.

Edit WhosOnlineSpecialPage.php and change line 79: to

Then go to line 111 and change the rest of the execute function from

to
 * Wow, that works fine, Dude! Thanks a lot :-) -- Tommy us Kölle 13:59, 11 December 2009 (UTC)

I liked this one
I liked the idea behind this extension, so I modified it a little to do more of what I wanted:

Can show partial IP addresses or 'Guest', page last viewed, and keeps active users at the top of the list, with updated page info.

WhosOnline list becomes more like this:
 * 1) Ace - Special:WhosOnline
 * 2) Guest - Wiki_Top_Ten

Example of 'Guest' view mode: http://www.gshi.org/wiki/Special:WhosOnline

See WhosOnline files for info and all-done file setup with version-agreeing files: http://www.gshi.org/ugetab/Wiki/

Hack to make it work with postgres
I had to change the create table script so that the php code would work with a postgres database: The biggest change was the type of timestamp from character to bigint.

I also had to change the php file WhosOnlineSpecialPage.php on line 107 so that it would look like this: Notice all I did was remove the double-quotes. Postgres thought it should be looking for a table.

Strange Issue
I have just upgraded my mediawiki from 1.9.2 to latest 1.15.1, and also installed the whosonline page, I get a strange error that each time I view the page, it is adding my user ? i.e. I have mulitple listings of my user in the page, how can I stop these duplicates ?

Many thanks

Mark