" after every 60 characters like it's supposed to, but ..."> " after every 60 characters like it's supposed to, but ...">
 
Previous Thread
Next Thread
Print Thread
Rate Thread
Joined: Apr 2003
Posts: 15
Newbie
Newbie
Offline
Joined: Apr 2003
Posts: 15
When someone replies on the board I work on, the line breaks don't well...break.
It puts the "> " after every 60 characters like it's supposed to, but a poem with several line breaks looks like this when replying:

> Lying here beside you,calling your sweet name,I
> take a moment to reflecton how far we've came.The
> distance now gone,as in your arms I laystill so
> much I want to dostill so much to sayHolding you,a
> dream come true,for both of us,me and youTwo years
> ago,we were a pair of lonely soulsbut here we

My code in newreply.php looks like this:
Code
<br />   $BodyEd = eregi_replace("&quot;","\"",$Body);<br />   $BodyEd = eregi_replace("<P ID=\"edit\">(.*)</P>","",$BodyEd);<br />   $BodyEd = eregi_replace("<P ID=\"signature\">(.*)</P>","",$BodyEd);<br />   $BodyEd = eregi_replace("<br \>","\n",$BodyEd);<br />   $BodyEd = eregi_replace("<br>","\n",$BodyEd);<br />   $BodyEd = strip_tags($BodyEd);<br />   $BodyEd = preg_replace("/([^\n]{0,50})(\s|$)/","> $1\n",chop($BodyEd));<br />


Am I missing a line or somethin'?

Sponsored Links
Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
I don't find that code anywhere in newreply.php or addpost.php

Is that a hack of some sort, attempting to quote the body of what they are replying to?
Like in email programs maybe?

If so.. My guess would be to try changing that last line to this:

$BodyEd = preg_replace("/([^\n]{0,50})(\s|$)/","$1\n",chop($BodyEd));

Joined: Apr 2003
Posts: 15
Newbie
Newbie
Offline
Joined: Apr 2003
Posts: 15
Well I was trying to have it act like wwwthreads does and put the last post in a reply like so:

> Hey man what's going on?
> I'm just sittin in class and we're learning fractions,
> which are really tough.
>
> See ya later,
> Jim

Okay Jim! I'll see ya after school!


So I took the code from wwwthreads and put it in ubbthreads to see if it'd work. It did, but with some glitches.

Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
Didn't know threads ever behaved like that.

If you upgrade to 6.2 there's a brand new quote feature built in. Or if you poke around here, there's an auto-quote hack available for 6.1.x.

Or wrap the text in [ quote ] text [ /quote ] tags and then the line breaks etc.. will work automatically.


Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
isaac
isaac
California
Posts: 1,157
Joined: July 2001
Forum Statistics
Forums63
Topics37,573
Posts293,925
Members13,849
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,833
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2024 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20221218)