UBB.Dev
Posted By: The Team Quoting.. - 05/03/2001 2:42 AM
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

Posted By: willym Re: Quoting.. - 05/23/2001 3:15 AM
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).

Posted By: powerlord Re: Quoting.. - 05/24/2001 10:13 AM
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
Posted By: willym Re: Quoting.. - 05/24/2001 6:07 PM
Is your server down? I couldnt get the file...

Will

© UBB.Developers