I am a postgraduate student in experimental physics, and my university offers a wiki service as a lab book for different groups. Unfortunately, they only offer the basic functionalities, like links and categories, and they have not implemented the full plethora of templates of Wikipedia.
When I contacted them directly they confirmed:
We only install a limited set of extensions to the Managed Wiki Service, due to the maintenance and security difficulties that can be created when doing upgrades.
So I am wondering: can I not just copy some of the template definitions that are used on Wikipedia?
For example our Managed Wiki has the templates {{CURRENTYEAR}}
, {{CURRENTMONTH}}
and {{CURRENTDAY}}
, but not {{DATE}}
or {{DAY-1}}
(for yesterday's date).
Since we are using this as a lab book, we have a page for each day. We can link to today's page with the first three templates, but not to yesterday's page because of the lack of {{DAY-1}}
— we have to type yesterday's date by hand.
But surely Wikipedia must have these templates defined somewhere? Can I not copy and paste that definition and make my own templates in our managed wiki?
So, I found the solution:
On any template page on Wikipedia (e.g. = enter link description here), one needs to go to the top right View source , and copy that code into the Managed Wiki.
So it is not Edit page as suggested by other answers, as this only provides code understandable within Wikipedia.
For View source, however, copy and paste works fine on other MediaWiki-based systems.
My ManagedWiki then just has to enable extensions (like ParserFunctions
) is order to understand code like #if
or #switch
.