rather than <a name=foo>, stick an ID on the comment
This commit is contained in:
parent
eccea620ba
commit
aaceb99aa5
2 changed files with 2 additions and 3 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=\"$('[name=\\3]').parent().effect('highlight', {}, 5000);\">>>\\1\\2</a>", $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("/(^|\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,8 +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 '
|
||||
<a name="'.$i_comment_id.'"></a>
|
||||
<div class="comment">
|
||||
<div class="comment" id="'.$i_comment_id.'">
|
||||
<div class="info">
|
||||
'.$h_avatar.'
|
||||
'.$h_timestamp.$h_reply.$h_ip.$h_del.'
|
||||
|
|
Reference in a new issue