• http://featuringdave.com/logicalmeme/

    On my comments template, the PNG images for “submit comment� are not being recognized in browsers. (One gets the red X image in IE and the text “submit query� in Firefox).

    I have the two image files (submit.png, submit_over.png) in the proper directory. Here’s the relevant section of my Comments template:

    <input name=”submit” type=”image” id=”submit” tabindex=”5″ src=”<?php bloginfo(?stylesheet_directory?); ?>/img/submit.png” onmouseover=”this.src=”<?php bloginfo(?stylesheet_directory?); ?>/img/submit_over.png” onmouseout=”this.src=”<?php bloginfo(?stylesheet_directory?); ?>/img/submit.png” />
    <input type=”hidden” name=”comment_post_ID” value=”<?php echo $id; ?>” />

    Any idea why it wouldn’t be working?

Viewing 6 replies - 1 through 6 (of 6 total)
  • This: <?php bloginfo(?stylesheet_directory?); ?> needs to be like this: <?php bloginfo('stylesheet_directory'); ?> or if that doesn’t work, hard-code an absolute path or something, the image path is the problem, following it leads to a 404.

    Good luck,
    Michael.

    Also remember if you are going to have transparencies in your PNG files, IE will NOT recognize that. All other browsers (well, those not based on IE) will handle PNG transparencies just fine.

    IE can handle 8-bit in pngs. Just not 24-bit. And if anyone really wants a workaround for that, check out http://koivi.com/ie-png-transparency/

    Thread Starter sodafizz

    (@sodafizz)

    I tried Niziol’s suggestion, but I’m now getting the following parsing error when trying to create a comment:

    Parse error: parse error, unexpected ‘?’, expecting ‘)’ in /home/content/s/o/d/sodafizz/html/logicalmeme/wp-content/themes/blueband3/comments.php on line 72

    I’ve tried changing the ‘ mark back to a ? mark, but to no avail. I’m still getting the parsing error message…

    I’ll restore my backup ‘comments’ file when I go home tonight, but I still can’t figure out why the PNG file does not read in even Firefox.

    Kafkaesqui

    (@kafkaesqui)

    The error relates to niziol’s suggestion and means you missed something when changing ? to ' around the bloginfo() parameter 'stylesheet_directory'. Your images do not display because the path to them is incorrect.

    If you continue to have problems, copy the source of your comments template (comments.php) to:

    http://paste.uni.cc

    and reply with the url to it.

    moshu

    (@moshu)

    Based on the quotes you posted in the OP the first question that comes up is: what text editor are you using to edit your template files?

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘PNG image files – Recognition Problem’ is closed to new replies.