[DEV] NightQuery v.1.6NC - A Minequery fork [1000]

Discussion in 'Inactive/Unsupported Plugins' started by Ambedrake, Jun 14, 2011.

  1. Offline

    Ambedrake

    NightQuery - A Minequery fork
    Current Version : 1.6NC

    NightQuery is a plugin that was forked from the commonly used Minequery plugin. It was created to expand the information given off by the server to PHP scripts for website uses and administration remote monitoring. By using a query you can gather a various amount of information about the server to be used on your website or even used to update a database pertaining to the server!

    Notice : This fork was not and will not be intended for use with server lists, it was made for those who needed more information to be output to a website via PHP. Support for server lists will not be provided in this thread in any way shape or form by me.

    Information sent from the server on query:
    Server Bukkit Version
    Required Client Version
    Server Port
    Number of players online
    Max number of players the server can hold
    Latency
    Player list
    What maps players are on
    Active plugins
    Plugin versions

    Installation:
    1. Copy NightQuery.jar to your plugins folder
    2. Add "minequery-port=25566" to your server properties. (You can chose to change the port)
    3. Copy minequery.class.php somewhere on your web server for use in PHP scripts.

    Query in PHP script:
    Minequery::query("host","port")

    Download : NightQuery.Zip (Broken Link Working on Fixing)
    Plugin Source : Here
    PHP Class Source : Here

    Credits:
    Original MineQuery code written by blakeman8192 & Kramer.
    Fork PHP & Java by myself & Acidraven (now he is registered!)
    WordPress Implimentation - werelord

    Wordpress Implimentation (Thank you werelord)
    Using the source code provided below werelord made it possible to add a minestatus link to WordPress. Thank you very much for your contribution!

    http://pastebin.com/vz36fK2q

    to use this:

    1. Download the "minequery.class.php" file from Ambedrake's link above.. Drop it in the same folder as the Minequery plugin in your Wordpress plugin directory (normally, this is wp-content/plugins/minestatus/)
    2. Backup the "minestatus.php" file (just in case)
    3. either edit the "minestatus.php" file, replacing all the code within with the code in the Pastebin link above, or save the pastebin code in a new file, copy it over the "minestatus.php" (you can also edit the minestatus.php file from the Wordpress Admin page as well I believe
    4. Go to the Widget config in Wordpress's admin, choose your options and save..
    5. You're done!!


    Extra About The Authors :
    We gladly take jobs to make plugins or other web scripts, as two university students in the computer science department it is always nice to be able to add things to our portfolios for later showing potential employers.



    Changelog :
    Version 1.6NC
    • Forked MineQuery 1.5
    • Added Server Version to Query
    • Added Client Required Version to Query
    • Added Player Location to Query
    • Added Plugin Names to Query
    • Added Plugin Version to Query
     
  2. Offline

    Ambedrake

    yeah I know, I just haven't gotten around to rearranging the array as it 1) does what its needed for (outputting an array to a website script) and b) time is tight with the new baby we had recently >.< If its requested of me to rearrange it I will flip flop the code around (its as simple as copy paste mostly).

    ty for the notice tho =P
     
  3. Offline

    werelord

    I made an edit to the minestatus.php.. if no players are online, nightquery returns playerlist[0] = ""; an array of 1 with no data in the first element.. I'm handling that in the php..

    At some point I'll make a full port of the minestatus widget (just packaging up for wordpress?? not entirely sure).. Sometime..

    http://pastebin.com/vz36fK2q
     
  4. Offline

    FrozdY

    Can i get an exaple of where i should put everything to make it work?

    You can put up the code and put for example: "Your Adress" where your adress for the server should be and "Your Port" for your port on the server and so on, not everyone has a knowlage in coding, i can barely code html to make it look about below average bu removing text like "Your Adress"and replacing it with whatever i need to set is no probs, now i have NO idea what to change to make it work on the site

    and also thanks guys, without this i wouldn't have cared to try and get php to work with html, so simple it's scary, just name the site ".php" and the php code just needs to be within the "<body><?php ?></body>", just as long it is there in a html code, it's all good, done, so thanks:D wouldn't have learned it otherwhise

    Also have i understood right when i read it like that i need minequery also or is it just this one?
     
  5. Offline

    Sorato

    The link is dead ?
    is there an alternative?
     
  6. Offline

    Ambedrake

    This is a fork of minquery 1.5 so just this package is needed as it is just a version of minequery that has been altered.
    As for the question of where to put the code, some knowledge of PHP programming is indeed required for this to be used correctly. It can be put into the code in a countless number of ways. You would place the query into a array variable, in example "$Array = Minequery::query("somehost.com","25566")" This would allow you to place the data in the desirable places in the HTML. You can go in and out of PHP code just by using the PHP tage "<?PHP" "?>" (if you have a special setting you can also just open with <? though this is not recommended as it is the quick way lol).




    The link is not dead mate, it may have gone down temporarily during a server reboot at the time you tried to download it but that is rare for us to do. This is personally hosted on a business server that we own so maintenance is something we do from time to time (though it usually is no longer then 15 minutes every 3 months just enough to clear the excess data to clear up space.)

    Cheers,
    ~Ambe~

    PS: There are some PHP tutorials out there that are very thorough that will show people how to handle arrays, it is something you can learn in 20 minutes of reading and trying it out. I do not think this is the place to write such a tutorial as PHP can be a very broad subject. If you need/want links to such tutorials so that you can use this plugin in different ways just ask and I can get some links that I consider high quality ^_^
     
  7. Offline

    FrozdY

    i've tried that now Ambedrake, several different PHP tutorials in fact but i can't seem to learn ANYTHING about where i should put what, can't you do a tutorial or make the PHP file easier to understand, maby a readme if you don't wanna do a tutorial, just to make it easier to know what to change in order to make it work? Please, otherwhise this addon gets rendered useless, i want to be able to use it becouse of all the nice features it holds
     
  8. Offline

    Stuffing

    @Ambedrake
    Would this perhaps work for minestatus.com? I have a bad feeling minequery has finally reached the ends of its peeks :(
     
  9. No it won't. It will report things incorrectly and there is nothing wrong with Minequery. It does exactly what it promises and what it's purpose is.
     
  10. Offline

    Stuffing

    I use it on a current recommended build for 1.0.0, and they Still have not updated yet, it does not work :(
     
  11. It works perfectly. I use it on CraftBukkit 1488 (there is no recommended build for 1.0.0) and there is nothing wrong with it. The following file is generated every 5 minutes by a script of mine that queries Minequery.
    http://nyancraft.com/tmp/mc.json
     
  12. Offline

    Ambedrake

    Currently using 1597, still working. As we have some free time this winter break we are looking at expanding this plugins reporting even farther so look for some updates (and movement to Bukket Dev) around the first of the year.
     
  13. Offline

    Sabotage

    The link for nightquery.zip is broken. I've tried it over the last couple days, and its not found. Could someone who has nighyquery.jar please send a link. thanks!
     
  14. Offline

    Ambedrake

    Sorry about that we are in the middle of switching web servers it should be up in 48 hours.
     
  15. Offline

    Pfannkuchensack

Share This Page