Ricard Torres
Forum Replies Created
-
Forum: Plugins
In reply to: [Thumbs Rating] Is it possible to create a function to work on comments?No, it’s not possible. The votes (it’s actually post meta data) is linked to a post/page in the database. The plugin does not use custom tables, just the out of the box solution to store post meta data.
Forum: Plugins
In reply to: [Thumbs Rating] PHP 8 SupportCache plugins will not work with this plugin.
There might be other voting plugins that works, but this one no. Because the unique token that is needed for the AJAX calls to the backend get cached and WordPress rejects the calls.
Forum: Plugins
In reply to: [Thumbs Rating] PHP 8 SupportDo you have a cache plugin installed and active on the site?
Forum: Plugins
In reply to: [Thumbs Rating] PHP 8 SupportI have not looked into it. Not sure if we need to change anything for PHP 8.
Do you have access to logs? Do you see any error or warning?
Forum: Plugins
In reply to: [Thumbs Rating] Reset Thumbs Vote/count@valerikluger perhaps you can use a MySQL query? or do you need something in PHP / frontend?
Then you could like update all posts with like 2 queries.
Forum: Plugins
In reply to: [Thumbs Rating] Average rating and total ratingsTo get to the point, I don’t have the time to code these 3 features you want, but I welcome patches / pull requests for this.
Thank you for the effort
Forum: Plugins
In reply to: [Thumbs Rating] Automize ratingEverything is possible! But not out of the box, you would have to code this functionalities yourself.
I can’t code it for you but here are some thoughts:
1) I don’t fully get the page A vs page B. The buttons are linked to a page in the post meta table.
2) Yes, you could add a cron job to your server to run a PHP which could query the database and remove all the votes.
3) Reset button is of course possible, you can follow a little bit what I did for the upvote and downvote to create your own reset button, with the proper action and meta value removal via Ajax.
Good luck!
Forum: Plugins
In reply to: [Thumbs Rating] Reset Thumbs Vote/countThank you for sharing @showhan !
Forum: Plugins
In reply to: [Thumbs Rating] CSS changes not showingHello @larrian
The problem is CSS Specificity, nothing to do with the plugin https://developer.mozilla.org/en-US/docs/Web/CSS/Specificity
Long story short, you can solve it by using !important in your CSS properties.
Such as
.thumbs-rating-container .thumbs-rating-down { background: #ffa66e !important; }
This will overwrite the plugin’s styles.
If that doesn’t work, it will be hard to debug for me. Perhaps you can fork the plugin and edit its files directly. You’ll have to bump the version number in the styles.css file of the plugin to prevent it being overwritten with a new version (something like version 99 should work).
As to your second question, no there’s no user interface for adding the buttons. You need to add them manually via shortcode or via the theme (functions.php or otherwise). Please have a look at the FAQ / Install instructions in the plugin page.
Hope this helps.
Forum: Plugins
In reply to: [Thumbs Rating] Hook for caching pluginHello @schotte
Thank you for the info, I’ve pushed the 4.1.0 version with the action to be hooked from your theme.
I’ve documented the name and parameters in the FAQ section: https://www.ads-software.com/plugins/thumbs-rating/#how%20do%20i%20run%20code%20whenever%20a%20user%20votes%3F
Please test it and let me know how it goes.
Cheers
Forum: Plugins
In reply to: [Thumbs Rating] Hook for caching pluginHey Albert,
Good question, I don’t know.
Do you have documentation on how these hooks work? How are they defined? How do you use them in the theme perhaps?
If there’s an easy way for the plugin to call a hook and you do something on your side, we can do that.
Forum: Plugins
In reply to: [Thumbs Rating] How to add IP Logging methodHello @yhazem
I’m afraid that’s highly unlikely. Other voting plugins with IP logging will probably already provide everything you need. No need to combine multiple plugins or code anything yourself.
Why not try a popular plugin? You can start your search here https://www.ads-software.com/plugins/search/rating/
Forum: Plugins
In reply to: [Thumbs Rating] How to add IP Logging methodHello @yhazem
I’m afraid not. The plugin does not store anything user related in the database, just the number of votes. This plugin is very lightweight by design.
Also, the plugin does not use any cookies but the browser’s LocalStorage
If you need a stronger multiple vote prevention you should look for another plugin.
Thank you.
Forum: Plugins
In reply to: [Thumbs Rating] Customize markupHello,
I’m afraid you can’t do that. At least I don’t know how. You can’t overwrite plugin functions from the theme.
If you need to customize the output I’d suggest simply forking the plugin. Create a copy of the whole plugin, bump the version to 99 (to prevent overwrites in the future) and customize it to your needs ??
Hope this helps.
Best regards
Forum: Plugins
In reply to: [Thumbs Rating] Just a feedbackThank you @moonyell !
It’s impossible for themes or plugins to be sure there won’t be issues at some point. Tweaking the CSS should be simple enough, just as you posted.
As a recommendation add the custom CSS to your theme, not in the Thumbs Rating plugin. So you can get the new plugin updates without overwriting.
You can even create a Child Theme, if you’re also concerned about overwriting your theme’s file. Here’s some documentation:
https://developer.www.ads-software.com/themes/advanced-topics/child-themes/
Best regards!