getButterfly Logo getButterfly


So, you’ve purchased vote5 WordPress plugin and you want to restrict voting based on IP address. The default behaviour of the plugin does not allow this, so you’ll need to make a slight change to like.php.

Open the file using a text editor – I use Notepad++ – and find line 75:

if(!isset($_COOKIE['liked-'.$post_ID]) && $banStatusByIp == 0 && ($timeStatusByIp > ($v5_days * 86400) || !is_numeric($timeStatusByIp))) {

Replace it with:

if(!isset($_COOKIE['liked-'.$post_ID]) && $banStatusByIp == 0 && $voteStatusByIp == 0) {

Now your users won’t be able to vote from the same IP, ever again.

Photo source: Flickr

Subscribe to getButterfly Blog

Once a week or so we send an email with our best content. We never bug you, we just send you our latest piece of content.

If you found any value in this post, agree, disagree, or have anything to add - please do. I use comments as my #1 signal for what to write about. Read our comment policy before commenting! Comments such as "Thank you!", "Awesome!", "You're the man!" are either marked as spam or stripped from URL.

Leave a Reply

Your email address will not be published. Required fields are marked *