The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Changing attachment upload permissions on the fly?
Is it possible to use a hook to change a user's attachment permissions on the fly?
Basically, I'd like to have two different file size limits on uploading .ZIP files. If a member is in usergroup x,y or z it would use the forum's default. If a member is in usergroup a,b or c I would like to change the maximum allowed filesize to something different. Any suggestions on how I can do this would be appreciated. Thanks, James |
#2
|
||||
|
||||
I believe you can change it per usergroup in Attachments > Attachment Permissions
|
#3
|
|||
|
|||
Thanks. You are correct Lynne.
I feel like an idiot. I'd still like to know if this is possible, so I could change upload limits based on which forum is being posted on. For example, can I let forum A use the default settings and then change the maximum allowed filesize to something different on forum B? Thanks again, James |
#4
|
||||
|
||||
I would guess you can write a plugin to do. First you need to find where in the code this is checked (somewhere in class_upload.php?) and look for which plugin you would use that is located before that check. Also, you need to note the variable name. Then writing the plugin should be pretty straightforward.
|
#5
|
|||
|
|||
Unless I'm missing something, this wasn't as difficult as I thought it would be.
I added this in a newattachment_start hook: PHP Code:
Thanks, James |
#6
|
||||
|
||||
Sometimes it's amazing how simple it can be. And other times it's amazing how hard it is.
|
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|