rhewlif
Forum Replies Created
-
Forum: Plugins
In reply to: [Donation Thermometer] Percent in thermometer incorrectHow are your shortcodes configured? For the thermometer are you setting a different raised total than what is the default on the settings page?
The [therm_r] shortcode is meant to take the ‘default’ value from the settings page and is therefore not linked to a specific thermometer. If you set a raised value in the thermometer shortcode (26,000?) then this would not get reflected in [therm_r].
If you have only one thermometer on the site then I would recommend removing the raised value from the [thermometer…] shortcode and control everything from the settings page.
Forum: Plugins
In reply to: [Donation Thermometer] Percent in thermometer incorrectHi, Sorry, I can’t see what the problem is. Is it that the percentage is not displayed on the initial popup? You can set the default appearance from the settings page, or for each thermometer using showpercent=true in the shortcode.
Forum: Plugins
In reply to: [Donation Thermometer] Customized image instead of thermometerThe question of using custom svgs has come up before and I have thought about possible ways to do this as it would be a nice feature. But it would require some significant updates for the plugin, so this is not possible for now unfortunately.
Forum: Plugins
In reply to: [Donation Thermometer] Embedded Shortcodes – more than one causes errorThat’s awesome, thank you!
Forum: Plugins
In reply to: [Donation Thermometer] Different currency values for each target and raisedThat’s cool you found a different workaround. You may also want to adjust the svg width too so these long labels don’t get cropped off. E.g.,
jQuery('.thermometer_svg').width(260)Normally, the plugin would calculate the necessary width itself.
Forum: Plugins
In reply to: [Donation Thermometer] Embedded Shortcodes – more than one causes errorThe target parameter wasn’t set up to handle shortcodes as I assumed this would probably remain constant in most use cases. But it’s easy enough to do.
In therm_shortcode.php, search for the target value section (around line 100) and this ‘if loop’ in the last else statement.
// if shortcode present
if (!is_numeric(str_replace(",", ".", $atts['target'])) && (strpos($atts['target'], ';') === false) && !is_numeric(str_replace(',','',$atts['target']))) {
$shortcode = "[".strval($atts['target'])."]";
$atts['target'] = do_shortcode( $shortcode);
}Use the raised value section underneath as a guide. The two different shortcodes should then be parsed ok.
I can include this in the next plugin update, as it could be useful for others.
Forum: Plugins
In reply to: [Donation Thermometer] Different currency values for each target and raisedIt’s possible, but only with some manual tweaking of the code, as it’s not a feature.
In the therm_svg.php file I think you only need to update around 3 or 4 lines to get it work like you describe:
Search for the multiple subtargets section (near the bottom) and update the for loop to iterate over two arrays simultaneously:
foreach( array_combine(array_slice($targetA,0,-1),array('%','+')) as $t => $c ){ // and skip the last target totalIn the second array you can add the symbols that will appear on the side of the thermometer.
Underneath you will then need to change the $currency variable to $c, like so:
$t = ($trailing == 'true') ? esc_html(number_format($t,$decimals,$decsep,$sep).$c) : esc_html($c.number_format($t,$decimals,$decsep,$sep));You can add your own logic here if you want the symbols to be trailing differently – e.g., swap $trailing == ‘true’ to $c == ‘#’
The main raised or target values can be edited similarly near the top of the same file. Where $raisedValue and $targetValue are defined, just change the $currency variable to what you want, like
$targetValue = number_format($targetTotal,$decimals,$decsep,$sep).'%';Just to be aware, these manual edits will be lost after any plugin updates. I am planning to push an update out within the next week or so, just so you have a heads up. It won’t be substantial changes that would stop you from applying the edits again, though.
I hope it works out.
Forum: Plugins
In reply to: [Donation Thermometer] Not updating raised valueHi, Sorry to hear you’re having trouble with the plugin. Are you updating the raised value via the settings page or the shortcode? What is the shortcode you are using for this page? Any parameter values set in the shortcode take priority over values set on the Thermometer settings page. Or in other words, the values on the settings page will apply to all thermometers on the website unless individual thermometers have values defined specifically. So maybe you just need to remove raised=22 from the shortcode on this page.
Otherwise, if updating the value via the shortcode, maybe you have a caching plugin which is not being emptied on page updates?
Forum: Plugins
In reply to: [Donation Thermometer] Fill color is changing to black in MobileThanks for the extra info – it’s clearer now. It seems the way your theme handles content for mobile or desktop is to create two versions of the page, then hide one or the other with css. In the thermometer the fill is set from a linearGradient element within the svg, which for these two thermometers will have the same ‘id’. Normally this isn’t a problem, but it seems hiding the first (desktop based) content confuses the second thermometer as it can’t find the original linearGradient element to fill itself.
I might be able to fix this with a plugin update after some more testing. But in the meantime, you could try to change the fill on the ‘mobile’ thermometer very slightly so that the two linearGradient elements have different id’s E.g., [thermometer fill=#F18380]
Forum: Plugins
In reply to: [Donation Thermometer] Fill color is changing to black in MobileHi,
Ok, interesting problem. Do you have a page where I can see this happening? And what are the shortcodes you are using?
Off the top of my head my first suggestion would be to check there is not a typo in the shortcode/settings page for the fill color – it should be a hex value with the hash symbol e.g., fill=#d7191c. It would appear black if the colour code can’t be parsed.
Or are you referring to the therm_fill class that is normally transparent by default? It may be that the mobile browser doesn’t recognise the transparent value, and you could replace this with e.g., fill: #ffffff00; (or something that matches your site background) under the custom css tab on the settings page.
Forum: Plugins
In reply to: [Donation Thermometer] Thermometer not showingHi
I’ve had a quick play with their plugin, and from what I can tell there seem to be some limitations with their free version. Specifically under the General settings there is a ‘pro’ option to stop invalid HTML tags from being stripped. My best guess is that this restriction is removing the svg or preventing it from being created.
Maybe a workaround is to display the thermometer on another page, save a screenshot to an image file, and insert this image into the popup. But it is obviously not very convenient for updating totals.Forum: Plugins
In reply to: [Maspik - Ultimate Spam Protection] Javascript check letting spam throughThank you, an email is on its way.
Forum: Plugins
In reply to: [Donation Thermometer] Using with Divi…Hi Peter,
Do you have an example of how the thermometer displays incorrectly? One solution could be to wrap the shortcode in a <div> element and apply some custom CSS to fix any overlaps.
- This reply was modified 1 year, 9 months ago by rhewlif.
Forum: Plugins
In reply to: [Donation Thermometer] Can this work with PayPalIn theory, yes, as long as the plugin tracking your donations can output the raised total in a shortcode. Someone in the previous post has an example shortcode of how this could work with the GiveWP plugin.
Generally, other plugin shortcodes can be inserted into the raised parameter using single apostrophes instead of square brackets, e.g.:[thermometer raised='sales id="1947"' target=5000]Thus multiple campaigns using different shortcodes could be tracked across multiple thermometers.
Forum: Plugins
In reply to: [Donation Thermometer] Automatic updating of values from GiveWP pluginBased on their documentation I think in theory it should work. That plugin has a shortcode generator to output the raised total.
[give_totals message="{total}" progress_bar="false"]Shortcodes can be integrated within the thermometer shortcode using single quotation marks instead of the square brackets:
[thermometer raised='give_totals message="{total}" progress_bar="false"' target=5000]I have not tested this with this plugin specifically though so do let me know how you get on.