diff options
author | Mario Vavti <mario@mariovavti.com> | 2018-09-07 14:23:16 +0200 |
---|---|---|
committer | Mario Vavti <mario@mariovavti.com> | 2018-09-07 14:23:16 +0200 |
commit | d29415a6e2f1b89e7e9463ce337946d7bf78aa5c (patch) | |
tree | fbb0621f67ab8aba4b4cb2cb107ad9a47fc15962 /Zotlabs/Module/Channel.php | |
parent | 54fa28441c5f0bdcd9687615f4a6b7a0fab024a3 (diff) | |
download | volse-hubzilla-d29415a6e2f1b89e7e9463ce337946d7bf78aa5c.tar.gz volse-hubzilla-d29415a6e2f1b89e7e9463ce337946d7bf78aa5c.tar.bz2 volse-hubzilla-d29415a6e2f1b89e7e9463ce337946d7bf78aa5c.zip |
provide a noscript_content switch for mod channel and display
Diffstat (limited to 'Zotlabs/Module/Channel.php')
-rw-r--r-- | Zotlabs/Module/Channel.php | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/Zotlabs/Module/Channel.php b/Zotlabs/Module/Channel.php index 9d4c23e4c..dff44660c 100644 --- a/Zotlabs/Module/Channel.php +++ b/Zotlabs/Module/Channel.php @@ -71,6 +71,8 @@ class Channel extends Controller { function get($update = 0, $load = false) { + $noscript_content = get_config('system', 'noscript_content', '1'); + if($load) $_SESSION['loadtime'] = datetime_convert(); @@ -272,7 +274,7 @@ class Channel extends Controller { App::set_pager_itemspage(((intval($itemspage)) ? $itemspage : 20)); $pager_sql = sprintf(" LIMIT %d OFFSET %d ", intval(App::$pager['itemspage']), intval(App::$pager['start'])); - if((! $update) || ($load)) { + if($noscript_content || $load) { if($mid) { $r = q("SELECT parent AS item_id from item where mid like '%s' and uid = %d $item_normal AND item_wall = 1 $sql_extra limit 1", @@ -411,10 +413,17 @@ class Channel extends Controller { $o .= conversation($items,$mode,$update,$page_mode); } else { + $o .= '<noscript>'; - $o .= conversation($items,$mode,$update,'traditional'); - $o .= alt_pager(count($items)); + if($noscript_content) { + $o .= conversation($items,$mode,$update,'traditional'); + $o .= alt_pager(count($items)); + } + else { + $o .= '<div class="section-content-warning-wrapper">' . t('You must enable javascript for your browser to view this content.') . '</div>'; + } $o .= '</noscript>'; + $o .= conversation($items,$mode,$update,$page_mode); if ($mid && $items[0]['title']) |