ctlmodule maker multiple image upload

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
vedat
Forum Members
Forum Members
Posts: 25
Joined: Mon Aug 11, 2008 12:13 pm

ctlmodule maker multiple image upload

Post by vedat »

Hello, i need some help about multiple image upload in ctl module maker.

I create a module with ctlmodulemaker.

this is file upload code in action.addfiles.php

Code: Select all

	foreach($_FILES as $fieldname=>$file){
		if($fieldname != $zipfield && isset($file['name']) && $file['name'] != ""){
			$extension = strtolower(substr(strrchr($file['name'], "."),1));
			if( !$allowedext || in_array($extension, $allowedext) ){
				if( $filepath = $this->plUploadFile($file, $destination, $resize, isset($params['crop'])) ){
					$this->plAssignFile($filepath, $params['tablename'], $itemid, $params['field'], $thumbsize, isset($params['cropthumb']));
				}else{
					$errors .= "<li>".$file['name'].': '.lang('filenotuploaded')."</li>";
				}
			}else{
				$errors = '<li>'.$file['name'].': '.$this->Lang('error_wrongfiletype').'</li>';
			}
		}
	}
and this is smarty upload input in action.browsefiles.php

Code: Select all

echo '<div id="fileinputs"><p>'.$this->CreateFileUploadInput($id,'uploadfile').'</p></div>';
how can i change this codes to do multiple image upload in one upload input.

regards.
Post Reply

Return to “Modules/Add-Ons”