From a88130d5c56530c33aa5ec5b718ce2fc40ca9508 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=B5=AA=E5=AD=90?=
Date: Thu, 13 Jun 2024 15:30:11 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=B8=80=E4=B8=8B=E8=AF=84?=
=?UTF-8?q?=E8=AE=BA=E5=88=97=E8=A1=A8=E5=8A=A0=E4=B8=8A@?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
comments.php | 3 +--
functions.php | 7 +++++++
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/comments.php b/comments.php
index b4c4860..c10cda5 100644
--- a/comments.php
+++ b/comments.php
@@ -64,7 +64,6 @@
user->screenName(); ?>.
»
-
@@ -88,7 +87,6 @@
-
have()): ?>
listComments(); ?>
diff --git a/functions.php b/functions.php
index a438793..d43a3a3 100644
--- a/functions.php
+++ b/functions.php
@@ -190,6 +190,13 @@ function img_postthumb($cid) {
return ""; // 没有匹配到图片URL,返回空字符串
}
}
+//回复加上@
+function getPermalinkFromCoid($coid) {
+ $db = Typecho_Db::get();
+ $row = $db->fetchRow($db->select('author')->from('table.comments')->where('coid = ? AND status = ?', $coid, 'approved'));
+ if (empty($row)) return '';
+ return '@'.$row['author'].'';
+}
//开始增加某些奇怪的东西
// 获取月份
function getMonth() {