Subscribe
一个功能强大的 Typecho 文章订阅插件,支持手动选择文章发送给订阅者,拥有精美的邮件模板和完善的后台管理功能。
下载
开源地址:https://github.com/TGU-HansJack/Typecho-Subscribe-Plugin
🌟 特性
- ✅ 手动文章推送 - 精选文章手动发送给订阅者
- 🎨 美观邮件模板 - 现代化设计的邮件模板,支持自定义
- 📊 数据统计分析 - 订阅者增长趋势图表和详细统计
- 👥 订阅者管理 - 完整的订阅者增删改查功能
- 📧 SMTP 邮件发送 - 支持各种邮件服务商
- 🔄 订阅/退订流程 - 完整的订阅确认和退订机制
- 📱 响应式设计 - 邮件和管理界面完美适配移动端
- 📝 发送记录 - 详细的邮件发送历史记录
- 🎯 灵活选择 - 可选择特定文章和特定订阅者群体
使用方法
前端订阅表单,在主题模板中添加订阅表单:
<!-- 简单订阅表单 -->
<div class="subscribe-form">
<h3>订阅我们的文章</h3>
<form id="subscribe-form">
<input type="email" name="email" placeholder="请输入您的邮箱" required>
<input type="text" name="name" placeholder="姓名(可选)">
<button type="submit">订阅</button>
</form>
</div>
<script>
document.getElementById('subscribe-form').addEventListener('submit', function(e) {
e.preventDefault();
const formData = new FormData(this);
formData.append('do', 'subscribe');
fetch('/action/subscribe', {
method: 'POST',
body: formData
})
.then(response => response.json())
.then(data => {
alert(data.message);
if (data.success) {
this.reset();
}
})
.catch(error => {
alert('订阅失败,请稍后重试');
});
});
</script>截图
