diff options
author | friendica <info@friendica.com> | 2014-11-18 19:02:28 -0800 |
---|---|---|
committer | friendica <info@friendica.com> | 2014-11-18 19:02:28 -0800 |
commit | 3224848bad07fefec7ab830e70634740329ccae6 (patch) | |
tree | 63f9cd16df32e728c509f7154e6a8c103650e6bf | |
parent | 11f0b45a9015a717e6e0da1bfd5a1c61381d64ed (diff) | |
download | volse-hubzilla-3224848bad07fefec7ab830e70634740329ccae6.tar.gz volse-hubzilla-3224848bad07fefec7ab830e70634740329ccae6.tar.bz2 volse-hubzilla-3224848bad07fefec7ab830e70634740329ccae6.zip |
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.
-rw-r--r-- | include/features.php | 1 | ||||
-rw-r--r-- | mod/photos.php | 1 | ||||
-rwxr-xr-x | view/tpl/photo_view.tpl | 3 |
3 files changed, 5 insertions, 0 deletions
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 @@ <label class="radio-inline" id="photo-edit-rotate-cw-label" for="photo-edit-rotate-cw"><input id="photo-edit-rotate-cw" type="radio" name="rotate" value="1" />{{$edit.rotatecw}}</label> <label class="radio-inline" id="photo-edit-rotate-ccw-label" for="photo-edit-rotate-ccw"><input id="photo-edit-rotate-ccw" type="radio" name="rotate" value="2" />{{$edit.rotateccw}}</label> </div> + {{if $edit.adult_enabled}} <div class="form-group"> {{include file="field_checkbox.tpl" field=$edit.adult}} </div> + {{/if}} + {{$edit.aclselect}} <div class="form-group pull-left"> |