The MU forums have moved to

Total Upload v2.0 (22 posts)

  1. sycophant
    Posted 17 years ago #


    I've taken the liberty (hope you don't mind Dr Mike) of creating a new version of the 'Total Upload Space Remaining' plugin.


    It offers some more configurability, and creates CSS based graphs.

  2. suleiman
    Posted 17 years ago #

    very coool...I'm using it on my site now :)

  3. sycophant
    Posted 17 years ago #

    And as quick as it arrived, it was gone.

    I have removed this plugin and replaced it with a better one!

    My new plugin Z-Space Upload Quotas replaces the functionality of both 'Upload Space' and 'Total Upload Space Remaining' and adds a pretty config interface to boot.

    It is 'Upload Space' aware and will recognise any upload space settings already setup with that plugin.

  4. suleiman
    Posted 17 years ago #

    we don't have a good link :(

  5. drmike
    Posted 17 years ago #

    Cool. :)

  6. sycophant
    Posted 17 years ago #

    Sorry, not sure what happened with that link...
    It is here

  7. JohnWeb
    Posted 17 years ago #

    Entering a different number for a users blog doesn't seem to override the system wide settings, they still get the error:

    Sorry, you have used your upload quota.
    Back to Image Uploading

    Which is different than the notice I see in your file, which leads me to believe that the original system and this new plugin don't work together, I could be wrong though!

  8. enseignement
    Posted 17 years ago #


    I've removed this from my mu-plugins directory, but my users still get an error "Sorry, you have used your upload quota."

    How could I solve this ?

  9. andrea_r
    Posted 16 years ago #

    Hate to bump, this is not working for me. At least not locally. No errors, no menu, no results spewed when i follow instructions.

  10. nims
    Posted 16 years ago #

    Z-Space Upload Quotas doesnt work for me with WPMU 1.2.3

    Is there any other plugin to control the amount of upload users can do.

  11. lunabyte
    Posted 16 years ago #

    Works fine for me.

  12. nims
    Posted 16 years ago #

    Looks like you r the lucky one Luna.

  13. new-net
    Posted 16 years ago #

    I just updated 1.2.1 to 1.2.3, and decided checking for some fresh plugins.

    I've installed z-space, and enabeld it in admin.php as suggested.

    At first the plugin seemed to work for the main blog, but after logging in with admin user on another blog, i get a nifty warning:

    Warning: Division by zero in
    /.../docs/wp-content/mu-plugins/847064238_z-space.php on line 148

    Note, the graph bar displays correctly, but the value is -0.16MB (i have about 160Kb text files on the blog)

    Which related to a division using $quota.

    Now i know i could/should turn warnings off, but isn't there a better way to fix this ?


  14. drmiketemp
    Posted 16 years ago #


    For those having issues with the Z-Space plugin (ie getting the division by zero errors every other time the Dashboard loads) the fix appears to be removing the Amanzi Upload Space bit near the beginning of the file. Should be lines 45 to 54:

    // Provide automatic transition from the Amanzi Upload Space plugin.
    		if (!$quota) {
    			$quota = get_blog_option($blog_id,"amanzi_upload_space");
    			// Let's upgrade now.
    			add_blog_option($blog, "space_manager_quota", $quota);
    			// Remove the old amanzi option.
    			delete_blog_option($blog, "amanzi_upload_space");

    Hope this helps,

  15. qrof
    Posted 16 years ago #

    Filters and actions have changed in 1.2.3+, so I have changed the code:

    line 41...

    // Replace quota check with our plugin.
    remove_filter("wp_handle_upload", "is_upload_too_big" );
    add_filter("wp_handle_upload", array('SpaceManager','filter_upload_dir_size'));

    remove_action( 'upload_files_upload', 'upload_is_user_over_quota' );
    remove_action( 'upload_files_browse', 'upload_is_user_over_quota' );
    remove_action( 'upload_files_browse-all', 'upload_is_user_over_quota' );
    add_action( 'upload_files_upload', array('SpaceManager','uploadCheck') );
    add_action( 'upload_files_browse', array('SpaceManager','uploadCheck') );
    add_action( 'upload_files_browse-all', array('SpaceManager','uploadCheck') );

    // Use wporg wp_upload_dir() filter
    //remove_filter( 'upload_dir', 'filter_upload_dir_size' );
    //add_filter( 'upload_dir', array('SpaceManager','filter_upload_dir_size') );

    // Add Blog Quota Setting
    add_filter('wpmueditblogaction', array('SpaceManager','blogSetting'));
    // Remove the Amanzi Upload Space setting - we'll automatically get the setting later if we need to.
    remove_filter('wpmueditblogaction', 'amanzi_upload_space_plugin');

    Also, changed the function uploadCheck:
    // 1.2.4 fix - wpmu-functions.php - upload_is_user_over_quota( $echo = true )
    function uploadCheck( $ret = true) {
    $upload_space = self::getQuota();
    $user_folder = ABSPATH . UPLOADS;
    $size = get_dirsize($user_folder) / 1024 / 1024;

    if(($upload_space - $size) < 0 ) {
    if( $echo )
    echo sprintf(__('Sorry, you have used your space allocation %1$s MB Please delete some files to upload more files.', 'z-space'), $upload_space);
    return true;
    } else {
    return false;

  16. MrWize
    Posted 16 years ago #

    I can't get my blogusers to see any graph/info about their used quota?

    I really don't understand what I have to replace. In my file, on line 41, I have an "section end" like this: }

    So, what exactlly should I remove and what should I add? Anyone have this useful plugin to work with WPMU v1.2.5?

  17. ekusteve
    Posted 16 years ago #

    It worked prior to 1.2.5, but it doesn't work with 1.2.5. I spent a few hours working on it a couple of days ago and chased down a few problems, but still don't have it all figured out yet...I'm planning to work on it more this weekend and if I get it figured out I'll post back. If someone else gets it working, please post back as's a nice plugin.


  18. chowanec
    Posted 16 years ago #

    I have the same issue as MrWize up there... Following qRof's changes can be a bit confusing.

    I feel like I am either TOTALLY avoiding the divide by 0 issue, or this may work...?

    I just changed return $quota; to return 150; (knowing that this is a global site setting at this point...)

    When looking at the function that's being changed, it doesn't *look* like this will break anything, but right now I have 2 users on my MU site, so I'm not sure what would happen if I released this into the wild. That said, I'm sure one of you guys would have tried this already and posted it as a work around if it was kosher.

    *braces for a flame* And before you do, I love you all. :)

  19. andrea_r
    Posted 16 years ago #

    Well, in 1.3 there is now a built-in function that shows on the dashboard how much upload space they have and how much is left. :) Right in the grey box, under the blog stats.

    So unless you really really want a graph, it's almost obsolete.

  20. chowanec
    Posted 16 years ago #

    Heh. Good to know, I guess. :) What's the ETA on 1.3? And no, I don't need a fancy graph. :)

  21. andrewbillits
    Posted 16 years ago #

      What's the ETA on 1.3?



  22. chowanec
    Posted 16 years ago #

    Awesome. Thanks.

About this Topic

  • Started 17 years ago by sycophant
  • Latest reply from chowanec