[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


    [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.

    • 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)
    MD5: d1740c75d9741f60c83da7f5708f1b82
    SHA1: 01e9219203f115734fcd0f6bcdd6b864d888dcca
    Source Code can be found in the download


    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. @Toni nice, but that's mysql ONLY, "compatible" means it supports it as optional :p

    And ofc I have some suggestions :p
    - You're reading experience table, that only shows how much XP you got, it gets reset to 0 after you gain at least 1 skill in that, you should've read the skills table.
    - Not everybody uses the mcmmo_ prefix, it should be configurable.
    - It's possible to select two tables in one query using JOIN
    - You could've just use mysql_fetch_assoc() or MYSQL_ASSOC on mysql_fetch_array() for easier usage, working with rows is confusing
    - "for HTML compliance :)", but you're using "</center>" between table rows

    From what you wrote there I see that you're not experienced with PHP, HTML nor CSS but at least you have good indentation... or is that just the editor ? :p
    Anyway, I uploaded my version of your version... =)
  3. Offline


    Haha, my bad :) didn't mean too!

    And thank you for the suggestions, I was reading over the functions last night but then again didn't really understand them so I used fetch_array with MySQL_NUM just incase. @ the </center> I just thought it would make it look more nice but again, I don't know much better with PHP / HTML as the tag was added inside the print function heh.

    Yes, I'm not very experienced but I'm still learning :) CSS is just a pain for me haha, and I know how to indent ;) I'm already experienced with similar syntax from another programming language ;)
  4. Offline


    Question, i dont know shit about php or any of this, but i had this working .. now with the new release you dont need to go to MySQL do you? and if not does your Fix of Tonis php allow for the same set up as before, just with taming added in etc?
  5. Offline


    What do you mean you don't need to go to MySQL?

    And I'll update my version like Digi had. He gave me some tips to fix.
  6. Offline


    One problem I found, you need mcMMO to make this usable. :)
  7. Well duh, where would you get the skils from if you didn't have it ? =)

    Do you mean you want the version that supports flatfile too ? That's a bit more complicated since there are more files... I don't really have a flatfile db anymore, if you could zip one for me I would make the script :}
  8. Offline


    Will this lag the server if it isn't using a local database?
  9. Well, you should ask that in mcMMO's thread... this is only a web application.
    It will have a small delay (depends on web server <-> mysql server ping delay) but nothing too bad.
  10. Offline


    Srry i went ahead and got everything squared away :p im now using this version but do you think you could give me the total PL in the table again, like the other one had.

    (if you could make it sortable by clicking the names :p that would be awesome haha but just the sort by total powerlvl would be ok as well)
  11. Offline


  12. Offline


    Please don't post your own thread in this topic that does the exact same thing :).
  13. Offline


    Hey Toni, nice work, any chance of adding power level? (all the stats added together)
  14. Offline


    Well, I'm not exactly sure how to do that, as in the database there isn't any records of the total amount of power.
  15. Powerlevel is the sum of all skills.

    Don't forget to use the "(prefix)skills" table instead of "(prefix)experience" table :p
  16. Offline


    getmcMMOStats v2.1



    * Edited some code, changed mysql_fetch_array to mysql_fetch_assoc (Thanks to Digi).
    * Changed some queries, added mysql prefix feature.
    * Updated Stats.php with some indentation.
    * Switched to Digi's method of MySQL connection configuration.
    * Switched data query to (prefix)skills.
    * Fixed some HTML issues with the table

    To-Do List:
    * Add a total Power Level column.
  17. Why don't you use JOIN in the query so you don't make two queries for the same row ?
    You can also seriously screw results if not all players have stats or not all stats have players XD

    I'm seeing that you didn't change the table :}
    That gives wrong results since you need to see skills, not exp.

    You don't need to use mysql_ping(), that's for checking the connection after some time has passed, just use " or die(mysqL_error());" after the connect and select db lines.

    Also, powerlevel:
    $data["powerlevel"] = ($data["taming"] + $data["mining"] + $data["woodcutting"] + $data["repair"] + $data["unarmed"] + $data["herbalism"] + $data["excavation"] + $data["archery"] + $data["swords"] + $data["axes"] + $data["acrobatics"]);
  18. Offline


    Oh shoot, I must've forgotten to add the new php file into the .zip, my mistake. Tested the VPS file and left it on there. And for the JOIN query, I'm still no pro at MySQL heh, I only know basics. I'm guessing JOIN is used to join another query inside another?


    Uploaded the revised file. Skills has been fixed now, and I'm having a little trouble with the Power Level line :p Mind helping me out here Digi?
  19. Offline


    I need a SQLite version of this....
  20. Offline


    Does mcMMO even support SQLite?
  21. Offline


    Well I use SQLite and not MySQL or anything else, and mcMMO and all stats are completely saved, and all of mcMMO's commands work, so I'd say yes.
  22. Offline


    Thats because McMMO uses flat file, not MySQL or SQLite, untill you set it up otherwize. Once you set it up, it switches from flat file to MySQL.
    There is no option to use it with SQLite.
  23. Offline


    can anyone tell me how to combine those to the powerlevel? I just want to rank the total level, not everything else
  24. That's for toni's code, thread code doesn't have taming yet.
    You can find the code for the thread's code powerlevel too in page 2.
  25. Offline


    I dont get it, sorry :s When i used that code and put in Powerlevel as a tab, it got an error that Data is not a value or something
  26. You still haven't specified wich version you're using... web stats (made by whom ?) and mcMMO (0.9 or 1.0+ ? with mysql or flatfile) would be helpfull.
  27. Offline


    latest mcmmo with mysql, and the webstats on the first post download button
  28. The version posted in the thread isn't updated for mysql nor latest mcmmo (doesn't have taming)... and I see that toni's link to his version is not working, so that's out of the question for now.

    Well, you can just use my version tough, I attached the edited version with powerlevel.

    EDIT: added sort by option.
  29. Offline


    thanks it worked! One more thing tho, can i make it ORDER BY powerlevel somehow?
  30. Sure, I edited it :} you can change the sortby field and order.
  31. Offline


    man thanks thats awesome! you should release that yourself, its awesomee!

Share This Page