Image Replacement WordPress Plugin

NOTE: This plugin is not currently being maintained, support requests will not be responded to. I may come back to it at a later date, but it’s too unstable at the moment.

This plugin creates image replacements for HTML tags. Generally it will be used to replace the titles for posts, but it can replace any HTML tags with images of the text in any font (yes you can replace p tags, but this a Bad Idea).

It takes a different approach to the excellent Image Headlines Plugin from Cold Forged. Rather than changing the template files to specify which tags to replace with images, with this plugin you create a replacement in options and specify which HTML tags you want to replace (i.e. h1, h2, h3, etc.). It uses javascript to do the replacement at display time, so there is no need to edit the template files and therefore it will continue to work when you change templates.

Image Replacement Plugin options pageIt replaces the HTML tags you specify (in options) with an image of the text. So, if in your template you have your post titles set as a h3 tag, & you’d like them to be images, you go into the plugin’s options and create a new replacement for h3 tags and set the font, colour, size, etc. There is provision to limit to certain classes too (i.e. only replace h3 tags with a class of storytitle).

The obvious question is: Why create a plugin to do this when a perfectly good one already exists? Firstly let me say this is in no way a disparagement of the Image Headlines plugin, which is very cool, I just wanted a different way of doing it. With the Image Headlines plugin, you need to edit your template files to set which template tags you wanted to replace, which I’m far too lazy to do. Also if I disabled the plugin, it broke my template because it left -image- in front of the text. I also could have fixed this, but as I said, lazy.

The other reason was that if people have images turned off then they see the ugly alt text (in IE anyway, Firefox just displays it as plain, styelable text, but IE seems to need to highlight the fact that there’s a broken image). My Image Replacement plugin will not run if the user has either images or javascript turned off, it will just leave the tags alone as plain text that will be styled with CSS as per normal. Credit goes to Peter-Paul Koch for his script to check if the user’s browser can display images.

This plugin isn’t for everyone. A lot of people don’t like using javascript, so for them, the Cold Forged plugin would be much better.

This plugin is designed for WordPress 2+, but it should work with earlier versions. Please let me know if it doesn’t.

Installation

Download the zip file using the download link under ‘Plugin Information’. This zip file contains the latest stable version of the plugin, which is a php plugin file and a fonts folder containing one font (A Yummy Apology). Extract this zip file into your wp-content/plugins/ folder, then go to the plugins page in WordPress and activate the Image Replacements plugin. To use different fonts, simply copy the ttf or otf fonts into the wp-imagereplacement-fonts folder that is now in your plugins folder.

General Options

There are general options that apply to all image replacements, and they have mostly to do with caching. You can set whether to use the cache (highly recommended), where the cache files will be located and how many days before the cache is cleared. You can also set what the demo text is; this is just the text that you see on the options page as an example of the image replacement you’ve created.

