diff --git a/include/conversation.php b/include/conversation.php index 3c4ff2908..68aa1fa33 100644 --- a/include/conversation.php +++ b/include/conversation.php @@ -588,6 +588,7 @@ function prepare_threads_body($a, $items, $cmnt_tpl, $page_writeable, $mode, $pr 'comment' => $comment, 'previewing' => $previewing, 'wait' => t('Please wait'), + 'thread_level' => $thread_level, ); $arr = array('item' => $item, 'output' => $tmp_item); @@ -818,6 +819,7 @@ function conversation(&$a, $items, $mode, $update, $preview = false) { 'conv' => (($preview) ? '' : array('href'=> $a->get_baseurl($ssl_state) . '/display/' . $nickname . '/' . $item['id'], 'title'=> t('View in context'))), 'previewing' => $previewing, 'wait' => t('Please wait'), + 'thread_level' => 1, ); $arr = array('item' => $item, 'output' => $tmp_item); diff --git a/include/template_processor.php b/include/template_processor.php index 46252c355..4088ddab6 100644 --- a/include/template_processor.php +++ b/include/template_processor.php @@ -63,7 +63,7 @@ if ($b[0]=="$") $b = $this->_get_var($b); $val = ($a == $b); } else if (strpos($args[2],"!=")>0){ - list($a,$b) = explode("!=",$args[2]); + list($a,$b) = array_map("trim", explode("!=",$args[2])); $a = $this->_get_var($a); if ($b[0]=="$") $b = $this->_get_var($b); $val = ($a != $b); @@ -133,6 +133,26 @@ return $ret; } + + /** + * DEBUG node + * + * {{ debug $var [$var [$var [...]]] }}{{ enddebug }} + * + * replace node with
var_dump($var, $var, ...);+ */ + private function _replcb_debug($args){ + $vars = array_map('trim', explode(" ",$args[2])); + $vars[] = $args[1]; + + $ret = "
"; + foreach ($vars as $var){ + $ret .= htmlspecialchars(var_export( $this->_get_var($var), true )); + $ret .= "\n"; + } + $ret .= ""; + return $ret; + } private function _replcb_node($m) { $node = $this->nodes[$m[1]]; diff --git a/view/head.tpl b/view/head.tpl index e5495b329..42bd92f4c 100644 --- a/view/head.tpl +++ b/view/head.tpl @@ -39,7 +39,9 @@ $("#comment-edit-text-" + id).removeClass("comment-edit-text-empty"); $("#mod-cmnt-wrap-" + id).show(); openMenu("comment-edit-submit-wrapper-" + id); + return true; } + return false; } function commentClose(obj,id) { if(obj.value == '') { @@ -48,7 +50,9 @@ $("#comment-edit-text-" + id).addClass("comment-edit-text-empty"); $("#mod-cmnt-wrap-" + id).hide(); closeMenu("comment-edit-submit-wrapper-" + id); + return true; } + return false; } diff --git a/view/theme/quattro/comment_item.tpl b/view/theme/quattro/comment_item.tpl index ea24d95cc..7d1d7550b 100644 --- a/view/theme/quattro/comment_item.tpl +++ b/view/theme/quattro/comment_item.tpl @@ -10,8 +10,8 @@