Guest users edit their own items

I've been tasked with giving guest users the ability to edit their own items. To prevent any admin access, I was thinking about creating an Omeka plugin, and then implementing a custom form, probably AJAX, which updated the item directly.

Is there a general direction to this, within Omeka?

I'm an experience PHP/Drupal guy, but if there is an Omeka function for this already, could you let me know? No need to reinvent the wheel.

If not, is this a valid approach within Omeka (custom form + plugin + SQL updates).

Oh, and THANKS!

Are these items that have been added via the Contribution plugin? Or, are you talking about both adding and editing from the public side?

Either way, it would definitely be a plugin. You'd probably want to use the define_acl hook to specify the permissions for a guest user. Then you'd want to create a controller to handle the form submission and make the changes.

Patrick,

Yes. They have been added via the contribution module.

Thanks for the direction! This is for a project going live shortly. I'll keep posting questions as I have them and we can hopefully make some good google bait for the forums.

John

Hi,

I just added an option that allows a contributor to edit his contributions (see https://github.com/Daniel-KM/Contribution).

Sincerely,

Daniel Berthereau
Infodoc & Knowledge management

Daniel,

THANK YOU! I will definitely check that out, and let you know how it fits our needs. I got knee deep into the plugin structure, roles, and the Omeka API, but I'm happy to back out, try this, and will let you know how it goes.

Best,
John

Daniel, Patrick,

I downloaded the zip from github and loaded the module into a VM, which holds a replicate of the website which I'm contracting on, for a local college (my project manager mentioned you guys might be aware of her project).

Anyway, it worked great on my VM. No sweat. I deactivated the 3.0 Contribution plugin, moved it to a safe location, renamed the unzipped Contribution-master to Contribution, and was allowed to upgrade to 3.1. The editing UI looks great, and will be easy to style.

I went to replicate this work on the production site. Before renaming the new module or removing the old one, the Plugins page showed that "This is not a valid plugin." for the 3.1 version. I figured after the rename, it would work, but instead, after deactivating and removing the old version, and renaming the new version to drop the "-master", the entire site was a white screen of death.

I don't have much log-viewing privilege on the production server.

First question: Can you help walk me through getting the 3.1 activated? Permissions all looked the same from system to system, and they should be identical setups.

Also, can you help me get debug/logging information from Omeka, without using system logs.

Any help is very appreciated.

Thanks,
John

Line 216 of ContributionPlugin.php required the following fix:

$_temp_contribution_page_path = get_option('contribution_page_path');
//if (empty(get_option('contribution_page_path'))) {
if (empty($_temp_contribution_page_path)) {
set_option('contribution_page_path', $this->_options['contribution_page_path']);
}

Apparently on our version of PHP, you can't use a function within empty() for this test. Varing it up beforehand provides us a fix.

Thanks!

Also around line 398 of controlloers/contributioncontroller.php:

$_file_count = $item->fileCount();

if ($contributionType->isFileRequired() && empty($_file_count)) {