1
chco2
Editors in 2.4.0 beta
  • 2009/8/21 19:37

  • chco2

  • Module Developer

  • Posts: 374

  • Since: 2004/3/5 1


Hi!

Just installed a completely new fresh 2.4 beta.
One thing I noticed that in both the news module and the wfchannel most editors are available, but only dhtml seems to work. And in wfchannel I cannot even choose that editor.

Anyone any suggestions?

thnx

2
trabis
Re: Editors in 2.4.0 beta
  • 2009/8/28 10:08

  • trabis

  • Core Developer

  • Posts: 2269

  • Since: 2006/9/1 1


Hi,

First step after installing new pack of editors is clearing xoops_data/caches/xoops_cache. This will make new editors available.

Fix for news module:
Edit news/include/functions.php and make this change:
function news_isX22()
{
    return (
substr(XOOPS_VERSION09) >= "XOOPS 2.2") ? true false;
}


For wfchannel we have to look into wfresource first.
Open file wfresource/class/xoopsforms/formelement.php and make sure the file ends like this:
/**
     * Generates output for the element.
     *
     * This method is abstract and must be overwritten by the child classes.
     *
     * @abstract
     */
    
function render() {
    }
    
     
/**
     * get the caption for the element
     *
     * @param bool $encode To sanitizer the text?
     * @return string
     */
    
function getTitle($encode false)
    {
        if (
strlen($this->_description)>0)
            return 
$encode htmlspecialchars(strip_tags($this->_caption.' - '.$this->_description), ENT_QUOTES) : strip_tags($this->_caption.' - '.$this->_description);
        else
            return 
$encode htmlspecialchars(strip_tags($this->_caption), ENT_QUOTES) : strip_tags($this->_caption);
    }
}

?>

3
hervet
Re: Editors in 2.4.0 beta
  • 2009/8/28 12:30

  • hervet

  • Friend of XOOPS

  • Posts: 2267

  • Since: 2003/11/4


Quote:

trabis wrote:
Fix for news module:
Edit news/include/functions.php and make this change:

Isn't there a better way to do it ?
I'm not going to make a new version of this code each time a new version of XOOPS is released.
It's time to make something definitive AND running ...

This point is becoming more than boring.
The way to use editors is changing every time, please stop this, fix one or two editors (a simple textaread AND an html area) and stop this slaughter.

Modifying code of running module to adapt to a BETA version is not the best idea too.

4
trabis
Re: Editors in 2.4.0 beta
  • 2009/8/28 12:38

  • trabis

  • Core Developer

  • Posts: 2269

  • Since: 2006/9/1 1


Quote:

hervet wrote:

This point is becoming more than boring.
The way to use editors is changing every time, please stop this, fix one or two editors (a simple textaread AND an html area) and stop this slaughter.



The way of using editors did not change. The only problem was the change of version number from 2.3 to 2.4. You can assume that future versions of XOOPS will use same method for editors so it is best to check if version is bigger than 2.2 that checking against a fix number.

5
hervet
Re: Editors in 2.4.0 beta
  • 2009/8/28 12:59

  • hervet

  • Friend of XOOPS

  • Posts: 2267

  • Since: 2003/11/4


Ok sorry, but I persist on 2 points :
1/ It's not a good idea to change the code of running modules for a BETA version
2/ It's time to adopt a definitive editor

6
chco2
Re: Editors in 2.4.0 beta
  • 2009/8/28 13:01

  • chco2

  • Module Developer

  • Posts: 374

  • Since: 2004/3/5 1


Hi thanks for the tips!
And if I'm reading this correct.. you will have to be changing this code if it is a beta or not, right? Since a new full release will be called 2.4 anyhows.

7
trabis
Re: Editors in 2.4.0 beta
  • 2009/8/28 13:08

  • trabis

  • Core Developer

  • Posts: 2269

  • Since: 2006/9/1 1


Sure. You(or module dev) will have to make changes to any module that looks for XOOPS 2.3.x instead of XOOPS 2.3 or greater(2.4, 2.5, 2.6, etc).

8
hervet
Re: Editors in 2.4.0 beta
  • 2009/8/28 13:14

  • hervet

  • Friend of XOOPS

  • Posts: 2267

  • Since: 2003/11/4


I'll change it in the opposite way, XOOPS 2.0.x will be tested and if it's not this version, it will be used in the >= 2.3 way.

9
trabis
Re: Editors in 2.4.0 beta
  • 2009/8/28 13:32

  • trabis

  • Core Developer

  • Posts: 2269

  • Since: 2006/9/1 1


Quote:

hervet wrote:
Ok sorry, but I persist on 2 points :
1/ It's not a good idea to change the code of running modules for a BETA version
2/ It's time to adopt a definitive editor


Thanks hervet,
As for point 1, I believe we're are doing this for test only. You should not be using XOOPS 2.4 beta for a start.

As for point 2 I'm open for discussion. Personally I'm fine with xoopseditor alone (dhtml).

10
hervet
Re: Editors in 2.4.0 beta
  • 2009/8/28 13:38

  • hervet

  • Friend of XOOPS

  • Posts: 2267

  • Since: 2003/11/4


Most of the sites content is maintained by non technician people so they need a WYSIWYG editor with images uploading features.

The question is which one to adopt, may be it's interesting to see what other projects have done (Wordpress for example), what editors projects are alive still a long time and maintained.

Personnaly I vote for Tiny MCE.

Login

Who's Online

188 user(s) are online (92 user(s) are browsing Support Forums)


Members: 1


Guests: 187


goffy,

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