Rob Lanphier | 1 Nov 09:02 2005
Picon
Picon

Namespace handlers

Hi folks,

As part of writing my extension for MediaWiki, I created a mechanism for
plugging in namespace handlers, which work similarly to the way that
"Image:" and "Category:" are handled, but defined outside the core code.

I wrote the attached patch for MediaWiki 1.5.1.  I haven't yet tried to
port it to head, but I intend to, assuming I receive no negative
feedback on the idea here.  I see the code is slightly different in the
head, but it doesn't look like a drastically different approach.

The way this patch works is by introducing a new global array:
$wgNamespaceHandler.  Here's the structure:

$wgNamespaceHandler[$nid] = array containing the namespace handler for
namespace with numeric id of $nid

$wgNamespaceHandler[$nid]['ArticleClass'] = class name of the class
meant to extend the Article class.
$wgNamespaceHandler[$nid]['ArticleInclude'] = include file for the above
class.
$wgNamespaceHandler[$nid]['EditClass'] = class name of the class meant
to extend the EditPage class.
$wgNamespaceHandler[$nid]['EditInclude'] = include file for the above
class
$wgNamespaceHandler[$nid]['NameSpaceKey'] = the l10n key for the article
tab in the UI

The patch adds checks for the presence of this array, and potentially
instantiates the defined classes instead of Article and EditPage if set.
(Continue reading)

Moritz Karbach | 1 Nov 13:49 2005
Picon

Re: Re: 1.5.0 mime_magic crash

Hi,

> > Fatal error: mime_magic could not be initialized, magic file (null) is
> > not avaliable in C:\apache2\htdocs\mediawiki15\includes\MimeMagic.php on
> > line 476
>
> This is a PHP issue - mime_content_type seems to be buggy under windows.

today I recognized, that my MW 1.5.0 running on Debian Testing produces the 
same error:

Fatal error: mime_magic could not be initialized, magic 
file /usr/share/misc/file/magic.mime is not available 
in /var/www/mediawiki-1.5.0/includes/MimeMagic.php on line 476

I'm not sure what triggers the bug, since I got other pages containing images 
that work well.

> Possible solutions:
>
> 1) - 3)

Before I try these possible solutions, are there any other suggestions for the 
Linux case?

Cheers,

- Mo
Rowan Collins | 1 Nov 13:51 2005
Picon

Re: Namespace handlers

On 01/11/05, Rob Lanphier <robla@...> wrote:
> As part of writing my extension for MediaWiki, I created a mechanism for
> plugging in namespace handlers, which work similarly to the way that
> "Image:" and "Category:" are handled, but defined outside the core code.

This sounds like a very nice idea, and would personally approve of
making Image: and Category: work this way, since it adds consistency,
and guarantees that the extension mechanism is flexible enough to have
future applications. [For similar reasons, I think <math> should
probably be implemented as an extension, and the magic ISBN, RFC, etc,
handlers, should be generalised to a new extension mechanism.]

One thing you might want to look into is Erik's work preparing the way
for "Wikidata", in which he's implemented an experimental system for
storing namespace metadata in the database. If that ever hits the main
code, it would be nice to combine that work with yours...
See http://mail.wikimedia.org/pipermail/wikitech-l/2005-August/031257.html

--
Rowan Collins BSc
[IMSoP]
Moritz Karbach | 1 Nov 13:55 2005
Picon

Re: Re: 1.5.0 mime_magic crash

Ok,

solution 3 works on Linux.

That means putting

	$wgMimeDetectorCommand = "file -bi";

into the LocalSettings.php.

Thanks to Daniel!

- Mo
Ira Goldstein | 1 Nov 14:36 2005

LDAP Patch 1.0 to 1.5.1

Hi.  I am trying to get LDAP up and running under 1.5.1 and when I attempted to use the diff's in version 1.0 of
the LDAP patch from http://bugzilla.wikipedia.org/attachment.cgi?id=551&action=view I keep
getting errors such as:

