Subject: Handling #if in MediaWiki possible?

From: Alvaro Herrera <[email-masked]>
Date: Sat, 14 Mar 2009 21:25:40 -0300

Hi,

If you visit
http://www.mediawiki.org/wiki/MediaWiki
you can see at the bottom a box listing available languages for that
page.  They do this by having a template, Template:Languages, that uses
conditional inclusion of languages when the corresponding translation
exists for a given page.

So I'd like to use it (particularly so now that we have the FAQ on the
wiki), but apparently it needs #if constructs that don't work in our
installation.

The templates that we need are Template:Languages and
Template:Languages/Lang.  I have created Template:Languages/Lang (that
doesn't really work as far as I can see); since I can't create
Template:Languages (only wiki admins can) I instead created
Template:LanguagesExperiment.  It renders rather badly, and the #if and
#ifexist seem to be the problem:
http://wiki.postgresql.org/wiki/Template:LanguagesExperiment

So my question is: Is there a way for us to support those #if thingies?

-- 
Alvaro Herrera                                http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.

---

From: Alvaro Herrera <[email-masked]>
Date: Sun, 15 Mar 2009 01:07:45 -0400

> So my question is: Is there a way for us to support those #if thingies?

Turns out to be very easy to enable -- we just need to install this
extension:
http://www.mediawiki.org/wiki/Extension:ParserFunctions
It's a very trivial process.

---

From: Stefan Kaltenbrunner <[email-masked]>
Date: Sun, 15 Mar 2009 10:34:53 +0100

> It's a very trivial process.

done

Stefan

---

From: Alvaro Herrera <[email-masked]>
Date: Sun, 15 Mar 2009 20:29:37 -0400

>> It's a very trivial process.

For the record, I also had to ask Stefan to enable subpages on the main
namespace for this to work, as advised on #mediawiki.

-- 
Alvaro Herrera                                http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support