sakura/comments.php

113 lines
7.2 KiB
PHP
Raw Normal View History

2018-05-26 18:59:29 +08:00
<?php
/**
* COMMENTS TEMPLATE
*/
/*if('comments.php' == basename($_SERVER['SCRIPT_FILENAME']))
2019-10-31 13:33:52 +08:00
die(__('Please do not load this page directly.', 'akina'));*/
2018-05-26 18:59:29 +08:00
if(post_password_required()){
return;
}
?>
<?php if(comments_open()): ?>
<section id="comments" class="comments">
<div class="commentwrap comments-hidden">
2019-10-31 13:33:52 +08:00
<div class="notification"><i class="iconfont icon-mark"></i><?php _e('view comments', 'sakura'); /*查看评论*/?> -
2019-11-01 21:06:51 +08:00
<span class="noticom"><?php comments_number('NOTHING', '1'.__(" comment","sakura"), '%'.__(" comments","sakura")); ?> </span>
2018-05-26 18:59:29 +08:00
</div>
</div>
<div class="comments-main">
2019-11-01 21:06:51 +08:00
<h3 id="comments-list-title">Comments | <span class="noticom"><?php comments_number('NOTHING', '1'.__(" comment","sakura"), '%'.__(" comments","sakura")); ?> </span></h3>
2018-05-26 18:59:29 +08:00
<div id="loading-comments"><span></span></div>
<?php if(have_comments()): ?>
<ul class="commentwrap">
<?php wp_list_comments('type=comment&callback=akina_comment_format'); ?>
</ul>
<nav id="comments-navi">
<?php paginate_comments_links('prev_text=« Older&next_text=Newer »');?>
</nav>
<?php else : ?>
<?php if(comments_open()): ?>
<div class="commentwrap">
2019-10-31 13:33:52 +08:00
<div class="notification-hidden"><i class="iconfont icon-mark"></i> <?php _e('no comment', 'sakura'); /*暂无评论*/?></div>
2018-05-26 18:59:29 +08:00
</div>
<?php endif; ?>
<?php endif; ?>
<?php
if(comments_open()){
2019-11-01 15:10:33 +08:00
if(akina_option('norobot')) $robot_comments = '<label class="siren-checkbox-label"><input class="siren-checkbox-radio" type="checkbox" name="no-robot"><span class="siren-no-robot-checkbox siren-checkbox-radioInput"></span>'.__('I\'m not a robot', 'sakura').'</label>';
$private_ms = akina_option('open_private_message') ? '<label class="siren-checkbox-label"><input class="siren-checkbox-radio" type="checkbox" name="is-private"><span class="siren-is-private-checkbox siren-checkbox-radioInput"></span>'.__('Comment in private', 'sakura').'</label>' : '';
$mail_notify = akina_option('mail_notify') ? '<label class="siren-checkbox-label"><input class="siren-checkbox-radio" type="checkbox" name="mail-notify"><span class="siren-mail-notify-checkbox siren-checkbox-radioInput"></span>'.__('Comment reply notify', 'sakura').'</label>' : '';
2018-05-26 18:59:29 +08:00
$args = array(
'id_form' => 'commentform',
'id_submit' => 'submit',
'title_reply' => '',
2019-10-31 13:33:52 +08:00
'title_reply_to' => '<div class="graybar"><i class="fa fa-comments-o"></i>' . __('Leave a Reply to', 'sakura') . ' %s' . '</div>',
'cancel_reply_link' => __('Cancel Reply', 'sakura'),
'label_submit' => __('BiuBiuBiu~', 'sakura'),
2019-11-01 15:10:33 +08:00
'comment_field' => '<p><i class="iconfont icon-markdown"></i> Markdown Supported while <i class="fa fa-code" aria-hidden="true"></i> Forbidden</p><div class="comment-textarea"><textarea placeholder="' . __("You are a surprise that I will only meet once in my life", "sakura") . ' ..." name="comment" class="commentbody" id="comment" rows="5" tabindex="4"></textarea><label class="input-label">' . __("You are a surprise that I will only meet once in my life", "sakura") . ' ...</label></div>
2018-05-26 18:59:29 +08:00
<div id="upload-img-show"></div>
<!--插入表情面版-->
<p id="emotion-toggle" class="no-select">
2019-10-31 13:33:52 +08:00
<span class="emotion-toggle-off">' . __("Click me OωO", "sakura")/*戳我试试 OωO*/ . '</span>
2019-11-01 15:10:33 +08:00
<span class="emotion-toggle-on">' . __("Woooooow ヾ(≧∇≦*)ゝ", "sakura")/*嘿嘿嘿 ヾ(≧∇≦*)ゝ*/ . '</span>
2018-05-26 18:59:29 +08:00
</p>
<div class="emotion-box no-select">
<table class="motion-switcher-table">
<tr>
<th onclick="motionSwitch(\'.bili\')"
class="bili-bar on-hover">bilibili~</th>
<th onclick="motionSwitch(\'.menhera\')"
class="menhera-bar">(=・ω・=)</th>
<th onclick="motionSwitch(\'.tieba\')"
class="tieba-bar">Tieba</th>
</tr>
</table>
<div class="bili-container motion-container">' . push_bili_smilies() . '</div>
<div class="menhera-container motion-container" style="display:none;">
'.push_emoji_panel().'
</div>
<div class="tieba-container motion-container" style="display:none;">' . push_smilies() . '</div>
</div>
<!--表情面版完-->',
'comment_notes_after' => '',
'comment_notes_before' => '',
'fields' => apply_filters( 'comment_form_default_fields', array(
2019-02-16 11:02:15 +08:00
'avatar' => '<div class="cmt-info-container"><div class="comment-user-avatar"><img src="https://gravatar.shino.cc/avatar/f11f237b3de93c93b24045e71f7f65c6?s=80&d=mm&r=g"><div class="socila-check qq-check"><i class="fa fa-qq" aria-hidden="true"></i></div><div class="socila-check gravatar-check"><i class="fa fa-google" aria-hidden="true"></i></div></div>',
2018-05-26 18:59:29 +08:00
'author' =>
2019-11-01 15:10:33 +08:00
'<div class="popup cmt-popup cmt-author" onclick="cmt_showPopup(this)"><span class="popuptext" id="thePopup" style="margin-left: -115px;width: 230px;">' . __("Auto pull nickname and avatar with a QQ num. entered", "sakura")/*输入QQ号将自动拉取昵称和头像*/ . '</span><input type="text" placeholder="' . __("Nickname or QQ number", "sakura") /*昵称或QQ号*/. ' ' . ( $req ? '(' . __("Name* ", "sakura") . ')' : '') . '" name="author" id="author" value="' . esc_attr($comment_author) . '" size="22" autocomplete="off" tabindex="1" ' . ($req ? "aria-required='true'" : '' ). ' /></div>',
2018-05-26 18:59:29 +08:00
'email' =>
2019-11-01 15:10:33 +08:00
'<div class="popup cmt-popup" onclick="cmt_showPopup(this)"><span class="popuptext" id="thePopup" style="margin-left: -65px;width: 130px;">' . __("You\' receive notification by email", "sakura")/*你将收到回复通知*/ . '</span><input type="text" placeholder="' . __("email", "sakura") . ' ' . ( $req ? '(' . __("Must* ", "sakura") . ')' : '') . '" name="email" id="email" value="' . esc_attr($comment_author_email) . '" size="22" tabindex="1" autocomplete="off" ' . ($req ? "aria-required='true'" : '' ). ' /></div>',
2018-05-26 18:59:29 +08:00
'url' =>
2019-11-01 15:10:33 +08:00
'<div class="popup cmt-popup" onclick="cmt_showPopup(this)"><span class="popuptext" id="thePopup" style="margin-left: -55px;width: 110px;">' . __("Advertisement is forbidden 😀", "sakura")/*禁止小广告😀*/ . '</span><input type="text" placeholder="' . __("Site", "sakura") . '" name="url" id="url" value="' . esc_attr($comment_author_url) . '" size="22" autocomplete="off" tabindex="1" /></div></div>' . $robot_comments . $private_ms . $mail_notify ,
2018-05-26 18:59:29 +08:00
'qq' =>
2019-10-31 13:33:52 +08:00
'<input type="text" placeholder="QQ" name="new_field_qq" id="qq" value="' . esc_attr($comment_author_url) . '" style="display:none" autocomplete="off"/><!--此栏不可见-->'
2018-05-26 18:59:29 +08:00
)
)
);
comment_form($args);
}
?>
</div>
</section>
<?php endif; ?>