Extension talk:AjaxWhosOnline

From mediawiki.org
Jump to navigation Jump to search

Installing - more parameters need to be set[edit]

I got this extension working after modifying line 24 of the WhosOnlineAjax.php which starts "mysql_connect('localhost'...

Use the values in your LocalSettings.php file to help fill out the necessary info. From LocalSettings.php, find this information:

## Database settings
$wgDBtype           = "mysql";
$wgDBserver         = "mysql.exampledatabase.com";
$wgDBname           = "database_name";
$wgDBuser           = "your_username";
$wgDBpassword       = "your_password";

The corresponding information in WhosOnlineAjax.php is as follows:

$wgDBserver = localhost
$wgDBname = $database
$wgDBuser = $dbusername
$wgDBpassword = $dbpassword

Also, make sure to modify both:

print "URL|...
print "BaseURL|...

To include the path to your wiki folder (my wiki is located in onesci.com/w/wix/) The changes to WhosOnlineAjax.php should look like:

#--------elements needed for ajax begin-------
#--------db connection begin------------------
# necessary for the ajax calls
$dbusername="your_username";
$dbpassword="your_password";
$database="database_name";
mysql_connect('mysql.exampledatabase.com',$dbusername,$dbpassword);
@mysql_select_db($database) or die( "Unable to select database");
#--------db connection end------------------
function getConfig ()
{
		print "maxWidth|3||<br />";
		print "URL|http://www.onesci.com/w/wix/extensions/WhosOnlineAjax/||<br />";
		print "BaseURL|http://www.onesci.com/w/wix/||<br />";
}
#--------elements needed for ajax end-------


Cool Idea[edit]

Any chance it would work between multiple wikis? Possibly entering multiple databases to check? --Jeff.worldwide 03:07, 1 August 2008 (UTC)[reply]


Hi Jeff, interesting idea. Currently, there are no plans to add this functionality. The current objective is to integrate with a chat program, and collect more user statistics. Hopefully, in the near future we will be able to display usage, edits, time reading, and time usage all dynamically. Regards, --Supertick 19:26, 1 August 2008 (UTC)[reply]

Implementation Instructions[edit]

It would be nice for some instructions regarding how to implement this extention. Once the installation is done, how does one get this to display on their site?

There are implemenation instructions - did you fill in the URLs correctly?--Supertick 16:31, 16 August 2008 (UTC) these 2 have to be correct for your site.[reply]

print "URL|http://mywikisite.com/wiki/extensions/WhosOnlineAjax/||<br />";
                print "BaseURL|http://mywikisite.com/wiki/||<br />";

error opening fn[edit]

I Just installed the extension. I get the "whose online" list that I see on other demo sites, but I also get this annoying pop-up error saying that WhosOnlineAjax.php can't find this timestamp file (cache, it sounds like) of summary information. I tried creating the file for it, but of course by the time I'd done that the time stamp had changed, so that did no good.

And it's quite correct; those files are not being created, which sounds like a permissions error. But the extension has the same permissions as the other extensions, so I'm not sure what to do about that.

Anybody got any suggestions?

--Blackhawke 03:25, 30 August 2008 (UTC)[reply]

Finally managed to discover that I needed to add a "www" in front of the URL and the problem went away. That's interesting because I host three sites on the same server and with all of them the "www" version of the site is optional. Anyway, that fixed the issue.

Implementations[edit]

I see a couple of sites that are running this extension that have embedded it in different locations on the page. How is this done?

I also notice that on my site when a user logs in the extension "loses" the person's location, so the location flag becomes a "missing image." When it's just the IP, it knows where they're at. It's only after login that this happens.

--Blackhawke 14:17, 2 September 2008 (UTC)[reply]

Bug or Backdoor?[edit]

Today the left navigation in our wiki didnt worked any more? I found out that the extension "Ajax Whos Online" tried to connect to gizmogarden.com. The domain was not reachable.

Know I wonder why the extension will connect to this domain. Is it a bug or backdoor?

Im not happy that data will be transfered to this domain by using this extension.

--Pemmler 11:18, 23 December 2008 (UTC)[reply]

It sounds like its not configured correctly. It does do a ajax call but it should be to your box, and hostinfo domain - which is the geo-locator site

--Supertick 03:39, 17 March 2009 (UTC)[reply]

Extension Folder[edit]

I don't know what to do after downloading the .zip. Where is the extension folder? --83.255.131.72 18:49, 18 February 2009 (UTC) (Staffan15 on wikis)[reply]

the extension folder is on your server. almaghi 14:13, 12 June 2009 (UTC)[reply]

pages displaying online status[edit]

  1. How can we configure on which pages are the status displayed ?

Hooks: BeforePageDisplay ---> before Main Page display[edit]

$wgHooks['BeforePageDisplay'][] = 'renderWhosOnlineAjax';

I would like to display only on main page. How can I get this ? (it is for this extension)—almaghi 13:43, 12 June 2009 (UTC)[reply]

The system message MediaWiki:Mainpage contains the name of the main page; you can do a comparison between this and the page title and only run the body of your hook when they match. Happymelon 14:07, 12 June 2009 (UTC)[reply]

Chat[edit]

  1. how is the Chat feature working ?
  2. The Chat feature does not appear, what's wrong with my wiki ?

--almaghi 14:13, 12 June 2009 (UTC)[reply]

Show on Main Page Only[edit]

How do I get this to show on my main page only? 71.32.70.23 17:28, 14 September 2009 (UTC)[reply]

Only show on another page besides the main[edit]

How do I get to only display in another page besides the mainpage? --Brunoscunha 18:11, 27 October 2009 (UTC)[reply]

What to do after installing the extension?[edit]

After following Extension:AjaxWhosOnline#Installation, nothing new is shown anywhere even though Special:Version does show it installed.

Neither this Extensionpage nor the one on GizmoGarden shows what to do after including it, some documentation about showing the portlet (on all/main/other)pages would be nice.--77.176.69.244 11:53, 3 December 2009 (UTC)[reply]

No longer can download this extension[edit]

RE: http://www.gizmogarden.com/extensions/WhosOnlineAjax.zip Apparently the download link doesn't work anymore. There's just one website listed that still actively runs the plugin. I've sent them a mail hoping to get a copy, I'll post it here when the code resurfaces. Litso 14:55, 29 October 2010 (UTC)[reply]

I checked archive.org, no luck there either. The extension looks incredible, based on the one site in the example which is using it. Adamtheclown 05:32, 24 December 2010 (UTC)[reply]