From d558d255405f6a8d35ce7fb16c175cf28de430f3 Mon Sep 17 00:00:00 2001 From: Domovoy Date: Fri, 27 Jul 2012 22:47:18 +0200 Subject: [PATCH] CommentBox is now hidden by default, this can be toggled with a fake link --- include/conversation.php | 2 -- view/comment_item.tpl | 3 ++- view/head.tpl | 9 +++++++++ view/theme/duepuntozero/comment_item.tpl | 3 ++- 4 files changed, 13 insertions(+), 4 deletions(-) diff --git a/include/conversation.php b/include/conversation.php index 2794d8ab3b..2a085666d7 100644 --- a/include/conversation.php +++ b/include/conversation.php @@ -473,7 +473,6 @@ function prepare_threads_body($a, $items, $cmnt_tpl, $page_writeable, $mode, $pr } } - logger('item, page_writeable:'. ($page_writeable ? 'yes' : 'no') .', show comment box: '. ($show_comment_box ? 'yes' : 'no'), LOGGER_DEBUG); if($page_writeable) { $buttons = array( 'like' => array( t("I like this \x28toggle\x29"), t("like")), @@ -489,7 +488,6 @@ function prepare_threads_body($a, $items, $cmnt_tpl, $page_writeable, $mode, $pr $qc = ((local_user()) ? get_pconfig(local_user(),'qcomment','words') : null); $qcomment = (($qc) ? explode("\n",$qc) : null); } - $comment = replace_macros($cmnt_tpl,array( '$return_path' => '', '$jsreload' => (($mode === 'display') ? $_SESSION['return_url'] : ''), diff --git a/view/comment_item.tpl b/view/comment_item.tpl index a1d4e1043a..b2be6f94e3 100644 --- a/view/comment_item.tpl +++ b/view/comment_item.tpl @@ -1,5 +1,6 @@
-
+ $comment + diff --git a/view/head.tpl b/view/head.tpl index 8a75a4b8e0..e5495b329f 100644 --- a/view/head.tpl +++ b/view/head.tpl @@ -96,6 +96,15 @@ } } + function showHideCommentBox(id) { + if( $('#comment-edit-form-' + id).is(':visible')) { + $('#comment-edit-form-' + id).hide(); + } + else { + $('#comment-edit-form-' + id).show(); + } + } + diff --git a/view/theme/duepuntozero/comment_item.tpl b/view/theme/duepuntozero/comment_item.tpl index ea24d95cc3..63c05f335c 100755 --- a/view/theme/duepuntozero/comment_item.tpl +++ b/view/theme/duepuntozero/comment_item.tpl @@ -1,5 +1,6 @@
- + $comment +