Fork me on GitHub

Rapport de message :*
 

editeur nicedit dans news

Titre du sujet : editeur nicedit dans news
par grosdunord sur 30/09/2009 13:10:24

pour commencer télécharger le pack de cette editeur nicedit

ensuite dans le fichier xoops_version.php qui ce trouve dans /modules/news/

remplacer vers la ligne 456

Editor to use
 */
$modversion['config'][20]['name'] = 'form_options';
$modversion['config'][20]['title'] = "_MI_NEWS_FORM_OPTIONS";
$modversion['config'][20]['description'] = '_MI_NEWS_FORM_OPTIONS_DESC';
$modversion['config'][20]['formtype'] = 'select';
$modversion['config'][20]['valuetype'] = 'text';
$modversion['config'][20]['options'] = array(
                                            
_MI_NEWS_FORM_DHTML=>'dhtmltextarea',
                                            
_MI_NEWS_FORM_COMPACT=>'textarea',
                                            
_MI_NEWS_FORM_HTMLAREA=>'htmlarea',
                                            
_MI_NEWS_FORM_KOIVI=>'koivi',
                                            
_MI_NEWS_FORM_FCK=>'fckeditor',
                                            
_MI_NEWS_FORM_TINYEDITOR=>'tinyeditor',
                                            
'tinymce' => 'tinymce'
                                            
);
$modversion['config'][20]['default'] = 'dhtml';


par

Editor to use
 */
$modversion['config'][20]['name'] = 'form_options';
$modversion['config'][20]['title'] = "_MI_NEWS_FORM_OPTIONS";
$modversion['config'][20]['description'] = '_MI_NEWS_FORM_OPTIONS_DESC';
$modversion['config'][20]['formtype'] = 'select';
$modversion['config'][20]['valuetype'] = 'text';
$modversion['config'][20]['options'] = array(
                                            
_MI_NEWS_FORM_DHTML=>'dhtmltextarea',
                                            
_MI_NEWS_FORM_COMPACT=>'textarea',
                                            
_MI_NEWS_FORM_HTMLAREA=>'htmlarea',
                                            
_MI_NEWS_FORM_KOIVI=>'koivi',
                                            
_MI_NEWS_FORM_FCK=>'fckeditor',
                                            
_MI_NEWS_FORM_TINYEDITOR=>'tinyeditor',
                                            
_MI_NEWS_FORM_NICEDIT=>'nicedit',
                                            
'nicedit' => 'nicedit'
                                            
);
$modversion['config'][20]['default'] = 'nicedit';


ensuite toujours dans le module news dans le dossier /modules/news/include/

modifier le fichier function.php vers la ligne 242

apres

case 'koivi':
            if ( 
is_readable(XOOPS_ROOT_PATH '/class/wysiwyg/formwysiwygtextarea.php')) {
                require_once(
XOOPS_ROOT_PATH '/class/wysiwyg/formwysiwygtextarea.php');
                
$editor = new XoopsFormWysiwygTextArea($caption$name$value$width$height'');
            }
            break;


ajouter

case "nicedit":
            if ( 
is_readable(XOOPS_ROOT_PATH "/class/xoopseditor/nicedit/formnicedit.php"))    {
                include_once(
XOOPS_ROOT_PATH "/class/xoopseditor/nicedit/formnicedit.php");
                
$editor = new XoopsFormNiceditTextArea(array('caption'=>$caption'name'=>$name'value'=>$value'width'=>'100%''height'=>'400px'));
            }
        break;


ensuite vider votre cache et mettre a jour votre module news et système

et vous voila avec l'éditeur nicedit par défaut dans le module news
Propulsé avec XOOPS | Graphisme adapté par Tatane, Grosdunord, Montuy337513

133 Personne(s) en ligne (110 Personne(s) connectée(s) sur Forum) | Utilisateur(s): 0 | Invité(s): 133 | Plus ...