Take this thread as an example. I want to comment about it on this board instead of hijacking the original thread.
How do all those obnoxious color codes get inserted into such posts? It looks like they were created by some other program then pasted into the post. That is not the only thread I have seen like that. As a moderator I don't have the time to edit out all that crap and insert proper, acceptable code tags.
There's not really much we can do about it, though.
The only explanation I have is that maybe the users tried to manually color each line with the WYSIWYG editor, but didn't realize that [code=c] doesn't accept colors. Perhaps it could? That would solve *some* of the problems.
I'm very confused - apparently I came to the thread too late after the weird coloring was fixed. Essentially joeprogrammer is correct in that color tags within [code=language] tags are ignored because that tag automatically colors code for you, hence its purpose.
I'm confused. Why are moderators editing the colors of other people's code to begin with?
Because many users use color tags instead of using code tags. The original link to this thread which ~S.O.S.~ kindly corrected had both color tags and code tags, and the color tags were still visible making the code difficult to read.
I've seen some posts that contain hundreds of those color tags. I don't edit them out because it just takes too much time. I don't think I should have to spend a great deal of time deleting each one of those [ color=1234 ] and [ /color ] tags with a very high probability that I will delete something else I should not; I'm not that patient and I don't want that much torture. Which is why I started this thread -- the color tags appear as if they were machine/program generated.
I'm confused. Why are moderators editing the colors of other people's code to begin with?
The only need to have manual colors for code is when a user needs to highlight a specific line (for example, "this is the line where the error occurs"). Otherwise the coloring should be the same on all posts.
Most users who post here are ignorant of either code tags and/or automatic coloring. They then either try to manually color the code without code tags (that's the worst, believe me!) or sometimes they add the colors inside a[code=language] tag, which was the problem here.
I'm very confused - apparently I came to the thread too late after the weird coloring was fixed.
For those who missed it - this is basically how it looked:
#include <iostream>
using namespace std;
int main() {
cout << "cool" << endl;
return 0;
}
The deceptive thing about this is that the WYSIWYG editor actually colors the code, so if you don't preview your post, you won't realize that the color tags don't show up inside[code=language] tags. (see attachment)
Also, the thing that makes the colors look really funky is that the # symbol in C++ means the command is a preprocessor definition, which in DaniWeb's code coloring scheme turns the code all green. Ugh!
Yeah I've seen this especially on the vb.net and c# forums. They must use some other program to highlight it.
Code tags will always be a problem. In fact I haven't seen any improvement since the last time I brought up this issue.
A quick javascript (client side) hack dedicated just for just the software development forum may work... although a server side solution might be more practical. The parser wouldn't be 100% fool proof, otherwise it would max out on system resourses.
But that doesn't matter in the long run.
The more I think about it, the better it sounds. It just needs some beta testing, and now that tgreer's gone there's no one here to brainwash dani. ;)
On CBoard they used to have a code-checking script (I don't know if they still have it now) that would on C/C++ forums search for curly braces, and if they were present automatically insert code tags around the whole block of code.
This wouldn't solve the color problem, but it might fix the huge majority of posts we recieve here that lack the code tags.
On CBoard they used to have a code-checking script (I don't know if they still have it now) that would on C/C++ forums search for curly braces, and if they were present automatically insert code tags around the whole block of code.
Still, wouldn't that be a great way to improve the overall quality of postings in the software development forums? There's a lot of newbies who simply forget, even if they're aware of the need to use code tags.
Still, wouldn't that be a great way to improve the overall quality of postings in the software development forums? There's a lot of newbies who simply forget, even if they're aware of the need to use code tags.
I think it does well elseweb, but it still always comes down to the persistence of the poster, knowingly or unknowingly. And at times it also takes as much work with the admins. After the last upgrade, it took a while -- and some coaxing -- to get it back.
I'm confused. Why are moderators editing the colors of other people's code to begin with?
Oh, so you mean to say that if a post is multicolored, with all kinds of colored being used by beginners to express their thoughts or with the broken code tags, we should let it be?
Correct -- and thats what we mean when we say "Editing out the color tags out of user's post"....
There was a lot of debate whether moderators should touch anything other than code posted by moderators while some situations demand that the entire post be edited to maintain the forum dignity -- just wanted to make sure...
The more I think about it, the better it sounds. It just needs some beta testing, and now that tgreer's gone there's no one here to brainwash dani.
If you think your solution is viable: a massive, multi-language aware, client-side language parser/colorizer, and if you think I ever "brainwashed" Dani to do or not do anything, and if you think she doesn't still solicit my opinions and advice about certain aspects of the forum because of the mutual respect we hold for each other, despite our disagreements, then you are just as deluded and immature as you've always been.