| | |
code tags
![]() |
Ok how many ppl here get ticked off when newbies persistantly post their code without code tags. Raise your hand? Yes I thought so.
Anyhoo, I've been speaking with dani about this however, she has been unable to provide a solution for this. Everyone say 'awww'.
Ok, so I was wondering, since there are a lot of clever ppl here, myself being the cleverest :cheesy:, this could be the thread to remedy this problem.
Any ideas... ppl? Thinking of a php parser to force ppl to use code tags when code is written, but there are so many languages on this board. Hmm???
http://img476.imageshack.us/img476/5171/cut20ln.png
Piworld ™
[Tis simple as Pie]
Anyhoo, I've been speaking with dani about this however, she has been unable to provide a solution for this. Everyone say 'awww'.
Ok, so I was wondering, since there are a lot of clever ppl here, myself being the cleverest :cheesy:, this could be the thread to remedy this problem.
Any ideas... ppl? Thinking of a php parser to force ppl to use code tags when code is written, but there are so many languages on this board. Hmm???
http://img476.imageshack.us/img476/5171/cut20ln.png
Piworld ™
[Tis simple as Pie]
I say it's their loss if they don't post using code tags, so who cares?
(Of course, it's Dani's loss, too, in that case, so I guess Dani would.)
I personally care more about the large margins given when code tags are used. </attempt type="derail conversation">
This is what i'm talking about, above and below ^^.
(Of course, it's Dani's loss, too, in that case, so I guess Dani would.)
I personally care more about the large margins given when code tags are used. </attempt type="derail conversation">
((call/cc call/cc) (lambda (f)
(display "Worst infinite loop, ever!")
(newline)
(f f))) All my posts may be redistributed under the GNU Free Documentation License.
That's a prefect solution. There are a ton of langauges, but let's face it, there are BASICALLY 2 kinds. Basic, real. Basic is a fairly simple, and easy to figure out language, if, end if, etc. Then the real style (you know, C, C++, Perl, Java, Javascript, etc) with the cool braces and brackets. So, you just look for a list of programming syntax in their post, and either ask them to use code tags, or automagically add them.
Another solution, since some people have a hard time figuring out how to stick stuff between code tags, is to have Dani modify vbullettin, and have a link or another button for "post code", which loads a new window with a textbox, where they paste the code, and it adds it to the post with the tags.....
Another solution, since some people have a hard time figuring out how to stick stuff between code tags, is to have Dani modify vbullettin, and have a link or another button for "post code", which loads a new window with a textbox, where they paste the code, and it adds it to the post with the tags.....
User-interface-wise, I think it'd be best to detect code, and if the message has no code tags at all (and if code is detected), then ask the user if they'd like code tags (automagically added) and then have a neat little interface where they could drag and drop code tags around to the appropriate place if the detector got the boundaries wrong.
Of course, I'm dreaming a bit here, as it'd be annoying to implement this with a language as crufty as PHP, messing with code that already works, with very little to gain.
And I guess the people sophisticated enough to use a REAL real programming language are probably sophisticated enough to use code tags already, right? :p
Of course, I'm dreaming a bit here, as it'd be annoying to implement this with a language as crufty as PHP, messing with code that already works, with very little to gain.
And I guess the people sophisticated enough to use a REAL real programming language are probably sophisticated enough to use code tags already, right? :p
All my posts may be redistributed under the GNU Free Documentation License.
She's baaaaaaaack 
Parsing every single post that runs through the system is just way too resource intensive - and inefficient - for a forum community.
With the upgrade to vB 3.5, the default editor for new members has been set to the WYSIWYG editor (the standard and wysiwyg editor modes can be toggled via the icon in the upper right of the editor). When in the software and web development forums, the editor area displays a watermark reminding people to use code tags.

Parsing every single post that runs through the system is just way too resource intensive - and inefficient - for a forum community.
With the upgrade to vB 3.5, the default editor for new members has been set to the WYSIWYG editor (the standard and wysiwyg editor modes can be toggled via the icon in the upper right of the editor). When in the software and web development forums, the editor area displays a watermark reminding people to use code tags.
>When in the software and web development forums, the editor area displays a watermark reminding people to use code tags.
Well is it working. Clearly not.
>User-interface-wise, I think it'd be best to detect code, and if the message has no code tags at all (and if code is detected), then ask the user if they'd like code tags (automagically added) and then have a neat little interface where they could drag and drop code tags around to the appropriate place if the detector got the boundaries wrong.
This is genius. Please make something like this Dani.
Prettie please. I bet you can't do it. (Tries to use reverse psychology)
http://img476.imageshack.us/img476/5171/cut20ln.png
Piworld ™
[Tis simple as Pie]
Well is it working. Clearly not.
>User-interface-wise, I think it'd be best to detect code, and if the message has no code tags at all (and if code is detected), then ask the user if they'd like code tags (automagically added) and then have a neat little interface where they could drag and drop code tags around to the appropriate place if the detector got the boundaries wrong.
This is genius. Please make something like this Dani.
Prettie please. I bet you can't do it. (Tries to use reverse psychology)
http://img476.imageshack.us/img476/5171/cut20ln.png
Piworld ™
[Tis simple as Pie]
•
•
Join Date: Dec 2004
Posts: 1,655
Reputation:
Solved Threads: 35
This isn't feasible. I'm an experienced JavaScript coder, and the overhead just to include a script that could parse every post and detect code (and code fragments) would be astronomical!
The place to do it, if it all, would be server-side, in PHP. But we're a forum, not a code-parsing service. I think you're seriously underestimating what it would take to "detect code". And it would never be 100% accurate, so could potentially cause more problems than it would solve.
I would politely suggest that this thread be closed, or at the very least, to stop pestering Dani to implement a feature that isn't feasible.
The place to do it, if it all, would be server-side, in PHP. But we're a forum, not a code-parsing service. I think you're seriously underestimating what it would take to "detect code". And it would never be 100% accurate, so could potentially cause more problems than it would solve.
I would politely suggest that this thread be closed, or at the very least, to stop pestering Dani to implement a feature that isn't feasible.
![]() |
Other Threads in the DaniWeb Community Feedback Forum
- Previous Thread: Rogue Javascript
- Next Thread: New font size
| Thread Tools | Search this Thread |
+ abuse beginners bookmark bored box bug bugs calamity code codebox codesnippets codetags code_snippet comments cpuintensive daniweb design editcodesnippet end-of-the-world favouriteforums feedback ff3 flamewar glitch ie6 itsatag! kids layout login lulz negative newfeature poll post preview privatemessaging problem profanitytest profile quality quick rash-bot rashakil-fol reply reputation reputation-power sandwich score search snippet socialgroups solvedthreads sub-forum suggestion tagcloud tagging tags theactualrulerofthetag-cloud:3 therulerofthetag-cloud:[ thread threadtagging today's-posts unansweredposts upgrade user voting whining






