{"id":39823397,"url":"https://github.com/extra-chill/extrachill-community","last_synced_at":"2026-01-18T13:01:22.494Z","repository":{"id":312338357,"uuid":"760255019","full_name":"Extra-Chill/extrachill-community","owner":"Extra-Chill","description":"community.extrachill.com WordPress plugin. Extends bbPress","archived":false,"fork":false,"pushed_at":"2025-12-21T01:43:24.000Z","size":3252,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-12-21T08:52:20.976Z","etag":null,"topics":["bbpress","wordpress-theme"],"latest_commit_sha":null,"homepage":"https://community.extrachill.com","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Extra-Chill.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2024-02-20T04:24:58.000Z","updated_at":"2025-12-21T01:43:27.000Z","dependencies_parsed_at":"2025-11-28T06:07:44.791Z","dependency_job_id":null,"html_url":"https://github.com/Extra-Chill/extrachill-community","commit_stats":null,"previous_names":["extra-chill/community","extra-chill/extrachill-community"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Extra-Chill/extrachill-community","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Extra-Chill%2Fextrachill-community","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Extra-Chill%2Fextrachill-community/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Extra-Chill%2Fextrachill-community/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Extra-Chill%2Fextrachill-community/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Extra-Chill","download_url":"https://codeload.github.com/Extra-Chill/extrachill-community/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Extra-Chill%2Fextrachill-community/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28536686,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-18T10:13:46.436Z","status":"ssl_error","status_checked_at":"2026-01-18T10:13:11.045Z","response_time":98,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bbpress","wordpress-theme"],"created_at":"2026-01-18T13:01:20.298Z","updated_at":"2026-01-18T13:01:22.472Z","avatar_url":"https://github.com/Extra-Chill.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Extra Chill Community Plugin\n\nA WordPress plugin for the Extra Chill community platform providing forum enhancements and bbPress integration. Works with the extrachill theme to provide community functionality for community.extrachill.com.\n\n **Version**: 1.2.3\n\n## Overview\n\n**Extra Chill Community** is a WordPress plugin providing community functionality:\n- `community.extrachill.com` - Main community platform (WordPress/bbPress) **[Uses extrachill theme + this plugin]**\n- `extrachill.com` - Main website **[Uses extrachill theme + cross-domain integration]**\n\n## Plugin Basics\n\n```bash\ncomposer install\n```\n\n### Automatic Setup\n\nWhen you activate the plugin, it automatically creates all required pages and forums for you:\n\n**Pages Created** (5 total):\n- **Settings** (`/settings`) - Account settings, email, password, subscriptions\n- **Notifications** (`/notifications`) - User notification display\n- **Recent Activity** (`/recent`) - Community activity feed\n- **Leaderboard** (`/leaderboard`) - User rankings and points\n- **Blog Comments** (`/blog-comments`) - Main blog comments aggregation\n\n**Forums Created** (2 total):\n- **Local Scenes** (`/r/local-scenes`) - Discuss local music scenes\n- **Music Discussion** (`/r/music-discussion`) - General music discussion\n\nNo manual page creation needed - everything is ready to use immediately after activation!\n\n### Plugin Structure\n\n```\nextrachill-community/\n├── extrachill-community.php      # Main plugin file\n├── inc/                          # Core plugin functionality\n│   ├── core/                     # Assets, bbPress templates, breadcrumb filter, page templates, spam adjustments, sidebar, nav, cache invalidation (8 files)\n│   ├── content/                  # Editor (2), content filters, recent feed, main site comments, subforum button classes (6 files)\n│   ├── social/                   # Upvoting, mentions, badges\n│   │   ├── notifications/        # Notification system (7 files)\n│   │   └── rank-system/          # Point calculation, forum rank (2 files)\n│   ├── user-profiles/            # Profiles, verification (2 files)\n│   │   ├── settings/             # Settings content and form handler (2 files)\n│   │   └── edit/                 # User links, user info, avatar upload (3 files)\n│   ├── home/                     # Homepage components (7 files)\n│   └── assets/                   # CSS and JS files\n│       ├── css/                  # 11 CSS files\n│       └── js/                   # 6 JavaScript files\n├── page-templates/               # Custom page templates (3 templates)\n├── bbpress/                      # bbPress template overrides\n└── vendor/                       # Composer dependencies\n```\n\n## Plugin Dependencies\n\n### Required Plugins\n- **bbPress** - Forum functionality (enforced via plugin headers)\n- **extrachill theme** - Template integration and styling\n\n### Optional Plugin Integration\n\n**extrachill-artist-platform**:\n- Provides `ec_can_create_artist_profiles($user_id)` for artist permission checks\n- Artist status badges display in forums\n- Artist platform homepage buttons on community homepage\n\n**extrachill-users**:\n- Provides `ec_is_team_member($user_id)` for team member badge system\n- Supports manual admin overrides for team member status\n- Provides `ec_avatar_menu_items` filter for cross-plugin navigation\n\n### Cross-Site Integration\n- Main site (blog ID 1) data aggregation for user profiles\n- Post count display from extrachill.com\n- Comment aggregation from main site blog\n- Point calculation includes main site post contributions (10pts each)\n\n## Core Features\n\nThe plugin integrates deeply with bbPress for forum functionality, with optional integrations to extrachill-artist-platform (artist badges and CTAs) and extrachill-users (team member badges and avatar menu). All integrations use function_exists() checks for graceful degradation when optional plugins are not active.\n\n### 1. Forum Features System\n\n**Explicit Loading Pattern** - All functionality loaded in `extrachill_community_init()`:\n```php\n// Main plugin file uses 36 direct require_once statements (NO master loader file)\n// Load order: core (8) → content (6) → social (11) → user-profiles (7) → home (4)\n\n// Core features (8 files): assets, bbPress templates, breadcrumb filter, page templates, spam adjustments, sidebar, nav, cache invalidation\n// Content features (6 files): TinyMCE editor (2), content filters, recent feed, main site comments, subforum button classes\n// Social features (11 files): upvoting, badges, rank system (2), notifications (7)\n// User profile features (7 files): profiles, verification, settings (2), edit (3)\n// Home features (4 files): latest post, actions, forum display, artist platform buttons\n\n// Total: 36 files loaded in init function\n\n// Deprecated (not loaded): inc/social/user-mention-api.php (moved to extrachill-api plugin)\n// Moved to extrachill-users plugin: Avatar system, online-users-count.php, user-avatar-menu.php\n```\n\n**bbPress Integration**:\n```php\n// Plugin enhances bbPress functionality with conditional loading\nif (bbp_is_forum_archive() || is_front_page() || bbp_is_single_forum()) {\n    wp_enqueue_style('community-home',\n        EXTRACHILL_COMMUNITY_PLUGIN_URL . '/inc/assets/css/home.css',\n        ['extra-chill-community-style'],\n        filemtime(EXTRACHILL_COMMUNITY_PLUGIN_DIR . '/inc/assets/css/home.css')\n    );\n}\n```\n\n### 2. Homepage Integration\n\nCommunity homepage content is rendered on `community.extrachill.com` via the theme action hook `extrachill_homepage_content`.\n\n### 3. User Management \u0026 Notifications\n\n**User Profile System**:\n```php\n// User can add multiple social/music platform links\n$existing_links = get_user_meta($user_id, '_user_profile_dynamic_links', true);\n\n// Supported link types: website, instagram, twitter, facebook, spotify, soundcloud, bandcamp\n```\n\n**Notification System**:\n```php\n// Header notification bell with unread count\n$notifications = get_user_meta($current_user_id, 'extrachill_notifications', true);\n$unread_count = count(array_filter($notifications, function($n) { return !$n['read']; }));\n\n// User avatar dropdown menu extensible via ec_avatar_menu_items filter (provided by extrachill-users plugin)\n```\n\n### 4. Cross-Site Integration\n\n- Cross-site aggregation for profile stats uses `switch_to_blog()` / `restore_current_blog()` (e.g., main-site post/comment counts)\n- Interactive features use REST routes registered by the network-activated `extrachill-api` plugin\n\n## Development\n\n### Asset Management\n\n**CSS Loading** (11 files in inc/assets/css/):\n```php\n// Modular CSS with conditional loading\nfunction modular_bbpress_styles() {\n    if (bbp_is_forum_archive() || is_front_page() || bbp_is_single_forum()) {\n        wp_enqueue_style('community-home',\n            EXTRACHILL_COMMUNITY_PLUGIN_URL . '/inc/assets/css/home.css',\n            ['extrachill-bbpress'],\n            filemtime(EXTRACHILL_COMMUNITY_PLUGIN_DIR . '/inc/assets/css/home.css')\n        );\n    }\n}\n\n// All CSS files: bbpress.css, blog-comments-feed.css, global.css, home.css, leaderboard.css,\n// notifications.css, replies-loop.css, settings-page.css, tinymce-editor.css, topics-loop.css, user-profile.css\n```\n\n**JavaScript Architecture** (6 files in inc/assets/js/):\n```php\n// Loaded via assets.php (3 files):\n// - upvote.js (bbPress and recent page)\n// - bbpress-ui.js (bbPress only)\n// - bbpress-tinymce.js (bbPress editor contexts only)\n// - tinymce-image-upload.js (TinyMCE image upload helper)\n// - content-expand.js (recent page, blog comments feed)\n\n// Loaded independently by feature modules (2 files):\n// - manage-user-profile-links.js (by inc/user-profiles/edit/user-links.php)\n// - avatar-upload.js (by inc/user-profiles/edit/avatar-upload.php)\n\n// Removed files:\n// - custom-avatar.js (moved to extrachill-users plugin)\n```\n\n### Database Schema\n\n**Meta Fields**:\n```php\n// Theme meta fields\nget_post_meta($forum_id, '_show_on_homepage'); // Boolean for homepage display\nget_user_meta($user_id, '_user_profile_dynamic_links'); // User social links\nget_user_meta($user_id, 'ec_custom_title'); // Custom user titles\nget_user_meta($user_id, 'extrachill_notifications'); // User notification data\nget_user_meta($user_id, 'user_is_artist'); // Artist account flag\nget_user_meta($user_id, 'user_is_professional'); // Professional account flag\n```\n\n### Template System\n\n**Page Templates** (3 templates in page-templates/):\n```php\n// Template Name: Leaderboard\n// page-templates/leaderboard-template.php - Community leaderboard with user rankings\n\n// Template Name: Recent Feed\n// page-templates/recent-feed-template.php - Recent community activity\n\n// Template Name: Main Blog Comments Feed\n// page-templates/main-blog-comments-feed.php - Cross-domain blog comments\n```\n\n**Settings Page** (Hook-Based):\n```php\n// Settings page uses action hooks instead of template file\n// inc/user-profiles/settings/settings-content.php - Content rendering\n// inc/user-profiles/settings/settings-form-handler.php - Form processing\n```\n\n**bbPress Template Overrides** (bbpress/ directory):\n```php\n// Core templates:\n// - bbpress.php (main wrapper), content-single-forum.php, content-single-topic.php\n// - loop-forums.php, loop-topics.php, loop-replies.php (containers)\n// - loop-single-forum-card.php, loop-single-topic-card.php, loop-single-reply-card.php (cards)\n// - loop-subforums.php (subforum display)\n// - form-topic.php, form-reply.php (custom forms with TinyMCE)\n// - pagination-topics.php, pagination-replies.php, pagination-search.php\n// - user-profile.php, user-details.php (enhanced profiles)\n```\n\n## Configuration\n\n### Filter System\n\nThe theme provides a filter system for plugins to extend functionality without modifying theme files.\n\n#### Avatar Menu Filter\n\nThe `ec_avatar_menu_items` filter (provided by extrachill-users plugin) allows plugins to add custom menu items to the user avatar dropdown menu:\n\n```php\nadd_filter( 'ec_avatar_menu_items', 'my_plugin_avatar_menu_items', 10, 2 );\n\nfunction my_plugin_avatar_menu_items( $menu_items, $user_id ) {\n    // Example: Add custom menu items for community features\n    $is_artist = get_user_meta( $user_id, 'user_is_artist', true );\n\n    if ( $is_artist === '1' ) {\n        $menu_items[] = array(\n            'url'      =\u003e home_url( '/artist-dashboard/' ),\n            'label'    =\u003e __( 'Artist Dashboard', 'textdomain' ),\n            'priority' =\u003e 5  // Appears before settings\n        );\n    }\n\n    // Add general community menu item\n    $menu_items[] = array(\n        'url'      =\u003e home_url( '/community-features/' ),\n        'label'    =\u003e __( 'Community Features', 'textdomain' ),\n        'priority' =\u003e 10\n    );\n\n    return $menu_items;\n}\n```\n\n**Menu Item Structure:**\n- `url` (string, required) - The menu item URL\n- `label` (string, required) - The menu item display text\n- `priority` (int, optional) - Sort order (default: 10, lower = higher in menu)\n\n**Note**: This filter is PROVIDED by the extrachill-users plugin, not this plugin. Community plugin can use this filter to add menu items.\n\n### Plugin Setup\n\n```php\n// Main plugin file: extrachill_community_init() with 36 explicit require_once statements\nfunction extrachill_community_init() {\n    // Core (8): assets, bbpress-templates, breadcrumb-filter, page-templates, bbpress-spam-adjustments, sidebar, nav, cache-invalidation\n    // Content (6): tinymce (2), content-filters, recent-feed, main-site-comments, subforum-button-classes\n    // Social (11): upvote, badges, rank-system (2), notifications (7)\n    // User Profiles (7): profile, verification, settings (2), edit (3)\n    // Home (4): latest-post, actions, homepage-forum-display, artist-platform-buttons\n\n    // See extrachill-community.php lines 30-76 for complete explicit loading\n}\nadd_action('plugins_loaded', 'extrachill_community_init');\n```\n\n### Performance Optimization\n\n**bbPress Optimization**:\n```php\n// Dequeue default bbPress styles to prevent conflicts\nfunction extrachill_dequeue_bbpress_default_styles() {\n    wp_dequeue_style('bbp-default');\n}\nadd_action('wp_enqueue_scripts', 'extrachill_dequeue_bbpress_default_styles', 15);\n```\n\n## REST Endpoints (used by frontend JS)\n\nCertain interactive features use REST routes registered by the network-activated `extrachill-api` plugin.\n\n- `POST /wp-json/extrachill/v1/community/upvote`\n  - Used by `inc/assets/js/upvote.js`\n  - Delegates into `extrachill_process_upvote()` (in this plugin)\n\n(User mention autocomplete is also provided via `extrachill-api`.)\n\n## Testing\n\n```bash\n# Testing Areas:\n# 1. Plugin Loading: Verify all 36 files load via explicit require_once in extrachill_community_init()\n# 2. Forum Features: Core (8), content (6), social (11), user-profiles (7), home (4)\n# 3. Multisite Integration: WordPress authentication\n# 4. bbPress Integration: Custom templates, breadcrumb filter, stylesheet conflicts, functionality\n# 5. JavaScript Components: 3 via assets.php, 2 independent loaders\n# 6. User Management: Profiles, settings, verification, notifications\n# 7. Social Features: Upvoting, badges, rank system (2 files)\n# 8. Notification System: 7 notification files in inc/social/notifications/\n# 9. Hook-Based Components: Homepage and settings page action hooks\n# 10. User Avatar Menu: ec_avatar_menu_items filter provided by extrachill-users plugin\n```\n\n## Deployment\n\n**Production Setup**:\n1. Install plugin on community.extrachill.com WordPress\n2. Activate extrachill theme\n3. Activate bbPress plugin (required)\n4. Activate extrachill-community plugin\n5. Ensure multisite cookies are configured\n6. Run `composer install` for PHP dependencies\n\n**Domain Configuration**:\n```php\n// wp-config.php additions for cross-domain\ndefine('COOKIE_DOMAIN', '.extrachill.com');\ndefine('EXTRACHILL_API_URL', 'https://community.extrachill.com');\n\n// Note: cookie and auth behavior is configured at the network level (WordPress multisite + network plugins).\n```\n\n## Architecture Notes\n\n- **Plugin Architecture**: WordPress plugin providing community functionality that integrates with extrachill theme\n- **Theme Integration**: Works seamlessly with extrachill theme on community.extrachill.com\n- **Plugin Integration**: Works with other community plugins via filters and hooks\n- **No Build System**: Direct file inclusion, no compilation required\n- **Explicit Loading Architecture**: 36 files loaded in init function (NO master loader file)\n- **Organized Structure**: Core (8), content (6), social (11), user-profiles (7), home (4)\n- **WordPress Native**: Full compliance with WordPress plugin development standards\n- **Performance Focused**: Conditional asset loading, dynamic versioning, modular CSS (11 files), 6 JS files (3 via assets.php, 2 independent)\n- **Cross-Domain Ready**: WordPress multisite native authentication exclusively (migration complete)\n- **Hook-Based Components**: Homepage and settings use action hooks for extensibility\n- **Filter System**: ec_avatar_menu_items filter provided by extrachill-users plugin for cross-plugin integration\n\n## License\n\nGPL v2 or later - https://www.gnu.org/licenses/gpl-2.0.html\n\n## Author\n\n**Chris Huber** - https://chubes.net","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fextra-chill%2Fextrachill-community","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fextra-chill%2Fextrachill-community","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fextra-chill%2Fextrachill-community/lists"}