Jump to content
Forum sending old emails Read more... ×
Sign in to follow this  
Rickta59

New forum and code

Recommended Posts

Is it just me, or does this ip.board really suck when it comes to dealing with preformatted / code blocks? I've gone back and looked at some code I and others have posted. Why isn't there an easy way to include code with something like phpbb does with bbcodes?

 

Take this post for example:

 

http://forum.43oh.com/topic/1284-software-async-serial-txrx-without-timer/?p=12640

...

for(state = 0; ...

..

Something has gone in and rewrote the for loop code and stuffed html image tags in there ?

 

What can we do so I can use code from old posts without having to try and figure out what got replaced with html tags?

 

How do I easily include preformatted text that isn't "code" ... oh and by the way how do I shut off the numbering of the lines?

 

Less than happy with IP.Boards,

-rick

Share this post


Link to post
Share on other sites

Testing above code:

unsigned state, c, n, addr, fgr, fgg, fgb, bgr, bgg, bgb, mkr, mkg, mkb;

for(state = 0; ;-) {
c = getc();
if(c == '<') {
state = 1;
} else if(c == '>') {
if(state == 11) {
// End of packet - do something
}
state = 0;
} else if(c >= '0' && c <= '9') {
n = c - '0';
if(state > 1 && n > 1) state = 0;
switch(state) {
case 1: ++state; addr = n; break;
case 2: ++state; fgr = n; break;
case 3: ++state; fgg = n; break;
case 4: ++state; fgb = n; break;
case 5: ++state; bgr = n; break;
case 6: ++state; bgg = n; break;
case 7: ++state; bgb = n; break;
case 8: ++state; mkr = n; break;
case 9: ++state; mkg = n; break;
case 10: ++state; mkb = n; break;
default: break;
}
} else {
state = 0;
}
}

Share this post


Link to post
Share on other sites

Seems to have been fixed in the newer updates. This unfortunately does not fix posts that already have been made. I copy pasted Opossum's code.

 

 

Do you have more example of this?

It seems to have broken all the old posts ..

 

just search for 'icon_e_wink.gif' ... or the copyright symbol ... code that used to say © ...

Share this post


Link to post
Share on other sites

I tried to edit the code in some of my old posts, and it just got worse. Really messed up formating, and added some sort of eol tags.

 

Is there a way to use [tags] like phpbb instead of the wysiwyg editor?

Share this post


Link to post
Share on other sites

Heh! .. or just type '(' 'c' ')' and watch it get morphed. ...

 

Overlord stop twisting my words. 

- Which browser are you using?

- Are in in quick editor or full editor mode?

- Do you click <> and add your code in the editor box pop up?

Share this post


Link to post
Share on other sites

I'm using google chrome on linux .. or mac  .. or android ..

 

all i did was reply in the box below .. and type © and press "POST"  btw i typed 3 chracters '(' 'c' ')'

When in editor mode, try using paste as plain text by default. It's a tiny gear symbol at the end of the top bar in the editor.

Share this post


Link to post
Share on other sites

using chrome on windows 7 here, does the same thing to me too ( as Rick describes ).

 

Copy pasted code from one of oPossums posts ( Nokia 5110 C++ template library ), and it injected html copyright symbol into my code. Which was probably on the post to begin with. I just didn't notice it at first.

 

But a lot of oPossums code posts have either copyright symbols injected in, or for->loops like Rick mentioned formed into forum smiley code.

 

Yeah putc© <--- for example.

 

EDIT:

 

Only way I see to possibly fix this is to somehow instruct all text within a code <block> to be left untouched. But i would have no idea how to do that.

Share this post


Link to post
Share on other sites

I noticed in passing that the code blocks I entered got line numbers, which was cute but messed up indentation at the transition from line 9 to line 10.  Couldn't figure out why, or why it didn't seem to happen with others' posts.  Gave up and moved on.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×