Previous Thread
Next Thread
Print Thread
Rate Thread
#210453 05/02/2001 7:42 PM
Joined: Aug 2000
Posts: 3,590
Moderator
Moderator
Offline
Joined: Aug 2000
Posts: 3,590
I applied the quote hack I saw further down the list..but..I added a little bit of my own elements to it (and a few lines from a friend's hack of the hack). Just figure I'd share it incase anyone's interested.

Rather than using [ q u o t e ], I prefer to have ">" preceeding each line. Here's a simple regexp that will do it:

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

That will (intelligently) trim each line to 60 chars (the default box size I believe...I resize mine to 80x20). Signatures, edit notes, <b r>, quotes, etc are all previously handled (from other peoples' hacks).

I believe the old version of (Perl) Threads we had running did something similar to this. And note that this is Preg_replace...NOT ereg_replace. While I personally hate Perl and regexp, it comes in handy every once in a while []/w3timages/icons/tongue.gif[/]

If you're curious as to how it works, guests can play on the "Testing..." board inside the "Zophar's Domain" category: www.zophar.net/wwwthreads


Sponsored Links
Anonymous #210454 05/22/2001 8:15 PM
Joined: Nov 1999
Posts: 29
Newbie
Newbie
Offline
Joined: Nov 1999
Posts: 29
I am unclear as to where to put this line in with the hack from the other page. Can you help?

Thanks,
Will

Edited by willym on 05/22/01 08:16 PM (server time).


Nat X #210455 05/24/2001 3:13 AM
Joined: Oct 2000
Posts: 60
Power User
Power User
Offline
Joined: Oct 2000
Posts: 60
I began working on SwampGas on this one, but went off and made a version quite different from his. This is the version he mentioned that takes care of signatures, edits, and line breaks. I've used SwampGas's code in it as it handles things better.

I tried pasting it, but the br tags get messed up, so here's a link:

Quoting Text



Administrator, Videogame Music Archive

Bommer #210456 05/24/2001 11:07 AM
Joined: Nov 1999
Posts: 29
Newbie
Newbie
Offline
Joined: Nov 1999
Posts: 29
Is your server down? I couldnt get the file...

Will



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
Gizmo
Gizmo
Portland, OR, USA
Posts: 5,833
Joined: January 2000
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)