SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Member
    Join Date
    Mar 2007
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question what is this: {{PLURAL:$1|Category|Categories}} ???

    Hello!

    I'm a real PHP newbie. I come from a Java background, and I'm trying to solve a problem with my wiki. A friend of mine implemented a mediawiki for me, and then we had to move it to a different machine. However, now in the new machine, the wiki pages seem to have problems with PLURAL. For instance, instead of seeing the number of categories correctly displayed, I get the following:

    {{PLURAL:$1|Category|Categories}}

    I think our wiki is working mostly right, but that is annoying. Why are we getting this output? I assume that PLURAL may be a function, and, for some reason, the interpreter is unable to find it, so it just pops it out.

    I have been googling for this, but no luck so far. I don't know where else to search.

    Thank you, and wish me luck learning PHP.

    Luis

  2. #2
    dooby dooby doo silver trophybronze trophy
    spikeZ's Avatar
    Join Date
    Aug 2004
    Location
    Manchester UK
    Posts
    13,806
    Mentioned
    158 Post(s)
    Tagged
    3 Thread(s)
    Hi and welcome to the forums Luis

    {{PLURAL:$1|Category|Categories}} looks to be part of the template engine used to serve the pages. It's only a guess but look for a preg_replace or str_replace call on your template page.

    Good luck with the PHP

    Spike
    Mike Swiffin - Community Team Advisor
    Only a woman can read between the lines of a one word answer.....

  3. #3
    Dinah-Moe Humm mudshark's Avatar
    Join Date
    Dec 2003
    Posts
    1,072
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    How did you "move" the wiki? It looks like you need the latest version of Mediawiki for PLURAL to work (see this mediawiki page). Also, if I'm not mistaken you will need php5 to get Mediawiki to work...
    Edit: Some more info at this meta.wikimedia.org page.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •