Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Wanted to piggy back off Penuel whose code helped me a lot.</p> <p>add this to /filemanager/connectors/php/upload.php</p> <pre><code>// Get the CKEditor Callback $CKEcallback = $_GET['CKEditorFuncNum']; //modify the next line adding in the new param FileUpload($sType, $sCurrentFolder, $sCommand, $CKEcallback); </code></pre> <p>add this to /filemanager/connectors/php/io.php</p> <pre><code>// This is the function that sends the results of the uploading process to CKE. function SendCKEditorResults ($callback, $sFileUrl, $customMsg = '') { echo '&lt;script type="text/javascript"&gt;'; $rpl = array( '\\' =&gt; '\\\\', '"' =&gt; '\\"' ) ; echo 'window.parent.CKEDITOR.tools.callFunction("'. $callback. '","'. strtr($sFileUrl, $rpl). '", "'. strtr( $customMsg, $rpl). '");' ; echo '&lt;/script&gt;'; } </code></pre> <p>modify this /filemanager/connectors/php/commands.php</p> <pre><code>//line 158 function FileUpload($resourceType, $currentFolder, $sCommand, $CKEcallback = '') //line 166 if ( (isset($_FILES['NewFile']) &amp;&amp; !is_null($_FILES['NewFile']['tmp_name'])) # This is for the QuickUpload tab box or (isset($_FILES['upload']) and !is_null($_FILES['upload']['tmp_name']))) { global $Config ; $oFile = isset($_FILES['NewFile']) ? $_FILES['NewFile'] : $_FILES['upload']; ... if($CKEcallback == '') { // this line already exists so wrap the if block around it SendUploadResults( $sErrorNumber, $sFileUrl, $sFileName ) ; } else { //issue the CKEditor Callback SendCKEditorResults ($CKEcallback, $sFileUrl, ($sErrorNumber != 0 ? 'Error '. $sErrorNumber. ' upload failed. '. $sErrorMsg : 'Upload Successful')); } </code></pre> <p>You'll need to add the upload URL's to your CKEDITOR definition like so:</p> <pre><code> var filemanager = '/js/ckeditor/filemanager/'; var browser = filemanager + 'browser/default/browser.html'; var connector = filemanager + 'connectors/php/connector.php'; var upload = filemanager + 'connectors/php/upload.php'; CKEDITOR.replace( id, { customConfig : this.config, filebrowserBrowseUrl : browser +'?Connector=' + connector, filebrowserImageBrowseUrl : browser + '?Type=Image&amp;Connector=' + connector, filebrowserFlashBrowseUrl : browser + '?Type=Flash&amp;Connector=' + connector, filebrowserUploadUrl : upload + '?type=Files', filebrowserImageUploadUrl : upload + '?type=Images', filebrowserFlashUploadUrl : upload + '?type=Flash' }); </code></pre> <p>I think that covers everything left off by Penuel</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload