Recipe: Table Finder (host a table for a session, seat requests, looking for a table)

What it does

A table is a private BuddyPress group tied to one session (an event).

  • Host a Table. A member taps Host on the groups screen and fills in a short form: the session, how many open seats, the table number and a few vibe tags. The app creates a private group with the member as its admin.
  • Ask for a seat. Other members open the table and tap Request. The host and any group moderators get a push. Tapping it opens the Requests screen, where they approve or decline each request.
  • Hear back. The member gets a push when the host approves or declines.
  • Tables end with the session. Once the session is over, the table no longer shows in the app (groups list, Your groups card, Requests). Nothing is deleted: members, posts and settings stay on the site, and the group is set to hidden.
  • Looking for a table. A home screen card lets a member say they want a seat today. Hosts find them under a Looking for a table chip in the members directory. The flag turns itself off when today’s session ends, or at midnight.

Groups that were not made with the Host form are never hidden or changed. While Table Finder is off, nothing in this recipe happens.


Before you start

  • BuddyPress with the Groups component on, and a BuddyPress All Groups screen in the app.
  • A plugin that supplies sessions. Mobile App Manager The Events Calendar does this when Event venues are check-in locations is on. Without sessions, the Host form has nothing to pick and refuses to create a table.
  • Vibe tags are BuddyPress group types. Add them in Groups → Group Types (for example Casual, Near Kitchen, Newbies Welcome, Fast Paced). They show as check boxes on the Host form and on the table’s line in the groups list.
  • Optional: check-in QR codes (see the check-in QR recipe). When the member checked in at a table today, the Host form fills in that table number.

Turn it on

Mobile App Manager → BuddyPress → Table Finder

Setting Default Notes
Table Finder: on no yes turns on session tables, the Host button and hiding of ended tables.
Host button label Host The nav button on the BuddyPress All Groups screen. It appears only when that spot is free (an Add Group product takes it).
Sessions offered in the Host form, days ahead 7 1 to 30.
Requests screen title Requests to join Title of the screen a request push opens, for example “Seat requests”.
Request accepted push opens the app button titled Groups Use the title of your groups screen, for example “Tables”.
Looking for a table: on no yes adds the home card option and the members directory chip.
Looking for a table: Members chip label Looking for a table
Profile: show sessions attended no yes adds a sessions count to member profiles, from check-ins.
Profile: sessions attended label Sessions

Then:

  1. Home screen: add BuddyPress Looking for a Table in the home screen stack. The card text is under Home Screen: Community elements.
  2. Notifications: under Mobile App Manager → Notifications, check BuddyPress – Request to Join, BuddyPress – Request to Join Accepted and BuddyPress – Request to Join Declined. All channels are off by default, so nothing is sent until you tick Push for each one. Edit the wording there, for example “[member_name] wants a seat at [group_name]”.
  3. Cron: ended tables are hidden by the BuddyPress Table Finder: hide ended tables task every 15 minutes. They drop out of the app as soon as the session ends even before the task runs, but on hosting with WordPress cron only, set up the MAM cron service so the task runs on time.

What a member sees

  • Groups list: a table’s line reads like “Thursday Early Bird, Thu 6:00 pm · 2 seats open · Casual, Near Kitchen”. Open seats are the seats the host offered less the players already at the table; a table with none left shows “Full”. Other groups show their vibe tags after the usual line.
  • Host form: Session, Open seats, Table number, Vibe, Table name (optional), About your table (optional). A blank name becomes “Table 12 – Darlene” (or “Darlene’s table” with no table number). A member can host one table per session.
  • Requests screen: one block per request (who, which table, how long ago) with Approve and Decline. Needs app builds that support server list actions; older builds show the requests without the buttons.

For app builders

Item Notes
Form Native form buddypress_form_buddypress_host_table, opened by nav_left_2_action: open_form on the BuddyPress All Groups button.
mam_bp_group_requests Server list. Args group_id (blank = every group the member manages), list_v. Rows: a row_type: header row per request, then for list_v 3 an Approve and a Decline row with a server_call action to mam_bp_respond_membership_request (group_id, user_id, response accept or reject).
mam_bp_looking_toggle Server call. Arg state (on, off, blank toggles). Returns status, title, message, looking, until.
Request push Type buddypress-request-to-join, replacements member_name, group_name. Push data type: server_list, tap_action = {content_type: server_list, sub_action: mam_bp_group_requests, title, params: {group_id}}.
Accepted push Type buddypress-request-accepted, replacement group_name, tap opens the button named in the setting.
Declined push Type buddypress-request-declined, replacement group_name.
Group row keys Strings, added only while Table Finder is on: session_id, session_end_ts, open_seats, table_spot, and vibe_tags (comma-separated, e.g. “Casual, Near Kitchen”). Every group row and member profile also carries homescreen_tag_cloud_selected (the app accent color) when one is set.
Member rows looking_for_table: yes while the member is looking. Directory filter key looking.
Profile stats: [{key: attendance, title, value}] when the profile setting is on.
Hook Type Notes
mam_bp_table_hosted action ( $user_id, $group_id, $session_id ), after the table is created.
mam_bp_group_query_args filter ( $args, $context ). The group query args after ended tables are excluded.
mam_upcoming_sessions filter Asked for the sessions the form offers (answered by the events plugin).

Group meta on a table: mam_session_id, mam_session_end_ts, mam_session_start_ts, mam_session_title, mam_open_seats, mam_table_spot; after the cron hides it, mam_table_hidden_at and mam_table_prev_status. User meta mam_bp_looking_for_table holds when the Looking flag runs out.


Metadata

Field Value
Article type Recipe
Plugin slug mam-buddypress
Category Groups
Audience WordPress admin, app builder
Since 26.42.2
Was this article helpful?
Contents

    Need Support?

    Can't find the answer you're looking for? Don't worry we're here to help!