Created [Req] Minecraft Votifier Plugin

daannet

Member
Required playername - this could be useful for Minecraft list only...
Some Minecraft servers dont use votifyer, so i dont think its good idea,
also global gaming sites, required field isnt important much.
Because it doesn't work as a form i can't make a required field. Or has somebody a javascript suggestion?
 

cajkan

Active Member
I think its posible to make required field with php.
BUT - When users register they must input votifyer settings too.
And you have to require thouse in join fields too, i dont think this is good idea overall.
 

daannet

Member
PHP:
<input type="text" id="votifier_m_user" class="'.$username.'" style="width:100%;" class="input-text" placeholder="MineCraft Spelersnaam" value=""/>
                                    <script type="text/javascript">
                                        $(function() {
                                            $("#votifier_m_user").blur(function() {
                                                var votifier_m_user = $(this).val();
                                                var user = $(this).attr("class");
 
                                                $.ajax({
                                                    type: "POST",
                                                    url: "http://creeperservers.nl/plugins/MineCraftVotifier/minecraft_user.php",
                                                    data: {"votifier_m_user": votifier_m_user, "u": user},
                                                    success: function(data) {
                                                        // Do nothing on success
                                                    }
                                                });
                                            });
                                        });
                                    </script>

With this code is the player name submitted.... (with a little style change)
But i gonna check JS :) it is maybe better too. And i can otherwise disable the submit button before the player name is filled in.
 

Basti

Administrator
Staff member
Daanet, wait before you use this. Ive invited you to my conversation with xfhost. He not replied back yet, so feel free to test out the new version. All instructions are inside
 

Basti

Administrator
Staff member
Since the input only shows up for members who have filled out votifier on join, its no problem to make this required :)

On a new line above this
Code:
                                        });
                                    </script>
add there
Code:
$('.vote_click').click(function() {
    return true;
    if($("#minecraft_user").val().length == 0) {
        alert('Enter your minecraft username');
        return false;
    }
});
Then to your vote link
Code:
<a href="{$list_url}/index.php?a=in&amp;u={$username}&amp;sid={$sid}" class="visio_button large_button green" target=""><span>{$lng->gateway_vote}</span></a>
Add iin a new class called vote_click, like so
Code:
<a href="{$list_url}/index.php?a=in&amp;u={$username}&amp;sid={$sid}" class="visio_button large_button green vote_click" target=""><span>{$lng->gateway_vote}</span></a>
That should do the trick
 

Basti

Administrator
Staff member
Hi, i still not heard back of the people i gave it to, so ill pm you the plugin later as well. Still nt sure if there are issues or not
 

legendz

AcemanWolf
License Active
Anyone knows how to make this votifier announce on the server like other top site. When I vote for my MC server on my toplist, it doesn't announce on my server like the others do.

Screenshot (3).png
 
Top