Rickta59 589 Posted January 31, 2013 Share Posted January 31, 2013 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 Quote Link to post Share on other sites
bluehash 1,581 Posted January 31, 2013 Share Posted January 31, 2013 Something has gone in and rewrote the for loop code and stuffed html image tags in there ? Do you have more example of this? Quote Link to post Share on other sites
bluehash 1,581 Posted January 31, 2013 Share Posted January 31, 2013 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; } } Quote Link to post Share on other sites
bluehash 1,581 Posted January 31, 2013 Share Posted January 31, 2013 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. Quote Link to post Share on other sites
Rickta59 589 Posted January 31, 2013 Author Share Posted January 31, 2013 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 © ... Quote Link to post Share on other sites
Rickta59 589 Posted January 31, 2013 Author Share Posted January 31, 2013 say Quote Link to post Share on other sites
oPossum 1,083 Posted February 1, 2013 Share Posted February 1, 2013 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? Quote Link to post Share on other sites
bluehash 1,581 Posted February 1, 2013 Share Posted February 1, 2013 '(' 'c' ')' Quote Link to post Share on other sites
bluehash 1,581 Posted February 1, 2013 Share Posted February 1, 2013 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? Quote Link to post Share on other sites
bluehash 1,581 Posted February 1, 2013 Share Posted February 1, 2013 Is there a way to use [tags] like phpbb instead of the wysiwyg editor? Unfortunately no, oPossum. I can't seem to replicate what you guys are seeing. Quote Link to post Share on other sites
Rickta59 589 Posted February 1, 2013 Author Share Posted February 1, 2013 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' ')' Quote Link to post Share on other sites
bluehash 1,581 Posted February 1, 2013 Share Posted February 1, 2013 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. Quote Link to post Share on other sites
yyrkoon 250 Posted February 1, 2013 Share Posted February 1, 2013 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. Quote Link to post Share on other sites
pabigot 355 Posted February 1, 2013 Share Posted February 1, 2013 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. Quote Link to post Share on other sites
Rickta59 589 Posted February 1, 2013 Author Share Posted February 1, 2013 © Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.