1
maxima
Kiovi Editor implementation???
  • 2006/4/24 3:56

  • maxima

  • Not too shy to talk

  • Posts: 152

  • Since: 2006/3/4 4


I have spent 6 hours searching for a solution to get the Kiovi Editor to work as blocks editor for 2.2.4 but can't find an answer. Does anyone know how to do this? What is it's purpose in this latest version of XOOPS since I don't see a function to enable it.

2
maxima
Re: Kiovi Editor implementation???
  • 2006/4/24 16:28

  • maxima

  • Not too shy to talk

  • Posts: 152

  • Since: 2006/3/4 4


I have tried the following hack on file /modules/system/blocks/system_blocks.php but I get a blank page. Ofcourse the hack did specify for ver 2.2.2 but I figured with a little tweak it might work.

function b_system_custom_edit($options) {
//  start hack editor    
    
include_once(XOOPS_ROOT_PATH "/class/wysiwyg/formwysiwygtextarea.php");
//  end hack editor    
    
$ts =& MyTextSanitizer::getInstance();
    include_once 
XOOPS_ROOT_PATH."/class/xoopsformloader.php";
    
$form = new XoopsFormElementTray('''<br />''options');
//original:  $form->addElement(new XoopsFormDhtmlTextArea(_MB_SYSTEM_CONTENT, 'options[0]', htmlspecialchars($ts->stripSlashesGPC($options[0]), ENT_QUOTES), 15, 60));
//  start hack editor    
    
$theEditor = new XoopsFormWysiwygTextArea('','','''100%''400px''');
    
$theEditor->setName('options[0]');
    
$theEditor->setValue(htmlspecialchars($ts->stripSlashesGPC($options[0])));
    
$form->addElement($theEditor);
//  end hack editor    
    
$type_select = new XoopsFormSelect(_MB_SYSTEM_CONTENTTYPE'options[1]'$options[1]);
    
$type_select->addOption('H'_MB_SYSTEM_HTMLBLOCK);
    
$type_select->addOption('P'_MB_SYSTEM_PHPBLOCK);
    
$type_select->addOption('S'_MB_SYSTEM_SMILEYBLOCK);
    
$type_select->addOption('T'_MB_SYSTEM_NOSMILEYBLOCK);
    
$form->addElement($type_select);
    return 
$form->render();
}


Since it didn't work though does anyone have a solution?

3
DIDI5
Re: Kiovi Editor implementation???
  • 2006/4/24 17:48

  • DIDI5

  • Just popping in

  • Posts: 36

  • Since: 2006/3/24


Adding Kiovi Editor to block.
If
You have a copy of "wysiwyg" placed in your "class"(folder).
Then, try this.

include the following.

include XOOPS_ROOT_PATH . "/class/wysiwyg/formwysiwygtextarea.php";
<<==in your "class/xoopsformloader.php"!

now open up your >>>modules\system\blocks/system_block.php
find line #56 (I think...)

replace
$form->addElement(new XoopsFormDhtmlTextArea(_MB_SYSTEM_CONTENT, 'options[0]', htmlspecialchars($ts->stripSlashesGPC($options[0]), ENT_QUOTES), 15, 60));

with

$form->addElement(new XoopsFormwysiwygTextArea(_MB_SYSTEM_CONTENT, 'options[0]', htmlspecialchars($ts->stripSlashesGPC($options[0]), ENT_QUOTES), 15, 60));


there you go.
at your own risk.

4
technigrafa
Re: Kiovi Editor implementation???

I am using XOOPS 2.0.13.2 and the system_blocks file looks completely different.

Anyone know how to implement a WYSIWYG editor for custom HTML blocks? FCKeditor would be preferable over Kiovi, but tinymce or HTMLarea would work too. Or juat how to do it with kiovi would be a step in the right direction.

Thanks!

5
pedrocbv
Re: Kiovi Editor implementation???
  • 2006/7/27 12:45

  • pedrocbv

  • Just popping in

  • Posts: 16

  • Since: 2005/8/30


I made the same hack whith Inbetween and it works fine for the new blocks.

Only a small problem: if I want to modify an old custom block that was created with DHTML, the text area is empty.

Is this normal or is there another problem?

How could I modify these old blocks?

Thanks for help!

6
tzvook
Re: Kiovi Editor implementation???
  • 2006/10/10 10:49

  • tzvook

  • Just can't stay away

  • Posts: 875

  • Since: 2003/2/1 2



Login

Who's Online

235 user(s) are online (140 user(s) are browsing Support Forums)


Members: 0


Guests: 235


more...

Donat-O-Meter

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

Latest GitHub Commits