A lot of trouble with this, most of the new people dont understand the importance of code tags. I was thinking maybe a tooltip below the submit that said something like:
Tip* Please use code tags! they help make your code easier to read for others! These tags can be located on either the bottom of the screen or bottom right side under the image '<>'
Something interesting would be like StackOverflow. What it does is sense if the user has input some code, and if so, it makes them put in code tags. We could have something like this except have a tooltip, and not be so forceful.
One of the first rules of UI design is that the user doesn't read squat.
Daniweb has had ongoing difficulties getting new posters (and some not-so new posters) to use the tags, despite having some very aggressive efforts to make people use them.
One solution is to have a "code tag moderator", who spends his life fixing people's code tags, but that doesn't usually work out very long.
If the forum script is complex enough, it could try to recognize unformated code and automatically tag it -- but this does produce some mistakes. However, most of the mistakes could be mitigated with some careful programming, I think -- so this is the option I would choose.
The only problems are: 1) not breaking older posts, and 2) time spent to make it work.
Problem isn't whether they know about it. The problem is whether they care to do it. Some are lazy or just don't care and simply copy/paste the code with the question and leave it at that. You'd even have users misusing the tags (putting output in code tags, code in output tags, or mixing it with quote tags. The problem is the user, not the site. The user will use what the feel like using and ignore the rest (same is done with advice, as I'm sure you have noticed people will comment on one thing and seemingly ignore the rest of your comment like you had said nothing).
Example, the admin at Allegro.cc added a spoiler tag to hide things that could ruin either a game, movie, or such. He even said not to use them willy nilly, yet in one thread every post has one or more spoiler tags.
As an alternative, people could refuse to help a poster that chose not to use code tags. If people only replied to such posts with "Please edit your post so that the code is safely nestled within the tags, then we will try to help answer your question." or something similar. And when (or if) such posters comply, they are rewarded with the constructive criticism they wanted.
@atropos: We've tried the peer pressure method here for a while now, it has a predictable success rate. Some users stay and others get discouraged because between the tags and our particular opinions on the proper way to do things we end up looking like a site full of rule Nazi's. I think our current objective might be to retain more of those users who get discouraged.
Have we thought about just not dropping the white space from regular post submissions? It would be better if we could get users to use code tags but assuming that the ideal is impossible to obtain maybe we should try a different direction?