MyBB Ideas

The MyBB Ideas site allows users to suggest new features and changes in MyBB and the MyBB Group to easily review them to decide what direction MyBB should head in. Search existing ideas.

Plugin Autoupload System

Voting Closed
4 votes

Submitted by Josh H., 1st November 2011, 2:44:54 AM

While the MyBB plugins system is already very strong, I just wanted to suggest a feature that I know is quite "iffy"...

One thing I love about Wordpress is that you can give it FTP details and it will automatically install the plugin for you. Sure, uploading to a few folders isn't too hard, but I hate having to break out a full computer to just open FileZilla and upload (I am often on my iPad).

This touch would be very nice and would make MyBB almost perfect (I can't say perfect, because there's always room for improvement).

I wish I could say I knew some code for this feature, but I don't.

EDIT: I have some BASIC code below, along with many references to PHP FTP functions (part finished)...

3 Comments

  1. I would actually like this idea, sort of like how they list the plugins for you right now, but instead of linking them, have a "one-click install" option.

    Revenger, 1st November 2011, 10:23:26 PM
  2. I apologize for the number of links that will follow in this post, however, I feel that they contribute to the feasibility of the idea.

    Exactly. If the MyBB team wants some references:
    http://php.net/manual/en/book.ftp.php talks a lot about PHP FTP functions.

    Ftp_put would take a remote file and store it in a location
    http://www.php.net/manual/en/function.ftp-put.php

    Up a dir (cdup): http://www.php.net/manual/en/function.ftp-cdup.php
    Down a dir (chdir): http://www.php.net/manual/en/function.ftp-chdir.php
    Close connection (close): http://www.php.net/manual/en/function.ftp-close.php
    CHMOD (chmod): http://www.php.net/manual/en/function.ftp-chmod.php
    Delete file (delete): http://www.php.net/manual/en/function.ftp-delete.php
    Remove dir (would pertain more to an uninstall process)(rmdir): http://www.php.net/manual/en/function.ftp-rmdir.php
    SSL Connect (ssl_connect): http://www.php.net/manual/en/function.ft...onnect.php
    Rename a file/dir (rename): http://www.php.net/manual/en/function.ftp-rename.php

    [tbe]

    Say there was a simple plugin with a single plugin file, then you might be able to use:
    <?php
    $server = (some POST data the user enters);
    $user = (another input);
    $ftppas = (password input);
    $connection = ftp_connect($server) or die("Could not connect to the server");
    if(@ftp_login($connection, $user, $pass))
    { echo "Connected Successfully";
    (continue placing files --- will try and add more tomorrow... Getting too late)

    }
    ?>

    As a side note: the chmod function could be used in the install process when a newbie doesn't chmod stuff correct. It could also be used to create better security (make config.php 444 instead of 644 automatically---after install, not during lulz)

    Josh H., 2nd November 2011, 5:32:31 AM