Support » Plugins » iG:Syntax Hiliter Plugin

Viewing 15 replies - 61 through 75 (of 103 total)
  • Hi,

    I have installed iG:Syntax Hiliter Plugin. But when I wrap script in either <code></code> / <java></java> or any other supported sytanx. I only get junk displayed inside the box. What could be the reason, please advice?

    Rok,

    Use square brackets for the code tags ([java]…[/java]) and it’ll probably look much better.

    /Emil

    emilast,

    Thanks, I will try it again and will report back.

    Is there a way to adjust the maximum height of the code box ? If it’s possible for the width, I would think that it would also be possible for the height. But where ?

    Nevermind… I added a height right after the width (which afcourse works), but the ‘preview’ of my post didn’t use the height… So in my post preview, I didn’t saw a less-higher textarea then before I added the ‘height’ property.

    Thank you. Finally a code highlighter that works (well, mostly) in WP 2.x. My only problem at the moment is that line numbers are blocks rather then numbers and I am not seeing the alternate lines in color, despite fancy numbers are turned on.
    Example: http://www.brianathomas.com/archives/2006/04/12/programming-my-current-state-of-learning/

    BrianAThomas,

    1. For your problem “line numbers are blocks”. Please look the below line or something similiar in your Style Sheet. And replace the word “square” with “decimal”. This will fix your problem.
    ul { list-style-type: square }

    2. “alternate lines in color” try to change the color and see if it works.

    Thank you Rok. Changing the square to decimal did the trick. Since I didn’t want to do it across the board, I did

    .syntax_hilite ul {
    list-style-type: decimal;
    }

    to limit it just to the syntaxHilite class.
    The numbers are showing as different colors, so either the boxes didn’t show the colors, or were not able to show them well enough. Although I originally thought the whole line had a different background color.

    Thread Starter Amit Gupta

    (@amit)

    umm, sorry for not being around to answer questions, I’ve been in a sort of semi-hibernation for sometime now(been quite busy with other stuff), not much online activity like working on this plugin. quite possible the situation may remain so for sometime more.

    @emilast:

    Is there a way of using HTML entities in code and have it translated before presentation?
    …..
    I cannot use the real < and > characters since WordPress will mistake them for XHTML tags and modify case, insert closing tags, etc…

    well, that shouldn’t be a problem if you turn off the option that allows WP to fix invalid xHTML!! 😉 that would ofcourse mean that you should either stop caring too much or write valid xHTML. but this is not the ideal way for many a users.

    so far, I’ve avoided having the post/comment being altered before its saved in the database. so the plugin has been just parsing the stuff that comes from the database. I’ll look into it & see if there’s some ideal solution.

    @Dauntless:

    Is there a way to adjust the maximum height of the code box ?

    if you meant the min-height & max-height then yes you can use them but remember that they are not supported by all browsers. however as you updated, you were only after a fixed height, so there, no problem.

    The rest was handled pretty nicely by emilast & Rok, thanks guys!! 🙂

    I merged WordPress with my homepage and checked whether it validates XHTML 1.0 Strict and the only thing that didn’t were the script tags inserted by iG:Syntax Hiliter. To fix it remove language="javascript" from syntax_hilite.php (3 occurences, two have escaped quotes).

    Thread Starter Amit Gupta

    (@amit)

    thanks for reporting, its already been reported though!! 😉

    Hi again, and thanks for your answer, Amit.

    I have inserted a temporary hack into syntax_hilite.php for fixing my problem (i.e. do some string replacements). It’s dirty, but it works.

    Now my greater/less than signs are displayed correctly. On the other hand, this might not be a wise thing to do if one wanted to display HTML source code, so it’s an ugly fix. Works for me though.

    BTW, your plugin is the only code hiliter I have found that actually works as it should. Well done!

    Cheers,

    Emil

    Thread Starter Amit Gupta

    (@amit)

    @emilast:

    I have inserted a temporary hack into syntax_hilite.php for fixing my problem (i.e. do some string replacements). It’s dirty, but it works.

    pretty cool!! 🙂

    BTW, your plugin is the only code hiliter I have found that actually works as it should. Well done!

    thanks!! 🙂 the thing is that I made this plugin for my own use, not with the intention of releasing it publicly. so one generally makes things good & useable if its for oneself, hence everyone else reap the benefits as well!! 😉

    If I have [mysql] as a text, which is NOT a tag, how should I do? Is there any escape character? Or can I disable it in a post?

    Thanks.

    Thread Starter Amit Gupta

    (@amit)

    If I have [mysql] as a text, which is NOT a tag, how should I do? Is there any escape character? Or can I disable it in a post?

    No, there’s no escape character & you can’t disable it in the post as well. But you needn’t worry since if you don’t have [/mysql] as well in the post, iG:Syntax Hiliter won’t come into action. There has to be both an opening & a closing tag for the plugin to parse anything!! 🙂

Viewing 15 replies - 61 through 75 (of 103 total)
  • The topic ‘iG:Syntax Hiliter Plugin’ is closed to new replies.