Template:Flink: Difference between revisions

From Kolmafia
Jump to navigation Jump to search
imported>StDoodle
No edit summary
imported>StDoodle
mNo edit summary
Line 1: Line 1:
<includeonly>
<includeonly>
<p><b>
<p><b>
{{{1}}}&nbsp;{{{2}}}{{#ifeq: {{#var:par}}|yes|&nbsp;{{#if: {{{3|}}}|{{{3}}}&nbsp;}}{{#if: {{{4|}}}|{{{4}}}&nbsp;}}{{#if: {{{5|}}}|{{{5}}}&nbsp;}}{{#if: {{{6|}}}|{{{6}}}&nbsp;}}{{#if: {{{7|}}}|{{{7}}}&nbsp;}}{{#if: {{{op1|}}}|[{{{op1}}}]&nbsp;}}{{#if: {{{op2|}}}|[{{{op2}}}]&nbsp;}}{{#if: {{{op3|}}}|[{{{op3}}}]&nbsp;}}{{#if: {{{op4|}}}|[{{{op4}}}]&nbsp;}}{{#if: {{{op5|}}}|[{{{op5}}}]&nbsp;}}|()}}
{{{1}}}&nbsp;{{{2}}}{{#ifeq: {{#var:par}}|yes|&nbsp;{{#if: {{{3|}}}|{{{3}}}&nbsp;}}{{#if: {{{4|}}}|{{{4}}}&nbsp;}}{{#if: {{{5|}}}|{{{5}}}&nbsp;}}{{#if: {{{6|}}}|{{{6}}}&nbsp;}}{{#if: {{{7|}}}|{{{7}}}&nbsp;}}{{#if: {{{op1|}}}|&#91;{{{op1}}}&#93;&nbsp;}}{{#if: {{{op2|}}}|&#91;{{{op2}}}&#93;&nbsp;}}{{#if: {{{op3|}}}|&#91;{{{op3}}}&#93;&nbsp;}}{{#if: {{{op4|}}}|&#91;{{{op4}}}&#93;&nbsp;}}{{#if: {{{op5|}}}|&#91;{{{op5}}}&#93;&nbsp;}}|()}}
</b></p>{{#if: {{{desc|}}}|<div style="margin-left: 2em;">{{{desc}}}</div>}}
</b></p>{{#if: {{{desc|}}}|<div style="margin-left: 2em;">{{{desc}}}</div>}}
</includeonly>
</includeonly>

Revision as of 16:56, 1 March 2010


This template styles a function call so that it can be displayed as a link in (pseudo) Category pages.

This template requires at least two (unnamed) parameters to be passed; the first is the dataype returned by the function; the second is the name of the function (without parenthesis).

All additional unnamed parameters will be parsed as datatypes, in order, of the required parameters. (Up to 5 can be supplied.)

An optional named parameter desc can be used to include a brief description of the what the function does, which will automatically be included in its display.

Optional parameters can be displayed by passing up to 5 named parameter, "op1" through "op2".

{{Flink|int|some_function}}

Returns:

int some_function()


{{Flink|string|other_function|op1=float|desc=This is what this bad boy does; blah de freakin' blah}}

Returns:

string other_function()

This is what this bad boy does; blah de freakin' blah