MUAHAHAHAHAHAH (evil laugh)
Hi David,
I haven't looked at the ParserFunctions extension in depth (it became part of MediaWiki bundle with the last version); however, now that I take a look at it, it seems like you could do a lot of interesting things with it. I just did a quick spot check and it was able to parse this statement as true:
{{#ifeq: {{#expr:2^2}} | 4| true | false }}
true
If you haven't already found it, this page has a lot of the syntax for the calculation operators: http://meta.wikimedia.org/wiki/Help:Calculation.
I'd be very interesting in seeing/hearing more about how you'd use it.
Cheers,
Hi Will,
I'm looking at all this right now and it is pretty exciting indeed!
That being said, there is something that I cannot do for the moment with it: determine if a given page is in a given category and then act upon the result. It seems the issue is that there are no magic words for that (since categories are lists and not unique items).
I found some custom-tailored extensions that would do exactly this here: [1] and [2].
I'm trying to use categories to determine the level of progress and quality of a page in my project. The idea would be that by adding a page to a category, it would be flagged appropriately for contributors to know where to work. At the same time, I would like readers to be informed by an Infobox of the current state of quality and would do that by just reading if the page is in a given category.
So the question is: is there a way to do this with the tools we have and if not, is there a way to add any of the above-mentioned extensions (or any other that does the job).
Cheers,
Hi David,
We'll have to evaluate the extensions on our verification server but we should be able to enable one of them. I spent some time thinking about how else, such as through DPL, you could achieve this functionality but I couldn't come up with anything workable. I'm probably missing something but at any rate we should be able to use one of the above extensions.
Best,
Great to hear! I'm planning to have a demo sessions with TAs in my department on Thursday to show them around, register them as contributors and have them getting started populating those pages. It would be amazing if I could get that functionality running at that time! Looking forward to hearing back from you.
Best,
Hi David,
We've enabled the PageInCat extension. We discovered that there is a minor caching issue that sometimes happens if you change the category on a page with the {{InCat:}} parser; the expression might seem to not be parsing with the updated category. Clearing the browser cache seems to take care of this issue. As you start to use this, let me know if you see anything else that seems funny.
Cheers,