aboutsummaryrefslogtreecommitdiffstats
path: root/mod
diff options
context:
space:
mode:
authorredmatrix <redmatrix@redmatrix.me>2015-06-07 18:15:26 -0700
committerredmatrix <redmatrix@redmatrix.me>2015-06-07 18:15:26 -0700
commit0537ff1e4a220f08e708c7edfb53b26622d3313f (patch)
tree065442fffef8fa5dbedc6c77fb19ecdca3306408 /mod
parent65bea5e02c70dd9b08f4903e958f18efa7bff365 (diff)
downloadvolse-hubzilla-0537ff1e4a220f08e708c7edfb53b26622d3313f.tar.gz
volse-hubzilla-0537ff1e4a220f08e708c7edfb53b26622d3313f.tar.bz2
volse-hubzilla-0537ff1e4a220f08e708c7edfb53b26622d3313f.zip
frontpage tweaks
Diffstat (limited to 'mod')
-rw-r--r--mod/admin.php3
-rw-r--r--mod/home.php12
2 files changed, 10 insertions, 5 deletions
diff --git a/mod/admin.php b/mod/admin.php
index 54ee04776..830c468c1 100644
--- a/mod/admin.php
+++ b/mod/admin.php
@@ -277,6 +277,7 @@ function admin_page_site_post(&$a){
$abandon_days = ((x($_POST,'abandon_days')) ? intval(trim($_POST['abandon_days'])) : 0);
$register_text = ((x($_POST,'register_text')) ? notags(trim($_POST['register_text'])) : '');
+ $frontpage = ((x($_POST,'frontpage')) ? notags(trim($_POST['frontpage'])) : '');
$allowed_sites = ((x($_POST,'allowed_sites')) ? notags(trim($_POST['allowed_sites'])) : '');
$allowed_email = ((x($_POST,'allowed_email')) ? notags(trim($_POST['allowed_email'])) : '');
@@ -305,6 +306,7 @@ function admin_page_site_post(&$a){
set_config('system', 'delivery_interval', $delivery_interval);
set_config('system', 'poll_interval', $poll_interval);
set_config('system', 'maxloadavg', $maxloadavg);
+ set_config('system', 'frontpage', $frontpage);
set_config('system', 'sitename', $sitename);
set_config('system', 'no_login_on_homepage', $no_login_on_homepage);
set_config('system', 'verify_email', $verify_email);
@@ -464,6 +466,7 @@ function admin_page_site(&$a) {
'$register_policy' => array('register_policy', t("Does this site allow new member registration?"), get_config('system','register_policy'), "", $register_choices),
'$access_policy' => array('access_policy', t("Which best describes the types of account offered by this hub?"), get_config('system','access_policy'), "This is displayed on the public server site list.", $access_choices),
'$register_text' => array('register_text', t("Register text"), htmlspecialchars(get_config('system','register_text'), ENT_QUOTES, 'UTF-8'), t("Will be displayed prominently on the registration page.")),
+ '$frontpage' => array('frontpage', t("Site page to show visitors (default login box)"), get_config('system','frontpage'), t("example: 'public' to show public stream or 'include:home.html' to include a file.")),
'$abandon_days' => array('abandon_days', t('Accounts abandoned after x days'), get_config('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"), get_config('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"), get_config('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")),
diff --git a/mod/home.php b/mod/home.php
index 89c6596c2..9f1c77131 100644
--- a/mod/home.php
+++ b/mod/home.php
@@ -49,16 +49,18 @@ function home_content(&$a, $update = 0, $load = false) {
if($o)
return $o;
- $startpage = get_config('system','frontpage');
- if($startpage) {
- if(strpos($startpage,'include:') !== false) {
- $file = trim(str_replace('include:' , '', $startpage));
+ $frontpage = get_config('system','frontpage');
+ if($frontpage) {
+ if(strpos($frontpage,'include:') !== false) {
+ $file = trim(str_replace('include:' , '', $frontpage));
if(file_exists($file)) {
+ $a->page['template'] = 'full';
+ $a->page['title'] = t('$Projectname');
$o .= file_get_contents($file);
return $o;
}
}
- goaway($z_root() . '/' . $startpage);
+ goaway(z_root() . '/' . $frontpage);
}
$sitename = get_config('system','sitename');