J'ai encore essayé mais ça ne marche toujours pas... Dès que je demande à Wiwimod d'utiliser tinyeditor la zone de texte pour écrire mon article ne s'affiche pas.
Je ne sais pas comment adapter le code proposé dans tinyeditor .
Voila ce que la doc me demande de faire, je dois trouver ce tableau dans "xoops_version.php" de Wiwimod:
array(_MI_NEWS_FORM_DHTML=>‘dhtml‘,_MI_NEWS_FORM_COMPACT=>‘textarea‘,_MI_NEWS_FORM_SPAW=>‘spaw‘,_MI_NEWS_FORM_HTMLAREA=>‘htmlarea‘,
_MI_NEWS_FORM_KOIVI=>‘koivi‘,_MI_NEWS_FORM_FCK=>‘fck‘);
et le remplacer par:
array(_MI_NEWS_FORM_DHTML=>‘dhtml‘,_MI_NEWS_FORM_COMPACT=>‘textarea‘,_MI_NEWS_FORM_SPAW=>‘spaw‘, MI_NEWS_FORM_HTMLAREA=>‘htmlarea‘,_MI_NEWS_FORM_KOIVI=>‘koivi‘,_MI_NEWS_FORM_FCK=>‘fck‘,‘tinyeditor‘=>‘tinyeditor‘);
Mais moi j'ai trouvé ça dans mon fichier:
$modversion['config'][1]['options'] = array('Xoops Standard' => 0, 'XoopsEditor' => 1,'Spaw' => 2, 'HtmlArea' => 3, 'Koivi' => 4, 'FCK Editor' => 5);
$modversion['config'][2]['name'] = 'XoopsEditor';
$modversion['config'][2]['title'] = '_MI_WIWIMOD_XOOPSEDITOR';
$modversion['config'][2]['description'] = '_MI_WIWIMOD_XOOPSEDITOR_DESC';
$modversion['config'][2]['formtype'] = 'select';
$modversion['config'][2]['valuetype'] = 'text';
$modversion['config'][2]['default'] = 0;
if (file_exists(XOOPS_ROOT_PATH."/class/xoopseditor/xoopseditor.php")) {
include_once(XOOPS_ROOT_PATH."/class/xoopslists.php");
include_once(XOOPS_ROOT_PATH."/class/xoopseditor/xoopseditor.php");
$editor_name = !empty($_GET['editor_name'])?$_GET['editor_name']:"";
$editorhandler = new XoopsEditorHandler();
$modversion['config'][2]['options'] = array_flip($editorhandler->getList());
}
else $modversion['config'][2]['options'] = array();
Maintenant pour le fichier functions.php, je dois inérer après:
case „koivi“:
if(!$x22) {
if (is_readable(XOOPS_ROOT_PATH.„/class/wysiwyg/formwysiwygtextarea.php“))
{
include_once(XOOPS_ROOT_PATH . „/class/wysiwyg/formwysiwygtextarea.php“);
$editor = new XoopsFormWysiwygTextArea($caption, $name, $value, ‘100%‘,
‘400px‘, ‘‘);
}
} else {
$editor = new XoopsFormEditor($caption, „koivi“, $editor_configs);
}
break;
Ceci:
case „tinyeditor“:
if ( is_readable(XOOPS_ROOT_PATH . „/class/xoopseditor/tinyeditor/
formtinyeditortextarea.php“)) {
include_once(XOOPS_ROOT_PATH . „/class/xoopseditor/tinyeditor/
formtinyeditortextarea.php“);
$editor = new XoopsFormTinyeditorTextArea(array(‘caption‘=>$caption,
‘name‘=>$name, ‘value‘=>$value, ‘width‘=>‘100%‘, ‘height‘=>‘400px‘,
‘xEditor‘=>‘1‘));
}
break;
Mais moi j'ai juste trouvé cela:
function getAvailableEditors() {
$arr = Array();
$arr[] = Array("Xoops Standard" , 0 , "" );
if (file_exists(XOOPS_ROOT_PATH . '/class/xoopseditor')) {
include_once(XOOPS_ROOT_PATH."/class/xoopslists.php");
include_once(XOOPS_ROOT_PATH."/class/xoopseditor/xoopseditor.php");
$editorhandler = new XoopsEditorHandler();
$xedArr = array_flip($editorhandler->getList());
foreach ($xedArr as $xedTitle => $xedName) {
$arr[] = Array("XE - $xedTitle", 1 , $xedName );
}
}
if (file_exists(XOOPS_ROOT_PATH . '/class/spaw')) {
$arr[] = Array("Spaw" , 2 , "" );
}
if (file_exists(XOOPS_ROOT_PATH . '/class/htmlarea')) {
$arr[] = Array("HTMLArea" , 3 , "");
}
if (file_exists(XOOPS_ROOT_PATH . '/class/wysiwyg')) {
$arr[] = Array("Koivi" , 4 , "");
}
if (file_exists(XOOPS_ROOT_PATH . '/class/fckeditor')) {
$arr[] = Array("FCKEditor" , 5 , "");
}
return $arr;
}
Quelqu'un peut-il m'aider à adapter le code de wiwimod comme le demande la doc?
Merci à ceux qui pourront me donner un coup de main!