[Web] SmartDownloads

Discussion in 'Bukkit Tools' started by lol768, Dec 16, 2012.

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

    lol768 Retired Staff

    Run ./clearAll.sh then goto setup.php

    Make sure you leave install_pending
  2. Offline


    Thanks man :)
    lol768 likes this.
  3. Offline



    Anyway i can credit you!?
  4. Offline

    lol768 Retired Staff

    Awesome :)

    Credit is not required in any way, but you could add a link to the footer if you wanted to :D
  5. Offline


    Will do!
  6. Offline

    lol768 Retired Staff


    How to patch SmartDownloads to accept any file type

    • Open uploadFile.php and comment out the following lines (26-28)
    if(!zipIsValid($_FILES['theUpload']['tmp_name'])) {
    "Bad format.");
    Don't just comment out the die statement, comment out the entire if statement.
    • Open files.php and find this code (lines 226-ish):
    if (str != "jar") {
    alert ("Unsupported file type");
    } else {
    • Change the above to this
    Alternatively, download the zip file below:

    hawkfalcon likes this.
  7. Offline


    Cool, thanks:)
    EDIT: lol768 It fails if there is no dbo image ;)
    EDIT 2: It fails always :p
    Warning: unlink(imageCache/full-pingooion.png) [function.unlink]: No such file or directory in /home/ihawk/public_html/hawkfalcon/imageFill.php on line 3
    Warning: unlink(imageCache/thumb-pingooion.png) [function.unlink]: No such file or directory in /home/ihawk/public_html/hawkfalcon/imageFill.php on line 4
    array(3) { [0]=> string(5) "00000" [1]=> NULL [2]=> NULL }
    Warning: Cannot modify header information - headers already sent by (output started at /home/ihawk/public_html/hawkfalcon/imageFill.php:3) in /home/ihawk/public_html/hawkfalcon/projectAdd.php on line 30
  8. Offline

    lol768 Retired Staff

    Ooh, whoops. Forgot about that part

    Change imageFill.php to
    <?php ?>

    And in index.php, change line 102 to <img src = "imageCache/full-<?php echo($slug); ?>.png" style = "float: left"/>

    It's up to you to add thumbnails and full images to the cache folder :)

    hawkfalcon likes this.
  9. Offline


    :p I even tried a valid slug and it failed.
  10. Offline

    lol768 Retired Staff

    After some discussion on IRC, TnT and the other staff have decided that linking to any SmartDownloads site from a DBO page, regardless of whether or not you include a disclaimer on the DBO page or the SmartDownloads page, is not permitted.

    I am personally in favor of this as there was a risk of backdoor code being present in linked dev build sites.
  11. Offline


  12. Offline


    inb4 smartdownloads is useless
  13. Offline

    lol768 Retired Staff

    It has a use - just not from DBO pages. It's no longer restricted to Bukkit as the tweaks above have removed that limitation. The issue is that it's difficult to see the source code and I might write a modification that automatically decompiles and displays the code which would hopefully make it a suitable site to link to. In the same way however, continuous integration links pose exactly the same risk and I'm not entirely sire why it seems this particular project is disallowed while Jenkins etc remain permitted. It's easy with Jenkins to setup an alternative directory where malicious code is stored and modify your build script so that it builds the malicious code instead of the actual real code.

    Regardless of reasoning, it is important to ensure that server admims are protected from backdoors and malicious code.
  14. Offline


    So did you fix the image bug?:p
  15. Offline

    lol768 Retired Staff

  16. Offline


  17. Offline

    lol768 Retired Staff

    On my todo list.
    hawkfalcon likes this.
  18. Offline


  19. Offline


    Will be using this soon!
  20. Offline

    chaseoes Retired Staff

  21. Offline

    lol768 Retired Staff

    This thread should probably be locked as this isn't compliant with BukkitDev policy.
  22. Offline


    Locked per author's request.
    C0nsole and tyzoid like this.
Thread Status:
Not open for further replies.

Share This Page