[WEB][PHP] Minecraft Server Query with Avatars // EASY!

Discussion in 'Bukkit Tools' started by iPhwnU, Jan 16, 2014.

Thread Status:
Not open for further replies.
  1. Offline

    Sir_Mr_Bman

    This is a great tool.
    We're using it on my server network!
    We just modded the PHP script a bit, and added some CSS colors. It looks fantastic now!
     
  2. Offline

    Adzkii

    I've just downloaded it, but i want it on the top of my forum? how do i do it?
    Sorry for last reply lol
     
  3. Offline

    McLive

    Add the code onto your page? :eek:
     
  4. McLive I've modified my network page to display up to five sets of code. However, anything other than Spigot 1.7.10 seems to display
    instead of 'online' or 'offline'. The query is functioning, because it grabs player numbers (or none) but it doesn't seem to catch the status of the server. Any suggestions? See here.

    Thanks :)
     
  5. Offline

    McLive

    Can you send me the ip and port?
     
  6. Offline

    Adzkii

    I've tried pasting it to my head, but it's only showing some parts. and it's all over the place?
     
  7. Offline

    JWhy

    You always add visual HTML element within the <body> tag
     
  8. Offline

    McLive

  9. Offline

    Plumeex

    I take the liberty to quote myself since I'm still looking for this. Thanks :)

     
  10. Offline

    McLive

    It's possible when you provide a database which includes all currently vanished players
     
  11. Offline

    JWhy

    Plumeex, McLive: Or using Sockets, if the MC server and the web server aren't on the same host machine. That's what the script actually does
     
  12. Offline

    ImToRich

    Hello,

    I was wondering if you could help me with a very simple edit via Skype?

    Kind regards,
    Jamie
     
  13. Offline

    JWhy

    ImToRich: Sent you a PM with my skype name ;)
     
  14. Offline

    NoHoPeLess

    How can i limit the amount of players dispayed?
     
  15. Offline

    McLive

  16. Offline

    NoHoPeLess

    Last edited by a moderator: Jun 6, 2016
  17. Offline

    McLive

  18. Offline

    NoHoPeLess

  19. Offline

    McLive

  20. Offline

    NoHoPeLess

    Now it works well :D some question can i split the players?
    So that it list me in one column 10 players and in the other 10 pl.... ? it is possible?

    And thx you soo much for this amazing work!

    ohh i see he split every 11 players

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 6, 2016
  21. Offline

    McLive

    yeah, you could do this with some css, like
    Code:
    <div class="span8" style="font-size:0px; width:450px;">
     
  22. Offline

    NoHoPeLess

    :D
    1 bug when nobody is online he list not the
    PHP:
    "<div class=\"alert\"> There are no players online at the moment!</div>";
     
  23. Offline

    Adzkii

    I just need to know how to add it to my web and forum :?
     
  24. Offline

    iPhwnU

    Wow, didn't know this has become so popular :p Big thanks to McLive too! I've also updated the main repo with latest commits by McLive.

    McLive Maybe you can make a pull request each time you make new commits? I'm usually at work and don't have time to keep up with updates in forums and GitHub :/
     
  25. Offline

    McLive

    Oh, will fix that later. :D
    Ok, I'll do that. :D

    fixed. :) https://github.com/McLive/MinecraftAvatarQuery/commit/705dbb67141dfe29884f11bab6d1bcc18ce41547

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 6, 2016
  26. Offline

    NoHoPeLess

    For now i cant test it but thx you for your great support!
     
  27. Offline

    iPhwnU

  28. Offline

    Mister_Fix

    I like it, i like the design, not something i could use ATM, but i really like this little script!
     
  29. Offline

    AakashTH

    Anyone help? I have been stuck trying to load up the avaters on players and it seems to to be not loading for some reason. http://i.imgur.com/i4lHvmV.png

    So this is the code:
    PHP:
    <div class="col-md-8" style="font-size:0px;">
                    <h3><?php echo htmlspecialchars($TITLE_BLOCK_TWO); ?></h3>
                    <?php
                    
    if($HEADS == "3D") {
                        
    $url "https://cravatar.eu/helmhead/";
                    } else {
                        
    $url "https://cravatar.eu/helmavatar/";
                    }
     
                    if(empty(
    $query['error'])) {
                        if(
    $playerlist != "null") { //is at least one player online? Then display it!
                            
    $shown "0";
                            foreach (
    $playerlist as $player) {
                                
    $shown++;
                                if(
    $shown $show_max || $show_max == "unlimited") {
                            
    ?>
                                    <a data-placement="top" rel="tooltip" style="display: inline-block;" title="<?php echo $player;?>">
                                    <img src="<?php echo $url.$player;?>/50" size="40" width="40" height="40" style="width: 40px; height: 40px; margin-bottom: 5px; margin-right: 5px; border-radius: 3px; "/></a>
                        <?php    }
                            }
                            if(
    $shown $show_max && $show_max != "unlimited") {
                                echo 
    '<div class="col-md-8" style="font-size:16px; margin-left: 0px;">';
                                echo 
    "and " . (count($playerlist) - $show_max) . " more ...";
                                echo 
    '</div>';
                            }
                        } else {
                            echo 
    "<div class=\"alert alert-info\" style=\"font-size:16px;\"> There are no players online at the moment! <i class=\"fa fa-frown-o\"></i></div>";
                        }
                    } else {
                        echo 
    "<div class=\"alert alert-danger\" style=\"font-size:16px;\"> Query must be enabled in your server.properties file! <i class=\"fa fa-meh-o\"></i></div>";
                    } 
    ?>
                </div>
            </div>
        </div>
        </body>
    </html>
     
  30. Offline

    Mister_Fix

    You have to have to have query enabeled in your server.properties file in your server directory
     
Thread Status:
Not open for further replies.

Share This Page