[Mediawiki-l] MediaWiki Extension Manager... XML function, lib, or mw code?
DanTMan
dan_the_man at telus.net
Sun Aug 12 09:32:07 UTC 2007
XML isn't for the settings. It was either INI or XML for the file
describing information about the extension. It's for the file that holds
the information about the extension. Such as the id, name, authors data,
version, and a number of other details about the extension.
Database isn't viable for grabbing settings from, it would require to
many sql queries on every page. Not to mention that I don't think the
GlobalFunctions.php was included and ready for DB actions inside of
LocalSettings.php
I was working on a thing in the past which would allow configuration of
MediaWiki using domain checking and database tables, which would also
probably cache things with Memcached, but that's more of one of my own
projects, cause not everyone has Memcached. I'm not going to make
Memcached a near requirement for the Extension Manager extension.
Grabbing the data would half to be through something like one of these:
PHP's XML Parser: http://ca.php.net/manual/en/ref.xml.php
PHP's SimpleXML: http://ca.php.net/manual/en/ref.simplexml.php
PHP's DOM functions: http://ca.php.net/manual/en/ref.dom.php
Or if MediaWiki had some functions built in, or if there was a PHP
library that I could include in with the extension to make it
non-dependent on things that may not be there.
This is a bit of an example, It's the one I'm working on in parallel
with the schema for the documents:
http://temp-dev.wiki-tools.com/extensions/wiki-tools/CWikiIncludes/.mwext/extension.xml
And the current (alpha) schema:
http://spec.wiki-tools.com/extensions/1.0/extension.xsd
I've been working on the Schema mostly, but I did write out a list of
features and specs of the Extension Manager, mostly I theorized on the
many possibilities and sorted out the ones that theoretically should be
possible:
http://central.wiki-tools.com/wiki/Extension:Extension_Manager
~Daniel Friesen(Dantman) of The Gaiapedia, Wikia Graphical Entertainment Project, and Wiki-Tools.com
Minute Electron wrote:
> On 8/12/07, DanTMan <dan_the_man at telus.net> wrote:
>
>> I was starting a new Wiki-Tools SVN repo to replace the in page code on
>> our wiki you'd copy into files for extensions I've made. And I thought
>> of throwing in some of the extra bits my ideas for a MediaWiki Extension
>> manager extension would need. So I am thinking of putting together a
>> Extension Manager. I thought of using INI files for the settings and
>> throwing those through PHP's core ini parsing functions. But INI doesn't
>> fit the multiple values and other things that would be used in the
>> configuration data files for the Extensions read by the Extension
>> manager. So I decided to use XML.
>> But what code should I use to parse the XML files? Is there a standard
>> PHP function set/class for parsing XML that is widely used on most
>> servers (I don't want to require PHP to be reconfigured with another add
>> on just to run the Extension Manager), some PHP library I could include
>> in the manager, or some MediaWiki code for parsing XML?
>> What would be the best thing to use? I'm not sure what PHP functions or
>> anything are widely used and would be supported by most people. I just
>> share JaeSharp's Virtual Hosting, so because we can recompile PHP with
>> anything we need I don't know much about what php restrictions people
>> may have being on a shared WebHost.
>>
>> --
>> ~Daniel Friesen(Dantman) of The Gaiapedia, Wikia Graphical Entertainment
>> Project, and Wiki-Tools.com
>>
>>
>>
>>
>>
> It is fairly simple to parse XML via PCRE, but I wonder what is wrong with
> using the database for the settings. The tables could be created on the fly
> so you wouldn't have to worry about schema changes. Also PHP code is a good
> way of storing settings, you can then use eval() to get back at them later.
> Regarding restrictions, generally all extensions except the most popular and
> those needed (e.g. mysql) aren't available. I made a phpinfo() on my shared
> host <http://idkb.eu/phpinfo.php> that should give you some help since it
> lists all extensions.
> MinuteElectron.
> _______________________________________________
> MediaWiki-l mailing list
> MediaWiki-l at lists.wikimedia.org
> http://lists.wikimedia.org/mailman/listinfo/mediawiki-l
>
>
More information about the MediaWiki-l
mailing list