Merge pull request #789 from tobiasd/20131020
added options to admin panel
This commit is contained in:
commit
0cfeee2e47
2 changed files with 13 additions and 0 deletions
|
@ -239,6 +239,7 @@ function admin_page_site_post(&$a){
|
||||||
|
|
||||||
$sitename = ((x($_POST,'sitename')) ? notags(trim($_POST['sitename'])) : '');
|
$sitename = ((x($_POST,'sitename')) ? notags(trim($_POST['sitename'])) : '');
|
||||||
$banner = ((x($_POST,'banner')) ? trim($_POST['banner']) : false);
|
$banner = ((x($_POST,'banner')) ? trim($_POST['banner']) : false);
|
||||||
|
$info = ((x($_POST,'info')) ? trim($_POST['info']) : false);
|
||||||
$language = ((x($_POST,'language')) ? notags(trim($_POST['language'])) : '');
|
$language = ((x($_POST,'language')) ? notags(trim($_POST['language'])) : '');
|
||||||
$theme = ((x($_POST,'theme')) ? notags(trim($_POST['theme'])) : '');
|
$theme = ((x($_POST,'theme')) ? notags(trim($_POST['theme'])) : '');
|
||||||
$theme_mobile = ((x($_POST,'theme_mobile')) ? notags(trim($_POST['theme_mobile'])) : '');
|
$theme_mobile = ((x($_POST,'theme_mobile')) ? notags(trim($_POST['theme_mobile'])) : '');
|
||||||
|
@ -284,6 +285,7 @@ function admin_page_site_post(&$a){
|
||||||
$ssl_policy = ((x($_POST,'ssl_policy')) ? intval($_POST['ssl_policy']) : 0);
|
$ssl_policy = ((x($_POST,'ssl_policy')) ? intval($_POST['ssl_policy']) : 0);
|
||||||
$old_share = ((x($_POST,'old_share')) ? True : False);
|
$old_share = ((x($_POST,'old_share')) ? True : False);
|
||||||
$hide_help = ((x($_POST,'hide_help')) ? True : False);
|
$hide_help = ((x($_POST,'hide_help')) ? True : False);
|
||||||
|
$suppress_language = ((x($_POST,'suppress_language')) ? True : False);
|
||||||
$use_fulltext_engine = ((x($_POST,'use_fulltext_engine')) ? True : False);
|
$use_fulltext_engine = ((x($_POST,'use_fulltext_engine')) ? True : False);
|
||||||
$itemcache = ((x($_POST,'itemcache')) ? notags(trim($_POST['itemcache'])) : '');
|
$itemcache = ((x($_POST,'itemcache')) ? notags(trim($_POST['itemcache'])) : '');
|
||||||
$itemcache_duration = ((x($_POST,'itemcache_duration')) ? intval($_POST['itemcache_duration']) : 0);
|
$itemcache_duration = ((x($_POST,'itemcache_duration')) ? intval($_POST['itemcache_duration']) : 0);
|
||||||
|
@ -345,6 +347,11 @@ function admin_page_site_post(&$a){
|
||||||
} else {
|
} else {
|
||||||
set_config('system','banner', $banner);
|
set_config('system','banner', $banner);
|
||||||
}
|
}
|
||||||
|
if ($info=="") {
|
||||||
|
del_config('config','info');
|
||||||
|
} else {
|
||||||
|
set_config('config','info',$info);
|
||||||
|
}
|
||||||
set_config('system','language', $language);
|
set_config('system','language', $language);
|
||||||
set_config('system','theme', $theme);
|
set_config('system','theme', $theme);
|
||||||
if ( $theme_mobile === '---' ) {
|
if ( $theme_mobile === '---' ) {
|
||||||
|
@ -473,6 +480,8 @@ function admin_page_site(&$a) {
|
||||||
if($banner == false)
|
if($banner == false)
|
||||||
$banner = '<a href="http://friendica.com"><img id="logo-img" src="images/friendica-32.png" alt="logo" /></a><span id="logo-text"><a href="http://friendica.com">Friendica</a></span>';
|
$banner = '<a href="http://friendica.com"><img id="logo-img" src="images/friendica-32.png" alt="logo" /></a><span id="logo-text"><a href="http://friendica.com">Friendica</a></span>';
|
||||||
$banner = htmlspecialchars($banner);
|
$banner = htmlspecialchars($banner);
|
||||||
|
$info = get_config('config','info');
|
||||||
|
$info = htmlspecialchars($info);
|
||||||
|
|
||||||
//echo "<pre>"; var_dump($lang_choices); die("</pre>");
|
//echo "<pre>"; var_dump($lang_choices); die("</pre>");
|
||||||
|
|
||||||
|
@ -504,6 +513,7 @@ function admin_page_site(&$a) {
|
||||||
// name, label, value, help string, extra data...
|
// name, label, value, help string, extra data...
|
||||||
'$sitename' => array('sitename', t("Site name"), htmlentities($a->config['sitename'], ENT_QUOTES), 'UTF-8'),
|
'$sitename' => array('sitename', t("Site name"), htmlentities($a->config['sitename'], ENT_QUOTES), 'UTF-8'),
|
||||||
'$banner' => array('banner', t("Banner/Logo"), $banner, ""),
|
'$banner' => array('banner', t("Banner/Logo"), $banner, ""),
|
||||||
|
'$info' => array('info',t('Additional Info'), $info, t('For public servers: you can add additional information here that will be listed at dir.friendica.com/siteinfo.')),
|
||||||
'$language' => array('language', t("System language"), get_config('system','language'), "", $lang_choices),
|
'$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' => 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),
|
'$theme_mobile' => array('theme_mobile', t("Mobile system theme"), get_config('system','mobile-theme'), t("Theme for mobile devices"), $theme_choices_mobile),
|
||||||
|
@ -548,6 +558,7 @@ function admin_page_site(&$a) {
|
||||||
'$maxloadavg' => array('maxloadavg', t("Maximum Load Average"), ((intval(get_config('system','maxloadavg')) > 0)?get_config('system','maxloadavg'):50), t("Maximum system load before delivery and poll processes are deferred - default 50.")),
|
'$maxloadavg' => array('maxloadavg', t("Maximum Load Average"), ((intval(get_config('system','maxloadavg')) > 0)?get_config('system','maxloadavg'):50), t("Maximum system load before delivery and poll processes are deferred - default 50.")),
|
||||||
|
|
||||||
'$use_fulltext_engine' => array('use_fulltext_engine', t("Use MySQL full text engine"), get_config('system','use_fulltext_engine'), t("Activates the full text engine. Speeds up search - but can only search for four and more characters.")),
|
'$use_fulltext_engine' => array('use_fulltext_engine', t("Use MySQL full text engine"), get_config('system','use_fulltext_engine'), t("Activates the full text engine. Speeds up search - but can only search for four and more characters.")),
|
||||||
|
'$suppress_language' => array('suppress_language', t("Suppress Language"), get_config('system','suppress_language'), t("Suppress language information in meta information about a posting.")),
|
||||||
'$itemcache' => array('itemcache', t("Path to item cache"), get_config('system','itemcache'), "The item caches buffers generated bbcode and external images."),
|
'$itemcache' => array('itemcache', t("Path to item cache"), get_config('system','itemcache'), "The item caches buffers generated bbcode and external images."),
|
||||||
'$itemcache_duration' => array('itemcache_duration', t("Cache duration in seconds"), get_config('system','itemcache_duration'), t("How long should the cache files be hold? Default value is 86400 seconds (One day).")),
|
'$itemcache_duration' => array('itemcache_duration', t("Cache duration in seconds"), get_config('system','itemcache_duration'), t("How long should the cache files be hold? Default value is 86400 seconds (One day).")),
|
||||||
'$lockpath' => array('lockpath', t("Path for lock file"), get_config('system','lockpath'), "The lock file is used to avoid multiple pollers at one time. Only define a folder here."),
|
'$lockpath' => array('lockpath', t("Path for lock file"), get_config('system','lockpath'), "The lock file is used to avoid multiple pollers at one time. Only define a folder here."),
|
||||||
|
|
|
@ -51,6 +51,7 @@
|
||||||
|
|
||||||
{{include file="field_input.tpl" field=$sitename}}
|
{{include file="field_input.tpl" field=$sitename}}
|
||||||
{{include file="field_textarea.tpl" field=$banner}}
|
{{include file="field_textarea.tpl" field=$banner}}
|
||||||
|
{{include file="field_textarea.tpl" field=$info}}
|
||||||
{{include file="field_select.tpl" field=$language}}
|
{{include file="field_select.tpl" field=$language}}
|
||||||
{{include file="field_select.tpl" field=$theme}}
|
{{include file="field_select.tpl" field=$theme}}
|
||||||
{{include file="field_select.tpl" field=$theme_mobile}}
|
{{include file="field_select.tpl" field=$theme_mobile}}
|
||||||
|
@ -108,6 +109,7 @@
|
||||||
{{include file="field_input.tpl" field=$lockpath}}
|
{{include file="field_input.tpl" field=$lockpath}}
|
||||||
{{include file="field_input.tpl" field=$temppath}}
|
{{include file="field_input.tpl" field=$temppath}}
|
||||||
{{include file="field_input.tpl" field=$basepath}}
|
{{include file="field_input.tpl" field=$basepath}}
|
||||||
|
{{include file="field_checkbox.tpl" field=$suppress_language}}
|
||||||
|
|
||||||
<h3>{{$performance}}</h3>
|
<h3>{{$performance}}</h3>
|
||||||
{{include file="field_checkbox.tpl" field=$use_fulltext_engine}}
|
{{include file="field_checkbox.tpl" field=$use_fulltext_engine}}
|
||||||
|
|
Loading…
Reference in a new issue