Extension:Urlencode

The extension urlencode performs the exact same function as the PHP function of the exact same name. See External Links for clarification. The string passed to the extension for urlencoding is first parsed by the wiki engine to evaluate any code. See Usage for clarification.

This function was created to fill the gap left by the lack of proper parser functions in MediaWiki Version 1.6.10. It doesn't.

Install
Create a file called 'urlify.php' in your  directory, and add the following code...

setHook( "urlencode", "urlify" ); } function urlify( $input, $argv, &$parser ) { $output = $parser->parse( $input, $parser->mTitle, $parser->mOptions, false, false ); return urlencode( $output->getText ); } ?> Then simply add the following line to the end of your  file:
 * 1) The callback function for converting the input text to HTML output

include("extensions/urlify.php");

and you are ready to go! Go to the sandbox and see if it works!