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
Related
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.
Is it possible to embed code to Trac wiki page straight from source code? I mean code blocks, not links pointing to the source. Like
MyCode.java contents
Look at IncludeMacro which is also able to embed from source repository (keyword source:).
Furthermore you can copy source code to wiki and format it with syntax-highlighting, for example:
{{{
#!python
hello = lambda: "world"
}}}
Read more about it here.
You're using 'code blocks' in a way that makes me think of partial citation.
As falkb pointed out, IncludeMacro is the current best way of embedding Trac (and even external) content into a Trac resource, that is rendered with support for Trac's WikiFormatting. But sadly, there is NO such partial citation capability yet.
You may want to at least request it as enhancement for the aforementioned plugin, and could even push it closer to reality by providing valid use case example - or better: some real code to make it happen. Be prepared to test code, if a patch is proposed or - ideally - if the trunk (development) branch receives changes to make partial citation happen.
I work on unix.
I have my complete source code in unix in the form of building blocks and modules.
Like headers,sources files,make files etc.
I can copy all the files with the same directory structure to windows.
I need some tool which will convert all the source to html tags with all the links to functions,variables,classes,headers.There should be some tool to do this easily.
by this way it would be easy for debugging the code in a fast way.
Is anybody aware of such tool?
The term you're probably looking for is "documentation generator". You're specifically interested in ones that output HTML files.
Doxygen is popular, but if you want a master comparison list of documentation generators Wikipedia has a summary:
http://en.wikipedia.org/wiki/Comparison_of_documentation_generators
Looking at the output generated by the different programs (on projects that use them) will probably inform your choice of which meets your needs.
You can use doxygen to generate your documentation. In its basic form it will generate what you need but to add comments that appear in the final html you will need to use special style comments.
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.)
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.