Hello,
I have integrated Tiny Editor for the module Extcal like this :
(I use the module Tiny editor in my site)
1/ I edit the file xoops/modules/extcal/admin/cat.php:
include '../../../class/xoopsformloader.php';
//include_once XOOPS_ROOT_PATH . "/class/wysiwyg/formwysiwygtextarea.php";
include_once XOOPS_ROOT_PATH . "/class/xoopseditor/tinyeditor/formtinyeditortextarea.php";
and
$form = new XoopsThemeForm(_AM_EXTCAL_ADD_CATEGORY, 'add_cat', 'cat.php?op=enreg', 'post', true);
//$form->addElement(new XoopsFormText(_AM_EXTCAL_NAME, 'cat_name', 30, 255, $cat->getVar('cat_name')), true);
//$form->addElement(new XoopsFormWysiwygTextArea(_AM_EXTCAL_DESCRIPTION, 'cat_desc', $cat->getVar('cat_desc'),'','',''), false);
$form->addElement(new XoopsFormTinyeditorTextArea(_AM_EXTCAL_DESCRIPTION, 'cat_desc', $cat->getVar('cat_desc'),'','',''), false);
and
$form->addElement(new XoopsFormText(_AM_EXTCAL_NAME, 'cat_name', 30, 255), true);
//$form->addElement(new XoopsFormDhtmlTextArea(_AM_EXTCAL_DESCRIPTION, 'cat_desc', ''), false);
//$form->addElement(new XoopsFormWysiwygTextArea(_MD_EXTCAL_DESCRIPTION, 'event_desc', $desc,'','',''), false);
$form->addElement(new XoopsFormTinyeditorTextArea(_MD_EXTCAL_DESCRIPTION, 'event_desc', $desc,'','',''), false);
2/ I edit the file xoops/modules/extcal/class/event.php:
include_once XOOPS_ROOT_PATH.'/modules/extcal/class/config.php';
// Intégration koivi
//include XOOPS_ROOT_PATH . '/class/xoopsformloader.php';
//include_once XOOPS_ROOT_PATH . "/class/wysiwyg/formwysiwygtextarea.php";
// Intégration TinyEditor
include XOOPS_ROOT_PATH . '/class/xoopsformloader.php';
include_once XOOPS_ROOT_PATH . "/class/xoopseditor/tinyeditor/formtinyeditortextarea.php";
et
// Description
//$form->addElement(new XoopsFormDhtmlTextArea(_MD_EXTCAL_DESCRIPTION, 'event_desc', $desc, 10), false);
//$form->addElement(new XoopsFormWysiwygTextArea(_MD_EXTCAL_DESCRIPTION, 'event_desc', $desc,'100%','400px',''), false);
$form->addElement(new XoopsFormTinyeditorTextArea(_MD_EXTCAL_DESCRIPTION, 'event_desc', $desc,'100%','400px',''), false);
and
// Address
//$form->addElement(new XoopsFormDhtmlTextArea(_MD_EXTCAL_ADDRESS, 'event_address', $address), false);
//$form->addElement(new XoopsFormWysiwygTextArea(_MD_EXTCAL_ADDRESS, 'event_address', $address,'','',''), false);
$form->addElement(new XoopsFormTinyeditorTextArea(_MD_EXTCAL_ADDRESS, 'event_address', $address,'','',''), false);
So this integration is fully work when I'm connected with an admin user, but when it's use it with a member register user I have some problem.
When the event is post by the register user, the content of the event is blank in the database.
So I activate the debug mode and I have this error
Message: Undefined index: event_desc dans le fichier /modules/extcal/post.php - ligne 99
Message: Undefined index: event_address dans le fichier /modules/extcal/post.php - ligne 104
Message: Deprecated, use '/include/mimetypes.inc.php' directly. dans le fichier /class/mimetypes.inc.php - ligne 25
But I have the same error when I post the event with an admin user, but it works (The content of the event is Ok in the database with the admin user)
Somebody have an idea of the problem ?
Thank you too much for your help