Valve Developer Community:Sandbox: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
No edit summary
(this probably won't work)
Line 1: Line 1:
<!-- Do not edit this line! -->{{sandbox}}<!-- Don't you dare! -->
<!-- Do not edit this line! -->{{sandbox}}<!-- Don't you dare! -->{{#if: {{{icon|}}} |{{{{{icon}}}}} &nbsp; }}{{#if:{{{1|}}} |{{DISPLAYTITLE:{{{1}}}}}'''{{{1}}}'''|This}} is a{{#if:{{{internal|}}} |n [[internal entity|internal]][[Category:Internal entities]] }} [[point entity]] available in {{#if: {{{series|}}} | the [[{{{series}}}]] series {{#if:{{{game|}}} | (since [[{{{game}}}]]) }} | {{#if: {{{game|}}} | [[{{{game}}}]] | all [[{{{engine|Source}}}]] games}} {{#if: {{{game|}}} since {{{game}}}} }} }}. {{#if: {{{game|}}} |[[Category:{{{game}}} Entities]] | {{#if: {{{series|}}} |[[Category:{{{series}}} Entities]] | [[Category:{{{engine|Source}}} Base Entities]]}} }}
__FORCETOC__
==Parser extension tags==
newsblurbs:<newsblurbs>dfgdfg dfgdfg dfgdfg</newsblurbs>
nframe:<nframe>dfgdfg dfgdfg dfg</nframe>
pre:<pre>dfgdfg dfgdf
dfgdfg dfgfgdf
dfgdf fdggd</pre>
source:<source lang="php"><?php
# Define a setup function
$wgExtensionFunctions[] = 'efExampleParserFunction_Setup';
# Add a hook to initialise the magic word
$wgHooks['LanguageGetMagic'][]      = 'efExampleParserFunction_Magic';
function efExampleParserFunction_Setup() {
        global $wgParser;
        # Set a function hook associating the "example" magic word with our function
        $wgParser->setFunctionHook( 'example', 'efExampleParserFunction_Render' );
}
function efExampleParserFunction_Magic( &$magicWords, $langCode ) {
        # Add the magic word
        # The first array element is case sensitive, in this case it is not case sensitive
        # All remaining elements are synonyms for our parser function
        $magicWords['example'] = array( 0, 'example' );
        # unless we return true, other parser functions extensions won't get loaded.
        return true;
}
function efExampleParserFunction_Render( &$parser, $param1 = '', $param2 = '' ) {
        # The parser function itself
        # The input parameters are wikitext with templates expanded
        # The output should be wikitext too
        $output = "param1 is $param1 and param2 is $param2";
        return $output;
}
?></source>
==Parser function hooks==
* fullurl:{{fullurl:MDL|hi}}
* urlencode:{{urlencode:123!"§}}
* uc:{{uc:x}}
* ucfirst:{{ucfirst:xyz}}
anchorencode, defaultsort, displaytitle, filepath, formatnum, fullurl, fullurle, grammar, int, language, lc, lcfirst, localurl, localurle, ns, numberofadmins, numberofarticles, numberofedits, numberoffiles, numberofpages, numberofusers, padleft, padright, pagesincategory, pagesize, plural, special, tag, uc, ucfirst and urlencode
 
== My Table ==
:{| class=standard-table
|+ '''Addition Table'''
!  Number || Number plus two
|-
| 2 || 4
|-
| 3 || 5
|-
| 27 || 29
|-
| 552 || 554
|}

Revision as of 04:23, 15 June 2011

The Sandbox (Valve Developer Community:Sandbox) is a VDC namespace page designed for testing and experimenting with Wiki syntax. Feel free to try your skills at formatting here: click on edit, make your changes, and click 'Save page' when you are finished. Content added here will not stay permanently.

Please do not edit the "markup" text, at the top of the editing window, that reads "{{sandbox}}". This is a point entity available in all Source games.