Premium Quota Plugin

I am having 2 problems with the Quota plugins.

1. If a user has upgraded his upload quota, I can not manually set any other quota for the blog. I would think that the Quota Plugin would add any additional quota they purchased to whatever they currently have.

2. I include extra space with certain plugins. But, lets say, if I give them an additional 500 mb of space, it doesn’t add that to their upload quota. In fact, it lowers it if they already have 1000 mb’s of space.

I need to change this to make it work for me. My personal blog only has 100mb of space now that I upgraded myself to one of my upgrade plugins that also add’s 100 mb of space (thus, not adding, but limiting to).

Looking at the plugin, it does an ifelse for all quota’s. I was thinking of changing this to if’s, and having them add to a total quota variable and making only one call at the end of the function (quota_active($total)).

Then, add a comparison to the quota_active() to check if the [get_option(“blog_upload_space”:wink: < get_site_option(“blog_upload_space”:wink: + $total] and if it is then write it to the blogs option table.

Does this sound like it will work. This way, people can continue to increase their space when they need additional space.

Thanks.

  • Andrew
    • Champion of Loops

    Hiya,

    1. If a user has upgraded his upload quota, I can not manually set any other quota for the blog. I would think that the Quota Plugin would add any additional quota they purchased to whatever they currently have.

    This is how the plugin is supposed to work. It simply sets the quota for a blog to a higher number.

    2. I include extra space with certain plugins. But, lets say, if I give them an additional 500 mb of space, it doesn’t add that to their upload quota. In fact, it lowers it if they already have 1000 mb’s of space.

    That’s the expected behavior I’m afraid. The quota plugin is really just a simple demo plugin we provide with the Upgrades package.

    What you’ve described sounds like it will work. However, make sure that the quota is lowered as expected when a package is not renewed, etc.

    Thanks,

    Andrew

  • realsol
    • Design Lord, Child of Thor

    Thanks Andrew. After looking at the code I figued it was just an example. I did alter it and if no upgrade quota is specified it sets it back to the default.

    This works for me since I can also up someones quota without using the upgrade (like my own :grinning:.

  • Qlof
    • The Crimson Coder

    Just to let ya’ll know, eShop is now checking the WPMU quota and set the same quota. So i.e. people who wants to sell an album on their blog can buy more space for it.

    My problem now is the filesize limit. I don’t want to set a filesize limit on 100 mb and a quota on 10 mb because I’m not sure if WPMU would let the user upload a 100 MB file even if they only have 10 MB quota.

    I’ve checked with the creator of eShop but I’m also thinking that the filesize limit could be adjusted with this plugin as they buy more quota.

  • Andrew
    • Champion of Loops

    Hiya,

    This plugin is compartible with the Ad sharing plugin, right?

    I’m a bit lost on that one. What does a quota plugin have to do with ad sharing?

    I’ve checked with the creator of eShop but I’m also thinking that the filesize limit could be adjusted with this plugin as they buy more quota.

    Why is there a need to increase the filesize when increasing the quota? Why not just set the filesize limit fairly high to begin with? If the only have 10MB of storage space available and the filesize limit is 250MB they should only be able to upload a 10MB file.

    Thanks,

    Andrew

  • Qlof
    • The Crimson Coder

    Ok, I was afraid that the file limit check was done after the upload which would mean that a file limit of 100 mb and a quota of 10 mb would lead to a 100 mb upload and then the quota is filled.

    As far as the ads question, it’s included in the Premium plugin. You can let blog owners pay to not display ads. As both plugins are from this website I assumed that the premium no-ads option removes the ads generated from the ad-sharing plugin. But I wanted to double check to be sure.

    As far as the max filesize I had forgotten that it’s probably generated in the PHP settings.

  • Andrew
    • Champion of Loops

    As far as the ads question, it’s included in the Premium plugin. You can let blog owners pay to not display ads. As both plugins are from this website I assumed that the premium no-ads option removes the ads generated from the ad-sharing plugin. But I wanted to double check to be sure.

    Ah, you’re referring to the Upgrades plugin working with the ad sharing plugin.

    There currently isn’t any integration between the two.

    Thanks,

    Andrew