Extension:Page Forms/Quick start guide/de

So, Du hast die ganze Software auf Deiner Site installiert. Was nun? Nun ist es an der Zeit, die Strukturen aufzubauen, die Deine Daten beinhalten und anzeigen und es ermöglichen sollen, Deine Daten hinzuzufügen; dankenswerter Weise kann all das erledigt werden, indem Du ein paar Wiki-Seiten anlegst.

Der erste Schritt sollte sein, Deine Datenstruktur festzulegen. Welchen Seitentypen soll Deine Seite haben? Welche Daten werden sie jeweils enthalten? Du kannst alles später wieder ändern, aber Du solltest zu Anfang einen Plan haben. Nachdem Du das erledigt hast (idealerweise hast Du es aufgeschrieben), kannst Du als nächstes die notwendigen Wikiseiten anlegen. Du wirst Seiten für Vorlagen und Formulare und vielleicht auch für Kategorien, und (wenn Du Semantic MediaWiki verwendest) Attribute anlegen oder verändern

Du kannst all das von Grund auf anlegen, obwohl es Unterstützungsformulare existieren, die dabei helfen, sie anzulegen. Der richtige Ansatz hängt davon ab, welche anderen Erweiterungen Du verwendest:

Der einfache Weg - Spezial:Klasse erstellen
Die Seite Spezial:Klasse erstellen, definiert von Semantic Forms, bietet ein einzelnes Unterstützungsformular an, um alles zu einer Daten-„Klasse“ an einem Ort zu definieren. Wenn Du die Felder ausfüllst und auf „Absenden“ klickst, wird die Seite alle notwendigen Attribute, Vorlagen, Formulare und Kategorie-Seiten automatisch anlegen. Dann kannst zu der Formularseite gehen, die angelegt wurde, und damit beginnen, Daten einzugeben.

Wenn nicht alle Seiten angelegt worden zu sein scheinen, könnte es sein, dass Deine Job Queue nicht genug Speicher hat. Lies den Job-Queue-Eintrag, um zu erfahren, wie Du mehr Speicher hinzufügst.

Der etwas umfassendere Ansatz
Du solltest folgende Schritte unternehmen:


 * Attribute anlegen. Die Grundbausteine jeder semantischen Site sind die Verbindungen zwischen den Daten, die im Semantic MediaWiki Attribute genannt werden. Ein Attribut wird verwendet, um ein einzelnes Stück Information zu diesem Thema auf dieser Seite anzugeben. Jedes Attribut sollte in Deinem Wiki mit einer Seite im Namensraum „Attribut:“ festgelegt werden. Lege jedes Attribut auf der Seite Spezial:Attribut erstellen an.


 * Vorlagen anlegen. Eine Vorlage legt die Anzeige von Daten auf einer Seite fest, enthält das Markup, um die Daten in echte semantische Informationen zu ändern und definiert (oft) die Seite als einer bestimmten Kategorie, dass heißt eines bestimmten Seitentyps zugehörig. Es wird im Allgemeinen eine Vorlage pro Seitentyp geben, obgleich manchmal eine einzelner Seitentyp mehr als eine Vorlage enthält. Eine Vorlage kann auch für Zusammenfassungen verwendet werden, indem eine Liste aller anderen Seiten angezeigt wird, die eine bestimmte Beziehung zu diese Seite haben (lies die Inline Queries-Dokumentation für mehr Informationen hierzu). Lege die Vorlage(n) auf der Seite Spezial:Vorlage erstellen an.


 * Create forms. Now you can create forms to allow users to easily add and edit pages of various types. There should be one form per page type; the form will populate the template or templates that this page type contains. As before, there's a special page to create new forms: Special:CreateForm.


 * Create categories. One template in each form should tag each article that the form creates as being part of a certain category. You should create a page for each such category, and specify a default form for it so that every article is automatically editable with the same form that created it. The easiest way to do that is by using the Special:CreateCategory page.


 * Enable links to forms. Besides creating categories that have a default form, there are other steps you should take to enable users to access the forms that you have created. These include adding links to add data in the sidebar and elsewhere, and using #formredlink in order to have red-links to nonexistent pages point to a form for creating them. These actions are all explained in the section "Linking to forms".


 * Add links on sidebar and elsewhere. The sidebar (which, for English-language wikis, can be edited at the page "MediaWiki:Sidebar") should hold links to add each of the data types, and to the categories for each of these data types as well. You can also include such links on the main page and elsewhere.


 * Add data. Now you can start entering data! Just go to the form page(s), and start creating pages.


 * Customize. Once the structure is in place, you can customize all you want - changing the look-and-feel of the entire wiki, of the various templates, and of the forms, adding and changing fields and adding and changing inline queries for queries.

Example
Let's go through a specific example of setting up a Semantic Forms-based wiki from scratch. Let's say that you want to create a wiki that shows all the books you have at home. We'll then go through the previous steps specified.

Figure out the data structure. You want two kinds of pages on your wiki: one for books, and one for authors. Each book page should hold a title, an author name (or names), a genre (or genres), a year of publication, and a number of pages. Each author page should hold the author name, their country of origin, and a list of all the books they have written that you own.

