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

View File

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