We have just finished the initialisations for our project. The page http://yoursite/mlam_install/mlam_init.php
shows the main menu, which looks like this :
Choose the table you want to edit
There's nothing yet in the current configuration
Some comments : The table you want to edit : this is always there. If you want to create a new structure, this is
the starting point. You'll see just after these comments what it makes. There's nothing yet in the current configuration : this is where you'll be able to edit-change-delete
already created structures. We'll see this later. This is empty for the moment, we haven't created anything. Go back : this is the link to the first page, showing existing mlam projects, the choice of language and
the project creation option. Mlam configuration values : you have here access to global data for this project. You'll see it later.
Creation of our first structure
For our project, we need 3 specific data edition pages : one for the movies, one for the dvds and one for the
zones (don't forget that our table is empty). We will begin with the movies, so select film in the
tables listed in upper left, and validate your choice. The main menu is still there, but we have now a lot
of things here :
Ok, what happened here ?
Each line represents a field in our table film. Foreach field, mlam offers various ways to handle
the data (depending of the type of data). The first line shows the primary key of the table, which can't
be manipulated. I won't detail all the options, they are all described here.
We will just talk about the work we are trying to achieve. We want to edit all the fields (except the
primary key), so we are going to select our options field by field.
But first, we have to give a name
to this structure (as written). You can use almost whatever you want, but no special characters. Mlam
will tell you if it doesn't like the name you want. Here we will name this structure edit_film.
Please choose the same name, we'll use it later.
Here we go for all the fields :
- title : we want to edit the name, so we check the Edition? option. We may want just to show
the content of this field by checking the Just show? option, but this is not the case. The order
allows to give the order of the fields shown in your future administration page, we won't use it here, we
don't care of the order. Next, we check the insertion and update options, we always want to
save your changes. Because a title may be quite long, we will put 60 for the display length, and that's it.
- year : same options, except final column (it will be the same for the others). We don't care of the
size of the input window, and we don't want any automatic value, so we check nothing here.
- imdb_id : we don't care, so we check nothing here again (in the last column).
- commentaire : we won't use the html edition possibility, so let's work with 200 cols and 30 rows.
- img_film : this is a little specific, so no picture for the moment, don't select it.
Now validate your choices until you have this :
Some changes occured after the first validation. We'll see later how to use listing options (the link in the
top of the data). We have the possibility to indicate a number of rows. We're not interested here (ii will
be 1 if we don't indicate anything else). Foreach field we want to edit, a new option is available, asking
for a title. This title will be shown in your tool, so you're free to put here everything you want. Don't
forget to validate your changes. Now we'll look again at the main menu (top your screen), which looks now like
this :
Choose the table you want to edit
There's nothing yet in the current configuration
Our first structure is correct, so we add it in the config. This is very important to add it before saving
anything. At the present time, you're working on a temporary structure, which won't be saved until it is
added to the current configuration (empty for the moment). So, now add your structure, a screen tells you
that the number of rows has been saved with the value 1, a button offers to return to the main page, so
press it. Back to the main screen, the main menu is one more time a little different :
Choose the table you want to edit
Edit a structure already present in the current configuration
Our new structure is now available in the second column. It allows to edit it or to delete it. But for now
we have made a good work, so we can save the changes. The next page allows you to directly continue working
or reloading all the structures (mainly to verify that everything worked).