The plugins

Pokes

On this page

The Pokes plugin brings back the classic poke: a tiny "hi, thinking of you" between friends, with no words needed. It is also the smallest complete plugin in MyMeetBook, written to be read by developers who want to make their own.

What members get

  • A Poke button on a friend's profile, beside the other profile buttons. A press sends the poke and a short confirmation, You poked ….
  • A notification for the friend: … poked you. A click on it opens the Pokes page.
  • The Pokes page at /pokes, also in the side menu, with a badge for pokes not seen yet. It lists the last 50 pokes received, newest first, each with Poke back. Opening the page marks them all as seen.

Members who blocked each other cannot poke each other, and nobody can poke themselves.

Settings

Admin → Plugin pages → Pokes.

SettingWhat it does
Pokes a member may send per day20 by default. After that the member sees That is enough poking for today.
Only friends can be pokedOn by default. The button then shows on friends' profiles only. Off lets members poke anyone they can see.
Keep pokes for (days)30 by default. Older pokes are removed.

The same page shows the number of pokes ever sent and today's.

Clean-up

The cron job Remove old pokes runs once a day and deletes pokes older than Keep pokes for (days). When a member account is deleted, every poke to or from it goes too.

When to switch it on

Pokes suit a site where friends are close: a school, a family, a small town. On a large open site it is better left off, or with Only friends can be poked on and a low daily limit, so it never turns into a way to bother strangers.

Turning the plugin off hides the button, the page and the menu row. The pokes stay in the database until the next clean-up after it is switched on again.

For developers: the reference plugin

Pokes is short on purpose: every part a plugin usually needs appears once, in plain code, in plugins/pokes/.

plugins/pokes/
  plugin.json        code, name, version, author, "tier": "free"
  plugin.php         the class PokesPlugin
  pages/index.php    the admin page (settings and numbers)
  views/list.php     the list on /pokes

What plugin.php shows:

PartWhere in the code
Its own table and default settingsinstall(): mmb_pokes_log, then defaults() for the three settings
A front page for membersroute('GET', '~^/pokes$~', 'pagePokes', 'member')
A JSON actionthe api_action filter answers pokes/send
A button on profilesthe profile_buttons action
A new kind of notificationnotify(..., 'poke', ...) plus the notification_text filter
A side-menu row with a badgethe site_menu filter
A live badge countthe poll_counts filter
A scheduled jobthe cron_jobs filter adds pokes-clean
Tidying up after a deleted memberthe user_deleted action
An admin pageadminMenu() and pages/index.php
Limitsrate_limited() for the daily limit, get() / on() for the settings

Copy the folder, rename the code everywhere (pokes → yourcode, table mmb_yourcode_…), and you have a working skeleton. Writing a plugin explains every hook, the rules a plugin must keep, and how to pack it as a ZIP for Admin → Plugins → Upload.

← Back to MyMeetBook All chapters Updated 15 October 2026
Chat with Faruk
Faruk's Assistant Online — AI Powered