Ok believe me or not, it is actually quite easy to implement this and I am sure after I explain it a bit better you'll end up kick yourselfs (Or me lol).
Lets take the News module as an example here:
First of all there is only 1 file that need to be edited on the admin side of the news module:
xoops_root/modules/news/admin/storyform.inc
At or around line 31 (right after include XOOPS_ROOT_PATH."/include/xoopscodes.php";)
Insert or add these lines:
$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";
}
What this bit does is to say if the spaw module is installed and it is active, then include it in the code, else ignore and move on
Next look for these lines of code (around lines 84):
echo ""
._AM_INTROTEXT."
n";
xoopsCodeTarea("hometext", 60, 15);
xoopsSmilies("hometext");
xoopsCodeTarea("bodytext", 60, 15, 2);
xoopsSmilies("bodytext");
The bits of code we want to change are:
xoopsCodeTarea("hometext", 60, 15);
xoopsSmilies("hometext");
xoopsCodeTarea("bodytext", 60, 15, 2);
xoopsSmilies("bodytext");
And these must be replaced with:
$sw = new SPAW_Wysiwyg( hometext, $hometext, 'en', 'full', 'default', '99%', '600px' );
$sw -> show();
$sw = new SPAW_Wysiwyg( 'bodytext', $bodytext, 'en', 'full', 'default', '99%', '600px' );
$sw -> show();
If you do not want to use the spaw editor for the $hometext then don't replace the code for that.
We have another file to edit and this time you will find it at:
xoops_root/class/xoopstory.php
The reason we are changing this file is to stop XOOPS converting linebreak to < br /> as this will add extra lines when displaying your story.
Look for the function
hometext($format="Show") around line 298:
And the bit of code we are after is this line here at line 311
case "Show":
$hometext = $myts->makeTareaData4Show($this->hometext,$html,$smiley,$xcodes);
break;
we need to change this to use an updated function in the $myts class now to use this properly, so change the above to:
$hometext = $myts->makeTareaData4Show($this->hometext,$html,$smiley,$xcodes,1, $breaks= 0);
The number after $xcodes is to allow images and the number after that will stop the line break conversion, just change this number to a '1' to allow line break conversion.
Do the same for the
function bodytext($format="Show") as you did here.
So really, you change where you would edit the bodytext of your module and where it will display the bodytext of your module.
This example is for modules that do not use XoopsForm class.
Hope this helps in some way