Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
adiramardiani opened this issue May 20, 2015 · 3 comments
Open

Comments

@adiramardiani
Copy link

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
Copy link

dastiw1 commented Jun 23, 2015

How you configure? i don't understand official guide

@rachman123
Copy link

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
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants