BlackJack Posted June 27, 2023 Share Posted June 27, 2023 Hello! Tell me, what can be done so that unregistered users cannot put dislikes on the video? The last few days have encountered a problem, most likely, bots deliberately put dislikes on videos added by users. Quote Link to comment Share on other sites More sharing options...
Tech Support Posted June 27, 2023 Share Posted June 27, 2023 There is currently no any solution for this. What solution do you expect? Quote Link to comment Share on other sites More sharing options...
hbarnetworks Posted June 27, 2023 Share Posted June 27, 2023 Fight fire with fire. Get your own bots to put upvotes! 2 Quote Link to comment Share on other sites More sharing options...
Yikmings Posted June 27, 2023 Share Posted June 27, 2023 Use Cloudflare or Google reCAPTCHA (KVS plugin or install in code) to filter out bots. This may reduce bot action significantly. 1 Quote Link to comment Share on other sites More sharing options...
BlackJack Posted June 27, 2023 Author Share Posted June 27, 2023 Well, for example, allow likes and dislikes only for users who have been registered for several days. For example, as implemented on reddit. Quote Link to comment Share on other sites More sharing options...
Tech Support Posted June 27, 2023 Share Posted June 27, 2023 1 hour ago, BlackJack said: Well, for example, allow likes and dislikes only for users who have been registered for several days. For example, as implemented on reddit. Sounds like a plan. You can get this by adding the following block of code into /admin/include/pre_async_action_code.php customization file: if ($_REQUEST['action'] == 'rate' && intval($_REQUEST['video_id']) > 0) { if ($_SESSION['user_id'] == 0 || time() - strtotime($_SESSION['added_date']) < 2 * 86400) { async_return_request_status(); } } So it will allow rating for only registered users that spent at least 2 days on the site. For other cases it will emulate "thank you" message, but will not do any actual rating. 1 1 Quote Link to comment Share on other sites More sharing options...
BlackJack Posted June 27, 2023 Author Share Posted June 27, 2023 And can I ask one more question?) Is it possible to clean up likes or dislikes on already spammed videos? Thanks! Quote Link to comment Share on other sites More sharing options...
Mich Posted June 27, 2023 Share Posted June 27, 2023 Intriguing. Could we possibly implement a feature that informs users of the requirement to be registered for a minimum of two days on the site? This could be a useful precaution. Thank you. 1 Quote Link to comment Share on other sites More sharing options...
Tech Support Posted June 28, 2023 Share Posted June 28, 2023 11 hours ago, BlackJack said: And can I ask one more question?) Is it possible to clean up likes or dislikes on already spammed videos? Thanks! Unfortunately not. Quote Link to comment Share on other sites More sharing options...
Tech Support Posted June 28, 2023 Share Posted June 28, 2023 5 hours ago, Mich said: Intriguing. Could we possibly implement a feature that informs users of the requirement to be registered for a minimum of two days on the site? This could be a useful precaution. Thank you. This can be done by replacing async_return_request_status(); with async_return_request_status(array(array('error_code'=>'not_logged_in','message'=>'You must be registered...'))); But the problem is, the GUI JS code that handles rating doesn't support showing custom error messages. It has binary logic: success -> Thank you!, error -> Your IP already voted! Quote Link to comment Share on other sites More sharing options...
BlackJack Posted July 1, 2023 Author Share Posted July 1, 2023 Please tell me where to get the file /admin/include/pre_async_action_code.php Quote Link to comment Share on other sites More sharing options...
Tech Support Posted July 3, 2023 Share Posted July 3, 2023 On 7/1/2023 at 11:32 AM, BlackJack said: Please tell me where to get the file /admin/include/pre_async_action_code.php Not sure what you mean, this file should exist on your server filesystem. It is empty by default, e.g. has a valid PHP header but no logic there. This file is designed for custom extensions of needed. Quote Link to comment Share on other sites More sharing options...
BlackJack Posted July 3, 2023 Author Share Posted July 3, 2023 By default, we do not have this file. Should it be created? Quote Link to comment Share on other sites More sharing options...
Tech Support Posted July 3, 2023 Share Posted July 3, 2023 1 hour ago, BlackJack said: By default, we do not have this file. Should it be created? Yes, if you don't have this file, then your initial KVS version could be very old when we didn't have it. The default version of this file is attached. pre_async_action_code.php 1 Quote Link to comment Share on other sites More sharing options...
BlackJack Posted July 4, 2023 Author Share Posted July 4, 2023 We can say that we have an up-to-date version, 6.0.1, but we did not have such a file. Thank you for your responses) Quote Link to comment Share on other sites More sharing options...
Tech Support Posted July 4, 2023 Share Posted July 4, 2023 3 hours ago, BlackJack said: We can say that we have an up-to-date version, 6.0.1, but we did not have such a file. Thank you for your responses) This file is not included as a part of KVS update, since it may contain custom code that otherwise will be overridden. So it is normal that some projects do not have this file. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.