Skip to content

Commit

Permalink
Added plugin setting to allow for restricting tagging of a photo to t…
Browse files Browse the repository at this point in the history
…he owner of the photo (and admins) only
  • Loading branch information
iionly committed Jan 8, 2015
1 parent f802a15 commit 0224d28
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 2 deletions.
1 change: 1 addition & 0 deletions README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ Changes for release 1.8.5 (by iionly):
- Image file extension "jpeg" added to list of allowed extension for html5 uploader,
- Allow tagging of all site members (including yourself) on an image,
- Prevent the photo to be opened in the lightbox popup while adding a tag,
- Added plugin setting to allow for restricting tagging of a photo to the owner of the photo (and admins) only,
- Change in tag labels for a better indication of difference between word-tags ("Tag(s): bla") and member tags ("Member: Mr. X (tagged by Mr. Y)"),
- Fixes in page views (siteimagesowner, siteimagesgroup, tagged) in case of missing guid on input or viewer is logged out,
- Added missing CSS classes for tagging borders again that were mistakenly removed in release 1.8.1beta14.
Expand Down
1 change: 1 addition & 0 deletions tidypics/README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ Changes for release 1.8.5 (by iionly):
- Image file extension "jpeg" added to list of allowed extension for html5 uploader,
- Allow tagging of all site members (including yourself) on an image,
- Prevent the photo to be opened in the lightbox popup while adding a tag,
- Added plugin setting to allow for restricting tagging of a photo to the owner of the photo (and admins) only,
- Change in tag labels for a better indication of difference between word-tags ("Tag(s): bla") and member tags ("Member: Mr. X (tagged by Mr. Y)"),
- Fixes in page views (siteimagesowner, siteimagesgroup, tagged) in case of missing guid on input or viewer is logged out,
- Added missing CSS classes for tagging borders again that were mistakenly removed in release 1.8.1beta14.
Expand Down
1 change: 1 addition & 0 deletions tidypics/activate.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@

$defaults = array(
'tagging' => false,
'restrict_tagging' => false,
'view_count' => true,
'uploader' => true,
'exif' => false,
Expand Down
1 change: 1 addition & 0 deletions tidypics/languages/de.php
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@
'tidypics:settings:help' => "Hilfe",
'tidypics:settings:download_link' => "Zeige Download-Link",
'tidypics:settings:tagging' => "Tagging von Bildern erlauben",
'tidypics:settings:restrict_tagging' => "Wenn Tagging aktiviert ist, erlaube das Hinzufügen eines Tags nur dem Besitzer eines Photos (und Admins)",
'tidypics:settings:exif' => "EXIF-Daten anzeigen",
'tidypics:settings:view_count' => "Zugriffszähler anzeigen",
'tidypics:settings:slideshow' => 'Slideshow erlauben',
Expand Down
1 change: 1 addition & 0 deletions tidypics/languages/en.php
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@
'tidypics:settings:help' => "Help",
'tidypics:settings:download_link' => "Show download link",
'tidypics:settings:tagging' => "Enable photo tagging",
'tidypics:settings:restrict_tagging' => "If tagging is enabled, allow tagging only to owner of a photo (and admins)",
'tidypics:settings:exif' => "Display EXIF data",
'tidypics:settings:view_count' => "Display view count",
'tidypics:settings:slideshow' => 'Enable slideshow',
Expand Down
3 changes: 2 additions & 1 deletion tidypics/start.php
Original file line number Diff line number Diff line change
Expand Up @@ -463,7 +463,8 @@ function tidypics_entity_menu_setup($hook, $type, $return, $params) {
$return[] = ElggMenuItem::factory($options);
}

if (elgg_get_plugin_setting('tagging', 'tidypics') && elgg_is_logged_in()) {
$restrict_tagging = elgg_get_plugin_setting('restrict_tagging', 'tidypics');
if (elgg_get_plugin_setting('tagging', 'tidypics') && elgg_is_logged_in() && (!$restrict_tagging || ($restrict_tagging && $entity->canEdit()))) {
$options = array(
'name' => 'tagging',
'text' => elgg_echo('tidypics:actiontag'),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

$plugin = $vars['plugin'];

$checkboxes = array('tagging', 'view_count', 'uploader', 'exif', 'download_link' , 'slideshow');
$checkboxes = array('tagging', 'restrict_tagging', 'view_count', 'uploader', 'exif', 'download_link' , 'slideshow');
foreach ($checkboxes as $checkbox) {
echo '<div>';
echo '<label>';
Expand Down

0 comments on commit 0224d28

Please sign in to comment.