Inactive [INFO/WEB] WS v0.5 - Web Stat page for mcMMO(whith MySQL only) [1302]

Discussion in 'Inactive/Unsupported Plugins' started by Kiborgik, Apr 30, 2011.

  1. Offline

    Kiborgik

    Project is closed!
    Simple webstat writen on php5, now only for mcMMO whith MySQL and PHP 5.2.1+
    Version: 0.5
    GitHub: https://github.com/Kiborgik/ws
    Demo: http://ratings.crafthero.net
    Screens:
    Show Spoiler
    [​IMG]

    Download: Last version
    Install:
    1. move files to web-folder on your website
    2. edit config.php
    3. chmod 777 "data"
    4. chmod 666 for all .json files on folder "data"
    5. cake? )
    6. p.s. if you have "internal" problem try delete .htaccess
    7. if you disabled mining on your server:
      • open webstats.class.php found "AND ms.`mining` >0" (on line: 64)
        and delete this part, and all be ok
    8. p.p.s if css/js not load:
      • for IIS need change chmod "min" folder
      • go min/config.php
      • found $min_documentRoot = substr(__FILE__, 0, -15);
      • change it like $min_documentRoot = "c:\\xampp\\htdocs\\ws_for_mcmmo_folder";
      • its your path if you used windows, or '/home/accountname/public_html' if linux
    Upgrade:

    1. upload & rewrite all files except config.php
    2. chmod 666 for all .json files on folder "data" if needed
    3. testing and comment
    Changelog:

    Show Spoiler

    v0.5
    • perfomance relise & secure
    • add index_ajax.php for all ajax request
    • add posible gzip compression for css/js (minify_2.1.4_beta)
    • add cache images and others to .htaccess
    • add google charts :D (ideas?)
    • need mining > 0 for adding to table
    • now limit 1000 users whith biggest mining skill
    • fix some html errors
    v0.4

    v 0.3:

    • add icons & tooltips
    • some fixes
    • fixed "zebra"
    • fixed width
    • remove page "users" & add it to popup on click name
    v 0.2: (need chmod 666 for all .json files on folder "data")

    • add powerlevel
    • some bugfix
    • some cleanups
    • compare php version
    • add config (time_cache, prefix)
    v 0.1:

    • initial relise
    • caching 120s
    • json data for API
    • list users and skills


    TODO:
    • better functional
    • chek all variants for work
    • party(?)
    • search functional
    • fix some css errors
    • cache not only json
    • add weeks ratings and all for it
    • tool tips
    • charts and other graf
    • add power level
    P.S. Waite for your comments and sorry for my english )

    working for food, writing sites to order :)
    if you want remove or replace my copyright do this:
    open js / tooltips.js and remove
    $("#first").append(reclam_text);
    $("#second").append(reclam_text);
     
    FaeDine likes this.
  2. Offline

    returnzork

  3. Offline

    nossr50

    Added to mcMMO topic :)
     
  4. Offline

    msw1

    Great! I hope you can get this for SQLite.
     
  5. Offline

    Kiborgik

    1. redownload pls http://dl.dropbox.com/u/27762376/ws_for_mcmmo_work_v01.zip
    2. chek uploads all file
    3. chek php 5.2+ (for json)
    And pls give me your error.log

    mcMMO use SQLite?

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

    msw1

    Well I might be being a noob here, but 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 probably.
     
  7. Offline

    Kiborgik

    flatfile...ok i understand
     
  8. Offline

    Taner

  9. Offline

    Kiborgik

    "." crashed all )) i fix it - try
     
  10. Offline

    Monk3y

    Code:
    - move files to web-folder
    - edit begin of index.php
    - chmod 777 "data"
    - cake? )
    installation is a little vague do i install this to my website or is run in the pluggings folder in bukkit server O.O
     
  11. Offline

    Willobe

    Can you put in a Total Power Lvl as well (adding up all the skill = pl)
     
  12. Offline

    Kiborgik

    web-server
    yes, it's work on you website?
     
  13. Offline

    Willobe

    Yep it works just fine. just would like a PL

    also maybe ... if your bored... lol... make to where you can select what stats to show.

    like have a checkbox Or Dropdown list that you can click select to add/remove from Shown
    maybe add a user name search function (though i dont need it some might ;p)
     
  14. Offline

    Kiborgik

    i think about search function and some else functions, in next update i add it
     
  15. Offline

    FrostyWolf

    I have edited this line:
    $ws->connect('stuff', 'password', 'stuff', 'localhost');
    To match my MySQL database, yet its still pulling YOUR stats somehow:
    http://frostywolf.com/stats/index.php
     
  16. Offline

    Kiborgik

  17. Offline

    FrostyWolf

    That did the trick, I see a couple of issues tho:
    1) http://frostywolf.com/stats/index.php - chat1410 last logon date is December 31, 1969, 7:00 pm for some reason. He has been on recently.
    2) If your web browser isn't sized wide enough while on the user skills tab, it gets really ugly.
    3) Whats with random people having null for party? I have the party part of McMMO disabled, is there anyway to take it off the chart?
     
  18. Offline

    Kiborgik

    1) I only working whith mysql table - not create or changed it ) write to mcMMO
    2) 1100 min, i see, but i am a web-programmist, not designer, you can delete some tabs of skill or do smaller font
    3) ok i can fix it or delete - i think about
     
  19. Offline

    FrostyWolf

    No problem! You did a great job, I love it. I was just pointing out some things I noticed. All in all, I like it a lot and so does everyone on the server.
     
  20. Offline

    Monk3y

    MySQL Error!
    ------------------------

    The Error returned was:
    Table 'modtv_war-room.mcmmo_users' doesn't exist

    Error Number:
    1146


    SELECT * FROM `mcmmo_users` WHERE `user`!=''




    im sorry im newbish at mysql i thought the table would be automatically created do i have to create the table if so what veriables to i put in :/ your welcome to my admin psw because im so lost right now lol
     
  21. Offline

    Plague

  22. Offline

    Monk3y

    mod must be bored...... anywho the given php did not create a table what tables are needed :/
     
  23. Offline

    Kiborgik

    what do you mean? mcmmo dosnt create table? you change config file to mysql?
     
  24. Offline

    Monk3y

    there is an index file but there is no config file that i know of do i have to run the pluggin first to get the config ?
     
  25. Offline

    Kiborgik

    i mean config file for mcMMO - enable mysql mode on it, than go to game and type /mmoupdate, and cheking "mcmmo_" tables on phpmyadmin
    pls set chmod 666 for .json files on "data" folder
     
  26. Offline

    Monk3y

    there is a properties file for mcmmo but no config file O.O
     
  27. Offline

    Kiborgik

    no matter ) chek properties file and dont forget a chmod 666 for json files
     
  28. Offline

    Monk3y

    i hate to be such a bother but i see nothing that says mysql in the config file
    Code:
    #==McMMO Configuration==
    #You can turn off excavation loot tables by turning the option to false
    #You can customize mcMMOs command names by modifying them here as well
    #This is an early version of the configuration file, eventually you'll be able to customize messages from mcMMO and XP gains
    #Mon May 02 18:43:59 EDT 2011
    /whois=whois
    canExcavateApples=true
    /mcability=mcability
    repairXpModifier=2
    /party=party
    /stats=stats
    serratedStrikeCooldown=240
    gigaDrillBreakerCooldown=240
    skullSplitterCooldown=240
    abilityDurabilityLoss=2
    canExcavateEggs=true
    toolsLoseDurabilityFromAbilities=true
    archeryXpModifier=2
    feathersConsumedByChimaeraWing=10
    /mmoedit=mmoedit
    /mctop=mctop
    axesXpModifier=2
    /accept=accept
    superBreakerCooldown=240
    herbalismXpModifier=2
    /ptp=ptp
    berserkCooldown=240
    /mcc=mcc
    xpGainMultiplier=1
    excavationXpModifier=2
    pvp=true
    woodcuttingRequiresAxe=true
    canExcavateMushrooms=true
    anvilMessages=true
    canExcavateCocoaBeans=true
    canExcavateGlowstone=true
    /setmyspawn=setmyspawn
    canExcavateSulphur=true
    repairDiamondLevel=50
    /invite=invite
    greenTerraCooldown=240
    woodcuttingXpModifier=2
    unarmedXpModifier=2
    canExcavateSlowSand=true
    canExcavateDiamond=true
    /clearmyspawn=clearmyspawn
    /myspawn=myspawn
    /mcmmo=mcmmo
    canExcavateMusic=true
    treeFellerCooldown=240
    canExcavateNetherrack=true
    acrobaticsXpModifier=2
    pvpXpRewardModifier=1
    miningXpModifier=2
    /mcitem=mcitem
    /addxp=addxp
    globalXpModifier=1
    /mcgod=mcgod
    mySpawnClearsInventory=true
    miningRequiresPickaxe=true
    tamingXpModifier=2
    canExcavateCake=true
    archeryFireRateLimit=true
    /mcrefresh=mcrefresh
    gravelToClay=true
    canExcavateBones=true
    pvpGivesXP=true
    swordsXpModifier=2
    
     
  29. Offline

    Kiborgik

    Code:
    MySQL Instructions (OPTIONAL)
    (MySQL is COMPLETELY optional, however it is recommended as it will improve server performance!)
    Theres 5 settings in the configuration file you will need to change
    MySQL DB Name - Put your DB name here
    MySQLServer - Put IP here
    MySQLdbPass - Password for MySQL here
    MySQLuserName - User name for MySQL here
    UseMySQL - Change this to true
    Then start your server and it should be running in MySQL mode, check the server console for any errors. If you see no errors, its working.
     
    Converting Users from Flat File to MySQL
    Right now this is handled by an in game command, let me know if you'd want this to be a server command. Assign the 'mcmmo.admin' permission to yourself and go in game and type '/mmoupdate'. This will begin the update process. It will inform you when it starts and finishes. Once its done everyones stats should immediately be updated with no need to restart the server or have users rejoin. You can check the server console to see a debug message of how many items were added/updated to the MySQL DB to see if it went well.
    
    -Note-
    This conversion works cumulatively for users that were currently in the DB, if they have stats they've gained their old stats will be added on to their current stats. So running this command more than once is not recommended unless something went wrong.
    
    use last 1.05 version
     
  30. Offline

    Leemur

    wonderful table.. I love it..
    but I am newbie in SQL.. I have installed SQL especially for this..
    what I need to change in index.php besides
    $ws->connect('root', 'mypassword', 'test', 'localhost'); ?

    what means database ("test") for this table?

    MySQL Error!
    ------------------------

    The Error returned was:
    Table 'test.mcmmo_users' doesn't exist

    Error Number:
    1146

    SELECT * FROM `mcmmo_users` WHERE `user`!=''

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

Share This Page