DragonPrime - LoGD Resource Community
Welcome Guest
  • Good morning, Guest.
    Please log in, or register.
  • September 02, 2010, 09:44:56 AM
Home Forums News Links Downloads Login Register Advanced Search
* * *
DragonPrime Menu
Login
 
 
Resource Pages
IRC Channels
Search

Pages: [1]   Go Down
  Print  
Author Topic: Textbox  (Read 852 times)
0 Members and 1 Guest are viewing this topic.
CortalUX
Dwellings Project
Mod God
*****
Offline Offline

Posts: 793


Wogga! Meep!


View Profile WWW
« on: March 16, 2005, 06:19:32 AM »

A new showform/objpref/pref/config/settings option... 'textbox'
I think this would be quite good, and you could have a little tickbox for whether or not LotGD should return an 'nl2br'd string.
Maybe it could act like range?
textbox,<NUM OF COLS>,<NUM OF ROWS>
Logged
Kendaer
Global Moderator
Mod God
*****
Offline Offline

Posts: 1806


Once a dragon, always a dragon


View Profile WWW
« Reply #1 on: March 17, 2005, 10:56:22 AM »

A new showform/objpref/pref/config/settings option... 'textbox'
I think this would be quite good, and you could have a little tickbox for whether or not LotGD should return an 'nl2br'd string.
Maybe it could act like range?
textbox,<NUM OF COLS>,<NUM OF ROWS>

You mean this? (from showform)
Code:
       case "textarea":
            $cols = $info[2];
            if (!$cols) $cols = 70;
            rawoutput("<textarea class='input' name='$keyout' cols='$cols' rows='5'>".htmlentities(str_replace("`n", "\n", $row[$key]))."</textarea>");
            break;
 
No, it doesn't allow you to specify the rows, but that would be about ... 2 lines of code?
Not something I really see the need for though, 5 lines in a block are generally enough for a quick edit box.
« Last Edit: March 17, 2005, 10:56:52 AM by Kendaer » Logged

Ex co-developer of LotGD
Kendaer
Global Moderator
Mod God
*****
Offline Offline

Posts: 1806


Once a dragon, always a dragon


View Profile WWW
« Reply #2 on: March 17, 2005, 10:58:10 AM »

Of course, YOU need to handle the conversion of newline to `n or newline to <BR> on your own on the handling of the form.  showform has NOTHING to do with what you do with the data when you get it back, nor should it (nor could it!)
Logged

Ex co-developer of LotGD
Sichae
iMod God
SVN Users
Mod God
*
Offline Offline

Posts: 3458


If ya didn't get it by now... you're hopeless...


View Profile WWW
« Reply #3 on: March 17, 2005, 12:13:01 PM »

Or, you can just post as you wish (with enters, instead of <br> and `n), and then when you call it in:
Code:
require_once("lib/nltoappon.php");
$a = nltoappon(get_module_setting("text"));
Then, it would handle the breaks, be they enter key.

Of course, as Kendaer stated, it is not needed, nor much useful.
« Last Edit: March 17, 2005, 12:14:49 PM by Sichae » Logged

If you didn't understand anything in the above post, don't try to attempt anything suggested.

CortalUX
Dwellings Project
Mod God
*****
Offline Offline

Posts: 793


Wogga! Meep!


View Profile WWW
« Reply #4 on: March 19, 2005, 03:16:29 PM »

Ah, cool.
I didn't know of it.. there are ways I could have used this! *evillaugh*
I knew of nltoappon.. *grin*
I'm making a blog module, so this would help.. I've currently got a showform then a hardcoded textarea.
Logged
Pages: [1]   Go Up
  Print  
 
Jump to:  


*
DragonPrime Notices
Welcome to DragonPrime - The LoGD Resource Community!

Support Us
No funds raised yet this year
Your help is greatly appreciated!
Who's Online
31 Guests, 0 Users
DragonPrime LoGD
Recent Topics
Home Forums News Links Downloads Login Register Advanced Search