On 06/11/13 14:39, Jan Steinman wrote:
>> From: Tim Starling <[email protected]>
>>
>> On 05/11/13 07:38, Jan Steinman wrote:
>>> But doing this: xxx {{#ifeq:"0 "|"{{#tag:sql2wikiInline|SELECT
>>> count(*) FROM s_product_harvest h INNER JOIN mw_user u ON
>>> h.who1 = u.user_id WHERE u.user_name =
>>> '{{{1}}}'|database=EcoReality}}"|no harvests|some harvests}}
>>> xxx
>>
>> #tag generates an opaque placeholder, you can't compare it to
>> things with #ifeq. It would work if your sql2wikiInline extension
>> provided a proper parser function interface, instead of using
>> #tag.
>
> You've got my attention.
>
> Can you point me to a starting point for figuring this out? (I find
> crawling through MediaWiki documentation to be an "opaque
> placeholder." :-)
"Strip marker" is the preferred jargon, but I don't think there's much
about it on mediawiki.org.
Basically, tag extensions return raw HTML, which is guarded from
interpretation by the wikitext parser by temporarily replacing it with
a placeholder. Parser functions return wikitext by default, so don't
need to be guarded.
> It can be used as "<sql2wikiInline>...</sql2wikiInline>", but I
> think you're saying if it could be used as "{{#sql2wikiInline:..."
> it would work.
Yes. There is a documentation about how to make such parser functions
at <https://www.mediawiki.org/wiki/Manual:Parser_functions>
-- Tim Starling
_______________________________________________
MediaWiki-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l