Depuis Data Crow 3, il est possible de créer ses propres modules. J'ai reçu de nombreuses demandes d'ajout de modules supplémentaires, comme un module sur les pièces de monnaie et sur le vin. En utilisant l'assistant de création de modules, vous pouvez maintenant facilement créer les modules qui vous manquent dans l'installation standard de Data Crow. De plus, vous pouvez modifier les modules existants en ajoutant de nouveaux champs par exemple.
L'assistant de création de module vous permet de créer rapidement un nouveau module. Ce manuel a été conçu pour vous permettre de créer le module dont vous avez besoin.
Conseils généraux #
- Always create a module in a clean installation of Data Crow. Just install a version of Data Crow to a different location than your production version. In this new and empty version you can experiment without having to worry about messing up your current installation. Data Crow asks for the user folder when it starts: choose a new folder for testing (you can also start Data Crow with the userdir parameter).
- Make a backup before you change or delete modules.
- You can share a module with someone else, or copy a module you have created in your test installation to the production version. Use [Modules > Export Module Wizard] to export your module and [Modules > Import Module Wizard] to import it into any other Data Crow installation.
- Describe on a piece of paper the fields you will need. Also define whether you need lists of options a user can select from. You can create managed lists within your module: you can define a field called “genres” and manage its content (the genres) from within Data Crow.
- A list is a module of its own. You can create it first, or let Data Crow create it for you while you define the field (see defining a field). Most lists are simple property modules for items such as categories and genres.
- In the field settings step of the wizard you decide which fields make up the name of an item (Descriptif). This name is used to display your items in the views, the grouping pane and the reference fields.
Modules and the server #
When you are connected to a server, administrators can use the module wizards in the full client too: Create, Copy, Alter and Relate Module Wizard, and the Export and Import Module Wizard. The Assistant de suppression d'un module personnalisé is only available when you use Data Crow stand-alone.
With Add & New you can define several modules before anything is sent to the server, and the next module can refer to them (for example a property module and the main module which uses it). With Send to Server all modules are created in one go: either all modules are created or none. The server checks the changes, makes a snapshot of the data first (it is kept in the backups of the server) and goes back to the previous situation when something goes wrong. A progress bar is shown meanwhile. The server cannot be used by others while it makes the change. The web client shows the changes right away. The full client needs to be restarted.
When you export a module, the server creates the module file and sends it to you. When you import a module, the file is sent to the server, which imports it; after that all users have to log in again.
Modules can be created in the web client as well, see Modèles de modules (client web).
Types de modules #
L'une des premières choses que vous devez savoir est ce qu'est chaque type de module et à quoi il peut servir. Il existe trois types de modules : les modules de propriété, les modules médias et les modules "autres".
Le type de module détermine les modalités d'accès au module et les champs prédéfinis du module. Les champs prédéfinis (tels que l'ID) ne peuvent pas être supprimés du module (bien qu'ils puissent être masqués à l'aide de l'éditeur normal de paramètres de champ).
Type de module de propriété #
Un module de propriété est le type de module le plus simple. Les genres de films et de musique, la catégorie de logiciels, les supports de stockage et les plates-formes sont des exemples de modules de propriété. Il est important de noter qu'un module de propriété ne peut pas avoir de champ de référence ni de champ d'image.
A property module will never show up in the module bar. In fact it will not show up anywhere until used within another module. Its existence depends on other modules. This will be discussed later on in this document when we get to the field creation. When a property module has been used within another module you can manage its items via the [Maintain] menu. Note that this is the [Maintain] menu of the module using this property module.

Parmi les autres champs liés au système, les champs suivants seront toujours présents pour les modules de propriété :

- Nom (nom de l'objet)
- Icône (icône représentant l'élément)
- Noms alternatifs (pour les synonymes des mêmes articles)
Type de module média #
Ce type de module est un module entièrement fonctionnel. Après sa création, il apparaît dans la barre des modules, d'où il peut être ouvert et utilisé.
Les éléments créés dans ce module peuvent également être gérés à l'aide du module médias. Le module médias permet d'afficher tous les éléments des modules de type "Module médias" dans une vue d'ensemble.

Parmi les autres champs liés au système, les champs suivants seront toujours présents pour les modules médias :
- Titre (titre de l'article)
- Description (description de l'article, texte long)
- Pays (Pays où l'article a été publié)
- Langues
- Emplacement (description libre de l'emplacement de l'article)
- Classement (sur la base de 10 étoiles)
- Année (année de publication de l'article)
Personne Type de module #
Le type de module "personne" comporte tous les champs nécessaires à l'enregistrement des informations relatives à une personne. De même qu'un module de propriété n'apparaîtra jamais dans la liste des modules, un module de personne n'apparaîtra pas non plus. Les modules de personnes doivent être utilisés par d'autres modules pour apparaître en tant que sous-modules (voir le chapitre sur la création de champs).

Parmi les autres champs liés au système, les champs suivants seront toujours présents pour les modules de personnes :
- Nom (nom complet de la personne)
- Prénom
- Nom de famille
- Page web
- Description
- Photo
- Tags (enregistrement des mots-clés)
Autre" Type de module #
L'autre type de module est presque identique au type de module média. La seule différence est qu'il comporte moins de champs prédéfinis (tels que l'évaluation, le titre) et que ses éléments ne peuvent pas être gérés à l'aide du module médias.
Seuls les champs liés au système sont ajoutés pour les modules de ce type.
Création d'un nouveau module #
There are two ways to create a new module. One way is to manually create an XML file which describes the module and its fields. The second and easiest way is to use the module creation wizard. This document describes the creation process using the wizard.

Start the wizard: [Modules > Create Module Wizard]. The top of the window shows which step you are on. Steps which do not apply to your module are skipped.
Step 1: the module type #

Select the type of the module (see the module types above): Media Module (with predefined fields such as rating, name and description), Other Module (no predefined fields), Property Module (category, genre and so on) or Person Module. The type cannot be changed later.
Step 2: the basic information #

Enter the description, the name of the module (it must be unique), the name of one item and the name of several items, and select the icon: click on the icon to choose another one.
Step 3: the options #

This step is skipped for property and person modules. Select the options of the module:
- Les éléments peuvent être affectés à un conteneur: adds a container field to the module. See Conteneurs.
- Les éléments représentent des fichiers réels: adds extra file fields to the module.
- Items can be lent to other people: switches on lending, so the loan features are available for the module.
- Items can refer to other items of this module (such as editions): items of the module can be linked to each other. Enter the name of such an item (such as Edition, Copy or Version) and the name of several of them, see Éditions.
The options can be changed later with the Alter Module Wizard. When you switch the last option off, Data Crow asks for confirmation: the links between the items are removed and the items themselves are kept as main items.
Step 4: the fields #

Here you define the fields of the module. For a Media Module the predefined fields are shown first: they are there already. Below them are your own fields, with their name and field type. Press the plus icon to add a field. Use the icons in the list to edit or remove a field (they are only shown for fields which can be changed or removed), and the arrows to change the order.
Defining a field

The field dialog asks for:
- Nom: the label of the field. Two fields cannot have the same name.
- Type de champ: what kind of value the field holds and how it is shown. The types are grouped, and a line below the selected type explains it.
- Which list?: only for the two list types. A list is another module, such as Genre or Country. Is your list not shown?
Presse New list… and enter its name, the name of an item, the name of several items and an icon. The list is created together with the module.
- Maximum text length: only for short text.
The field types are:
- Short text: a line of text, up to the maximum length.
- Long text: text of any length, over several lines.
- Web address: a web address which can be opened from the item.
- File (path): the path of a file on this computer or on the server.
- File (opens when clicked): the path of a file which is opened when you click it.
- Number: a whole number.
- Decimal number: a number with decimals, such as a price.
- Rating (stars): a rating which is shown as stars.
- Date: a date.
- Yes / no: yes or no, as a check box.
- Choose from a list (one value): one value chosen from a list, such as the genre. The list is another module.

- Choose from a list (several values): one or more values chosen from a list, such as the countries. The list is another module.

The standard fields of a new module, such as Title, Description, Year, Languages, Rating and Countries of a media module, are translated in all languages right away.
Step 5: the field settings #

The settings of the fields are set here, for all fields at once:
- Activé: the field is used. Disabled fields are hidden entirely within the application, regardless of user privileges.
- Required: the item cannot be saved while the field is empty.
- Descriptive ?: the value is shown in the title of the item. With several fields the values are shown one after the other.
- Clé: two items cannot have the same value. With several fields the combination counts.
Required and Key are not possible for fields which are not stored with the item itself (such as a list with several values and calculated fields). At least one enabled field has to be marked as Descriptive, otherwise the items have no name and you cannot continue. You can change these settings later in the paramètres généraux du champ.
Step 6: the item form #

Set the order of the fields on the item form, per tab. The fields are shown on the tab in this order. You can create tabs, change and remove them, and move fields to another tab, in the same way as in the paramètres du formulaire d'élément. This step is only available in the full client.
Finishing #
Presse Finition to create the module (when you are connected to a server the button is called Send to Server). With Add & New the module is kept and the wizard starts again for the next module, which can refer to it. When the wizard has made a change, Data Crow has to be closed; a message tells you so. Closing the wizard while modules are waiting to be created asks whether to discard them.
Création d'un module de référence #
Le référencement d'un module à partir d'un autre se fait par la création d'un champ. La création d'une référence a une incidence sur la manière dont les modules sont affichés dans Data Crow ;
- Property module; not shown until referenced. Shown in the [Maintain] menu after it has been referenced. One property module can be referenced by multiple modules.
- Module de la personne ; il n'apparaît que dans les références. Un module de personne peut être référencé par plusieurs modules.
- Media and Other module; shown in the module list as a main module (just like the Movie, Book and Software module). The selected module can be removed from the main module list after which it will be shown in the drop-down as a sub module (for example the Developers module is only shown as a sub-module of the Software module);

Module de référence #
Comme indiqué ci-dessus, vous avez la possibilité d'utiliser des informations provenant d'autres modules dans votre propre module. Il est très courant dans Data Crow d'utiliser d'autres modules pour permettre la modification du contenu des listes. Décider de faire référence à un autre module changera également la façon dont ce module est affiché.

How do you create a reference to another module? Simply by creating a reference field (“Reference Field, Single-Select” or “Reference Field, Multi-Select”) to another module. The screenshot below depicts adding a Categories field to the software module. As a field type the “Choose from a list (several values)” has been selected. The module Categories is used to fill the content of the Categories field.
Référencement d'un module de propriété #
The property module type has been described earlier. One of the most important things to know is that this module will only be displayed once it has been referenced by another module. After you have created a reference to a property module it will become available from the [Maintain] menu. A menu option named after the items of the module (such as [Languages]) will be shown there. Using this option you can manage the items for this property module and thus also the available content of the reference field.
In the example below a references field was created to the Language module for the Software module. The languages can now be maintained through the [Maintain] menu of the Software module.

Référence à tout autre type de module #
La création d'une référence à tout autre type de module fonctionne exactement de la même manière que pour les modules de propriété. Cependant, le résultat est légèrement différent. Lors de la création du champ de référence, il vous sera demandé si le module référencé sélectionné doit toujours être affiché dans la barre des modules. Si c'est le cas, rien ne changera. Cependant, si vous choisissez de ne plus afficher le module sélectionné dans la barre des modules, le module référencé sera affiché dans la liste des modules, sous votre module (principal). Un exemple est donné ci-dessous.
The software module has two reference fields, one to the developer module and one to the publisher module. These modules are shown by hovering over the software module.

La sélection de l'un ou l'autre de ces sous-modules vous permet d'administrer les éléments qu'il contient.
Modules en relation #

It is possible to create a parent child relation between two modules. A parent child relationship is something different from creating a reference between two modules. When a module becomes a child module its items can only exist when they have a relationship with a parent item. An example of this is the Music Track module, which has a parent child relationship with the Music Album module: music tracks cannot exist without a music album. In case of a reference between two modules this is not the case: an actor can exist even when it is not referenced by a movie.
Start the wizard: [Modules > Relate Module Wizard]. Select the parent module (the one which will contain the items of the other module) and then the child module. The modules are selected in a tree with a filter; double click to continue. Data Crow asks for confirmation: the modules are changed right away and this cannot be undone afterwards, except by restoring a backup.
After the relationship has been created the items of the child module can only be managed via the parent module. The item form of the parent module has a separate tab where the child items are shown.

This tab also allows you to create, update and remove child items. In case you want to manage the child items using a view the table view is your only choice. The music album module is a good example where you can see this in action.

Copie de modules #

Instead of creating a module from scratch you can also base a new module on an existing module. Start [Modules > Copy Module Wizard]. In the first step you select the module you want to use as a template (a tree with a filter; double click to continue). After that you follow the same steps as for a new module, with the fields and settings of the copied module already filled in. Give the new module its own name and item names.
Suppression de modules #

Custom modules, modules not delivered with Data Crow, can be deleted with [Modules > Delete Custom Module Wizard]. The wizard is only available when you use Data Crow stand-alone. All items of the module are deleted as well, and this cannot be undone: make a backup first.
Select the module (a tree with a filter). The next step shows the modules which depend on it, and is skipped when no module is affected:

- the relationship of modules which refer to the module is removed (their reference fields are removed; deleting a list which is used by several modules removes the fields of all of them);
- a child module of the module is deleted as well, including all of its items;
- when the module is a child module, its parent module loses it.
Data Crow asks for confirmation before the module is deleted. After that Data Crow has to be closed. Standard modules (delivered with Data Crow) cannot be deleted, but you can hide them with the modules activés settings.
Distribution des modules #
Après avoir créé et testé votre module, vous souhaiterez peut-être le distribuer à d'autres personnes.
Exportation d'un module #

Start [Modules > Export Module Wizard]. The wizard exports the module and the modules it refers to (at every level, also the lists of the lists) to one module file, named after the module. The file holds the pictures and attachments of the exported items, the settings of the module and the names of the module and its fields in every language.
- Select the module to export (a tree with a filter).
- Related modules: choose per referenced module what to export: none of its items (the field stays empty), only the items which are assigned to the exported items, or all of its items. This step is skipped when the module refers to no other module.

- Configuration: choose the folder where the export file is saved, and check Exporter les éléments du module principal when the items of the module have to be part of the export.

- Export: the progress and the event log are shown; press Finition when the export is done (Cancel stops it).

Importation d'un module #

Start [Modules > Import Module Wizard] and select the module file (ZIP). The module is imported with its settings, names, pictures and attachments, with a progress bar and an event log. A module which refers to a module which is not in the file is refused, with a message which says which module is missing. After the import Data Crow has to be restarted to see the module.
Modification des modules #

To customise an existing module start [Modules > Alter Module Wizard]. The wizard shows the modules as a tree: the main modules, below them the modules their fields refer to, and below those the modules these refer to. Modules which are not used yet are shown separately. Use the filter to find a module and double click to continue.


The next steps are the same as for a new module. You can change:
- the description and the icon of the module (the name and item names cannot be changed here);
- the options, such as whether the items can be lent or can refer to other items;
- the fields: add new fields, change or remove existing fields;
- the field settings of the new fields and the item form.

Fields which the module needs (for example for online search or the file information import) cannot be removed, and some fields cannot be changed: the edit and remove icons are only shown when the change is possible. The name of an existing field cannot be changed. Changing the type of a field might result in data loss: always make a backup before applying these changes. Only the types a field can be converted to without losing data are offered. For example:

- a single list field can become a list field with several values (such as the Storage Medium field): Data Crow converts the values for you;
- a single line text field can become a file field, a web address, a long text or a list field; when it becomes a list field, Data Crow creates a value in the list for every existing text and assigns it to the items which held the text.
Removing a field removes what was stored in it for all items. After a change Data Crow has to be closed.