PDA

View Full Version : CMS plugin to allow a different number of attachments from forum


kether1
04-06-2011, 04:47 PM
Currently vbulletin only has one setting to limit the number of attachments in the forum. This one setting, unfortunately, also limit the CMS to the same number of attachments. So, for instance if I wanted to allow 5 attachments per post in the forum, I can only allow 5 attachments per post in the CMS articles.

What I am looking for is a way to set a separate limit for the number of allowed attachments in the CMS. I currently use my cms as an article section without comments. I would like to have up to 25 attachments allowed within a single article, but do not want more than 4 or 5 attachments allowed in a regular forum post.

I am requesting a plugin that would create a setting in the admincp (preferably in the CMS settings area) to set the number of allowed attachments per article. Anyone know how to create such a plugin? Seems like this should be a standard setting for a Content Management System.

Thanks so much!

Kether

Zachery
04-06-2011, 05:15 PM
I am not hitting any restrictions on my forum for posting attachments via linking images, only when using the full attachment manager.

Try this though, its just a plugin, so import it via the plugin manager: Download / Upload Plugins

kether1
04-06-2011, 06:23 PM
Thanks Zachery! I appreciate you taking the time to help me by creating this plugin. I will give it a try now. :)

Much appreciative,
Kether

Hi Zachery,

Seems this plugin is overriding the forum permission. I am going to play with the execution order to see if that will change anything. It totally worked for the CMS, but after posting an article with 22 images, I posted a link in the forum (which is set to accept only 4 images) and I uploaded 5 attachments into one post. Before the plugin, I would get a red "!" icon saying that I was limited to only 4 attachments.

I will post back if the execution order changes anything. Thanks again.

--------------- Added 1302119766 at 1302119766 ---------------

Seems the plugin overrides the forum attachment limit. Any ideas on how to get it to work?

Thanks
Kether

Zachery
04-06-2011, 06:57 PM
I might be using the wrong check.

Edit the plugin and replace CMS_SCRIPT == true with
THIS_SCRIPT == vbcms

kether1
04-06-2011, 07:22 PM
I just tried it with the edit, but no joy. The forum limit of 4 images is being maintained in the CMS. Any other ideas?

Thanks,
Kether

kether1
04-07-2011, 10:26 PM
I hate to bump this, but I do need some help. Can anyone offer any additional assistance to get this to work correctly? Thank for your effort Zachery.

Kether

kether1
04-08-2011, 11:25 PM
Once more for good measure. BUMP! :)

I really need some help with this. Anyone?

Thanks,
Kether

kether1
04-10-2011, 05:51 PM
Guess this is not possible then? I hope that vb will improve the cms with some permissions soon. :(

Zachery
04-10-2011, 10:57 PM
Have you tried anything on your own?

kether1
04-10-2011, 11:42 PM
Have you tried anything on your own?
:D hahaha... your kidding me, right? I have tried lots of variations of the code in the plugin, different hooks, different ex orders -- but just cannot get anything to work. Sure it increases the number of allowed attachments in the CMS, but it also changes in the forum. They seem inseparable.

I am at a loss at what else to try. I posted at vb.com and here. I sent pms to a couple of my buddys who both said that they wouldn't even consider using the CMS. You are the only person to respond positively with any direction at all in the two public forums. Maybe no one else is having this issue??

I am not sure what else to do. If you have any suggestions - I am willing to try.

wajones
08-15-2011, 02:04 AM
Try this in the plugin:

if ($vbulletin->userinfo['usergroupid'] == 6)
{$vbulletin->options['attachlimit'] = 0;}

It should give unlimited attachment to admins while still restricting everone else to the default setting from vb options. This would be everywhere if think.