some fixes

git-svn-id: file:///home/shish/svn/shimmie2/trunk@844 7f39781d-f577-437e-ae19-be835c7a54ca
This commit is contained in:
shish 2008-05-16 20:50:54 +00:00
parent 4e3ecd9458
commit 26fc96bf83
2 changed files with 18 additions and 7 deletions

View file

@ -55,13 +55,14 @@ class CustomCommentListTheme extends CommentListTheme {
protected function comments_to_html($comments, $trim=false) {
$html = "";
$inner_id = 0;
foreach($comments as $comment) {
$html .= $this->comment_to_html($comment, $trim);
$html .= $this->comment_to_html($comment, $trim, $inner_id++);
}
return $html;
}
protected function comment_to_html($comment, $trim=false) {
protected function comment_to_html($comment, $trim=false, $inner_id=0) {
global $user;
$tfe = new TextFormattingEvent($comment->comment);
@ -81,9 +82,15 @@ class CustomCommentListTheme extends CommentListTheme {
"onclick=\"return confirm('Delete comment by $h_name:\\n".$tfe->stripped."');\" ".
"href='".make_link("comment/delete/$i_comment_id/$i_image_id")."'>Del</a>)" : "";
$h_imagelink = $trim ? "<a href='".make_link("post/view/$i_image_id")."'>&gt;&gt;&gt;</a>\n" : "";
return "<table><tr><td nowrap class='doubledash'>&gt;&gt;</td><td>".
"<div class='comment'>$h_userlink$h_dellink $h_date No.$i_comment_id [Reply]<p>$h_comment</p></div>" .
"</td></tr></table>";
if($inner_id == 0) {
return "<div class='comment'>$h_userlink$h_dellink $h_date No.$i_comment_id [Reply]<p>$h_comment</p></div>";
}
else {
return "<table><tr><td nowrap class='doubledash'>&gt;&gt;</td><td>".
"<div class='reply'>$h_userlink$h_dellink $h_date No.$i_comment_id [Reply]<p>$h_comment</p></div>" .
"</td></tr></table>";
}
}
protected function build_postbox($image_id) {

View file

@ -42,11 +42,11 @@ A:hover {text-decoration: underline; color: #DD0000;}
clear: both;
float: left;
}
.commentset TABLE:first-child TR TD .comment {
.comment {
background: #FFFFEE;
border-width: 0px;
}
.comment {
.reply {
margin-bottom: 2px;
font-size: 10pt;
padding: 0px 5px;
@ -57,6 +57,10 @@ A:hover {text-decoration: underline; color: #DD0000;}
border-top: none;
padding: 2px;
}
.reply P {
margin-left: 32px;
margin-bottom: 0px;
}
.setupblock {
border: 1px solid #AAA;