1
I have the Spaw module installed on my site. I am trying to get it implemented into the default News module but am having one slight problem. The editor shows up properly on the story page and a story can be entered fine. The story shows up as expected when viewing it. What is screwed up is when you edit the story, the spaw editor is displaying all of the html code in addition to the story.
I tried to follow Catwolf's directions to the letter but feel I am missing something. The only difference from the code he included, was that I am using spaw for the Extended Text, not the Intro Text. Here is what I did...
** Added the following code to NEWS/ADMIN/STORYFORM.INC.PHP
$module_handler = &xoops_gethandler('module');
$module = &$module_handler->getByDirname('spaw');
if (is_object($module) && $module->getVar('isactive'))
{
include_once XOOPS_ROOT_PATH . "/modules/spaw/spaw_control.class.php";
}** AND
echo "
"._AM_EXTEXT."
\n";
// xoopsCodeTarea("bodytext", 60, 15, 2);
$sw = new SPAW_Wysiwyg( 'bodytext', $bodytext, 'en', 'full', 'default', '99%', '600px' );
$sw -> show();
xoopsSmilies("bodytext");
** Edited /class/xoopsstory.php with:
case "Show":
//$bodytext = $myts->makeTareaData4Show($this->bodytext,$html,$smiley,$xcodes);
$bodytext = $myts->makeTareaData4Show(trim($this->bodytext), $html, $smiley, $xcodes, 1, 0);
break;
case "Edit":
//$bodytext = $myts->makeTareaData4Edit($this->bodytext);
$bodytext = $myts->makeTareaData4Edit($this->bodytext, 1, 0, 0, 0, 0); NEWS/ADMIN/STORYFORM.INC.PHP
Did I miss something??