From ada941a0b0c1533d4707248c172ff1254e708da2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B5=AA=E5=AD=90?= Date: Thu, 11 Jul 2024 08:27:33 +0800 Subject: [PATCH] 1.0.2 --- comments.php | 454 ++++++++++++++++++++++++++++++++++++++++++++++++++ footer.php | 3 +- functions.php | 4 +- header.php | 1 + index.php | 2 +- 5 files changed, 461 insertions(+), 3 deletions(-) create mode 100644 comments.php diff --git a/comments.php b/comments.php new file mode 100644 index 0000000..c9f1c9e --- /dev/null +++ b/comments.php @@ -0,0 +1,454 @@ + +
+ comments()->to($comments); ?> + allow('comment')): ?> + is('attachment')) : ?> + + +

+ commentsNum(_t('0'), _t('1'), _t('%d')); ?> +

+
    + have()): ?> + listComments(); ?> + pageNav( + '', + '', + 1, + '...', + array( + 'wrapTag' => 'div', + 'wrapClass' => 'pagination_page', + 'itemTag' => '', + 'textTag' => 'a', + 'currentClass' => 'active', + 'prevClass' => 'prev', + 'nextClass' => 'next' + ) + ); + ?> + +

    + +
    + +
    + user->hasLogin()): ?> +

    + + user->screenName(); ?>. + »

    + + +

    + +

    +

    + options->commentsRequireMail): ?> required /> +

    +

    + options->commentsRequireURL): ?> required /> +

    + +

    + +

    + +

    + +

    +
    +
    + + + + + options->twikoo(); ?> +
    +authorId) { + if ($comments->authorId == $comments->ownerId) { + $commentClass .= ' comment-by-author'; + } else { + $commentClass .= ' comment-by-user'; + } + } + $depth = $comments->levels + 1; + ?> +
  1. +
    +
    +
    + url): ?> + gravatar('40', ''); ?> + + gravatar('40', ''); ?> + +
    +
    +
    author; ?> +
    date('Y-m-d H:i'); ?>
    + + reply(''); ?> + +
    +
    +
    +
    + content(); ?> +
    +
    + children) { ?> +
      + threadedComments($options); ?> +
    + +
  2. + +
      + comments()->to($comments); ?> + next()): ?> + +
    + \ No newline at end of file diff --git a/footer.php b/footer.php index 8bc4998..861cd7a 100644 --- a/footer.php +++ b/footer.php @@ -2,11 +2,12 @@ diff --git a/functions.php b/functions.php index 68cdf09..fd88d98 100644 --- a/functions.php +++ b/functions.php @@ -11,6 +11,8 @@ function themeConfig($form) { $form->addInput($linksurl); $abouturl = new Typecho_Widget_Helper_Form_Element_Text('abouturl', NULL, NULL, _t('关于页面地址'), _t('关于页面地址')); $form->addInput($abouturl); + $addsns = new Typecho_Widget_Helper_Form_Element_Textarea('addsns', NULL, NULL, _t('自定义联系方式'), _t('头像下方的联系方式,具体使用查看使用文档')); + $form->addInput($addsns); $addmenu = new Typecho_Widget_Helper_Form_Element_Textarea('addmenu', NULL, NULL, _t('自定义菜单'), _t('具体查看使用文档')); $form->addInput($addmenu); $showgd = new Typecho_Widget_Helper_Form_Element_Radio('showgd', @@ -19,7 +21,7 @@ function themeConfig($form) { $form->addInput($showgd); $showmod = new Typecho_Widget_Helper_Form_Element_Radio('showmod', array('0'=> _t('否'), '1'=> _t('是')), - '0', _t('是否使用魔改风格'), _t('选择“是”将展示。')); + '0', _t('是否使用MOD风格'), _t('选择“是”将展示。')); $form->addInput($showmod); $instagramurl = new Typecho_Widget_Helper_Form_Element_Text('instagramurl', NULL, NULL, _t('Instagram'), _t('会在个人信息显示')); $form->addInput($instagramurl); diff --git a/header.php b/header.php index a07ac07..dc7704e 100644 --- a/header.php +++ b/header.php @@ -45,6 +45,7 @@ +options->addsns() ?>