Test: Proxy prevention

Basti

Administrator
Staff member
If i remember right callback plugin adds a new tmpl tag to the vote link button, so normally should be enough to update this to reflect that
Code:
var link = '{$list_url}/index.php?a=in&u={$username}&sid={$sid}';
 

leonor

Active Member
License Active
Sorry i forgot this Thread :/

I added it now like this:
Code:
var link = '{$list_url}/index.php?a=in&u={$username}&sid={$sid}{$p_callback_id}';
And my button:
Code:
<a href="#" class="visio_button button medium color" id="vote" target=""><span>Vote for {$title}</span></a>
 

kapearl

Member
I can't get this working on the bootstrap theme. Are there different instructions? I'm seeing a large increase in visits from proxy servers so really need to implement a way to cut out voting via proxy.

This code isn't in the bootstrap gateway.html
Code:
jQuery(document).ready(function(){
    jQuery(".visio_button").hover(function(){jQuery(this).stop().animate({opacity:0.8},250)},
    function(){jQuery(this).stop().animate({opacity:1.0},250)})
    });
 

Mark

Administrator
Staff member
That code is just for cosmetics. You can omit that part and should be ok to simply paste the entire block of JavaScript with or without it.

But there is no way to block proxies, if you catch someone cheating, booting them is about your only option. Netflix, Amazon prime and every major service has problems with proxies and VPN, it's the nature of the web. It's easy to cheat and impossible to block.
 

cajkan

Active Member
You can use google re-captcha against bots. But in some cases humans are invlolved so if you make even hardest puzzle they will solve it because they are humans not bots.
 

kapearl

Member
How would I get this working with two separate voting buttons on the gateway page? I have the default bootstrap theme button in place for mobile views but I added a graphic banner for desktop views which isn't affected (sometimes both are displayed). The button is in a span, the banner is in a div.
 

kapearl

Member
Of course, sorry.
First/default voting button (works)
Code:
<a href="#" id="vote" class="btn btn-success"><span>{$lng->gateway_vote}</span></a>
My second image button looks like this (not working)
Code:
 <div class="col-md-6 image-container"> 
<a class="popup" id="vote" href="#"><i class="fa fa-check"></i></a><img src="/images/vote.png"></div>
 

kapearl

Member
I figured out a way to get it working in two places! I duplicated the script and made it #vote2 so I could duplicate it on my image. Not sure if it's the best way but it does the trick! Then added #vote2 to as the id, (id="vote2") to the second voting link.

Code:
<script>
jQuery(document).ready(function(){
    jQuery(".visio_button").hover(function(){
        jQuery(this).stop().animate({opacity:0.8},250);
    },
    function(){
        jQuery(this).stop().animate({opacity:1.0},250);
    });
    var countdown = 5;
    var vote = $('#vote span');
    function doVote() {
        var link = '{$list_url}/index.php?a=in&u={$username}&sid={$sid}';
        if (countdown > 0){
            $('#vote span').html('Please wait '+countdown);
            window.setTimeout(function() {
                doVote();
            }, 1000);
            countdown--;
        }
        else {
            $('#vote').attr('href', ($('#mc_user').val()) ? link + "&mc_user=" + $('#mc_user').val() : link);
            $('#vote span').html('{$lng->gateway_vote}');
        }        
    }
    doVote();
});

</script>

<script>
jQuery(document).ready(function(){
    jQuery(".visio_button").hover(function(){
        jQuery(this).stop().animate({opacity:0.8},250);
    },
    function(){
        jQuery(this).stop().animate({opacity:1.0},250);
    });
    var countdown = 5;
    var vote = $('#vote2 span');
    function doVote() {
        var link = '{$list_url}/index.php?a=in&u={$username}&sid={$sid}';
        if (countdown > 0){
            $('#vote2 span').html('Please wait '+countdown);
            window.setTimeout(function() {
                doVote();
            }, 1000);
            countdown--;
        }
        else {
            $('#vote2').attr('href', ($('#mc_user').val()) ? link + "&mc_user=" + $('#mc_user').val() : link);
            $('#vote2 span').html('{$lng->gateway_vote}');
        }        
    }
    doVote();
});
</script>
 
Top