Hmm.. Unluckily I'm not a programmer. I thought my requirement is
simple.
In my extension I want to display the output of a function only while
editing existing pages.
Something like
If ($articleId !=" ") {
Myfunction
}
I suppose if the currently editing page is a new one, it still don't hv
an ID
Regards,
Jack
----------------------------------------------------------------
"People forget how fast you did a job - but they remember how well you
did it"
-----Original Message-----
From: mediawiki-l-bounces(a)lists.wikimedia.org
[mailto:mediawiki-l-bounces@lists.wikimedia.org] On Behalf Of Platonides
Sent: Friday, November 02, 2007 2:45 AM
To: mediawiki-l(a)lists.wikimedia.org
Subject: Re: [Mediawiki-l] Checking whether a page existing or not
Jack Eapen C wrote:
Thanks. When I added $articleID= Parser::getArticleID(); to my
extension code, I got a blank page.
I guess I need to declare some other global variable or so... Wht
should be that?
Regards,
Jack
getArticleID() is not a static member function. It must be called from
an object.
You can call it from $wgParser->getArticleID() but *it's not guaranteed
to work*. You should use the parser object which is being passed to your
extension.
_______________________________________________
MediaWiki-l mailing list
MediaWiki-l(a)lists.wikimedia.org
http://lists.wikimedia.org/mailman/listinfo/mediawiki-l
This electronic mail (including any attachment thereto) may be confidential and privileged
and is intended only for the individual or entity named above. Any unauthorized use,
printing, copying, disclosure or dissemination of this communication may be subject to
legal restriction or sanction. Accordingly, if you are not the intended recipient, please
notify the sender by replying to this email immediately and delete this email (and any
attachment thereto) from your computer system...Thank You