diff --git a/.gitignore b/.gitignore index b3ccd78..d65bccc 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ tooot.php Parsedown.php +/assets/images/covers diff --git a/functions.php b/functions.php index 4d209a1..2ab6167 100644 --- a/functions.php +++ b/functions.php @@ -22,6 +22,11 @@ function themeConfig($form) { $form->addInput($twitterurl); $mastodonurl = new Typecho_Widget_Helper_Form_Element_Text('mastodonurl', NULL, NULL, _t('mastodon'), _t('会在个人信息显示')); $form->addInput($mastodonurl); + $friendlyTime = new Typecho_Widget_Helper_Form_Element_Radio('friendlyTime', + array('0' => _t('否'), + '1' => _t('是')), + '0', _t('是否显示友好时间'), _t('默认不显示友好时间,显示标准时间格式')); + $form->addInput($friendlyTime); $showProfile = new Typecho_Widget_Helper_Form_Element_Radio('showProfile', array('0'=> _t('否'), '1'=> _t('是')), '0', _t('是否在文章页面显示作者信息'), _t('选择"是"将在文章页面包含显示作者信息。')); @@ -193,22 +198,15 @@ function getPermalinkFromCoid($coid) { */ class ImageStructureProcessor { public static function processContent($content, $widget, $lastResult = null) { - // 首先应用之前的过滤器结果 $content = empty($lastResult) ? $content : $lastResult; - - // 检查内容是否为空 if (empty($content) || !is_string($content)) { return $content; } if ($widget instanceof Widget_Archive) { try { - // 使用 DOM 操作确保结构完整性 $dom = new DOMDocument('1.0', 'UTF-8'); - // 添加错误处理 libxml_use_internal_errors(true); - // 添加基础 HTML 结构以确保正确解析 $content = '