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.
The plugin shortcode has 6 optional parameters: width/height, align, alt, trailing, fill, and currency:
[thermometer raised=523 target=1000 width=300 height=567 align=left currency=$ alt='Raised £523' trailing=false fill=#D318D6].
Width and height values are interpreted as pixels. The alt text can be toggled off by using ‘alt=off’. Currency can proceed the raised and target values by toggling ‘trailing’ to true or false. Unique thermometer fill colours can be assigned using hex values in the fill parameter.
The plugin also supports the use of shortcodes to display text values of the amount raised and target value. Simply use
[therm_t] on any post or page. See the FAQ for instructions on how to use in text widgets.
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!
|1.3.14 (22 Dec '16)||* Fill colours can now be assigned for individual thermometers using the new shortcode parameter ‘fill=‘|
|1.3.13 (5 Feb '16)||* Fixed minor bug regarding centre alignment of the thermometer.|
|1.3.12||* Fixed minor bug with default values when updating from < version 1.3.|
|1.3.11||* Error in database changes on upgrade in 1.3.10.|
|1.3.10||* Various backend improvements of the code and handling of errors.
* Added more options for the thousands separator.
* Confirmed compatibility up to Wordpress 4.3.*
|1.3.9 (21 July '14)||* Move width and height parameters into CSS code.
* ‘px’ units can now be defined in the shortcode, instead of having to just use a number value.
|1.3.8 (13 July '14)||* Fixed encoding for currency symbols in the filename.|
|1.3.7 (14 May '14)||* Further fix to the therm_r and therm_t shortcodes.|
|1.3.6 (9 May '14)||* Fixed an issue with the default display of the thousands separator.|
|1.3.5 (19 Mar '14)||* Added an option to modify the thousands separator in the thermometer shortcode. E.g.
* Added an option to move the position of the currency symbol to follow the target/raised value using the thermometer shortcode. E.g.
* Added global currency settings to the plugin options page.
|1.3.4 (2 Mar '14)||* Fixed a bug that was preventing absolute values of the width/height parameter working.|
|1.3.3 (10 Dec '13)||* Added the option to use the width or height parameter value as a percentage (useful for displaying thermometers consistently across various screen sizes).|
|1.3.2 (14 July '13)||* Bug fixed where thermometer settings were overwritten with defaults every time the plugin was reactivated/updated.
* More efficient code used for filling the thermometer.
* When percentage raised is greater than 100% the thermometer now fills completely.
* Thousand's separator added to the thermometer alt and title captions.
|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.
- 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.Edit the donations_therm.php file in the plugin folder, and add the following lines:
if (!is_admin()) add_filter('widget_text', 'do_shortcode', 11); (Src:http://hackadelic.com/the-right-way-to-shortcodize-wordpress-widgets).
[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].
- Can I display the thermometer as a percentage of a parent container?
Yes – just add the percentage symbol to the shortcode value. For example, width=30%. As before, values can be set for Width OR height only. To display the thermometer using an absolute value, set width=320, NOT width=320px.
- How do I use the title & alt attributes?
This alt parameter 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.