Welcome Guest, Not a member yet? Register   Sign In
Need help on ckeditor upload image.
#1

[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 :  '&lt;?=base_url()?&gt;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.
#2

[eluser]basty_dread[/eluser]
The thread is closed.. i've already finished what im working on this...
same on browse server on ckeditor.. without using the ckfinder.. but much more like ckfinder.. thanks..




Theme © iAndrew 2016 - Forum software by © MyBB