I was looking to have a query that displays output differently based on the users' group membership.
I want to display something based on the query like api.php?action=query&list=allusers&augroup=inactive&aulimit=500 where a member is a member of a group it will give result A, and if they are not member of a group, give result B through a {{#switch:}}.
I cannot see a simple way to beyond the api to query for membership, and thought that there may have been stuff based on the use of magic words and parser functions. Am I missing something? If there isn't the means, if one isn't a hacker, how can one get the results from queries dynamically?
Thanks. Regards, Billinghurst
I don't think there is anything currently like that implemented in ParserFunctions due to caching issues that would arise from that I believe.
Writing an extension would be the best way to check for group membership, it's certainly on my TODO list.
Until then, what I've done is used Extension:External_Data to do a SQL query against the wiki's database for groups. http://www.mediawiki.org/wiki/Extension:External_Data
Of course embedding SQL queries into your pages will slow them down, so use with care.
- Olivier Finlay Beaton
On Sun, Nov 27, 2011 at 1:57 AM, K. Peachey p858snake@gmail.com wrote:
I don't think there is anything currently like that implemented in ParserFunctions due to caching issues that would arise from that I believe.
MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
mediawiki-l@lists.wikimedia.org