diff options
-rwxr-xr-x | boot.php | 5 | ||||
-rw-r--r-- | doc/Privacy.md | 3 | ||||
-rw-r--r-- | doc/hidden_configs.bb | 4 | ||||
-rw-r--r-- | mod/new_channel.php | 2 | ||||
-rw-r--r-- | mod/register.php | 2 | ||||
-rw-r--r-- | mod/settings.php | 8 | ||||
-rw-r--r-- | view/js/main.js | 17 | ||||
-rwxr-xr-x | view/tpl/head.tpl | 1 | ||||
-rwxr-xr-x | view/tpl/settings_display.tpl | 1 |
9 files changed, 30 insertions, 13 deletions
@@ -992,6 +992,10 @@ class App { if ($user_scalable === false) $user_scalable = 1; + $preload_images = ((local_channel()) ? get_pconfig(local_channel(),'system','preload_images') : 0); + if ($preload_images === false) + $preload_images = 0; + $interval = ((local_channel()) ? get_pconfig(local_channel(),'system','update_interval') : 80000); if($interval < 10000) $interval = 80000; @@ -1005,6 +1009,7 @@ class App { */ $tpl = get_markup_template('head.tpl'); $this->page['htmlhead'] = replace_macros($tpl, array( + '$preload_images' => $preload_images, '$user_scalable' => $user_scalable, '$baseurl' => $this->get_baseurl(), '$local_channel' => local_channel(), diff --git a/doc/Privacy.md b/doc/Privacy.md index ff5eac181..511293c52 100644 --- a/doc/Privacy.md +++ b/doc/Privacy.md @@ -48,10 +48,9 @@ Content (especially status posts) that you share with other networks or that you Comments to posts that were created by others and posts which are designated as forum posts belong to you as the creator/author, but the distribution of these posts is not under your direct control. These posts/comments MAY be re-distributed to others, and MAY be visible to anybody on the internet. In the case of comments, the creator of the "first message" in the thread to which you are replying controls the distribution of all comments and replies to that message. - **Private Information** -$Projectname developers will ensure that any content you provide which is designated as PRIVATE will be protected against eavesdropping - to the best of their ability. Private content is generally hidden or obscured even from hub administrators. It is also stripped from email notifications. It is difficult but NOT impossible for this content to be seen by a hub administrator. End to end encryption is provided as an optional feature and this CANNOT be seen, even by a determined administrator. +$Projectname developers will ensure that any content you provide which is designated as PRIVATE will be protected against eavesdropping - to the best of their ability. Private channel content CAN be seen in the database of every involved hub administrator, but private messages are obscured in the database. The latter means that it is very difficult, but NOT impossible for this content to be seen by a hub administrator. Private channel content and private messages are also stripped from email notifications. End to end encryption is provided as an optional feature and this CANNOT be seen, even by a determined administrator. ##Identity Privacy diff --git a/doc/hidden_configs.bb b/doc/hidden_configs.bb index af938b0a6..520abc22b 100644 --- a/doc/hidden_configs.bb +++ b/doc/hidden_configs.bb @@ -83,7 +83,9 @@ This document assumes you're an administrator. 'forum', 'forum_restricted' and 'forum_private'. Read more about permissions roles [zrl=[baseurl]/help/roles]here[/zrl]. [b]system.workflow_channel_next[/b] - The page to direct users to immediately after creating a channel. + The page to direct new members to immediately after creating a channel. + [b]system.workflow_register_next[/b] + The page to direct members to immediately after creating an account (only when auto_channel_create or UNO is enabled). [b]system.max_daily_registrations[/b] Set the maximum number of new registrations allowed on any day. Useful to prevent oversubscription after a bout of publicity diff --git a/mod/new_channel.php b/mod/new_channel.php index 630984bf2..b22a5cacb 100644 --- a/mod/new_channel.php +++ b/mod/new_channel.php @@ -130,7 +130,7 @@ function new_channel_content(&$a) { '$title' => t('Add a Channel'), '$desc' => t('A channel is your own collection of related web pages. A channel can be used to hold social network profiles, blogs, conversation groups and forums, celebrity pages, and much more. You may create as many channels as your service provider allows.'), - '$label_name' => t('Channel Name'), + '$label_name' => t('Name'), '$help_name' => t('Examples: "Bob Jameson", "Lisa and her Horses", "Soccer", "Aviation Group" '), '$label_nick' => t('Choose a short nickname'), '$nick_hub' => '@' . str_replace(array('http://','https://','/'), '', get_config('system','baseurl')), diff --git a/mod/register.php b/mod/register.php index 795de3f57..77ddfb4b1 100644 --- a/mod/register.php +++ b/mod/register.php @@ -244,7 +244,7 @@ function register_content(&$a) { '$label_invite' => t('Please enter your invitation code'), '$invite_code' => $invite_code, '$auto_create' => $auto_create, - '$label_name' => t('Channel Name'), + '$label_name' => t('Name'), '$help_name' => t('Enter your name'), '$label_nick' => t('Choose a short nickname'), '$nick_hub' => '@' . str_replace(array('http://','https://','/'), '', get_config('system','baseurl')), diff --git a/mod/settings.php b/mod/settings.php index 3ca2d1218..ea9c73435 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("The subjective page load time will be longer but the 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')), diff --git a/view/js/main.js b/view/js/main.js index ca2f3bbcb..04b317914 100644 --- a/view/js/main.js +++ b/view/js/main.js @@ -618,7 +618,7 @@ function updateConvItems(mode,data) { /* autocomplete @nicknames */ $(".comment-edit-form textarea").editor_autocomplete(baseurl+"/acl?f=&n=1"); - var bimgs = $(".wall-item-body img").not(function() { return this.complete; }); + var bimgs = ((preloadImages) ? false : $(".wall-item-body img").not(function() { return this.complete; })); var bimgcount = bimgs.length; if (bimgcount) { @@ -632,8 +632,6 @@ function updateConvItems(mode,data) { collapseHeight(); } - //collapseHeight(); - } function collapseHeight() { @@ -648,9 +646,12 @@ function collapseHeight() { if(! $(this).hasClass('divmore')) { //var trigger = $(window).scrollTop() < $(this).offset().top ? true : false; + //console.log($(this).offset().top + divmore_height - $(window).scrollTop() + cDiff - ($(".divgrow-showmore").outerHeight() * i)); // check if we will collapse some content above the visible content and compensate the diff later - if(($(this).offset().top + orgHeight - $(window).scrollTop()) < 50) { + if($(this).offset().top + divmore_height - $(window).scrollTop() + cDiff - ($(".divgrow-showmore").outerHeight() * i) < 65) { + //$(this).css('color', 'red'); + //console.log($(this).offset().top + divmore_height + ' / ' + $(window).scrollTop()); diff = orgHeight - divmore_height; cDiff = cDiff + diff; i++; @@ -739,8 +740,7 @@ function liveUpdate() { var dready = new Date(); console.log('DATA ready in: ' + (dready - dstart)/1000 + ' seconds.'); - - if(update_mode === 'update') { + if(update_mode === 'update' || preloadImages) { console.log('LOADING images...'); $('.wall-item-body, .wall-photo-item',data).imagesLoaded( function() { @@ -753,7 +753,10 @@ function liveUpdate() { $("#page-spinner").spin(false); $("#profile-jot-text-loading").spin(false); - //$(window).scrollTop($(window).scrollTop() + $("#region_2").height() - orgHeight + contentHeightDiff); + // adjust scroll position if new content was added above viewport + if(update_mode === 'update') { + $(window).scrollTop($(window).scrollTop() + $("#region_2").height() - orgHeight + contentHeightDiff); + } in_progress = false; diff --git a/view/tpl/head.tpl b/view/tpl/head.tpl index 8a007232e..322273193 100755 --- a/view/tpl/head.tpl +++ b/view/tpl/head.tpl @@ -28,6 +28,7 @@ var justifiedGalleryActive = false; {{if $channel_hash}}var channelHash = '{{$channel_hash}}';{{/if}} {{if $channel_id}}var channelId = '{{$channel_id}}';{{/if}}{{* Used in e.g. autocomplete *}} + var preloadImages = {{$preload_images}}; </script> diff --git a/view/tpl/settings_display.tpl b/view/tpl/settings_display.tpl index 02f679852..cf79671fd 100755 --- a/view/tpl/settings_display.tpl +++ b/view/tpl/settings_display.tpl @@ -65,6 +65,7 @@ {{include file="field_checkbox.tpl" field=$channel_list_mode}} {{include file="field_checkbox.tpl" field=$network_list_mode}} {{include file="field_checkbox.tpl" field=$user_scalable}} + {{include file="field_checkbox.tpl" field=$preload_images}} {{if $expert}} <div class="form-group"> <a class="btn btn-default "href="pdledit">{{$layout_editor}}</a> |