With the template I'm replicating right now I've had to create a couple macro's to get it Identical.
{{set| shrink |{{\{{if | {{> | {{length |$1}} | $2}} | {{cut | 1 | {{sub | $2 | {{length |$3}}}} | $1}}$3|$1</a><a>{{repeat|{{sub|$2|{{length|$1}}}}| }}}}/}}}}
Example:
{{^shrink|text to shrink if over X characters|X characters|..>}}
It will test if the text is longer then the allowed length, if so it will shrink it and append the 3rd parameter to the end so you can tell it has been shrunk. If it is not the correct length, it will append spaces on the end to keep everything aligned.
{{set| format_date | {{\{{replace | / | - | {{if | {{is substring | PM | $1 }} | {{if | {{is substring | / | {{cut | 1 | 2 | $1}} }} | 0{{cut | 1 | 2 | $1}}{{!month{{cut | 3 | 2 | $1}}}}{{cut | 5 | 5 | $1}}{{!pm{{cut | -11 | 2 | $1}}}}{{cut | -9 | 3 | $1}} | {{cut | 1 | 3 | $1}}{{!month{{cut | 4 | 2 | $1}}}}{{cut | 6 | 5 | $1}}{{!pm{{cut | -11 | 2 | $1}}}}{{cut | -9 | 3 | $1}}}} | {{if | {{is substring | / | {{cut | 1 | 2 | $1}} }} | 0{{cut | 1 | 2 | $1}}{{!month{{cut | 3 | 2 | $1}}}}{{cut | 5 | 5 | $1}}{{!am{{cut | -11 | 2 | $1}}}}{{cut | -9 | 3 | $1}} | {{cut | 1 | 3 | $1}}{{!month{{cut | 4 | 2 | $1}}}}{{cut | 6 | 5 | $1}}{{!am{{cut | -11 | 2 | $1}}}}{{cut | -9 | 3 | $1}}}}}}}}/}}}}
Example:
{{^format_date|%item-modified%}}
This is what I eventually ended up with for formating the date, I know it is big and complicated but surprisingly the page still builds quite fast when this is used on every file.
It returns "19-Dec-2007 15:06" instead of "19/12/2007 3:06:49 PM"
I would copy the Special:Strings section but it is too big.
{{set| size |{{\{{if|{{<=|{{length|$1}}|$2}}|{{repeat|{{sub|$2|{{length|$1}}}}| }}$1}}/}}}}
{{set| sizeb |{{\{{if|{{<=|{{length|$1}}|$2}}|$1{{repeat|{{sub|$2|{{length|$1}}}}| }}}}/}}}}
{{set| size-B |{{\{{if|{{>=|$1|1024}}|{{^size-K|{{div|$1|1024}}}}|{{^sizeb|$1|4}}}}/}}}}
{{set| size-K |{{\{{if|{{>=|$1|1024}}|{{^size-M|{{div|$1|1024}}}}|{{^size|$1K|4}}}}/}}}}
{{set| size-M |{{\{{if|{{>=|$1|1024}}|{{^size-G|{{div|$1|1024}}}}|{{^size|$1M|4}}}}/}}}}
Example:
{{^size-B|%item-size-b%}}
Its another one to format it how I want. It will take the amount of bytes an object is and work out how many MB, KB, GB, etc it is and then format it in a specific way, so if the use of {{^size}} and {{^sizeb}} are confusing don't worry about them.
Note, these come from a template that im creating which uses <pre> tag's which is why all the formatting is important.