Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Wikipedia: Wikitech

Re: Coding my first extension!!! a few questions ifyou don't mind

 

 

Wikipedia wikitech RSS feed   Index | Next | Previous | View Threaded


gmane at kennel17

May 17, 2008, 6:02 AM

Post #1 of 1 (59 views)
Permalink
Re: Coding my first extension!!! a few questions ifyou don't mind

"Simetrical" <Simetrical+wikilist[at]gmail.com>
wrote in message
news:7c2a12e20805161159k7195ba79ld6a887c4c60a1a56[at]mail.gmail.com...
> On Fri, May 16, 2008 at 2:54 PM, Jonathan Nowacki
<jnowacki[at]gmail.com> wrote:
> > I found setHook in Parser.php but $wgParser exists only once in an
> > irrelevant comment. Doing a quick search showed that $wgParser is
> > referenced up to 147 times on the standard media wiki distro. 56 of
those
> > lines show $wgParser preceded by a global declaration. It seems like
it's
> > locally defined yet in my script I'm unable to change the name. Any
> > suggestions?
>
> $wgParser is a global that's initialized during MediaWiki startup.
> It's an object of the Parser class, which is why you were told to look
> in Parser.php: that's where its methods are defined. You may want to
> look at docs/globals.txt for more info on what globals MediaWiki uses.

Or perhaps http://www.php.net/manual/en/language.variables.scope.php for an
introduction to PHP globals and how they work. There seem to be a few areas
of the PHP language that you don't yet understand fully, so I would
recommend looking in the PHP manual first rather than trying to figure it
out from the MediaWiki code-base, which (let's be honest) is not necessarily
the ideal introduction to PHP... :-)

- Mark Clements (HappyDog)




_______________________________________________
Wikitech-l mailing list
Wikitech-l[at]lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Wikipedia wikitech RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact lists@gossamer-threads.com
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.