204 thoughts on “Image Replacement WordPress Plugin

  1. Hi there, first, I just want to say thanks, right off the bat. I fear, though, that I’m commenting to report a bug. I can get the image replacement to function, by manually setting my template to output <img src=”http://www.raspberryswirl.net/?background=FFFFFF&colour=f42584&font=marydale&type=png&padding=&shadow=&size=13&text=: “> but I had configured the options to replace all h2 tags, and it just utterly failed to function.

    I dropped the plugin and its font folder into my plugins directory, and activated it, and as I could get to the options for the plugin, I assume I did that right. It also displayed the “lazy dog” preview as it should have, although at certain point sizes it failed to cooperate. However, it simply would not replace h2 tags, as I set it to do. Did I miss something? Any help is greatly appreciated!

  2. Shelby, I’m having trouble finding the h2 tags on your site, the headings are wrapped in a div not a h2 tag, so unless you’ve removed the h2 tags from your template, that would probably be the reason.

    If not, can you let me know what version of WordPress you’re running?

  3. Hi there, first, I just want to say thanks, right off the bat. I fear, though, that I’m commenting to report a bug. I can get the image replacement to function, by manually setting my template to output <img src=”http://www.raspberryswirl.net/?background=FFFFFF&colour=f42584&font=marydale&type=png&padding=&shadow=&size=13&text=: “> but I had configured the options to replace all h2 tags, and it just utterly failed to function. I dropped the plugin and its font folder into my plugins directory, and activated it, and as I could get to the options for the plugin, I assume I did that right. It also displayed the “lazy dog” preview as it should have, although at certain point sizes it failed to cooperate. However, it simply would not replace h2 tags, as I set it to do. Did I miss something? Any help is greatly appreciated!

  4. Shelby, I’m having trouble finding the h2 tags on your site, the headings are wrapped in a div not a h2 tag, so unless you’ve removed the h2 tags from your template, that would probably be the reason.If not, can you let me know what version of WordPress you’re running?

  5. First, you gave us VoTD plugin, then you have to come up with this brilliant alternative to coldforged’s most popular plugin for wordpress. What’s wrong with you!? …..Nothing! I thank God for you :)

  6. As of 0.85beta,downloaded an hour ago from this site, i still could not get it to work. No demo could be generated, despite that the fonts can be selected from the drop-down menu.

    I suspect it’s an issue of the cache folder. since you’ve never stated any instructions that include creating that cache folder and chmoding it to 777, i assumed the plugin would do that for us. that didn’t work. So what i last tried was to change the cache path to /wp-plugins/cache and chmod it to 777. Didn’t work as well. Till now, i’ve not seen anything in the cache folder, be it the default one or the self-created one. quite simply, it seems like nothing is being written, in my case.

    yet more oddly, when activated, the plugin is causing the selected heading, eg., h2, which codes for the main posting titles, to pause a little while before showing up. In IE 6.0, this is even clearer, as the image-placeholders popped up with an annoying “X” in them.

    what gives??? Let me take this time to thank you for your round the clock support. Cheers mate!

  7. First, you gave us VoTD plugin, then you have to come up with this brilliant alternative to coldforged’s most popular plugin for wordpress. What’s wrong with you!? …..Nothing! I thank God for you :)

  8. Sir, your plug-in works wonderfully for me. However, I can only get it to make a 30pt sized letters, when for one part of my site I would really like to have 50pt letters. Can you help me with this?

  9. As of 0.85beta,downloaded an hour ago from this site, i still could not get it to work. No demo could be generated, despite that the fonts can be selected from the drop-down menu. I suspect it’s an issue of the cache folder. since you’ve never stated any instructions that include creating that cache folder and chmoding it to 777, i assumed the plugin would do that for us. that didn’t work. So what i last tried was to change the cache path to /wp-plugins/cache and chmod it to 777. Didn’t work as well. Till now, i’ve not seen anything in the cache folder, be it the default one or the self-created one. quite simply, it seems like nothing is being written, in my case.yet more oddly, when activated, the plugin is causing the selected heading, eg., h2, which codes for the main posting titles, to pause a little while before showing up. In IE 6.0, this is even clearer, as the image-placeholders popped up with an annoying “X” in them.what gives??? Let me take this time to thank you for your round the clock support. Cheers mate!

  10. @ R.: Hi, would mind posting your site here? i will love to see someone else getting this to work…hopefully it will shed some light for me getting it to work on my site… cheers.

  11. Sir, your plug-in works wonderfully for me. However, I can only get it to make a 30pt sized letters, when for one part of my site I would really like to have 50pt letters. Can you help me with this?

  12. R: If you download the plugin again, I’ve changed it so that the font size can be between 1 – 100. I can’t imagine anyone is going to want font bigger than that on a website :)

  13. Sweet! Thank you very much, Glenn. I know 50 would normally be obnoxious, but obnoxious is what the client wants.

  14. @ R.: Hi, would mind posting your site here? i will love to see someone else getting this to work…hopefully it will shed some light for me getting it to work on my site… cheers.

  15. R: If you download the plugin again, I’ve changed it so that the font size can be between 1 – 100. I can’t imagine anyone is going to want font bigger than that on a website :)

  16. Sweet! Thank you very much, Glenn. I know 50 would normally be obnoxious, but obnoxious is what the client wants.

  17. Pingback: WordPress Station

  18. This plugin doesn’t work on my default theme instead it only works on the Bubrick default theme.

  19. Image Replacement WordPress PluginDevelopment on a ShoestringBuilding on the Cold Forged’s Image Headline plugin, this plugin allows a tag to be marked for replacement, including tags specific to classes, thus not requiring the theme to be edited. All this is done through an op…

  20. This plugin doesn’t work on my default theme instead it only works on the Bubrick default theme.

  21. I’m sorry to say that it does not seem to work for me. I set a replacement for to be h1 Callistroke 30 #000000 #FFFFFF and it shows the preview in the setup. But nothing happens on my website.

    I’d be happy to help in whatever way you need. =)

    It’s a great idea, especialy that you can have different settings for the tags, even more so as only IE supports @font-face.

  22. Nebelmond: I think I’ve found why it’s not working on your site. This plugin uses the wp_footer action to put a javascript call in the footer of the site. If you have a look at your footer template (or at the bottom of your index template if you don’t have a footer template) you need to have
    <?php do_action('wp_footer'); ?>down there.

    If you put that in, it should work, as you can see from this link the images are being generated on your site fine.

  23. Yes, the plugin is generally working, I can see the preview in the setup area and there are temp files on the server.

    Alas, I added the php and it did add a wp_imagereplacement_init(); to the html. But it does not replace the h1.

    I had a quick look at the files in the cache and there is none with the specified text in my only h1 tag (Nebelmond in the header). But there is one image I can’t open where IrfanView complains it can’t read the header.

  24. I’m sorry to say that it does not seem to work for me. I set a replacement for to be h1 Callistroke 30 #000000 #FFFFFF and it shows the preview in the setup. But nothing happens on my website.I’d be happy to help in whatever way you need. =)It’s a great idea, especialy that you can have different settings for the tags, even more so as only IE supports @font-face.

  25. First off, very nice plug-in, but it’s not replacing on my site. I know this was meant for WP 2.0, but at the moment I’m running 1.5.2, and like you with editing your theme to get Cold Forged plugin to work, I’m too lazy to upgrade my wordpress. Do you know of any reason why your plugin is not working?

  26. Nebelmond: I think I’ve found why it’s not working on your site. This plugin uses the wp_footer action to put a javascript call in the footer of the site. If you have a look at your footer template (or at the bottom of your index template if you don’t have a footer template) you need to have <?php do_action('wp_footer'); ?>down there.If you put that in, it should work, as you can see from <a href=”http://www.nebelmond.net/?wp-imagereplacement=true&background=F6F7F7&colour=000000&ypad=&size=13&padding=0%200%205%200&shadow=1&font=Callistroke&type=png&text=This%20is%20a%20test” rel=”nofollow”>this link the images are being generated on your site fine.

  27. Yes, the plugin is generally working, I can see the preview in the setup area and there are temp files on the server.Alas, I added the php and it did add a wp_imagereplacement_init(); to the html. But it does not replace the h1.I had a quick look at the files in the cache and there is none with the specified text in my only h1 tag (Nebelmond in the header). But there is one image I can’t open where IrfanView complains it can’t read the header.

  28. Brutal: I’m not actually sure. The image functions in PHP don’t have tracking options (character spacing). I’ll have a bit of a dig & see what I can find though.;

  29. Nebelmond & kamron_1: I think I may have found the problem. Before the javascript does the replacements, it tries to load an image to test if the user’s browser can load images. I had set this image to
    /wp-admin/images/wordpress-logo.png because I thought everyone had this, but on both your sites, that location gives a 404 not found error, so I guess that was a bad assumption.

    I’ve released version 1.1 of the plugin that now has another option under general options called ‘test image’. You need to set this to the loacation of an image on your site. It can be any image, but I suggest a fairly small one, as it will be loaded every time someone hits your site. In fact it might be worthwile to create a 1px x 1px image and upload it somewhere and just use that as the test.

  30. First off, very nice plug-in, but it’s not replacing on my site. I know this was meant for WP 2.0, but at the moment I’m running 1.5.2, and like you with editing your theme to get Cold Forged plugin to work, I’m too lazy to upgrade my wordpress. Do you know of any reason why your plugin is not working?

  31. Brutal: I’m not actually sure. The image functions in PHP don’t have tracking options (character spacing). I’ll have a bit of a dig & see what I can find though.;

  32. Nebelmond & kamron_1: I think I may have found the problem. Before the javascript does the replacements, it tries to load an image to test if the user’s browser can load images. I had set this image to /wp-admin/images/wordpress-logo.png because I thought everyone had this, but on both your sites, that location gives a 404 not found error, so I guess that was a bad assumption.I’ve released version 1.1 of the plugin that now has another option under general options called ‘test image’. You need to set this to the loacation of an image on your site. It can be any image, but I suggest a fairly small one, as it will be loaded every time someone hits your site. In fact it might be worthwile to create a 1px x 1px image and upload it somewhere and just use that as the test.

  33. Yes, now it works. =)

    By the way, the wordpress-logo.png is there in my installation, just the installation is not in the root directory. It works with the new field to specify a file yourself, but you could have used one of the bloginfo() tags instead, too.

  34. Hi. I really like the idea of this plugin. The earlier attempts were just too confusing for a newbie like me. Anyway, I tried on the plugin but it doesn’t seem to be working. I changed to different themes to check if it was my current theme that was problematic. There weren’t any changes. Please help.

  35. Nebelmond: Excellent. Yes I could have used that, but then people who have for some reason removed the image won’t be able to use the plugin. It’s simpler this way.

  36. Don: On your site you’ve specified a replacement on h3 with class ‘story’, but in your HTML code, the h3 tags have no class, it is a div that has the class ‘story’.

    Also I can’t find the footer script, check youtr footer template to ensure that the wp_footer(); action is in there.

  37. the wp_footer(); is there.

    if the h2 or h3 tags have no class, can i just leave the class box blank?

  38. Okay, I did that and still no change. If I used a generic h2 or h3 tag, will the plugin replace all of them even if they were under different classes… like a global setting of sorts?

  39. ummm… i can’t find a link to download… this page says to download the zip file from the link at the top of the sidebar…can’t find it…

  40. how do I get the padding to work? what do I put in there? right now it is cutting off part of the bottom where letters like “g” and “y” get cut off a lil at the bottom…

  41. Kahil: padding works like condensed CSS padding / margin values work. That is, there are 4 values, seperated by spaces. The order is:
    Top Right Bottom Left, so an image with 2px at the top & bottom and 4px left & right would be
    2 4 2 4 It’s easiest to remember like a compass going clockwise: N E S W. For yours it’s probably going to need something like
    0 0 5 0 but you’ll just need to experiment with the bottom padding value.

    The values are in pixels not points too.

    I probably should split them out into seperate values, but it was just simpler to roll out this way :)

  42. ok…lol…last time i’ll bother you… how do i get it to do things like make the font bold face or italics, etc…?

  43. Yes, now it works. =)By the way, the wordpress-logo.png is there in my installation, just the installation is not in the root directory. It works with the new field to specify a file yourself, but you could have used one of the bloginfo() tags instead, too.

  44. Hi. I really like the idea of this plugin. The earlier attempts were just too confusing for a newbie like me. Anyway, I tried on the plugin but it doesn’t seem to be working. I changed to different themes to check if it was my current theme that was problematic. There weren’t any changes. Please help.

  45. Nebelmond: Excellent. Yes I could have used that, but then people who have for some reason removed the image won’t be able to use the plugin. It’s simpler this way.

  46. Don: On your site you’ve specified a replacement on h3 with class ‘story’, but in your HTML code, the h3 tags have no class, it is a div that has the class ‘story’.Also I can’t find the footer script, check youtr footer template to ensure that the wp_footer(); action is in there.

  47. the wp_footer(); is there.if the h2 or h3 tags have no class, can i just leave the class box blank?

  48. Okay, I did that and still no change. If I used a generic h2 or h3 tag, will the plugin replace all of them even if they were under different classes… like a global setting of sorts?

  49. ummm… i can’t find a link to download… this page says to download the zip file from the link at the top of the sidebar…can’t find it…

  50. how do I get the padding to work? what do I put in there? right now it is cutting off part of the bottom where letters like “g” and “y” get cut off a lil at the bottom…

  51. Kahil: padding works like condensed CSS padding / margin values work. That is, there are 4 values, seperated by spaces. The order is:Top Right Bottom Left, so an image with 2px at the top & bottom and 4px left & right would be2 4 2 4 It’s easiest to remember like a compass going clockwise: N E S W. For yours it’s probably going to need something like0 0 5 0 but you’ll just need to experiment with the bottom padding value.The values are in pixels not points too. I probably should split them out into seperate values, but it was just simpler to roll out this way :)

  52. ok…lol…last time i’ll bother you… how do i get it to do things like make the font bold face or italics, etc…?

  53. Kahil, sorry that option doesn’t exist in the plugin, just use a bold / italic font file. I’m not sure if that can even be done, I’ll have a look.

  54. Kahil, sorry that option doesn’t exist in the plugin, just use a bold / italic font file. I’m not sure if that can even be done, I’ll have a look.

  55. Hi there… I’m trying to use this plugin but doesn’t work :(…
    I place a h1 and h2 replacement and a class “text1″ span replacement too…
    I have the “wp_footer” included so… I don’t see what I’ve done wrong…
    If anyone could help me :)

    THANX
    Antoine

  56. Antoine: your h2 tags don’t seem to have a class of ‘subcontentwrap’ which is what you’ve set the replacement to & as far as I can see, there is no span with the class ‘text1′, so that would be why it isn’t showing up.

  57. Yes that’s right… Coz I gave up and I’ve restored the default parameters of the theme…
    I’m gonna modify that :)

  58. Hi there… I’m trying to use this plugin but doesn’t work :(…I place a h1 and h2 replacement and a class “text1″ span replacement too…I have the “wp_footer” included so… I don’t see what I’ve done wrong…If anyone could help me :)THANXAntoine

  59. Antoine: your h2 tags don’t seem to have a class of ‘subcontentwrap’ which is what you’ve set the replacement to & as far as I can see, there is no span with the class ‘text1′, so that would be why it isn’t showing up.

  60. Yes that’s right… Coz I gave up and I’ve restored the default parameters of the theme…I’m gonna modify that :)

  61. Hello… I’m working on a site, using WP as a small CMS.

    I decided to use your excellent script precisely because of the functionality it provides. I’m creating static pages with different section separators that employ your plugin to display the section name in a particular font/color combination.

    Up until now, everything had been running smoothly as I used Safari to test my CSS and the way this plugin would display the section headers. A few minutes ago, I decided to start cross-checking with other browsers in Windows XP and MacOS X (IE, Opera and Firefox, which are the main ones I always check on initially, in both platforms), and for some reason the javascript that replaces the text with the images isn’t working on any browser other than Safari. IE, Firefox and Opera (both in Win and OS X) simply aren’t executing the script, and all I get is the text, which doesn’t look nice at all.

    I’ve made sure that all browsers had javascript activated, as well as images displayed. I also made sure that I had the most recent versions of all browsers (except for Safari, I still have to check on that, but the version I have is pretty recent).

    I don’t have much experience with javascript, so I’d really appreciate your help in solving this dilemma, as I’ve grown quite fond of the functionality of this plugin in the past few hours I’ve been designing the site.

    You can see the site here: http://www.somoscarbono.com/musica
    (it is in spanish, but you’ll see two sections looking like this: “:::::::::::::::::::: Section Name”)

    Please let me know of anything I may need to do to get this javascript to work uniformly throughout all popular browsers (at least these three).

  62. I decided to check the output source on this page and noticed one slight difference between what the javascript looks like here and how it reads at my site. The very first function, called “wp_imagereplacement_init()” has nine lines of code on both sites, but yours shows eight of those lines commented out (/* */). The current version of your plugin does not output these lines as commented out.

    I went into the plugin file and made this change, leaving only the one line that’s being executed in your site (effectively the one that actually makes the image replacement) to be executed in mine. And now it works in the latest versions of all three browsers mentioned in my previous comment, both in OS X and XP.

    In case someone else has this problem in the future, I hope you don’t mind me posting the necessary change here.

    Open the “wp-imagereplacement.php” file and search for this:
    {
    var W3CDOM = (document.createElement && document.getElementsByTagName);
    if (!W3CDOM) return;
    var test = new Image();
    var tmp = new Date();
    var suffix = tmp.getTime();
    test.src = '?'+suffix;
    test.onload = function short_name?>_imageReplacement() {
    short_name."_replace(document.getElementsByTagName('".$d[$this->short_name . '_element']."'),'".$d[$this->short_name . '_class']."', 'background=".$d[$this->short_name . '_backgroundcolour']."&colour=".$d[$this->short_name . '_fontcolour']."&ypad=".$d[$this->short_name . '_ypad']."&size=".$d[$this->short_name . '_fontsize']."&padding=".$d[$this->short_name . '_padding']."&shadow=".$d[$this->short_name . '_shadow']."&font=".$d[$this->short_name . '_fontname']."&type=png');\n";
    }
    ?>
    }
    }

    Now replace all of that with this:
    {
    /*var W3CDOM = (document.createElement && document.getElementsByTagName);
    if (!W3CDOM) return;
    var test = new Image();
    var tmp = new Date();
    var suffix = tmp.getTime();
    test.onload = function short_name?>_imageReplacement() {*/
    short_name."_replace(document.getElementsByTagName('".$d[$this->short_name . '_element']."'),'".$d[$this->short_name . '_class']."', 'background=".$d[$this->short_name . '_backgroundcolour']."&colour=".$d[$this->short_name . '_fontcolour']."&ypad=".$d[$this->short_name . '_ypad']."&size=".$d[$this->short_name . '_fontsize']."&padding=".$d[$this->short_name . '_padding']."&shadow=".$d[$this->short_name . '_shadow']."&font=".$d[$this->short_name . '_fontname']."&type=png');\n";
    }
    ?>
    /*}
    test.src = '?'+suffix;*/
    }

    Save your file, upload it, and now the replacement should show up in at least IE, Firefox and Opera in the Windows XP and OS X platforms.

    Thank you, Glenn, for such a useful plugin!

  63. Sorry to flood your comments here, Glenn. I just noticed the code didn’t render correctly. I forgot that certain characters needed to be escaped. My bad. I hope you don’t mind me posting a link with a “fixed” version of the script.

    For those of you having the problem I described, you can download or copy/paste a “fixed” version from the following URL:

    http://blog.agarzola.com/fixed_plugins/wp-imagereplacement.txt

    Rename the file to “wp-imagereplacement.php”. Upload that to replace the current “wp-imagereplacement.php” in your plugins folder. All should be well.

    Once again, thank you!

  64. Hello… I’m working on a site, using WP as a small CMS.I decided to use your excellent script precisely because of the functionality it provides. I’m creating static pages with different section separators that employ your plugin to display the section name in a particular font/color combination.Up until now, everything had been running smoothly as I used Safari to test my CSS and the way this plugin would display the section headers. A few minutes ago, I decided to start cross-checking with other browsers in Windows XP and MacOS X (IE, Opera and Firefox, which are the main ones I always check on initially, in both platforms), and for some reason the javascript that replaces the text with the images isn’t working on any browser other than Safari. IE, Firefox and Opera (both in Win and OS X) simply aren’t executing the script, and all I get is the text, which doesn’t look nice at all.I’ve made sure that all browsers had javascript activated, as well as images displayed. I also made sure that I had the most recent versions of all browsers (except for Safari, I still have to check on that, but the version I have is pretty recent).I don’t have much experience with javascript, so I’d really appreciate your help in solving this dilemma, as I’ve grown quite fond of the functionality of this plugin in the past few hours I’ve been designing the site.You can see the site here: http://www.somoscarbono.com/musica(it is in spanish, but you’ll see two sections looking like this: “:::::::::::::::::::: Section Name”)Please let me know of anything I may need to do to get this javascript to work uniformly throughout all popular browsers (at least these three).

  65. I decided to check the output source on this page and noticed one slight difference between what the javascript looks like here and how it reads at my site. The very first function, called “wp_imagereplacement_init()” has nine lines of code on both sites, but yours shows eight of those lines commented out (/* */). The current version of your plugin does not output these lines as commented out.I went into the plugin file and made this change, leaving only the one line that’s being executed in your site (effectively the one that actually makes the image replacement) to be executed in mine. And now it works in the latest versions of all three browsers mentioned in my previous comment, both in OS X and XP.In case someone else has this problem in the future, I hope you don’t mind me posting the necessary change here.Open the “wp-imagereplacement.php” file and search for this:{ var W3CDOM = (document.createElement && document.getElementsByTagName); if (!W3CDOM) return; var test = new Image(); var tmp = new Date(); var suffix = tmp.getTime(); test.src = '?'+suffix; test.onload = function short_name?>_imageReplacement() {short_name."_replace(document.getElementsByTagName('".$d[$this->short_name . '_element']."'),'".$d[$this->short_name . '_class']."', 'background=".$d[$this->short_name . '_backgroundcolour']."&colour=".$d[$this->short_name . '_fontcolour']."&ypad=".$d[$this->short_name . '_ypad']."&size=".$d[$this->short_name . '_fontsize']."&padding=".$d[$this->short_name . '_padding']."&shadow=".$d[$this->short_name . '_shadow']."&font=".$d[$this->short_name . '_fontname']."&type=png');n"; }?> } }Now replace all of that with this:{ /*var W3CDOM = (document.createElement && document.getElementsByTagName); if (!W3CDOM) return; var test = new Image(); var tmp = new Date(); var suffix = tmp.getTime(); test.onload = function short_name?>_imageReplacement() {*/short_name."_replace(document.getElementsByTagName('".$d[$this->short_name . '_element']."'),'".$d[$this->short_name . '_class']."', 'background=".$d[$this->short_name . '_backgroundcolour']."&colour=".$d[$this->short_name . '_fontcolour']."&ypad=".$d[$this->short_name . '_ypad']."&size=".$d[$this->short_name . '_fontsize']."&padding=".$d[$this->short_name . '_padding']."&shadow=".$d[$this->short_name . '_shadow']."&font=".$d[$this->short_name . '_fontname']."&type=png');n"; }?> /*} test.src = '?'+suffix;*/ }Save your file, upload it, and now the replacement should show up in at least IE, Firefox and Opera in the Windows XP and OS X platforms.Thank you, Glenn, for such a useful plugin!

  66. Sorry to flood your comments here, Glenn. I just noticed the code didn’t render correctly. I forgot that certain characters needed to be escaped. My bad. I hope you don’t mind me posting a link with a “fixed” version of the script.For those of you having the problem I described, you can download or copy/paste a “fixed” version from the following URL:http://blog.agarzola.com/fixed_plugins/wp-image…Rename the file to “wp-imagereplacement.php”. Upload that to replace the current “wp-imagereplacement.php” in your plugins folder. All should be well.Once again, thank you!

  67. Glenn:

    On attempting to set preferences in the Options>Image Replacements page, I keep getting this header:

    Warning: opendir(/home/dedocne/public_html/wp-content/plugins/wp-imagereplacement-fonts/): failed to open dir: No such file or directory in /home/dedocne/public_html/wp-content/plugins/wp-imagereplacement Folder/wp-imagereplacement.php on line 446

    Now, that file does exist; I’m looking at it in cPanel *and* on my FTP client.

    Any suggestions?

    baffled, Bill

  68. Glenn:On attempting to set preferences in the Options>Image Replacements page, I keep getting this header:Warning: opendir(/home/dedocne/public_html/wp-content/plugins/wp-imagereplacement-fonts/): failed to open dir: No such file or directory in /home/dedocne/public_html/wp-content/plugins/wp-imagereplacement Folder/wp-imagereplacement.php on line 446Now, that file does exist; I’m looking at it in cPanel *and* on my FTP client.Any suggestions?baffled, Bill

  69. This is a most excellent plugin! However, is there no way to allow the images to have a transparent background?

    As it is now you need to not only know the exact color of the background, but you need to have a uniform background to avoid having it look rather strange. If it could be possible to have a transparent background this plugin would offer an almost perfect solution.

  70. I’m looking forward to getting this plug-in working – it’s a great solution.

    I’ve downloaded & installed the plug-in and added a new replacement for in class=”post”. Using Firefox’s DOM Inspector, that should be the class for my post title. And if I make changes to that in my style sheet, they show up, so I’m pretty sure my settings are correct. I checked to see if I could load the test image, and that works too. I’ve read through the comments, and realized that I didn’t have the do_action() call in my index.php, so I added that line. Now, the end of my index.php looks like:

    However, in IE7, I see a missing image marker below my list of image replacements. In Firefox, I don’t see anything. I’m guessing this is where the “demo text” is displayed in the selected font. If I copy the URL from the properties of the missing image in IE7 and attempt to load it in a browser, I get this error:

    Fatal error: Call to undefined function: imagettfbbox() in /mnt/web_s/d32/s22/b01f004c/www/lakeholidaynews.com/wp-content/plugins/wp-imagereplacement.php on line 720

    There’s no imagettfbbox() in the plug-in – is this from somewhere else?

    I also have an empty cache folder.

    Any thoughts? Thanks in advance for your suggestions.

  71. This is a most excellent plugin! However, is there no way to allow the images to have a transparent background? As it is now you need to not only know the exact color of the background, but you need to have a uniform background to avoid having it look rather strange. If it could be possible to have a transparent background this plugin would offer an almost perfect solution.

  72. I’m looking forward to getting this plug-in working – it’s a great solution.I’ve downloaded & installed the plug-in and added a new replacement for in class=”post”. Using Firefox’s DOM Inspector, that should be the class for my post title. And if I make changes to that in my style sheet, they show up, so I’m pretty sure my settings are correct. I checked to see if I could load the test image, and that works too. I’ve read through the comments, and realized that I didn’t have the do_action() call in my index.php, so I added that line. Now, the end of my index.php looks like:However, in IE7, I see a missing image marker below my list of image replacements. In Firefox, I don’t see anything. I’m guessing this is where the “demo text” is displayed in the selected font. If I copy the URL from the properties of the missing image in IE7 and attempt to load it in a browser, I get this error:Fatal error: Call to undefined function: imagettfbbox() in /mnt/web_s/d32/s22/b01f004c/www/lakeholidaynews.com/wp-content/plugins/wp-imagereplacement.php on line 720There’s no imagettfbbox() in the plug-in – is this from somewhere else? I also have an empty cache folder.Any thoughts? Thanks in advance for your suggestions.

  73. You problen is probably due to missing either the GD library or the FreeType library at your webhost. The imagettfbbox function requires that both are compiled with PHP.

    If you host your own page you need to compile PHP with both GD lib and FreeType lib, if you have it hosted somewhere, you need to talk to the person/company hosting it for you about getting this done.

    Regarding the lack of transparency I’ve done a bit of probing and it seems the culprit is the imagecopyresampled function, which removes the transparency that was properly done until it’s called. After spending 5 hours on it, I was unable to find any solution, except exchanging it with the imagecopyresized function which does retain transparency, but since the text need to be downscaled so much the result is horrible if it isn’t resampled. If a way can’t be found around the lack of transparency in imagecopyresampled it seems the entire function needs to be somehoe redone to not require that function to be used… Hopefully someone better at PHP than me (hobby-level) can figure out a way.

  74. Kazper, thanks for your suggestion. I checked with my hoster and discovered that I do have the GD library but do not have FreeType. I guess that means until they add FreeType support (or I move…) the plug-in won’t work? Any thoughts on whether this will be true for ColdForged’s plugin?

  75. Since I had downloaded ColdForged’s plugin as well, I checked and as I suspected it does use imagettfbbox as well. I couldn’t see any way it could not use it, in order to make the fonts into images, but I obviously don’t know everything =) Both plugins require it though, and I don’t think you will get any such functionality working without FreeType lib even considering potential further plugins. My recommendation would be to try and get your host to install it – if it’s a commercial host he REALLY should do it – or I’d move host.

  76. Thanks for the reply. I did check ColdForged’s site, and I found something I didn’t see before – that his plugin requires FreeType. The host is a commercial one on a shared server (Netfirms, out of Canada I think). The response I got when asking for it was “we’ll put in a request, but there is no timetable when or if we’ll offer it”. The annual cost is about $120 US per year. They offer dedicated hosting at about 2X the price on a Win2K server. Care to offer any suggestions on hosts that do offer it? Have had no complaints with them so far.

  77. Well we shouldn’t turn this comment thread into a discussion on webhosts =) I’d email you this info if I could :) But I’m using Hostgator (www.hostgator.com), and their Baby Croc package is $9.95US per month – ie $120US a year exactly as what you pay now, and they certainly offer it – and offer a rock stable and fast service too in my experience. Depending on how much traffic you use you might even go with their smaller plan, but unless you have a seriously huge site the 75Gb per month should definitely cover it =)

    There are tons of other options – but I can’t recommend those I haven’t tried, but I know that you can get a better deal than that most places – and better service too a lot of places, if that’s their response to a request to provide some fairly basic functionality to a customer. Companies like that survive only because too many people don’t show with their wallet that they won’t accept bad customer service =)

    I’m still chugging away on the problem with transparency. I’d almost call it a bug in GD lib, but then I guess Pierre (GD developer) will call me nasty names and tell me to RTFM =)

    Hope I was of some help to you at least though.

  78. You problen is probably due to missing either the GD library or the FreeType library at your webhost. The imagettfbbox function requires that both are compiled with PHP.If you host your own page you need to compile PHP with both GD lib and FreeType lib, if you have it hosted somewhere, you need to talk to the person/company hosting it for you about getting this done.—Regarding the lack of transparency I’ve done a bit of probing and it seems the culprit is the imagecopyresampled function, which removes the transparency that was properly done until it’s called. After spending 5 hours on it, I was unable to find any solution, except exchanging it with the imagecopyresized function which does retain transparency, but since the text need to be downscaled so much the result is horrible if it isn’t resampled. If a way can’t be found around the lack of transparency in imagecopyresampled it seems the entire function needs to be somehoe redone to not require that function to be used… Hopefully someone better at PHP than me (hobby-level) can figure out a way.

  79. Kazper, thanks for your suggestion. I checked with my hoster and discovered that I do have the GD library but do not have FreeType. I guess that means until they add FreeType support (or I move…) the plug-in won’t work? Any thoughts on whether this will be true for ColdForged’s plugin?

  80. Since I had downloaded ColdForged’s plugin as well, I checked and as I suspected it does use imagettfbbox as well. I couldn’t see any way it could not use it, in order to make the fonts into images, but I obviously don’t know everything =) Both plugins require it though, and I don’t think you will get any such functionality working without FreeType lib even considering potential further plugins. My recommendation would be to try and get your host to install it – if it’s a commercial host he REALLY should do it – or I’d move host.

  81. Thanks for the reply. I did check ColdForged’s site, and I found something I didn’t see before – that his plugin requires FreeType. The host is a commercial one on a shared server (Netfirms, out of Canada I think). The response I got when asking for it was “we’ll put in a request, but there is no timetable when or if we’ll offer it”. The annual cost is about $120 US per year. They offer dedicated hosting at about 2X the price on a Win2K server. Care to offer any suggestions on hosts that do offer it? Have had no complaints with them so far.

  82. Well we shouldn’t turn this comment thread into a discussion on webhosts =) I’d email you this info if I could :) But I’m using Hostgator (http://www.hostgator.com), and their Baby Croc package is $9.95US per month – ie $120US a year exactly as what you pay now, and they certainly offer it – and offer a rock stable and fast service too in my experience. Depending on how much traffic you use you might even go with their smaller plan, but unless you have a seriously huge site the 75Gb per month should definitely cover it =)There are tons of other options – but I can’t recommend those I haven’t tried, but I know that you can get a better deal than that most places – and better service too a lot of places, if that’s their response to a request to provide some fairly basic functionality to a customer. Companies like that survive only because too many people don’t show with their wallet that they won’t accept bad customer service =)I’m still chugging away on the problem with transparency. I’d almost call it a bug in GD lib, but then I guess Pierre (GD developer) will call me nasty names and tell me to RTFM =)Hope I was of some help to you at least though.

  83. Glenn,

    Very cool plugin.

    Sadly, I have a bug to report.

    I set my fonts, and now the preview has obscured the edit button,so I can’t change the settings.

    Could you please tell me where the settings are saved, so I can go in and manually delete it?

    Thanks very much.

    Ben

  84. Glenn,Very cool plugin. Sadly, I have a bug to report.I set my fonts, and now the preview has obscured the edit button,so I can’t change the settings.Could you please tell me where the settings are saved, so I can go in and manually delete it?Thanks very much.Ben

  85. Sorry all, I’ve just started a new job & I haven’t had much time for blogging, if you can bare with me I’m going to start working though my mountain of non-work related email & comments in the next few days, so hopefully I should be able to address all your issues.

    Thankyou for being so patient, and I’m glad the plugin is useful to people (when it’s working that is :) )

  86. By the way Kazper, thanks for your investigation into the transparancy issue. You really don’t want to know how many hours I’ve spent trying to find a solution to this problem. I came to the same conclusion as you did, it’s the resampling, but I just can’t see a reliable way around it unfortunately.

  87. Ben: Ah, the easiest way to fix that would be to click somewhere near the edit button and press tab on the keyboard. The edit button should get focus (that is it should be highlighted, if you can’t see any other links with the focus around them, then it should be right) and then you can press the space bar to click the edit button.

    I’ll put a fix to that problem in the next release.

  88. De: That is truly odd, I know in your email you said that that fonts folder did exist where it was looking for it. The only thing I can suggest is to delete the plugin & the fonts folder and try installing it again, see if that makes a difference.

  89. Serge: That is a problem I’ve found some users are having. I’ve not found a reasonable explaination as to why it works for some people and not for others.

    The lines that were commented out (I had done it on my site as a test for someone else with this problem) are the bit of javascript that check whether the user has the right version of javascript turned on, and whether they can display images. With these lines commented out the script may give a javascript error, or it may try and load images when they’re turned off, which would result in the ugly IE broken image icon. This is probably not affecting a huge number of people, and it in no way impacts the functionality of the plugin, so it it works for you, all good and well!

  90. Sorry all, I’ve just started a new job & I haven’t had much time for blogging, if you can bare with me I’m going to start working though my mountain of non-work related email & comments in the next few days, so hopefully I should be able to address all your issues.Thankyou for being so patient, and I’m glad the plugin is useful to people (when it’s working that is :) )

  91. By the way Kazper, thanks for your investigation into the transparancy issue. You really don’t want to know how many hours I’ve spent trying to find a solution to this problem. I came to the same conclusion as you did, it’s the resampling, but I just can’t see a reliable way around it unfortunately.

  92. Ben: Ah, the easiest way to fix that would be to click somewhere near the edit button and press tab on the keyboard. The edit button should get focus (that is it should be highlighted, if you can’t see any other links with the focus around them, then it should be right) and then you can press the space bar to click the edit button.I’ll put a fix to that problem in the next release.

  93. De: That is truly odd, I know in your email you said that that fonts folder did exist where it was looking for it. The only thing I can suggest is to delete the plugin & the fonts folder and try installing it again, see if that makes a difference.

  94. Serge: That is a problem I’ve found some users are having. I’ve not found a reasonable explaination as to why it works for some people and not for others. The lines that were commented out (I had done it on my site as a test for someone else with this problem) are the bit of javascript that check whether the user has the right version of javascript turned on, and whether they can display images. With these lines commented out the script may give a javascript error, or it may try and load images when they’re turned off, which would result in the ugly IE broken image icon. This is probably not affecting a huge number of people, and it in no way impacts the functionality of the plugin, so it it works for you, all good and well!

  95. Glenn, thanks a lot for this; Among other things I am also using it to render Japanese characters (Kanji, Katakana and Hiragana). I do this by using an Asian TTF (SimHei) and it seems to work on clients with poor support for i18n (example). I was going to attempt to write this functionality myself, but your hard work (and those who might have helped) saved me the trouble.

  96. Glenn, thanks a lot for this; Among other things I am also using it to render Japanese characters (Kanji, Katakana and Hiragana). I do this by using an Asian TTF (SimHei) and it seems to work on clients with poor support for i18n (example). I was going to attempt to write this functionality myself, but your hard work (and those who might have helped) saved me the trouble.

  97. I have to say, this is a most excellent plugin. I am using it to display a nonstandard “sexagesimal” font on my webpage (an example is the version number of the novel on the front page of my site http://autonomyseries.com/). with the “span” flag and classes, embedding special fonts into the text of an article is a snap.

    Very, very well done! I have looked long and hard across many CMS platforms and generic html font embedding sites, and the trick you use, combined with the plugin as you’ve designed it with wordpress, has made this by far the easiest and most elegant method I’ve come across to date.

  98. I’m having problems with this plugin. I’ve tried coldforge’s and that works fine – but I don’t like the idea that if you deactivate you get -image- before your titles etc.

    Your plugin seems a better approach – but I can’t get a white background to show. If I set the background colour to #FFFFFF most of the time when I load the image it appears black. Other colours seem to work?

  99. Update – this is happening to other background colours now too. Also the image seems to cut off the bottom bit?

  100. I have to say, this is a most excellent plugin. I am using it to display a nonstandard “sexagesimal” font on my webpage (an example is the version number of the novel on the front page of my site http://autonomyseries.com/). with the “span” flag and classes, embedding special fonts into the text of an article is a snap.Very, very well done! I have looked long and hard across many CMS platforms and generic html font embedding sites, and the trick you use, combined with the plugin as you’ve designed it with wordpress, has made this by far the easiest and most elegant method I’ve come across to date.

  101. I’m having problems with this plugin. I’ve tried coldforge’s and that works fine – but I don’t like the idea that if you deactivate you get -image- before your titles etc.Your plugin seems a better approach – but I can’t get a white background to show. If I set the background colour to #FFFFFF most of the time when I load the image it appears black. Other colours seem to work?

  102. Update – this is happening to other background colours now too. Also the image seems to cut off the bottom bit?

  103. Lellie, the image cutting off seems to be a problem with some fonts, the size doesn’t report properly, you just need to add some padding on the bottom of the image.

    About the colour, make sure that there are only 6 characters in the Background Colour (hex) field (no # or any other characters). If it is still happening, please send me a link & I’ll have a look.

    cheers

  104. is there a way to edit the shadow’s offset? right now all I can see that can be edited is the horizonal offest, but not vertical. I would like to be able to make it so that the shadow is 1px to the left and 1px down…

    Thank you

  105. Lellie, the image cutting off seems to be a problem with some fonts, the size doesn’t report properly, you just need to add some padding on the bottom of the image.About the colour, make sure that there are only 6 characters in the Background Colour (hex) field (no # or any other characters). If it is still happening, please send me a link & I’ll have a look.cheers

  106. is there a way to edit the shadow’s offset? right now all I can see that can be edited is the horizonal offest, but not vertical. I would like to be able to make it so that the shadow is 1px to the left and 1px down…Thank you

  107. Hey there … my plugin seems to be creating images, according to my cache, but they are not displaying as headlines. Any suggestions?

  108. Kahil: Unfortunately, not at the moment, I’ll ad it to the todo list for the next release.

    Malcontent: Are you getting any javascript errors when the page loads?

  109. You mean the admin page with the sample headline, or the actual page on my blog? Either way, I don’t get any errors for either.

  110. Hey there … my plugin seems to be creating images, according to my cache, but they are not displaying as headlines. Any suggestions?

  111. Kahil: Unfortunately, not at the moment, I’ll ad it to the todo list for the next release.Malcontent: Are you getting any javascript errors when the page loads?

  112. You mean the admin page with the sample headline, or the actual page on my blog? Either way, I don’t get any errors for either.

  113. Great plugin!

    Hi Glenn,

    I have a small problem that I am not sure how to handle. When I refreash the browser the titles disappear until I refreash the page again. I have tried this with cache on and off. Any ideas?

    wordpress 2.0.1
    http://www.sbe38.org

    thank you

    don (el paso)

  114. Great plugin!Hi Glenn,I have a small problem that I am not sure how to handle. When I refreash the browser the titles disappear until I refreash the page again. I have tried this with cache on and off. Any ideas?wordpress 2.0.1http://www.sbe38.orgthank youdon (el paso)

  115. I can’t see it happening on your site when I try & reload it. Have you tried viewing it in different browsers? What browser is the problem occuring on?

  116. I can’t see it happening on your site when I try & reload it. Have you tried viewing it in different browsers? What browser is the problem occuring on?

  117. Hey, so I have implemented this wonderful seeming plug-in, but it is not working for me. I have read these posts and eliminated a couple things that could be wrong, but alas nothing yet.

    If the creator or any other kind folks could help I would be glad.

    jasonlathrop.com/wordpress/

    element: h3
    class: replaceme

    test image confirmed valid link…

    “quick brown fox jumps over…” text generated in my cache, but none others…

    Thanks, Jason

  118. Hey, so I have implemented this wonderful seeming plug-in, but it is not working for me. I have read these posts and eliminated a couple things that could be wrong, but alas nothing yet.If the creator or any other kind folks could help I would be glad.jasonlathrop.com/wordpress/element: h3class: replacemetest image confirmed valid link…”quick brown fox jumps over…” text generated in my cache, but none others…Thanks, Jason

  119. I like your plugin so much… but, i have problems when i replace long entry titles ¿any suggestions? (please, don’t suggest me to shorten my entry tiles)

  120. Jason, there seems to be 2 problems:
    1: you’ve put www.jasonlathrop.com/wordpress/wp-images/fade-butt.png as the test image, but you need the http:// in front (alternatively you could just put /wordpress/wp-images/fade-butt.png

    2: you don’t seem to be implementing the wp_footer() function in your templates, so the function call that does the replacement isn’t there. Have a look at this comment for more details.

    Hope that helps

  121. federicosanchez, at the moment there is no way to deal with long titles, I’m planning to do a new version that allows you to enforce a line-wrap after a certain width, but at the moment I’m sorry it doesn’t support it

  122. I like your plugin so much… but, i have problems when i replace long entry titles ¿any suggestions? (please, don’t suggest me to shorten my entry tiles)

  123. Jason, there seems to be 2 problems:1: you’ve put www.jasonlathrop.com/wordpress/wp-images/fade-butt.png as the test image, but you need the http:// in front (alternatively you could just put /wordpress/wp-images/fade-butt.png2: you don’t seem to be implementing the wp_footer() function in your templates, so the function call that does the replacement isn’t there. Have a look at this comment for more details.Hope that helps

  124. federicosanchez, at the moment there is no way to deal with long titles, I’m planning to do a new version that allows you to enforce a line-wrap after a certain width, but at the moment I’m sorry it doesn’t support it

  125. Glenn,

    I’m still having problems with the imaged titles dissappearing when moving between post/pages and front page. Has anyone else reported problems like this?

    don (el paso)

  126. Glenn,I’m still having problems with the imaged titles dissappearing when moving between post/pages and front page. Has anyone else reported problems like this? don (el paso)

  127. Sirs, what i am doin wrong?
    http://idcontent.com/testblog/

    Plugin wokrs fine, BUT ONLY on Konqueror 3.4.2 on Linux

    Not FF (1.5.0.4) not Opera 9 (Lin/WIN) not IE6.0 does not display graphical headers. It pretty work in thouse browsers on Your site, so, if possible, point me to root of my problems. This troubles is the same on different host, so i think its may be somethig JavaScript conflicts?

    Thanks

  128. Sirs, what i am doin wrong?http://idcontent.com/testblog/Plugin wokrs fine, BUT ONLY on Konqueror 3.4.2 on LinuxNot FF (1.5.0.4) not Opera 9 (Lin/WIN) not IE6.0 does not display graphical headers. It pretty work in thouse browsers on Your site, so, if possible, point me to root of my problems. This troubles is the same on different host, so i think its may be somethig JavaScript conflicts?Thanks

  129. Hi there,

    Very nice plug, many thanks for making it available.

    I have a question though:

    As commercial fonts might be used, it would make sense to place them outside the webroot folder. But how do I tell this to your plug-in?

    I tried changing
    [code]define('FONTS_FOLDER', ABSPATH . 'wp-content/plugins/wp-imagereplacement-fonts/');[/code]
    to
    [code]define('FONTS_FOLDER', ABSPATH . '/home/username/wp-imagereplacement-fonts/');[/code]

    That obviously doesn’t do the trick. If only I had a bit more understanding of PHP. Is there a way to accomplish this or another trick to prevent someone from stealing the fonts?

  130. o.k. now, i use:

    [code]define('FONTS_FOLDER', ABSPATH . '../wp-imagereplacement-fonts/');[/code]

    and it works. Now I wonder if this solution is secure?

    It would be great to be able to define the fonts directory via the plug-in, as you didn’t have to modify the plug after an update.

  131. sorry, doesn’t create any images now, although i’m able to change the fonts. Any hint?

  132. Hi there,Very nice plug, many thanks for making it available.I have a question though:As commercial fonts might be used, it would make sense to place them outside the webroot folder. But how do I tell this to your plug-in?I tried changing[code]define('FONTS_FOLDER', ABSPATH . 'wp-content/plugins/wp-imagereplacement-fonts/');[/code]to[code]define('FONTS_FOLDER', ABSPATH . '/home/username/wp-imagereplacement-fonts/');[/code]That obviously doesn’t do the trick. If only I had a bit more understanding of PHP. Is there a way to accomplish this or another trick to prevent someone from stealing the fonts?

  133. o.k. now, i use:[code]define('FONTS_FOLDER', ABSPATH . '../wp-imagereplacement-fonts/');[/code]and it works. Now I wonder if this solution is secure?It would be great to be able to define the fonts directory via the plug-in, as you didn’t have to modify the plug after an update.

  134. sorry, doesn’t create any images now, although i’m able to change the fonts. Any hint?

  135. I install it properly and I get the Options-> Image Replacement link but there is no preview and when I save and look at my site there’s a broken image. No image is formed. Any hints at what I am doing wrong?

  136. I install it properly and I get the Options-> Image Replacement link but there is no preview and when I save and look at my site there’s a broken image. No image is formed. Any hints at what I am doing wrong?

  137. You might want to do something about the default text image.

    I’m running a WAMP on my localhost, PHP 4.3.23 with GD, Safe Mode On, Register globals On, Allow url fopen Off.

    I found that the default test image path doesn’t work, and the correct test image path in my end is wp-admin/images/wordpress-logo.png. Notice the lack of the first / (slash).

  138. You might want to do something about the default text image.I’m running a WAMP on my localhost, PHP 4.3.23 with GD, Safe Mode On, Register globals On, Allow url fopen Off.I found that the default test image path doesn’t work, and the correct test image path in my end is wp-admin/images/wordpress-logo.png. Notice the lack of the first / (slash).

  139. Just installed Image Replacement, activated it, set some tags, see the right font in the editor but not on the actual page. Added the script to my footer.php, upped it, but no change. Where am I goofing up here?

  140. Just installed Image Replacement, activated it, set some tags, see the right font in the editor but not on the actual page. Added the script to my footer.php, upped it, but no change. Where am I goofing up here?

  141. Excellent plugin.
    I just installed it and no fonts appear in the font drop-down.

    I tried playing with the font folder permissions with no luck.

    De Doc:

    I solved the following error message

    the Warning: OpenDir: No such file or directory (errno 2) in /home/g/a/ganyet.com/html/web20/wp-content/plugins/wp-imagereplacement Folder/wp-imagereplacement.php on line 446

    by putting wp-imagereplacement.php and the fonts folder in directly under ./plugins

    But still can’t activate the sample font.
    Any help appreciated

  142. Me again,
    I just noticed that if I add ttf files to the wp-imagereplacement-fonts folder blank rows are added to the fonts drop-down. I can select a blank item from it but no changes in the h1 I’m trying to replace.

  143. worked great but i have do follow thit tip from Stahn

    I found that the default test image path doesn’t work, and the correct test image path in my end is wp-admin/images/wordpress-logo.png. Notice the lack of the first / (slash).

  144. OK, there seems to be some major issues with the plugin. I’m going to take on board all the comments here and try and address all the issues in a new release. Unfortunately I don’t have any quick answers for you guys. I just moved hosting companies and as you can see, the images are no longer displaying on this site either, I’m having permissions issues on the folder, which I’m also going to have to try & rectify. I’ll post any updates as I get them.

  145. Excellent plugin.I just installed it and no fonts appear in the font drop-down.I tried playing with the font folder permissions with no luck.De Doc: I solved the following error messagethe Warning: OpenDir: No such file or directory (errno 2) in /home/g/a/ganyet.com/html/web20/wp-content/plugins/wp-imagereplacement Folder/wp-imagereplacement.php on line 446by putting wp-imagereplacement.php and the fonts folder in directly under ./pluginsBut still can’t activate the sample font.Any help appreciated

  146. Me again,I just noticed that if I add ttf files to the wp-imagereplacement-fonts folder blank rows are added to the fonts drop-down. I can select a blank item from it but no changes in the h1 I’m trying to replace.

  147. worked great but i have do follow thit tip from Stahn”I found that the default test image path doesn’t work, and the correct test image path in my end is wp-admin/images/wordpress-logo.png. Notice the lack of the first / (slash).”

  148. OK, there seems to be some major issues with the plugin. I’m going to take on board all the comments here and try and address all the issues in a new release. Unfortunately I don’t have any quick answers for you guys. I just moved hosting companies and as you can see, the images are no longer displaying on this site either, I’m having permissions issues on the folder, which I’m also going to have to try & rectify. I’ll post any updates as I get them.

  149. Hi Glenn,
    In IE while using your image replacement plugin with the default rss reader I get an empty box with a red X in it. When I turn the image replacement plugin off the empty box with red X goes away. Is this because the way IE looks at pathing for graphics.

    You can see the problem viewing in IE here http://www.sbe38.org in the sidebar about half way down the page.

    Anyhelp to fix this is always appreciated.

    thanks Glenn.

    don (el paso)

  150. Don, that’s because there’s 2 a tags inside the h2 tag, the plugin doesn’t count on that, and so it’s looking for the text inside the 1st anchor tag, which only has the rss image. So it’s making an image with empty text, which fails. That’s another thing I’ll need to account for in the new version.

    To fix it now, you can have the h2 tag with just the text anchor inside it, and float the RSS anchor next to it, i.e.:

    <a style="float:left;" title="Syndicate this content" href="http://www.topix.net/rss/us/fcc.xml" class="rsswidget"><img width="14" height="14" alt="RSS" src="http://www.sbe38.org/wp-content/plugins/widgets/rss.png"/></a>
    <h2 style="float:left;" class="title"><a title="News on FCC from Topix.net" href="http://www.topix.net/us/fcc" class="rsswidget">FCC FEEDS</a></h2>
    <ul style="clear:left;">...

  151. Hi Glenn,In IE while using your image replacement plugin with the default rss reader I get an empty box with a red X in it. When I turn the image replacement plugin off the empty box with red X goes away. Is this because the way IE looks at pathing for graphics.You can see the problem viewing in IE here http://www.sbe38.org in the sidebar about half way down the page. Anyhelp to fix this is always appreciated.thanks Glenn.don (el paso)

  152. Don, that’s because there’s 2 a tags inside the h2 tag, the plugin doesn’t count on that, and so it’s looking for the text inside the 1st anchor tag, which only has the rss image. So it’s making an image with empty text, which fails. That’s another thing I’ll need to account for in the new version.To fix it now, you can have the h2 tag with just the text anchor inside it, and float the RSS anchor next to it, i.e.:<img width="14" height="14" alt="RSS" src="http://www.sbe38.org/wp-content/plugins/widgets/rss.png"/><h2 style="float:left;" class="title">FCC FEEDS</h2><ul style="clear:left;">...

  153. Hey Glenn,

    I would definitely love to use this new plugin of yours, but the problem is installation. I installed eveything, and I Chmod the cache folder to 777, I just wish you had specific instructions to installing this plugin. I don’t get any previews and the plugin works for the default wordpress layouts.

  154. Hey Glenn, I would definitely love to use this new plugin of yours, but the problem is installation. I installed eveything, and I Chmod the cache folder to 777, I just wish you had specific instructions to installing this plugin. I don’t get any previews and the plugin works for the default wordpress layouts.

  155. Hi there.
    I installed the plugin, and in my wp admin when i go to set the options i get this message:

    Warning: opendir(/home/txatxo/public_html/word/wp-content/plugins/wp-imagereplacement-fonts/): failed to open dir: No such file or directory in /home/txatxo/public_html/word/wp-content/plugins/wp-imagereplacement/wp-imagereplacement.php on line 446

    Also, there are no fonts available in the dropdown menu.

    I’ve fried my brain trying to figure it out but this is just not my thing, really. :). I’m a designer, not a coder, and i’m sure there are assumptions i should be making but i’ve installed various other plugins w/out a hitch so i wonder what it could be…

    Thanks for your help!

    Z

  156. Hi there.I installed the plugin, and in my wp admin when i go to set the options i get this message:Warning: opendir(/home/txatxo/public_html/word/wp-content/plugins/wp-imagereplacement-fonts/): failed to open dir: No such file or directory in /home/txatxo/public_html/word/wp-content/plugins/wp-imagereplacement/wp-imagereplacement.php on line 446Also, there are no fonts available in the dropdown menu.I’ve fried my brain trying to figure it out but this is just not my thing, really. :). I’m a designer, not a coder, and i’m sure there are assumptions i should be making but i’ve installed various other plugins w/out a hitch so i wonder what it could be…Thanks for your help!Z

  157. Glenn, thank you for great plugin.
    Could I recomend few things:
    1. Make options to use plugin without javascript.
    2. Provide another method to init replacement function, not with wp_footer
    3. Make default font-size not 1. I spent a time to find the problem .

  158. Glenn, thank you for great plugin.Could I recomend few things:1. Make options to use plugin without javascript. 2. Provide another method to init replacement function, not with wp_footer3. Make default font-size not 1. I spent a time to find the problem .

  159. Hey Glenn, I would love to see this plugin work on my website and I reckon I did everything right, but it doesn’t seem to work.

  160. Hey Glenn, I would love to see this plugin work on my website and I reckon I did everything right, but it doesn’t seem to work.

  161. hi glenn,

    i have tried all the steps and troubleshooting that u provided here. but my h2 class=”cattitle” doesnt come up as an image. it did show in the option menu, but not in my wordpress file

    http://www.artgeex.com/homepro/?cat=1

    i want the “news” to become an image

    please help, because i nearly give up now ^__^

  162. hi,

    i have solved my problem, thanks. but i noticed that if i use image replacement in a paragraph, my wordpress theme will ‘break’ since it wont wrap up in a div.. maybe u can fix it later in ur coming version ^_^

    anyway, very great plugin

  163. hi glenn,i have tried all the steps and troubleshooting that u provided here. but my h2 class=”cattitle” doesnt come up as an image. it did show in the option menu, but not in my wordpress filehttp://www.artgeex.com/homepro/?cat=1i want the “news” to become an imageplease help, because i nearly give up now ^__^

  164. hi, i have solved my problem, thanks. but i noticed that if i use image replacement in a paragraph, my wordpress theme will ‘break’ since it wont wrap up in a div.. maybe u can fix it later in ur coming version ^_^anyway, very great plugin

  165. Excellent plugin! It’s clear from reading the comments that you’ve done a great deal of work on this, so kudos to you. I just have one guestion- Firefox 2.0 displays all of my post titles (h2) with a border around them (the post titles are links). Does this just need to be corrected with the CSS or does/can the plugin address this?

    All in all a great plugin! Thanks!

  166. Excellent plugin! It’s clear from reading the comments that you’ve done a great deal of work on this, so kudos to you. I just have one guestion- Firefox 2.0 displays all of my post titles (h2) with a border around them (the post titles are links). Does this just need to be corrected with the CSS or does/can the plugin address this?All in all a great plugin! Thanks!

Comments are closed.