#4: Added config settings to turn on comments and require login before commenting

This commit is contained in:
Andy Heathershaw 2018-09-17 09:29:09 +01:00
parent 055137935d
commit c2e71b0084
4 changed files with 24 additions and 0 deletions

View File

@ -98,6 +98,7 @@ class ConfigHelper
return array(
'albums_menu_parents_only' => false,
'albums_menu_number_items' => 10,
'allow_photo_comments' => false,
'allow_self_registration' => true,
'analytics_code' => '',
'app_name' => trans('global.app_name'),
@ -111,6 +112,7 @@ class ConfigHelper
'hotlink_protection' => false,
'items_per_page' => 12,
'items_per_page_admin' => 10,
'photo_comments_require_login' => true,
'public_statistics' => true,
'recaptcha_enabled_registration' => false,
'recaptcha_secret_key' => '',

View File

@ -231,9 +231,11 @@ class DefaultController extends Controller
$checkboxKeys = [
'albums_menu_parents_only',
'allow_photo_comments',
'allow_self_registration',
'enable_visitor_hits',
'hotlink_protection',
'photo_comments_require_login',
'recaptcha_enabled_registration',
'remove_copyright',
'require_email_verification',

View File

@ -47,6 +47,10 @@ return [
'save_action' => 'Save Changes',
'select' => 'Select',
'select_current_text' => '(current)',
'settings_allow_photo_comments' => 'Allow comments on photos',
'settings_allow_photo_comments_help' => 'With this option enabled, users can comment on individual photos.',
'settings_photo_comments_require_login' => 'Require login before posting comments',
'settings_photo_comments_require_login_help' => 'If this option is enabled, users must login before they can post comments.',
'settings_hotlink_protection' => 'Prevent hot-linking to images',
'settings_hotlink_protection_help' => 'With this option enabled, direct linking to images is not allowed. Photos can only be viewed through Blue Twilight.',
'settings_restrict_originals_download' => 'Restrict access to original images',

View File

@ -330,6 +330,22 @@
{{-- Social --}}
<div role="tabpanel" class="tab-pane" id="social-tab">
<div class="form-check">
<input type="checkbox" class="form-check-input" id="allow-photo-comments" name="allow_photo_comments" @if (old('allow_photo_comments', UserConfig::get('allow_photo_comments')))checked="checked"@endif>
<label class="form-check-label" for="allow-photo-comments">
<strong>@lang('forms.settings_allow_photo_comments')</strong><br/>
@lang('forms.settings_allow_photo_comments_help')
</label>
</div>
<div class="form-check mt-3">
<input type="checkbox" class="form-check-input" id="photo-comments-require-login" name="photo_comments_require_login" @if (old('photo_comments_require_login', UserConfig::get('photo_comments_require_login')))checked="checked"@endif>
<label class="form-check-label" for="photo-comments-require-login">
<strong>@lang('forms.settings_photo_comments_require_login')</strong><br/>
@lang('forms.settings_photo_comments_require_login_help')
</label>
</div>
<div class="form-check mt-3">
<input type="checkbox" class="form-check-input" id="social-user-profiles" name="social_user_profiles" @if (old('social_user_profiles', UserConfig::get('social_user_profiles')))checked="checked"@endif>
<label class="form-check-label" for="social-user-profiles">
<strong>@lang('forms.settings_social_user_profiles')</strong><br/>