diff --git a/app/Helpers/ConfigHelper.php b/app/Helpers/ConfigHelper.php index c1579b4..be02b83 100644 --- a/app/Helpers/ConfigHelper.php +++ b/app/Helpers/ConfigHelper.php @@ -104,6 +104,8 @@ class ConfigHelper 'date_format' => $this->allowedDateFormats()[0], 'default_album_view' => $this->allowedAlbumViews()[0], 'enable_visitor_hits' => false, + 'facebook_app_id' => '', + 'facebook_app_secret' => '', 'hotlink_protection' => false, 'items_per_page' => 12, 'items_per_page_admin' => 10, @@ -120,6 +122,7 @@ class ConfigHelper 'smtp_password' => '', 'smtp_port' => 25, 'smtp_username' => '', + 'social_facebook_login' => false, 'social_user_profiles' => false, 'theme' => 'default' ); diff --git a/app/Http/Controllers/Admin/DefaultController.php b/app/Http/Controllers/Admin/DefaultController.php index 815de1b..68fdd3a 100644 --- a/app/Http/Controllers/Admin/DefaultController.php +++ b/app/Http/Controllers/Admin/DefaultController.php @@ -224,12 +224,15 @@ class DefaultController extends Controller 'require_email_verification', 'restrict_original_download', 'smtp_encryption', + 'social_facebook_login', 'social_user_profiles' ]; $updateKeys = [ 'albums_menu_number_items', 'app_name', 'date_format', + 'facebook_app_id', + 'facebook_app_secret', 'sender_address', 'sender_name', 'smtp_server', diff --git a/resources/lang/en/admin.php b/resources/lang/en/admin.php index 665f129..a828ceb 100644 --- a/resources/lang/en/admin.php +++ b/resources/lang/en/admin.php @@ -211,6 +211,7 @@ return [ 'analytics_tab' => 'Analytics', 'security_allow_self_registration' => 'Allow self-registration', 'security_allow_self_registration_description' => 'With this option enabled, users can sign up for their own accounts. You can grant permissions to accounts to allow users to upload their own photos or manage yours.', + 'social_facebook' => 'Facebook', 'social_tab' => 'Social' ], 'select_all_action' => 'Select all', diff --git a/resources/lang/en/forms.php b/resources/lang/en/forms.php index eaabb28..09808d8 100644 --- a/resources/lang/en/forms.php +++ b/resources/lang/en/forms.php @@ -45,6 +45,10 @@ return [ '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', 'settings_restrict_originals_download_help' => 'With this option enabled, only the photo\'s owner can download the original high-resolution images.', + 'settings_social_facebook_app_id' => 'Facebook App ID:', + 'settings_social_facebook_app_secret' => 'Facebook App Secret:', + 'settings_social_facebook_login' => 'Allow login/registration with a Facebook account.', + 'settings_social_facebook_login_help' => 'With this option enabled, users can register (if enabled) and login with their Facebook account.', 'settings_social_user_profiles' => 'Enable public user profiles', 'settings_social_user_profiles_help' => 'Display public pages for users showing their albums, cameras used and activity.', 'storage_access_key_label' => 'Access key:', diff --git a/resources/views/themes/base/admin/settings.blade.php b/resources/views/themes/base/admin/settings.blade.php index faab460..4710d11 100644 --- a/resources/views/themes/base/admin/settings.blade.php +++ b/resources/views/themes/base/admin/settings.blade.php @@ -324,6 +324,52 @@ @lang('forms.settings_social_user_profiles_help') + +
+ +
+
+ +
+ +
+
+ + @lang('admin.settings.social_facebook') + + +
+ + +
+ +
+ + + + @if ($errors->has('facebook_app_id')) +
+ {{ $errors->first('facebook_app_id') }} +
+ @endif +
+ +
+ + + + @if ($errors->has('facebook_app_secret')) +
+ {{ $errors->first('facebook_app_secret') }} +
+ @endif +
+
+
+