PDA

View Full Version : Testing - will delete shortly - please ignore :)


Justin
04-19-1999, 08:59 AM
Ok, just had to test how large a post could be. I'm having problems with large posts in my hacked version, but I just pasted a 30k text file in here and all was fine http://www.aota.net/ubb/frown.gif

Must be something I did....

[This message has been edited by Justin (edited 04-19-99).]

Armand
04-19-1999, 11:24 AM
Hey Justin.. am hacking on my UBB at this time too... Hey I noticed the code tag on the 5.34 version doesn't work with ubb code itself, implements it instead of showing... need to work out a hack for that.

Am proud just added a ubb code for centering since was in big demand at for my UBB. And I don't even know anything about this stuff...lol

Justin
04-19-1999, 01:01 PM
Hey, I like the center idea. I rewrote all the routines for processing a post - all the ubb code tags, etc. It automatically hyperlinks URL's and email addy's, I have a [h] tag for code highlighting (turns it red http://www.aota.net/ubb/smile.gif), and a bunch of other stuff.

Main thing I did though was the [code] tag actually uses the <code> tag, instead of <pre>. Pre keeps the formatting, so if a line is 1000 characters long, it will show it http://www.aota.net/ubb/redface.gif Also I made it so any occurrence of more than one space is turned into &amp;nbsp;'s http://www.aota.net/ubb/smile.gif So for code samples, you still keep the formatting but it won't run past the edge and throw the tables out of whack http://www.aota.net/ubb/smile.gif

It also removes the "This message has been edited" line when you edit again, do avoid having 10 "edited" notes stacked up, etc. Just makes it look cleaner overall.

There's also a checkbox to disable autolinking if you don't want it on a particular post, in which case you can still use ubb code for links. So far it's pretty intelligent for autolinking, so if you type http://www.domain.com, with a comma, period, new line, space, or question mark at the end, it will not link the .,? etc (only if followed by a space or newline).

Also backward compatible for editing old posts made before the upgrade - will restore the ubb codes, etc.

Trying to think of what else I did to the thing http://www.aota.net/ubb/smile.gif Oh, when you type :P it automagically becomes :þ and (c) becomes &copy;. Oh, in the UBB, if you type | | it puts a space there - that sucks. I made it turn it into html code so it will come out || http://www.aota.net/ubb/smile.gif

Many many more mods in there that I don't remember off hand, but when I roll this thing out it will kick butt - oh yeah, I successfully did the tables hack without losing the 1 pixel border - something I don't think anyone's done yet. This way, a super long post will not screw up the whole page, plus the page gives the impression of loading faster.

I also neatened up the HTML output quite a bit, inserting a newline before every tag - don't know why, just seems to look nicer when you view source (no difference in the actual output though).

I just have to figure out why it won't accept a large post - no errors, just returns a blank page and doesn't add the post... I'll figure it out in time though http://www.aota.net/ubb/smile.gif I hope you don't mind if I steal the <center> idea http://www.aota.net/ubb/smile.gif What did you use? [center] or just [c]?

------------------
Justin Nelson
FutureQuest Support

Armand
04-19-1999, 02:51 PM
Justin, you went digging way deeper than I.

BTW I went with [center] since half of my users are familar with html. Plus am still really new at this and didn't want to mess things up too bad yet.

I managed to add (not easily) 5 more useless smilies to my UBB also. Took a bit more to figure the graemlin thing and all... still have no clue how I managed.

I like the copyright thing!! That would come in handy as my site is a literary site and the main use of the UBB is for poetry posting and such. Hmm... coool...steal mine and I'll steal yours okay http://www.aota.net/ubb/wink.gif call it even and everything...lol

Okay so what's the code for the (c) thing... I'm going to mess around and see if I can get it but who knows.

$ThePost =~ s/(\[center\])(.+?)(\[\/center\])/<center>$2<\/center>/isg;
my cheapshot center hack

<edit>Justin thanks for the idea I got the copyright hack to work on my own...starting to like perl since a little deduction goes a long way. Went with: $ThePost =~ s/(\()(C)(\))/&copy;/isg;
Seems to do the job. Thanks!</edit>

[This message has been edited by Armand (edited 04-19-99).]