iG:Syntax Hiliter Plugin (104 posts)

  1. nunomira
    Posted 10 years ago #

    When you write code like this:


    You get a br tag after the code.
    You have to write


    instead, which isn't as readable.

    In php, if you use the open and closing tags, the open tag gets writen like
    < ?php
    as it should. (a non braking space is added).

  2. idbehold
    Posted 10 years ago #

    I cannot get this to work with wordpress 1.5, any help?
    This is what I get every time:
    Parse error: parse error, unexpected ';' in /home/.nasya/workingbath/workingbath.com/wp-content/plugins/syntax_hilite.php on line 23

    How is $gPath supposed to be formatted?
    Ive tried:

    • var $gPath = /home/workingbath/workingbath.com/wp-content/;
    • var $gPath = '/home/workingbath/workingbath.com/wp-content/';
    • var $gPath = "/home/workingbath/workingbath.com/wp-content/";
    • var $gPath = /home/workingbath/workingbath.com/wp-content/geshi/;
    • var $gPath = '/home/workingbath/workingbath.com/wp-content/geshi/';
    • var $gPath = "/home/workingbath/workingbath.com/wp-content/geshi/";

    as well as

  3. Amit Gupta
    Posted 10 years ago #

    The path.php utility is included in the package just b'coz some of you don't understand what a Physical Path is. Please use that too get the path.

    It looks like you've solved the problem as the plugin is working well on your website. :)

  4. abrazell
    Posted 10 years ago #

    This is probably glaringly obvious but it seems to be getting overlooked.... how do I call this from within my post. I modified the plugin to do bash highlighting but unsure how to display a snippet of a bash script....

  5. Amit Gupta
    Posted 10 years ago #

    just enclose your snippet in the tags you created for bash code. or should I ask how did you changed the plugin? :)

  6. hiwawang
    Posted 10 years ago #

  7. phase
    Posted 10 years ago #

    hi, i also have installed the plugin and it works very fine but when i go through my site by the archive or by the categories the plugin won’t work. i use wordpress 1.5 with permalinks. any idea?

  8. Amit Gupta
    Posted 10 years ago #

    Yeah, the code on archives & categories pages is not highlighted, I've noticed this on my WP1.5 blog too. Rest assured, this will be tackled.

  9. Amit Gupta
    Posted 10 years ago #

    v3.0 of iG:Syntax Hiliter has been released. More details at http://blog.igeek.info/still-fresh/2005/06/29/let-the-code-be-colourised/

    Those using WP1.5 or above, please update!! :)

  10. hiwawang
    Posted 10 years ago #

    There is a bug when i used “[ ]� before [cpp]..[/cpp] and it won’t display the content from “[ ]� to [/cpp],count help me?I have to use the 2.0

  11. Amit Gupta
    Posted 10 years ago #

    hiwa, doing multiple posts won't help fix the bug faster!!! Commenting on the plugin page was enough, there was no need to send 2 eMails from my website and then posting here as well. You should learn to wait, I'm not sitting all day looking up at my blog or WP-Support forums waiting for bug reports to come in & fixing them instantly!!

    Everything takes time, you've reported the bug, I thank you for that, now please wait till I release a fix.

  12. Amit Gupta
    Posted 10 years ago #

    A critical bug-fix update has been released at http://blog.igeek.info/still-fresh/2005/07/05/worming-my-way-out/. All of those who downloaded/are using iG:Syntax Hiliter v3.0, please upgrade to v3.1 asap.

  13. pcdinh
    Posted 10 years ago #

    I just installed and modified your plugin a bit to make it work on the comments.


  14. sarahknz
    Posted 10 years ago #


    the code is great but I have snippets of blogger templates in my post and the hiliter is putting a space between the < and $ which breaks the example.

    see http://sarahk.pcpropertymanager.com/blog/essential-change-to-blogger-templates/163/

    any solutions?



  15. Amit Gupta
    Posted 10 years ago #

    Its been fixed, please see the update at http://blog.igeek.info/still-fresh/2005/07/05/worming-my-way-out/ for iG:Syntax Hiliter v3.1.1

  16. chaaban
    Posted 9 years ago #

    i think using iG:Syntax Hiliter make the xhtml code invalid , there is a little "error" , a type must be added :

    Error Line 29 column 116: required attribute "type" not specified.

    because the type is missing

    correct one : <script type="text/javascript" xxx.js ..

    to fix it :

    change the $hHead in the function called :

    // function for outputting styles (syntax_hilite.php)

    from :

    $hHead .= " <script language=\"javascript\" src=\"".$igsyntax_hiliter_path."syntax_hilite_js.js\"></script>\n";

    to :

    $hHead .= " <script type=\"text/javascript\" src=\"".$igsyntax_hiliter_path."syntax_hilite_js.js\"></script>\n";

  17. moshu
    Posted 9 years ago #

  18. chaaban
    Posted 9 years ago #

    (Y) moshu :) sorry i dont read comments usually ...

    it was just today that i was testing if i'm still in peace with w3c :) that i saw this error .

    anyway ,Thank's again.


  19. Amit Gupta
    Posted 9 years ago #


    sorry i dont read comments usually ...

    you should read comments, a lot of times they contain quite a bit of useful info & that's particularly true with posts regarding any theme/plugin etc. since others using it might've posted their problem(s) & their solutions might exist there, which may be the ones you are looking for!! :)

  20. Amit Gupta
    Posted 9 years ago #

    iG:Syntax Hiliter v3.5 is now available for download with more stuff, 2 new languages(Ruby & MySQL) and bugfixes. :) It has been tested for compatability with both WP1.5.2 and WP2.0.1!!

  21. SeanM
    Posted 9 years ago #

    Thanks amit for such a well written and thought out plugin. Geshi is great and I am glad I can use it in wordpress.

  22. Amit Gupta
    Posted 9 years ago #

    an update is coming, so hold onto your horses!! :)

  23. dorelal
    Posted 9 years ago #

    I noticed the message from Amit on the manual.

    Also a WYSIWYG editor(like the one bundled with WP2.x) will probably mess up your code when you paste it in the editor. So if you are having that issue, then please don't report it as a bug or anything, its not a bug on the part of this plugin.

    The plugin works fine for me for all the cases except xml messages.

    For example. Let's say that I have an xml message


    I take the above code and put it in the WYSIWYG editor of WP2.x and I hit submit. I get the required result on the page.

    But let's say that I need to change the tag from "test1" to "test2". Now when I open up the message on WYSIWG editor there is no "test1". If I look at the html code again there is no 'test1'.

    I'm just wondering for a large xml files how do rest of the wordpress users go about formatting their code.

    As I mentioned everything else works fine. It's just that with xml messages I'm struggling.


  24. Robert Accettura
    Posted 9 years ago #

    Looks like there is a bug on code in comments:

    as you can see, there's a different output for comments.

  25. Amit Gupta
    Posted 9 years ago #

    Robert, that's not a bug as per my knowledge. Its a problem with CSS & which only you can fix since its dependent on the theme being used on a blog!! :)

  26. pkellner
    Posted 9 years ago #

    I just don't seem to get it. Life was great in 1.5.2. Now, I can't even seem to upload a file and make it work. I've pasted some simple code below that when I upload into the new 2.0.2 editor, it seems to kill it. Is this code correct for the plugin 3.5 I just installed?


    Here is some XML

    <textBox id="ctl00_ContentPlaceHolder1_TextBoxUserSearch">
    <textChangedBehavior timeout="100"
    changed="onTextChange" />

    function onTextChange() {
    __doPostBack('ctl00_ContentPlaceHolder1_GridViewMemberUser','') ;


  27. Robert Accettura
    Posted 9 years ago #

    Ok fixed it... nm... I posted that when rather tired. ;-)

  28. pkellner
    Posted 9 years ago #

    Please ignore my rant above. The WISWIG editor (when I was pressing the HTML button) was eating my code). I've switched to non-wISWIG and am very happy.

    I do have another question (hope you havent' stopped reading). How can change the default width of the box the code lands in?

    Thanks and I love the plain text button. Had to see it to get it.


  29. pkellner
    Posted 9 years ago #

    It's me Back again. Everything worked great in my test system because I have both my wordpress files and URL one level from the main. That is: http://test.peterkellner.net/wp for the wp files and http://test.peterkellner.net/wp for the URL of the blog.

    In my production, I have wp files at http://peterkellner.net/wp and I have the reference URL for the blog set to http://peterkellner.net

    This causes the highlighter plugin to fail. I get javascript errors on my browser and the nice frame around the text doesn't show up.

    Is there a workaround for this?

    Thanks. (spent almost all day narrowing the problem down to this)

  30. Amit Gupta
    Posted 9 years ago #

    How can change the default width of the box the code lands in?

    there's "syntax_hilite_css.css" file for that in the CSS folder. open that & edit away. be sure not to mess around since you are on your own in that case!! :P

    as for your other problem, I'll look into it to see if there's a fix available!! :)

Topic Closed

This topic has been closed to new replies.

About this Topic