The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Need help modifying attachment permissions
Hi,
I have limited space on my shared server so I do not want users attaching many images/attachments to a post. So I have "Attachments Per Post" in the ACP limited to 3 attachments. I figure if they need more then 3 attachments per post, they can put them all in a ZIP file. However, because of the way vBulletin works. My Admin account is now limited to 3 attachments per article. My articles usually have multiple diagrams included in them. I'm not sure why Admins are not exempt from the attachment limit, but they aren't. So I need to figure out how to keep this Attachments Per Post setting at 3, and yet allow my admin account to have multiple attachments. I have an understand of PHP but I'm not an expert. I've been looking and I believe that I need to modify the newattachment.php file to ignore that Attachments Per Post setting if the current user is in the Admin usergroup. By playing with this it seems that the only enforcement of this rule is in that file, when the person clicks the "upload" button to upload a new attachment. If I set the Attachments Per Post to 15, and upload 15 attachments to an article, then reset the Attachments Per Post to 3. The article loads fine even though it has more attachments then are currently allowed. So it appears the only enforcement is when you click that upload button. Does anyone know how to modify this to exempt the admin usergroup? |
#2
|
|||
|
|||
I would like to know this as well. There should be way to expempt Admins or moderators from this limit or set a different limit for them.
|
#3
|
|||
|
|||
You could create a plugin using hook location global_bootstrap_init_start and this code:
PHP Code:
|
#4
|
|||
|
|||
Thanks for your help. I am very new to vBulletin. Would you mind explaining it in more details please?
|
#5
|
|||
|
|||
Anyone?
Your help would be appreciated. |
#6
|
|||
|
|||
Sorry, I missed your reply. To create a plugin:
- In the adminCP, click on "Plugins & Products" then "Add New Plugin". - From the "Hook Location" drop-down menu, choose global_bootstrap_init_start - Enter a title (something so that in the future you'll remember what this plugin does) - For "Plugin PHP Code", copy and paste the code I posted above. - Click the "Yes" radio button next to "Plugin is Active", and press "Save". If you later want to disable or delete this plugin, you can use the Plugin Manager. Your plugin will be listed in the "Product: vbulletin" section, and you can edit, disable, or delete it from there. |
Благодарность от: | ||
inphoenix |
#7
|
|||
|
|||
Thank you so much for helping me out. Much appreciated.
|
#8
|
|||
|
|||
Is there any way to adapt this so admins and mods have no file size limitations on attachments?
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|