1
ezteok
Re: How to use SPAW wysiwyg editor with the News module!
  • 2003/10/23 19:56

  • ezteok

  • Just popping in

  • Posts: 3

  • Since: 2003/7/21


Now we are talking And when will this release be? Soon i hope because every self respecting CMS should have a decent editor... IMHO

Grtnx,

Jan



2
ezteok
Re: How to use SPAW wysiwyg editor with the News module!
  • 2003/10/23 13:55

  • ezteok

  • Just popping in

  • Posts: 3

  • Since: 2003/7/21


Hmm i'm using x2.05 to so that can't be the problem. I can post and edit articles with no error whatsoever... What generates this message? I mean is it a xoops, apache or browser message? And, if it is apache, are you using mod_security? And how about the owner (rights) of the dir you create?

Jan



3
ezteok
How to use SPAW wysiwyg editor with the News module!
  • 2003/10/23 11:15

  • ezteok

  • Just popping in

  • Posts: 3

  • Since: 2003/7/21


I was looking for a methode to replace the XOOPS editor with a wysiwyg editor. With nuke i used Htmlarea which is not a very good editor and gives a lot of errors even when correctly installed (IMHO, i'm sorry). After a while i found SPAW. This is a perfect wysiwyg editor, looks nice and has a lot features.

I've hacked the XOOPS news module, only a few modification are necessary, and it works great! Below is how this can be done:

1) Download SPAW

2) Extract it in the /include dir (i.e. /include/spaw) and configure /include/spaw/config/spaw_control.config.php

3) Open modules/news/admin/storyform.inc.php in your editor

4) From here you have two options. Download my hacked storyform.inc.php or make the modification below:

After:

}
include XOOPS_ROOT_PATH."/include/xoopscodes.php";
if(!isset($submit_page)){
$submit_page = $HTTP_SERVER_VARS['PHP_SELF'];
}

Add:

$_root = XOOPS_ROOT_PATH;

define('DR', $_root);
unset($_root);

$spaw_root = DR.'/include/spaw/';

include $spaw_root.'spaw_control.class.php';

$spaw_dropdown_data['style']['default'] = 'No styles';
$spaw_dropdown_data['style']['style1'] = 'Style no. 1';
$spaw_dropdown_data['style']['style2'] = 'Style no. 2';

After:

echo "</p><p><b>"._AM_INTROTEXT."</b><br /><br />\n";

Add:

if (isset($HTTP_GET_VARS)) {
foreach ($HTTP_GET_VARS as $k => $v) {
$$k = $v;
}
}

$sw = new SPAW_Wysiwyg('hometext' /*name*/, $hometext /*value*/,'eng' /*language*/, 'full' /*toolbar mode*/, 'default' /*theme*/,'100%' /*width*/, '450px' /*height*/);

$sw->show();


Remark/delete: xoopsCodeTarea("hometext", 60, 15);

After:

echo "<br /></p><p><b>"._AM_EXTEXT."</b><br /><br />\n";

Add:

$trans_tbl = get_html_translation_table (HTML_ENTITIES);
$trans_tbl = array_flip ($trans_tbl);
$bodytext = strtr ($bodytext, $trans_tbl);

$sw = new SPAW_Wysiwyg('bodytext' /*name*/, $bodytext /*value*/,'eng' /*language*/, 'full' /*toolbar mode*/, 'default' /*theme*/,'100%' /*width*/, '450px' /*height*/);

$sw->show();


Remark/delete: xoopsCodeTarea("bodytext", 60, 15, 2);

And that's 'all' Now you have a perfect wysiwyg editor for XOOPS news.

No matter what methode you decide to use, download my version or make the modfications yourself, PLEASE make a backup first and create some test-content first!!!!!!!

Happy SPAW/Xoopsing :)

Jan Koetze

WWW.KOETZE.NET




TopTop



Login

Who's Online

230 user(s) are online (142 user(s) are browsing Support Forums)


Members: 0


Guests: 230


more...

Donat-O-Meter

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

Latest GitHub Commits