comment info box
This commit is contained in:
parent
aa2696ca07
commit
a9ec9b6b70
2 changed files with 20 additions and 17 deletions
|
@ -157,33 +157,37 @@ class CommentListTheme extends Themelet {
|
||||||
}
|
}
|
||||||
$stripped_nonl = str_replace("\n", "\\n", substr($tfe->stripped, 0, 50));
|
$stripped_nonl = str_replace("\n", "\\n", substr($tfe->stripped, 0, 50));
|
||||||
$stripped_nonl = str_replace("\r", "\\r", $stripped_nonl);
|
$stripped_nonl = str_replace("\r", "\\r", $stripped_nonl);
|
||||||
$h_dellink = $user->is_admin() ?
|
|
||||||
'<br>('.$h_poster_ip.', '.$h_timestamp.', <a '.
|
|
||||||
'onclick="return confirm(\'Delete comment by '.$h_name.':\\n'.$stripped_nonl.'\');" '.
|
|
||||||
'href="'.make_link('comment/delete/'.$i_comment_id.'/'.$i_image_id).'">Del</a>)' : '';
|
|
||||||
|
|
||||||
if($trim) {
|
if($trim) {
|
||||||
return '
|
return '
|
||||||
'.$h_userlink.': '.$h_comment.'
|
'.$h_userlink.': '.$h_comment.'
|
||||||
<a href="'.make_link('post/view/'.$i_image_id).'">>>></a>
|
<a href="'.make_link('post/view/'.$i_image_id).'">>>></a>
|
||||||
'.$h_dellink.'
|
|
||||||
';
|
';
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
//$avatar = "";
|
$avatar = "";
|
||||||
//if(!empty($comment->owner->email)) {
|
if(!empty($comment->owner_email)) {
|
||||||
// $hash = md5(strtolower($comment->owner->email));
|
$hash = md5(strtolower($comment->owner_email));
|
||||||
// $avatar = "<img src=\"http://www.gravatar.com/avatar/$hash.jpg\"><br>";
|
$avatar = "<img src=\"http://www.gravatar.com/avatar/$hash.jpg\"><br>";
|
||||||
//}
|
}
|
||||||
|
$a = $user->is_admin();
|
||||||
|
$h_reply = " - <a href='javascript: replyTo($i_image_id, $i_comment_id)'>Reply</a>";
|
||||||
|
$h_ip = $a ? "<br>$h_poster_ip" : "";
|
||||||
|
$h_del = $a ?
|
||||||
|
' - <a onclick="return confirm(\'Delete comment by '.$h_name.':\\n'.$stripped_nonl.'\');" '.
|
||||||
|
'href="'.make_link('comment/delete/'.$i_comment_id.'/'.$i_image_id).'">Del</a>' : '';
|
||||||
return '
|
return '
|
||||||
<a name="'.$i_comment_id.'"></a>
|
<a name="'.$i_comment_id.'"></a>
|
||||||
<div class="comment">
|
<div class="comment">
|
||||||
<!--<div class="info" style="float: right;">'.$h_timestamp.'</div>-->
|
<div class="info">
|
||||||
'.$h_userlink.': '.$h_comment.'
|
'.$avatar.'
|
||||||
'.$h_dellink.'
|
'.$h_timestamp.$h_reply.$h_ip.$h_del.'
|
||||||
|
</div>
|
||||||
|
'.$h_userlink.': '.$h_comment.'
|
||||||
</div>
|
</div>
|
||||||
';
|
';
|
||||||
}
|
}
|
||||||
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function build_postbox($image_id) {
|
protected function build_postbox($image_id) {
|
||||||
|
@ -197,7 +201,7 @@ class CommentListTheme extends Themelet {
|
||||||
'.make_form(make_link("comment/add")).'
|
'.make_form(make_link("comment/add")).'
|
||||||
<input type="hidden" name="image_id" value="'.$i_image_id.'" />
|
<input type="hidden" name="image_id" value="'.$i_image_id.'" />
|
||||||
<input type="hidden" name="hash" value="'.$hash.'" />
|
<input type="hidden" name="hash" value="'.$hash.'" />
|
||||||
<textarea name="comment" rows="5" cols="50"></textarea>
|
<textarea id="comment_on_'.$i_image_id.'" name="comment" rows="5" cols="50"></textarea>
|
||||||
'.$captcha.'
|
'.$captcha.'
|
||||||
<br><input type="submit" value="Post Comment" />
|
<br><input type="submit" value="Post Comment" />
|
||||||
</form>
|
</form>
|
||||||
|
|
|
@ -128,9 +128,8 @@ UL {
|
||||||
.comment {
|
.comment {
|
||||||
text-align: left;
|
text-align: left;
|
||||||
}
|
}
|
||||||
.comment .timeago {
|
.comment .info {
|
||||||
float: right;
|
display: none;
|
||||||
font-size: 75%;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.more:after {
|
.more:after {
|
||||||
|
|
Reference in a new issue