CodeIgniter Forums
Need help on ckeditor upload image. - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21)
+--- Thread: Need help on ckeditor upload image. (/showthread.php?tid=28618)



Need help on ckeditor upload image. - El Forum - 03-16-2010

[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.


Need help on ckeditor upload image. - El Forum - 03-17-2010

[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..