Home
Copyright Darius Matulionis, all rights reserved.
Cool stuff
Just copy "imgmanager" folder to TinyMCE plugins folder (tiny_mce/plugins/) and add "imgmanager" plugin and "imgmanager" button to your TinyMCE configuration.
Create upload folder and make it writable.
tinyMCE.init({
plugins : "imgmanager",
theme_advanced_buttons1 : "imgmanager",
});
Open file imgmanager/libs/config.php
//!!!! CHANGE THIS !!!!!!
// WEB BASE DIRECTORY FOR IMAGE VIEW
defined('WEB_BASE') || define('WEB_BASE', 'TinyMCE_ImageManager/upload' );
//!!!! CHANGE THIS !!!!!!
//UPLOAD PATH
defined('UPLOADS_PATH') || define('UPLOADS_PATH', realpath(dirname(__FILE__) . '/../../../../../'.WEB_BASE ));
/**
* AUTH SHOULD BE DONE HERE !!!!
*/
//!!!! CHANGE THIS !!!!!! AND THEN ajax.php
$session_id = session_id() ? session_id() : $_COOKIE["PHPSESSID"];
if(session_start()){
$_SESSION['session_id'] = $session_id;
$_SESSION['user_auth'] = true;
}
$auth = false;
if($_SESSION['session_id'] && $_SESSION['user_auth']){
$auth = true;
require 'EncriptDecript.php';
$ed = new EncriptDecript();
$encripted_session_id =$ed->encript($session_id);
}
if(!$auth){
die("You are not allowed to be here !!!");
}
//------------------------------------------------------------
open imgmanges/libs/ajax.php file and edit:
//!!!! CHANGE THIS IF NEDED!!!!!!
if (!empty($_FILES) && isset($_FILES['Filedata']) && $_REQUEST['hash']) {
require 'EncriptDecript.php';
$ed = new EncriptDecript();
$session_id = $ed->decript($_REQUEST['hash']);
$_COOKIE['PHPSESSID'] = $session_id;
session_id($session_id);
session_start();
$_SESSION['user_auth'] = true;
}
Plugin is using Twitter Bootstrap
All the documentations you can find here
If you interested in collaboration, grab a copy (fork) from GitHub
Excellent plugin for managing image uploads in TinyMCE.- sternhagel, 10 months ago
Only drawback from my point of view is the lack of proper documentation - it took me quite some time to get it running because I had to figure out most of the configuration procedure myself.
Apart from that: excellent work, thanks very much!
me parece un compenente impresionante y de mucha ayuda para cualquier tipo de proyectos- alex zamora, 11 months ago
Copyright Darius Matulionis, all rights reserved.
Questions & Comments
Leave a comment
Log-in now or register for a free account.
4 months ago
8 months ago
10 months ago