31
disky
Re: Another strange behavious from Spaw
  • 2004/1/8 23:52

  • disky

  • Just popping in

  • Posts: 90

  • Since: 2003/10/31


I have been working on this error all night.

As far as i can figure out it is when the innerHTML is being set that the javascript interpreter simply changes all links.

I have fixed the problem by simple removing all entries of:
http://www.mydomaind.com/modules/wfsection/admin/
from the text returned from the SPAW editor when wfsection saves it into the database.
It works, but i really feel it is a ugly hack to fix it.

Hopefully someone could show a better solution.

But at least the webdesigner is happy now :)

32
svaha
Re: Another strange behavious from Spaw
  • 2004/1/9 10:36

  • svaha

  • Just can't stay away

  • Posts: 896

  • Since: 2003/8/2 2


Did you delete this entries in the database?

33
morris
Re: How to use Spaw within your modules. Examples
  • 2004/1/11 10:48

  • morris

  • Just popping in

  • Posts: 54

  • Since: 2003/9/25


Now it's allmost a week later, perhaps you can give out this information now

Quote:
I would advise against using this editor for the forums, using spaw for your admin side is ok but to give users the ability to post via this method will open up your website to possible security issues. So therefore I am reluctant to give out this information at this time.

34
Bazus
Re: How to use Spaw within your modules. Examples
  • 2004/1/12 7:16

  • Bazus

  • Not too shy to talk

  • Posts: 144

  • Since: 2002/9/23


I haven't been able to fix the problem with spaw for the news module.. everything works the first time when I create a new item in the news module, but once I click on 'edit' that news created, the title is lost (It places a cut out title of the first news created), and the design window shows the news with all the html code, and in order to edit that I have to delete all that code and start all over again.


I saw another thread in which chapi had created a patch for the news module for spaw.. is that what I need in order to fix this bug ??

35
fluent
Re: How to use Spaw within your modules. Examples
  • 2004/1/14 16:15

  • fluent

  • Just popping in

  • Posts: 43

  • Since: 2003/11/22


Quote:

$spaw_root = XOOPS_ROOT_PATH . '/modules/spaw/';


Where do I get what should be in this directory?

36
samuels
Re: How to use Spaw within your modules. Examples
  • 2004/1/20 9:23

  • samuels

  • Quite a regular

  • Posts: 249

  • Since: 2003/10/30


I'm triyng to integrate image manager with spaw, but I've a lot of problems.
I don't know why spaw editor rejects it.
Nowadays i must drop the image inside the text area to use it.

Any idea?

37
Dutchies
Re: How to use Spaw within your modules. Examples
  • 2004/4/1 10:43

  • Dutchies

  • Just popping in

  • Posts: 5

  • Since: 2004/4/1 1


Hi,

I just can't get this thing to work

I want to use spaw with wf-section. In stalled spaw as module but now way i can get it to work as the tutorial describes.

Can someone explain me wich files in need to edit with what lines. Pfff it's just too hard for me hahahaha.

Thanx.

38
Catzwolf
Re: How to use Spaw within your modules. Examples
  • 2004/4/1 13:02

  • Catzwolf

  • Home away from home

  • Posts: 1392

  • Since: 2007/9/30


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"6015);
xoopsSmilies("hometext");

xoopsCodeTarea("bodytext"60152);
xoopsSmilies("bodytext");



The bits of code we want to change are:
xoopsCodeTarea("hometext"6015);
xoopsSmilies("hometext");

xoopsCodeTarea("bodytext"60152);
xoopsSmilies("bodytext");


And these must be replaced with:
$sw = new SPAW_Wysiwyghometext$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$breaks0);


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

39
m0nty
Re: How to use Spaw within your modules. Examples
  • 2004/4/3 17:25

  • m0nty

  • XOOPS is my life!

  • Posts: 3337

  • Since: 2003/10/24


soz messed up.. lol reply had been answered already..

40
m0nty
Re: How to use Spaw within your modules. Examples
  • 2004/4/3 17:29

  • m0nty

  • XOOPS is my life!

  • Posts: 3337

  • Since: 2003/10/24


great mod btw catz :) will be very useful until spaw/wysiwyg is implemented into the XOOPS core :)

Login

Who's Online

246 user(s) are online (145 user(s) are browsing Support Forums)


Members: 0


Guests: 246


more...

Donat-O-Meter

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

Latest GitHub Commits