: What if, when a user creates a code block larger then x number of
: lines of code, the forum software puts the code block within a
: textarea with its own scrollbars?
:
: This way, the code does not make the post look very big, as it would
: have a horizontal and vertical scrollbar, it wont mess up the
: thread.
Yeah, I like that idea, especially doing it sensitive to the number of lines that are posted. It can even be done without a textbox too, but simply with the "overflow: scroll" CSS property. Will put on the todo list.
: Color highlighting for different languages would also be
: nice, but can not imagine how hard that would be.
I want to do this also, and we already have a third-party syntax highlighting engine in place for the ZIP file viewer.
I'm still debating the best way to do it for the forums, since you need to know what language the code is in to select the correct highlighter (you just look at the extensions in the ZIP file viewer). One way is to allow an optional parameter on the code tag (
), another is to select a language by forum since most of the code posted on the C# forum will be C#. Or of course both.
: (I really dont know - I dont know asp)
It's ASP.NET now, thankfully. And C# 3.0 as the language, which is actually quite nice, though I probably take it to whole new levels of evil (see my Divvy extension method in the pheaven blog, for example
).
: btw Jonathan, I have always wondered what the code in your sig does
: :)
It's a Perl script. There's a running joke in the Perl community about writing completely unreadable scripts that print the text, "Just Another Perl Hacker". So that's my effort.
Jonathan
###
for(74,117,115,116){$::a.=chr};(($_.='qwertyui')&&
(tr/yuiqwert/her anot/))for($::b);for($::c){$_.=$^X;
/(p.{2}l)/;$_=$1}$::b=~/(..)$/;print("$::a$::b $::c hack$1.");