Hi,
i'm writing a Specialpage named Languages (Special:Languages) to display
some information from language table (multilingual)
but i got a problem, the data is shown twice and also in any special page
this information is shown.
in LocalSettings.php file i have added a line (at the end of the file) like
this: require_once('extensions/SpecialLanguages.php');
and the code in extensions/SpecialLanguages.php file is:
if (!defined('MEDIAWIKI')) die();
$wgExtensionFunctions[] = "wfSpecialLanguages";
function wfSpecialLanguages() {
$mlmw = new MLMWLanguages();
$mlmw->execute();
}
class MLMWLanguages {
function MLMWLanguages() {
SpecialPage::addPage(new SpecialPage('Languages'));
}
function execute() {
global $wgMessageCache, $wgOut;
$wgMessageCache->addMessages( array( 'languages' =>
'Languages Supported by this Wiki'));
$dbr =& wfGetDB( DB_SLAVE );
$res = $dbr->select(array('language'),
array('language_id', 'english_name',
'native_name', 'iso639_2', 'iso639_3', 'wikimedia_key', 'dialect_of_lid'),
array('is_enabled' => '1'),
'Languages:wfSpecialLanguages', array('ORDER BY' => 'english_name'));
if ( false !== $res ) {
if ( $dbr->numRows( $res ) ) {
$wgOut->addHTML("<table border=1
cellspacing=0>");
$wgOut->addHTML("<tr><th>English
name</th><th>Native name</th><th>ISO 639_2</th><th>ISO
639_3</th><th>Wikimedia key</th><th>Dialect of lid</th</tr>");
while ( $row = $dbr->fetchObject(
$res ) ) {
$wgOut->addHTML("<tr><td>" .
ucfirst(strtolower($row->english_name)) . "</td><td>"
.ucfirst(strtolower($row->native_name)) . "</td><td
align=center>{$row->iso639_2}</td><td align=center>{$row->iso639_3}</td><td
align=center>{$row->wikimedia_key}</td><td
align=center>{$row->dialect_of_lid}</td></tr>");
}
$wgOut->addHTML("</table>");
}
}
}
}
do you have any idea why i get 2 the html code? here is the link of my
development server where you can see what i am talking about
http://mlmw.pastorelly.net/index.php/Special:Languages
thanks in advance
--
regards,
grace
(Sorry for the cross posting, but there are several groups who might
find this interesting.)
For years now, it has been common for people to claim that "all the good
editors are jumping ship" or "we are losing our best people".
Generally, this has not proven to be true: people come and go, to be
sure, but as some people drift away, others have drifted in. Whether
the rate of burnout is "too high" or "too low" or "just right" is quite
hard to say.
However, it ought to be possible to at least quantify what that rate
actually is, by using the Erik Zachte statistics or a modification of them.
I would be fascinated if we could figure out such statistics as
"For any given edit, what is the average length of service of the
editor?" "For any given edit, what is the median length of service of
the editor?" These could be measured by either time since first edit,
or total number of edits or (perhaps best) some weighted average of the
edit history.
It would be nice to track that number over time... are we becoming
"younger" as a community, "older" as a community? Staying about the
same? Are old-timers sticking around longer than they used to, or
jumping ship faster?
There are also a whole set of related questions around newbies:
Are newbies more likely to stick around, or less likely to stick around,
than they were a year ago. Some people feel we are being overrun by
newbies, others feel that we are becoming a more closed and cliqueish
community which does not welcome newbies.
I would measure this by saying "Of people who made at least 100 edits a
month ago, how many of them made at least 100 edits this month". And
similar stats for "at least 10 edits". (Merely looking at "new
accounts" would not be right, because we had a huge spike in new account
creation when it became necessary to have an account to create a new page.)
--Jimbo
--
#######################################################################
# Office: 1-727-231-0101 | Free Culture and Free Knowledge #
# http://www.wikipedia.org | Building a free world #
#######################################################################
Haven't seen this one before - was previewing a change to a page:
Database error
>From Wikipedia, the free encyclopedia
Jump to: navigation, search
A database query syntax error has occurred. This may indicate a bug in
the software. The last attempted database query was:
(SQL query hidden)
from within function "oaiUpdatePage". MySQL returned error "1213:
Deadlock found when trying to get lock; Try restarting transaction
(10.0.0.2)".
Steve
Hello,
maybe I have already sent this mail; however I didn't received it from this mailing list, so I am trying again. I apologize for any trobles.
Claudi
Text follows:
Hello,
I would like to ask you if there is a way to carry out elementary numerical operations with wiki variables, e.g. (that's I'd need)
CURRENTDAY mod 2 = 0 if CURRENTDAY is even, 1 if CURRENTDAY is odd
Many thanks.
Yours sincerely,
Claudi
---------------------------------
Yahoo! Mail réinvente le mail ! Découvrez le nouveau Yahoo! Mail et son interface révolutionnaire.
---------------------------------
Yahoo! Mail réinvente le mail ! Découvrez le nouveau Yahoo! Mail et son interface révolutionnaire.
An automated run of parserTests.php showed the following failures:
Running test Table security: embedded pipes (http://mail.wikipedia.org/pipermail/wikitech-l/2006-April/034637.html)... FAILED!
Running test Link containing double-single-quotes '' (bug 4598)... FAILED!
Running test BUG 1887, part 2: A <math> with a thumbnail- math enabled... FAILED!
Running test Language converter: output gets cut off unexpectedly (bug 5757)... FAILED!
Running test HTML bullet list, unclosed tags (bug 5497)... FAILED!
Running test HTML ordered list, unclosed tags (bug 5497)... FAILED!
Running test HTML nested bullet list, open tags (bug 5497)... FAILED!
Running test HTML nested ordered list, open tags (bug 5497)... FAILED!
Running test Parsing optional HTML elements (Bug 6171)... FAILED!
Running test Inline HTML vs wiki block nesting... FAILED!
Running test Mixing markup for italics and bold... FAILED!
Passed 338 of 349 tests (96.85%) FAILED!
je vous remercie pour la confiance et toutes les honneurs me revienne surtout je voudrais tous recevoir en français
__________________________________________________
Do You Yahoo!?
En finir avec le spam? Yahoo! Mail vous offre la meilleure protection possible contre les messages non sollicités
http://mail.yahoo.fr Yahoo! Mail
Several of us on the English Wiktionary are trying to resolve an issue
and we could use some advice.
(This is my frist post to this list, so apologies if I restate the
obvious.)
What's the best way to rig it up so that when you interlink to [[Foo]]
on a caseful Wiki project, where "Foo" does not exist but "foo" does,
to give the user a convenient shortcut to [[foo]]?
Background: unlike most Mediawiki projects, the English Wiktionary
honors case in the first character of article titles . (That is, I
assume it has $wgCapitalLinks set to false.) This can cause problems
with links to Wiktionary from other Mediawiki projects, and from the
outside world (such as Wiktionary mirrors), since those incoming links
are often to the capitalized version of a word, on the assumption that
Wiktionary works like Wikipedia. (As, in fact, it once did.)
Even since it switched over to casefulness, Wiktionary has evidently
been trying to "solve" this problem by having an explicit, capitalized
redirect in place for every lower-case entry. But that's clearly a huge
nuisance and waste of time.
Instead, some of us have been thinking it Would Be Nice if we could
adjust the behavior on a missing page ("broken link") slightly. Instead
of saying "Wiktionary does not have an entry for this word yet", in the
case where Wiktionary does have an alternate-case version of the word,
perhaps it should display an explicit "Did you mean?" link right up
front (along with but ahead of the other search and create options).
There are probably several ways of approaching this. I've already
implemented one way, but I'm curious as to this list's opinion of the
most appropriate approach.
1. I added some code (in a test wiki) to getContent() in Article.php
to optionally display "Did you mean ___?" before displaying
'noarticletext', in the case where an alternate-case version does
exist. In some ways this is the right approach, but it's awkward,
because it has to prepend its text to the 'noarticletext'
boilerplate. Someone editing MediaWiki:noarticletext would
reasonably expect to see the "Did you mean?" text there,
and might want to integrate it with the rest of the boilerplate,
but wouldn't be able to.
2. It might also be possible to implement the test and optional text
right there in 'noarticletext', using the new in-line conditional
expressions. (But I'm not sure they're quite powerful enough.)
3. Arguably, this is a problem that doesn't need solving, and the
typical, already-existing "You can search for this article in
Wiktionary" link should suffice.
4. Arguably, this is a problem that does need solving, but in an even
more general case, whenever there are other kinds of near matches,
that aren't appropriate to handle with redirects or with the
automatic case mapping that happens when $wgCapitalLinks is on.
(Someone might ask, "Why provide an interactive question and a link;
why not just quietly redirect?" But that defeats the purpose of being
caseful and makes it difficult or impossible to create a second entry
with the other case. If you're going to redirect in this case, you
might as well turn on $wgCapitalLinks and be done with it.)
Another way of thinking of this is that the proposed "Did you mean?"
question is a little like a disambiguation page, in a case where user
confirmation is required (i.e. in cases where a more implicit Wiki
redirect or 302 redirect is not appropriate).
For all I know this issue has been discussed already and some consensus
reached. But does anyone have any advice or suggestions? Thanks.
Hi all,
Others must have noticed this - is this a recognised issue?
Basically: Given some article whose title is in title case (eg, Lyon
Metro), you can type the lower case version in the go/search box, and
still get there. However, if you link to [[lyon metro]] in an article,
it will show up as a red link.
This has the effect that it's actually difficult to create the article
*other* than going through the redlink - if you try and type in the
name, you get silently redirected.
Would it be wrong to be redirected towards the other cased version
instead of having a redlink?
Steve
An automated run of parserTests.php showed the following failures:
Running test Table security: embedded pipes (http://mail.wikipedia.org/pipermail/wikitech-l/2006-April/034637.html)... FAILED!
Running test Link containing double-single-quotes '' (bug 4598)... FAILED!
Running test BUG 1887, part 2: A <math> with a thumbnail- math enabled... FAILED!
Running test Language converter: output gets cut off unexpectedly (bug 5757)... FAILED!
Running test HTML bullet list, unclosed tags (bug 5497)... FAILED!
Running test HTML ordered list, unclosed tags (bug 5497)... FAILED!
Running test HTML nested bullet list, open tags (bug 5497)... FAILED!
Running test HTML nested ordered list, open tags (bug 5497)... FAILED!
Running test Parsing optional HTML elements (Bug 6171)... FAILED!
Running test Inline HTML vs wiki block nesting... FAILED!
Running test Mixing markup for italics and bold... FAILED!
Passed 338 of 349 tests (96.85%) FAILED!