1
Ruddle
SPAW in News Module
  • 2004/8/16 14:10

  • Ruddle

  • Just popping in

  • Posts: 61

  • Since: 2003/11/10


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 "<br /></p><p><b>"._AM_EXTEXT."</b><br /><br />\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??

2
Ruddle
Re: SPAW in News Module
  • 2004/8/16 14:59

  • Ruddle

  • Just popping in

  • Posts: 61

  • Since: 2003/11/10


OK.... let's regroup. I looked back through Chapi's code and got it working. BUT... one more question...

When a table is entered in SPAW, there is a tremendous amount of space placed above it.

Resized Image

Any ideas on how to fix this?

3
Catzwolf
Re: SPAW in News Module
  • 2004/8/16 16:27

  • Catzwolf

  • Home away from home

  • Posts: 1392

  • Since: 2007/9/30


Quote:

Ruddle wrote:
OK.... let's regroup. I looked back through Chapi's code and got it working. BUT... one more question...

When a table is entered in SPAW, there is a tremendous amount of space placed above it.

Resized Image

Any ideas on how to fix this?


We have a version of News that works with our spaw module and handles tables correctly, would you like a copy of this?

4
Ruddle
Re: SPAW in News Module
  • 2004/8/16 16:30

  • Ruddle

  • Just popping in

  • Posts: 61

  • Since: 2003/11/10


Thanks! Definately. Where can I find it?

5
Catzwolf
Re: SPAW in News Module
  • 2004/8/16 18:39

  • Catzwolf

  • Home away from home

  • Posts: 1392

  • Since: 2007/9/30


Quote:

Ruddle wrote:
Thanks! Definately. Where can I find it?


Give me a day or so to upload it to our website =)

6
Kalobotz
Re: SPAW in News Module
  • 2004/8/19 15:04

  • Kalobotz

  • Not too shy to talk

  • Posts: 133

  • Since: 2004/5/26


That's great! Will the news be version 1.2?

7
Catzwolf
Re: SPAW in News Module
  • 2004/8/19 18:12

  • Catzwolf

  • Home away from home

  • Posts: 1392

  • Since: 2007/9/30


Quote:

Kalobotz wrote:
That's great! Will the news be version 1.2?


No, as we do not want to step on anyones toes here with their module. So we have used the previous version.

8
Kalobotz
Re: SPAW in News Module
  • 2004/8/20 11:45

  • Kalobotz

  • Not too shy to talk

  • Posts: 133

  • Since: 2004/5/26


I installed and am getting the table error but I only typed in BLOG Title in Design view and then on edit or preview I get this in Design and code view.

DESIGN VIEW:
<P align=center><STRONG>BLOG Text <TABLE style="WIDTH: 91px; HEIGHT: 64px" border=1> <TBODY> <TR> <TD></TD> <TD></TD> <TD></TD></TR> <TR> <TD></TD> <TD></TD> <TD></TD></TR> <TR> <TD></TD> <TD></TD> <TD></TD></TR></TBODY></TABLE></STRONG></P>


CODE VIEW:
<P align=center><STRONG>BLOG Text <TABLE style="WIDTH: 91px; HEIGHT: 64px" border=1> <TBODY> <TR> <TD></TD> <TD></TD> <TD></TD></TR> <TR> <TD></TD> <TD></TD> <TD></TD></TR> <TR> <TD></TD> <TD></TD> <TD></TD></TR></TBODY></TABLE></STRONG></P>



Login

Who's Online

233 user(s) are online (156 user(s) are browsing Support Forums)


Members: 0


Guests: 233


more...

Donat-O-Meter

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

Latest GitHub Commits