I don't know if this is the right place to post a Subject like this.
First of all a piece of advice: this is a funny experiment (unreliable source). At the same time I've learned some about java and processing (thanks BEN/CASEY and all the people of this forum).
Some time ago I wrote up some about posting messages and the YaBB tags. Some people seems to have the same problem (is it a general problem?).
I had an simple idea: use processing IDE to solve it (interaction IDE-webBoard).
Originally I thought about a library, but I couldn't find out a way to read the sketchcode from a library without import or creating a new sketch (any idea, please?). That's the reason why I tried to hack PDE's source (may be it's a sin...).
This source creates a new menu option on the mouse's (right-button) popup menu called "Format for discourse".
And the new menu option lets you to format the sketchcode from the actual tab of the editor, according to the YaBB Bulletin Board Code (YaBBC color and b).
It uses mouse only (right click, Select All and copy). No editable.
No macs or keyboard support (I've tested only with windowsXP and Processing 0091).
Another features can be added: formatting selected text with a determined tag (|url|selected text|/url|).
I hope you enjoy this.
One Saludo.
Using CODE (you know...)
***********************
Code:
// This is a comment line
int a = 12;
void setup()
{
println(a);
}
void draw() {
}
class example
{
this.nothing = 0;
}
Using hacking-discourse (quote
instead because code tag cancels other YaBB tags)
***************************************************
Quote:
// This is a comment line
int a = 12;
void setup()
{
println(a);
}
void draw() {
}
class example
{
this.nothing = 0;
}
YaBB Tags (broken for read)
**************************
[color=#777755]// This is a comment line [/color[color=#993300][b]draw[/b [color
And the source (Eclipse workspace):
Discourse.zip