comment creer un interface d'authentification des etudiant aussi bien pour les formateur

Catégories:

bonjour,
je suis entrain de develloper un module matiere et je besoin de faire une inerface d’authentification qui permet aux utilisateur authentifier d’acceder au sitesi non les redriger vers une page d’inscription

#

Question ?

#

comment creer un module vide mais permet de creer ses table dans la base du drupal ?

#

Bonjour,
Tu crées un module «vide» et tu fais l’insertion des tables dans ton fichier .install.
Cordialement, Aya

#

merci bien Aya,
j’ai le faite deja et voici mon exemple :

< ?php
// $Id : matiere.install,v 1.7.2.1 2009/01/06 15:46:38 goba Exp $

/**
* Implementation of hook_schema().
*/
function matiere_schema() {
$schema[‘chapitres’] = array(
‘mat_nom_chapitre ’ => array(
‘type’ => ‘varchar’,
‘unsigned’ => TRUE,
‘not null’ => TRUE,
‘length’ => 254,
‘mat_nom_chapitre ’ => ‘Primary Key.’,
),
’ nom_matiere ’ => array(
‘type’ => ‘varchar’,
‘unsigned’ => TRUE,
‘not null’ => TRUE,
‘default’ => 0,
‘length’ => 254,

),
' nom_chapitre ' => array(
'type' => 'varchar',
'length' => 254,
'not null' => TRUE,
'default' => 0,
),
'mat_mat_nom_chapitre' => array(
'type' => 'text',
'not null' => FALSE,
'length' => 254,
),
'cha_nom_matiere' => array(
'type' => 'varchar',
'not null' => TRUE,
'default' => 0,
),
'nbr_section ' => array(
'type' => 'int',
'not null' => TRUE,
'default' => 0,
),
'nbr_activite ' => array(
'type' => 'int',
'not null' => TRUE,
'default' => 0,

),
' nbr_page ' => array(
'type' => 'int',
'not null' => TRUE,
'default' => 0,

),
),

$schema[‘departement’] = array(
‘num_departement ’ => array(
‘type’ => ‘int’,
‘unsigned’ => TRUE,
‘not null’ => TRUE,
‘default’ => 0,
‘num_departement ’ => ‘Primary Key’,
),
’ num_inscription’ => array(
‘type’ => ‘int’,
‘unsigned’ => TRUE,
‘not null’ => TRUE,
‘default’ => 0,
),
‘localisation ’ => array(
‘type’ => ‘varchar’,
‘unsigned’ => TRUE,
‘not null’ => TRUE,
‘default’ => 0,
‘length’ => 254,
),
’ numsalle’ => array(
‘type’ => ‘int’,
‘unsigned’ => TRUE,
‘not null’ => TRUE,
‘default’ => 0,
),
),
return $schema ;
}

Est ce que ca est suffisant… ?
merci d’avance

#

Il faut aussi penser a créer le Hook_install (voir la doc) pour que l’installation de ton schema soit pris en compte et éventuellement le hook_unistall (voir doc également) pour la suppression des table a la désinstallation du module (Attention toutefois désinstallation ne veut pas dire désactivation ) .
Cordialement, Aya

#

bonjour,
j’ai un probleme lors d’une ajout d’un module, theme et je fait l’enregistrement j’ai cette erreur :
( ! ) Fatal error : Maximum execution time of 30 seconds exceeded in C:\wamp\www\drupal-6.20\includes\database.mysqli.inc on line 115.

#

bonjour,
j’ai un probleme lors d’une ajout d’un module, theme et je fait l’enregistrement j’ai cette erreur :
( ! ) Fatal error : Maximum execution time of 30 seconds exceeded in C:\wamp\www\drupal-6.20\includes\database.mysqli.inc on line 115.

Syndiquer le contenu