I did a little mockup on Community Test explaining the usefulness of
Looping Functions.
http://communitytest.wikia.com/wiki/LoopFunctions_usefulness_example
I know most people don't think that WikiText should be considered a
programming language, but I would also think that anything that can make
template and article syntax more simplified should be reviewed.
Though, I do think that most of the implementations are lacking. I'm
probably considering reviewing all of them (ParserFunctions,
ParserFunctions (extended), StringFunctions, LoopFunctions, Control
Structure Functions, Character Escapes, and RegexParserFunctions), and
creating an extension which combines the usefulness of all of them, but
while working better with the syntax, and still making it backwards
compatible with wiki like Wikia which is already using some of the
extensions and would have issues installing some of the others for
compatibility reasons.
Would anyone consider such an extension good for use on Wikia?
My first question is on the subject of character escapes. LoopFunctions,
and also in the case of tables, any type of ParserFunctions do have
issues with syntax of things because of the nature of ParserFunctions.
There are multiple ways to do escapes. I'm probably going to add the
<esc></esc> function from Character Escapes in, but that doesn't work on
it's own, sometimes you need an alternate set of escapes. However there
are multiple forms, and I'd like to know what the community thinks of them.
The first one is the set of escapes created by the Character Escapes
Extension, I quite dislike it, but I'm putting it here for the sake of
listing it:
From: http://www.mediawiki.org/wiki/Extension:Character_Escapes
* \l (*l*ess than) is translated to <
* \g (*g*reater than) is translated to >
------------------------------------------------------------------------
* \o (*o*pen double curly braces) is translated to {{
* \c (*c*lose double curly braces) is translated to }}
* \p (*p*ipe) is translated to |
------------------------------------------------------------------------
* \\ is translated to *\*
------------------------------------------------------------------------
* \n is translated to a *n*ewline
And the second one is the set of escapes that can be used in DPL (Though
I'd like to know when Wiki is going to update so that some of them
become usable, I can't do a number of things without the ones for the
curly braces)
From:
http://semeb.com/dpldemo/index.php?title=DPL:Manual_-_General_Usage_and_Invocation_Syntax
DPL escape character Mediawiki character Typical use
|*»*| > Call another MediaWiki extension into a parameter of a DPL call
|*«*| <
|*²{*| {{ Call a template within the 'article loop' of DPL. This is
especially useful for nesting DPL calls (/DPL recursion/)
|*}²*| }}
|*¦*| |
|*¶*| newline Inserts a line break into DPL's wikitext output, to
allow proper parsing of first-character syntax (such as |* # : ;|)
|*\n*| newline
There are advantages and disadvantages to both. The Character Escapes
Syntax is much less human readable and harder to understand than the DPL
method, but the DPL method does use characters you need to copy or use
CharInsert to add, however the Character Escapes Syntax may be more
likely to collide with current syntaxes.
On a similar note, if there is any syntax inside escaping that might not
work out in normal #if, etc... functions I do have an extra note on
them. While things like #if could stay the same way they are so that the
syntax would be relatively the same, we could also create an alternate
set of functions which append an e to the name (e for Escaped) which
would add in the unescape method of a escapable character set.
So #if would work like a normal #if, but #ife would let you do the same
but allow for issues with characters needing escaping to be resolved. If
we were using DPL's method of ¦ to be translated to | and it was only
used inside of an e function, then here's a difference between that and
using the old {{!}} template:
Old syntax for a conditional row:
{|
|-
!| Header{{#if:{{{1|}}}|<nowiki/>
{{!}}-
{{!}}{{!}} Text}}
|}
Here's using the ¦ escape:
{|
|-
!| Header{{#if:{{{1|}}}|<nowiki/>
¦-
¦¦ Text}}
|}
Though I would note, that you don't always half to use the ¦, there is
still the <esc></esc> function as long as you're not recursing that:
{|
|-
!| Header{{#if:{{{1|}}}|<esc>
|-
|| Text</esc>}}
|}
So I would half to say that it does improve the ability to do stuff, and
kills function parsing and template overhead in many ways.
--
~Daniel Friesen(Dantman) of:
-The Gaiapedia (http://gaia.wikia.com)
-Wikia ACG on Wikia.com (http://wikia.com/wiki/Wikia_ACG)
-and Wiki-Tools.com (http://wiki-tools.com)
_______________________________________________
Wikia-l mailing list
[email protected]
http://lists.wikia.com/mailman/listinfo/wikia-l