Create properties. For books, there is no need to create a property for the title, since the title of each page representing a book will be the title of that book. That leaves four fields:
 * Author(s) - using the "Create a property" page, you create a property called "Was written by", of type "Page" (since each author will have his/her own page).
 * Genre - you create a property called "Has genre", of type "Text", and give it allowed values such as: "Art, Cookbook, Fiction, History, Poetry, Science".
 * Year of publication - you create a property called "Was published in year", of type "Number".
 * Number of pages - you create a property called "Has number of pages", of type "Number".

For author pages, you only need to create one more property:


 * Country of origin - you create a property called "Is from country", of type "Text".

Create templates. You need to create two templates, one for books and one for authors:
 * Books - using the "Create a template" page (at Special:CreateTemplate), you create a template called "Book", and set it to define the category "Books". You add to it four fields, and for each field you specify three values: its field name in the template source code, its display label on each page, and the semantic property it populates.
 * For the first field, you set the field name to be "Authors", the label to be "Author(s)" and the semantic property to be "Was written by", and check the box indicating that this field can hold a list of values (since a book can have more than one author);
 * Click the Add field button and then for the second field, you set the three values to be "Genres", "Genre(s)" and "Has genre", and also check the box for a list of values;
 * Click the Add field button and then for the third, you set the values to be "Year", "Year of publication" and "Was published in year";
 * Click the Add field button and then and for the fourth field, you set them to be "Number of pages", "Number of pages" and "Has number of pages".
 * Click the Save page button.
 * Authors - using the "Create a template" page, you create a template called "Author", and set it to define the category "Authors".
 * You add to it just one field for which you set the three values to be "Country", "Country of origin" and "Is from country".
 * For this template, you also fill out the "Aggregation" fields in the form, since you want each author page to list all the books the author has written. Under "Semantic property", you select "Was written by", and for "Title for list" you put "Books by this author".
 * Click the Save page button.

Create forms. You need to create two forms, one for books and one for authors:
 * Books - using the "Create a form" page (at Special:CreateForm), you make a form called "Book", select the template "Book" and click the Add button. You could also optionally add a section for the plot of the book - to do that, add a section (not a template) called "Plot". You do not do any further customizations on this form, but just save the form once you have created it.
 * Authors - using the "Create a form" page, you make a form called "Author", and add to it the template "Author". As before, you do not do any further customizations - you just save the page.

Create categories. You need to create two categories, one for books and one for authors; you have already specified these categories' names before:
 * Books - using the "Create a category" page (at Special:CreateCategory), you make a category called "Books", and give it the default form "Book".
 * Authors - using the "Create a category" page, you make a category called "Authors", and give it the default form "Author".

Enable links to forms. The template text most likely has a portion that looks like " ". Replace this with something like " ". This will make links to author pages that don't exist yet point to the form for creating those pages.

Add data. Using the new "Book" form (at Form:Book), you create pages for some books; you check to make sure that both the form and the resulting pages look alright. Each book page will now have a red link to its author, that should point to the "Author" form for adding that author (you may need to refresh the page for the right link to show up). You can then add a few authors, either through these links or from the form page directly, to make sure that this setup works correctly too. Each created author's page should show a list of the books you've saved that have that person as the author.

Add links on sidebar and elsewhere. Your structures are now all set up, and you can add links to the sidebar for easy adding and viewing, by modifying the page 'MediaWiki:Sidebar' (or its equivalent if you're using a language other than English). You can add links to the "Book" and "Author" forms to make it easy to add new ones, and links to the "Books" and "Authors" categories to be able to see the full list of either one at a glance.

Semantic MediaWiki and Page Schemas
The Page Schemas extension is specifically intended for the automated creation of data structures. Its big advantage over the standard SF helper forms is that it can recreate these data structure pages, not just create them from scratch.

To create a page schema, you need to go to the category page (whether or not it has been created yet), go to the tab action for creating that page's schema, fill out the form, then go the tab action for generating pages based on that schema. See the Page Schemas documentation for more information.

Cargo
If you are using the Cargo extension instead of Semantic MediaWiki, the data structure is simpler: there are categories, templates and forms, but no property pages. Just as with Semantic MediaWiki, you can use Special:CreateCategory, Special:CreateForm, Special:CreateTemplate and Special:CreateClass to create some or all parts of the data structure. SF 3.2 and Cargo 0.6 are required for these pages to fully work.

Cargo and Page Schemas
You can use Page Schemas to create (and re-create) templates, forms and categories that make use of Cargo. SF 3.2, Cargo 0.6 and Page Schemas 0.4.5 are required for this to work.

Quick reference guides
There are two quick reference guides, or "cheat sheets", suitable for printing, that contain helpful information about Semantic Forms, among other extensions:
 * The Semantic MediaWiki quick reference guide - can be found here, in PNG (image), PDF and SVG formats
 * The Cargo quick reference guide - in PNG and PDF formats