Where can I get templates for MediaWiki? - templates

I have noticed that a lot of mediawiki-based websites use such templates as Robelbox, Ambox etc. Where can I get them and how should they be installed?

It's a PITA and unfortunately (unlike extensions or media files) there is no repository of canned templates. Templates load other templates which load others in turn, etc.
Go to Wikipedia and copy the name of the template you're after, go to Special:Export and paste the name of the template in the big text box, e.g. Template:Infobox. Check "Include templates" and check "Include only the current revision, not the full history", (or the file will be too big). Click Export to dump a .xml file of the template. Then import this into the destination wiki.
After it has been imported open the template for editing, check the list below the edit box "Pages transcluded onto the current version of this page:". If there are any red links repeat the above steps for these templates as well. You might also need to copy styles in MediaWiki:Common.css page and Javascript in MediaWiki:Common.js before everything works. Finally edit the templates to customize for your wiki.
If it still doesn't work and you have messy pages of braces and if statements, then you need to install the ParserFunctions extension. If there is {{#invoke: }} in template code you'll also need to install the Scribunto extension.
MediaWiki Help:Templates explains the process in more detail.

You can directly copy templates from Wikipedia. A nice example is the Keypress template.

This task is a bit more involved than just exporting and importing.
A "simple" overview can be found here -> How to add Wikipedia templates to your own Mediawiki
Upgrade our MediaWiki to the latest stable version, hoping to match Wikipedia’s one.
Install the Scribunto extension and properly configure it.
Export/Import the LUA modules used by the (meta)templates you want to use and import them in your MediaWiki.
Export/Import the Wikipedia templates you want to use, together with all the required metatemplates, and import them in your
MediaWiki.
Copy the relevant CSS classes from the Wikipedia’s Common.css file and paste them in your MediaWiki’s Common.css.
Activate MediaWiki IstantCommons feature to automatically fetch the Template image files from the commons.wikipedia.com repository.

Related

jsdoc include/add additional static files/pages like html/markdown

I know there is way to copy static files via jsdoc, for images as example.
Is there a way to "extend" the generated template via markdown or html files that integrate into the "look & feel" of the used theme?
I know you can include one markdown file as "landing page", but i wonder if its possible to add more pages/files.
Why im asking this?
Because i want to generate the documentation out of my source code and add then some additional pages which describe the workflow of my application or the behavior of some components.
Doing this in a single markdown document & that as "landing page" seems not a good solution.
I cant imagine that there exist not a "read to use" solution.
I just want a nice & complete documentation of my application which includes stuff from the source code and additional pages.
Any hint is welcome.
Thanks in Advance.

Implementing my own GNU stricmp, wcsicmp etc for wchar* stuff

Ok. I need to implement methods like these. Is there a way to view the source code online for methods like these, so I can just add them into my own .h and .cpp files? will this work and where can I see the source.
These functions are part of glibc,
you can find it here http://www.gnu.org/s/libc/ .
You can download release version via ftp or get current version
via git (you can find links on html url above), as I know there is no access to code via web to separate files,
but may be, may be codesearch http://www.google.com/codesearch, can show them, but I never try.

how to keep common elements of site consistent - basic web development question

If I'm creating a simple static site with a handful of pages, how do I deal with keeping the basic skeleton of the site (e.g. navigation bar, header, footer, sidebar) consistent?
I love the dreamweaver template function in which you create a template file that contains all the elements of your site that are common among all of your pages and it automatically updates on all pages when you edit it. Apparently, there is nothing like this in Aptana which is the IDE I'm currently using.
Is there something like this in any other web development IDE?
The closest equivalent Aptana and Textmate have is "persistent includes" under the Commands > HTML > Includes menu. That allows you to reference another file using a special HTML comment, and then when you want to insert that referenced file's content, you'd run the Update Document command in that sub-menu, which would pull in the file contents and replace the special comment with it.
Obviously this isn't particularly dynamic, and you'd want to run Update document on all the files right before deploying the project. You could likely grab the command's source and turn it into a shell script that you run as part of your deployment.

Viewing source output of a MediaWiki template

Is there a way to get the mediawiki code that is generated by a template? I want to go on to Wikipedia, use a citation template, and copy the generated wiki code to my wiki that doesn't have those citation templates.
There is indeed a way -- http://en.wikipedia.org/wiki/Special:ExpandTemplates
Note that this is provided by an extension, so if you want this ability on your own MediaWiki installation you may need to install it: http://www.mediawiki.org/wiki/Extension:ExpandTemplates

How to make templates after installing MediaWiki?

I had just installed MediaWiki. What must I do to have wikipedia style templates like this: http://i.piccy.info/i4/4b/37/fe303fda0c813c0bda717d3a1e3b.png (example).
I have already installed ParserFunctions Extension on my MediaWiki CMS. I have tried to look source & copy it, but it didn't work. Thanks.
**sorry for my English (it isn't my native language)*
When you copied the source for that infobox, what you were missing was the template that the {{infobox}} tag uses, which you can find at the Wikipedia page for the Infobox template. (That page will show you the documentation on the template; View Source for the code you'll need to copy.)
If you want to use Wikipedia's templates, you'll need to copy them. (Observing, of course, Wikipedia's licensing terms.)