Extension talk:Ajax Show Editors
From MediaWiki.org
You might want to add that the contents of the JS file have to be included somewhere, like MediaWiki:Common.js or MediaWiki:Monobook.js. It took me a while to figure out that the script wasn't loading, and that's why nothing was showing up. — Tuvok[Talk/Contribs] 23:28, 28 March 2007 (UTC)
Question So how do you set it up? Thanks
more information would be nice
Contents |
[edit] Disallow editing if page is being edited
Is this possible? -Eep² 19:19, 30 July 2007 (UTC)
[edit] Not working with MW1.11
Not working with MW 1.11. he classic function "return problem". how to solve it?
[edit] Strange problem with MW 1.11
Anyone using the AjaxShowEditors extension with MW 1.11?
I have a problem with this extension. When 2 people Jack and John are editing a page, it's showing only Jack's name as currently editing to Jack. And to John it's showing "John is editing". Though the DB table has 2 rows for jack and john. Any clues?
Regards,
Jack
[edit] MediaWiki 1.11.0
Don't work with me too... Waiting a fix for this great extension ;)
[edit] Error messages not internationalized
In a previous version of this extension, I created three messages in the database: 'ajax-se-invalidpage', 'ajax-se-invaliduser', and 'ajax-se-usernotfound'. They showed up when there were errors returned by the script. Now, Response.php has been altered to return hard-coded error messages that can only be changed by editing the code. I have patched my own installation to use the messages in the database.
You need only change three things: the return statement of the first three if statements in wfAjaxShowEditors. Here is my code up to the database read ($dbr):
function wfAjaxShowEditors( $articleId, $username ) { global $wgOut; $articleId = intval($articleId); // Validate request $title = Title::newFromID( $articleId ); if( !($title) ) { return wfMsg( 'ajax-se-invalidpage' ); } $user = User::newFromSession() ; if( !$user ) { return wfMsg( 'ajax-se-invaliduser' ); } $username = $user->getName(); if( !( $user->isLoggedIn() or User::isIP( $username ) ) ) { return wfMsg( 'ajax-se-usernotfound' ); } // When did the user started editing ?
That will allow editing the messages by creating pages in the database for them. Note that AjaxShowEditors.i80n.php also has to be changed. For example, change:
$wgAjaxShowEditorsMessages['en'] = array( 'ajax-se-title' => 'Currently editing:', 'ajax-se-pending' => 'pending refresh ... (click this box or start editing)', 'ajax-se-idling' => '($1s ago)', );
to
$wgAjaxShowEditorsMessages['en'] = array( 'ajax-se-title' => 'Currently editing:', 'ajax-se-pending' => 'pending refresh ... (click this box or start editing)', 'ajax-se-idling' => '($1s ago)', 'ajax-se-invalidpage' => 'ERR: page id invalid', 'ajax-se-invaliduser' => 'ERR: invalid user', 'ajax-se-usernotfound' => 'ERR: user not found', );
For each language in use on your wiki, add those three messages. Even if you don't define customized messages, it will still work and show something, even if it's not in the local language.
I hope that sometime in the future, Ashar will see this and patch the SVN version, since I don't have write access (nor would I want to commit on someone else's extension). — Tuvok[Talk/en.wp] 17:53, 30 December 2007 (UTC)
[edit] Another Problem with MW 1.11.0
I had another Problem with this great extension
It works only for articles in main namespace, not for those I created in my userdefined namespaces. Anyone having the same problem?
Ben
[edit] About comment one
Would you be able to describe more indepth what you did to install this extension? I'm still not sure where to save all the files, and you seemed to mention that one of them actually nees to be copied into another?

