Remember this post?
http://mail.wikipedia.org/pipermail/wikitech-l/2003-September/005988.html
You all thought I was just daydreaming didn't you? heheheh :)
I have implemented a feature whereby almost all text messages in MediaWiki
can be edited through the web interface. It is in CVS, and in my directory
on larousse:
http://test.wikipedia.org/w/tim/wiki.phtml?title=MediaWiki:All_messages
I've sent this to both wikitech-l and wikipedia-l. Hopefully it's not too
technical for wikipedia-l.
Features
---------
* wfMsg now checks the database for a page in the MediaWiki namespace, by
the same name as the message. If it finds it, it loads it. If it doesn't, it
falls back to Language.php
* Reasonably efficient (more on this later)
* The install script automatically creates articles for all the messages
existing in the language file. By default, all these articles are protected.
There are myriad security problems associated with allowing anyone to edit
any message. We will unprotect the ones which we decide are safe.
* The UI is [[MediaWiki:All messages]], which is created by the install
script. It contains a table with all the message names, edit links for each
one, default text and current text.
* To make the "current text" column possible, I have added an extra markup
entity: {{MSGNW:recentchangestext}} will be replaced with an escaped version
of that message as the page is rendered. {{MSG:recentchangestext}} is the
unescaped version.
* While I was at it, I added a frivolous crowd-pleasing feature:
{{SUBST:xxxx}}. This tag is replaced by the given message as the article is
saved, just like ~~~~ signatures. Hence someone could easily create a
[[MediaWiki:Stubwarning]] article, and then append {{SUBST:stubwarning}} to
the bottom of a stub article, which would automatically be expanded to the
standard stub boilerplate when the user clicks "save".
* The wfMsg behaviour is controlled with $wgUseDatabaseMessages, and is off
by default. The substitution tags cannot be turned off at this point in
time.
Caveats
---------
* No handy "edit this page" link on special pages just yet
* There's a minor problem with message names that have spaces in them. No
big deal.
* The new namespaces (there's a MediaWiki_talk as well of course) don't show
up in the power search yet
Efficiency
---------
* Two cache levels:
- a per-thread cache in a PHP static variable. This is mainly for the
benefit of wfGetDB, which gets the "noconnect" and "nodb" messages every
time there is a query.
- memcached (untested). My use of memcached is documented in
memcached.doc
* I have written in DefaultSettings.php that use of this feature is not
recommended unless memcached is installed. If memcached turns out to be too
slow for this application, we can always use shared memory.
* The time required for substitution tags should be insignificant.
The main motivation for this feature is to allow other-language wikipedias
to translate their interfaces more easily. However, there are also gains for
en:, since we can use these pages in a way similar to the way
[[Wikipedia:Recentchanges]] is used.
Note that my previous attempt at implementing something like this, involving
putting colons at the start of messages, has been deleted.
-- Tim Starling <tstarlingphysicsunimelbeduau>
> Message: 2
> Date: Sat, 20 Sep 2003 23:46:53 +1000
> From: "Tim Starling" <ts4294967296(a)hotmail.com>
> Subject: [Wikitech-l] Re: Wikitech-l Wikipedia stuck
> To: wikitech-l(a)wikipedia.org
> Message-ID: <bkhlmr$atp$1(a)sea.gmane.org>
> Unfortunately there was nothing I could do about
> that. We could display an
> error message on en: because the requests for en:
> web pages go to larousse,
> and larousse was working fine. The database was on
> pliny, and that server
> was not responding.
>
> Requests for web pages on the other-language wikis
> go straight to pliny, not
> via another webserver. If I had root access (and
> assuming I also had some
> vague understanding of linux networking), I might
> have been able to pull an
> IP aliasing trick like Brion did last time larousse
> went down. That involves
> making larousse pretend to be pliny. I imagine Brion
> would have attempted
> that if he had more time.
>
> Soon, the other-language webserving will also be
> moved to larousse, which is
> fine as long as larousse doesn't crash.
>
> -- Tim Starling <t=starling=physics=unimelb=edu=au>
Okay. Thanks very much for the explanation Tim.
Anthere
__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com
Brion wrote:
>Changes I've just made, which could take a couple
>days to go through the system:
Ah, so that is why I got all those weird 'Zone.Editor@ mmp1###.verio-web.com'
messages. ;)
>- *.wikimedia.org should point directly to larousse
>(had been just wikimedia.org and www.wikimedia.org)
>- mail to wikimedia.org or www.wikimedia.org should
>go to mail.wikipedia.org
I don't know if this is what you wanted, but http://*.wikimedia.org/ displays
the current en.wikipedia database and the domain and subdomain in the address
links are persistant ( see http://meta.wikimedia.org and click around).
>- *.wiktionary.org should point directly to pliny ("")
>- *.wikibook.org, *.wikibook.com should point directly to pliny
Also persistant, but no biggie since the Wikibooks database is displayed.
>- wikibooks.org, www.wikibooks.org should point directly to pliny
Sweet! Wikibooks is at its new home. Thanks Brion!
>I don't know who has wikiquote.org/com, it's not
>in the list that mav sent me last month.
Jimbo bought those and I thought that Jason said he was going to forward them
to http://quote.wikipedia.org ....
-- Daniel Mayer (aka mav)
Thinking about it...when Wikipedia was down yesterday,
only the english wikipedia displayed a red message
saying it was not editable, but allowed read only.
On the french wikipedia, it was just and that was all.
No warning message saying "well, guys, sorry, we are
trying to fix the stuff" and not even read-only
wikipedia.
I don't know if this is due to the existence of the
two servers and if it would have been possible that
the fr wikipedia be read only as well.
If it is possible, could it be that we switch to read
only mode and alert message as well, instead of just
letting people wondering why the whole site is not
working at all ?
Sorry if I just don't understand the organisation of
that at all. I just think it is real bad that people
just don't know what is going on.
__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com
Does anyone have any idea how long meta.wikipedia.org will be displaying
"Database locked for a few minutes" when you try to edit?
After 2 and a half hours it's starting to feel like "Mars is a few miles
from Earth".
--
Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/
These have recently been changed to long names such as "A list for
discussing ......"
However, due to a Mozilla bug, this makes attachments impossible to see
because the name doesn't wrap.
These very long names aren't terribly wieldy either -- please consider
shortening them.
I've been poking around with the domains mav registered with verio.net &
godaddy.com, and I _think_ I've figured out how to get them to work.
Mostly.
Changes I've just made, which could take a couple days to go through the
system:
- *.wikimedia.org should point directly to larousse (had been just
wikimedia.org and www.wikimedia.org)
- mail to wikimedia.org or www.wikimedia.org should go to
mail.wikipedia.org
- *.wiktionary.org should point directly to pliny ("")
- *.wikibook.org, *.wikibook.com should point directly to pliny
- wikibooks.org, www.wikibooks.org should point directly to pliny
I can't figure out yet how to set up a wildcard entry on godaddy.com,
and our servers aren't reliable enough that I'd want to use them as
nameservers instead. :P
I don't know who has wikiquote.org/com, it's not in the list that mav
sent me last month.
-- brion vibber (brion @ pobox.com)
Hello.
Here's a feature suggestion: when previewing a modified page, display
links to redirections in a different color.
Currently we only see if the link exists or not. But i think we should
try to link straight to 'the right page', and not to a redirection page,
so seeing if we link to a redirection would help.
I don't say redirect are evil, just that if we can avoid using'em, it's
better...
Just my 2 cents of € :)
Nicolas
I've gone through the code, and altered about 200 instances of wfQuery() to
specify whether it is reading or writing. No warranty expressed or implied.
It's in CVS.
Reading:
wfQuery( $sql, DB_READ, $fname );
Writing:
wfQuery( $sql, DB_WRITE, $fname );
Currently, wfQuery doesn't do anything with this information, but the idea
is to have a list of database servers in LocalSettings.php. Using 0 for the
extra parameter would connect to the first server on the list, and send the
query. DB_WRITE (-2) would use whatever the current master is, presumably
this can be changed if the master goes down. DB_READ (-1) would invoke some
sort of load balancer to decide where to send the query.
I haven't really looked into the synchronisation issues yet, but I have a
feeling it won't be a big problem.
-- Tim Starling.
Ah. I'd volunteer to help, but knowing next to nothing about the wiki
software itself, that likely wouldn't help too much. Though if there is
something, let me know.
As an aside, I haven't yet received your mail - I checked the web archive to
find it. While there, I noticed it labels message received times as UTC...
but the time it lists is sender's local time. I wonder if that's a pipermail
bug.
-- Jake, bugmagnet.