1
shirokko
Edit content with xoopsform
  • 2008/11/21 7:48

  • shirokko

  • Just popping in

  • Posts: 4

  • Since: 2008/10/16


I had a trouble using the content mod:
if I tried to modify a previous published text, the text were reloaded into the form uncorrectrly, because the ' character trimmed out the remaining text. I had a solution editing the
render
function into the control definition scripts like
class/xoopsform/formtext.php


function render() {
        
//previously was:
                //return "getName()."' id='".$this->getName()."' size='".$this->getSize()."' maxlength='".$this->getMaxlength()."' value='".$this->getValue()."'".$this->getExtra()." />";
        //now is:
return ".$this->getName()."' id='".$this->getName()."' size='".$this->getSize()."' maxlength='".$this->getMaxlength()."' value=\"".$this->getValue()."\"".$this->getExtra()." />";
    }


Knows anybody a better solution?

2
shirokko
Re: Edit content with xoopsform
  • 2008/11/30 19:46

  • shirokko

  • Just popping in

  • Posts: 4

  • Since: 2008/10/16


Could anybody answer me, please?

3
ghia
Re: Edit content with xoopsform
  • 2008/11/30 22:53

  • ghia

  • Community Support Member

  • Posts: 4953

  • Since: 2008/7/3 1


Your modification will have the same fault but now for strings which contain the double quote.
A solution may be to put true in as argument for getValue, but this may break compatibility and cause problems for other functions or modules.
It is a very difficult and complicated matter.

4
shirokko
Re: Edit content with xoopsform
  • 2008/12/1 11:27

  • shirokko

  • Just popping in

  • Posts: 4

  • Since: 2008/10/16


Thank you very much, ghia! I were thinking it was right because the string in $this->getValue() was modified by an addslashes() function.

Now my question is: do somebody uses xoopsform or now it's deprecated because all people use wysiwyg editors? And what of them?

Thanks again

5
ghia
Re: Edit content with xoopsform
  • 2008/12/1 13:23

  • ghia

  • Community Support Member

  • Posts: 4953

  • Since: 2008/7/3 1


Xoopsform is used (almost) everywhere, where information is to be entered in the XOOPS site. The editor is only a special element in such a form, as is the case when you post in this forum. The other elements in that form are eg the Subject and the Options tray with the submit button.

6
shirokko
Re: Edit content with xoopsform
  • 2008/12/1 14:10

  • shirokko

  • Just popping in

  • Posts: 4

  • Since: 2008/10/16


I understand.

Thanks, ghia
Pleased to met you

Login

Who's Online

249 user(s) are online (118 user(s) are browsing Support Forums)


Members: 0


Guests: 249


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