Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Edit contribution #61

Open
wants to merge 52 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
30087b8
Removed assignements from conditions.
Daniel-KM Dec 13, 2015
61d6af1
Fixed various typos.
Daniel-KM Dec 13, 2015
1d69836
Fixed mysql install.
Daniel-KM Dec 4, 2016
00038c4
Added readme.
Daniel-KM Jun 2, 2014
3c1bf72
Added a <h1> title to my contributions.
Daniel-KM Dec 18, 2016
2eb2b49
Simplified custom route.
Daniel-KM Sep 15, 2014
c91b420
Protected the page "My Contributions".
Daniel-KM Dec 18, 2016
e1b924a
Fixed custom route for upgrade.
Daniel-KM Sep 19, 2014
abe1dc1
Internationalized some strings.
Daniel-KM Dec 18, 2016
71d3614
Allowed to upload multiple files.
Daniel-KM Jun 2, 2014
29aebff
Set InnoDB as default engine.
Daniel-KM Sep 15, 2014
78a2ede
Updated tests.
Daniel-KM Dec 18, 2016
aaceda9
Fixed error message when multiple files are downloaded.
Daniel-KM Aug 18, 2014
3cadb53
Made standard the config form.
Daniel-KM Sep 15, 2014
b370209
Fixed color of the message when the settings are saved.
Daniel-KM Dec 18, 2016
2948138
Renamed 'contributed_file' to 'file' in order to use default upload m…
Daniel-KM Sep 19, 2014
7dc14ea
Allowed admins to change the config of the plugin (same as old UI).
Daniel-KM Sep 15, 2014
d645d39
Fixed tag when there is no captcha.
Daniel-KM Dec 18, 2016
aed2398
Allowed to upload multiple files when type is not preset.
Daniel-KM Dec 18, 2016
6fd55e5
Fixed form settings after rebase on v3.1.0.
Daniel-KM Dec 18, 2016
11f3c2f
Made the element form label themable.
Daniel-KM Dec 18, 2016
7aff034
Removed new item if an error appears when processing contribution.
Daniel-KM Aug 18, 2014
86318be
Allowed to add tags.
Daniel-KM Jun 2, 2014
c498290
Simplified upload of multiple files.
Daniel-KM Dec 18, 2016
7e41cd4
Merge remote-tracking branch 'origin/standard_config'
Daniel-KM Dec 18, 2016
24ef06e
Added possibility for user to delete a contribution.
Daniel-KM Sep 9, 2014
dd44b47
Fixed element "add tag" in form after rebase on v3.1.0.
Daniel-KM Dec 18, 2016
f633338
Merge remote-tracking branch 'origin/multiple_files'
Daniel-KM Dec 18, 2016
030e17e
Replaced the makeNotPublic() method by the afterSave() hook.
Daniel-KM Sep 19, 2014
bb56c96
Merge remote-tracking branch 'origin/add_tags'
Daniel-KM Dec 18, 2016
2d27b68
Merge remote-tracking branch 'origin/delete_contribution'
Daniel-KM Dec 18, 2016
f24eabe
Allowed contributors to edit their contributions.
Daniel-KM Sep 19, 2014
14befcc
Simplified contribution controller for contribution.
Daniel-KM Sep 19, 2014
f1bd5de
Fixed link to contribution delete.
Daniel-KM Sep 19, 2014
900c4dd
Fixed new contribution.
Daniel-KM Oct 6, 2014
04ed0ad
Fixed use of empty() with an old php version.
Daniel-KM Oct 10, 2014
1da6236
Trim post element texts.
Daniel-KM Oct 23, 2014
cc27630
Fixed upgrade.
Daniel-KM Dec 19, 2014
9392e76
Fixed add tags.
Daniel-KM Dec 18, 2016
7f5a07c
Fixed contribute second title.
Daniel-KM Dec 18, 2016
aea6af9
Fixed tag for user.
Daniel-KM Dec 18, 2016
cc7d1e5
Added a title for files in edit form.
Daniel-KM Dec 18, 2016
d4431f8
Cleaned some public pages.
Daniel-KM Dec 18, 2016
5b00be7
Fixed previous upgrade of the base in some version.
Daniel-KM Dec 18, 2016
4cd692b
Fixed message after the update of a contribution.
Daniel-KM Dec 18, 2016
d560c62
Improved the description to allow edition of contributions.
Daniel-KM Dec 18, 2016
3dfc2af
Improved placement of the hook in type form.
Daniel-KM Dec 18, 2016
e69800c
Added the total of contributions as title of the page "my-contributio…
Daniel-KM Dec 18, 2016
f9485b1
Fixed string in setting form.
Daniel-KM Dec 18, 2016
e44f85a
Merge remote-tracking branch 'origin/feature/my_total_contributions'
Daniel-KM Dec 18, 2016
f37b944
Merge remote-tracking branch 'origin/add_readme'
Daniel-KM Dec 18, 2016
8dd6c28
Updated readme.
Daniel-KM Dec 18, 2016
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
315 changes: 224 additions & 91 deletions ContributionPlugin.php

