Hi all
I have written an experimental installer for extensions. It's in SVN, maintenance/installExtension.php; It would be great if you would try it, and give some feedback. I hope this will make life much easier for users.
Basically, it fetches the files, places them in the extension dir, and optionally patches LocalSettings.php (if the user chooses that option and the extension provides an install.settings patch file). The CategoryTree extension has such a file, if you want to try the patching feature.
Extensions can be fetched from local tgz files or directories, from remote tgz files, or from a SVN path. The installer looks up extensions in "repositories", which are directories containing tgz files or subdirectories.
Per default, http://svn.wikimedia.org/svnroot/mediawiki/trunk/extensions is used as the repository (in svn mode), unless MediaWiki was checked out via SVN - in that case, the SVN path given in .svn/entries is used.
For testing, I have set up a tgz based repository at http://tools.wikimedia.de/~daniel/repository/extensions/. It has a tgz for each subdirectory in the extensions module. Note that extensions that do not have their own subdirectory are not supported.
Caveats: Custom install scripts (for example to patch the database) are not yet supported. This needs some more thought I guess. The ability to uninstall or deactivate extensions could be added - not sure how helpful that would be. The present script will also not work on Windows, because it relies on things like tar.
The installer is currently intended for use from the command line. A web interface would raise security concerns - perhaps it could be made part of the original installation procedure, though.
I wrote the installer in a manner that does not require changes to extensions or the way they are loaded. On the long run, it would probably be nicer to be able to hook up extensions without messing with LocalSetttings.php - although I'm not sure how to do that in a clean and at the same time flexible way. We should talk about how to do that, too, in time, but please keep that separate from talk about the present installer.
Any input would be appreciated -- Daniel
Daniel Kinzler wrote:
I have written an experimental installer for extensions. It's in SVN, maintenance/installExtension.php; It would be great if you would try it, and give some feedback. I hope this will make life much easier for users.
Basically, it fetches the files, places them in the extension dir, and optionally patches LocalSettings.php (if the user chooses that option and the extension provides an install.settings patch file). The CategoryTree extension has such a file, if you want to try the patching feature.
I really, really don't like that. An improved extension system should simply have autodiscovery of dropped-in directories and a simpler way to enable things.
An installer should not be necessary, IMHO, as it would be useless for the primary target audience of simplified extension installation -- people with limited hosting accounts.
-- brion vibber (brion @ pobox.com)
Folks,
This may be answered somewhere but i have not found a reference.
I would like stats or a graph that shows:
Number of unique editors per article X number of articles with that many unique editors.
So for example
number of unique editors Number of articles with that many unique editors 15 356 30 3455
And so on. Is this even possible?
M
Mark Bell wrote:
Folks,
This may be answered somewhere but i have not found a reference.
I would like stats or a graph that shows:
Number of unique editors per article X number of articles with that many unique editors.
So for example
number of unique editors Number of articles with that many unique editors 15 356 30 3455
MAYBE this will work (haven't tried it):
SELECT editorcount as 'Number of unique editors', COUNT(rev_page) as 'Number of articles with that many unique editors' FROM ( SELECT rev_page, COUNT(DISTINCT rev_user_text) as editorcount FROM revisions GROUP BY rev_page ) AS editorcounts GROUP BY editorcount ORDER BY 'Number of unique editors';
If this doesn't work (maybe MySQL doesn't support this particular way of nesting queries), then I don't think you can do it in a single SQL query, but here's how you could do it in several:
First, create a new table:
CREATE TABLE editorcounts ( page_id int not null, editorcount int not null );
Now fill the table with data that tells you how many unique editors each article has:
INSERT INTO editorcounts (page_id, count) SELECT rev_page, COUNT(DISTINCT rev_user_text) FROM revisions GROUP BY rev_page;
And finally, query the new table for the data you actually want:
SELECT editorcount as 'Number of unique editors', COUNT(page_id) as 'Number of articles with that many unique editors' FROM editorcounts GROUP BY editorcount ORDER BY editorcount;
You may have to create indexes to speed up this process. You may also have to correct syntax errors if I made any, because I haven't tested this :-)
Timwi
MAYBE this will work (haven't tried it):
SELECT editorcount as 'Number of unique editors', COUNT(rev_page) as 'Number of articles with that many unique editors' FROM ( SELECT rev_page, COUNT(DISTINCT rev_user_text) as editorcount FROM revisions GROUP BY rev_page ) AS editorcounts GROUP BY editorcount ORDER BY 'Number of unique editors';
I've just tested this, and it works perfectly, except that "revisions" should have been "revision". :-)
Timwi
any chance you can send me the data?
On 8/4/06, Timwi timwi@gmx.net wrote:
MAYBE this will work (haven't tried it):
SELECT editorcount as 'Number of unique editors', COUNT(rev_page) as 'Number of articles with that many unique editors' FROM ( SELECT rev_page, COUNT(DISTINCT rev_user_text) as editorcount FROM revisions GROUP BY rev_page ) AS editorcounts GROUP BY editorcount ORDER BY 'Number of unique editors';
I've just tested this, and it works perfectly, except that "revisions" should have been "revision". :-)
Timwi
Wikitech-l mailing list Wikitech-l@wikimedia.org http://mail.wikipedia.org/mailman/listinfo/wikitech-l
Mark Bell wrote:
any chance you can send me the data?
What data? I don't have a copy of the Wikipedia, if that's what you mean. I only tested this on another MediaWiki installation which has only a few hundred pages.
Maybe someone reading this here will be generous enough to run this little query on the toolserver (which I don't have access to)?
Timwi
wikitech-l@lists.wikimedia.org