xoops forums

ghia

Community Support Member
Posted on: 2008/8/7 13:34
ghia
ghia (Show more)
Community Support Member
Posts: 4954
Since: 2008/7/3 1
#1

Xoops editors not working with fresh install 2.3.0rc

I installed Xampp and then in a cms directory under htdocs the files under htdocs from the packages for 2.3.0rc and the addons.

The XOOPS install went fine, but the extra editors are not usable. I installed the accompagnied modules News and CBB.
In the preferences from News only DHTML and Text is working, with the others like FCK, Koivi and tinyMCE there is no input area for the article text shown.

In CBB with the extra editors are not selectable. Only Extended DHTML and plain text. The third option 'DHTML form with xCode' makes Apache crash(?) and an exception message is popped up with:
Quote:
apache.exe - Application error
The exception unknown software exception (0xc00000fd)occurred in the application at location 0x01840ea4.
Click on OK to terminate the program
Click on Cancel to debug the program


Shouldn't all the editors not be readyly available with the install or did I miss something to install or configure for the editors?

ghia

Community Support Member
Posted on: 2008/8/8 15:30
ghia
ghia (Show more)
Community Support Member
Posts: 4954
Since: 2008/7/3 1
#2

Re: Xoops editors not working with fresh install 2.3.0rc

Some additional information to the problem:
- In xoops_data\caches\xoops_cache is a file created xoops_editorlist.php wich contains a list of xoopseditors.
1249662581
return array (
  
'dhtmlext' => 
  array (
    
'title' => 'Extended DHTML Form',
    
'nohtml' => 1,
  ),
  
'dhtmltextarea' => 
  array (
    
'title' => 'DHTML Form with xCode',
    
'nohtml' => 1,
  ),
  
'textarea' => 
  array (
    
'title' => 'Plain Text',
    
'nohtml' => 1,
  ),
  
'tinymce' => 
  array (
    
'title' => 'TinyMCE',
    
'nohtml' => NULL,
  ),
  
'fckeditor' => 
  array (
    
'title' => 'WYSIWYG FCKeditor',
    
'nohtml' => NULL,
  ),
  
'koivi' => 
  array (
    
'title' => 'Koivi WYSIWYG Editor',
    
'nohtml' => NULL,
  ),
);
This is hardly a PHP file and should have another extension.

The problem are the NULL values, when these are changed to 1, then the editors become usable in the forum.

This problem comes from the fact that the editors have different keys in their editor_registry.php file.
dhtml:
return $config = array(
        
"class"     =>    "FormDhtmlExt",
        
"file"      =>    XOOPS_ROOT_PATH "/class/xoopseditor/dhtmlext/dhtmlext.php",
        
"title"     =>    _XOOPS_EDITOR_DHTMLEXT,
        
"order"     =>    1,
        
"nohtml"    =>    1
    
);

tinyMCE:
return $config = array(
        
"name"      =>    "tinymce",
        
"class"     =>    "XoopsFormTinymce",
        
"file"      =>    XOOPS_ROOT_PATH "/class/xoopseditor/tinymce/formtinymce.php",
        
"title"     =>    _XOOPS_EDITOR_TINYMCE,
        
"order"     =>    3
    
);


Shouldn't they have all the same structure?

For the use of the editors under news, I guess this is totally different:
function &news_getWysiwygForm($caption$name$value ''$width '100%'$height '400px'$supplemental='')
{
    
$editor false;
    
$x22=false;
    
$xv=str_replace('XOOPS ','',XOOPS_VERSION);
    if(
substr($xv,2,1)=='2') {
        
$x22=true;
    }
    
$editor_configs=array();
    
$editor_configs['name'] =$name;
    
$editor_configs['value'] = $value;
    
$editor_configs['rows'] = 35;
    
$editor_configs['cols'] = 60;
    
$editor_configs['width'] = '100%';
    
$editor_configs['height'] = '400px';


    switch(
strtolower(news_getmoduleoption('form_options'))) {
        case 
'spaw':
            if(!
$x22) {
                if (
is_readable(XOOPS_ROOT_PATH '/class/spaw/formspaw.php'))    {
                    include_once(
XOOPS_ROOT_PATH '/class/spaw/formspaw.php');
                    
$editor = new XoopsFormSpaw($caption$name$value);
                }
            } else {
                
$editor = new XoopsFormEditor($caption'spaw'$editor_configs);
            }
            break;

        case 
'fck':
            if(!
$x22) {
                if ( 
is_readable(XOOPS_ROOT_PATH '/class/fckeditor/formfckeditor.php'))    {
                    include_once(
XOOPS_ROOT_PATH '/class/fckeditor/formfckeditor.php');
                    
$editor = new XoopsFormFckeditor($caption$name$value);
                }
            } else {
                
$editor = new XoopsFormEditor($caption'fckeditor'$editor_configs);
            }
            break;

        case 
'htmlarea':
            if(!
$x22) {
                if ( 
is_readable(XOOPS_ROOT_PATH '/class/htmlarea/formhtmlarea.php'))    {
                    include_once(
XOOPS_ROOT_PATH '/class/htmlarea/formhtmlarea.php');
                    
$editor = new XoopsFormHtmlarea($caption$name$value);
                }
            } else {
                
$editor = new XoopsFormEditor($caption'htmlarea'$editor_configs);
            }
            break;

        case 
'dhtml':
            if(!
$x22) {
                
$editor = new XoopsFormDhtmlTextArea($caption$name$value1050$supplemental);
            } else {
                
$editor = new XoopsFormEditor($caption'dhtmltextarea'$editor_configs);
            }
            break;

        case 
'textarea':
            
$editor = new XoopsFormTextArea($caption$name$value);
            break;

        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'));
            }
            break;

        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%''450px''');
                }
            } else {
                
$editor = new XoopsFormEditor($caption'koivi'$editor_configs);
            }
            break;
        }
        return 
$editor;
}

This function in modules/news/include/functions.php has probably to be extended with an alternate choice for version 2.3 in order to use the extra editors.

ghia

Community Support Member
Posted on: 2008/8/10 10:57
ghia
ghia (Show more)
Community Support Member
Posts: 4954
Since: 2008/7/3 1
#3

Re: Xoops editors not working with fresh install 2.3.0rc

Due to the announcement, I downloaded News version 1.62 and update this in the 2.3.0RC testbed. But the extra editors stays unusable with News.

instantzero

Module Developer
Posted on: 2008/8/10 11:38
instantzero
instantzero (Show more)
Module Developer
Posts: 232
Since: 2006/11/29
#4

Re: Xoops editors not working with fresh install 2.3.0rc

(second time), yes, it's normal as there was a bug in the class :
https://xoops.org/modules/news/article ... ootid=41768&#comment41769

ghia

Community Support Member
Posted on: 2008/8/10 12:44
ghia
ghia (Show more)
Community Support Member
Posts: 4954
Since: 2008/7/3 1
#5

Re: Xoops editors not working with fresh install 2.3.0rc

Quote:
instantzero wrote:
(second time), yes, it's normal as there was a bug in the class
You mean the class responsable for the editor list?

Anyway for running Koivi with News, I used this hack in function news_getWysiwygForm from functions.php :
case 'koivi':
            if(!
$x22) {

to
case 'koivi':
            if(!
$x22 && !news_isX23()) {

eantipa

Just popping in
Posted on: 2008/10/11 8:57
eantipa
eantipa (Show more)
Just popping in
Posts: 16
Since: 2007/6/11
#6

Re: Xoops editors not working with fresh install 2.3.0rc

OK... had the same issue with the editors not working... atleast now i have the koivi... thankx alot...

Any solution for tiny?