Merge pull request #430 from fabrixxm/master

Fix Quattro with threaded comments, small tweaks to template processor and conversation.php
This commit is contained in:
fabrixxm 2012-08-10 03:50:54 -07:00
commit e31ee9ed82
13 changed files with 254 additions and 92 deletions

View file

@ -588,6 +588,7 @@ function prepare_threads_body($a, $items, $cmnt_tpl, $page_writeable, $mode, $pr
'comment' => $comment, 'comment' => $comment,
'previewing' => $previewing, 'previewing' => $previewing,
'wait' => t('Please wait'), 'wait' => t('Please wait'),
'thread_level' => $thread_level,
); );
$arr = array('item' => $item, 'output' => $tmp_item); $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'))), 'conv' => (($preview) ? '' : array('href'=> $a->get_baseurl($ssl_state) . '/display/' . $nickname . '/' . $item['id'], 'title'=> t('View in context'))),
'previewing' => $previewing, 'previewing' => $previewing,
'wait' => t('Please wait'), 'wait' => t('Please wait'),
'thread_level' => 1,
); );
$arr = array('item' => $item, 'output' => $tmp_item); $arr = array('item' => $item, 'output' => $tmp_item);

View file

@ -63,7 +63,7 @@
if ($b[0]=="$") $b = $this->_get_var($b); if ($b[0]=="$") $b = $this->_get_var($b);
$val = ($a == $b); $val = ($a == $b);
} else if (strpos($args[2],"!=")>0){ } 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); $a = $this->_get_var($a);
if ($b[0]=="$") $b = $this->_get_var($b); if ($b[0]=="$") $b = $this->_get_var($b);
$val = ($a != $b); $val = ($a != $b);
@ -133,6 +133,26 @@
return $ret; return $ret;
} }
/**
* DEBUG node
*
* {{ debug $var [$var [$var [...]]] }}{{ enddebug }}
*
* replace node with <pre>var_dump($var, $var, ...);</pre>
*/
private function _replcb_debug($args){
$vars = array_map('trim', explode(" ",$args[2]));
$vars[] = $args[1];
$ret = "<pre>";
foreach ($vars as $var){
$ret .= htmlspecialchars(var_export( $this->_get_var($var), true ));
$ret .= "\n";
}
$ret .= "</pre>";
return $ret;
}
private function _replcb_node($m) { private function _replcb_node($m) {
$node = $this->nodes[$m[1]]; $node = $this->nodes[$m[1]];

View file

@ -39,7 +39,9 @@
$("#comment-edit-text-" + id).removeClass("comment-edit-text-empty"); $("#comment-edit-text-" + id).removeClass("comment-edit-text-empty");
$("#mod-cmnt-wrap-" + id).show(); $("#mod-cmnt-wrap-" + id).show();
openMenu("comment-edit-submit-wrapper-" + id); openMenu("comment-edit-submit-wrapper-" + id);
return true;
} }
return false;
} }
function commentClose(obj,id) { function commentClose(obj,id) {
if(obj.value == '') { if(obj.value == '') {
@ -48,7 +50,9 @@
$("#comment-edit-text-" + id).addClass("comment-edit-text-empty"); $("#comment-edit-text-" + id).addClass("comment-edit-text-empty");
$("#mod-cmnt-wrap-" + id).hide(); $("#mod-cmnt-wrap-" + id).hide();
closeMenu("comment-edit-submit-wrapper-" + id); closeMenu("comment-edit-submit-wrapper-" + id);
return true;
} }
return false;
} }

View file

