prefix comment ID with c, so it isn't just a random number
This commit is contained in:
parent
aaceb99aa5
commit
f8fec8a036
3 changed files with 4 additions and 4 deletions
|
@ -38,7 +38,7 @@ class BBCode extends FormatterExtension {
|
|||
$text = preg_replace("/\[i\](.*?)\[\/i\]/s", "<i>\\1</i>", $text);
|
||||
$text = preg_replace("/\[u\](.*?)\[\/u\]/s", "<u>\\1</u>", $text);
|
||||
$text = preg_replace("/\[s\](.*?)\[\/s\]/s", "<s>\\1</s>", $text);
|
||||
$text = preg_replace("/>>(\d+)(#(\d+))?/s", "<a href=\"".make_link("post/view/\\1\\2")."\" onclick=\"$('#\\3]').effect('highlight', {}, 5000);\">>>\\1\\2</a>", $text);
|
||||
$text = preg_replace("/>>(\d+)(#c?(\d+))?/s", "<a href=\"".make_link("post/view/\\1\\2")."\" onclick=\"$('#c\\3]').effect('highlight', {}, 5000);\">>>\\1\\2</a>", $text);
|
||||
$text = preg_replace("/(^|\s)#(\d+)/s", "\\1<a href=\"#\\2\">#\\2</a>", $text);
|
||||
$text = preg_replace("/>>([^\d].+)/", "<blockquote><small>\\1</small></blockquote>", $text);
|
||||
$text = preg_replace("/\[url=((?:https?|ftp|irc|mailto):\/\/.*?)\](.*?)\[\/url\]/s", "<a href=\"\\1\">\\2</a>", $text);
|
||||
|
|
|
@ -207,7 +207,7 @@ class CommentListTheme extends Themelet {
|
|||
' - <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 '
|
||||
<div class="comment" id="'.$i_comment_id.'">
|
||||
<div class="comment" id="c'.$i_comment_id.'">
|
||||
<div class="info">
|
||||
'.$h_avatar.'
|
||||
'.$h_timestamp.$h_reply.$h_ip.$h_del.'
|
||||
|
|
|
@ -119,9 +119,9 @@ function deleteCookie( name, path, domain ) {
|
|||
|
||||
function replyTo(imageId, commentId) {
|
||||
var box = $("#comment_on_"+imageId);
|
||||
var text = ">>"+imageId+"#"+commentId+": ";
|
||||
var text = ">>"+imageId+"#c"+commentId+": ";
|
||||
|
||||
box.focus();
|
||||
box.val(box.val() + text);
|
||||
$("[name="+commentId+"]").parent().effect("highlight", {}, 5000);
|
||||
$("#c"+commentId).effect("highlight", {}, 5000);
|
||||
}
|
||||
|
|
Reference in a new issue