User:Wayoshi/Code FAQ

While I'm not a professional coder by any means, I have an expert grip on WikiSyntax, and I'd like to help newbies & long-time contributors alike with any issues they come across, hence this page. Most of you know basic syntax, but very little besides me can use ParserFunctions & DPL successfully, which I plan writing about here eventually.

You may ask a specific question on the talk page, in chat, my talk page (if something comes up), or basically anywhere, and I'll add it here if I think other people might ask the same question.

Please see these help pages before asking me your question, as these cover the basics:

Color codes &middot; Editing &middot; Format &middot; Gallery &middot; Image &middot; Link &middot; List &middot; Signature &middot; Table &middot; Template

Parser Functions

 * Under construction

A parser function is a special template-based construction. Instead of, the construction is  , with different syntax after the colon depending on each function. They are used for dynamic results in templates. 8 total are installed in a collective extension on this wiki, but we only have use for half of them:

#expr
This expression function takes mathematical expressions, including basic operations & rounding. While something like  seems like a waste of time (it comes out to be 4), any variables in a template that are numbers can be fed into this function without error and give varying results.

Sadly, the additional parser function for EditCount has been disabled for now, the template  provided an excellent example of the possibilities of, as  always gives out a numeric result. For the time being, does not have much use.

#if

 * Under construction

The if function is to be used solely with templates, as it takes a variable of a template as the determinant. The actual "if" part of the function is to test whether the variable of a template is defined or not. Syntax:

If the variable is defined on a certain page the template is called, the defined text will be outputed. If the variable is left blank or left uncalled entirely, the undefined text will be outputed instead.

This has several practical uses.