Skip to content
Snippets Groups Projects
Commit addedc43 authored by Regis Houssin's avatar Regis Houssin
Browse files

Modification pour pouvoir uploader des images à partir de fckeditor

parent 4eb3ead1
No related branches found
No related tags found
No related merge requests found
......@@ -272,7 +272,7 @@ class Conf
$this->ldap->enabled=defined("MAIN_MODULE_LDAP")?MAIN_MODULE_LDAP:0;
// Module FCKeditor
$this->fckeditor->enabled=defined("MAIN_MODULE_FCKEDITOR")?MAIN_MODULE_FCKEDITOR:0;
$this->fckeditor->dir_images=DOL_DATA_ROOT."/fckeditor/images";
$this->fckeditor->dir_output=DOL_DATA_ROOT."/fckeditor";
/*
......
......@@ -250,7 +250,16 @@ if ($modulepart)
// Aucun test necessaire car on force le rep de doanwload sur
// le rep export qui est propre l'utilisateur
$accessallowed=1;
$original_file=$conf->export->dir_ouput.'/'.$user->id.'/'.$original_file;
$original_file=$conf->export->dir_output.'/'.$user->id.'/'.$original_file;
}
// Wrapping pour l'diteur wysiwyg
if ($modulepart == 'editor')
{
// Aucun test necessaire car on force le rep de doanwload sur
// le rep export qui est propre l'utilisateur
$accessallowed=1;
$original_file=$conf->fckeditor->dir_output.'/'.$original_file;
}
}
......
......@@ -18,19 +18,24 @@
* Frederico Caldeira Knabben (fredck@fckeditor.net)
*/
global $Config, $conf ;
require_once("../../../../../../../../conf/conf.php"); // ajout car $conf et DOL_DATA_ROOT ne fonctionne pas
global $Config ;
// SECURITY: You must explicitelly enable this "connector". (Set it to "true").
$Config['Enabled'] = true ;
// Path to user files relative to the document root.
$Config['UserFilesPath'] = '/images/' ;
//$Config['UserFilesPath'] = '/UserFiles/' ;
// Fill the following value it you prefer to specify the absolute path for the
// user files directory. Usefull if you are using a virtual directory, symbolic
// link or alias. Examples: 'C:\\MySite\\UserFiles\\' or '/root/mysite/UserFiles/'.
// Attention: The above 'UserFilesPath' must point to the same directory.
$Config['UserFilesAbsolutePath'] = $conf->fckeditor->dir_images ;
//$Config['UserFilesAbsolutePath'] = $conf->fckeditor->dir_output; // ne fonctionne pas
//$Config['UserFilesAbsolutePath'] = DOL_DATA_ROOT.'/fckeditor/'; // ne fonctionne pas
$Config['UserFilesAbsolutePath'] = $dolibarr_main_data_root.'/fckeditor/';
// Due to security issues with Apache modules, it is reccomended to leave the
// following setting enabled.
......
......@@ -35,7 +35,7 @@ if ( isset( $Config['UserFilesPath'] ) )
else if ( isset( $_GET['ServerPath'] ) )
$GLOBALS["UserFilesPath"] = $_GET['ServerPath'] ;
else
$GLOBALS["UserFilesPath"] = '/UserFiles/' ;
$GLOBALS["UserFilesPath"] = $dolibarr_main_url_root.'/document.php?modulepart=editor&file=';// il faut l'url en entier
if ( ! ereg( '/$', $GLOBALS["UserFilesPath"] ) )
$GLOBALS["UserFilesPath"] .= '/' ;
......
......@@ -18,19 +18,24 @@
* Frederico Caldeira Knabben (fredck@fckeditor.net)
*/
global $Config, $conf ;
require_once("../../../../../../conf/conf.php"); // ajout car $conf et DOL_DATA_ROOT ne fonctionne pas
global $Config ;
// SECURITY: You must explicitelly enable this "uploader".
$Config['Enabled'] = true ;
// Path to uploaded files relative to the document root.
$Config['UserFilesPath'] = '/images/' ;
//$Config['UserFilesPath'] = '/UserFiles/' ;
// Fill the following value it you prefer to specify the absolute path for the
// user files directory. Usefull if you are using a virtual directory, symbolic
// link or alias. Examples: 'C:\\MySite\\UserFiles\\' or '/root/mysite/UserFiles/'.
// Attention: The above 'UserFilesPath' must point to the same directory.
$Config['UserFilesAbsolutePath'] = $conf->fckeditor->dir_images ;
//$Config['UserFilesAbsolutePath'] = $conf->fckeditor->dir_output; // ne fonctionne pas
//$Config['UserFilesAbsolutePath'] = DOL_DATA_ROOT.'/fckeditor/'; // ne fonctionne pas
$Config['UserFilesAbsolutePath'] = $dolibarr_main_data_root.'/fckeditor/';
// Due to security issues with Apache modules, it is reccomended to leave the
// following setting enabled.
......
......@@ -20,6 +20,8 @@
FCKConfig.CustomConfigurationsPath = '' ;
print FCKConfig.BasePath;
FCKConfig.EditorAreaCSS = FCKConfig.BasePath + 'css/fck_editorarea.css' ;
FCKConfig.DocType = '' ;
......@@ -174,8 +176,8 @@ FCKConfig.FlashDlgHideAdvanced = false ;
// inline when creating the editor instance. In that cases you must set the
// values of LinkBrowserURL, ImageBrowserURL and so on.
// Custom implementations should just ignore it.
var _FileBrowserLanguage = 'asp' ; // asp | aspx | cfm | lasso | perl | php | py
var _QuickUploadLanguage = 'asp' ; // asp | aspx | cfm | lasso | php
var _FileBrowserLanguage = 'php' ; // asp | aspx | cfm | lasso | perl | php | py
var _QuickUploadLanguage = 'php' ; // asp | aspx | cfm | lasso | php
// Don't care about the following line. It just calculates the correct connector
// extension to use for the default File Browser (Perl uses "cgi").
......
......@@ -20,6 +20,16 @@
*/
define("K_CELL_HEIGHT_RATIO", 1.25);
/**
* Rpertoire des documents de fckeditor
*/
define ("K_PATH_CACHE", $conf->fckeditor->dir_output);
/**
* url qui sera substituer par le K_PATH_CACHE lorsqu'une image sera intgre au pdf
*/
define ("K_PATH_URL_CACHE", $dolibarr_main_url_root."/document.php?modulepart=editor&file=");
if(!class_exists('FPDF'))
{
define('FPDF_VERSION','1.53');
......
......@@ -165,8 +165,8 @@ FCKConfig.FlashDlgHideAdvanced = false ;
// inline when creating the editor instance. In that cases you must set the
// values of LinkBrowserURL, ImageBrowserURL and so on.
// Custom implementations should just ignore it.
var _FileBrowserLanguage = 'asp' ; // asp | aspx | cfm | lasso | perl | php | py
var _QuickUploadLanguage = 'asp' ; // asp | aspx | cfm | lasso | php
var _FileBrowserLanguage = 'php' ; // asp | aspx | cfm | lasso | perl | php | py
var _QuickUploadLanguage = 'php' ; // asp | aspx | cfm | lasso | php
// Don't care about the following line. It just calculates the correct connector
// extension to use for the default File Browser (Perl uses "cgi").
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment