Difference between revisions of "Template:Flink"

From Kolmafia
Jump to navigation Jump to search
imported>StDoodle
m
imported>StDoodle
m
Line 2: Line 2:
 
#vardefine:par|no}}{{
 
#vardefine:par|no}}{{
 
#vardefine:par|{{
 
#vardefine:par|{{
#if: {{{3|}}}|yes|no}}}}{{{1}}}&nbsp;{{#ifeq: {{#var:par}}|yes|{{lnkstart}}{{{2}}}{{!}}{{{2}}}&#40;{{#if: {{{3|}}}|&nbsp;{{{3}}}}}{{#if: {{{4|}}}|,&nbsp;{{{4}}}}}{{#if: {{{5|}}}|,&nbsp;{{{5}}}}}{{#if: {{{6|}}}|,&nbsp;{{{6}}}}}{{#if: {{{7|}}}|,&nbsp;{{{7}}}}}{{#if: {{{8|}}}|,&nbsp;{{{8}}}}}{{#if: {{{9|}}}|,&nbsp;{{{9}}}}}&nbsp;&#41;{{lnkend}}}}{{#ifeq: {{#var:par}}|no|[[{{{2}}}|{{{2}}}()]]}}</b></p>{{#if: {{{desc|}}}|<div style="margin-left: 2em; display: block;">{{{desc}}}</div>}}</includeonly>
+
#if: {{{3|}}}|yes|no}}}}{{{1}}}{{
 +
#ifeq: {{#var:par}}|yes|{{lnkstart}}{{{2}}}{{!}}{{{2}}}&#40;{{#if: {{{3|}}}|&nbsp;{{{3}}}}}{{#if: {{{4|}}}|,&nbsp;{{{4}}}}}{{#if: {{{5|}}}|,&nbsp;{{{5}}}}}{{#if: {{{6|}}}|,&nbsp;{{{6}}}}}{{#if: {{{7|}}}|,&nbsp;{{{7}}}}}{{#if: {{{8|}}}|,&nbsp;{{{8}}}}}{{#if: {{{9|}}}|,&nbsp;{{{9}}}}}&nbsp;&#41;{{lnkend}}}}{{#ifeq: {{#var:par}}|no|[[{{{2}}}|{{{2}}}()]]}}</b></p>{{#if: {{{desc|}}}|<div style="margin-left: 2em; display: block;">{{{desc}}}</div>}}</includeonly>
 
<noinclude>
 
<noinclude>
 
<p>This template styles a function call so that it can be displayed as a link in (pseudo) Category pages.</p>
 
<p>This template styles a function call so that it can be displayed as a link in (pseudo) Category pages.</p>

Revision as of 16:06, 10 April 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 useable parameters. (Up to 8 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 wrapping them in the Opt Template.

 

{{Flink|int|some_function}}

Returns:

intsome_function()

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

Returns:

stringother_function( [float] )

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