From ff0e0782a571f25b902080c52a83de4f41e0eb7e Mon Sep 17 00:00:00 2001 From: friendica Date: Tue, 21 Aug 2012 19:41:50 -0700 Subject: [PATCH] restore old comment behaviour when threading turned off --- include/conversation.php | 10 +++++++++- view/comment_item.tpl | 4 ++++ view/theme/duepuntozero/comment_item.tpl | 4 ++++ view/theme/duepuntozero/style.css | 3 +++ 4 files changed, 20 insertions(+), 1 deletion(-) diff --git a/include/conversation.php b/include/conversation.php index ee8e73cebe..f7d0298124 100644 --- a/include/conversation.php +++ b/include/conversation.php @@ -508,6 +508,13 @@ function prepare_threads_body($a, $items, $cmnt_tpl, $page_writeable, $mode, $pr } } + if(intval(get_config('system','thread_allow')) && $a->theme_thread_allow) { + $comments_threaded = true; + } + else { + $comments_threaded = false; + } + if($page_writeable) { $buttons = array( 'like' => array( t("I like this \x28toggle\x29"), t("like")), @@ -524,7 +531,8 @@ function prepare_threads_body($a, $items, $cmnt_tpl, $page_writeable, $mode, $pr $qcomment = (($qc) ? explode("\n",$qc) : null); } $comment = replace_macros($cmnt_tpl,array( - '$return_path' => '', + '$return_path' => '', + '$threaded' => $comments_threaded, '$jsreload' => (($mode === 'display') ? $_SESSION['return_url'] : ''), '$type' => (($mode === 'profile') ? 'wall-comment' : 'net-comment'), '$id' => $item['item_id'], diff --git a/view/comment_item.tpl b/view/comment_item.tpl index b2be6f94e3..98173aa306 100644 --- a/view/comment_item.tpl +++ b/view/comment_item.tpl @@ -1,6 +1,10 @@
+ {{ if $threaded }} $comment