-1

I have already search this problem on Stack Overflow but I didn't find an answer, please help me.

I have set my upload folder succesfully with no problem, but there is an issue...

Here is my folder structure.

httpdocs
|--pracitce
|  |--module
|  |  |--ckedtior(folder)
|  |  |  |......
|  |  |  |......
|  |  |--ckfinder(folder)
|  |  |  |......
|  |  |  |......
|  |--news
|  |  |--ckinder(folder) <<< force to copy "ckfinder" folder here   
|  |  |--news_list.php
|  |  |--news_add.php

I can call CKEditor at new_add.php replace <textarea></textarea> but when I use CKEditor editing my article and click the Image button to upload my pictures I can't call CKFinder with right path.

The new tab will be:

..../news/ckfinder/..........

it should be

 ..../module/ckfinder/..........

Can someone tell me how to set this path?

Screenshot:

It force me to copy CKFinder to my news folder for solve this problem. But I don't think it's a good idea to doing that.

I just need to know how setting my CKFinder path in CKEditor, maybe in ckeditor.js / config.js ... or somewhere else...

BTW.. there is the way I replace my <textarea>

<script type="text/javascript">
var editor = CKEDITOR.replace("content");
CKFinder.setupCKEditor( editor, '<?=$admin_real_path?>/_module/ckfinder/' ) ;
</script>

And

In this sentence , it doesn't work!! I take a sample on Internet.. $admin_real_path it's my webiste_admin_path is work , I am sure about this.

CKFinder.setupCKEditor( editor, '<?=$admin_real_path?>/_module/ckfinder/' ) ; 

Please Help!!!!!

Anna Tomanek
  • 2,219
  • 16
  • 23
  • 1
    Could you please add more details about the issue? At the screenshot you attached CKFinder is inside `news` directory, but looking at the directory tree it should be in `module`. Maybe there's some URL rewriting enabled on the server? – zaak Apr 12 '16 at 12:15
  • Dear [tag:zaak] , I added some detail in my article , please check out – Anderson Lin Apr 14 '16 at 12:56

1 Answers1

2

Thanks for updating the question. I created a directory structure similar to yours:

├── module
│   └── ckfinder (CKFinder files inside)
└── news
    └── list.html

list.html

<!DOCTYPE html>
<html>
<body>

<textarea id="content"></textarea>

<script src="//cdn.ckeditor.com/4.5.6/standard-all/ckeditor.js"></script>
<script src="../module/ckfinder/ckfinder.js"></script>
<script>
    var editor = CKEDITOR.replace('content');
    CKFinder.setupCKEditor(editor, '../module/ckfinder/');
</script>
</body>
</html>

With CKEditor and CKFinder configured like above everything works fine. I believe there's an issue with incorrect path in your code. In directory listing the name of the folder is module, while in the code you used _module.

zaak
  • 745
  • 7
  • 14