Passage de Extgallery à TDMPicture:
Catégories des albumsNous pouvons remplir une partie de la table xxxx_tdmpicture_cat à partir de la table xxxx_extgallery_publiccat.
Il faudra peut être faire un contrôle de longueur de la chaîne de caractère de cat_name varchar(255) dans extgallery car cat_title dans tdmpicture est en varchar(50).
Une boucle de contrôle pour prévenir les troncations?
`xxxx_tdmpicture_cat` (
`cat_id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`cat_pid` int(11) unsigned NOT NULL DEFAULT '0',
`cat_title` varchar(50) NOT NULL DEFAULT '',
`cat_date` int(11) NOT NULL DEFAULT '0',
`cat_text` text,
`cat_img` varchar(100) DEFAULT NULL,
`cat_weight` int(11) unsigned NOT NULL DEFAULT '0',
`cat_display` int(1) NOT NULL DEFAULT '0',
`cat_uid` int(11) unsigned NOT NULL DEFAULT '0',
`cat_index` int(1) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`cat_id`)
`xxxx_extgallery_publiccat` (
`cat_id` int(11) NOT NULL AUTO_INCREMENT,
`cat_pid` int(11) NOT NULL DEFAULT '0',
`nleft` int(11) NOT NULL DEFAULT '0',
`nright` int(11) NOT NULL DEFAULT '0',
`nlevel` int(11) NOT NULL DEFAULT '0',
`cat_name` varchar(255) NOT NULL,
`cat_desc` text NOT NULL,
`cat_date` int(11) NOT NULL DEFAULT '0',
`cat_isalbum` tinyint(1) NOT NULL DEFAULT '0',
`cat_weight` int(11) NOT NULL DEFAULT '0',
`cat_nb_album` int(11) NOT NULL DEFAULT '0',
`cat_nb_photo` int(11) NOT NULL DEFAULT '0',
`cat_imgurl` varchar(150) NOT NULL,
`photo_id` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`cat_id`)
Pour compléter cat_uid de la table xxxx_tdmpicture_cat, cela me semble plus complexe.
Il faudrait reccupérer l'uid de la première photo dans les albums d'Extgallery:
`x5fe_extgallery_publicphoto` (
`cat_id` int(11) NOT NULL,
`uid` int(11) NOT NULL,