[eluser]basty_dread[/eluser]
Hi is there anyone tried it in codeigniter?
i tried it and i cant seem to make it work
on the view:
Code:
<scr+ip+t type="text/javascrip+t">
CKEDITOR.replace( 'nfeditor',
{
height:510,
width:600,
filebrowserImageUploadUrl : '<?=base_url()?>index.php/contentstep/wcduploader',
resize_enabled:false
});
</scri+p+t>
on my controller:
function wcduploader(){
$userid = $this->session->userdata('userid');
$url = '' ;
$target_path = "myimages/Images/".$userid."/";
@mkdir($target_path);
$msg = '';
$data = date("m-d-y g-i-a");
$target_path = $target_path . $data .".jpg";
if (move_uploaded_file($_FILES['upload']['tmp_name'], $target_path)) {
$file_name = basename($_FILES['upload']['name']);
$url = "http://mywebsite.com/".$target_path;
$msg = 'Successfully uploaded';
}
else
$msg = 'This file was not uploaded';
echo '[removed]' ;
echo 'window.parent.CKEDITOR.tools.callFunction("'.$_GET["CKEditorFuncNum"].'","'.$url.'", "'.$msg.'") ;' ;
echo '[removed]' ;
}//end function
the image is getting uploaded but the problem is the callFunction seems not to be working..
please help me anyone.. thank you so much.