CKEditor imgbrowse - set plugin address
Place for comments, problems, questions, or any issue related to the JavaScript / PHP scripts from this site.
-
justanumber
- Posts:13
CKEditor imgbrowse - set plugin address
Great feature! Replaced the version downloaded from CKEditor site with the zip version from this page:
ckeditor-delete-option-imgbrowse-t156.htm#p467
No longer loads the images directory I have set on page.
The version from CKEditor works fine with these settings?
In my setup, really like to use the feature like:
Code: Select all
'../ckeditor/plugins/imgbrowse/imgbrowse.html?imgroot=mathtest/images',
Thank you for great plugin,
Admin
Posts:805
Hello,
If you want to use the plugin with address set in JS code, with this format:
Code: Select all
'../ckeditor/plugins/imgbrowse/imgbrowse.html?imgroot=dir_in_root/dir_images',
- in the version from the ZIP archive from that page, replace this code in "imgbrowse.php" file:
Code: Select all
function __construct() {
if(isset($_SESSION['user'])) $this->root = trim($this->root, '/') .'/'. $_SESSION['user'] .'/';
else $this->root = trim($this->root, '/') .'/';
$this->imgdr = isset($_POST['imgdr']) ? trim(trim(strip_tags($_POST['imgdr'])), '/') .'/' : '';
}
With this:
Code: Select all
function __construct() {
if(isset($_SESSION['user'])) $this->root = trim($this->root, '/') .'/'. $_SESSION['user'] .'/';
else{
if(isset($_POST['imgroot'])) $this->root = trim(strip_tags($_POST['imgroot']));
$this->root = trim($this->root, '/') .'/';
}
$this->imgdr = isset($_POST['imgdr']) ? trim(trim(strip_tags($_POST['imgdr'])), '/') .'/' : '';
}
- Or download again that zip (it is updated with this modification).
justanumber
Posts:13
Thank you! Works great. The delete feature is very useful.
Sorry if my original request was posted in wrong thread/area.
Cheers!
Similar Topics
- Block IP address
PHP - MySQL
First post
Strange activity`s (injection)
Pleasant Coursesweb,
I have whole day this visitor their is might a possibility in the code for something like...
Last post
Hello,
You can block that ip address in php, using this code:
if(strpos($_SERVER , '20.117.73') === 0) exit();
For instance, all of these...