View Single Post
  #1 (permalink)  
Old June 19th, 2009, 04:00 PM
jminatel's Avatar
jminatel jminatel is offline
Wrox Staff
Points: 18,059, Level: 58
Points: 18,059, Level: 58 Points: 18,059, Level: 58 Points: 18,059, Level: 58
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: May 2003
Posts: 1,906
Thanks: 62
Thanked 139 Times in 101 Posts
Default Testing a p2p.wrox.com forums whitespace fix

As many of you know, when we migrated the forums we launched with what we knew to be a flaw in how the new platform (vbulletin) handles whitespace: basically that when vbulletin is configured to only allow bbcode ([b], [url], etc) and not real HTML, it squashes extra white space outside of [code] or [pre] elements which means that the beautiful code indenting from your IDE gets killed.
We also had an issue that from some browsers, copying code posts from the site back to your editor lost the spacing.
While we still want to encourage everyone to use the [code] tag for code in new posts, we know it won't happen for 100% of users. So here's what we're working on:
  • The old posts from prior to the relaunch still have the space characters preserved in the data, we've found a way to replace the real space with a bbcode that vbulletin will present as space
  • For the posts from last December to when we implement this fix, the space padding is gone. vbulletin strips that out as junk before it gets saved to the database so those won't be fixed
  • We're going to try to implement the space padding replacement on the fly for new posts once we make the fix, converting the leading spaces between when you click submit and when vbulletin saves them.
Here's what we've tested to date (on the QA site):
  • we converted all the leading spaces to the new code
  • We viewed posts in IE8, FireFox 3, Chrome and they spacing looked readable
  • We tested replies with quotes of indented code posts IE8, FireFox 3, Chrome and the indenting is preserved in replies
  • We pasted these indented code posts from all 3 of the tested browsers to editors and the spacing is preserved
  • We have not yet tested but will on IE 6/7 and Safari
So, are there any other remaining problems related to code indenting on the forums that I haven't mentioned that we still need to test for? Any other usage issues you're having specifically on code indenting I don't seem to have covered?

Thanks for your patience.
__________________
Jim Minatel
Associate Publisher, WROX - A Wiley Brand
Did someone here help you? Click on their post!