DCP - A Download control panel/tracker and Auto-updating class

Discussion in 'Resources' started by Kalman Olah, Jul 7, 2011.

Thread Status:
Not open for further replies.
  1. Offline

    cronikkk

    If i may add a suggestion,
    I think you should have a "Copy Link" button.

    This will copy the link to ur clipboard for a plugin.

    Example: Mine is iWarning
    It will show iWarning jar, version, downloads and then on the buttons maybe add a 5th that says Copy Link or something :D
     
  2. Offline

    Kalman Olah

    Will do. I'm currently rewriting it anyway. It may take a bit longer than expected though. I want to do it right :p.

    A preview of DCP v2.0.0 can be found here .
    I'm currently rewriting it to be more of an actual script, and less of a pile of code.
    The code will also be fully commented.

    Thoughts?

    The v2.0.0 won't be for today, sorry.
    EDIT: I'll still release it this week, but I've had to update like 3 plugins today so I didn't have a lot of time to work on DCP...

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

    Techwiz101

    Currently im getting OKLogger cannot be resolved.
    Other than that looks aweosome. :D
     
  4. Offline

    Kalman Olah

    My bad :p. Correct usage is like this:
    Code:
    public void onEnable(){
    
    String name = this.getDescription().getName();
    
    String version = this.getDescription().getVersion();
    
    String checklocation = "http://yoursite.com/check.php";
    
    String downloadlocation = "http://yoursite.com/dl.php";
    
    Logger log = Logger.getLogger("Minecraft");
    
    String logprefix = "[" + name + "] ";
    
    OKUpdater.update(name, version, checklocation, downloadlocation, log, logprefix);
    
    }
    v2.0.0 status:
    Theme: 75% done.
    Login system with IP banning based on incorrect logins: 100% done.
    Functions/includes/graphical resources: 90% done.
    Download tracker & adder: To be ported.

    I'm currently busy as hell, so I don't know how much work I'm going to get done this weekend.
     
  5. Offline

    Techwiz101

    Looks good, I'll try it in the morning.
    Also if I were to credit you for the DCP what link would you want me to have linked to you.
    Hope that makes sense.
     
  6. Offline

    Kalman Olah

    Just this thread's link will do :). http://forums.bukkit.org/threads/25141/ .
     
  7. Offline

    iffa

    Thanks to this I know how many people have the new version of StyxSpace. :p
     
  8. Offline

    Kalman Olah

  9. Offline

    iffa

  10. Offline

    Kalman Olah

    It wouldn't. It would work with x, x.x, x.x.x, x.x.x.x....

    Current login screen. Any suggestions?
    http://kalmanolah.net/files/cap.jpg

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

    DrAgonmoray

    The lock in the background should look different. The top curvy part of the lock should extend all the way to the left edge imo.
     
  12. Offline

    Kalman Olah

    That'll be hard seeing as how I didn't make these images :p.

    http://somerandomdude.com/projects/iconic/
     
  13. Offline

    DrAgonmoray

  14. Offline

    Kalman Olah

    So eh, how are your photoshopping skills? I'm not too good at making favicons...
    favicon.png
    Edit: Current admin index:
    cap3.jpg
     
  15. Offline

    cronikkk

    Looks awesome! Let me know when new version is released i def want it RIGHT away.
     
  16. Offline

    Kalman Olah

    I will :). Haven't really had time to work on it lately :(.
     
  17. Offline

    Daniel Heppner

    Why are my users downloading updated to the plugin even when there's no update available?
     
  18. Offline

    Kalman Olah

    Because you probably didn't set the version correctly.
    Make sure the versions in the control panel are in the x.x.x format. Make sure the version in your plugin.yml is correct. If you forgot to update the version number in the plugin.yml, this could happen.
    Also check if you are using the latest class file for the auto updater :).

    A good way to check what DCP thinks is the latest version is to go to http://<yoursite.com>/check.php?id=<yourDLname>

    It'll show you the latest version & filename for that DL.
     
  19. Offline

    Daniel Heppner

    Thanks. It's been sucking a lot of bandwidth. I think the problem is in my plugin.yml. (I actually have the version number in there automatically updated from Maven's pom.xml file.)
    UPDATE:
    All fixed!
     
  20. Offline

    Kalman Olah

    I don't use Maven myself. Hope you get it working, though :).
     
  21. Offline

    Daniel Heppner

    I had the outdated version number in Maven's pom file. It should be working now, though. I updated everything.
     
  22. Offline

    cronikkk

    You should definatley teach me javascript/jQuery or show me where you learned it. Been dying to learn how to do stuff like that.
     
  23. Offline

    Kalman Olah

    I actually just got into making shitty php websites using html templates without any books. Everything I know comes from looking up stuff I wanted done on google and copying tutorials found there and stuff. You'd be amazed at how well google works for stuff like that. I now am pretty much fluent in php and stuff, and I never even had to touch a book/eBook.

    EDIT: Just realized your question was about JS/jquery. I'm not going to lie to you and say I'm perfect at jQuery, because I'm not. A good way to learn jQuery is by example, assuming you already know a bit of js. I'm sure you can find loads of answered questions/code snippets for every possible jquery function/issue on stackoverflow.com .
     
  24. Offline

    cronikkk

    Alright. Thanks :)

    Do you have skype?

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

    Kalman Olah

    Yes, why?
     
  26. Offline

    cronikkk

    If i added you could you maybe help me with some jQuery stuff?
     
  27. Offline

    Kalman Olah

    Did you miss the part where I confessed I'm pretty bad at jQuery and just take other people's code snippets? :p
     
  28. Offline

    cronikkk

    oh lol yeah i guess I did.
     
  29. Offline

    Daniel Heppner

    Nevermind, not working.
    Here is the log: http://pastebin.com/96NDrsPR
    Here is the source: https://github.com/danielhep/NetherLiquids
    If you see in the log, you'll see that an IP will download it once and then update 5 times. My other plugin doesn't have this issue.
     
  30. Offline

    Kalman Olah

    This is not an issue with DCP. If the latest version in DCP is a newer version than the one in your plugin's plugin.yml file, the auto-updater will download the update once. If it's already in the /update/ folder, it won't download it again.
    A possible explanation is that the person is trying to move the updated .jar into his /plugins/ folder, but since the version in your plugin.yml is lower than the one in DCP, the auto-updater keeps downloading the same file.

    You can fix this by making sure the version in your plugin.yml matches the latest version in your DCP. You can check what the latest version is in DCP by visiting http://<yoursite.com>/check.php?id=<yourDLname> . This is the link the auto-updater checks. If the version in this file is higher than the one of your latest plugin.yml, make sure to edit it.

    Note: If you see an IP downloading the same thing multiple times at the same time, this means they are using a download accelerator to download your plugin. This does not apply to those downloads marked as minecraft updates.
     
Thread Status:
Not open for further replies.

Share This Page