1
stratoz4
formatted textarea
  • 2003/11/23 4:00

  • stratoz4

  • Just popping in

  • Posts: 53

  • Since: 2003/7/10


I think ive seen this post before, but i couldnt find it by search.

How do i make a normal textarea in my module's form, to have the format properties that this text box does where you type to add a message to newbb.?




2
stratoz4
Re: formatted textarea
  • 2003/11/24 12:14

  • stratoz4

  • Just popping in

  • Posts: 53

  • Since: 2003/7/10


any ideas people?!?

3
Ace_Armstrong
Re: formatted textarea

No entirely sure what you are asking.

4
chapi
Re: formatted textarea
  • 2003/11/24 13:37

  • chapi

  • Theme Designer

  • Posts: 611

  • Since: 2002/1/22


These textarea belongs to /class/xoopsform/

If you don't understand these files, the best thing is to look into a file, which does what you want. In your case this might be /modules/newbb/include/forumform.inc.php

There should be an include for the xoopsform class in one of the first lines! In the code there should be a call for xoopsCodeTarea();

I didn't look exactly in these files now, but this is how it works basically ...

5
Catzwolf
Re: formatted textarea
  • 2003/11/24 14:32

  • Catzwolf

  • Home away from home

  • Posts: 1392

  • Since: 2007/9/30


This is part of the XoopsFormClass, all the code for these can be found in the directory class/xoopsform. which will give you a good idea how each form works.

The form that interests you is formhtmltextarea.php

And this can be used in your form by using the following code:

include_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php';

$sform = new XoopsThemeForm( _MD_SUBMITCATHEAD, "storyform", xoops_getenv( 'PHP_SELF' ) );

$sform->addElement( new XoopsFormDhtmlTextArea( _MD_DESCRIPTION, 'description', $description, 15, 60 ), true );

$sform->display();

6
kevincam
Re: formatted textarea
  • 2003/11/27 12:27

  • kevincam

  • Just popping in

  • Posts: 14

  • Since: 2003/2/25


I'm still trying to understand why the form class even exist now that XOOPS is using templates. Why not just create all forms using a template. Is there any situtation where you couldn't do something using templates that you can using the XOOPS from class(es)

7
Mithrandir
Re: formatted textarea

I use XoopsForm's for my pages only including forms for the easy and uniform look, but you are right, Kevincam, it does seem like it would be better to convert the XoopsForm elements to SMARTY templates, which could be included in module templates.

On the other hand, it's still important to keep the XoopsForm because the admin area doesn't use templates because of the fact that if there is an error in the template, you cannot go to admin area and fix it.

Core team is working on something in this regard, though.

Login

Who's Online

176 user(s) are online (95 user(s) are browsing Support Forums)


Members: 0


Guests: 176


more...

Donat-O-Meter

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

Latest GitHub Commits