diff options
-rw-r--r-- | mod/admin.php | 22 | ||||
-rw-r--r-- | mod/siteinfo.php | 4 | ||||
-rwxr-xr-x | view/tpl/admin_site.tpl | 1 | ||||
-rwxr-xr-x | view/tpl/siteinfo.tpl | 2 |
4 files changed, 24 insertions, 5 deletions
diff --git a/mod/admin.php b/mod/admin.php index 749b94de2..f64b54bfe 100644 --- a/mod/admin.php +++ b/mod/admin.php @@ -215,13 +215,14 @@ function admin_page_site_post(&$a){ check_form_security_token_redirectOnErr('/admin/site', 'admin_site'); $sitename = ((x($_POST,'sitename')) ? notags(trim($_POST['sitename'])) : ''); - $banner = ((x($_POST,'banner')) ? trim($_POST['banner']) : false); + $banner = ((x($_POST,'banner')) ? trim($_POST['banner']) : false); + $admininfo = ((x($_POST,'admininfo')) ? trim($_POST['admininfo']) : false); $language = ((x($_POST,'language')) ? notags(trim($_POST['language'])) : ''); $theme = ((x($_POST,'theme')) ? notags(trim($_POST['theme'])) : ''); - $theme_mobile = ((x($_POST,'theme_mobile')) ? notags(trim($_POST['theme_mobile'])) : ''); - $theme_accessibility = ((x($_POST,'theme_accessibility')) ? notags(trim($_POST['theme_accessibility'])) : ''); - $site_channel = ((x($_POST,'site_channel')) ? notags(trim($_POST['site_channel'])) : ''); - $maximagesize = ((x($_POST,'maximagesize')) ? intval(trim($_POST['maximagesize'])) : 0); + $theme_mobile = ((x($_POST,'theme_mobile')) ? notags(trim($_POST['theme_mobile'])) : ''); + $theme_accessibility = ((x($_POST,'theme_accessibility')) ? notags(trim($_POST['theme_accessibility'])) : ''); + $site_channel = ((x($_POST,'site_channel')) ? notags(trim($_POST['site_channel'])) : ''); + $maximagesize = ((x($_POST,'maximagesize')) ? intval(trim($_POST['maximagesize'])) : 0); $register_policy = ((x($_POST,'register_policy')) ? intval(trim($_POST['register_policy'])) : 0); @@ -301,6 +302,12 @@ function admin_page_site_post(&$a){ set_config('system','banner', $banner); } + if ($admininfo==''){ + del_config('system','admininfo'); + } + else { + set_config('system','admininfo', $admininfo); + } set_config('system','language', $language); set_config('system','theme', $theme); if ( $theme_mobile === '---' ) { @@ -393,6 +400,10 @@ function admin_page_site(&$a) { $banner = 'red'; $banner = htmlspecialchars($banner); + /* Admin Info */ + $admininfo = get_config('system','admininfo'); + $admininfo = $admininfo; + /* Register policy */ $register_choices = Array( REGISTER_CLOSED => t("Closed"), @@ -427,6 +438,7 @@ function admin_page_site(&$a) { // name, label, value, help string, extra data... '$sitename' => array('sitename', t("Site name"), htmlspecialchars(get_config('system','sitename'), ENT_QUOTES, 'UTF-8'),''), '$banner' => array('banner', t("Banner/Logo"), $banner, ""), + '$admininfo' => array('admininfo', t("Administrator Information"), $admininfo, t("Contact information for site administrators. Displayed on siteinfo page. BBCode can be used here")), '$language' => array('language', t("System language"), get_config('system','language'), "", $lang_choices), '$theme' => array('theme', t("System theme"), get_config('system','theme'), t("Default system theme - may be over-ridden by user profiles - <a href='#' id='cnftheme'>change theme settings</a>"), $theme_choices), '$theme_mobile' => array('theme_mobile', t("Mobile system theme"), get_config('system','mobile_theme'), t("Theme for mobile devices"), $theme_choices_mobile), diff --git a/mod/siteinfo.php b/mod/siteinfo.php index 9f65f59e4..37cba02ec 100644 --- a/mod/siteinfo.php +++ b/mod/siteinfo.php @@ -88,6 +88,8 @@ function siteinfo_content(&$a) { else $plugins_text = t('No installed plugins/addons/apps'); + $admininfo = bbcode(get_config('system','admininfo')); + $o = replace_macros(get_markup_template('siteinfo.tpl'), array( '$title' => t('Red'), '$description' => t('This is a hub of the Red Matrix - a global cooperative network of decentralised privacy enhanced websites.'), @@ -99,6 +101,8 @@ function siteinfo_content(&$a) { '$bug_link_url' => 'https://github.com/friendica/red/issues', '$bug_link_text' => 'redmatrix issues', '$contact' => t('Suggestions, praise, donations, etc. - please email "redmatrix" at librelist - dot com'), + '$adminlabel' => t('Site Administrators'), + '$admininfo' => $admininfo, '$plugins_text' => $plugins_text, '$plugins_list' => $plugins_list )); diff --git a/view/tpl/admin_site.tpl b/view/tpl/admin_site.tpl index b0f9d4a74..9b90fb4b0 100755 --- a/view/tpl/admin_site.tpl +++ b/view/tpl/admin_site.tpl @@ -42,6 +42,7 @@ {{include file="field_input.tpl" field=$sitename}} {{include file="field_textarea.tpl" field=$banner}} + {{include file="field_textarea.tpl" field=$admininfo}} {{include file="field_select.tpl" field=$language}} {{include file="field_select.tpl" field=$theme}} {{include file="field_select.tpl" field=$theme_mobile}} diff --git a/view/tpl/siteinfo.tpl b/view/tpl/siteinfo.tpl index a60b406cf..4baa1969b 100755 --- a/view/tpl/siteinfo.tpl +++ b/view/tpl/siteinfo.tpl @@ -7,6 +7,8 @@ <p>{{$web_location}}</p> <p>{{$visit}}</p> <p>{{$bug_text}} <a href="{{$bug_link_url}}">{{$bug_link_text}}</a></p> +<p>{{$adminlabel}}</p> +<p>{{$admininfo}}</p> <p>{{$contact}}</p> <p>{{$plugins_text}}</p> {{if $plugins_list}} |