zhihe/subscriptions

Extended subscriptions with follow_op support - Fork of flarum/subscriptions.

Fund package maintenance!
Website

Installs: 8

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 0

Forks: 0

Type:flarum-extension

v2.0.1 2025-08-12 02:13 UTC

README

Latest Stable Version Total Downloads License

An enhanced subscription system for Flarum with extended notification options and subscription analytics.

✨ Features

🎯 Follow OP Subscriptions

  • Follow OP option: Get notifications only when the original poster replies
  • Three subscription states: Following (all replies), Following OP (OP only), Ignore
  • Perfect for tutorials, guides, and serialized content where OP responses are most important

📊 Subscription Analytics

  • Display total follower count for each discussion
  • Real-time subscription counts in discussion lists
  • Visual indicators with star icons
  • Always visible metrics (shows 0 when no followers)

🌍 Multi-language Support

  • Full Chinese (Simplified) translations included
  • Seamless bilingual interface support
  • Easy to extend with additional languages

📋 Requirements

  • Flarum 1.8 or higher
  • PHP 8.0 or higher

🚀 Installation

composer require zhihe/subscriptions
php flarum extension:enable zhihe-subscriptions

⚠️ Important: This extension replaces the core flarum/subscriptions extension. Disable the original subscriptions extension before enabling this one.

🔧 Usage

For Users

  1. Following: Receive notifications for all replies to a discussion
  2. Following OP: Only get notified when the original poster responds
  3. Ignore: Stop all notifications from a discussion

For Administrators

  • Subscription counts are automatically displayed in discussion lists
  • All existing subscription data is preserved during migration
  • No additional configuration required

🗄️ Database Schema

The extension adds a new subscription type to the existing schema:

-- Extends discussion_user.subscription enum
ALTER TABLE discussion_user 
MODIFY COLUMN subscription ENUM('follow', 'ignore', 'follow_op');

🛠️ Development

Local Development Setup

git clone https://github.com/echolocked/zhihe-subscriptions.git
cd zhihe-subscriptions
composer install
cd js && npm install && npm run build

Keeping Updated

This extension maintains compatibility with the original flarum/subscriptions:

git remote add upstream https://github.com/flarum/subscriptions.git
git fetch upstream
git merge upstream/main

🤝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

📄 License

MIT License - Compatible with original Flarum subscriptions extension.

🙏 Credits

  • Based on flarum/subscriptions by the Flarum Team
  • Enhanced and maintained by the Zhihe development team

🆘 Support

Love this extension? Consider starring the repository and sharing it with the Flarum community! ⭐