Go to Post As Frank said, when an FRC team hurts, we all hurt. - Hallry [more]
Home
Go Back   Chief Delphi > Technical > IT / Communications > Website Design/Showcase
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 29-09-2002, 13:24
Trashed20's Avatar
Trashed20 Trashed20 is offline
Boom, Shawalala Boom!
#0862 (PCEP Lighting)
 
Join Date: Jan 2002
Location: Canton, MI
Posts: 528
Trashed20 will become famous soon enough
Send a message via AIM to Trashed20
Question New Line Input Parsing

Well, as everyone knows, not everyone knows how to use the <br> tag when posting on a website, and that is my problem. I want to have my input be automatically parsed when you hit enter

to get a new line like this. I've been looking round the web and haven't found any info on how to do this. if anyone has any insite you help would be gratly appriciated.

p.s. Brandon, why do you have the spell checker commented out in the source for pages? does it not work?
__________________
Where has all the fun gone?
  #2   Spotlight this post!  
Unread 29-09-2002, 16:13
rbayer's Avatar Unsung FIRST Hero
rbayer rbayer is offline
Blood, Sweat, and Code
no team (Teamless Orphan)
 
Join Date: Mar 2002
Rookie Year: 2001
Location: Minnetonka, MN
Posts: 1,087
rbayer is a glorious beacon of lightrbayer is a glorious beacon of lightrbayer is a glorious beacon of lightrbayer is a glorious beacon of lightrbayer is a glorious beacon of light
Send a message via AIM to rbayer
Where are you trying to do this? In a form? In an WYSIWYG editor? Either way, new lines are normally denoted by a '\n' character, if that helps any.
__________________
New C-based RoboEmu2 (code simulator) available at: http://www.robbayer.com/software.php
  #3   Spotlight this post!  
Unread 29-09-2002, 16:22
Trashed20's Avatar
Trashed20 Trashed20 is offline
Boom, Shawalala Boom!
#0862 (PCEP Lighting)
 
Join Date: Jan 2002
Location: Canton, MI
Posts: 528
Trashed20 will become famous soon enough
Send a message via AIM to Trashed20
im talking about text box input through html forms, like the ones used to post these messages. For example you hit enter 3 times you would get spaces in the text, but i need to convert that to \n or <br> tags
__________________
Where has all the fun gone?
  #4   Spotlight this post!  
Unread 29-09-2002, 20:15
Joel J's Avatar
Joel J Joel J is offline
do you..
no team
 
Join Date: May 2001
Rookie Year: 2000
Location: San Jose, CA
Posts: 1,445
Joel J has a reputation beyond reputeJoel J has a reputation beyond reputeJoel J has a reputation beyond reputeJoel J has a reputation beyond reputeJoel J has a reputation beyond reputeJoel J has a reputation beyond reputeJoel J has a reputation beyond reputeJoel J has a reputation beyond reputeJoel J has a reputation beyond reputeJoel J has a reputation beyond reputeJoel J has a reputation beyond repute
Well, if the script parsing the HTML form is written in PHP, you can simply use the nl2br() function. Lets say the textbox input is saved to the variable $info. To convert all the newline characters present in it, you would do:
Code:
$info = nl2br($info);
Otherwise, you could do some sort of regex command. Post some more information if the script isn't written in PHP.
__________________
Joel Johnson

Division By Zero (229) Alumni, 2003-2007
RAGE (173) Alumni, 1999-2003
  #5   Spotlight this post!  
Unread 29-09-2002, 20:30
Brandon Martus's Avatar Unsung FIRST Hero
Brandon Martus Brandon Martus is offline
busy.
AKA: B. Slash Kamen
no team
 
Join Date: May 2001
Rookie Year: 1998
Location: Nevada, TX USA
Posts: 5,271
Brandon Martus has a reputation beyond reputeBrandon Martus has a reputation beyond reputeBrandon Martus has a reputation beyond reputeBrandon Martus has a reputation beyond reputeBrandon Martus has a reputation beyond reputeBrandon Martus has a reputation beyond reputeBrandon Martus has a reputation beyond reputeBrandon Martus has a reputation beyond reputeBrandon Martus has a reputation beyond reputeBrandon Martus has a reputation beyond reputeBrandon Martus has a reputation beyond repute
Send a message via ICQ to Brandon Martus Send a message via AIM to Brandon Martus Send a message via Yahoo to Brandon Martus
Joel suggested the correct PHP function.

To do it in PERL, you could do this:
Code:
  $someText =~ s/\n\n/<p>/g;
  $someText =~ s/\n/<br>/g;
And, to answer your question about the spell checker.

vBulletin has it commented out by default, because I believe the service they were using started to charge people.
They just leave the code there in case you want to pay for the service, I think.
__________________
Brandon Martus
e-mail
  #6   Spotlight this post!  
Unread 29-09-2002, 22:08
Trashed20's Avatar
Trashed20 Trashed20 is offline
Boom, Shawalala Boom!
#0862 (PCEP Lighting)
 
Join Date: Jan 2002
Location: Canton, MI
Posts: 528
Trashed20 will become famous soon enough
Send a message via AIM to Trashed20
thanks, i prolly should have said that i was using php.

Vbulletin make you pay for everything now doens't it. how much is a liscence up to now?
__________________
Where has all the fun gone?
  #7   Spotlight this post!  
Unread 30-09-2002, 10:46
Brandon Martus's Avatar Unsung FIRST Hero
Brandon Martus Brandon Martus is offline
busy.
AKA: B. Slash Kamen
no team
 
Join Date: May 2001
Rookie Year: 1998
Location: Nevada, TX USA
Posts: 5,271
Brandon Martus has a reputation beyond reputeBrandon Martus has a reputation beyond reputeBrandon Martus has a reputation beyond reputeBrandon Martus has a reputation beyond reputeBrandon Martus has a reputation beyond reputeBrandon Martus has a reputation beyond reputeBrandon Martus has a reputation beyond reputeBrandon Martus has a reputation beyond reputeBrandon Martus has a reputation beyond reputeBrandon Martus has a reputation beyond reputeBrandon Martus has a reputation beyond repute
Send a message via ICQ to Brandon Martus Send a message via AIM to Brandon Martus Send a message via Yahoo to Brandon Martus
vBulletin doesn't make you pay for the spell checker, the spell checker service makes you pay for it.

vBulletin is $35/yr, which really isn't that bad for such a powerful piece of software that is continually updated, and fully customizable.
__________________
Brandon Martus
e-mail
Closed Thread


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Listen-to xml parsing example thingie Trashed20 Website Design/Showcase 4 27-03-2003 15:13
Sprockets and Roller Chain Models Madison Inventor 3 04-02-2003 11:51
iParts on firstcadlibrary.com Ed Sparks Inventor 3 08-01-2003 23:30
approach to autonomy Mike375 Programming 32 08-01-2003 14:04
emulationFIRST v0.04 Matt Leese Programming 7 09-07-2002 08:54


All times are GMT -5. The time now is 02:09.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi