Editing MediaWiki/Editing/Advanced

From Bibliotheca Anonoma

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.

Latest revision Your text
Line 1: Line 1:
Some advanced features are supported on this wiki.
Some advanced features are supported on this wiki.


== Cargo (Semantic Infoboxes) ==
== Creating Infoboxes ==


The infoboxes on the Bibliotheca Anonoma are augmented with Cargo, a Semantic Web extension (designed to replace Semantic MediaWiki). This gives the infobox elements the power to be indexed in a semantic metadata database. That way, queries and reports can be made to sort out the data for easier searching.
Infoboxes on the Bibliotheca Anonoma Wiki are created using [[mediawikiwiki:Extension:Capiunto|Capiunto]], a Lua module is relatively easier to install and create infoboxes with than the opaque and puzzling template language. It will take a bit of reading to understand how to make one, but it's worth it.
 
A full [[mediawikiwiki:Extension:Cargo/Other documentation|Cargo Cheatsheet can be found here.]]
 
=== Basic Components of a Cargo Subject ===
 
A single Cargo subject is made up of a three basic elements:
 
# '''Infobox''' - Defines an infobox that holds all the metadata on the right side of an article.
# '''Template''' - Defines the table schema.
# '''Table''' - Indexes the data for queries.
# '''Form''' - Helps users create a new page with fields for metadata.
# '''Page''' - Use the form to create a new page.
 
=== 1. Creating Infoboxes ===
 
Infoboxes are created using [[mediawikiwiki:Extension:Capiunto|Capiunto]], a Lua module is relatively easier to install and create infoboxes with than the opaque and puzzling template language. It will take a bit of reading to understand how to make one, but it's worth it.


[[mediawikiwiki:Extension:Capiunto/Infobox/Basic_usage|Basic Usage Guide for Capiunto]]
[[mediawikiwiki:Extension:Capiunto/Infobox/Basic_usage|Basic Usage Guide for Capiunto]]
Line 73: Line 57:
}}
}}
</nowiki>}}
</nowiki>}}
{{Note|When documenting the Lua module, you must use the provided subpage under /doc, unlike our documentation standard for templates. This is because the lua code does not provide any wikitext processing.}}
Now, you need to integrate the infobox into the Cargo template.
=== 2. Create a Cargo Template ===
The Cargo Template defines the table's schema: what kind of columns it has, and how it looks to the user.
Just go here to create a cargo template visually (it will use it's own infobox): [[Special:CreateTemplate]]
Make sure to add a category in the template's includeonly tags with the same name as the template. This will be crucial in allowing the "Edit with Form" tab to appear.
For good examples, check out the [http://wiki.travellerrpg.com/Special:CargoTables Traveller Wiki's Cargo Tables.]
Use the infobox you made in the previous step to show the data in this cargo template.
=== 3. Create a Cargo Table ===
{{Warning|Make sure the [[mw:Manual:Job_queue|job queue]] is flushed after you create (and each time you edit) a Cargo Template, otherwise '''Create Cargo Table''' won't appear, or an outdated table schema will be used. Contact the administrator for more details.}}
# Open the Cargo Template you need to create a template for.
# Click '''More''' at the top right next to the search bar.
# Click '''Create Cargo Table'''.
The cargo table must be recreated each time the schema is modified in the template. See the [[mw:Special:MyLanguage/Extension:Cargo/Storing_data#Creating_or_recreating_a_table|Cargo Documentation]] for further details.
=== 4. Create a Cargo Form ===
# Go to [[Special:CreateForm]].
# Choose the template to create the form for.
# Change or capitalize the titles of each column, and add {<code>cargo table=ThisTable|cargo field=this_cargo_field</code> to the end of each link.
#* If the fields are insufficient for your needs, you can check the [[mw:Extension:PageForms]] documentation on how to add more input types.
# Name the Form with the same base name as the Template. (e.g. for <code>Template:Book</code>, type in <code>Book</code>.)
# To get an [[mw:Extension:Page_Forms/The_"edit_with_form"_tab|Edit with Form tab]], set up a default form in your template's category page (e.g. for [[Template:Fangame]], [[:Category:Fangame]]) by adding this code to the top of it:
#* <code><nowiki><span style="display:none">{{#default_form:YourFormName}}</span></nowiki></code>
For good, detailed examples of Cargo Forms, check out the [http://absitomen.com/wiki/index.php?title=Form:Character&action=edit Absit Omen Lexicon Wiki].
=== 5. Create a Cargo Page ===
# Go to the page [[Form:Cargo Title]], replacing "Table Title" with the actual title of the cargo subject.
# Enter the title of the page you want to create.
# Fill out the form. In the "Free Text" box, you can create a normal wikipage.
{{Note|If you ever recreate the Cargo table and you have existing pages, the older pages will not appear until those pages get edited: this launches a process in the job queue.}}
== Creating Templates ==
{{Note|Template documentation is set up the same way as in the Arch Wiki: inside <code><nowiki><includeonly></includeonly></nowiki></code> tags. This is simpler, if less clean than the Wikipedia template documentation, which puts it in a subpage.}}
When creating a template meant for users to utilize, you should place a <code><nowiki>{{Template}}</nowiki></code> header into it.
This template should be added at the very beginning of all template pages between 'noinclude' tags:
<pre>
<noinclude>
{{Template}}
</noinclude>
</pre>
Documentation of the template, usage instructions, and output example should also be added between the 'noinclude' tags (as in this template).
The actual template code must be written between 'includeonly' tags:
<pre>
<includeonly>...</includeonly>
</pre>
Please note that all contributions to Bibliotheca Anonoma are considered to be released under the Creative Commons Attribution-ShareAlike (see Bibliotheca Anonoma:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!
Cancel Editing help (opens in new window)