[INACTIVE][INFO/WEB] mcMMO Web Stats v1.1 - A web-based view of your mcMMO Stats [0-556+]

Discussion in 'Inactive/Unsupported Plugins' started by FiZi, Mar 24, 2011.

  1. Offline

    FiZi

    [INFO/WEB] mcMMO Web Stats v1.1 - A web-based view of your mcMMO Stats [0-684]
    Version: v1.1

    mcMMO Web Stats is a simple PHP page you can link to directly or include in an existing page to display the mcMMO stats of every player on your server. Think of it like a character sheet for your players.

    Features:
    • Lists mcMMO stats of each player on your Minecraft server in a simple HTML table
    • Easy to configure!
    • Link to the page directly or include it in an existing page on your website
    • Compatible with mcMMO 0.9.2 and newer (chances are it works on older versions as well)
    Download
    MD5: d1740c75d9741f60c83da7f5708f1b82
    SHA1: 01e9219203f115734fcd0f6bcdd6b864d888dcca
    Source Code can be found in the download

    Screenshot
    mcMMOPlayerStatsScreenshot01.png

    Changelog:
    Version 1.1
    • Better code for checking for unset values and displaying a 0 (Thanks Digi)
    • Tested with mcMMO 0.9.10
    • Cleaner error handling (Again thanks Digi)
    • Fixed a problem where the skills weren't being read in the correct order. Turns out Herbalism XP wasn't being counted. This fix doesn't effect the displaying of stats and is really just for completeness.
    Version 1.0
    • Initial release
     
    Rytharr likes this.
  2. Offline

    silentdojo

    This works perfect. Thanks a lot. Only feature I ask for is a sort feature and when time comes a MySQL version (when mcmmo releases theirs).
     
  3. Offline

    nossr50

    Simple but effective, me likey
     
  4. Offline

    FiZi

    I will absolutely update this mod to support MySQL when it happens for mcMMO. I have another idea as well for creating individual charactersheets. More soon :)

    I'm thinking of tieing this in with Netstats as well.
     
  5. Offline

    Zonkcraft

    Does this webpage conflict at all with the dynamic map? I am considering installing mcMMO and this web stats. We currently run the dynamic map which hosts the at the http://serverip:port/
     
  6. Offline

    silentdojo

    You will need a seperate webserver like apache. Dynmap uses it's own webserver. There will be no conflicts.

    Test is out http://www.bohningcrue.com/rpg
    Remove /rpg and you get our main website.
    http://www.bohningcrue.com:8123 - Disabled do to performance issues. (Still works tho)
     
  7. Offline

    tee jay

    All this takes is instead of reading the flatfile and splitting on lines, you connect to the mysql db, execute your quesry, then loop with something like:
    Code:
    mysql_connect ($server, $username, $password);
    mysql_select_db($database);
    $players = mysql_query("SELECT * FROM $TableName")
    while ($player = mysql_fetch_array($players))
    {
        // stuff here
    }
     
  8. Offline

    FiZi

    Yes sir! It's pretty simple to add MySQL support. Just need a database to query.

    I had thought about making a bridge that would convert the mcmmo.users file to a MySQL database Much easier to get data from but slightly more complicated to setup for you guys. The data also wouldn't be real-time like it is now. There would have to be a 30 second delay on it.

    Is there any interest for this?
     
  9. Offline

    Zonkcraft

    I guess I should have said my group of people rent a server from a host. So we don't personally run it. We have FTP access for the files, but nothing outside the minecraft folder. So there is no webserver bundled like dynmap?
     
  10. Offline

    Digi

    Nice ! But this isn't actually a plugin, it's a feature for a plugin.

    It verry much is :))

    Still, I found that $world points to the value before it, you're missing something.

    Anyway, I had nothing else to do so I quickly recoded that, hope you get something good out of it :}

    EDIT: found it, herbalism xp (gather) is missing :} I'ved re-edited and re-uploaded my re-coded version xD
     

    Attached Files:

  11. Offline

    Stephen92

    just wanted to say I love this and if anyone wants to check it out on my website I have this and dynmap running at the same time looks real good.

    mcoblivion.enjin.com
     
  12. I like this a lot. Took me a bit of fiddling to use sorttable.js with it, but now its a lovely addition.
     
  13. Offline

    scar413

  14. Offline

    FiZi

    Thank you! I've fixed the missing herablism xp problem and used some of your code as inspiration to clean up my error checking and my checking for blank values.

    I've updated the main post with the new version (1.1).
     
  15. Offline

    Digi

    Still, some notes:
    - You're calling fopen() twice, you can just do this:
    Code:
    $handle = @fopen($file, 'r'); // @ is for skipping error reporting
    
    if(!$handle)
        die('error... ');
    OR you could just use file() to read the file and get all lines into one array in one call.

    - You don't really need strstr() for the first character, $player[0] != '#' would do just fine

    But that's not critical =) glad to help, at least I don't feel as useless because I don't know Java XD
     
  16. Offline

    woodzy

    i have 1.4 now and ill be trying this for the 1.4 to night
     
  17. Offline

    FiZi

    Let me know how it goes. It should work fine.
     
  18. Offline

    woodzy

    umm now how to add the .php file to my website XD HAY, GOOGLE!
     
  19. Offline

    FiZi

    Please read the included instructions at the top of getmcMMOStats.php.

    Once you've done that you can link directly to the page or use a simple include to include the stats table on another PHP page.

    Example:
    PHP:
    <?php include "stats/getmcMMOStats.php"?>
     
  20. Offline

    woodzy

    i didnt see any how-to. and none of the links has it eather
     
  21. Offline

    FiZi

    Sorry shoulda mentioned you had to look at the page source. Here are the instructions:

    PHP:
    // Installation instructions
    // ----------------------------------------------
    // 1. Place this file in on your webserver
    // 2. Ensure your webserver has atleast read-only access to your mcmmo.users file
    // 3. Configure $mcMMOPlayers below in the configuration section
    // 4. Include this file in an existing PHP page (Example: <?php include "getmcMMOStats.php"; \?\>) [Ignore those backslashes in the example]
    //    OR link directly to this file somewhere on your website
    //
     
  22. Offline

    woodzy

  23. Offline

    woodzy

    do i dont get how to like it :/ my website is html based apachie2 webserver
     
  24. Offline

    atlem

    new idea on your pluggin .. /ranklist show top ten players
     
  25. Offline

    ark3typ3

    Nicely done, I would suggest a MySQL or SQLite feature though. I created one similar to this a while back that updates users data automatically in the database (Infact, have a cron that draws from the database and concatenates my loginmessage file) and it allows me to sort by rank and do a whole slew of other goodies if I choose.

    I can shoot a snippet of the update query if you want, but I'm sure you can figure it out
     
  26. Offline

    Exone

    Thanks for this :D

    I added players skin next to their name, and styled the whole page to my liking :)
    http://theexmines.com/skills/stats.php



    A $powerlevel would be rather nice. :p

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 13, 2016
  27. Offline

    Digi

    That's not stored, it's calculated, I dunno the formula tough XD I guess is the total sum of all skills.
     
  28. Offline

    Kahl

    That is correct. If you implement this and display users in order from highest power level to lowest, that'd be amazing.
     
  29. Offline

    jespernorgren

    Error: Looks like you didn't configure $mcMMOPlayers.

    can somone please tell what/how i should configure this.
     
  30. Offline

    Digi

    Open the file with a text editor, it's specified there with a commend.
     

Share This Page