1
roh112
news 1.55 and xoopseditor 1.10 hack
  • 2007/8/23 14:33

  • roh112

  • Just popping in

  • Posts: 5

  • Since: 2007/1/27


I have made a hack to use xoopseditor 1.10 package with news 1.55. //edited: is this the right section to post it? if not, apologies to the mods.

All you have to do is to locate the news_getWysiwygForm() function in modules/newsfolder/include/functions.php and edit the line for the editor you want (you can study each editor's constructor in order to see which arguments to use).

for example for FCKeditor alter
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;

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


The problem was that the default file tried to pass wrong arguments to the editor constructor, so they editor was able to load, but could not be initialized with the proper values.

I have tested koivi editor, FCKeditor and tinyeditor, under XOOPS 2.0.16. Everything went smooth.

Hope someone found that usefull.

2
mrphilong
Re: news 1.55 and xoopseditor 1.10 hack
  • 2007/8/23 14:51

  • mrphilong

  • Quite a regular

  • Posts: 351

  • Since: 2006/7/14


try your hack with koivi, doesn't work.
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%', '450px', '');
                    
$editor = new XoopsFormWysiwygTextArea($editor_configs);

                }
            } else {
                
$editor = new XoopsFormEditor($caption'koivi'$editor_configs);
            }
            break;

3
McDonald
Re: news 1.55 and xoopseditor 1.10 hack
  • 2007/8/23 15:12

  • McDonald

  • Home away from home

  • Posts: 1072

  • Since: 2005/8/15


On testservers I've also noted that the WYSIWYG editors from the xoopseditor package didn't work, except with modules written by phppp. Strange.

You might try this older version of Koivi that you just have to place inside the folder 'class'. (../class/wysiwyg/)

4
roh112
Re: news 1.55 and xoopseditor 1.10 hack
  • 2007/8/23 15:25

  • roh112

  • Just popping in

  • Posts: 5

  • Since: 2007/1/27


this hack is for XOOPS 2.0.16.
In case you have problems

1)Make sure you set the correct path for each editor at the include() line.
2)Open editor's class file and see what arguments you should pass to the constructor.

for example my version of koivi (/class/xoopseditor/koivi/formwysiwygtextarea.php )contains
/**
     * Constructor
     *
     * @param    array   $configs  Editor Options
     * @param    binary     $checkCompatible  true - return false on failure
     */
    
function XoopsFormWysiwygTextArea([color=00CC66]$configs[/color], $checkCompatible false)


so the line "$editor = new XoopsFormWysiwygTextArea($editor_configs);" should work.
Other versions of koivi might not use the same arguments.

Note : $editor_configs is an array of arguments defined in functions.php of news module.

Login

Who's Online

376 user(s) are online (263 user(s) are browsing Support Forums)


Members: 0


Guests: 376


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