[Web] SmartDownloads

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

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

    lol768

    Run ./clearAll.sh then goto setup.php

    Make sure you leave install_pending
     
  2. Offline

    xGhOsTkiLLeRx

    Worked!
    Thanks man :)
     
    lol768 likes this.
  3. Offline

    ThedbCoders

    Installing...

    Anyway i can credit you!?
     
  4. Offline

    lol768

    Awesome :)

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

    ThedbCoders

    Will do!
     
  6. Offline

    lol768

    hawkfalcon

    How to patch SmartDownloads to accept any file type

    • Open uploadFile.php and comment out the following lines (26-28)
    PHP:
    if(!zipIsValid($_FILES['theUpload']['tmp_name'])) {
        die(
    "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):
    PHP:
    if (str != "jar") {
        
    alert ("Unsupported file type");
        $(
    this).val('');
    } else {
        $(
    '#photoCover').val($(this).val());
    }
    • Change the above to this
    PHP:
    $('#photoCover').val($(this).val());
    Alternatively, download the zip file below:

    [​IMG]
     
    hawkfalcon likes this.
  7. Offline

    hawkfalcon

    Cool, thanks:)
    EDIT: lol768 It fails if there is no dbo image ;)
    EDIT 2: It fails always :p
    Code:
    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

    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 :)

    format:
    full-slug.png
    thumb-slug.png
     
    hawkfalcon likes this.
  9. Offline

    hawkfalcon

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

    lol768

    Announcement
    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

    hawkfalcon

    O:
     
  12. Offline

    Sushi

    inb4 smartdownloads is useless
     
  13. Offline

    lol768

    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

    hawkfalcon

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

    lol768

  16. Offline

    hawkfalcon

  17. Offline

    lol768

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

    hawkfalcon

    :p
     
  19. Offline

    LaxWasHere

    Will be using this soon!
     
  20. Offline

    chaseoes

     
  21. Offline

    lol768

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

    np98765

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

Share This Page