Extension:Page Forms/Quick start guide/nl
U heeft dus alle software al klaargezet op uw website. Wat nu? Nu is het tijd om de structuren te creëren om uw gegevens vast te houden, weer te geven en het toevoegen en bewerken ervan mogelijk te maken; Gelukkig kan dit allemaal eenvoudig worden gedaan door verschillende wiki-pagina's te maken.
De eerste stap moet zijn om uw datastructuur te bepalen. Welk type pagina's zal de site hebben? Welke gegevens zullen er op elk van deze worden opgenomen? U kunt dit later veranderen, maar u moet een startplan hebben. Zodra u dat hebt (liefst in tekst), kunt u de nodige wikipagina's maken. U moet pagina's maken of wijzigen voor sjablonen en formulieren, waarschijnlijk ook categorieën, en (als u een emantische MediaWiki gebruikt) eigenschappen.
U kunt deze allemaal zelf helemaal maken, maar er zijn ook formulieren om te helpen bij het maken ervan. De juiste aanpak hangt af van welke andere extensies u gebruikt:
Met Cargo
De gemakkelijke manier - Special:CreateClass
De pagina Special:CreateClass, gedefinieerd door Page Forms, biedt een enkel hulpformulier om alles over een gegevensklasse op één plek te definiëren. Als u de velden invult en verzend, zal de pagina automatisch het nodige sjabloon, het formulier en de categoriepagina's maken. Dan kun u naar de formulierpagina gaan die is gemaakt en gegevens invoeren.
Als niet alle pagina's worden gecreëerd, kan het zijn dat uw job wachtrij niet genoeg geheugen heeft. Zie het item met betrekking tot de job wachtrij hier voor het toevoegen van meer geheugen.
De bredere manier
U dient de volgende stappen te nemen:
- Create templates. Een sjabloon stelt de weergave van de gegevens op een pagina in, houdt de markering vast om de gegevens in Cargo-tabelen te bewaren en definieert de pagina (vaak) als van een bepaalde categorie en dus van een bepaald pagina-type. Er zal over het algemeen één sjabloon per pagina-type zijn, hoewel een enkele pagina-type soms meer dan één sjabloon bevat. Een sjabloon kan ook worden gebruikt voor samenvoeging door een lijst te geven van alle andere pagina's die een bepaalde relatie hebben met deze pagina. Maak een sjabloon aan door naar de pagina Special:CreateTemplate te gaan.
- Create forms. Nu kunt u formulieren maken waarmee gebruikers pagina's van verschillende types gemakkelijk kunnen toevoegen en bewerken. Er moet één formulier per pagina-type zijn; het formulier zal het sjabloon of de sjablonen die dit pagina-type bevat, vullen. Zoals voorheen is er een speciale pagina om nieuwe formulieren te maken: Special:CreateForm.
- Create categories. Een sjabloon in elk formulier moet elk artikel dat het formulier maakt als onderdeel van een bepaalde categorie markeren met een tag. U moet een pagina maken voor elke categorie en een standaardformulier voor het maken, zodat elk artikel automatisch kan worden bewerkt met hetzelfde formulier waarmee het is gemaakt. De eenvoudigste manier om dat te doen is door de pagina Special:CreateCategory te gebruiken.
- Enable links to forms. Naast het maken van categorieën met een standaardformulier, zijn er andere stappen die u moet nemen om gebruikers toegang te geven tot de formulieren die u heeft gemaakt. Dit omvat het toevoegen van links om gegevens toe te voegen in de zijbalk en elders, en het gebruik van #formredlink om rode links naar niet-bestaande pagina's te laten verwijzen naar een formulier om ze te maken. Deze acties worden allemaal uitgelegd in het gedeelte "Naar formulieren linken".
- Add links on sidebar and elsewhere. U kunt de zijbalk bewerken (die voor wiki's in het Engels kan worden bewerkt op de pagina "MediaWiki:Sidebar") om links te bevatten om elk van de gegevenstypen toe te voegen. U kunt ook een link toevoegen naar de pagina Special:Drilldown, een Cargo-gedefinieerde pagina die een gemakkelijke manier biedt om alle gegevens van de wiki in een oogopslag te bekijken. U kunt deze links ook op de hoofdpagina en elders opnemen.
- Add data. Nu kunt u gegevens gaan invoeren! Ga naar de formulierpagina('s) en begin pagina's te maken.
- Customize. Zodra de structuur is ingesteld, kunt u alles aanpassen wat u wilt - het veranderen van de look-and-feel van de hele wiki, van de verschillende sjablonen en van de formulieren, het toevoegen en het veranderen van velden en het toevoegen en het veranderen van queries.
Met Semantische MediaWiki
De gemakkelijke manier - Special:CreateClass
De pagina Special:CreateClass, gedefinieerd door Page Forms, biedt een enkel hulpformulier om alles over een gegevensklasse op één plek te definiëren. Als u de velden invult en verzend, worden automatisch alle benodigde eigenschappen, sjablonen, formulieren en categoriepagina's gecreëerd. Dan kun u naar de formulierpagina gaan die is gemaakt en gegevens invoeren.
Als niet alle pagina's worden gecreëerd, kan het zijn dat uw job wachtrij niet genoeg geheugen heeft. Zie het item met betrekking tot de job wachtrij hier voor het toevoegen van meer geheugen.
De bredere manier
U dient de volgende stappen te nemen:
- Create properties. The basic building blocks of any semantic site are the connections between data, which in Semantic MediaWiki are known as properties.
A property is used to specify a single piece of information about the topic of this page. Every property should be defined on your wiki, with a page in the "Property:" namespace. Create each property by going to the Special:CreateProperty page.
- Create templates. A template sets the display of the data on a page, holds the markup to turn the data into actual semantic information, and (often) defines the page as being of a certain category, and thus of a certain page type.
There will generally be one template per page type, although sometimes a single page type will contain more than one template. A template can also be used for aggregation, by displaying a list of all other pages that have a certain relationship to this page (see the inline queries documentation for much more information on this). Create the template(s) by going to the Special:CreateTemplate page.
- 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.
Voorbeeld
Let's go through a specific example of setting up a Page Forms-based wiki from scratch, in the "more comprehensive way". 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, with some parts different for Cargo vs. SMW.
1. Bepaal de gegevensstructuur 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.
2. Eigenschappen aanmaken.
Met Cargo | Met SMW |
---|---|
Er is in Cargo geen vergelijkbare stap. | 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:
For author pages, you only need to create one more property:
|
3. Sjablonen aanmaken.
You need to create two templates, one for books and one for authors, both at the "Create a template" page at Special:CreateTemplate
.
First, books:
Met Cargo | Met SMW |
---|---|
At Special:CreateTemplate, set the template name to be "Book", and set the category name to be "Books".
You add to it four fields, and for each field you specify at least three values: its field name in the template source code, its display label on each page, and its type. There are a few other values you can set, but they will not be necessary for most of these fields.
* Fiction ** Science fiction *** Cyberpunk ** Historical fiction
|
At Special:CreateTemplate, set the template name to be "Book", and set the category name to be "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.
|
Next, create the template for Authors - using the "Create a template" page, you create a template called "Author", and set it to define the category "Authors".
With Cargo | With SMW |
---|---|
|
|
4. 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.
5. 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".
6. Enable links to forms.
With Cargo | With SMW |
---|---|
In the text for the Book template (at Template:Book ) find the portion of the display containing the tag:
{{{Authors|}}} Replace this with something like: {{#arraymap:{{{Authors|}}}|,|x|{{#formredlink:target=x|form=Author}} }} |
The text for the Book template (at Template:Book ) most likely has a portion that looks like
{{#arraymap:{{{Authors|}}}|,|x|[[Was written by::x]]}} Replace this with something like {{#arraymap:{{{Authors|}}}|,|x|{{#formredlink:target=x|form=Author}}{{#set:Was written by=x}}}} |
This will make links to author pages that don't exist yet point to the form for creating those pages.
7. 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.
8. 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.
You could also link to Special:Drilldown (if you have Cargo installed), or Special:BrowseData (if you have the Semantic Drilldown extension installed), to let users view all the data at a glance.
Pagina-schema's gebruiken
The Page Schemas extension is specifically intended for the automated creation of data structures, including forms. Its big advantage over the standard PF helper forms is that it can be used to create and modify these data structure pages many times, not just create them one time. It can be used with either Cargo or Semantic MediaWiki installed, or with neither one installed. If Cargo and/or SMW are installed, the Page Schemas form will include many additional form fields in order to create the additional tags needed. 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. Zie de documentatie van Page Schemas voor meer informatie.
Korte referentiehandleiding
Er zijn twee beknopte handleidingen, of "spiekbriefjes", die nuttige informatie bevatten over paginaformulieren (hoewel ze er in beide gevallen nog steeds naar verwijzen als "semantische formulieren"), naast andere extensies:
- De beknopte referentie handleiding voor Cargo - in PNG en PDF formaten
- De Semantische MediaWiki beknopte handleiding, in PNG (afbeelding), PDF- en SVG-formaten