Contributor Plugin: How to add selection of Collection to form?

How hard would it be to add the option for contributors to select which collection they want to add to?

In my scenario I have different communities adding content - and would love them to be able to classify their contributions by what collection they should join.

Thoughts?
Jeanne

As you know, currently, only the admin can set the default collection. To allow users to select a collection, we would probably want a way on the plugin settings page for the admin to specify the collections to which users could contribute, and then have a dropdown box on the contribution form for users to select a collection. This dropdown would only occur if the admin has specified more than one default collection. Changes would need to made in the _processForm function of the Contribution_IndexController.php file, as well as the plugin.php file for saving the new settings. Perhaps we should add this feature for the next release of the plugin.

That sounds like a good ultimate solution. For now I would even take just letting them pick from all the collections that exist (ie, no special control over which options they are provided).

Another feature I would LOVE would be a way to get an email notification when new content is contributed. Right now I am checking the admin console every day to see if something has been added.

What is the right way to ask for enhancements to a plugin?

okay, so I've already hacked the crap out of the contribution form. one more won't hurt, right?

looking at the indexcontroller.php file, i see this:

$itemMetadata = array(
				    'public'=>true,
				    'featured'=>false,

// Do not set the collection_id.
				    'item_type_name'=>$_POST['type'],
				    'tags'=>$_POST['tags']);

Should I take this to mean I cannot simply set the collection here (as in, it will break)? or is this just code markup noting that the developer is choosing not to set it?

I want to set my user contributions to a pre-determined collection. I DO NOT want users to choose. The collection ID is #8: Student and Community Submissions. Can I set it to number 8 here? The previous post in this thread suggested changes to the plugin.php file -- what changes if any are needed?

Thanks for all your help and for the excellent plug-in.

Erin

What is the right way to ask for enhancements to a plugin?

In the forums is fine! We'll generally add them as a ticket to our Plugin Trac for a future release of a plugin. Email notifications in the Contribution plugin does sound like a nice feature, so I'll add a ticket for that and we'll see if we can get that in an upcoming release of Contribution.

I want to set my user contributions to a pre-determined collection. I DO NOT want users to choose. The collection ID is #8: Student and Community Submissions. Can I set it to number 8 here? The previous post in this thread suggested changes to the plugin.php file -- what changes if any are needed?

Hi Erin,

Not sure if you've tried it already, but you should be able to add the collection ID to that array like so:


$itemMetadata = array(
		'public'=>true,
		'featured'=>false,
		'item_type_name'=>$_POST['type'],
		'tags'=>$_POST['tags'],
                'collection_id'=>8);

I believe, however, that we're adding an option to the Contribution plugin to allow admins to choose the collection for publicly-contributed items from the admin panel. I'll confirm that and get back to you.

As of version 1.1, the Contribution plugin allows you to choose a default collection for contributed items. Go to Settings > Plugins and click the "Configure" link beside the Contribution plugin. One option on the configuration form is 'Default Collection for Contributed Items', which allows you to choose an existing collection.