Nice neat code posts


Closed Thread
Results 1 to 40 of 40
  1. #1
    Join Date
    Sep 2005
    Location
    Campbell, CA
    Posts
    1,107

    Default Nice neat code posts

    How is it that everyone else gets the nice formatted code in their posts?

    I do a cut-and-past from either MCS or NOTEPAD and my postings are virtually unreadable. The formatting is all messed up, and there are lots of extra spaces, etc.

    I swear that the code I write doesn't look so bad to me, but when I post it on the forum, it is a mess.

    What should I do?
    Charles Linquist

  2. #2
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default Re: Nice neat code posts

    Any decent code editor allows you to convert TABs to SPACE, MCS do a decent job at this, MPLAB too.

    However, seems from time to any ANY vBulletin board, and some other may screw things up a little bit.

    Bellow, two piece of useless code, using the same tab indentation,
    in Notepad
    Code:
        VarA    VAR    BYTE
    
    LABEL1:
        IF SOMETHING THEN
            GOSUB LABEL1
            DO USELESS THING
            ENDIF
    In MCSP
    Code:
            VarA    VAR    BYTE
    
    LABEL1:
            IF SOMETHING THEN
                    GOSUB LABEL1
                    DO USELESS THING
                    ENDIF
    MCSP being the one who keep MY personnal indentation. But yeah, from time to time some line WILL be screwed up.
    Last edited by mister_e; - 14th September 2011 at 04:22.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  3. #3
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,521


    Did you find this post helpful? Yes | No

    Default Re: Nice neat code posts

    I always have to go back in and re-edit code that is cut'n'pasted to the forum. Blank lines gets removed, "columns" that "straight" when I copy the code is not in the post and so on. Add to that the preview doesn't properly reflect the way it shows in the actual post makes it very time consuming.

    Like Charles I ask, what am I doing wrong.

    /Henrik.

    EDIT: Then we have posts where the code has been posted as HTML to preserve the color-syntax etc (nice!) that are now messed up. Darrel linked to one of his pieces just the other day.

  4. #4
    Join Date
    Apr 2003
    Location
    Cambridge - UK
    Posts
    1,033


    Did you find this post helpful? Yes | No

    Default Re: Nice neat code posts

    HTML posting is NOT allowed on the PICBASIC Community Forum, not only because of security issues, but also because we cannot prevent people using MS word to create a document and then posting the garbage Word HTML in the forum...which causes a number of issues that may prevent the post or the forum area from displaying correctly.

    Thus if you wish to post formatted text, you may use the editor and some BB code. All of the articles in the WIKI are produced that way and they are not unreadable.

    Using the built in editor and some BB Code does NOT prevent the creation of clean and readable posts.

  5. #5
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,521


    Did you find this post helpful? Yes | No

    Default Re: Nice neat code posts

    Well, if you say so Lester but that's the first time I've heard it's not allowed. There's even been guides on how to do it, here's a thread where one of the moderators explains how to do it (though I don't think Dave was a moderator at the time) and also the code that at the time looked perfect but not any more. And I belive this is the orignal thread.

    I'm not saying it's not possible to create good looking readable code but simply copy and paste from MCSP to within code tags usually doesn't work that well.

    /Henrik.

  6. #6
    Join Date
    Apr 2003
    Location
    Cambridge - UK
    Posts
    1,033


    Did you find this post helpful? Yes | No

    Default Re: Nice neat code posts

    OK, a few posts went through with HTML in them. BUT as the Moderators are aware and a few forum users are aware. there were one or two posts that had really badly bloated and badly formatted HTML in them, that caused the forum pages NOT to load or Crash when viewing those threads.

    HTML will not solve your problem, but WILL definitely allow users to crash certain pages and damage the smooth running of the forum.

    Sorry, but at present i don't have time to produce a tutorial on how to post code examples, formatted with colour. But if you google it you'll see that its quite faesable, if you really have to.

    For sure, I will not enable HTML posting for users, I don't have the time to sort out the issues that will arise !

  7. #7
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,521


    Did you find this post helpful? Yes | No

    Default Re: Nice neat code posts

    Hi Lester,
    No, I'm not particularly interested in the colours and I'm not asking you to enable/allow .html if that's a problem. My point was that many of the posts were they have already been used are no longer readable, like the ones in the thread I linked to. But if they wasn't supposed to be there in the first place then you've made your point.

    Again, I know how to format the code using BB-code but that's just it - simply cut'n'paste well formated code from an editor/IDE to a post usually needs quite a bit of touch-up afterwards. Again, disregard the colours, I'm talking about tabs, blank lines etc. Just what Charles mentioned in his original post. I'm not saying it's yours or the forums fault. I'm, like Charles, asking what's needed to preserve the formatting when copying code into a post.

    /Henrik.

  8. #8
    Join Date
    Sep 2005
    Location
    Campbell, CA
    Posts
    1,107


    Did you find this post helpful? Yes | No

    Default Re: Nice neat code posts

    Below is an unedited cut-and-paste from MCS. Even when I go back and try to clean it up, the final results look terrible. I'd post more code if it didn't look so bad.



    Code:
    GetNum:
            Result = 
    0
            MaxNum = 
    5     ; set for max number of digits you will 
    accept
            YY = 
    1
     
    POSN=0
            IsNeg = 
    0
            TimedOut = 
    0
            ArrayWrite InputString,[Rep 
    $FF\8]  ; Fill with 
    $FF
     
    GetMoreN:              
     
            HSERIN 
    9000,InputTimeout,[Keyin]
     
    IF Keyin = ESC THEN 
    ZeroNum
                If 
    Keyin = CR THEN 
    DunInputn
     
    If allowNeg 
    then
                IF 
    Keyin = "-" and Posn = 0 THEN 
     
     
    IsNeg = 
    1
     
    Hserout 
    ["-"]
     
    goto 
    GetMoreN
     
    ENDIF 
     
    endif   
     
                IF Keyin 
    = BS 
    THEN
     
    HSEROUT 
    [BS,SP,BS]
     
    IF POSN > 0 
    THEN
     
    POSN = POSN - 
    1
     
    InputString [POSN] = 
    $FF
     
    GOTO 
    GetMoreN
     
    ENDIF   
     
     
    ENDIF
            IF Keyin < "0" or Keyin 
    > "9" THEN GetMoreN 
            HSEROUT 
    [Keyin]
            InputString [POSN] = Keyin 
    - "0"
            IF POSN >= (MaxNum -1) 
    THEN DunInputN
            POSN = POSN 
    +1
            GOTO 
    GetMoreN
    DunInputN:
            For xN = 7 
    to 0 STEP - 1 
     
    IF InputString[XN]= 255 THEN 
    NoMoreNum
     
    Result = Result + 
    (InputString[xN]*YY)
     
    YY = YY 
    *10
    NoMoreNum:            
     
            Next 
    XN
     
     
            If Isneg 
    then
              If result < 
    32768 
    then
     
    Result = 0 - Result
     
    else
    Charles Linquist

  9. #9
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default Re: Nice neat code posts

    Charles,

    Attach your code (BAS/PBP) so I can try it if you do not mind.
    Dave
    Always wear safety glasses while programming.

  10. #10
    Join Date
    Mar 2009
    Posts
    653


    Did you find this post helpful? Yes | No

    Default Re: Nice neat code posts

    I have to agree with others here ...not only posting code snippets can be plain ugly....also reading others' old snippets with with the wrong (now incompatible) formatting renders them virtually unreadable.

  11. #11
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default Re: Nice neat code posts

    Just testing...

    Copy/Paste from Programmers Notepad
    Code:
    ' 12F675 
    ' 09/05/2011  
    DEFINE OSC 4
    ' SET FOR INTERNAL OSC AND MCLRE OFF
    #CONFIG
        __config _INTRC_OSC_NOCLKOUT & _WDT_ON & _MCLRE_OFF & _CP_OFF
    #ENDCONFIG
    
    ANSEL=%00000000         ' ADC SET FOR DIGITAL 
    CMCON=7                 ' COMPARATOR SET FOR DIGITAL
    SWITCH_OFF  VAR GPIO.1  ' PUSH BUTTON FOR PUMP OFF
    SWITCH_RUN	VAR	GPIO.2  ' PUSH BUTTON FOR PUMP ON  
    LED_RUN     VAR GPIO.0  ' INDICATE RUN SIGNAL SENT  
    LED_OFF     VAR GPIO.5  ' INDICAT STOP SIGNAL SENT
    TX          VAR GPIO.4  ' DATA SEND PIN
    BAUD        CON 18030	' 18030 = 600 BAUD
    
    START:     ' SEND OFF SIGNAL AT POWER UP
        PAUSE  1000
        HIGH LED_OFF  
        SEROUT2 TX, BAUD,["OFF",13]  
    DO  ' LOOP TO CHECK PUSH BUTTONS
    	DO WHILE SWITCH_RUN = 1     ' CHECK ON PUSH BUTTON
    	   ' IF BUTTON PUSHED
    		HIGH LED_RUN          ' RUN INDICATOR ON
    		LOW LED_OFF           ' OFF INDICATOR OFF
    		PAUSE 50              ' SETTLE TIME
    		SEROUT2 TX, BAUD,["RUN",13]
    '		SEROUT2 TX, BAUD,[HEX CNT,13]
    	LOOP
    	DO WHILE SWITCH_OFF = 1    ' CHECK OFF PUSH BUTTON
    	   ' IF BUTTON PUSHED
            HIGH LED_OFF          ' OFF INDICATOR ON
    		LOW LED_RUN           ' RUN INDICATOR OFF
    		PAUSE 50              ' SETTLE TIME
    		SEROUT2 TX, BAUD,["OFF",13]
    '		SEROUT2 TX, BAUD,[DEC CNT,13]
    	LOOP
    LOOP
    Copy/Paste from MCS
    Code:
    ' 12F675 
    ' 09/05/2011  
    DEFINE OSC 4
    ' SET FOR INTERNAL OSC AND MCLRE OFF
    #CONFIG
        __config _INTRC_OSC_NOCLKOUT & _WDT_ON & _MCLRE_OFF & _CP_OFF
    #ENDCONFIG
    
    ANSEL=%00000000         ' ADC SET FOR DIGITAL 
    CMCON=7                 ' COMPARATOR SET FOR DIGITAL
    SWITCH_OFF  VAR GPIO.1  ' PUSH BUTTON FOR PUMP OFF
    SWITCH_RUN	VAR	GPIO.2  ' PUSH BUTTON FOR PUMP ON  
    LED_RUN     VAR GPIO.0  ' INDICATE RUN SIGNAL SENT  
    LED_OFF     VAR GPIO.5  ' INDICAT STOP SIGNAL SENT
    TX          VAR GPIO.4  ' DATA SEND PIN
    BAUD        CON 18030	' 18030 = 600 BAUD
    
    START:     ' SEND OFF SIGNAL AT POWER UP
        PAUSE  1000
        HIGH LED_OFF  
        SEROUT2 TX, BAUD,["OFF",13]  
    DO  ' LOOP TO CHECK PUSH BUTTONS
    	DO WHILE SWITCH_RUN = 1     ' CHECK ON PUSH BUTTON
    	   ' IF BUTTON PUSHED
    		HIGH LED_RUN          ' RUN INDICATOR ON
    		LOW LED_OFF           ' OFF INDICATOR OFF
    		PAUSE 50              ' SETTLE TIME
    		SEROUT2 TX, BAUD,["RUN",13]
    '		SEROUT2 TX, BAUD,[HEX CNT,13]
    	LOOP
    	DO WHILE SWITCH_OFF = 1    ' CHECK OFF PUSH BUTTON
    	   ' IF BUTTON PUSHED
            HIGH LED_OFF          ' OFF INDICATOR ON
    		LOW LED_RUN           ' RUN INDICATOR OFF
    		PAUSE 50              ' SETTLE TIME
    		SEROUT2 TX, BAUD,["OFF",13]
    '		SEROUT2 TX, BAUD,[DEC CNT,13]
    	LOOP
    LOOP
    Last edited by mackrackit; - 14th September 2011 at 14:38.
    Dave
    Always wear safety glasses while programming.

  12. #12
    Join Date
    Dec 2005
    Posts
    1,073


    Did you find this post helpful? Yes | No

    Default Re: Nice neat code posts

    The problem lies with most of the IDEs/editors. They use a varying number of spaces for tabs - some allow users to specify the value. As Mr. E noted, most have a convert tabs to spaces function but the simplest thing to do is to make your various editors agree on how many spaces make a tab or always use spaces rather than tabs.

  13. #13
    Join Date
    Oct 2009
    Location
    Utah, USA
    Posts
    427


    Did you find this post helpful? Yes | No

    Default Re: Nice neat code posts

    OK... I'll jump in here with a question

    In order to go back and reclaim those posts that were originally posted with HTML (when it was allowed)...

    Would it be possible to re-enable HTML, for a short time, then copy the code that was posted and paste back in the code, without the HTML, then dis-able the HTML??

    Thus re-covering the VALUABLE code examples that have for now been lost.

    This might entail a lot of manual work... but there are VALUABLE code examples, like LCD BARGRAPHS, that are currently unusable.

    I sure hate to see all those posts and thread lost.
    Dwight
    These PIC's are like intricate puzzles just waiting for one to discover their secrets and MASTER their capabilities.

  14. #14
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default Re: Nice neat code posts

    As time permits and when I run across those I convert them to BB code.

    Let me know where they are and I will add them to the list.
    Dave
    Always wear safety glasses while programming.

  15. #15
    Join Date
    Sep 2005
    Location
    Campbell, CA
    Posts
    1,107


    Did you find this post helpful? Yes | No

    Default Re: Nice neat code posts

    I always have MCSP set to "convert tabs to spaces". I tried to attach my source but, it didn't "take". I'll send you a link instead.

    http://dl.dropbox.com/u/566712/GetNumber_part.bas
    Charles Linquist

  16. #16
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default Re: Nice neat code posts

    Straight from the link...
    Who knows... but what browser do you use? It maybe something other than the code editor.
    Code:
    '**************************************************************** 
    '*  Name    : Number Input routine                             *
    '*  Author  : Charles Linquist                                  *
    '*  Notice  : Copyright (c) 2011 Charles Linquist               *
    '*          : All Rights Reserved                               *
    '*  Date    : 9/13/2011                                         *
    '*  Version : 1.0                                               *
    '*  Notes   : For the forum                                     *
    '*          :                                                   *
    '****************************************************************
    
            DEFINE OSC 40                                                           
            DEFINE NO_CLRWDT 1
            DEFINE _18F8723 1
            DEFINE HSER_RCSTA 90H
            DEFINE HSER_TXSTA 20H                                                   
            DEFINE HSER_CLROERR 1
            define HSER_BAUD 9600
    
           
    
            Keyin var byte
            Maxnum var byte
            YY var word
            POSN var byte
            IsNeg var bit
            AllowNeg var bit
            TimedOut var bit
            InputString var byte [10]
            Result Var word
            XN var byte
    
            BS CON 8
            ESC cON 27
            LF con 10
            SP con 32
            CR con 13
    
            TRISC = %10111111  ; Just for the serial port
    topp:        
           allowneg = 1
            
      hserout [CR,Lf,"Input a number "]
       gosub getnum
       hserout [CR,LF,"You entered "]
       
       IF isneg = 1 then 
          Hserout [SDEC Result,CR,LF]
        ELSE
          hserout [dec Result,CR,LF]
        ENDIF  
       
       Goto topp        
            
    
    GetNum:
            Result = 0
            MaxNum = 5     ; set for max number of digits you will accept
            YY = 1
            POSN=0
            IsNeg = 0
            TimedOut = 0
            ArrayWrite InputString,[Rep $FF\8]  ; Fill with $FF
     
    GetMoreN:              
            HSERIN 9000,InputTimeout,[Keyin]
                IF Keyin = ESC THEN ZeroNum
                If Keyin = CR THEN DunInputn
                If allowNeg then
                IF Keyin = "-" and Posn = 0 THEN 
                    IsNeg = 1
                    Hserout ["-"]
                    goto GetMoreN
                ENDIF 
                endif   
                IF Keyin = BS THEN
                   HSEROUT [BS,SP,BS]
                   IF POSN > 0 THEN
                      POSN = POSN - 1
                      InputString [POSN] = $FF
                      GOTO GetMoreN
                   ENDIF   
                ENDIF
            IF Keyin < "0" or Keyin > "9" THEN GetMoreN 
            HSEROUT [Keyin]
            InputString [POSN] = Keyin - "0"
            IF POSN >= (MaxNum -1) THEN DunInputN
            POSN = POSN +1
            GOTO GetMoreN
    DunInputN:
    
           More code here
    Dave
    Always wear safety glasses while programming.

  17. #17
    Join Date
    Mar 2009
    Posts
    653


    Did you find this post helpful? Yes | No

    Default Re: Nice neat code posts

    Quote Originally Posted by Heckler View Post

    This might entail a lot of manual work... but there are VALUABLE code examples, like LCD BARGRAPHS, that are currently unusable.
    Yeah, that was the one I gave up trying to read just a couple of nights ago...

    http://www.picbasic.co.uk/forum/show...?t=2359&page=1

  18. #18
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default Re: Nice neat code posts

    Quote Originally Posted by HankMcSpank View Post
    Yeah, that was the one I gave up trying to read just a couple of nights ago...

    http://www.picbasic.co.uk/forum/show...?t=2359&page=1
    That is one that the converter did not like. I just tried it again and no luck. Darrel should be able to fix it quicker than me hand coding it being he has the source code...
    Dave
    Always wear safety glasses while programming.

  19. #19
    Join Date
    Sep 2005
    Location
    Campbell, CA
    Posts
    1,107


    Did you find this post helpful? Yes | No

    Default Re: Nice neat code posts

    I guess next time I'll just send you my code and you can post it!
    Charles Linquist

  20. #20
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default Re: Nice neat code posts

    Quote Originally Posted by Charles Linquis View Post
    I guess next time I'll just send you my code and you can post it!
    OK, That will work too
    Dave
    Always wear safety glasses while programming.

  21. #21
    Join Date
    Oct 2009
    Location
    Utah, USA
    Posts
    427


    Did you find this post helpful? Yes | No

    Default Re: Nice neat code posts

    Hey Dave,

    I went into my PIC files and found that way back when... I had saved a copy of the LCDbargraphs thread as a "web page complete".

    I looked at it and it looks complete. I have attached it. I wonder if you (or Darrel) can use it to rebuild that thread.

    If NOT then others can down load this attachment and they should be able to get the gist of the LCD bargraphs from it.
    (It coud be attached to that thread also as a downloadable file)

    here ya go...
    P.S. I had to zip it up because it was causing an error when I tried to upload the .mht file.
    Attached Files Attached Files
    Last edited by Heckler; - 14th September 2011 at 21:39.
    Dwight
    These PIC's are like intricate puzzles just waiting for one to discover their secrets and MASTER their capabilities.

  22. #22
    Join Date
    Dec 2005
    Posts
    1,073


    Did you find this post helpful? Yes | No

    Default Re: Nice neat code posts

    Anyone who wants to see it can unzip it and open it in Internet Explorer. It's probably viewable in other browsers - I just double-clicked and IE loaded the MHTML file.

    In fact, one can probably convert it to PDF or any other desired form.

  23. #23
    Join Date
    Sep 2005
    Location
    Campbell, CA
    Posts
    1,107


    Did you find this post helpful? Yes | No

    Default Re: Nice neat code posts

    I normally use IE9. I'll try it with FireFox.
    Charles Linquist

  24. #24
    Join Date
    Apr 2003
    Location
    Cambridge - UK
    Posts
    1,033


    Did you find this post helpful? Yes | No

    Default Re: Nice neat code posts

    There are TWO issues being addressed in this thread:
    1. Use of HTML in posts
    2. posting clean readable code examples
    The posting of clean readable code examples is clearly possible for the vast majority of users on this and out other forums. Mackrackit has shown by example above, that its possible to post clear text. And the use of BBCode will allow for additioanl text formatting.

    Where the use of BBCode is too tiresome, a zip file can be uploaded - within the limits of file size allowed. If users would like a file repository into which files can be uploaded and linked to from the forum posts, i'll arrange that - just let me know.

    By way of further explaination; storing files in the forum database is OK when the forum is young and empty and the files are small, but when its as old and large as this forum and the files are many, it causes the database to grow to epic proportions - which is costly in storeage and more difficult to manage.
    The rest of this, rather long winded post, is related to HTML, an explaination of why we have an issue with HTML in posts.

    Would it be possible to re-enable HTML, for a short time, then copy the code that was posted and paste back in the code, without the HTML, then dis-able the HTML??
    NO, i'm afraid that re enabling HTML is NOT an option. HTML was never actually allowed. For a relatively short period of time, an oversight did not dis-allow it in all forum areas. Thus we ended up with some HTML that killed some forum areas, which brought the issue to light, after which we ensured that HTML was dis-allowed in all areas.

    If we allow HTML now:
    1. some of the HTML posted in the paste WILL break the forum display presented to the user whe the user views it.
    2. I cannot check that all HTML posted is clear of injection issues / malicious code / unintentional css references. Not all of the forum users are nice sensible people - we ahve a fair number of known pirates on this forum ! We dont trust them. I have a duty of care to the users , I will be held respnsible by the users (and others) if they fall foul of malicious code injected via raw HTML in posts.
    3. Many of the posts that include HTML code , are very badly formatted, referencing fonts and formating that is unsupported by the forum. These refernces may / maynot be handled correctly by the forum parser, thus we dont know what effect they will have. - remember the forum has undergone serveral updates since the posting of that poorly formatted code.
    Note: The use of MS Word or MS Frontpage to generate MS proprietary HTML shoould be avoided at all costs, if you ever want compatibility accross browsers and systems.

    Thus re-covering the VALUABLE code examples that have for now been lost.
    IF, the HTML posted is valid and compliant, there should be NO reason why it cannot be copied from the forum page and pasted into any html editor...viewed and exported into another format.

    A very good FREE HTML editor is KOMPOZER , KompoZer is a complete web authoring system that combines web file management and easy-to-use WYSIWYG web page editing.

    The Editor developers could go a long way to assist in the production of forum ready code output, why not petition them? The forum system used here is the most popular in the world. The issues that you are experiencing affect ALL of the popular forum systems - i.e they dont allow raw HTML in posts because of the security issues, the editors on most of them are very similar to the editor on this forum. Supporting BB-Code.

    Note:
    • if you dont understand why HTML is avoided in forum posts 'Google' it.
    • To enhance the readability of posts, with additional formatting, use BBCode NOT HTML.

  25. #25
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default Re: Nice neat code posts

    Fixed
    http://www.picbasic.co.uk/forum/show...2482#post12482

    Thank you Dwight!
    P.S. I had to zip it up because it was causing an error when I tried to upload the .mht file.
    Another MS thing....
    Last edited by mackrackit; - 15th September 2011 at 09:31.
    Dave
    Always wear safety glasses while programming.

  26. #26
    Join Date
    Sep 2005
    Location
    Campbell, CA
    Posts
    1,107


    Did you find this post helpful? Yes | No

    Default Re: Nice neat code posts

    I just noticed one thing: I'm using IE9. Sometimes I would get extra lines on my screen while viewing the posts in this forum (still readable, but annoying). The extra lines and slighly malformed characters appeared ONLY when I am on 'the forum'. IE9 works perfectly everywhere else.
    At the bottom of the browser window you can select which 'mode' you want IE9 to run in. It lets you choose "IE7 standards", "IE8 standards" or "IE9 standards". I WAS using IE9 standards, but I just switched to IE8 standards. VOILA! Now the forum looks better. Maybe my code posts will work better as well. I'll soon find out.

    So, while IE9 works better than IE8 for most everything, that is not true when viewing this forum.
    Charles Linquist

  27. #27
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    2,597


    Did you find this post helpful? Yes | No

    Default Re: Nice neat code posts

    That's interesting. I was getting a sort of "static" across my text before POSTing; as if random lines of pixels were broken on the screen, but only in my reply text.

    I don't think I get that on any other forum.

    Robert

  28. #28
    Join Date
    Apr 2003
    Location
    Cambridge - UK
    Posts
    1,033


    Did you find this post helpful? Yes | No

    Default Re: Nice neat code posts

    IE9 works perfectly everywhere else.
    IE9 works better than IE8 for most everything, that is not true when viewing this forum.
    Name:  0072-02_cat.jpg
