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?
<?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.
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/
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.
The error relates to niziol’s suggestion and means you missed something when changing
'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:
and reply with the url to it.
- The topic ‘PNG image files – Recognition Problem’ is closed to new replies.