Arggh, I had to test this myself first, but this will work.
Change the xoops_version.php of ams from:
$modversion['config'][10]['options'] = array('_AMS_MI_EDITOR_DEFAULT' => 'default', '_AMS_MI_EDITOR_KOIVI' => 'koivi');
to:
$modversion['config'][10]['options'] = array('_AMS_MI_EDITOR_DEFAULT' => 'default', '_AMS_MI_EDITOR_KOIVI' => 'koivi', 'inbetween' => 'inbetween);
Add in include/storyform.inc.php right after:
if ($xoopsModuleConfig['editor'] == "koivi" && file_exists(XOOPS_ROOT_PATH."/class/wysiwyg/formwysiwygtextarea.php")) {
include_once XOOPS_ROOT_PATH."/class/wysiwyg/formwysiwygtextarea.php";
$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);
}
elseif ($xoopsModuleConfig['editor'] == "inbetween" && file_exists(XOOPS_ROOT_PATH."/class/xoopseditor/inbetween/forminbetweentextarea.php")) {
include_once XOOPS_ROOT_PATH."/class/xoopseditor/inbetween/forminbetweentextarea.php";
$sform->addElement(new XoopsFormInbetweenTextArea(array('caption'=>_AMS_NW_THESCOOP, 'name'=>'hometext', 'value'=>$story->hometext("Edit"), 'width'=>'600px', 'height'=>'400px'),true));
$sform->addElement(new XoopsFormInbetweenTextArea(array('caption'=>_AMS_AM_EXTEXT, 'name'=>'bodytext', 'value'=>$story->bodytext("Edit"), 'width'=>'600px', 'height'=>'400px'),false));
}
Change in submit.php:
case "preview":
$xt = new AmsTopic($xoopsDB->prefix("ams_topics"), $_POST['topic_id']);
if ($xoopsModuleConfig['editor'] != "koivi") {
$text = explode("[extend]", $hometext);
$hometext = $text[0];
$bodytext = isset($text[1]) ? $text[1] : "";
}
to:
case "preview":
$xt = new AmsTopic($xoopsDB->prefix("ams_topics"), $_POST['topic_id']);
if (($xoopsModuleConfig['editor'] != "koivi") && ($xoopsModuleConfig['editor'] != "inbetween")) {
$text = explode("[extend]", $hometext);
$hometext = $text[0];
$bodytext = isset($text[1]) ? $text[1] : "";
}
Change in submit.php:
case "post":
if ($xoopsModuleConfig['editor'] != "koivi") {
$text = explode("[extend]", $_POST['hometext']);
$hometext = $text[0];
$bodytext = isset($text[1]) ? $text[1] : "";
}
to:
case "post":
if (($xoopsModuleConfig['editor'] != "koivi") && ($xoopsModuleConfig['editor'] != "inbetween")) {
$text = explode("[extend]", $_POST['hometext']);
$hometext = $text[0];
$bodytext = isset($text[1]) ? $text[1] : "";
}
Then update the module and you are done (hopefully).