]> git.mxchange.org Git - friendica.git/commitdiff
restore old comment behaviour when threading turned off
authorfriendica <info@friendica.com>
Wed, 22 Aug 2012 02:41:50 +0000 (19:41 -0700)
committerfriendica <info@friendica.com>
Wed, 22 Aug 2012 02:41:50 +0000 (19:41 -0700)
include/conversation.php
view/comment_item.tpl
view/theme/duepuntozero/comment_item.tpl
view/theme/duepuntozero/style.css

index ee8e73cebe5d67750f7db4947151961b20e8db0c..f7d0298124044deb3eac8253321584880eb7e779 100644 (file)
@@ -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'],
index b2be6f94e3f15daea20319a947ce02f9ea65dd41..98173aa3067abc98f57255660f5f034d134ef95a 100644 (file)
@@ -1,6 +1,10 @@
                <div class="comment-wwedit-wrapper" id="comment-edit-wrapper-$id" style="display: block;">
+                       {{ if $threaded }}
                        <span id="hide-commentbox-$id" class="hide-commentbox fakelink" onclick="showHideCommentBox($id);">$comment</span>
                        <form class="comment-edit-form" style="display: none;" id="comment-edit-form-$id" action="item" method="post" onsubmit="post_comment($id); return false;">
+                       {{ else }}
+                       <form class="comment-edit-form" style="display: block;" id="comment-edit-form-$id" action="item" method="post" onsubmit="post_comment($id); return false;">
+                       {{ endif }}
                                <input type="hidden" name="type" value="$type" />
                                <input type="hidden" name="profile_uid" value="$profile_uid" />
                                <input type="hidden" name="parent" value="$parent" />
index 63c05f335c989dc11077118fd16ad7cf4564e41e..f64ae753b6c82b26289021bd051280d5c3c947e6 100755 (executable)
@@ -1,6 +1,10 @@
                <div class="comment-wwedit-wrapper" id="comment-edit-wrapper-$id" style="display: block;">
+                       {{ if $threaded }}
                        <span id="hide-commentbox-$id" class="hide-commentbox fakelink" onclick="showHideCommentBox($id);">$comment</span>
                        <form class="comment-edit-form" style="display: none;" id="comment-edit-form-$id" action="item" method="post" onsubmit="post_comment($id); return false;">
+                       {{ else }}
+                       <form class="comment-edit-form" style="display: block;" id="comment-edit-form-$id" action="item" method="post" onsubmit="post_comment($id); return false;">
+                       {{ endif }}
                                <input type="hidden" name="type" value="$type" />
                                <input type="hidden" name="profile_uid" value="$profile_uid" />
                                <input type="hidden" name="parent" value="$parent" />
index 8a09792f48616b0c1dc60204662f9068adb7a3b6..5207cedf0db9ed714288dffb85f14461dd90a69d 100644 (file)
@@ -938,6 +938,9 @@ input#dfrn-url {
 .tread-wrapper .tread-wrapper {
        margin-left: 50px;
 }
+.tread-wrapper .wall-item-comment-wrapper {
+       margin-left: 50px;
+}
 
 .tread-end-wrapper {
        margin-left: 50px;