1
deka87
Allow HTML in the DHTML text area in the registration form
  • 2009/1/10 8:00

  • deka87

  • Friend of XOOPS

  • Posts: 1125

  • Since: 2007/10/5


How do I enable html in the dhtml text area in the registration form? I have alot of users using html tags there so it get kinda ugly (see an example: about me box).
Mind anchors

2
deka87
Re: Allow HTML in the DHTML text area in the registration form
  • 2009/1/10 8:03

  • deka87

  • Friend of XOOPS

  • Posts: 1125

  • Since: 2007/10/5


or is there a way to use another text editor along with the dhtml one available for the registration form. like koivi etc.?
Mind anchors

3
ghia
Re: Allow HTML in the DHTML text area in the registration form
  • 2009/1/10 9:31

  • ghia

  • Community Support Member

  • Posts: 4953

  • Since: 2008/7/3 1


You can't prevent users from posting bad formatted texts. The example has even it's quotes escaped.
If they present themselves in this sloppy manner, too bad for them, they may attract less work (as deserved!).
If you don't like it on your site, send them a PM to clean it up and provide an explicative text or link to the possibilities of the BBCode, etc.

4
deka87
Re: Allow HTML in the DHTML text area in the registration form
  • 2009/1/10 9:35

  • deka87

  • Friend of XOOPS

  • Posts: 1125

  • Since: 2007/10/5


yeah i tried to edit it by myself first but too much work. i just remember that wehn you creat ea new custom block you sue dhtml and there is an option on where to use html or not. i thought about this one.
Mind anchors

5
deka87
Re: Allow HTML in the DHTML text area in the registration form
  • 2009/1/12 6:19

  • deka87

  • Friend of XOOPS

  • Posts: 1125

  • Since: 2007/10/5


but what about my second question? is it gonna be tough to replace dhtml by any other wysiwyg editor? lots of hacking?
Mind anchors

6
ghia
Re: Allow HTML in the DHTML text area in the registration form
  • 2009/1/12 10:49

  • ghia

  • Community Support Member

  • Posts: 4953

  • Since: 2008/7/3 1


I think you have to replace:
case "textbox":
                
//proceed to next cases
            
case "textarea":
            case 
"dhtml":
                
$form->addElement(new XoopsFormText(_PROFILE_AM_MAXLENGTH'field_maxlength'3535$field->getVar('field_maxlength''e')));
                
$form->addElement(new XoopsFormTextArea(_PROFILE_AM_DEFAULT'field_default'$field->getVar('field_default''e')));
                break;

in /modules/profile/include/forms.php by
case "textbox":
                
//proceed to next cases
            
case "textarea":
                
$form->addElement(new XoopsFormText(_PROFILE_AM_MAXLENGTH'field_maxlength'3535$field->getVar('field_maxlength''e')));
                
$form->addElement(new XoopsFormTextArea(_PROFILE_AM_DEFAULT'field_default'$field->getVar('field_default''e')));
                break;
            case 
"dhtml":
                    
// xoopseditor
                
break;

And then add a wysiwyg xoopseditor as layed out in /class/xoopseditor/sampleform.inc.php .

7
deka87
Re: Allow HTML in the DHTML text area in the registration form
  • 2009/1/12 11:59

  • deka87

  • Friend of XOOPS

  • Posts: 1125

  • Since: 2007/10/5


So i am deleting these lines:

$form->addElement(new XoopsFormText(_PROFILE_AM_MAXLENGTH'field_maxlength'3535$field->getVar('field_maxlength''e')));
$form->addElement(new XoopsFormTextArea(_PROFILE_AM_DEFAULT'field_default'$field->getVar('field_default''e')));


but i failed to find soemthing similar to this in /class/xoopseditor/sampleform.inc.php. For example I want to use koivi. what are the lines should look like?
Mind anchors

Login

Who's Online

314 user(s) are online (50 user(s) are browsing Support Forums)


Members: 0


Guests: 314


more...

Donat-O-Meter

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

Latest GitHub Commits