//check that max limit of pictures have not been reached, if it's set
if(!isset($mg->mgconfig['max_pic_number']) || ($mg->mgconfig['max_pic_number']==0 || $mg->mgconfig['max_pic_number']>mysql_num_rows($rs1))){
$outerTplDataHiddenFields['uploadform'] = '<input type="hidden" name="action" value="upload_pics" /><input type="hidden" name="mode" value="admin" />';
//mod by Dimmy
//only shows the upload fields when "max_pic_number" is not reached yet. wit max of 10 fields
$uploadCount= $mg->mgconfig['max_pic_number'] - mysql_num_rows($rs1);
for($i=0;$i<$uploadCount and $i <10;$i++) {
// end mod
$tpl = new CChunkie($mg->mgconfig['manageUploadTpl']);
$uploadPictureTplData = array();
$uploadPictureTplData['counter'] = $i+1;
$uploadPictureTplData['fieldnames.file'] = 'file'.$i;
$tpl->addVar('maxigallery', $uploadPictureTplData);
$manageOuterTplData['uploadpictures'] .= $tpl->Render();
}
}else{
$manageOuterTplData['messages'] .= $strings['max_pics_reached'];
}
$manageOuterTplData['hiddenfields'] = $outerTplDataHiddenFields;
You can remove it by not setting the placeholder for it.. I’ll look into getting this to the final v0.5 release
Nice ok that is great
Not set the placeholder in the code, but I’ll do that too when I do the above thing.
If there are images uploaded with the same file name, there will be a number appended to the filename on the later ones.
This discussion is closed to further replies. Keep calm and carry on.