just wondering if the developers for this plugin is still working on this? encountered a few bugs at the recent release of wordpress v5
]]>Upon activation, the plugin generates this error:
The plugin generated 200 characters of unexpected output during activation. If you notice “headers already sent” messages, problems with syndication feeds or other issues, try deactivating or removing this plugin.
I tried to activate it on a fresh WP install and it still produces this error there. Please help. Is this plugin maintained at all? Thanks in advance!
]]>Hi!
I use a frontend manager on my site and I wish to display “used space” on a page which is not the media library.
I’m a beginner, so can someone tell me which code I have to add to the page?
Thanks
Wanted to check out more info and clicked on the link to main site. Chrome presented warning saying this is a dangerous site, Malware warning ??
]]>I am trying to setup disk space in GB to every user but size is showed as bytes:
10240 MB shows 10 bytes and 30720 MB shows 30 bytes
]]>in upload-quota-per-user.php line 111
plugin only increase used space if has the meta uqpu_upload_space with a value different than 0 or ”(empty)
you should change this check with this:
`
if (!$uqpu_upload_space)
$uqpu_upload_space = 0;
update_user_meta( $user_id, ‘uqpu_upload_space’, $uqpu_upload_space + $size );
`
Using a Forum plugin called Asgaros Forum. When configuring your plugin (Upload Quota per User), I find that anyone can upload items, via a forum posting, larger than I am specifying. I believe it is because the images that are uploaded through the Forum plugin are going into a different folder than the standard Uploads folder. There is a folder inside the Uploads folder called “asgarosforum” which contains several subfolders which contain the items I have uploaded as tests. I can’t seem to be able to specify which folder that Asgaros Forum uses. Can your plugin be configured to work with this folder rather than the uploads folder.
I am only assuming that this is the problem. Any help is appreciated.
]]>Hi, can you add textdomain with loader and add .po file to your lang folder? Thx
]]>Hi,
Great plugin – works well!
I am using a paid membership plugin. If a user exceeds his quota, I would like to route to a specific page with my upgrade-offer on it.
Is there a way to change the code (or the themes functions.php) such that the plugin redirects to a special page upon “quota exceeded” ?
Thank you, j.
PS: one more question, if I may ask: If I get thousands of users, lots of files will, the plugin slow-donw my site by caculatiing user quotas, or does it do that only once and then adds per upload. I am not good enough at php to see that from the code myself ??
]]>Hi, seemed to have encountered an issue which wasn’t spotted before. Limitation is also affecting administrators account even though we excluded admin accounts in user restriction option.
]]>Hi I am trying to limit uploads and disk space to just 200k for subscribers but I get an error message if I use 0.2 in quota fields? Any suggestions please.
Thanks
Hi,
Does this plugin delete all the data uploaded(media files, docs, etc) or only the plugin data? I’m confused cos when i deactivated the plugin, all the photos i uploaded were still there.
]]>Will this plugin have media library for each user or user role?
]]>How could I set the upload limit per file to less than 1mb I would like a limit of 300kb.
]]>you can change the plugin.
rather than limit the space that each user can upload.
Limit the number of files that can ‘load on the server at every turn!?
That is if I load a photo album that I would set more than 150 files can not enter.
you say might be a good idea?
]]>Hi!
I was wondering if there a way to set different quotas for different roles.
Eg: author – 500MB
editor – 300MB etc
Thanks!
Paul
Hi there, i had problem, quota didnt work for me. I give you a question, what happens, when user doesn’t have meta set and uploaded attachement in time of plugin activation? (Note from documentation: “If the meta value does not exist and $single is true the function will return an empty string. If $single is false an empty array is returned.”)
I had to do correction in my code and initialize user meta manually.
if(!$passCapab) {
//------ Before Uploading ------//
add_filter( 'wp_handle_upload_prefilter', 'uqpu_before_uploading' );
function uqpu_before_uploading( $file ) {
global $sizeLimit;
$user_id = get_current_user_id();
$uqpu_upload_space = get_user_meta( $user_id, 'uqpu_upload_space', $single = true );
$filesize = $file['size'];
if (($filesize+$uqpu_upload_space)>$sizeLimit) $uqpu_upload_space_limit_reached = true;
else $uqpu_upload_space_limit_reached = false;
if ( $uqpu_upload_space_limit_reached ) $file['error'] = __('You reached the limit of', 'upload-quota-per-user').' '.human_filesize($sizeLimit);
return $file;
}
}
//------ After Uploading, modified database ------//
add_filter( 'wp_handle_upload', 'uqpu_after_uploading' );
function uqpu_after_uploading( $args ) {
$user_id = get_current_user_id();
$size = filesize( $args['file'] );
$uqpu_upload_space = get_user_meta( $user_id, 'uqpu_upload_space', $single = true );
//This is what i wrote vvvvvvvvvvvvvvvvvvvvvvv
if($uqpu_upload_space != "" && is_numeric($uqpu_upload_space)) {
update_user_meta( $user_id, 'uqpu_upload_space', $uqpu_upload_space + $size );
} else {
update_user_meta( $user_id, 'uqpu_upload_space', $size );
}
return $args;
}
But thanks for plugin, works like a charm after fix ??
]]>I’m using formidable forms to let users upload images to the media library. Does this plugin works with forms as well or only if uploading photos directly from the dashboard to the media library?
]]>Hello!
I set Disk Space Limit to 2MB and Single File Size Limit 1 MB…
Single File Size Limit works perfect, but Disk Space Limit don’t, it let me upload unlimited.
How can I fix it?
Thanks!
]]>Great plugin,but in version 4.2.3 always show infinity for disk space Used Space: 1MB / ∞ in media library and exceeding the limit.
]]>I don’t find any documentation for custom capabilities separated by comma box – can you tell me what that does? I am hoping there is some functionality there that will help me.
]]>Hi,
There are a lot of wp installations that sell disk space to its customers (eg, sites to upload multimedia, subscription sites,…) with your plugin now can limit space but same quota for all users, I think that giving the possibility to give different quota limit per user your plugin would be interesting for a lot of people because could give us the possibility to sell different plans to our customers with different disk space limiting the quota depending the user.
Please let me know if you have plans to implement such feature.
Thanks
Firstly, thanks a lot for this plugin. Anyhow, it doesnt seem to limit the total quota used per user with wp 4.2.2 Any ideas whats the problem? In JJNW′s post (previous one) he stated it was working with 4.2.1 which makes me wonder if it could be the theme!?
]]>This is exactly what I have been seeking, and it works just fine, so it seems. I am using 4.2.1 WP and PHP 5.5.12
But on the admin side, in the settings, I get this a few times:
Warning: in_array() expects parameter 2 to be array, string given in C:\wamp\www\website\wp-content\plugins\upload-quota-per-user\admin.php on line 46
This is line 46: if(in_array($slug,get_option('uqpu_roles'))) $selected = 'selected'; else $selected = '';
<?php
global $wp_roles; $roles = $wp_roles->get_names();
foreach($roles as $slug => $role) { if(in_array($slug,get_option('uqpu_roles'))) $selected = 'selected'; else $selected = '';
echo '<option value="'.$slug.'" '.$selected.'>'.$role.'</option>';
}
?>
ANY HELP would be VERY VERY appreciated.
THANKS.
]]>The quota works great but is there also a way to limit the number of uploads a user can make? So limit them to 5… then when they delete 1, they can then upload another.
I found this code online but the second half of it doesn’t work:
add_filter( 'wp_handle_upload_prefilter', 'limit_uploads_for_user_roles' );
function limit_uploads_for_user_roles( $file ) {
$user = wp_get_current_user();
$limit_roles = array('contributor');
$filtered = apply_filters( 'limit_uploads_for_roles', $limit_roles, $user );
if ( array_intersect( $limit_roles, $user->roles ) ) {
$upload_count = get_user_meta( $user->ID, 'upload_count', true ) ? : 0;
$limit = apply_filters( 'limit_uploads_for_user_roles_limit', 7, $user, $upload_count, $file );
if ( ( $upload_count + 1 ) > $limit ) {
$file['error'] = __('Upload limit has been reached for this account!', 'yourtxtdomain');
} else {
update_user_meta( $user->ID, 'upload_count', $upload_count + 1 );
}
}
return $file;
}
add_action('delete_attachment', 'decrease_limit_uploads_for_user');
function decrease_limit_uploads_for_user( $id ) {
$user = wp_get_current_user();
$limit_roles = array('contributor');
$filtered = apply_filters( 'limit_uploads_for_roles', $limit_roles, $user );
if ( array_intersect( $limit_roles, $user->roles ) ) {
$post = get_post( $id);
if ( $post->post_author != $user->ID ) return;
$count = get_user_meta( $user->ID, 'upload_count', true ) ? : 0;
if ( $count ) update_user_meta( $user->ID, 'upload_count', $count - 1 );
}
}
]]>
The plugin generated x characters of unexpected output when activate.
Do you have a quick fix to resolve this bug?
Thanks.
]]>I was able to exceed the quota.
My quota was set to 1MB.
And I logged in as an Author.
I am using WordPress 4.0.
Please reply.
]]>It maybe because I am super Admin rather than just admin (from your drop down menu it only shows administrator), but Once a set quota is set, It saves and sends me to an error screen
Side note: I used the patch that you gave regarding this post “ERROR plugin will not activate”
]]>Hi, Great idea for a plugin! I was wondering if it is possible to limit the amount of MB’s per WP Install i.e. the maximum MB’s that can be uploaded per website, not just per user? Thanks
]]>Hi,
I am looking for a plugin for my ecommerce website.
I give a free access to download small photos.
But I would like to put a quota download per day for each user (logged)
So do you know if it is possible with your plugin ?
Let me know please.
Thank you
]]>