944,120 Members | Top Members by Rank

Ad:
You are currently viewing page 1 of this multi-page discussion thread
Jan 29th, 2007
0

obnoxious color codes

Expand Post »
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.
Last edited by Ancient Dragon; Jan 29th, 2007 at 10:57 pm.
Sponsor
Team Colleague
Featured Poster
Reputation Points: 5608
Solved Threads: 2283
Retired and Enjoying Life
Ancient Dragon is offline Offline
21,961 posts
since Aug 2005
Jan 29th, 2007
0

Re: obnoxious color codes

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.
Team Colleague
Reputation Points: 2240
Solved Threads: 338
Vampirical Lurker
John A is offline Offline
5,055 posts
since Apr 2006
Jan 30th, 2007
0

Re: obnoxious color codes

There is some poor-quality colorizer available to folks. It's been around for a while.
Team Colleague
Reputation Points: 2780
Solved Threads: 312
long time no c
Dave Sinkula is offline Offline
4,790 posts
since Apr 2004
Jan 30th, 2007
0

Re: obnoxious color codes

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.
Administrator
Staff Writer
Reputation Points: 1422
Solved Threads: 163
The Queen of DaniWeb
cscgal is offline Offline
13,646 posts
since Feb 2002
Jan 30th, 2007
0

Re: obnoxious color codes

There's not really much we can do about it, though.
Actually there is a way.

The moderators have to just replace the [code=c] with [code] tags and it should turn out to be fine.

If you will again look at the first post of the thread under consideration, it was edited by me and now it looks relatively okay.
Super Moderator
Featured Poster
Reputation Points: 3241
Solved Threads: 719
Failure as a human
~s.o.s~ is offline Offline
8,873 posts
since Jun 2006
Jan 30th, 2007
0

Re: obnoxious color codes

The way to remove those color tags is to highlight the post (Ctrl-A) and click the weird A in the upper left corner of the edit box.
Moderator
Reputation Points: 3281
Solved Threads: 895
Posting Sage
WaltP is online now Online
7,747 posts
since May 2006
Jan 30th, 2007
0

Re: obnoxious color codes

I'm confused. Why are moderators editing the colors of other people's code to begin with?
Administrator
Staff Writer
Reputation Points: 1422
Solved Threads: 163
The Queen of DaniWeb
cscgal is offline Offline
13,646 posts
since Feb 2002
Jan 30th, 2007
0

Re: obnoxious color codes

Click to Expand / Collapse  Quote originally posted by cscgal ...
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.
Last edited by Ancient Dragon; Jan 30th, 2007 at 6:58 pm.
Sponsor
Team Colleague
Featured Poster
Reputation Points: 5608
Solved Threads: 2283
Retired and Enjoying Life
Ancient Dragon is offline Offline
21,961 posts
since Aug 2005
Jan 30th, 2007
0

Re: obnoxious color codes

Click to Expand / Collapse  Quote originally posted by cscgal ...
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.
Team Colleague
Reputation Points: 2240
Solved Threads: 338
Vampirical Lurker
John A is offline Offline
5,055 posts
since Apr 2006
Jan 30th, 2007
0

Re: obnoxious color codes

Click to Expand / Collapse  Quote originally posted by cscgal ...
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:
[color=#120000] #include <iostream>[/color]
[color=#120000] using namespace std;[/color]

[color=#120000] int main() {[/color]
[color=#120000]    cout << "cool" << endl;[/color]
[color=#120000]    return 0;[/color]
[color=#120000] }[/color]

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!
Attached Thumbnails
Click image for larger version

Name:	Picture 1.png
Views:	29
Size:	38.6 KB
ID:	2779  
Last edited by John A; Jan 30th, 2007 at 8:46 pm.
Team Colleague
Reputation Points: 2240
Solved Threads: 338
Vampirical Lurker
John A is offline Offline
5,055 posts
since Apr 2006

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in DaniWeb Community Feedback Forum Timeline: A sincere request for a separate C++ section
Next Thread in DaniWeb Community Feedback Forum Timeline: Width of Code Block





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC