after weeks and weeks of searching,lirking,editing,hacking and so on...
I finally got koivi editor working on AMS article module under 2.2.4
I searched lots of forums but never found a really working code, so here is mine:
file is : AMS/include/storyform.inc.php
if ($xoopsModuleConfig['editor'] == "koivi" && file_exists(XOOPS_ROOT_PATH."/class/xoopseditor/koivi/formwysiwygtextarea.php")) {
include_once XOOPS_ROOT_PATH."/class/xoopseditor/koivi/formwysiwygtextarea.php";
$text = $story->hometext("Edit");
$text .= $story->bodytext("Edit") != "" ? "[extend]".$story->bodytext("Edit") : "";
$mikeform = new XoopsFormWysiwygTextArea(_AMS_NW_THESCOOP, 'hometext', $text, '100%', '200px', 'hiddenHometext');
$mikeform->setName('hometext');
$mikeform->setValue($text);
$sform->addElement($mikeform, false);
//$sform->addElement(new XoopsFormWysiwygTextArea(_AMS_NW_THESCOOP, 'hometext', $story->hometext("Edit"), '100%', '200px', ''), false);
//$sform->addElement(new XoopsFormWysiwygTextArea(_AMS_AM_EXTEXT, 'bodytext', $story->bodytext("Edit"), '100%', '200px', ''), false);
}
else {
$text = $story->hometext("Edit");
$text .= $story->bodytext("Edit") != "" ? "[extend]".$story->bodytext("Edit") : "";
$sform->addElement(new XoopsFormDhtmlTextArea(_AMS_NW_THESCOOP, 'hometext', $text, 15, 60, 'hiddenHometext'));
}
with the correct path in the starting includes and the two methods setValue and setName now i got anything to work!!!!!
Now I can write new aricles with working preview and edit old one correctly.
finally...
hope not to foind anything wrong, let me know if it works for anyone!