Code for Fun!!

Leave a Reply

Comment as a guest.

  1. I have the same error:
    Plugin could not be activated because it triggered a fatal error.

    My WP version is 2.2. Can you give me some solution?

    Thanks

  2. Danny, Antoniy, sorry guys but right now I can’t suggest anything, not without looking into v2.2 for which I’ll need some time!!

  3. With WordPress 2.2 and version 3.5 of this plugin, I can’t remove the line numbers in the options. Keeps resetting to default of yes.

    What line would I change to make the default no in the code?

  4. lhoff, you will have to hack a bit & the solution wouldn’t be dynamic. I mean if you feel the need to display line numbers again, you would have to modify the plugin file again. If you are game then open the “syntax_hilite.php” file & in that comment out lines 139 to 149 and also comment out line 151. Now line numbers won’t be shown for your code.

  5. FWIW, I just upgraded my WP install locally to WP 2.3 and popped this plugin in with no problems at all. Everything worked perfectly! I could configure it without problem.

    This is the only plugin I use, so now I’ll upgrade the live site and I’m good to go again.

    Thanks for this plugin, I’ve been using it since the beginning and love it!

  6. I also upgraded to WP 2.3 and it didn’t break anything.
    A question, would it be possible to add a Word Wrap for themes that have fixed width so that the code box doesn’t overflow? I would guess during plain text mode, it would have to turn off word wrap so that they can copy the code properly, but during the dynamic display it should be able to wrap around. See this post as an example of the text overflowing the bounds of the post area.
    Secondary off topic question, what plugin runs the comments on this page? Is this the coComment thing?

  7. Brian, the overflow is only in the inner div so that the code doesn’t break by wrapping, so it produces those scrollbars. The overall width of the box is fixed, its just that the post area of your theme is small & hence the box is running off. Check the CSS file of the plugin & fix the width as per your need! πŸ™‚

    what plugin runs the comments on this page?

    Come again? don’t think I got you. This blog is coComment compatible(because of coComment plugin) if thats what you want to know, meaning that coComment will work perfectly with this blog! πŸ™‚ If thats not what you mean then please explain.

  8. I’ll check the CSS of the plugn. Thank you.

    Yeah, I was just wondering what made the cool comment box that I type this in. I was digging the stuff to the left, and the avatars in some of the comments.
    I am presently experimenting with Intense Debate as a comment system (just added it today), and it doesn’t seem compatable with the highlighter, I think they are doing something to the code before it posts as it shows the brackets, the language setting and then strips all the spacing. So I am going to guess they have something to fix on their end. Just an FYI in the event other blogs who use this start saying stuff.
    Also, the support thread the post says to use is close, so you may need to edit the post. πŸ™‚

  9. I was just wondering what made the cool comment box that I type this in

    ah, the comment box on this blog? I made it myself along with this current “Grey Storm” theme. The Javascript that powers the functionality of toolbar(left) in this comment box was borrowed from the quicktags.js file of WordPress & modified by me. πŸ™‚ Styles & buttons & colours are of my own design! πŸ˜‰

    Thanks for the heads up on Intense Debate thing, seems to look like a cool service, will check it out. And yeah, I noticed the closed thread at WordPress forums as well, but never got around to updating this post! Have done so now!! πŸ™‚

  10. Great plugin! I got a question about indentation. It works for the first time when you paste your code. You get a properly indented code. But when you edit and resave all the indents get lost. Actually if you just open your post for editing the indents are already absent in the post editor.
    Maybe somebody knows how to resolve the problem? I tried to wrap the code in but the result is bad in browsers. How to make the post editor render the code correctly when your post is reopened?

    Thnx!

  11. @websash

    Are you using the Rich Text Editor(WYSIWYG) that comes with WordPress? I’ve seen such things, like code messing up or indentation loss etc., happening only when WYSIWYG editor is used. The normal plain text editor doesn’t mess up code in anyway. So if you are using WYSIWYG editor then don’t use it when writing/editing a post which contains code that you want to hilite. A warning is already there in the plugin manual about using it. πŸ™‚

  12. Oops I forgot about it. Thanx a lot. Yes I unchecked the “Use the visual editor when writing” checkbox under Users -> Your Profile and it’s working πŸ™‚

  13. Amit, Is it possible to run two version of IG Syntax Hiliter simultaneously? I need to show two very different presentations of code simultaneously. I’m hoping I can just make a copy of the plugin and modify a few settings so one doesn’t overwrite the other, either during activation or when changing option settings. Would you be able to point me to what needs to be altered?

  14. @websash:
    You are welcome πŸ™‚

    @Rich:
    Yes its possible but you will have to first modify the names of all the option keys that the plugin stores in the DB so that they are not overwritten(unless you don’t mind same settings in both versions). Then you will have to edit the tag parsing & make tags of 1 version a bit different than the other so that each version parses its own tags.

  15. Hi I am trying to get your plugin to work, but as a few other people here I have a problem when I try to activate it. I get “Plugin could not be activated because it triggered a fatal error.”
    Did you ever manage to figure out what is causing that ?

    I am using WordPress 2.3.2 with the new XMLRPC patch.

    Thanks

  16. @Amit: Thnx for the great plugin.

    @ALL: All those who are having “fatal error” issues, the “fix” is very simple. The plugin installation has to be a bit different. instead of putting “ig_syntax hiliter plugin” folder in your plugins directory, put its contents there. This means that syntax-hilite.php will be directly under plugins directory plus the folder ig_syntax_hilite will also be there directly under plugins directory. (Fixed it in a couple of seconds cuz looking at the error straightaway told that a file was being included from wrong path)

  17. The plugin seems to be having troubles with the WordPress 2.3.3 Update the code does not wrap on the box and it shows all the lines.

    Any insight on this issue ???

  18. Hey Amit,

    i have a tiny problem: When i use smartypants (daringfireball.net/projects/smartypants), all straight quotes will be turned into curly ones. Which is dandy for Ò€œordinaryÒ€ text, but it shouldnÒ€ℒt be done with the code, obviously. Well, smartypants will not beautify straight quotes if they are inside , <code>, , or tag blocks.

    So, if you use smartypants and IG:Syntax Hitliter, you have to wrap code like this: <code>[php ] actual code here [/php ]</code>.

    Is there a way to fix that in the plugins code?

    Besides that, i am having no problems under WP 2.3.3 so far πŸ™‚

Sliding Sidebar