WordPress.org

Plugin Directory

Changeset 611199


Ignore:
Timestamp:
10/11/12 23:48:26 (19 months ago)
Author:
Ipstenu
Message:

tagging version 1.2

Location:
dreamobjects/tags/1.2
Files:
10 edited
1 copied

Legend:

Unmodified
Added
Removed
  • dreamobjects/tags/1.2/admin/backups.php

    r604805 r611199  
    3636                <div id="icon-dreamobjects" class="icon32"></div> 
    3737                <h2><?php _e("Backups", dreamobjects); ?></h2> 
     38 
     39<?php if ( get_option('dh-do-key') && get_option('dh-do-secretkey') ) : ?> 
    3840                 
    3941                <p><?php _e("Configure your site for backups by selecting your bucket, what you want to backup, and when.", dreamobjects); ?></p> 
     
    4850    <tbody> 
    4951 
    50 <?php if ( get_option('dh-do-key') && get_option('dh-do-secretkey') ) : ?> 
    5152                        <?php 
    5253                            $s3 = new S3(get_option('dh-do-key'), get_option('dh-do-secretkey'));  
     
    6263                            </select> 
    6364            <p class="description"><?php _e('Select from pre-existing buckets.', dreamobjects); ?></p> 
    64             <?php if ( get_option('dh-do-bucketcdn') && ( !get_option('dh-do-bucketcdn') || (get_option('dh-do-bucketcdn') != "XXXX") ) ) {  
    65                 $alreadyusing = sprintf(__('You are current using the bucket "%s" for CDN. While you can reuse this bucket, it would be best not to.', dreamobjects), get_option('dh-do-bucket')  ); 
     65            <?php if ( get_option('dh-do-bucketup') && ( !get_option('dh-do-bucketup') || (get_option('dh-do-bucketup') != "XXXX") ) ) {  
     66                $alreadyusing = sprintf(__('You are current using the bucket "%s" for Uploads. While you can reuse this bucket, it would be best not to.', dreamobjects), get_option('dh-do-bucket')  ); 
    6667                echo '<p class="description">' . $alreadyusing . '</p>'; 
    6768            } ?>             
     
    7071        </tr> 
    7172 
    72 <?php if ( get_option('dh-do-bucket') && (get_option('dh-do-bucket') != "XXXX") && !is_null(get_option('dh-do-bucket')) ) : ?> 
     73<?php  // BEGIN Show Bucket List  
     74if ( get_option('dh-do-bucket') && (get_option('dh-do-bucket') != "XXXX") && !is_null(get_option('dh-do-bucket')) ) :?> 
    7375 
    7476        <tr valign="top"> 
     
    107109            <?php } // Show next scheduled ?> 
    108110        </td> 
    109         </tr> 
    110  
    111 <?php endif; // Show backup settings ?> 
    112          
    113 <?php endif; // Show bucket list ?> 
     111        </tr>         
     112<?php endif;  
     113// ENDS how bucket list ?> 
    114114</tbody> 
    115115</table> 
     
    143143                    </ul> 
    144144                </div> 
    145             </div> 
    146145 
    147146            <form method="post" action="admin.php?page=dreamobjects-menu-backup&backup-now=true"> 
     
    165164        ?><p><?php _e('Until you connect to a bucket, you can\'t see anything here.', dreamobjects); ?></p><?php 
    166165        } 
     166 
     167else: 
     168 
     169?><p><?php _e("Please fill in your Access Key and Secret Key. You cannot use the rest of this plugin without those!", dreamobjects); ?></p><?php 
     170 
     171endif; // Show backup settings 
     172 
     173?> 
     174            </div> 
  • dreamobjects/tags/1.2/admin/defines.php

    r604806 r611199  
    3131 
    3232 
     33add_theme_support( 'hybrid-core-shortcodes' ); 
     34 
     35// Shortcode 
     36if ( get_option('dh-do-bucketup') && (get_option('dh-do-bucketup') != "XXXX") && !is_null(get_option('dh-do-bucketup')) ) { 
     37    include_once( PLUGIN_DIR . '/lib/shortcode.php'); 
     38} 
    3339// The Help Screen 
    3440function dreamhost_dreamobjects_plugin_help() { 
     
    4551add_action('dh-do-backup', array('DHDO', 'backup')); 
    4652add_action('dh-do-backupnow', array('DHDO', 'backup')); 
     53add_action('dh-do-upload', array('DHDO', 'uploader')); 
    4754 
    4855add_action('init', array('DHDO', 'init')); 
  • dreamobjects/tags/1.2/admin/help.php

    r604805 r611199  
    8989    } 
    9090 
    91  
     91// Uploader Page 
     92if ($screen->id == 'dreamobjects_page_dreamobjects-menu-uploader') { 
     93     
     94    // Base Help 
     95    $screen->add_help_tab( array( 
     96        'id'      => 'dreamobjects-menu-backup-base', 
     97        'title'   => __('Overview', 'dreamobjects'), 
     98        'content' =>  
     99        '<h3>' . __('DreamObjects Uploader', 'dreamobjects') .'</h3>' . 
     100        '<p>' . __( 'The basic uploader allows you to upload files via WordPress to your DreamObjects buckets. It is not as fast as using a client like CyberDuck, but is very useful in a pinch.', 'dreamobjects' ) . '</p>' . 
     101        '<p>' . __( 'By default all uploads are public. If the admin has checked the box for private uploads, they will become private and the provided URL will not work.', 'dreamobjects' ) . '</p>' 
     102      )); 
     103    } 
    92104else 
    93105    return; 
  • dreamobjects/tags/1.2/admin/messages.php

    r604805 r611199  
    2323 
    2424 
    25     function newBucketWarning() { 
    26         echo "<div id='message' class='error'><p><strong>".__('You need to select a valid bucket.', dreamobjects)."</strong> ".__('If you tried to create a new bucket, it may have been an invalid name.', dreamobjects)."</p></div>"; 
    27     } 
    28  
    2925    function updateMessage() { 
    3026        echo "<div id='message' class='updated fade'><p><strong>".__('Options Updated!', dreamobjects)."</strong></p></div>"; 
    3127        } 
     28 
    3229    function backupMessage() { 
    3330       $timestamp = wp_next_scheduled( 'dh-do-backupnow' ); 
     
    3532       echo "<div id='message' class='updated fade'><p><strong>".$string."</strong></p></div>"; 
    3633        } 
     34 
     35    function uploaderMessage() { 
     36        echo "<div id='message' class='updated fade'><p><strong>".__('Your file was successfully uploaded.', dreamobjects)."</strong></p></div>"; 
     37        } 
     38         
     39    function uploaderError() { 
     40        echo "<div id='message' class='error fade'><p><strong>".__('Error: Something went wrong while uploading your file.', dreamobjects)."</strong></p></div>"; 
     41        } 
  • dreamobjects/tags/1.2/admin/settings.php

    r604805 r611199  
    6161 
    6262<p class="submit"><input class='button-primary' type='Submit' name='update' value='<?php _e("Update Options", dreamobjects); ?>' id='submitbutton' /></p> 
     63                </form> 
     64                 
     65<?php if ( get_option('dh-do-key') && get_option('dh-do-secretkey') ) : ?> 
    6366 
    64                 </form> 
     67    <h3><?php _e('Buckets', dreamobjects); ?></h3> 
     68     
     69    <?php 
     70    $s3 = new S3(get_option('dh-do-key'), get_option('dh-do-secretkey'));  
     71    $buckets = $s3->listBuckets(); 
     72 
     73    if ( !empty($buckets) ) : 
     74        foreach ( $buckets as $b ) : 
     75            echo "<li>".$b; 
     76            if ( $b == get_option('dh-do-bucket') )  
     77                {$string = ' <strong>'. __(' - Used for Backups', dreamobjects).'</strong>'; 
     78                echo $string;} 
     79            elseif ( $b == get_option('dh-do-bucketup') )  
     80                {$string = ' <strong>'. __(' - Used for Uploads', dreamobjects).'</strong>'; 
     81                echo $string; 
     82                } 
     83            else 
     84                {_e(' - Unused', dreamobjects);} 
     85            echo "</li>"; 
     86        endforeach; 
     87    endif; 
     88     
     89    ?> 
     90  
     91    <h3><?php _e('Create A New Bucket', dreamobjects); ?></h3> 
     92 
     93    <p><?php _e('If you need to create a new bucket, just enter the name and click Create Bucket. All buckets are created as private.', dreamobjects); ?></p> 
     94    <form  method="post" action="options.php"> 
     95        <input type="hidden" name="action" value="update" /> 
     96        <?php wp_nonce_field('update-options'); ?> 
     97        <input type="text" name="do-do-new-bucket" id="new-bucket" value="<?php echo $_GET['do-do-new-bucket']; ?>" /> 
     98        <p class="submit"><input class='button-secondary' type='Submit' name='backup' value='<?php _e("Create Bucket", dreamobjects); ?>' id='submitbutton' /></p> 
     99    </form> 
     100    <?php 
     101     
     102else: 
     103 
     104    ?><p><?php _e("Please fill in your Access Key and Secret Key. You cannot use the rest of this plugin without those!", dreamobjects); ?></p><?php 
     105 
     106endif; // Show backup settings 
     107?> 
     108            </div> 
  • dreamobjects/tags/1.2/admin/uploader.php

    r604807 r611199  
    2121    die(); 
    2222} 
     23 
     24include_once( PLUGIN_DIR. '/lib/S3.php'); 
     25?> 
     26 
     27<script type="text/javascript"> 
     28    var ajaxTarget = "<?php echo self::getURL() ?>uploader.ajax.php"; 
     29    var nonce = "<?php echo wp_create_nonce('dreamobjects'); ?>"; 
     30</script> 
     31 
     32<div class="wrap"> 
     33    <div id="icon-dreamobjects" class="icon32"></div> 
     34    <h2><?php _e("Uploads", dreamobjects); ?></h2> 
     35     
     36    <p><?php _e("Upload files directly to DreamObjects.", dreamobjects); ?></p> 
     37 
     38<?php if ( get_option('dh-do-key') && get_option('dh-do-secretkey') ) : // If the keys are set (standard check) 
     39 
     40    if (current_user_can('manage_options') ) { 
     41?> 
     42    <h3><?php _e('Settings', dreamobjects); ?></h3> 
     43    <form method="post" action="options.php"> 
     44        <input type="hidden" name="action" value="update" /> 
     45        <?php wp_nonce_field('update-options'); ?> 
     46        <input type="hidden" name="page_options" value="dh-do-bucketup,dh-do-uploadpub" /> 
     47 
     48<table class="form-table"> 
     49    <tbody> 
     50<?php 
     51    $s3 = new S3(get_option('dh-do-key'), get_option('dh-do-secretkey'));  
     52    $buckets = $s3->listBuckets(); 
     53?> 
     54        <tr valign="top"> 
     55            <th scope="row"><label for="dh-do-bucketup"><?php _e('Bucket Name', dreamobjects); ?></label></th> 
     56            <td><select name="dh-do-bucketup"> 
     57                                    <option value="XXXX">(select a bucket)</option> 
     58        <?php foreach ( $buckets as $b ) : ?> 
     59<option <?php if ( $b == get_option('dh-do-bucketup') ) echo 'selected="selected"' ?>><?php echo $b ?></option> 
     60        <?php endforeach; ?> 
     61    </select> 
     62            <p class="description"><?php _e('Select from your pre-existing buckets.', dreamobjects); ?></p> 
     63            <?php if ( get_option('dh-do-bucket') && ( !get_option('dh-do-bucket') || (get_option('dh-do-bucket') != "XXXX") ) ) {  
     64                $alreadyusing = sprintf(__('You are already using the bucket "%s" for backups. While you can reuse this bucket, it would be best not to.', dreamobjects), get_option('dh-do-bucket')  ); 
     65                echo '<p class="description">' . $alreadyusing . '</p>'; 
     66            } ?>             
     67            </td> 
     68        </tr> 
     69         
     70        <tr valign="top"> 
     71            <th scope="row"><label for="dh-do-uploadpub"><?php _e('Privacy', dreamobjects); ?></label></th> 
     72            <td><input type="checkbox" name="dh-do-uploadpub" id="dh-do-uploadpub" value="1" <?php checked( '1' == get_option('dh-do-uploadpub') ); ?> /> <?php _e('Private Uploads', dreamobjects); ?> 
     73            <p class="description"><?php _e('Designate if your uploads are public or private. If checked, all uploads are private. Be advised, the links to your uploads below will not work publically if you chose this.', dreamobjects); ?></p></td> 
     74        </tr> 
     75</tbody> 
     76</table> 
     77 
     78<p class="submit"><input class='button-primary' type='Submit' name='update' value='<?php _e("Update Options", dreamobjects); ?>' id='submitbutton' /></p> 
     79    </form> 
     80<?php } 
     81 
     82endif; // Manage Options ?> 
     83 
     84<?php if ( get_option('dh-do-bucketup') && (get_option('dh-do-bucketup') != "XXXX") && !is_null(get_option('dh-do-bucketup')) ) : ?> 
     85    <h3><?php _e('Upload File', dreamobjects); ?></h3> 
     86 
     87<table class="form-table"> 
     88    <tbody> 
     89        <tr> 
     90        <tr valign="top"> 
     91            <td> 
     92            <p><?php _e('Please select a file by clicking the \'Browse\' button and press \'Upload\' to start uploading your file.', dreamobjects); ?></p> 
     93            <form action="" method="post" enctype="multipart/form-data" name="uploader" id="uploader"> 
     94              <input name="theFile" type="file" /> 
     95              <input name="Submit" type="submit" value="Upload"> 
     96            </form> 
     97            </td> 
     98        </tr> 
     99     </tbody> 
     100</table>        
     101 
     102<div id="uploaders"> 
     103<h3><?php _e('Available Files', dreamobjects); ?></h3> 
     104 
     105<p><?php _e('The files listed below are all linked using the public URL. If an image has been uploaded with \'private\' permissions, it will not display for anyone, not even you.', dreamobjects); ?></p> 
     106 
     107<?php if (current_user_can('manage_options') ) { 
     108    ?><p><?php _e('To publically display the list of uploaded files, use the shortcode <code>[dreamobjects]</code> in a post or page. It will show the same list as you see below to any site visitor.', dreamobjects); ?></p><?php 
     109} ?> 
     110 
     111    <ul><?php  
     112        if ( get_option('dh-do-bucketup') && (get_option('dh-do-bucketup') != "XXXX") && !is_null(get_option('dh-do-bucketup')) ) { 
     113            $s3 = new S3(get_option('dh-do-key'), get_option('dh-do-secretkey')); 
     114            $bucket = get_option('dh-do-bucketup'); 
     115                if (($uploads = $s3->getBucket( $bucket ) ) !== false) { 
     116                    krsort($uploads); 
     117                    foreach ($uploads as $object) { 
     118                           $object['label'] = sprintf(__('Uploaded on %s', dreamobjects), get_date_from_gmt( date('Y-m-d H:i:s', $object['time']) , 'F j, Y h:i a' ) ); 
     119                        ?><li><a href="https://objects.dreamhost.com/<?php echo $bucket .'/'. $object[name]; ?>"><?php echo $object['name']; ?></a> - <?php echo $object['label']; ?></li><?php 
     120                    } 
     121                } 
     122        } // if you picked a bucket 
     123                    ?> 
     124     </ul> 
     125</div> 
     126<?php endif; // if bucketup ?> 
     127 
     128</div> 
  • dreamobjects/tags/1.2/dreamobjects.php

    r604807 r611199  
    55Plugin URI: https://github.com/Ipstenu/dreamobjects 
    66Description: Integrate your WordPress install with DreamHost DreamObjects 
    7 Version: 1.1 
     7Version: 1.2 
    88Author: Mika Epstein 
    99Author URI: http://ipstenu.org/ 
     
    3838 
    3939    function init() { 
     40        // SCHEDULER 
    4041        if ( isset($_POST['dh-do-schedule']) ) { 
    4142            wp_clear_scheduled_hook('dh-do-backup'); 
     
    4445            } 
    4546        } 
    46         if ( isset($_POST['dh-do-newbucket']) && !empty($_POST['dh-do-newbucket']) ) { 
    47             include_once(PLUGIN_DIR . '/lib/S3.php'); 
    48             $_POST['dh-do-newbucket'] = strtolower($_POST['dh-do-newbucket']); 
    49             $s3 = new S3(get_option('dh-do-key'), get_option('dh-do-secretkey'));  
    50             $s3->putBucket($_POST['dh-do-newbucket']); 
    51             $buckets = $s3->listBuckets(); 
    52             if ( is_array($buckets) && in_array($_POST['dh-do-newbucket'], $buckets) ) { 
    53                 update_option('dh-do-bucket', $_POST['dh-do-newbucket']); 
    54                 $_POST['dh-do-bucket'] = $_POST['dh-do-newbucket']; 
    55             } else { 
    56                 update_option('dh-do-bucket', false); 
    57             } 
    58         } 
    59         if ( get_option('dh-do-secretkey') && get_option('dh-do-key') && ( !get_option('dh-do-bucket') || (get_option('dh-do-bucket') == "XXXX") ) && $_GET['page'] == 
    60 'dreamobjects-menu-backup' ) add_action('admin_notices', array('DHDO','newBucketWarning')); 
    61  
     47 
     48        // CREATE NEW BUCKET 
     49        if ( isset($_POST['do-do-new-bucket']) && !empty($_POST['do-do-new-bucket']) ) { 
     50           include_once 'lib/S3.php'; 
     51            $_POST['do-do-new-bucket'] = strtolower($_POST['do-do-new-bucket']); 
     52            $s3 = new S3(get_option('dh-do-key'), get_option('dh-do-secretkey')); 
     53            if ($s3->putBucket($_POST['do-do-new-bucket'])) 
     54               {add_action('admin_notices', array('DHDO','newBucketMessage'));} 
     55            else 
     56               {add_action('admin_notices', array('DHDO','newBucketError'));} 
     57           } 
     58        
     59        // UPLOADER 
     60        if( isset($_POST['Submit']) && isset($_FILES['theFile']) && $_GET['page'] == 
     61'dreamobjects-menu-uploader' ){ 
     62              $fileName = $_FILES['theFile']['name']; 
     63              $fileTempName = $_FILES['theFile']['tmp_name']; 
     64              $fileType = $_FILES['theFile']['type']; 
     65               
     66               
     67              require_once('lib/S3.php'); 
     68              $s3 = new S3(get_option('dh-do-key'), get_option('dh-do-secretkey')); 
     69              if ( get_option('dh-do-uploadpub') != 1 ) 
     70                  {if ($s3->putObjectFile($fileTempName, get_option('dh-do-bucketup'), $fileName, S3::ACL_PUBLIC_READ, array(),$fileType)) 
     71                      {add_action('admin_notices', array('DHDO','uploaderMessage'));} 
     72                  else 
     73                      {add_action('admin_notices', array('DHDO','uploaderError'));}    
     74                  } 
     75              else 
     76                  {if ($s3->putObjectFile($fileTempName, get_option('dh-do-bucketup'), $fileName, S3::ACL_PRIVATE, array(),$fileType)) 
     77                      {add_action('admin_notices', array('DHDO','uploaderMessage'));} 
     78                  else 
     79                      {add_action('admin_notices', array('DHDO','uploaderError'));}    
     80                  } 
     81 
     82        } 
     83         
     84        // Update messgae 
    6285        if ( isset($_GET['settings-updated']) && ( $_GET['page'] == 
    6386'dreamobjects-menu' || $_GET['page'] == 
    64 'dreamobjects-menu-backup' ) ) add_action('admin_notices', array('DHDO','updateMessage')); 
    65  
     87'dreamobjects-menu-backup' || $_GET['page'] == 
     88'dreamobjects-menu-uploader' ) ) add_action('admin_notices', array('DHDO','updateMessage')); 
     89 
     90        // Backup Noe 
    6691        if ( isset($_GET['backup-now']) && $_GET['page'] == 'dreamobjects-menu-backup' ) { 
    6792            wp_schedule_single_event( time()+60, 'dh-do-backupnow'); 
     
    6994        } 
    7095         
     96        // Backup Message 
    7197        if ( wp_next_scheduled( 'dh-do-backupnow' ) && ( $_GET['page'] == 
    7298'dreamobjects-menu' || $_GET['page'] == 
     
    77103 
    78104    // Messages (used by INIT) 
    79         function newBucketWarning() { 
    80         echo "<div id='message' class='error'><p><strong>".__('You need to select a valid bucket.', dreamobjects)."</strong> ".__('If you tried to create a new bucket, it may have been an invalid name.', dreamobjects)."</p></div>"; 
    81     } 
    82  
    83105    function updateMessage() { 
    84106        echo "<div id='message' class='updated fade'><p><strong>".__('Options Updated!', dreamobjects)."</strong></p></div>"; 
    85107        } 
     108 
    86109    function backupMessage() { 
    87110       $timestamp = wp_next_scheduled( 'dh-do-backupnow' ); 
    88        $string = sprintf( __('You have an ad-hoc backup scheduled for today at %s (time based on WP time/date settings).', dreamobjects), get_date_from_gmt( date('Y-m-d H:i:s', $timestamp) , 'h:i a' ) ); 
     111       $string = sprintf( __('You have an ad-hoc backup scheduled for today at %s (time based on WP time/date settings). Do not hit refresh!', dreamobjects), get_date_from_gmt( date('Y-m-d H:i:s', $timestamp) , 'h:i a' ) ); 
    89112       echo "<div id='message' class='updated fade'><p><strong>".$string."</strong></p></div>"; 
    90113        } 
    91114 
     115    function uploaderMessage() { 
     116        echo "<div id='message' class='updated fade'><p><strong>".__('Your file was successfully uploaded.', dreamobjects)."</strong></p></div>"; 
     117        } 
     118         
     119    function uploaderError() { 
     120        echo "<div id='message' class='error fade'><p><strong>".__('Error: Something went wrong while uploading your file.', dreamobjects)."</strong></p></div>"; 
     121        } 
     122 
     123    function newBucketMessage() { 
     124        echo "<div id='message' class='updated fade'><p><strong>".__('Your new bucket has been created.', dreamobjects)."</strong></p></div>"; 
     125        } 
     126         
     127    function newBucketError() { 
     128        echo "<div id='message' class='error fade'><p><strong>".__('Error: Unable to create bucket (it may already exist and/or be owned by someone else)', dreamobjects)."</strong></p></div>"; 
     129        } 
    92130 
    93131    // Return the filesystem path that the plugin lives in. 
     
    108146        $dreamhost_dreamobjects_settings_page = add_menu_page(__('DreamObjects Settings'), __('DreamObjects'), 'manage_options', 'dreamobjects-menu', array('DHDO', 'settings_page'), plugins_url('dreamobjects/images/dreamobj-color.png')); 
    109147        $dreamhost_dreamobjects_backups_page = add_submenu_page('dreamobjects-menu', __('Backups'), __('Backups'), 'manage_options', 'dreamobjects-menu-backup', array('DHDO', 'backup_page')); 
     148        $dreamhost_dreamobjects_uploader_page = add_submenu_page('dreamobjects-menu', __('Uploader'), __('Uploader'), 'upload_files', 'dreamobjects-menu-uploader', array('DHDO', 'uploader_page')); 
    110149        // $dreamhost_dreamobjects_cdn_page = add_submenu_page('dreamobjects-menu', __('CDN'), __('CDN'), 'manage_options', 'dreamobjects-menu-cdn', array('DHDO', 'cdn_page')); 
    111150    } 
     
    136175       // CDN Settings 
    137176        include_once( PLUGIN_DIR . '/admin/cdn.php'); 
     177    } 
     178 
     179    function uploader_page() { 
     180       // Upload Settings 
     181        include_once( PLUGIN_DIR . '/admin/uploader.php'); 
    138182    } 
    139183     
  • dreamobjects/tags/1.2/lib/wp-cli.php

    r604805 r611199  
    5959    public static function help() { 
    6060        WP_CLI::line( <<<EOB 
     61usage: wp dreamobjects [backup] 
     62 
     63    backup    run a backup now 
     64EOB 
     65    ); 
     66    } 
     67} 
     68 
     69/* Old 
    6170usage: wp dreamobjects [backup|schedule] 
    6271 
     
    6574    schedule  [daily|weekly|monthly|disable] 
    6675EOB 
    67     ); 
    68     } 
    69 } 
     76*/ 
  • dreamobjects/tags/1.2/readme.txt

    r604805 r611199  
    44Requires at least: 3.4 
    55Tested up to: 3.5 
    6 Stable tag: 1.1 
     6Stable tag: 1.2 
    77License: GPLv2 or later 
    88License URI: http://www.gnu.org/licenses/gpl-2.0.html 
     
    2020* Provides <a href="https://github.com/wp-cli/wp-cli#what-is-wp-cli">wp-cli</a> hooks to do the same 
    2121 
     22= Uploader = 
     23* Allows you to upload files to any bucket 
     24* Determine if files are public (default) or private 
     25* If configured, the shortcode <code>[dreamobjects]</code> will display a list of all your upload files 
     26 
    2227= To Do = 
    23 * Permit on-demand uploads/downloads 
    2428* CDN (when available) 
    2529 
     
    36401. Relax and let DreamHost do the work 
    3741 
     42= Uploader = 
     431. Pick your bucket 
     441. Upload a file to the bucket 
    3845 
    3946== Frequently asked questions == 
     
    4148= What does it do? = 
    4249 
    43 DreamObjects allows you to store your data securely, redundantly and inexpensively. The backup portion of this plugin will create a backup of your site, zip it, and toss it up into your DreamObjects bucket in an automated manner. 
     50DreamObjects connects your WordPress site to your DreamObjects cloud storage, allowing you to upload files directly to your cloud, or automatically store backups. 
    4451 
    4552= Do I have to use DreamHost? = 
     
    5562Yep! It actually sets it to run in 60 seconds, but works out the same. 
    5663 
     64= Who can upload files? = 
     65 
     66Anyone who can upload media can upload files, so this generally covers Authors and up. Only the Administrators can set the upload bucket, however. 
     67 
    5768= How do I use the CLI? = 
    5869If you have <a href="https://github.com/wp-cli/wp-cli#what-is-wp-cli">wp-cli</a> installed on your server (which DreamHost servers do), you can use the following commands: 
    5970 
    6071<pre>wp dreamobjects backup</pre> 
    61  
    62 While the schedule option shows, it doesn't fully work yet. Sorry. 
    6372 
    6473= Do you work for DreamHost? = 
     
    69781. DreamObjects Private Key 
    70791. Your DreamObjects Public Key 
     801. The Settings Page 
     811. The backup page 
     821. The uploader page 
     831. The uploader page, as seen by Authors 
    7184 
    7285== Changelog == 
    7386 
     87= Version 1.2 = 
     88Oct 11, 2012 by Ipstenu 
     89 
     90* Uploader added 
     91* Shortcode to list uploaded files added 
     92* Moved New Bucket code to the main settings page, where you can see your buckets now 
     93 
    7494= Version 1.1 = 
    75 <em>All minor changes, but since people had been using 1.0, I thought a kick was in order.</em> 
     95Sept 27, 2012 by Ipstenu <em>All minor changes, but since people had been using 1.0, I thought a kick was in order.</em> 
    7696 
    7797* Security (nonce, abspath, etc) 
     
    81101= Version 1 = 
    82102 
     103Sept 2012, by Ipstenu 
     104 
    83105* Forked <a href="http://wordpress.org/extend/plugins/wp-s3-backups/">WP S3 Backups</a> to work with DreamObjects. 
    84106* Upgraded <a href="http://undesigned.org.za/2007/10/22/amazon-s3-php-class">Amazon S3 PHP Class</a> to latest version 
  • dreamobjects/tags/1.2/uninstall.php

    r604805 r611199  
    2424// Deregister 
    2525 
    26 unregister_setting( 'dh-do-key', 'dreamobj_settings' ); 
    27 unregister_setting( 'dh-do-secretkey', 'dreamobj_settings' ); 
    28 unregister_setting( 'dh-do-bucket', 'dreamobj_settings' ); 
    29 unregister_setting( 'dh-do-section', 'dreamobj_settings' ); 
    30 unregister_setting( 'dh-do-schedule', 'dreamobj_settings' ); 
     26    if (is_multisite()) { 
     27        global $wpdb; 
     28        $blogs = $wpdb->get_results("SELECT blog_id FROM {$wpdb->blogs}", ARRAY_A); 
     29        if ($blogs) { 
     30            foreach($blogs as $blog) { 
     31                switch_to_blog($blog['blog_id']); 
     32 
     33                    unregister_setting( 'dh-do-backupsection', 'dreamobj_settings' ); 
     34                    unregister_setting( 'dh-do-bucket', 'dreamobj_settings' ); 
     35                    unregister_setting( 'dh-do-bucketcdn', 'dreamobj_settings' ); 
     36                    unregister_setting( 'dh-do-bucketup', 'dreamobj_settings' ); 
     37                    unregister_setting( 'dh-do-cdn', 'dreamobj_settings' ); 
     38                    unregister_setting( 'dh-do-key', 'dreamobj_settings' ); 
     39                    unregister_setting( 'dh-do-schedule', 'dreamobj_settings' ); 
     40                    unregister_setting( 'dh-do-secretkey', 'dreamobj_settings' ); 
     41                    unregister_setting( 'dh-do-section', 'dreamobj_settings' ); 
     42                    unregister_setting( 'dh-do-uploader', 'dreamobj_settings' ); 
     43                    unregister_setting( 'dh-do-uploadview', 'dreamobj_settings' ); 
     44            } 
     45            restore_current_blog(); 
     46        } 
     47    } else { 
     48        unregister_setting( 'dh-do-backupsection', 'dreamobj_settings' ); 
     49        unregister_setting( 'dh-do-bucket', 'dreamobj_settings' ); 
     50        unregister_setting( 'dh-do-bucketcdn', 'dreamobj_settings' ); 
     51        unregister_setting( 'dh-do-bucketup', 'dreamobj_settings' ); 
     52        unregister_setting( 'dh-do-cdn', 'dreamobj_settings' ); 
     53        unregister_setting( 'dh-do-key', 'dreamobj_settings' ); 
     54        unregister_setting( 'dh-do-schedule', 'dreamobj_settings' ); 
     55        unregister_setting( 'dh-do-secretkey', 'dreamobj_settings' ); 
     56        unregister_setting( 'dh-do-section', 'dreamobj_settings' ); 
     57        unregister_setting( 'dh-do-uploader', 'dreamobj_settings' ); 
     58        unregister_setting( 'dh-do-uploadview', 'dreamobj_settings' ); 
     59} 
Note: See TracChangeset for help on using the changeset viewer.