Hope this helps someone not named Shawn.
I want to keep the formatting when a user hits the "enter" key inside a textarea on a form. My problem is further deepened by the fact that I don't just return the results straight back to a HTML page. My results get merged with a rtf file that then gets emailed to someone who can open the file using Word.
I found this site which gives the RTF v1.5 documentation, and from this gleaned that the \par denotes a new paragraph. Yea!
I then just did a string replace (using PHP) and searched through the user submitted textarea to replace all occurrences of chr(10) with "\par " - don't forget the space.
I now have line breaks in the final RTF. And a happy customer.
<the todd />
Wednesday, January 23, 2008
keeping line feeds in textarea from HTML to RTF
Automatically generated by
the todd
on or about
11:04 AM
0
comments
Wednesday, November 7, 2007
Teddy Bear Parade

My kindergartener had a Teddy Bear parade recently. Every kindergartener in the school made a "float" for their teddy bear to ride on while they pulled the float around the school. It was done on a Monday to kick-off a week of learning about bears.
We asked my son what he wanted his float to be and without hesitation he says "Jeff Gordon race car." So just in case anybody out there wants to see a cardboard race car, here goes.
And yes to all the Jeff Gordan fans, I know the flames on the door are backwards, that is a slight design flaw on my part.
The car is essentially made up of 4 parts. The front (engine) is a long piece of cardboard bent to form the cone. Then two sides were cut out and fastened to the first piece by brass paper fasteners.
The middle part (doors) is the bottom and two long sides of a computer box. The rear of the car was essentially the opposite of the middle. The rear of the car didn't have a bottom until the very end. That and the hood were the last things that I added. Two things that I wanted to add but ran out of time: 1. a roll cage built from styrofoam. 2. Support for the car "roof." It sags just a bit and I think a center support on each side would have helped that.
All the painting was done with a spray paint white primer and then regular spray paint. The flames, numbers, and letters were all done with stencils.
If anyone wants any more info just let me know and I will try to help.
<the todd />
Automatically generated by
the todd
on or about
8:26 AM
0
comments
Friday, August 31, 2007
kindergarten is hard
I am now 2 weeks into Kindergarten and I believe it is much harder on parents than the children. My child loves it and is excited everyday about going to school, so that is a welcomed sight.
But I had no idea how much work the parents do for kids in school. I'm also sure that as the next levels of school hit and tests begin that schooling will become even more difficult. Who knew it was so hard to explain the concept of rhyming???
<the todd />
Automatically generated by
the todd
on or about
9:50 PM
0
comments
Labels: kindergarten hard work
Monday, August 27, 2007
technorati... woo hoo!
Technorati Profile
This is my technorati ping post. I have hit the mainstream and fully expect people to start flocking to read other peoples wisdom that I link to.
<the todd />
Automatically generated by
the todd
on or about
4:44 PM
0
comments
Tuesday, August 21, 2007
FERPA and electonic ID's
<sarcasm>First off, I would like to apologize to my loyal readers for going so long without a post.</sarcasm>
I wanted to post this here because this recently came up for discussion here. Also I probably never would be able to find it again if I didn't. This article does a good job of explaining what is public, private, directory information, and just when an electronic ID can be released as directory info.
FERPA and Electronic IDs by Steven L. Worona (EDUCAUSE) on December 02, 2004
<the todd />
Automatically generated by
the todd
on or about
8:53 AM
0
comments
Labels: educause, electronic id, ferpa, steven worona
Tuesday, July 24, 2007
testing in old browsers
I came upon this post today http://tredosoft.com/Multiple_IE?page=1 that allows installation of IE browsers back to v3.
In the same spirit I thought I would also put out the URL's for the location of some other stuff.
Mozilla Firefox - http://releases.mozilla.org/pub/mozilla.org/firefox/releases/ - this used to go back quite a bit further but I don't know where anything older is at this point.
Mozilla - http://releases.mozilla.org/pub/mozilla.org/mozilla/releases/ - same thing as Firefox
More Mozilla products (Camino, Thunderbird, Seamonkey, etc.) - http://ftp.mozilla.org/pub/mozilla.org/
Netscape < 4.8 - http://ftp.netscape.com/pub/communicator/english/
Netscape 6 - http://ftp.netscape.com/pub/netscape6/english/
Netscape 7 - http://ftp.netscape.com/pub/netscape7/english/
Netscape 8 - http://ftp.netscape.com/pub/netscape8/english/
More Netscape products at http://ftp.netscape.com/pub/
Opera - http://arc.opera.com/pub/opera/
Hope this helps.
<the todd />
Automatically generated by
the todd
on or about
9:18 AM
0
comments
Labels: ie5, ie5.5, ie6, mozilla, opera, testing in old browsers
Monday, July 9, 2007
exclamation mark (!) showing up in emails from PHP mail() function
I ran into this problem and this is the solution that worked for me. This post helped out http://us2.php.net/manual/en/ref.mail.php#53231
It references RFC 2822, and look at section 2.1.1. "Line Length Limits" for the explanation of the 998 char limit. Anyway the solution at php.net worked for me minus the rtrim.
The php code for mine is
$message = chunk_split(base64_encode($message));
Then also you must make sure the headers are using base64 for the Content-Transfer-Encoding:
$header .= "Content-Transfer-Encoding: base64\r\n\r\n";
<the todd />
Automatically generated by
the todd
on or about
11:11 AM
9
comments
Labels: php, rfc 2822, sending emails with php