LastSeen

Discussion in 'Archived: Plugin Requests' started by LaughingQuoll, Jul 14, 2014.

  1. Offline

    LaughingQuoll

    A plugin showing how long it's been since they last played on the server in a mysql database updating every minute but if the player is online it says ONLINE instead of the last seen time.
    No commands needed.
    No permissions needed.
    When done by: ASAP
     
  2. Offline

    lon_chaney

    LaughingQuoll Why not use Essentials? You can use /seen <playername> and it shows the last online time of that player, and if they are online or offline.
     
  3. Offline

    daavko

  4. Offline

    kps1796

    daavko
     
  5. Offline

    daavko

    kps1796 I see where he wants that data stored. I'm not blind. I meant where does he want it displayed. He could have signs saying:
    PlayerName
    TimeOffline/ONLINE
    Or command which does the same...or even scoreboards
     
  6. Offline

    kps1796

    daavko I was under the impression he just wanted it in a database to use in a website or something like that.
     
  7. Offline

    daavko

    kps1796 Oh well, that's also possible. Didn't think of that one.
     
  8. Offline

    LaughingQuoll

    daavko kps1796 I need this plugin to show on my website if a player is on or if their not on how long it was since they were last on.

    Bump

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

    LaughingQuoll

  10. Offline

    wesley009

    Oke so what I was thinking is a making a table with these columns:
    UUID(not null, unique, primary key) (to make sure it is the right player)
    UserName (not null) (not unique since players can change their names in the next update)
    LastSeen (just a string that gets updated every logon/logoff)
    IsOnline (boolean, to make sure LastSeen is not modified this is usefull on server crashes since it then cannot handle all the LastSeens)

    Only one question:
    Are you 100% sure your mysql database is reachable from your minecraft server and website?

    Also I can do the PHP if you want too (or even ASP.NET if you have/prefer that)

    Hope to hear back soon :)
     
  11. Offline

    LaughingQuoll

    wesley009 That would be fine. Thanks! Cant wait to see it in action on my website. As for the MySQL database I have other plugins using it. Its on a different host tho. :) Also i would prefer PHP. Also for the PHP script can u make it show how long it was since the player last joined? Eg: I left the game on the 21/7/2014 at 6:51 and it says I was last seen if the player was last on within a hour it says the minutes. If its been more than a hour it says the amount of hrs. If its longer than a day it says the amount of days. Same for weeks , months and years. Also can u make it say record the first time the player joined.

    Sorry if the above it a little confusing

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

    wesley009


    I will first finish the plugin and then I will make the site using Javascript/Jquery to make it easy to implement and also make it dynamic.

    I hope/plan to finish the plugin today and if I have enough time I will make the version 1 of the website (might become tomorrow tough)

    Also added the field: FirstSeen (registers when the player was first seen by the plugin, so on first logon after it is installed)
     
  13. Offline

    LaughingQuoll

    wesley009 can you please give me a guess at how long it will take?
     
  14. Offline

    wesley009

    Oke so I am this far:
    Plugin 99% done all that is left is some tweaking and testing
    Webstuff 60% done all I need is a easy way to implement it into people their sites

    Another question LaughingQuoll on what system does your website work (enjin, phpbb or an other one)?

    Also this is how it looks right now:
    User: wesley009
    Last seen: 7 minutes ago
    First seen: 43 minutes ago

    User: wesley009
    Online
    First seen: about an hour ago

    That is all I got for now, if anyone knows about a format that is easy to implement on every kind of website please tell me :)
     
  15. Offline

    LaughingQuoll

  16. Offline

    timtower Administrator Administrator Moderator

    wesley009 PHP is generally accepted on most systems. Entire website is running on php pages with bootstrap so should work.
     
  17. Offline

    LaughingQuoll

    timtower how did u know my whole website used PHP?
     
  18. Offline

    timtower Administrator Administrator Moderator

    Try <websiteurl>/index.php
    Or index.html
    Not that hard to be honest.
    And sometimes some asp
     
  19. Offline

    wesley009


    Yeah but if they use ASP.NET MVC it doesn't have any extentions it is just /home/index
    That is just one thing that is cool about MVC :3 (yeah I am a fanboy, my whole site is MVC5 driven)

    Also my question was more likely if he used some system like enjin, but he just uses plain php. All my plugin thing needs is its own php page and jquery (it will be able to load into any page thanks to jquery)
     
  20. Offline

    LaughingQuoll

    wesley009 I use plain PHP as you might know. Also will i be able to put the PHP code onto any page?
     
  21. Offline

    wesley009

    LaughingQuoll
    Well the plugin is done, the website thing is only an example. Here you find the devBukkit project.
    I hope it gets approved soon tough, when I am home I will see if it is approved or not, if not I will provide an external download location.

    Also if you want I can set it up on your website, or make the layout so you can put it in. Could you draw a sketch of how you want it too look? Or make an example in html?
     
  22. Offline

    LaughingQuoll

    wesley009 I just want a little line of text saying the information.

    wesley009 also can u just put a link to the files? I want to implement it asap

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

    wesley009

  24. Offline

    LaughingQuoll

    wesley009 can u make the first seen time format configerable aswell?

    wesley009 I did use your PHP script I found it a little comblicated so I used the PHP date feature instead.

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

    wesley009

    LaughingQuoll
    When you change the LastSeen format the firstseen will change with it
    You will need to clear your database for the firstseen to regenerate/take effect
     

Share This Page