use URLs for linking to comments

This commit is contained in:
Shish 2012-03-13 16:04:50 +00:00
parent e31b6af28b
commit b4fb667eaa
2 changed files with 3 additions and 3 deletions

View File

@ -203,7 +203,7 @@ class CommentListTheme extends Themelet {
$hash = md5(strtolower($comment->owner_email));
$h_avatar = "<img src=\"http://www.gravatar.com/avatar/$hash.jpg\"><br>";
}
$h_reply = " - <a href='javascript: replyTo($i_image_id, $i_comment_id)'>Reply</a>";
$h_reply = " - <a href='javascript: replyTo($i_image_id, $i_comment_id, \"$h_name\")'>Reply</a>";
$h_ip = $user->can("view_ip") ? "<br>".show_ip($comment->poster_ip, "Comment posted {$comment->posted}") : "";
$h_del = $user->can("delete_comment") ?
' - <a onclick="return confirm(\'Delete comment by '.$h_name.':\\n'.$stripped_nonl.'\');" '.

View File

@ -164,9 +164,9 @@ function deleteCookie( name, path, domain ) {
";expires=Thu, 01-Jan-1970 00:00:01 GMT";
}
function replyTo(imageId, commentId) {
function replyTo(imageId, commentId, userId) {
var box = $("#comment_on_"+imageId);
var text = ">>"+imageId+"#c"+commentId+": ";
var text = "[url=site://post/view/"+imageId+"#c"+commentId+"]@"+userId+"[/url]: ";
box.focus();
box.val(box.val() + text);