iutbay / yii2-kcfinder

KCFinder for Yii2
22 stars 19 forks source link

Unable Browse file in integrate with 2amigos/yii2-ckeditor-widget #6

Open adiramardiani opened 9 years ago

adiramardiani commented 9 years ago

In my local server, I integrate with 2amigos is working well, but in shared hosting, my web cant find browse.php or upload.php

I think, it's because some server cannot generate yii assets or disable access to file like these above, Is this method can be changed ?

'filebrowserBrowseUrl' => $kcfinderUrl . '/browse.php?opener=ckeditor&type=files',
'filebrowserUploadUrl' => $kcfinderUrl . '/upload.php?opener=ckeditor&type=files',
dastiw1 commented 9 years ago

How you configure? i don't understand official guide

rachman123 commented 8 years ago

If you want to integrate with amigos CKEditor, please edit File CKEditor (in amigos src)

add use yii\helpers\ArrayHelper; use iutbay\yii2kcfinder\KCFinderAsset;

then in class, add

public $enableKCFinder = true;

protected function registerKCFinder() { $register = KCFinderAsset::register($this->view); $kcfinderUrl = $register->baseUrl;

    $browseOptions = [
        'filebrowserBrowseUrl' => $kcfinderUrl . '/browse.php?opener=ckeditor&type=files',
        'filebrowserUploadUrl' => $kcfinderUrl . '/upload.php?opener=ckeditor&type=files',
    ];

    $this->clientOptions = ArrayHelper::merge($browseOptions, $this->clientOptions);
}

go to function registerPlugin(), insert line if ($this->enableKCFinder) { $this->registerKCFinder(); } on the top

hendrasyp commented 8 years ago

@rachman123 , can we override without changes CKEditor.php (in amigos src) ? when we use composer update next, your configuration will disappeared.