t l R r
^

Donation Thermometer

Raised £1762 towards the £2000 target. Description

Does your WordPress site need fundraising thermometers? Then look no further…

Simple to configure, and can be placed on any page or post with the simple shortcode [thermometer raised=1762 target=2000].

Multiple thermometers with different targets/sizes/amounts raised/currency symbols/alt text can be placed on the same page.

Optional parameters

The plugin shortcode has 5 optional parameters: width/height, align, alt text and currency:

[thermometer raised=523 target=1000 width=300 height=567 align=left currency=$ alt='Raised £523'].

Width and height values are interpreted as pixels. The alt text can be toggled off by using ‘alt=off’.

Shortcodes

The plugin also supports the use of shortcodes to display text values of the amount raised and target value. Simply use [therm_r] or [therm_t] on any post or page. See the FAQ for instructions on how to use in text widgets.

 

Multiple thermometers screenshot-1

 

Download v1.3.1
>>> extract and upload to your wordpress plugins folder.

Leave a comment below for questions or suggestions. I will be happy to try and implement any requests in future releases.

If you have found this plugin useful, then please do consider leaving a tip. Just follow the Paypal button and enter the amount (GBP) you wish to pledge. Many thanks!

 

Change log
1.3.1 (19 Feb '13)* New 'alt' parameter for the thermometer shortcode: toggle the thermometer's alt & title off, or use custom text.
* Added option for different raised/target value text colours.
* Fix for servers with allow_url_fopen directive set to off.
* Added a 'donate' link for the developer ;)
1.3 (4 Feb '13)* New shortcodes for 'raised' and 'target' values ([therm_r] and [therm_t]).
* Addressed memory issues concerning the generation of images.
* A new parameter in the thermometer shortcode now allows for custom currency symbols.
* Image width now dynamically adjusts depending on the total raised.
* Target and percentage values change font size depending on string length.
* Horizontal and vertical margins added to the thermometer image.
1.2.2 (29 June '12)* Improved the fail-safe that makes sure thermometers exist before page load.
1.2.1 (6 June '12)* Solve align issues (centre)
* Input missing image title text
* Consistent referencing to file paths
1.2 (17 May '12)* New Feature: Multiple thermometers with varying targets/amounts raised now possible.
* Target/amount raised values now moved from the settings page to the shortcode parameters.
* Included a cache feature which clears thermometer images on the server after 1 week.
1.1.2 (9 May '12)* Fixed bug that may have prevented thermometer displaying in IE.
* Alleviated a re-sampling issue present in some browsers.
1.1.1 (3 May '12)* Option added to change the text colour of the raised/target amount.
* Some code tidying, including in the colours.js file.
* Added style.css file for the colour boxes.
1.1 (13 Apr '12)* Option added to use custom colours for the thermometer and percentage text.
* Accuracy of the thermometer-fill and gauge improved to the nearest target unit.
1.0 (5 Apr '12)* Initial release
FAQ
  • I am able to save the thermometer settings but the image does not appear on my page or post.

First check you have typed the shortcode correctly. If it is still not working, try changing the permissions of the plugin folder to 777 (no need to recurse into subdirectories) then update the thermometer once more from the settings page.

  • I get an error message “Fatal error: Call to undefined function imagecreatefrompng…”

It is likely the GD library (required to create images) is not installed on your server – check by creating a phpinfo file and contact your hosting support.

  • The shortcodes don’t work in text widgets!

WordPress only enables shortcodes in posts and pages by default. Go to the theme editor and load the functions.php file, then add the following line to the bottom: add_filter('widget_text', 'do_shortcode');

  • The [therm_r] and [therm_t] shortcodes show different values to the thermometers.

Values for these shortcodes are set on the Thermometer settings page. If you want your thermometers to display the same values, remove the ‘raised’ and ‘target’ parameters from the [thermometer] shortcode, e.g. [thermometer width=300 align=right].

  • How do I use the alt parameter?

This option will change the title and alt text attributes of the thermometer image. To toggle off, type alt=off. To enter custom text, type alt=’your custom text’ (include apostrophes). If the option is left out the default text ‘Raised £xxxx towards the £xxxx target.’ will appear.

  • Can I remove the currency symbol?

Yes! Select the empty option on the settings page dropdown menu, or enter currency=null in the thermometer shortcode, e.g. [thermometer currency=null].

84 comments to “Donation Thermometer”

  • Jason, 9 May ’13 at 20:41

    Nevermind. I see the you have already answered this.

  • Jason, 9 May ’13 at 20:39

    How difficult would it be to use an image other that a thermometer? For example, a tree for a park fund. Would just replacing the .png images with similar sized transparent images do the trick?

  • Michael Elphick, 1 May ’13 at 14:18

    I have been involved in managing a recent website at:

    http://slaleyroseandcrown.co.uk

    which uses your Donation Thermometer plugin, and as this is for a community effort to purchase our local pub, some have suggested that the image should display a “Yard of Ale” rather than a thermometer. See http://en.wikipedia.org/wiki/Yard_of_ale for a description of this traditional English glass.

    I have looked briefly at the code in donation_therm.php, and wonder how difficult it would be to modify the shape?

    • Henry, 1 May ’13 at 16:35

      It wouldn’t be a very simple task modifying the current code – the fill of the thermometer is coded to the image shape of the thermometer. Also, it would be a bit tricky making the raised value follow the curve of the glass.

      You could use the imagefill() function to fill a complex shape; something which I didn’t actually use and probably should change in the plugin to simplify things. If you draw the curve of the glass from the base using a known equation, then working out the x position for the raised pointer shouldn’t be too hard. Would take some time to writeup but would probably look quite good in the end.

  • Adam J. Blust, 22 Mar ’13 at 13:16

    Henry: When I add your shortcode to my page, it stops the page from displaying anything at all. Any idea why this could be happening, or a fix? Thanks.

    • Henry, 22 Mar ’13 at 13:40

      There might be a few things happening. Do you have the GD library installed on your server? You could also try changing the plugin folder permissions to 777 so that the thermometer image can be saved. See the FAQ above. If an image has been saved what is its filename?

      • Adam J. Blust, 26 Mar ’13 at 19:13

        Henry:

        1. I do have the GD library installed.
        2. If you mean the “donation-thermometer” folder in the plugins folder, that’s already set at 777.
        3. What image would be saved?

        I’m using the WooThemes Canvas theme, but I switched to the Twenty Twelve theme, and still no thermometer. I also tried de-activating all my plugins but yours. Still nothing. Any further ideas? I really like your plugin and want to use it.

        As I said, not only does the thermometer not display, but everything else but the page headline (sidebar, other text on the page) doesn’t display either. I’m stumped.

        • Henry, 1 Apr ’13 at 11:30

          Hi Adam, Sorry been away from a computer the last week.

          It does sound like there is a bug in the plugin. However, without any error messages to go from it’ll be hard to pinpoint. If you have access to your server cpanel (admin page) can you check the error log and check what functions are bringing up errors when you try and use a thermometer.

          There are also various debugging tools that might throw up php errors http://wordpress.org/extend/plugins/debug-bar/. The web console in Firefox might show something up as well. If you send me a test page on your site with the shortcode in use, I could have a look from my end.

          • Adam, 1 Apr ’13 at 12:57

            Henry: Thanks for your response. As it turns out, the web host was having some issues with their GD library; when they rebuilt it, the thermometer worked.

            I really appreciate your willingness to support your plugin. Thanks again.

  • Alistair, 19 Mar ’13 at 07:08

    Hi Henry,

    Just trying this out but I’m not getting an image generated when I apply a currency to it, creating a broken url link.

    Without – Fine
    http://teamjmc.jmc.it/wp-content/plugins/donation-thermometer/therm_2910_9616_8000_.png

    With Euros – doesnt display
    http://teamjmc.jmc.it/wp-content/plugins/donation-thermometer/therm_2910_9616_8000_%E2%82%AC.png

    On Rays Playhouse, on another comment the image url is in £ and url is totally different, Im getting an additional underscore?
    http://www.raysplayhouse.org/wp-playhouse/wp-content/plugins/donation-thermometer/therm_348_37000_48000_350.png

    Many thanks

    Alistair

    • Henry, 19 Mar ’13 at 18:39

      Thanks for bringing this to my attention – looks like there’s a issue with the character encoding not being recognised on your server, thus changing the filenames to something different than expected. I will look to change the way filenames are produced tomorrow and keep it simple. Ray’s Playhouse is using an older version of the plugin – you could install 1.2.2 if you need a thermometer on your site right away (the euro symbol will work in that version for sure), but it won’t be too long before I get it updated.

  • Nick, 20 Feb ’13 at 10:35

    I made the four line changes to the donation_therm.php file but it’s still outputting the errors. Let me know if there is anything else I can try, thanks

    • Nick, 20 Feb ’13 at 10:37

      sorry just saw your other post, will go back a version! Thx

    • Henry, 20 Feb ’13 at 11:39

      That’s really strange – the getimagesize() function should be reading a local file and not be making a http request. When I reproduced your errors on my test setup the changes mentioned managed to fix the issue, so perhaps there’s something else going on here.

      It would be useful to see what errors still come up if you update to v1.3.1 (released yesterday with this fix in mind).

  • Nick, 19 Feb ’13 at 10:09

    Since the last update the thermometer has stopped formatting correctly – I removed it from the homepage and posted it here so you can see:
    http://www.raysplayhouse.org/supporting-the-playhouse/fundraising/

    The shortcode hasn’t changed: [thermometer raised=35000 target=48000 height=400 align=left] – it was working perfectly!

    • Henry, 19 Feb ’13 at 11:22

      Hi Nick,

      I’m pretty sure I know what’s happening here: on the last update I changed the way the thermometer was sized so that long raised values didn’t get chopped off on the right hand side. The formatting you can see might be because the width attribute is not getting calculated and therefore not written into the html code (looks fine in firefox to me).

      Looking at the error codes in your page source file, it looks like it’s because your server has set the allow_url_fopen and allow_url_include PHP directives to off. That’s fine, as it adds security. I will add in some alternative, more secure code in the next update that will hopefully resolve your issues. In the meantime I suggest rolling back to v1.2.2: http://henrypatton.org/wp-content/uploads/2012/04/donation-thermometer_v1.2.2.zip.

      Thanks for raising this issue, and will try to get a fix out soon. Sorry its messed things up for you.

    • Henry, 19 Feb ’13 at 12:13

      If you want a fix ASAP, then change the following lines in the plugin editor for the donation-thermometer.php file (changes are in bold):

      486: return thermhtml($atts['width'],$atts['height'],$raised,$target,$atts['align'],$align,$currency,$title,$urlpath,$custom_thermname);

      490: return thermhtml($atts['width'],$atts['height'],$raised,$target,$atts['align'],$align,$currency,$title,$urlpath,$custom_thermname);

      495: function thermhtml($code_w,$code_h,$code_r,$code_t,$code_a,$align,$currency,$urlpath,$custom_thermname){

      496: list($width,$height) = getimagesize(THERM_ABSPATH.$custom_thermname.’.png’);

      I managed to replicate the errors on a test site and these changes fix the issue for calculating width. It essentially gets the image size from the local file path rather than from a url path. Let me know if it works out.

  • Yinchen, 14 Feb ’13 at 22:11

    Ho can I change the size of the thermometer?

    Feature request. not sure if others would find this useful as well. It would be really helpful for us to have the option of another parameter… amount raised one color, amount pledged continuing above in another color. Previously we had someone who created the images in Photoshop for us to use.

    • Henry, 17 Feb ’13 at 19:59

      Hi Yinchen,

      The size of each thermometer can be adjusted using the width or height parameters in the shortcode. Units are pixels.

      I think that would be quite an easy option to incorporate. Look out for the next update ;)

  • Guido, 9 Feb ’13 at 22:40

    Hi,

    Thank you very much for creating this plugin and sharing it with the community.

    I would like to suggest an option to hide the alt text for the thermometer image. Or allow users to edit the output of the alt text.

    The option to hide the Target is great and the reason we chose this specific plugin, but it’s still shown in the alt text. In addition the alt text is in English, which isn’t ideal for websites in a different language. I can mess with the plugin files, but it seems the plugin is actively maintained. It’d be awesome if the alt text could be controlled to the same level the other elements of the plugin can be. :)

    I personally like the way the Genesis Simple Edits plugin allows you to edit things like the byline and footer by using shortcodes:

    “[post_date] by [post_author_posts_link] [post_comments] [post_edit]”

    You could delete the entire thing, just translate ‘by’ or take your pick and add text as desired. It’s a nifty way of allowing control over an element of a page. Maybe that’s only possible because it’s a framework, I don’t know. A tick box to opt out of having the alt text would be completely awesome on its own.

    Thanks again!

    • Henry, 10 Feb ’13 at 14:17

      You make a good point. Will implement something for the alt text in the next update.

      • Guido, 10 Feb ’13 at 21:50

        That’s awesome to hear. Many thanks in advance. And thanks again for sharing this plugin and actively maintaining it. Do you have a tip jar?

    • Henry, 20 Feb ’13 at 12:23

      Hi Guido,

      I have just released an update with some alt text control. Hopefully it’s what you’re after? Unfortunately the shortcode parser doesn’t accept square brackets within attributes so you can’t use the therm_r shortcode in the alt parameter for example (see last example on http://codex.wordpress.org/Shortcode_API).

      • Guido, 20 Feb ’13 at 12:42

        My client and I are absolutely chuffed with this update. Thanks so much! Their thermometer is steadily filling up. :D

        I hope more people will donate towards your contributions to the community. And I hope to be able to send some more people interested in a donation plugin your site in the future.

        Thank you! <3

        • Henry, 20 Feb ’13 at 15:32

          Thanks very much for the contribution..you’re amazing! :D Much appreciated, and glad the plugin is what you’re after. Let me know if you think of any further improvements you want implementing.

  • Anna, 7 Feb ’13 at 18:45

    Hi, I really like the look of the plugin unfortunately I am getting the fatal error below when attempting to activate it:

    Fatal error: Cannot redeclare set_plugin_meta() (previously declared in /home3/meantime/public_html/mp/wp-content/plugins/wp-favicon/mode-admin/admin.php:41) in /home3/meantime/public_html/mp/wp-content/plugins/donation-thermometer/donation_therm.php on line 47

    Thank you for any help you can provide.

    • Henry, 7 Feb ’13 at 19:18

      Hi Anna, It looks like our two plugins are using the same function name to create a link to the settings page on the list of plugins. The only way to fix this will be to rename the function to something unique so that WordPress doesn’t get confused. If you open up the plugin editor from the wordpress menu, and open up the file donation-thermometer.php, replace the following in bold from line 47 with set_dt_plugin_meta

      function set_plugin_meta($links, $file) {
      $plugin = plugin_basename(__FILE__);
      // create link
      if ($file == $plugin) {
      return array_merge(
      $links,
      array( sprintf( ‘%s’, $plugin, __(‘Settings’) ) )
      );
      }
      return $links;
      }
      add_filter( ‘plugin_row_meta’, ‘set_plugin_meta‘, 10, 2 );

      then click ‘update file’. I’ve just tried it and it will resolve the conflict for you. Thanks for letting me know, and I will make sure this gets included in the next update. Cheers

      • Anna, 7 Feb ’13 at 20:40

        Thank you for such a quick response, your solution worked! Then I changed my mind and wanted to insert the Thermometer on the sidebar as a widget rather than on the page. I used the text box widget, and the shortcode showed up instead…so I came back here and as per your FAQ I added the additional line of code in the theme’s functions.php file and it worked! Thank you again for a nice plugin and really great support.

        • Henry, 7 Feb ’13 at 21:14

          Cheers, no worries :) Hope the plugin is up to your needs.

  • Ronald, 4 Feb ’13 at 15:21

    Hi, thanks for your speedy answer!
    what i am looking for is a way to use a shortcode which relates back to the information i have put int the Admin section of your plugin; if there i have specified that my target is 10000 and we have already collected 650 i would like to be able to use these amounts throughout my site through a shortcode. In this particular site im working on, in the footer i want to put a note saying something like “Thanks to your generous contributions, we have already [amountraised] of our [amounttarget]. Remember to share our message to keep the momentum going!”

    • Henry, 4 Feb ’13 at 15:41

      Ok, I understand. Good idea, and yes it should be easily doable. Will implement it in the next update soon.

      • Ronald, 4 Feb ’13 at 15:43

        Great! Looking forward, in the mean time, if you wish for your plugin to be translated into spanish, let me know, i will probably have to do it anyhow for this site im working on. Cheers!

    • Henry, 4 Feb ’13 at 22:42

      Try the latest version 1.3 – hope it’s what you need (see the FAQ about shortcodes and text widgets). I probably will take you up on that offer of translation :) Will contact you in due course. Cheers

      • Ronald, 5 Feb ’13 at 00:29

        Looks exactly like what i needed, thanks a lot for the speedy implementation, much appreciated.

  • Ronald, 4 Feb ’13 at 15:08

    Hi, great plugin, thanks a lot for it’s development.
    Wanted to ask whether there is any way i could access the total amount raised and target through a shortcode, this would avoid having to update it on several pages throughout my site, which would be error prone. Keep up the good work!

    • Henry, 4 Feb ’13 at 15:16

      What timing. I was just about to upload a new version when you commented! Do I understand right that you want the option of setting default ‘target’ and ‘raised’ values on the settings page?

  • Elizabeth, 6 Oct ’12 at 14:19

    First of all, many thanks for this plugin.

    We would like to put two thermometers on one post – one to help collect donations of airline points and one for travel funds. Is there a way using short code to have the $ sign on one thermometer and no symbol (or “points”) on the other thermometer?

    • Henry, 6 Oct ’12 at 14:40

      At the moment it’s not possible, but will see if can make the requested changes in the next release. Will be travelling from Tuesday so might not have time before then.

  • Alex, 25 Sep ’12 at 16:12

    Hello! I’m very new to wordpress. I have installed your plugin and setup a very basic page to show the thermometer. when I view that page I get the following error message:

    Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 3720 bytes) in /home/alexwhya/public_html/lyttonroad.co.za/wp-content/plugins/donation-thermometer/donation_therm.php on line 248

    can you advise some steps I could take to resolve?

    the shortcode I used is this:

    [thermometer raised=9000 target=22000]

    many thanks

    Alex

  • René, 25 Sep ’12 at 12:56

    Hi, getting the warning:

    Warning: Invalid argument supplied for foreach()

    for multiple lines, I don’t know if it’s because I installed it through WordPress or not, but I can’t seem to figure out how to fix it.

    • Henry, 25 Sep ’12 at 23:25

      Do the error messages give specific lines? When do the error messages appear? Will have a look soon – am fairly swamped at the moment.

    • Henry, 7 Feb ’13 at 21:16

      Hi, I think the issue is to do with read/write issues on your server. Try setting the plugin’s folder permissions to 777 and see if that fixes the problem.

  • Clifford Hill, 29 Jun ’12 at 01:18

    That seemed to work, but doesn’t seem to be working entirely. The thermometer image is there but aren’t there supposed to be numbers and other references to the total, percentage and current amounts of money raised? It’s just the thermometer.

    • Henry, 29 Jun ’12 at 10:29

      Ok, good. There is an options page under settings on your dashboard where you can choose to include those numbers.

      • Clifford Hill, 29 Jun ’12 at 19:59

        Ugh, right. I even saw that when I first installed. Seems to be working perfectly fine now. Thanks so much for your time and help!

      • Clifford Hill, 29 Jun ’12 at 20:52

        I hate to say this, but I just upgraded to the latest version (even deleted the old folder and downloaded the plugin manually and re-uploaded to ensure nothing got corrupted) and now the page stops loading right where the short code is placed in the main content entry of the template. All other pages load fine.

        • Henry, 1 Jul ’12 at 13:42

          Have sent you an email

  • Clifford Hill, 28 Jun ’12 at 16:16

    My install of your plugin shows a broken image. I notice that the image produced in the plugin directory has a different filename than the reference in the HTML. Example: the file in the directory is therm_11_1523_5000.png but the filename in the HTML is therm_11_1523_5000_350.png. So the HTML is referencing a file that doesn’t exist and shows up broken on the page. I tried the 777 perms on the plugin directory (though that seems insecure and unnecessary) and ensured that GD library is enabled. Any ideas? Thanks!

    • Henry, 28 Jun ’12 at 17:26

      Hi Clifford, I suspect you have found a shortcode combination that I haven’t accounted for..can you let me know what parameter values you’re putting in so can double check the code? You could try entering a width value (e.g. width=300) to see if it will correct (the shortcode used above is [thermometer target=2000 raised=1762 width=220 align=left]). I’ll be able to look into it more tomorrow.

      Also you should be able to return the permissions back from 777 seeing as images are being saved into the plugin folder.

      • Clifford Hill, 28 Jun ’12 at 17:33

        Thanks for the speedy reply! I tried the two defaults offered from the plugin settings:
        [thermometer raised=1523 target=5000]
        [thermometer raised=1523 target=5000 width=300 align=left]
        I also just tried the one you suggested. Same result as seen in the link.

    • Clifford Hill, 28 Jun ’12 at 17:35

      Also deactivated all plugins except Donation Therm without success.

      • Henry, 28 Jun ’12 at 17:55

        Ok, think I know what’s up. The function that resizes the thermometer is not being passed for some reason. Something’s wrong with the if loops. Off the top of my head, if you can edit the donation_therm.php file and insert:

        resizetherm($custom_thermname);

        above line 431 then it should load.

        I’ll need to check the code over though and release an update soon to fix it properly

  • 18 WordPress Plugins I Use, 19 Jun ’12 at 01:25

    [...] Donation Thermometer – This is a nifty little plugin that I picked up to use for Project Happy. Unlike a lot of other fundraising plugins, the numbers on the thermometer are manually input. [...]

  • Matt, 14 Jun ’12 at 14:51

    Thanks Henry – have a great day!

  • Matt, 13 Jun ’12 at 23:34

    Hi Henry – had two quick questions. do you know fi this plug in works on multi site installs? Also, is there a way to make the thermometer a widget so it’s on all pages?

    Thanks so much for this great plugin!

    Matt

    • Henry, 14 Jun ’12 at 14:14

      Thanks Matt. I haven’t included any capability for multi-site installs so it probably wouldn’t work. To make a thermometer appear on all pages, simply insert the shortcode into a text widget.

  • Amanda, 13 Jun ’12 at 21:21

    Hi,

    How can I wrap text around the thermometer widget?

    • Henry, 14 Jun ’12 at 14:06

      Defining the align parameter in the shortcode should work.

  • Ammar, 1 Jun ’12 at 15:49

    hi i am getting this error with the plugin please advise
    Warning: imagecreatefrompng() [function.imagecreatefrompng]: URL file-access is disabled in the server configuration in /home/content/w/h/i/whiteone/html/hero/wp-content/plugins/donation-thermometer/donation_therm.php on line 220

    Warning: imagecreatefrompng(/wp-content/plugins/donation-thermometer/images/thermometer_wide.png) [function.imagecreatefrompng]: failed to open stream: no suitable wrapper could be found in /home/content/w/h/i/whiteone/html/hero/wp-content/plugins/donation-thermometer/donation_therm.php on line 220
    Failed in call to imagecreate()
    thanx for any help in advance.

    • Henry, 4 Jun ’12 at 11:57

      Hi Ammar, will have a look in a few days when back from holiday. In the meantime you could try setting the plugin folder permissions to 777 and see if that solves it.

  • Sean, 20 May ’12 at 23:48

    love the thermometer, i have an issue though. My page has the thermometer in the sidebar using short code. I can’t get the thermometer centered, so the symmetry is all off. Can you show me the code for this?

    • Henry, 21 May ’12 at 11:53

      Thanks Sean. Ok, yeah, that’s a bit of a rookie mistake I’ve made with the coding – you can’t centre align img elements using the align attribute.

      If you’re happy to edit the plugin php file, all you need to do is replace a bit of code. On lines 409,413,418 & 421, replace “style=”border: 0pt none;” with “style=border: 0pt none; display: block; margin-left: auto; margin-right:auto;”. That will centre the image in the sidebar. Left and right align in the shortcode will still work too. I will incorporate these changes in the next release. Cheers.

      • Sean, 21 May ’12 at 17:39

        Hi Henry, tried to update like you said and received this error.. Parse error: syntax error, unexpected $end in (path) on line 472
        thoughts?

      • Henry, 21 May ’12 at 18:13

        Ah, i missed a quotation mark in the code above. After the align attribute the lines mentioned should end like:

        style=”border: 0pt none; display: block; margin-left: auto; margin-right: auto;”>’;

  • Lauren, 16 May ’12 at 22:35

    Love this concept. It almost meets my need. Any way of getting the Raised & Target amounts off the configuration page and inside the shortcode? We need to have several projects tracked on different posts.

    • Henry, 16 May ’12 at 23:26

      Thanks Lauren. Am looking into this at the moment – some people have already asked for the option of multiple thermometers. I think your idea of putting amounts in the shortcode is the best way forward. Will have to recode some stuff, and will hope to have something sorted by next week perhaps.

      • Kevin, 16 May ’12 at 23:38

        @Lauren – good Idea. Me too Please!

    • Henry, 17 May ’12 at 17:49

      Ok, while it was on my mind I’ve managed to get the changes done…multiple thermometers should work now when you next update. Let me know how it goes. Cheers.

  • Annika, 16 May ’12 at 13:04

    Thanks Henry! I’ll check it out :)

  • Annika, 15 May ’12 at 14:59

    Hey Henry,
    When i try to save my thermometer settings I get the following error Fatal error: Call to undefined function imagecreatefrompng….
    This also appears when I add the shortcode to my post.

    • Henry, 15 May ’12 at 16:16

      Hi Annika, It sounds like the GD library is not installed on your server. This unfortunately is required to produce the thermometer image. You can check to see if it is installed by creating a new phpinfo file. Look through to see what it says about a GD library. If it’s not there you may be able to get it installed via your hosting support – it’s a pretty standard tool really. Let me know how it works out. Cheers

  • Kevin, 30 Apr ’12 at 21:33

    Can I run multiple versions (4) of this plugin on the same site? We have four firms, each collecting donations towards a common goal.

    • Henry, 1 May ’12 at 00:22

      Not yet…but it is on the to-do list. If it helps, you can use the shortcode to display the same thermometer multiple times around your site.

      • Henry, 17 May ’12 at 17:51

        It will work now in the new version. Make sure to change the shortcodes. Cheers

  • Jason, 26 Apr ’12 at 23:14

    Thanks for the plugin – nice and simple!

    One question. How do I change the font color for the amount raised and target? Changing the % color doesn’t affect those two numbers.

    Thanks!

    • Henry, 27 Apr ’12 at 11:51

      Cheers Jason. Yeah I only thought to add the option for the ‘%’ text to avoid a potential clash with the background colour, but you’re right, I think it would be a useful addition. Will add it to the list of things to do.

      In the meantime, if you’re happy to edit the donation_therm.php file, all you need to do is add in this at line 277:

      $txt_color = imagecolorallocate($final_img,0,0,0);

      Change the numerical values to get any RGB colour you want…let me know if you have trouble.

  • Jane, 19 Apr ’12 at 07:00

    My server environment requires suExec to wrap scripts, this doesn’t seem to be compatible with the plug-in. I’m getting an error message that says there isn’t a script wrapping program at line 210. Is there anything I can do to fix this?

    • Henry, 19 Apr ’12 at 13:28

      Sorry, I’m not that familiar with suExec. I’m guessing here but you could try replacing lines 209 and 210 of the donation-thermometer.php file with:

      $image_1 = plugin_dir_path(__FILE__).’images/thermometer_wide.png’;

      $final_img = imagecreatefrompng($image_1) or die(“Failed in call to imagecreate()\n”);

      This will call the file path rather than the url, but otherwise the code looks fine to me. I presume you have the GD library installed too? If you send me the server error log I might be able to make a more educated guess…

  • Richard Moon, 19 Apr ’12 at 05:12

    I would like to have two independent thermometers on my WordPress site. Any suggestions how I might accomplish that.

    Thanks.

    Richard

    • Henry, 19 Apr ’12 at 13:17

      Hi Richard…it’s something I’ve thought about adding in before…will try and get it done for the next release.

    • Henry, 17 May ’12 at 17:52

      Update the plugin to 1.2 and you will have this functionality now. Cheers

  • Gary, 17 Apr ’12 at 18:07

    Hi Henry,

    I tried installing your donation thermometer, but an error keeps popping up saying ‘Sorry, Plugin requires PHP 5.0 or higher. Please deactivate Plugin.’ My server is running PHP version 5.2.17, any idea what is causing the problem?

    • Henry, 17 Apr ’12 at 19:45

      Hi Gary…it sounds like your server may still have PHP4 as the default handler even though PHP5 may be installed. Have you had similar error messages with other plugins?
      There may be some php settings on your cPanel that you could use to configure the .htaccess file, otherwise I would submit a ticket with your hosting provider. They should be able to give the best advice.

Reply