Large diffs are not rendered by default.

92 changes: 92 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
Contribution (plugin for Omeka)
===============================


This plugin for [Omeka] provides a way to collect stories, images, or other
files from the public and manage those contributions in your Omeka archive as
items. The form can also automatically add a reCAPTCHA box at the bottom of each
form to prevent spam-bots from spamming your website.

For more information, see the [Contribution presentation] on [Omeka] and the
[update] done for Omeka 2.

This fork contains some improvements:

* Possibility to upload multiple files, if wanted
* Possibility to add tags, if wanted
* Possibility for a contributor to edit and delete his/her contributions
* Simplification of some parts of code
* various strict standards fixes


Installation
------------

Contribution depends on the [Guest User] plugin. You will need to install it
before you can install [Contribution].

Uncompress files and rename plugin folder "Contribution".

Then install it like any other Omeka plugin.

Settings are not on the plugin page, but at https://www.example.com/admin/contribution/index.


Warning
-------

Use it at your own risk.

It's always recommended to backup your files and database regularly so you can
roll back if needed.


Troubleshooting
---------------

See online issues on the [plugin issues] page on GitHub.


License
-------

This plugin is published under [GNU/GPL].

This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
Foundation; either version 3 of the License, or (at your option) any later
version.

This program is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
details.

You should have received a copy of the GNU General Public License along with
this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.


Contact
-------

Current maintainers:

* Roy Rosenzweig Center for History and New Media


Copyright
---------

* Copyright Roy Rosenzweig Center for History and New Media, 2010-2016
* Copyright Daniel Berthereau, 2014-2016 (improvements, see [Daniel-KM])


[Omeka]: https://omeka.org
[Contribution presentation]: http://omeka.org/codex/Plugins/Contribution
[update]: http://omeka.org/codex/Plugins/Contribution_2.0
[Contribution]: https://github.com/Omeka/plugin-Contribution
[plugin issues]: https://github.com/Omeka/plugin-Contribution/issues
[Guest User]: https://github.com/Omeka/plugin-GuestUser
[GNU/GPL]: https://www.gnu.org/licenses/gpl-3.0.html "GNU/GPL v3"
[Daniel-KM]: https://github.com/Daniel-KM "Daniel Berthereau"
4 changes: 2 additions & 2 deletions controllers/AjaxController.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public function updateAction()
}

$id = (integer) $this->_getParam('id');
$contributedItem = get_record_by_id('ContributionContributedItem', $id);
$contributedItem = $this->_helper->db->find($id);
if (!$contributedItem) {
$this->getResponse()->setHttpResponseCode(400);
return;
Expand Down Expand Up @@ -74,7 +74,7 @@ public function deleteAction()
// Handle action.
try {
$id = (integer) $this->_getParam('id');
$contributedItem = get_record_by_id('ContributionContributedItem', $id);
$contributedItem = $this->_helper->db->find($id);
if (!$contributedItem) {
$this->getResponse()->setHttpResponseCode(400);
return;
Expand Down
Loading