@ -10,8 +10,8 @@
<div class="comment-edit-photo" id="comment-edit-photo-$id" > <div class="comment-edit-photo" id="comment-edit-photo-$id" >
<a class="comment-edit-photo-link" href="$mylink" title="$mytitle"><img class="my-comment-photo" src="$myphoto" alt="$mytitle" title="$mytitle" /></a> <a class="comment-edit-photo-link" href="$mylink" title="$mytitle"><img class="my-comment-photo" src="$myphoto" alt="$mytitle" title="$mytitle" /></a>
</div> </div>
<div class="comment-edit-photo-end"></div> <ul id="comment-edit-bb-$id"
<ul class="comment-edit-bb-$id"> class="comment-edit-bb">
<li><a class="editicon boldbb shadow" <li><a class="editicon boldbb shadow"
style="cursor: pointer;" title="$edbold" style="cursor: pointer;" title="$edbold"
onclick="insertFormatting('$comment','b', $id);"></a></li> onclick="insertFormatting('$comment','b', $id);"></a></li>
@ -37,8 +37,11 @@
style="cursor: pointer;" title="$edvideo" style="cursor: pointer;" title="$edvideo"
onclick="insertFormatting('$comment','video', $id);"></a></li> onclick="insertFormatting('$comment','video', $id);"></a></li>
</ul> </ul>
<div class="comment-edit-bb-end"></div> <textarea id="comment-edit-text-$id"
<textarea id="comment-edit-text-$id" class="comment-edit-text-empty" name="body" onFocus="commentOpen(this,$id);cmtBbOpen($id);" onBlur="commentClose(this,$id);" >$comment</textarea> class="comment-edit-text-empty"
name="body"
onFocus="commentOpen(this,$id) && cmtBbOpen($id);"
onBlur="commentClose(this,$id) && cmtBbClose($id);" >$comment</textarea>
{{ if $qcomment }} {{ if $qcomment }}
<select id="qcomment-select-$id" name="qcomment-$id" class="qcomment" onchange="qCommentInsert(this,$id);" > <select id="qcomment-select-$id" name="qcomment-$id" class="qcomment" onchange="qCommentInsert(this,$id);" >
<option value=""></option> <option value=""></option>
@ -48,14 +51,12 @@
</select> </select>
{{ endif }} {{ endif }}
<div class="comment-edit-text-end"></div>
<div class="comment-edit-submit-wrapper" id="comment-edit-submit-wrapper-$id" style="display: none;" > <div class="comment-edit-submit-wrapper" id="comment-edit-submit-wrapper-$id" style="display: none;" >
<input type="submit" onclick="post_comment($id); return false;" id="comment-edit-submit-$id" class="comment-edit-submit" name="submit" value="$submit" /> <input type="submit" onclick="post_comment($id); return false;" id="comment-edit-submit-$id" class="comment-edit-submit" name="submit" value="$submit" />
<span onclick="preview_comment($id);" id="comment-edit-preview-link-$id" class="fakelink">$preview</span> <span onclick="preview_comment($id);" id="comment-edit-preview-link-$id" class="fakelink">$preview</span>
<div id="comment-edit-preview-$id" class="comment-edit-preview" style="display:none;"></div> <div id="comment-edit-preview-$id" class="comment-edit-preview" style="display:none;"></div>
</div> </div>
<div class="comment-edit-end"></div>
</form> </form>
</div> </div>

View file

