From 3224848bad07fefec7ab830e70634740329ccae6 Mon Sep 17 00:00:00 2001 From: friendica Date: Tue, 18 Nov 2014 19:02:28 -0800 Subject: turn the "adult photo flagging" (which prevents a particularly flagged photo from showing up in your top level albums) into a feature so it doesn't clutter the normal photo edit form. This feature was a quick hack and needs more work; but it could be important to somebody. --- include/features.php | 1 + mod/photos.php | 1 + view/tpl/photo_view.tpl | 3 +++ 3 files changed, 5 insertions(+) diff --git a/include/features.php b/include/features.php index 7530158ec..92d8598a5 100644 --- a/include/features.php +++ b/include/features.php @@ -48,6 +48,7 @@ function get_features() { array('preview', t('Post Preview'), t('Allow previewing posts and comments before publishing them')), array('channel_sources', t('Channel Sources'), t('Automatically import channel content from other channels or feeds')), array('content_encrypt', t('Even More Encryption'), t('Allow optional encryption of content end-to-end with a shared secret key')), + array('adult_photo_flagging', t('Flag Adult Photos'), t('Provide photo edit option to hide adult photos from default album view')), ), // Network Tools diff --git a/mod/photos.php b/mod/photos.php index ab848c709..ce24762b1 100644 --- a/mod/photos.php +++ b/mod/photos.php @@ -952,6 +952,7 @@ function photos_content(&$a) { 'lockstate' => $lockstate[0], 'help_tags' => t('Example: @bob, @Barbara_Jensen, @jim@example.com'), 'item_id' => ((count($linked_items)) ? $link_item['id'] : 0), + 'adult_enabled' => feature_enabled($owner_uid,'adult_photo_flagging'), 'adult' => array('adult',t('Flag as adult in album view'), (($ph[0]['photo_flags'] & PHOTO_ADULT) ? 1 : 0),''), 'submit' => t('Submit'), 'delete' => t('Delete Photo') diff --git a/view/tpl/photo_view.tpl b/view/tpl/photo_view.tpl index a741a5ce7..45a7cd7e5 100755 --- a/view/tpl/photo_view.tpl +++ b/view/tpl/photo_view.tpl @@ -59,9 +59,12 @@ + {{if $edit.adult_enabled}}
{{include file="field_checkbox.tpl" field=$edit.adult}}
+ {{/if}} + {{$edit.aclselect}}
-- cgit v1.2.3