firebird1999
Forum Replies Created
-
Forum: Plugins
In reply to: [Site Reviews] Modifying star amount in summaryOk, I’ll have another look!
This can be marked as solved though. 🙂Thanks a lot for your great help!
Forum: Plugins
In reply to: [Site Reviews] Modifying star amount in summaryThank you, that seems perfect, but somehow it has no effect at all at a page with the summary on it.
Also a glsr_debug inside this hook’s function does not trigger.
I implemented it right there where my solution above works.Forum: Plugins
In reply to: [Site Reviews] Modifying star amount in summaryThanks a lot for your fast answer!
Your code will change my 4.9 rating value to 5, but unfortunately the stars are not affected by this.
I’d actually want to have 5 full stars displayed but still the rating of 4.9Thanks to your (hook) example I managed to solve it like this:
add_filter('site-reviews/summary/value/stars', function ($value) { preg_match("/<strong>(\d*(?:\.\d+)?)<\/strong>/", $value, $matches); if (isset($matches[1])) { $v = floatval($matches[1]); $value = ($v >= 4.5) ? glsr_star_rating(5) : $value; } return $value; });It’s kinda hacky but it seems to do the job as long as the template for the stars won’t be changed.
Thank you.
Forum: Plugins
In reply to: [Site Reviews] Custom fields in email notificationThanks a lot for your fast response, works like a charm!
I’m sorry I didn’t see that post before.Have a nice day!
Forum: Plugins
In reply to: [Site Reviews] Custom fields in email notificationI managed to get it done by modifying buildEmail function in plugin/Modules/Notification.php and add my custom fields to the template-tag there, but I really don’t want to edit the plugin core code.