Views: 1038
Size:  17.1 KB

    From my experienece and understanding of the current situation (looking at Microsofts Connects outstanding issues list) Those statements are not the norm !

    IMHO, the simple answer is dont use IE9....Firefox is an established alternative, that WORKS.

    google something like "IE9 extra line breaks" you'll see its NOT just this forum, its an issue with many sites when browsing with IE9.

    The next update to the forum will contain some fixes that help with IE9 issues, but thats going to be a few months away.

    Sorry, but there is nothing that i can do to fix that at present.

    You might want to join Microsoft Connect to keep up with the known issues and some work arounds for IE9 ......several thousands! though you maybe surprised to see that the main drive now seems to be to get IE10 out of the door in an effort to move forward. Dont take my word for it, get it from the horses mouth. Steves your man!
    Name:  0072-03_ballmer.jpg
Views: 1048
Size:  25.3 KB

    The forum is not perfect......but the issues you mention are not specific to this forum.

  29. #29
    Join Date
    Apr 2003
    Location
    Cambridge - UK
    Posts
    1,033


    Did you find this post helpful? Yes | No

    Default Re: Nice neat code posts

    OK, before it raises it head, there is another IE issues that you should be aware of

    If you create a post with a \ in the subject line, users will not be avle to view the post in IE.

    HTML does not diss-allow this. However IE is breaks the url at the slash, its incorrect.

  30. #30
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    3,806


    Did you find this post helpful? Yes | No

    Default Re: Nice neat code posts

    On post #28 and when i place the mouse pointer over the images, these images open automatically on a bigger window. It is the first time I encounter something like this.

    Is it a new feature? Or an IE8 bug? Ifit is a bug, it is a nice one!

    Ioannis

    P.S. Is it me or Balmer is really ridiculous??

  31. #31
    Join Date
    Apr 2003
    Location
    Cambridge - UK
    Posts
    1,033


    Did you find this post helpful? Yes | No

    Default Re: Nice neat code posts

    OK, you used to have to click to open the image in a shadow box, now, just hover over the image.

    I implemented this a while back. I was expecting someone to complain, but heard nothing.....actually i'd forgotten about it !

    Steve, either a complete and utter nutter and fun to work with....or maybe just a complete nutter. I don't know. But for sure MS needs to catch up.

  32. #32
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default Re: Nice neat code posts

    An interesting WYSIWYG BBCode editor
    http://www.ragepank.com/wysiwyg-bbcode/

    Another one
    http://www.kyrsoft.com/downloads/downloads.html#Bbed

    Some emoticons may not work properly but, no real big deal
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  33. #33
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default Re: Nice neat code posts

    Just to avoid confusion on the previous, the first WYSIWYG BBCode editor I was talking about is called WYSIWYG BBCode Editor

    Bellow is the direct link
    http://www.shajul.net/software/wysiwyg-bbcode-editor/

    As I said, some emoticons may not work properly, but this is something that looks easy to fix by editing the smileys.ini file.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  34. #34
    Join Date
    Apr 2003
    Location
    Cambridge - UK
    Posts
    1,033


    Did you find this post helpful? Yes | No

    Default Re: Nice neat code posts

    Has anyone noticed any changes to the editor? or advanced option?

    The new Editor




    The forum is now running with the new CKEditor (formerly known as FCKeditor). It is more powerful and has more feature than the previous editor.

    CKEditor is a text editor to be used inside web pages. It's a WYSIWYG editor, which means that the text being edited on it looks as similar as possible to the results users have when publishing it. It brings to the web common editing featuresfound on desktop editing applications like Microsoft Word and OpenOffice.

    Currently not every CKeditor feature is available on this forum, additional features will be enabled if the CKeditor proives popular and useful.

    Points to note that may address some issues that were lacking in the old editor are;

    • This Editor has an “Auto Save” function, which comes handy while typing a long blog post or posting a new thread with lots of content. This sis set to auto save every 30 seconds.
    • CKEditor is full compatibility with “WebKit” browsers such as Google Chrome and Safari.
    • CKEditor has an “Paste from Word” feature which lets you preserve the as much of Microsoft Word Text Formatting as possible while pasting the content directly from a document.
    CKEditor offers full accessibility functionality, its fast loading and has awesome AJAX capabilities.

  35. #35
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default Re: Nice neat code posts

    Yes, I noticed a difference. Looking good.

    Is the autosave making use of the HTML5 data storage function?
    Dave
    Always wear safety glasses while programming.

  36. #36
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    3,806


    Did you find this post helpful? Yes | No

    Default Re: Nice neat code posts

    Sure we did!

    I had some difficulties in logging in from the update of the system till now...

    Tools looking very nice and I think is really WYSIWYG.

    Ioannis

  37. #37
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    2,597


    Did you find this post helpful? Yes | No

    Default Re: Nice neat code posts

    I didn't read "formerly known as FCKeditor" the first time.

  38. #38
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default Re: Nice neat code posts

    The missing letter is ?...........
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  39. #39
    Join Date
    Apr 2003
    Location
    Cambridge - UK
    Posts
    1,033


    Did you find this post helpful? Yes | No

    Default Re: Nice neat code posts

    Now, come on children......stop the giggling!

    The FCK in FCKeditor stands for Frederico Caldeira Knabben, the creator of the editor. Those letters resemble a well-known vulgarity in the English language, (something that Frederico, a native Brazilian , was unaware of when he first released the program). As a result, Knabben changed the program's name to CKEditor beginning with v3.0. The CK letters now stand for Content and Knowledge.

    The ability to grab attention with those letters in the English speaking community was exploited by the fashion house French Connection in their brand mark FCUK French Connection UK

    OK, lesson over...back to work.

  40. #40
    Join Date
    Sep 2005
    Location
    Campbell, CA
    Posts
    1,107


    Did you find this post helpful? Yes | No

    Default Re: Nice neat code posts

    Wow. I didn't mean for my post to cause such a commotion, but now I'm glad. Everyone wins!
    Charles Linquist

Members who have read this thread : 1

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts