I found a post that talked about this udt here:
http://forum.cmsmadesimple.org/viewtopi ... w=previous
To work this is what I did as Modified:
Code: Select all
$gCms = cmsms();
$modops = cmsms()->GetModuleOperations();
$uploads = $modops->get_module_instance('Uploads');
$gallery = $modops->get_module_instance('Gallery');
$feu = $modops->get_module_instance('FrontEndUsers');
$feu_user = $feu->LoggedInID();
$db = cmsms()->GetDB();
$filepath = "membres/". $feu_user ."/";
$filename = $params['name'];
$title = $params['summary'];
$comment = $params['description'];
$query = "SELECT fileid FROM " . cms_db_prefix() . "module_gallery WHERE filepath='membres/' AND filename='" . $feu_user . "/' LIMIT 1";
$galleryid = $db->getOne( $query );
if (!$galleryid) {return 'Errror';}
$query = "INSERT INTO " . cms_db_prefix() . "module_gallery
(fileid, filename, filepath, filedate, fileorder,
active, defaultfile, galleryid, title, comment)
VALUES (0, ?, ?, NOW(), ?, ?, ?, ?, ?, ?)";
$dbresult = $db->Execute( $query, array (
$filename,
$filepath,
0,1,0,
$galleryid,
$title,
$comment));
I also like to know how suitable the function module offered AddToFileDB gallery.
Thank you for your help