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
), 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
Also I made it so any occurrence of more than one space is turned into &nbsp;'s
So for code samples, you still keep the formatting but it won't run past the edge and throw the tables out of whack
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
Oh, when you type
it automagically becomes :þ and (c) becomes ©. 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 ||
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
I hope you don't mind if I steal the <center> idea
What did you use? [center] or just [c]?