patching file AuthPlugin.php
Hunk #1 FAILED at 65.
Hunk #2 FAILED at 133.
Hunk #3 FAILED at 210.
3 out of 3 hunks FAILED -- saving rejects to file AuthPlugin.php.rej

the date on the AuthPlugin.php file  shows as Jul 24 05:48 

Is there a more recent patch or should I be looking somewhere else.

Thanks in advance for any help you can offer.
--Ira
MJ Patterson | 1 Nov 16:17 2005

Re: Help: namespace tarball

While the license gets sorted, I'd like to help move things forward on 
assembling the content.  Mainly because I'm building the Help: pages for 
my site now. ;>) How can I help?

/mjp

Rob Church wrote:
> Surely we could release it as part of the documentation of the
> software itself, and thus under the GNU General Public License; or am
> I missing something?
> 
> Regardless, our end-user documentation stinks. Let's get it sorted.
> 
Rob Lanphier | 1 Nov 19:14 2005
Picon
Picon

Re: Namespace handlers

Hi Rowan,

Thanks for the feedback and the pointer.  It looks like I have yet
another reason to check out the Wikidata branch.  A lot of my approach
on Electowidget has been very wikidata-ish in nature, so I should
probably bite the bullet and learn where things are headed there.

Rob

On Tue, 2005-11-01 at 12:51 +0000, Rowan Collins wrote:
> On 01/11/05, Rob Lanphier <robla@...> wrote:
> > As part of writing my extension for MediaWiki, I created a mechanism for
> > plugging in namespace handlers, which work similarly to the way that
> > "Image:" and "Category:" are handled, but defined outside the core code.
> 
> This sounds like a very nice idea, and would personally approve of
> making Image: and Category: work this way, since it adds consistency,
> and guarantees that the extension mechanism is flexible enough to have
> future applications. [For similar reasons, I think <math> should
> probably be implemented as an extension, and the magic ISBN, RFC, etc,
> handlers, should be generalised to a new extension mechanism.]
> 
> One thing you might want to look into is Erik's work preparing the way
> for "Wikidata", in which he's implemented an experimental system for
> storing namespace metadata in the database. If that ever hits the main
> code, it would be nice to combine that work with yours...
> See http://mail.wikimedia.org/pipermail/wikitech-l/2005-August/031257.html
> 
> --
> Rowan Collins BSc
(Continue reading)

Isaac Gonzalez | 1 Nov 22:12 2005
Picon
Picon

two different wikis on same server

Hello,

I have successfully installed a wiki on iis v.6(win 2k3).

I was wondering if it was possible to have a seperate wiki on the same server but didn't know that this was
possible since there is only one wiki db. I was thinking that I could somehow create another db but not sure
how easy that would be.

thanks in advance,
Isaac
Isaac Gonzalez | 1 Nov 22:15 2005
Picon
Picon

two wikis on the same server

Hello,

I have successfully installed a wiki on iis v.6(win 2k3).

I was wondering if it was possible to have a seperate wiki on the same server but didn't know that this was
possible since there is only one wiki db. I was thinking that I could somehow create another db but not sure
how easy that would be.

thanks in advance,
Isaac
Bass, Joshua L | 1 Nov 22:24 2005

RE: two different wikis on same server

You can have 2 db's or you can use a different prefix for the second
wiki.

-----Original Message-----
From: mediawiki-l-bounces@...
[mailto:mediawiki-l-bounces@...] On Behalf Of Isaac Gonzalez
Sent: Tuesday, November 01, 2005 3:12 PM
To: mediawiki-l@...
Subject: [Mediawiki-l] two different wikis on same server

Hello,

I have successfully installed a wiki on iis v.6(win 2k3).

I was wondering if it was possible to have a seperate wiki on the same
server but didn't know that this was possible since there is only one
wiki db. I was thinking that I could somehow create another db but not
sure how easy that would be.

thanks in advance,
Isaac
_______________________________________________
MediaWiki-l mailing list
MediaWiki-l@...
http://mail.wikipedia.org/mailman/listinfo/mediawiki-l

Gmane