From: Hypolite Petovan Date: Thu, 4 Jan 2018 16:58:32 +0000 (-0500) Subject: Add no_oembed_rich_content and allowed_oembed admin settings X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=50e04d87c285e476573d89fa58565bfa778722a1;p=friendica.git Add no_oembed_rich_content and allowed_oembed admin settings --- diff --git a/mod/admin.php b/mod/admin.php index 9408aa31c6..0fab9647cb 100644 --- a/mod/admin.php +++ b/mod/admin.php @@ -907,6 +907,8 @@ function admin_page_site_post(App $a) $allowed_sites = ((x($_POST,'allowed_sites')) ? notags(trim($_POST['allowed_sites'])) : ''); $allowed_email = ((x($_POST,'allowed_email')) ? notags(trim($_POST['allowed_email'])) : ''); + $no_oembed_rich_content = x($_POST,'no_oembed_rich_content'); + $allowed_oembed = ((x($_POST,'allowed_embed')) ? notags(trim($_POST['allowed_embed'])) : ''); $block_public = ((x($_POST,'block_public')) ? True : False); $force_publish = ((x($_POST,'publish_all')) ? True : False); $global_directory = ((x($_POST,'directory')) ? notags(trim($_POST['directory'])) : ''); @@ -1063,6 +1065,8 @@ function admin_page_site_post(App $a) Config::set('config', 'register_text', $register_text); Config::set('system', 'allowed_sites', $allowed_sites); Config::set('system', 'allowed_email', $allowed_email); + Config::set('system', 'no_oembed_rich_content', $no_oembed_rich_content); + Config::set('system', 'allowed_oembed', $allowed_oembed); Config::set('system', 'block_public', $block_public); Config::set('system', 'publish_all', $force_publish); Config::set('system', 'newuser_private', $newuser_private); @@ -1300,6 +1304,8 @@ function admin_page_site(App $a) '$abandon_days' => array('abandon_days', t('Accounts abandoned after x days'), Config::get('system','account_abandon_days'), t('Will not waste system resources polling external sites for abandonded accounts. Enter 0 for no time limit.')), '$allowed_sites' => array('allowed_sites', t("Allowed friend domains"), Config::get('system','allowed_sites'), t("Comma separated list of domains which are allowed to establish friendships with this site. Wildcards are accepted. Empty to allow any domains")), '$allowed_email' => array('allowed_email', t("Allowed email domains"), Config::get('system','allowed_email'), t("Comma separated list of domains which are allowed in email addresses for registrations to this site. Wildcards are accepted. Empty to allow any domains")), + '$no_oembed_rich_content' => array('no_oembed_rich_content', t("No OEmbed rich content"), Config::get('system','no_oembed_rich_content'), t("Don't show the rich content (e.g. embedded PDF), except from the domains listed below.")), + '$allowed_oembed' => array('allowed_oembed', t("Allowed OEmbed domains"), Config::get('system','allowed_oembed'), t("Comma separated list of domains which oembed content is allowed to be displayed. Wildcards are accepted.")), '$block_public' => array('block_public', t("Block public"), Config::get('system','block_public'), t("Check to block public access to all otherwise public personal pages on this site unless you are currently logged in.")), '$force_publish' => array('publish_all', t("Force publish"), Config::get('system','publish_all'), t("Check to force all profiles on this site to be listed in the site directory.")), '$global_directory' => array('directory', t("Global directory URL"), Config::get('system','directory'), t("URL to the global directory. If this is not set, the global directory is completely unavailable to the application.")), diff --git a/view/templates/admin/site.tpl b/view/templates/admin/site.tpl index 9f7b3601e5..160804f624 100644 --- a/view/templates/admin/site.tpl +++ b/view/templates/admin/site.tpl @@ -78,6 +78,8 @@

{{$corporate}}

{{include file="field_input.tpl" field=$allowed_sites}} {{include file="field_input.tpl" field=$allowed_email}} + {{include file="field_checkbox.tpl" field=$no_oembed_rich_content}} + {{include file="field_input.tpl" field=$allowed_oembed}} {{include file="field_checkbox.tpl" field=$block_public}} {{include file="field_checkbox.tpl" field=$force_publish}} {{include file="field_select.tpl" field=$community_page_style}}