Code for Fun!!

Leave a Reply

Comment as a guest.

  1. I’m not sure why, but using iG:Syntax Hiliter does not work in WP, whenI go to the options page all I get is

    You are not a LEVEL 8 or above USER & hence you cannot configure iG:Syntax Hiliter. If you are a LEVEL 8 or above USER, then please Logout & Login again.

    But I am logged in as Admin. That should work right? Thanks…

  2. I’m not sure why, but using iG:Syntax Hiliter does not work in WP

    Well, as it happens, iG:Syntax Hiliter was & is for WP only, nothing else!!

    What version of WP are you using? If its the latest v2.1 then I’m afraid that I don’t know about the plugin working with it or not as I’ve been kinda busy lately & haven’t even checked out v2.1!! 🙁 But this weekend or next I do plan to take sometime out & check it. 🙂

  3. Sorry, I guess I forgot to add in 2.1 to the WP part. Should have been “does not work in WP 2.1” Its amazing how much that number can change a question. 😀

  4. Its amazing how much that number can change a question

    Yeah, that number can change the matter all together. There’ve been a lot of changes in WordPress recently & I haven’t been in touch off late & I think that v2.1 has brought in a lot of major changes. I’ll look into it, don’t worry. 🙂

  5. Problem solved:
    Is another person has this problem, what you need to do is go to the Users management page, check your user name and set the user to Administrator, log out and then log in again, everything should work. 🙂 Hope that helps… 🙂 Great plugin…

  6. hmm, so you weren’t logged in as an administrator?? well, hardly the plugin’s fault in that case as I remember writing in the plugin’s manual(included in the plugin download package) that you need to be an administrator to modify plugin’s settings in the wp-admin section!!

  7. I changed from fixed-width boxex to relative width, enjoy!

    [css]
    .syntax_hilite, li .syntax_hilite {
    padding:3px 3px 10px 8px; border:1px solid #303130; background-color:#FEFEFE;
    font-size:13px; font-family:’Courier New’,Courier,monospace;
    /* comment the line below to remove scrolling in code boxes */
    overflow:auto; white-space:nowrap;
    }

    /* change this line to set the width of code box */
    .syntax_hilite { width:95%; }

    /* change this line to set the width of code box in a list */
    li .syntax_hilite { width:90%; }

    .igBar, li .igBar {
    background-color:#D6D3CE; font-family:courier,arial,verdana;
    border-left:1px solid #EEEEEE; border-top:1px solid #EEEEEE;
    border-right:1px solid #424142;
    }

    /* change this line to set the width of plain text bar above code box */
    .igBar { width:97%; }

    /* change this line to set the width of plain text bar above code box in a list */
    li .igBar { width:93%; }

    .igBar a, .igBar a:hover {
    margin:0px 5px 0px 10px; font-weight:bold; color:#000000;
    text-decoration:none;
    }

    .syntax_hilite .langName { color:#000000; font-weight:bold; }

    .syntax_hilite textarea { margin:0px -5px -2px 0px; border:none; }
    [/css]

  8. Your syntax highlighter doesn’t seem to work with version 2.1.1 I am the main user of the site, I am using the admin that was created during the install, and I am not able to set up any settings, it says that I am not a level 8 user blah blah. I’ve already logged out and back in many times. I hope you can get this fixed. Oh, and by the way, you spelled highlighter wrong, it is spelled h-i-g-h-l-i-g-h-t-e-r , not hiliter.

  9. Well, I’ll look into it as soon as I get time!

    Oh, and by the way, you spelled highlighter wrong, it is spelled h-i-g-h-l-i-g-h-t-e-r , not hiliter.

    Ah, thanks for the english primer but then I want to spell it “hiliter” & not “highlighter”, do you mind? 😉 😛

  10. A very good plugin.

    For all people have the same problem with “Settings reset when changing plugins”
    change line 522.
    search:
    } elseif((!empty($_GET[‘activate’])) && ($_GET[‘activate’]==’true’)) {
    replace with:
    } elseif((!empty($_GET[‘activate’])) && ($_GET[‘activate’]==’true’) && $_GET[‘plugin’]==”syntax_hilite.php”) {

  11. I think it’s great..
    but I think I found a bug:
    I’ve some reason to belive that this line:

    elseif (!($this->language == ‘html4strict’ && ‘>’ == $keyword )) {
    return ‘‘;
    }

    should be

    elseif ($this->language == ‘html4strict’ && ‘>’ != $keyword ) {
    return ‘‘;
    }

    am i wrong?

  12. Ced, I don’t think its a bug(pay attention to the negation sign at the start of first bracket, with negates both the conditions). 🙂 You forgot to mention the file, I assume its the “geshi.php” file. If thats the file & if you think its a bug then how about reporting it directly to GeSHi developer?

  13. yes, the file is geshi.php, I think it’s a bug becouse in html highlighting it closes the link to the tag reference 2 times.

    in the way i modified it doesn’t.. I will report it also to the geshi, I didn’t get that wasn’t your file, sorry 🙂

  14. In the post which includes hilited code, auto-formatting is disabled not only in the code area but whole of the post. I want to texturize (e.g. replace two ‘-‘ to dash(–) ) out of the code area. Is it possible?

  15. As far as I know, its not possible to selectively leave out any part which is not to be texturised, so its disabled for whole post because it ruins the code.

  16. Thanks for this great plugin. I’m setting up my site to use this but I found the following features will be a great help in posting codes.

    1. Customization of the source code box in the Admin page

    2. Width Customization at code level posting
    [PHP WIDTH=100]

    3. Setting start line number like below:
    [PHP LINE=23]

    4. Ability to background highlighting on line/s of code
    [PHP HIGHLIGHT=5] –> which highlights line 5
    [PHP HIGHLIGHT=4,7] –> which highlights line 4 to 7

    Thanks in advance.

  17. Thanks for the suggestions Mark, I’ll see what can be done. 🙂

    Setting start line number like below:
    [PHP LINE=23]

    This feature is already there which lets you start your line numbers from a particular number. Read the manual for details. 😉

  18. Thanks. I just found it yesterday.

    Does this plugin remove spaces before the code? I pasted the code below to indent 3 spaces on 3rd and 7th line but it removes the indention.

    if (window.XMLHttpRequest) // Mozilla, Safari
    {
    RqstObj = new XMLHttpRequest();
    }
    else if (window.ActiveXObject) // MS IE
    {
    RqstObj = new ActiveXObject(“Microsoft.XMLHTTP”);
    }

    [JS]
    if (window.XMLHttpRequest) // Mozilla, Safari
    {
    RqstObj = new XMLHttpRequest();
    }
    else if (window.ActiveXObject) // MS IE
    {
    RqstObj = new ActiveXObject(“Microsoft.XMLHTTP”);
    }

    [/JS]

  19. Hi,

    I just installed this and it is great.

    One thing though. It would be great if I could just have a link to the PLAIN TEXT and not have the code in my post. Oh and also once the window pops up it will be HIGHLIGHTED text.

    Will

  20. Will, the plugin’s a code highlighter & not a plain-text presenter!! 😉 Still it’ll be interesting to see if this can be made available as an option without much messing around! 🙂

Sliding Sidebar