Skip to content

Build a guild activity feed portal module #388

Description

@avandenberghe

Is your feature request related to a problem? Please describe.
bbguildwow's guild-activity sync (#10, shipped in bbguildwow 2.1.0/2.1.1) writes to bb_news via wow_api::sync_guild_activity(), deduplicated by news_source/news_source_key, and it's confirmed working end-to-end on the live site. But nothing in bbguild core actually reads bb_news back — there's no portal module for it. portal/modules/ currently only has motd.php, recruitment.php, roster.php, statistics.php. The feed is write-only right now: data goes in, nothing shows it to guild members.

Describe the solution you'd like
A new portal/modules/activity_feed.php implementing module_interface (see portal/modules/module_interface.php), following the existing motd.php pattern (simplest current module — single get_template_center() query + template assign):

  • get_template_center(int $module_id): SELECT news_headline, news_message, news_date, bbcode_uid, bbcode_bitfield, bbcode_options, news_source FROM bb_news WHERE guild_id = ? ORDER BY news_id DESC LIMIT N, rendered through generate_text_for_display() per row (same pattern motd.php already uses), assigned as a template loop (e.g. PORTAL_ACTIVITY_ITEMS).
  • New activity_feed_center.html template, list-style (headline + relative/formatted date), reasonable default row limit with pagination or a "view more" link if the guild has a long history.
  • Register in module_registry.php alongside the other four, with allowed columns matching the intended placement (center/top, since bb_news rows are short status-style entries similar to motd).
  • ACP settings (get_template_acp()) at minimum for row limit; consider a source filter (all / manual only / api only) since news_source already distinguishes admin-posted news from Battle.net-synced activity.
  • Should work generically off bb_news — not WoW-specific — since news_source/news_source_key were added as core columns precisely so any game plugin can feed this table the same way.

Describe alternatives you've considered
Leaving it write-only isn't really viable long-term — the whole point of #10 was surfacing recent guild activity to members, and right now that data is invisible.

Additional context
Confirmed live 2026-09-22: after the #387/#54 news_source_key VARCHAR(64)→VARCHAR(191) fix (bbguildwow 2.1.1), a manual "Sync Now" cleanly synced 1 guild's roster + activity with no errors. The write path is solid; only the read/display side is missing.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions