aboutsummaryrefslogtreecommitdiffstats
path: root/mod
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2016-02-17 12:32:12 +0100
committerMario Vavti <mario@mariovavti.com>2016-02-17 12:32:12 +0100
commitddbe3c7426a551420bb6ead09984333e956b3a58 (patch)
tree4289d39a2632b1f38fdecbcb9a550258da4d2631 /mod
parentb8c7b2f81df61e5068366cbdb0f18940ff5d4bf1 (diff)
downloadvolse-hubzilla-ddbe3c7426a551420bb6ead09984333e956b3a58.tar.gz
volse-hubzilla-ddbe3c7426a551420bb6ead09984333e956b3a58.tar.bz2
volse-hubzilla-ddbe3c7426a551420bb6ead09984333e956b3a58.zip
make always preload images before rendering the page a display setting
Diffstat (limited to 'mod')
-rw-r--r--mod/settings.php8
1 files changed, 7 insertions, 1 deletions
diff --git a/mod/settings.php b/mod/settings.php
index 3ca2d1218..0729415a3 100644
--- a/mod/settings.php
+++ b/mod/settings.php
@@ -155,6 +155,7 @@ function settings_post(&$a) {
$theme = ((x($_POST,'theme')) ? notags(trim($_POST['theme'])) : $a->channel['channel_theme']);
$mobile_theme = ((x($_POST,'mobile_theme')) ? notags(trim($_POST['mobile_theme'])) : '');
+ $preload_images = ((x($_POST,'preload_images')) ? intval($_POST['preload_images']) : 0);
$user_scalable = ((x($_POST,'user_scalable')) ? intval($_POST['user_scalable']) : 0);
$nosmile = ((x($_POST,'nosmile')) ? intval($_POST['nosmile']) : 0);
$title_tosource = ((x($_POST,'title_tosource')) ? intval($_POST['title_tosource']) : 0);
@@ -184,6 +185,7 @@ function settings_post(&$a) {
set_pconfig(local_channel(),'system','mobile_theme',$mobile_theme);
}
+ set_pconfig(local_channel(),'system','preload_images',$preload_images);
set_pconfig(local_channel(),'system','user_scalable',$user_scalable);
set_pconfig(local_channel(),'system','update_interval', $browser_update);
set_pconfig(local_channel(),'system','itemspage', $itemspage);
@@ -803,6 +805,9 @@ function settings_content(&$a) {
$theme_selected = (!x($_SESSION,'theme')? $default_theme : $_SESSION['theme']);
$mobile_theme_selected = (!x($_SESSION,'mobile_theme')? $default_mobile_theme : $_SESSION['mobile_theme']);
+ $preload_images = get_pconfig(local_channel(),'system','preload_images');
+ $preload_images = (($preload_images===false)? '0': $preload_images); // default if not set: 0
+
$user_scalable = get_pconfig(local_channel(),'system','user_scalable');
$user_scalable = (($user_scalable===false)? '1': $user_scalable); // default if not set: 1
@@ -836,7 +841,8 @@ function settings_content(&$a) {
'$uid' => local_channel(),
'$theme' => (($themes) ? array('theme', t('Display Theme:'), $theme_selected, '', $themes, 'preview') : false),
- '$mobile_theme' => (($mobile_themes) ? array('mobile_theme', t('Mobile Theme:'), $mobile_theme_selected, '', $mobile_themes, '') : false),
+ '$mobile_theme' => (($mobile_themes) ? array('mobile_theme', t('Mobile Theme:'), $mobile_theme_selected, '', $mobile_themes, '') : false),
+ '$preload_images' => array('preload_images', t("Preload images before rendering the page"), $preload_images, t("Subjectiv page load time will be longer but page will be ready when displayed"), $yes_no),
'$user_scalable' => array('user_scalable', t("Enable user zoom on mobile devices"), $user_scalable, '', $yes_no),
'$ajaxint' => array('browser_update', t("Update browser every xx seconds"), $browser_update, t('Minimum of 10 seconds, no maximum')),
'$itemspage' => array('itemspage', t("Maximum number of conversations to load at any time:"), $itemspage, t('Maximum of 100 items')),