1
Ronaldus
Editors in News1.44 don't work?
  • 2006/11/14 12:56

  • Ronaldus

  • Friend of XOOPS

  • Posts: 389

  • Since: 2004/5/8 1


Howdy,

I could not post news in News 1.44, because there was no text area.
I selected another editor, and that worked fine.
BUT: only DHTML and standard XOOPS editor work. With the other editors I don't get a text area.

I run X 2.0.15, with modified form.php, AND the latest versions of frameworks and editors...

Did I miss something?

Thx & grtz,

2
McDonald
Re: Editors in News1.44 don't work?
  • 2006/11/14 14:21

  • McDonald

  • Home away from home

  • Posts: 1072

  • Since: 2005/8/15


First, the other editors have to be installed separately in the folder /class/xoopseditor/
Further you might want to check if the paths for these editors is correct in the file /modules/news/include/functions.php.
Open the file functions.php in a text editor and start looking for the function &news_getWysiwygForm (line 167).
Beneath this you'll find the paths to the editors which should correspond with your install path (/class/xoopseditor/) of your wysiwyg editors.
And I can tell you that all paths are 'incorrect' for XOOPS 2.0.15.

You also can replace the function with the code below:
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(getmoduleoption('form_options'))){
    case 
"spaw":
        if(!
$x22) {
            if (
is_readable(XOOPS_ROOT_PATH "/class[color=CC0000]/xoopseditor[/color]/spaw/formspaw.php"))    {
                include_once(
XOOPS_ROOT_PATH "/class[color=CC0000]/xoopseditor[/color]/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[color=CC0000]/xoopseditor[/color]/fckeditor/formfckeditor.php"))    {
                include_once(
XOOPS_ROOT_PATH "/class[color=CC0000]/xoopseditor[/color]/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[color=CC0000]/xoopseditor[/color]/htmlarea/formhtmlarea.php"))    {
                include_once(
XOOPS_ROOT_PATH "/class[color=CC0000]/xoopseditor[/color]/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 
"koivi":
        if(!
$x22) {
            if ( 
is_readable(XOOPS_ROOT_PATH "/class[color=CC0000]/xoopseditor[/color]/koivi/formwysiwygtextarea.php"))    {
                include_once(
XOOPS_ROOT_PATH "/class[color=CC0000]/xoopseditor[/color]/koivi/formwysiwygtextarea.php");
                
$editor = new XoopsFormWysiwygTextArea($caption$name$value'100%''400px''');
            }
        } else {
            
$editor = new XoopsFormEditor($caption"koivi"$editor_configs);
        }
        break;

    case 
"tinyeditor":
            if ( 
is_readable(XOOPS_ROOT_PATH "/class[color=CC0000]/xoopseditor[/color]/tinyeditor/formtinyeditortextarea.php"))    {
                include_once(
XOOPS_ROOT_PATH "/class[color=CC0000]/xoopseditor[/color]/tinyeditor/formtinyeditortextarea.php");
                
$editor = new XoopsFormTinyeditorTextArea(array('caption'=>$caption'name'=>$name'value'=>$value'width'=>'100%''height'=>'400px'));
            }
                    
        break;
    }
    return 
$editor;
}

3
Ronaldus
Re: Editors in News1.44 don't work?
  • 2006/11/14 17:26

  • Ronaldus

  • Friend of XOOPS

  • Posts: 389

  • Since: 2004/5/8 1


Wow, that's quite an impressive answer, McD!!
Thank you for taking the time and trouble to answer me; i'll put it on my xoops-things-to-do list for this weekend, and let you know how things went!

Thx and grtz,

4
McDonald
Re: Editors in News1.44 don't work?
  • 2006/11/14 17:29

  • McDonald

  • Home away from home

  • Posts: 1072

  • Since: 2005/8/15


Graag gedaan

5
Ronaldus
Re: Editors in News1.44 don't work?
  • 2006/11/14 17:34

  • Ronaldus

  • Friend of XOOPS

  • Posts: 389

  • Since: 2004/5/8 1


Compliment met je site trouwens!
Heb jij geen last van ontzettend veel spam in je guestbook?

6
Ronaldus
Re: Editors in News1.44 don't work?
  • 2006/11/14 19:36

  • Ronaldus

  • Friend of XOOPS

  • Posts: 389

  • Since: 2004/5/8 1


Well McDonald, I copied and pasted the code in your reply in /modules/news/include/functions.php.
Koivi editor works!!
Spaw, HTMLarea and FCK still don't.
I checked:
path to FCK should be
/class/xoopseditor/FCKeditor/formfckeditor.php
instead of
/class/xoopseditor/fckeditor/formfckeditor.php

That helped for the FCK editor.

I dont't have the spaw editor in the xoopseditor directory. Same for HTML area.
And what about tinyeditor that is mentined in the functions.php?

Are these editors seperate downloads?

But I'm satisfied for now, I can offer 'clients' a nice looking (and working) editor).

Thx and greetings,


EDIT!!
Just playing around and found out that I can select FCK, and it appears, but I can't type text in the fields, so that doesn't help much.
I select Koivi for default for this moment, that works.....

7
jensclas
Re: Editors in News1.44 don't work?

Quote:
I dont't have the spaw editor in the xoopseditor directory. Same for HTML area.


I did discover by comments on my 'how to install cbb' doc that tinyeditor needs to be downloaded and installed separately. A recent search revelead a module called 'inbetween' which is modified tinyeditor by frankblack. I am not sure which one it was i actually installed to my site as tiny editor is one that has been sitting there for a long time too. Frankblack is looking inot issues between tinyeditor and cbb3.07 - well going by a thread that is.

As for spaw this was a 'module' i installed a long time ago to my site so my guess is the same would apply. A search should find it and you can try putting it in as a regular module.

HTH

8
JamesSAEP
Re: Editors in News1.44 don't work?
  • 2006/11/27 20:50

  • JamesSAEP

  • Just can't stay away

  • Posts: 732

  • Since: 2005/2/28


I made the changes below to the functions.php file and am having a problem w/ FCK and Kovi editors.

Both editors show up when submitting an article and seem to work fine. But if you click the "preview" button or submit button, the text that was in the editors is blank. And when I try to edit the post, the text is not there.

It is as if the database doesn't get populated with the content.

The problem is with all XOOPS version 2.0.x and php4/5 MySQL 4/5.
Any ideas?


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(getmoduleoption('form_options'))){
    case 
"spaw":
        if(!
$x22) {
            if (
is_readable(XOOPS_ROOT_PATH "/class/xoopseditor/spaw/formspaw.php"))    {
                include_once(
XOOPS_ROOT_PATH "/class/xoopseditor/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/xoopseditor/FCKeditor/formfckeditor.php"))    {
                include_once(
XOOPS_ROOT_PATH "/class/xoopseditor/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/xoopseditor/htmlarea/formhtmlarea.php"))    {
                include_once(
XOOPS_ROOT_PATH "/class/xoopseditor/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 
"koivi":
        if(!
$x22) {
            if ( 
is_readable(XOOPS_ROOT_PATH "/class/xoopseditor/koivi/formwysiwygtextarea.php"))    {
                include_once(
XOOPS_ROOT_PATH "/class/xoopseditor/koivi/formwysiwygtextarea.php");
                
$editor = new XoopsFormWysiwygTextArea($caption$name$value'100%''400px''');
            }
        } else {
            
$editor = new XoopsFormEditor($caption"koivi"$editor_configs);
        }
        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;
    }
    return 
$editor;
}

9
stange
Re: Editors in News1.44 don't work?
  • 2006/11/30 19:18

  • stange

  • Just popping in

  • Posts: 7

  • Since: 2005/1/6 2


I also made those changes to functions.php but I couldn't get FCK and Koivi to work either. So i did some testing and discovered that I had to change these two rows in functions.php

$editor = new XoopsFormFckeditor($caption, $name, $value);
$editor = new XoopsFormWysiwygTextArea($caption, $name, $value, '100%', '400px', '');

to

$editor = new XoopsFormFckeditor($editor_configs);
$editor = new XoopsFormWysiwygTextArea($editor_configs);

10
JamesSAEP
Re: Editors in News1.44 don't work?
  • 2006/11/30 19:48

  • JamesSAEP

  • Just can't stay away

  • Posts: 732

  • Since: 2005/2/28


Thanks stange -
I made those changes and it seems to have solved the problem.

But, I have noticed 2 others:

1. With both FCK and Kovi editors selected, the text that displays next to the boxes (The Scoop, Extended Text) doesn't display. When the DHTML editor is selected, the text does show. Any ideas on this?

2. When the kovi editor is selected, all the names of the buttons have "_XK_" in them. It is as if something isn't defined but I don't know where to look. Ideas?

Thanks.

Login

Who's Online

428 user(s) are online (372 user(s) are browsing Support Forums)


Members: 0


Guests: 428


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits