![]() Activate MediaWiki IstantCommons feature to automatically fetch the Template image files from the repository.Copy the relevant CSS classes from the Wikipedia's Common.css file and paste them in your MediaWiki's Common.css.Export/Import the Wikipedia templates you want to use, together with all the required metatemplates, and import them in your MediaWiki.Export/Import the LUA modules used by the (meta)templates you want to use and import them in your MediaWiki.Install the Scribunto extension and properly configure it.Upgrade our MediaWiki to the latest stable version, hoping to match Wikipedia's one.To-do listĪfter the much needed introduction, it's time to make a quick list of what we're going to do in order to achieve our task: For now we're going to stick to our original topic, which is how to import Wikipedia templates into our own MediaWiki installation. This is the most advanced - and powerful - template usage, as it allows to use scripting languages (such as LUA) within MediaWiki, thus enabling an endless amount of features for any template.Īgain, if you want to know more about advanced templates, I suggest you to read the MediaWiki official documentation. A template can invoke extensions, including those enabling the usage of functions ( ParserFunctions) and/or modules ( Scribunto).A template can pass one or more variables to metatemplates, meaning that we can "expose" some of the Metatemplate variables through a front-end template, thus making it more versatile: we can also provide some default values for these variables if the user doesn't give them an explicit one.This behaviour is so much used on wikis such as Wikipedia that a lot of templates are in fact Metatemplates, which is a term used to refer to a back-end template used by other front-end templates only. A template can include other templates, meaning that we could create a Template:MySecond and add a reference to in its contents, just like we did with the MyFirstTest page.We won't dig too much into the most advanced concepts of templates: for the sake of simplicity, we'll just highlight the following core concepts we need to know before importing them: That's how template works. For further info regarding them, including how to properly use template variables, I strongly suggest you to read this MediaWiki official page. You should see something like the following: Right after that, take a look at the page you've just created. ![]() As a matter of fact, working with templates will save us a lot of work, because we'll be able to reuse indefinitely the most of what we did without having to reinvent the wheel everythime. A template is basically a standard piece of content that can be included on several pages, providing an easy interface to slightly change its text (or images, or behaviour) to match the page in which you're using it. As you might already know, this is a template, one of the greatest feature of MediaWiki. ![]() Yeah, we're talking about that fancy informative Message Box out there explaining that the article needs additional citations. Right after that, a great improvement you might want to accomplish could most likely be something like the following: If you didn't do that already, I strongly suggest to start with replacing the default MediaWiki editor with the WikiEditor: we already explained how to achieve that with this post. This article, as well as many others I'll be publishing during the next weeks, will teach you how to do that. ![]() In order to do that, you will have to install quite a number of additional stuff. Owning your very own MediaWiki is fun, but if you've choose MediaWiki over the other great alternatives out there - such as TikiWiki, for example - it means that you want it to look just as fine as Wikipedia - or any other professional-looking wiki - actually does. That's completely understandable since the default MediaWiki installation, with its starting set of starting extensions, modules and templates, isn't that fancy: you can do titles/headers, make your text bold and/or italic, create wikilinks and hyperlinks and that's about all. If you stumbled upon this post, chances are you just installed your very own MediaWiki and want to make it prettier. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |