PHP WordPress Blog by Email problem

Looking for volunteers to join your project? Need help with a script but can't afford to pay? Want to offer your services as a volunteer to build up your portfolio? This is the place for you...

Moderator: General Moderators

Post Reply
macsorg
Forum Newbie
Posts: 3
Joined: Tue Nov 07, 2006 12:19 pm

PHP WordPress Blog by Email problem

Post by macsorg »

Hello!! I run a non-profit website for sick children at http://www.makeachildsmile.org. I know nothing about PHP and am looking for a kind soul that could help me with what might be a simple tweak of the WordPress PHP code. (at first you may think that this is an HTML support question, but please read on)

I had a gentleman install WordPress on my website server and then I imported all the posts I had on Blogger.

Everything looks GREAT... but when I post by email, WordPress seems to be messing up line breaks, or actually, paragraph breaks.

Where there should be paragraphs, WordPress just glues everything together, making it look like one huge paragraph.

Looking at the source of a post page, my email editor (where the email come when I use Blog by Email), puts the following between paragraphs:

Code: Select all

<p style="margin: 0in 0in 0pt;"><span style="font-family: Garamond;"><font size="3"> </font></span></p>
<p style="margin: 0in 0in 0pt;"><span style="font-family: Garamond;"><font size="3">Doug continues to go to school every day and he continues to love it and excel. He gets up in the morning and he cant get his morning chores done quick enough to suit him and get to school. On the mornings when his sister isnt moving as quickly as he is he nags her to get her stuff done so they can get there. At least part of this has to do with wanting to get there and get his breakfast, but it also has to do with his love of school. He continues to soak up any and all information that his teacher gives him; almost as if he wants to learn everything he can as quickly as he can. At first it was a challenge for me to feel good about his ability to last the entire day-I was so used to having him at home all the time that it took some getting used to to not have him there. But now, I enjoy the fact that hes doing everything he can to be normal.</font></span></p>
<p style="margin: 0in 0in 0pt;"><span style="font-family: Garamond;"><font size="3"> </font></span></p>
<p style="margin: 0in 0in 0pt;"><span style="font-family: Garamond;"><font size="3">We have had some issues with loud clicks from his leg braces, and this morning found at least part of the cause of those clicks. There is a hairline break in one brace and the other has a definite crack in it. Were going to have to get that fixed-at its wonderful cost of over $2000-but if we dont, he almost falls when it sticks or clicks or whatever its doing. The chance of him falling is not a good thing, so well do what has to be done to keep that from happening.</font></span></p>
(I also had help from someone who knows CSS to force Wordpress to IGNORE font-family, size, weight, etc... So even though you see that up there, it gets ignored, which is good!!)

Anyway... Where you read: "....doing everything he can to be normal." and then "We have had some issues with loud clicks from his leg braces...", should be a new paragraph, but it's not. And I cannot figure out why.

While doing a search on Google, I found some people saying that the file "functions-formatting.php" has these

Code: Select all

$pee = preg_replace
lines, that tells WordPress how to behave when it sees

Code: Select all

<p>, <br>, etc..
, but there isn't one for SPAN or SPAN STYLE and I don't know how to write it.

Can somebody help please??

PS: And I THINK this is the reason why WordPress is gluing paragraphs together!!! I am not even sure... maybe this solution is not even it!! But I cannot think of anything else.. so I wanted to give this pee=preg_replace a try!!

Thank you!!

Alexandra
macsorg
Forum Newbie
Posts: 3
Joined: Tue Nov 07, 2006 12:19 pm

Post by macsorg »

WOW... over 400 people have Viewed this post.... and not a single reply!!!

Is my question STUPID???
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Post by Chris Corbyn »

Pssttt... We have rules against bumping within 24 hours ;)

nl2br() is the function you're looking for. It will turn the line breaks back into <br /> tags.

If you're actually looking for somebody to code this for you then you should really post in the "Volunteer Work" forum :) Let us know and we can move it if that's that case.
macsorg
Forum Newbie
Posts: 3
Joined: Tue Nov 07, 2006 12:19 pm

Post by macsorg »

Hi d11wtq!!

Thanks for responding!! My intention was not to "bump". I was just a bit upset seeing so many views to my post and no one responding.

Yes, please transfer it to the Volunteer Work Forum! I have no idea what nl2br() is.

Thanks again!!

Alexandra
User avatar
Burrito
Spockulator
Posts: 4715
Joined: Wed Feb 04, 2004 8:15 pm
Location: Eden, Utah

Post by Burrito »

Moved to volunteer work.
Post Reply