Extension:UserMagic

The UserMagic extension allows editors to place the name of the current user inside the content of an article, without affecting the page cache. This is done by replacing magic words inside the fully-parsed HTML after the page has been rendered and cached.

Currently defined magic words:
 * -> Name of the current user
 * -> Link to the page of the current user
 * -> IP address of the current user

Caveats
Since the magic words are not replaced until after the HTML is rendered, they cannot be used as the target of links or as template arguments. However, they can still be used as the alternate text of links, e.g..

Additionally, since  tags will have already been parsed out, these magic words cannot be invalidated by. In order to explicitly print one of these words,  must be used in place of an underscore.

Code

 * UserMagic.php