@ -1075,6 +1075,7 @@ section {
width: 710px; width: 710px;
border: 1px solid #2d2d2d; border: 1px solid #2d2d2d;
margin-top: 10px; margin-top: 10px;
background-color: #fce94f;
} }
.comment-edit-preview .contact-photo { .comment-edit-preview .contact-photo {
width: 32px; width: 32px;
@ -1091,12 +1092,17 @@ section {
padding-left: 12px; padding-left: 12px;
} }
.comment-edit-preview .wall-item-container { .comment-edit-preview .wall-item-container {
width: 700px; width: 90%;
} }
.comment-edit-preview .tread-wrapper { .comment-edit-preview .tread-wrapper {
width: 700px; width: 90%;
padding: 0; padding: 0;
margin: 10px 0; margin: 10px 0;
background-color: #fce94f;
border-bottom: 0px;
}
.comment-edit-preview .wall-item-conv {
display: none;
} }
.shiny { .shiny {
border-right: 10px solid #fce94f; border-right: 10px solid #fce94f;
@ -1143,36 +1149,64 @@ section {
height: 25px; height: 25px;
} }
/* threaded comments */ /* threaded comments */
.children {
margin-top: 1em;
}
.children .hide-comments-outer {
margin-left: 60px;
}
.children .comment-edit-preview {
width: 660px;
}
.children .comment-edit-preview .wall-item-container {
width: 610px;
}
.children .children { .children .children {
margin-left: 40px; margin-left: 40px;
} }
.children .children .wall-item-container { .children .children .wall-item-container {
width: 710px; width: 710px;
} }
.children .children .children { .children .children .comment-edit-preview {
margin-left: 40px; width: 620px;
}
.children .children .comment-edit-preview .wall-item-container {
width: 620px;
} }
.children .children .children .wall-item-container { .children .children .children .wall-item-container {
width: 670px; width: 670px;
} }
.children .children .children .children { .children .children .children .comment-edit-preview {
margin-left: 40px; width: 580px;
}
.children .children .children .comment-edit-preview .wall-item-container {
width: 580px;
} }
.children .children .children .children .wall-item-container { .children .children .children .children .wall-item-container {
width: 630px; width: 630px;
} }
.children .children .children .children .children { .children .children .children .children .comment-edit-preview {
margin-left: 40px; width: 540px;
}
.children .children .children .children .comment-edit-preview .wall-item-container {
width: 540px;
} }
.children .children .children .children .children .wall-item-container { .children .children .children .children .children .wall-item-container {
width: 590px; width: 590px;
} }
.children .children .children .children .children .comment-edit-preview {
width: 500px;
}
.children .children .children .children .children .comment-edit-preview .wall-item-container {
width: 500px;
}
.children .children .children .children .children .children { .children .children .children .children .children .children {
margin-left: 0px; margin-left: 0px;
} }
.threaded .hide-comments-outer { .children .children .children .children .children .children .hide-comments-outer {
margin-left: 20px; margin-left: 0px;
} }
/*.threaded .hide-comments-outer { margin-left: 20px; }*/
span[id^="showmore-teaser"] { span[id^="showmore-teaser"] {
background: url("showmore-bg.jpg") no-repeat center bottom; background: url("showmore-bg.jpg") no-repeat center bottom;
} }
@ -2009,25 +2043,23 @@ footer {
opacity: 0.3; opacity: 0.3;
filter: alpha(opacity=30); filter: alpha(opacity=30);
} }
[class^="comment-edit-bb"] { .comment-edit-bb {
list-style: none; list-style: none;
display: none; display: none;
margin: 0px 0 0px 60px; margin: 0px;
padding: 0px;
width: 75%; width: 75%;
} }
[class^="comment-edit-bb"] > li { .comment-edit-bb > li {
display: inline-block; display: inline-block;
margin: 10px 10px 0 0; margin: 10px 10px 0 0;
visibility: none; visibility: none;
} }
[class^="comment-edit-bb-end"] {
clear: both;
}
.editicon { .editicon {
display: inline-block; display: inline-block;
width: 16px; width: 16px;
height: 16px; height: 16px;
background-image: url(bbedit.png); background-image: url(icons/bbedit.png);
text-decoration: none; text-decoration: none;
} }
.editicon :hover { .editicon :hover {

View file

@ -1075,6 +1075,7 @@ section {
width: 710px; width: 710px;
border: 1px solid #2d2d2d; border: 1px solid #2d2d2d;
margin-top: 10px; margin-top: 10px;
background-color: #ddffdd;
} }
.comment-edit-preview .contact-photo { .comment-edit-preview .contact-photo {
width: 32px; width: 32px;
@ -1091,12 +1092,17 @@ section {
padding-left: 12px; padding-left: 12px;
} }
.comment-edit-preview .wall-item-container { .comment-edit-preview .wall-item-container {
width: 700px; width: 90%;
} }
.comment-edit-preview .tread-wrapper { .comment-edit-preview .tread-wrapper {
width: 700px; width: 90%;
padding: 0; padding: 0;
margin: 10px 0; margin: 10px 0;
background-color: #ddffdd;
border-bottom: 0px;
}
.comment-edit-preview .wall-item-conv {
display: none;
} }
.shiny { .shiny {
border-right: 10px solid #ddffdd; border-right: 10px solid #ddffdd;
@ -1143,36 +1149,64 @@ section {
height: 25px; height: 25px;
} }
/* threaded comments */ /* threaded comments */
.children {
margin-top: 1em;
}
.children .hide-comments-outer {
margin-left: 60px;
}
.children .comment-edit-preview {
width: 660px;
}
.children .comment-edit-preview .wall-item-container {
width: 610px;
}
.children .children { .children .children {
margin-left: 40px; margin-left: 40px;
} }
.children .children .wall-item-container { .children .children .wall-item-container {
width: 710px; width: 710px;
} }
.children .children .children { .children .children .comment-edit-preview {
margin-left: 40px; width: 620px;
}
.children .children .comment-edit-preview .wall-item-container {
width: 620px;
} }
.children .children .children .wall-item-container { .children .children .children .wall-item-container {
width: 670px; width: 670px;
} }
.children .children .children .children { .children .children .children .comment-edit-preview {
margin-left: 40px; width: 580px;
}
.children .children .children .comment-edit-preview .wall-item-container {
width: 580px;
} }
.children .children .children .children .wall-item-container { .children .children .children .children .wall-item-container {
width: 630px; width: 630px;
} }
.children .children .children .children .children { .children .children .children .children .comment-edit-preview {
margin-left: 40px; width: 540px;
}
.children .children .children .children .comment-edit-preview .wall-item-container {
width: 540px;
} }
.children .children .children .children .children .wall-item-container { .children .children .children .children .children .wall-item-container {
width: 590px; width: 590px;
} }
.children .children .children .children .children .comment-edit-preview {
width: 500px;
}
.children .children .children .children .children .comment-edit-preview .wall-item-container {
width: 500px;
}
.children .children .children .children .children .children { .children .children .children .children .children .children {
margin-left: 0px; margin-left: 0px;
} }
.threaded .hide-comments-outer { .children .children .children .children .children .children .hide-comments-outer {
margin-left: 20px; margin-left: 0px;
} }
/*.threaded .hide-comments-outer { margin-left: 20px; }*/
span[id^="showmore-teaser"] { span[id^="showmore-teaser"] {
background: url("showmore-bg.jpg") no-repeat center bottom; background: url("showmore-bg.jpg") no-repeat center bottom;
} }
@ -2009,25 +2043,23 @@ footer {
opacity: 0.3; opacity: 0.3;
filter: alpha(opacity=30); filter: alpha(opacity=30);
} }
[class^="comment-edit-bb"] { .comment-edit-bb {
list-style: none; list-style: none;
display: none; display: none;
margin: 0px 0 0px 60px; margin: 0px;
padding: 0px;
width: 75%; width: 75%;
} }
[class^="comment-edit-bb"] > li { .comment-edit-bb > li {
display: inline-block; display: inline-block;
margin: 10px 10px 0 0; margin: 10px 10px 0 0;
visibility: none; visibility: none;
} }
[class^="comment-edit-bb-end"] {
clear: both;
}
.editicon { .editicon {
display: inline-block; display: inline-block;
width: 16px; width: 16px;
height: 16px; height: 16px;
background-image: url(bbedit.png); background-image: url(icons/bbedit.png);
text-decoration: none; text-decoration: none;
} }
.editicon :hover { .editicon :hover {

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

View file

@ -536,6 +536,7 @@ section {
color: @CommentBoxFullColor; color: @CommentBoxFullColor;
border: 1px solid @CommentBoxFullBorderColor; border: 1px solid @CommentBoxFullBorderColor;
} }
} }
.threaded .wall-item-comment-wrapper { margin-left: 0px; } .threaded .wall-item-comment-wrapper { margin-left: 0px; }
@ -544,6 +545,7 @@ section {
width: 710px; width: 710px;
border: 1px solid @Grey5; border: 1px solid @Grey5;
margin-top: 10px; margin-top: 10px;
background-color: @JotPreviewBackgroundColor;
.contact-photo { width: 32px; height: 32px; margin-left: 16px; .contact-photo { width: 32px; height: 32px; margin-left: 16px;
/*background: url(../../../images/icons/22/user.png) no-repeat center center;*/ /*background: url(../../../images/icons/22/user.png) no-repeat center center;*/
@ -554,8 +556,13 @@ section {
} }
.wall-item-links { padding-left: 12px; } .wall-item-links { padding-left: 12px; }
.wall-item-container { width: 700px; } .wall-item-container { width: 90%; }
.tread-wrapper { width: 700px; padding: 0; margin: 10px 0;} .tread-wrapper {
width: 90%; padding: 0; margin: 10px 0;
background-color: @JotPreviewBackgroundColor;
border-bottom: 0px;
}
.wall-item-conv { display: none; }
} }
.shiny { border-right:10px solid @ShinyBorderColor; } .shiny { border-right:10px solid @ShinyBorderColor; }
@ -598,32 +605,49 @@ section {
/* threaded comments */ /* threaded comments */
.children { .children {
margin-top: 1em;
.hide-comments-outer { margin-left:60px; }
.comment-edit-preview { width: 660px;
.wall-item-container { width: 610px; }
}
& .children { & .children {
margin-left: 40px; margin-left: 40px;
.wall-item-container { width: 710px; } .wall-item-container { width: 710px; }
.comment-edit-preview { width: 620px;
.wall-item-container { width: 620px; }
}
& .children { & .children {
margin-left: 40px;
.wall-item-container { width: 670px; } .wall-item-container { width: 670px; }
.comment-edit-preview { width: 580px;
.wall-item-container { width: 580px; }
}
& .children { & .children {
margin-left: 40px;
.wall-item-container { width: 630px; } .wall-item-container { width: 630px; }
.comment-edit-preview { width: 540px;
.wall-item-container { width: 540px; }
}
& .children { & .children {
margin-left: 40px;
.wall-item-container { width: 590px; } .wall-item-container { width: 590px; }
.comment-edit-preview { width: 500px;
.wall-item-container { width: 500px; }
}
.children { .children {
margin-left: 0px; margin-left: 0px;
} .hide-comments-outer { margin-left: 0px; }
}
} }
} }
} }
} }
} }
.threaded .hide-comments-outer { margin-left: 20px; } /*.threaded .hide-comments-outer { margin-left: 20px; }*/
span[id^="showmore-teaser"]{ span[id^="showmore-teaser"]{
background: url("showmore-bg.jpg") no-repeat center bottom; background: url("showmore-bg.jpg") no-repeat center bottom;
@ -1372,25 +1396,24 @@ footer { height: 100px; display: table-row; }
/* edit buttons for comments */ /* edit buttons for comments */
.icon.dim { opacity: 0.3;filter:alpha(opacity=30); } .icon.dim { opacity: 0.3;filter:alpha(opacity=30); }
[class^="comment-edit-bb"] { .comment-edit-bb {
list-style: none; list-style: none;
display: none; display: none;
margin: 0px 0 0px 60px; margin: 0px;
padding: 0px;
width: 75%; width: 75%;
} }
[class^="comment-edit-bb"] > li { .comment-edit-bb > li {
display: inline-block; display: inline-block;
margin: 10px 10px 0 0; margin: 10px 10px 0 0;
visibility: none; visibility: none;
} }
[class^="comment-edit-bb-end"] {
clear: both;
}
.editicon { .editicon {
display: inline-block; display: inline-block;
width: 16px; width: 16px;
height: 16px; height: 16px;
background-image: url(bbedit.png); background-image: url(icons/bbedit.png);
text-decoration: none; text-decoration: none;
:hover {background-color: #ccc;} :hover {background-color: #ccc;}
} }

View file

@ -42,11 +42,21 @@ function insertFormatting(comment,BBcode,id) {
return true; return true;
} }
function cmtBbOpen(id) { function showThread(id) {
$(".comment-edit-bb-" + id).show(); $("#collapsed-comments-" + id).show()
$("#collapsed-comments-" + id + " .collapsed-comments").show()
} }
function cmtBbClose(comment, id) { function hideThread(id) {
$(".comment-edit-bb-" + id).hide(); $("#collapsed-comments-" + id).hide()
$("#collapsed-comments-" + id + " .collapsed-comments").hide()
}
function cmtBbOpen(id) {
$("#comment-edit-bb-" + id).show();
}
function cmtBbClose(id) {
$("#comment-edit-bb-" + id).hide();
} }
$(document).ready(function() { $(document).ready(function() {

View file

@ -1,6 +1,8 @@
{{ for $threads as $item }} {{ for $threads as $item }}
<div id="tread-wrapper-$item.id" class="tread-wrapper {{ if $item.threaded }}threaded{{ endif }}"> <div id="tread-wrapper-$item.id" class="tread-wrapper {{ if $item.threaded }}threaded{{ endif }}">
{{ if $item.type == tag }} {{ if $item.type == tag }}
{{ inc wall_item_tag.tpl }}{{ endinc }} {{ inc wall_item_tag.tpl }}{{ endinc }}
{{ else }} {{ else }}

View file

@ -1,3 +1,5 @@
{{ if $item.thread_level!=1 }}<div class="children">{{ endif }}
<div class="wall-item-container item-tag $item.indent"> <div class="wall-item-container item-tag $item.indent">
<div class="wall-item-item"> <div class="wall-item-item">
<div class="wall-item-info"> <div class="wall-item-info">
@ -18,8 +20,8 @@
</div> </div>
</div> </div>
{{ if $item.thread_level!=1 }}</div>{{ endif }}
{{ if $item.flatten }} {{ if $item.flatten }}
<div class="wall-item-comment-wrapper" > <div class="wall-item-comment-wrapper" >$item.comment</div>
$item.comment
</div>
{{ endif }} {{ endif }}

View file

@ -2,12 +2,24 @@
{{ else }} {{ else }}
{{if $item.comment_firstcollapsed}} {{if $item.comment_firstcollapsed}}
<div class="hide-comments-outer"> <div class="hide-comments-outer">
<span id="hide-comments-total-$item.id" class="hide-comments-total">$item.num_comments</span> <span id="hide-comments-$item.id" class="hide-comments fakelink" onclick="showHideComments($item.id);">$item.hide_text</span> <span id="hide-comments-total-$item.id"
class="hide-comments-total">$item.num_comments</span>
<span id="hide-comments-$item.id"
class="hide-comments fakelink"
onclick="showHideComments($item.id);">$item.hide_text</span>
{{ if $item.thread_level==3 }} -
<span id="hide-thread-$item-id"
class="fakelink"
onclick="showThread($item.id);">expand</span> /
<span id="hide-thread-$item-id"
class="fakelink"
onclick="hideThread($item.id);">collapse</span> thread{{ endif }}
</div> </div>
<div id="collapsed-comments-$item.id" class="collapsed-comments" style="display: none;"> <div id="collapsed-comments-$item.id" class="collapsed-comments" style="display: none;">
{{endif}} {{endif}}
{{ endif }} {{ endif }}
{{ if $item.thread_level!=1 }}<div class="children">{{ endif }}
<div class="wall-item-decor"> <div class="wall-item-decor">
<span class="icon s22 star $item.isstarred" id="starred-$item.id" title="$item.star.starred">$item.star.starred</span> <span class="icon s22 star $item.isstarred" id="starred-$item.id" title="$item.star.starred">$item.star.starred</span>
@ -93,35 +105,40 @@
<div class="wall-item-like" id="wall-item-like-$item.id">$item.like</div> <div class="wall-item-like" id="wall-item-like-$item.id">$item.like</div>
<div class="wall-item-dislike" id="wall-item-dislike-$item.id">$item.dislike</div> <div class="wall-item-dislike" id="wall-item-dislike-$item.id">$item.dislike</div>
</div> </div>
{{ if $item.threaded }}{{ if $item.comment }} {{ if $item.threaded }}{{ if $item.comment }}{{ if $item.thread_level!=1 }}
<div class="wall-item-bottom"> <div class="wall-item-bottom">
<div class="wall-item-links"></div> <div class="wall-item-links"></div>
<div class="wall-item-comment-wrapper"> <div class="wall-item-comment-wrapper">
$item.comment $item.comment
</div> </div>
</div> </div>
{{ endif }}{{ endif }} {{ endif }}{{ endif }}{{ endif }}
</div> </div>
{{ for $item.children as $item }}
<div class="children"> {{ for $item.children as $child }}
{{ if $item.type == tag }} {{ if $item.type == tag }}
{{ inc wall_item_tag.tpl }}{{ endinc }} {{ inc wall_item_tag.tpl with $item=$child }}{{ endinc }}
{{ else }} {{ else }}
{{ inc $item.template }}{{ endinc }} {{ inc $item.template with $item=$child }}{{ endinc }}
{{ endif }} {{ endif }}
</div>
{{ endfor }} {{ endfor }}
{{ if $item.thread_level!=1 }}</div>{{ endif }}
{{if $mode == display}} {{if $mode == display}}
{{ else }} {{ else }}
{{if $item.comment_lastcollapsed}}</div>{{endif}} {{if $item.comment_lastcollapsed}}</div>{{endif}}
{{ endif }} {{ endif }}
{{if $item.threaded}}{{if $item.comment}}{{if $item.thread_level==1}}
<div class="wall-item-comment-wrapper" >$item.comment</div>
{{ endif }}{{ endif }}{{ endif }}
{{ if $item.flatten }} {{ if $item.flatten }}
<div class="wall-item-comment-wrapper" > <div class="wall-item-comment-wrapper" >$item.comment</div>
$item.comment
</div>
{{ endif }} {{ endif }}

View file

@ -2,12 +2,25 @@
{{ else }} {{ else }}
{{if $item.comment_firstcollapsed}} {{if $item.comment_firstcollapsed}}
<div class="hide-comments-outer"> <div class="hide-comments-outer">
<span id="hide-comments-total-$item.id" class="hide-comments-total">$item.num_comments</span> <span id="hide-comments-$item.id" class="hide-comments fakelink" onclick="showHideComments($item.id);">$item.hide_text</span> <span id="hide-comments-total-$item.id"
class="hide-comments-total">$item.num_comments</span>
<span id="hide-comments-$item.id"
class="hide-comments fakelink"
onclick="showHideComments($item.id);">$item.hide_text</span>
{{ if $item.thread_level==3 }} -
<span id="hide-thread-$item-id"
class="fakelink"
onclick="showThread($item.id);">expand</span> /
<span id="hide-thread-$item-id"
class="fakelink"
onclick="hideThread($item.id);">collapse</span> thread{{ endif }}
</div> </div>
<div id="collapsed-comments-$item.id" class="collapsed-comments" style="display: none;"> <div id="collapsed-comments-$item.id" class="collapsed-comments" style="display: none;">
{{endif}} {{endif}}
{{ endif }} {{ endif }}
{{ if $item.thread_level!=1 }}<div class="children">{{ endif }}
<div class="wall-item-decor"> <div class="wall-item-decor">
<span class="icon s22 star $item.isstarred" id="starred-$item.id" title="$item.star.starred">$item.star.starred</span> <span class="icon s22 star $item.isstarred" id="starred-$item.id" title="$item.star.starred">$item.star.starred</span>
{{ if $item.lock }}<span class="icon s22 lock fakelink" onclick="lockview(event,$item.id);" title="$item.lock">$item.lock</span>{{ endif }} {{ if $item.lock }}<span class="icon s22 lock fakelink" onclick="lockview(event,$item.id);" title="$item.lock">$item.lock</span>{{ endif }}
@ -101,34 +114,38 @@
<div class="wall-item-dislike" id="wall-item-dislike-$item.id">$item.dislike</div> <div class="wall-item-dislike" id="wall-item-dislike-$item.id">$item.dislike</div>
</div> </div>
{{ if $item.threaded }}{{ if $item.comment }} {{ if $item.threaded }}{{ if $item.comment }}{{ if $item.indent==comment }}
<div class="wall-item-bottom"> <div class="wall-item-bottom">
<div class="wall-item-links"></div> <div class="wall-item-links"></div>
<div class="wall-item-comment-wrapper"> <div class="wall-item-comment-wrapper">
$item.comment $item.comment
</div> </div>
</div> </div>
{{ endif }}{{ endif }} {{ endif }}{{ endif }}{{ endif }}
</div> </div>
{{ for $item.children as $item }} {{ for $item.children as $child }}
<div class="children"> {{ if $item.type == tag }}
{{ if $item.type == tag }} {{ inc wall_item_tag.tpl with $item=$child }}{{ endinc }}
{{ inc wall_item_tag.tpl }}{{ endinc }} {{ else }}
{{ else }} {{ inc $item.template with $item=$child }}{{ endinc }}
{{ inc $item.template }}{{ endinc }} {{ endif }}
{{ endif }}
</div>
{{ endfor }} {{ endfor }}
{{ if $item.thread_level!=1 }}</div>{{ endif }}
{{if $mode == display}} {{if $mode == display}}
{{ else }} {{ else }}
{{if $item.comment_lastcollapsed}}</div>{{endif}} {{if $item.comment_lastcollapsed}}</div>{{endif}}
{{ endif }} {{ endif }}
{{if $item.threaded}}{{if $item.comment}}{{if $item.thread_level==1}}
<div class="wall-item-comment-wrapper" >$item.comment</div>
{{ endif }}{{ endif }}{{ endif }}
{{ if $item.flatten }} {{ if $item.flatten }}
<div class="wall-item-comment-wrapper" > <div class="wall-item-comment-wrapper" >$item.comment</div>
$item.comment
</div>
{{ endif }} {{ endif }}