From cbaee76dd955a4d6d6f0f0e0d364e34e12a9b827 Mon Sep 17 00:00:00 2001 From: friendica Date: Sun, 16 Nov 2014 16:19:24 -0800 Subject: "list mode" (forum and blog mode, no comments or comment boxes displayed on the summary page) --- include/ItemObject.php | 5 +- mod/channel.php | 8 ++- mod/network.php | 7 +- view/tpl/conv_list.tpl | 175 +++++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 191 insertions(+), 4 deletions(-) create mode 100755 view/tpl/conv_list.tpl diff --git a/include/ItemObject.php b/include/ItemObject.php index 9e694b8ac..ee7676bd4 100644 --- a/include/ItemObject.php +++ b/include/ItemObject.php @@ -243,6 +243,7 @@ class Item extends BaseObject { 'id' => $this->get_id(), 'linktitle' => sprintf( t('View %s\'s profile - %s'), $profile_name, $item['author']['xchan_addr']), 'olinktitle' => sprintf( t('View %s\'s profile - %s'), $this->get_owner_name(), $item['owner']['xchan_addr']), + 'llink' => $item['llink'], 'to' => t('to'), 'via' => t('via'), 'wall' => t('Wall-to-Wall'), @@ -503,12 +504,12 @@ class Item extends BaseObject { /** * Get template */ - private function get_template() { + public function get_template() { return $this->template; } - private function set_template($t) { + public function set_template($t) { $this->template = $t; } diff --git a/mod/channel.php b/mod/channel.php index 8d6b2a169..1cc2dc02c 100644 --- a/mod/channel.php +++ b/mod/channel.php @@ -293,8 +293,14 @@ function channel_content(&$a, $update = 0, $load = false) { } + if(get_pconfig($a->profile['profile_uid'],'system','channel_list_mode')) + $page_mode = 'list'; + else + $page_mode = 'client'; + + if($_COOKIE['jsAvailable'] == 1) { - $o .= conversation($a,$items,'channel',$update,'client'); + $o .= conversation($a,$items,'channel',$update,$page_mode); } else { $o .= conversation($a,$items,'channel',$update,'traditional'); } diff --git a/mod/network.php b/mod/network.php index da020c389..fd74b1887 100644 --- a/mod/network.php +++ b/mod/network.php @@ -426,7 +426,12 @@ function network_content(&$a, $update = 0, $load = false) { $mode = (($nouveau) ? 'network-new' : 'network'); - $o .= conversation($a,$items,$mode,$update,'client'); + if(get_pconfig(local_user(),'system','network_list_mode')) + $page_mode = 'list'; + else + $page_mode = 'client'; + + $o .= conversation($a,$items,$mode,$update,$page_mode); if(($items) && (! $update)) $o .= alt_pager($a,count($items)); diff --git a/view/tpl/conv_list.tpl b/view/tpl/conv_list.tpl new file mode 100755 index 000000000..86562e1f1 --- /dev/null +++ b/view/tpl/conv_list.tpl @@ -0,0 +1,175 @@ +{{if $item.comment_firstcollapsed}} + + +{{/if}} -- cgit v1.2.3