1
hervet
[mini guide] How to quickly replace all the textarea with kiovi in Xoops
  • 2005/2/3 16:37

  • hervet

  • Friend of XOOPS

  • Posts: 2267

  • Since: 2003/11/4


Hi,

First, this is just an exercice and a hack , don't use it on a production website until you have completly and fully tested id !

The goal is to replace all the XOOPS dhtml textareas (input boxes), like the one you can see when you create a custom block, with Kiovi.

Begin with the kiovi's installation. Please report to the text file named readme.txt inside the kiovi's archive to know how to do it.

Once it's done, edit the file /xoops/class/wysiwyg/formwysiwygtextarea.php and rename the function render() with _render(), so you must have :
Quote:

function _render()

I have just added the underscore character at the first position of the name.

After this, edit the file named /xoops/class/xoopsform/formdhtmltextarea.php

After this line,
Quote:

include_once XOOPS_ROOT_PATH."/class/xoopsform/formtextarea.php";

add this new one :
Quote:

include_once XOOPS_ROOT_PATH."/class/wysiwyg/formwysiwygtextarea.php";


Then, replace the line :
Quote:

class XoopsFormDhtmlTextArea extends XoopsFormTextArea

with :
Quote:

class XoopsFormDhtmlTextArea extends XoopsFormWysiwygTextArea


replace all the content of the function named XoopsFormDhtmlTextArea with :
Quote:

function XoopsFormDhtmlTextArea($caption, $name, $value, $rows='100%', $cols='400px', $hiddentext="xoopsHiddenText")
{
$this->XoopsFormWysiwygTextArea($caption, $name, $value, $rows, $cols,'',$skin="default");
}


and replace the function render() with :
Quote:

function render()
{
return $this->_render();
}

That's all !

If someone have the time, you can do the same with the class XoopsFormTextArea contained in the file formtextarea.php

Bye,
Herve

2
irmtfan
Re: [mini guide] How to quickly replace all the textarea with kiovi in Xoops
  • 2005/2/3 17:22

  • irmtfan

  • Module Developer

  • Posts: 3419

  • Since: 2003/12/7


i do this but have a fatal error:
Fatal error: Class xoopsformdhtmltextareaCannot inherit from undefined class xoopsformwysiwygtextarea in /.../.../public_html/test/class/xoopsform/formdhtmltextarea.php on line 56

do i wrong somthing?
many thanks for share it.this hack is very amazing

3
hervet
Re: [mini guide] How to quickly replace all the textarea with kiovi in Xoops
  • 2005/2/3 17:31

  • hervet

  • Friend of XOOPS

  • Posts: 2267

  • Since: 2003/11/4


that's because I have forgotted one thing.
In the file called formdhtmltextarea.php, just after this line :
Quote:

include_once XOOPS_ROOT_PATH."/class/xoopsform/formtextarea.php";

add this one :
Quote:

include_once XOOPS_ROOT_PATH."/class/wysiwyg/formwysiwygtextarea.php";


Sorry for my error.
I have edited and corrected my first post.

Bye,
Hervé

4
irmtfan
Re: [mini guide] How to quickly replace all the textarea with kiovi in Xoops
  • 2005/2/3 17:39

  • irmtfan

  • Module Developer

  • Posts: 3419

  • Since: 2003/12/7


aha,
works now.
thanks*1000 hervet you're rock

5
LazyBadger
Re: [mini guide] How to quickly replace all the textarea with kiovi in Xoops

Tested OK, and modified files combined into one package.
Site-Admins, which want to use it, must also remember - Koivi kill automatic redirects for FireFox visitors

6
irmtfan
Re: [mini guide] How to quickly replace all the textarea with kiovi in Xoops
  • 2005/2/3 19:10

  • irmtfan

  • Module Developer

  • Posts: 3419

  • Since: 2003/12/7


do you read this in the document of koivi editor:
Quote:
Solve Redirect Problem under Gecko Browsers

This patch was made by FrankBlack (thx for your support)

The malfunction of redirecting pages is a bug within Gecko-based browsers. Here a solution to prevent this:


Open system_redirect.html and change the line with body-tag to:




Open file xoopsroot/include/functions.php and look for function redirect_header. The line with the body-tag have to look like this:


7
tzvook
Re: [mini guide] How to quickly replace all the textarea with kiovi in Xoops
  • 2005/2/3 19:15

  • tzvook

  • Just can't stay away

  • Posts: 875

  • Since: 2003/2/1 2


Hello
Sorry to say that, but every time I see someone mention the Koivi editor I try yo see if it changed, and , well, it's way behind SPAW or HTMLAREA !!!

Why going to that direction?
one who used to htmlarea wouldn't come close to Koivi!!!
Is there something I'm missing ?

8
hervet
Re: [mini guide] How to quickly replace all the textarea with kiovi in Xoops
  • 2005/2/3 19:40

  • hervet

  • Friend of XOOPS

  • Posts: 2267

  • Since: 2003/11/4


Kiovi is an excellent editor and above all, it runs with much more browsers than the others, even if I really like Spaw.

9
tzvook
Re: [mini guide] How to quickly replace all the textarea with kiovi in Xoops
  • 2005/2/3 19:53

  • tzvook

  • Just can't stay away

  • Posts: 875

  • Since: 2003/2/1 2


Well, I found it very buggy, image management is very bad and less friendly to end user.
Yep SPAW is not bad but is not enough feature rich...

10
LazyBadger
Re: [mini guide] How to quickly replace all the textarea with kiovi in Xoops

Quote:

tzvook wrote:
one who used to htmlarea wouldn't come close to Koivi!!!
Is there something I'm missing ?

HTMLArea is sloooow!

Login

Who's Online

453 user(s) are online (366 user(s) are browsing Support Forums)


Members: 0


Guests: 453


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