[WordPress] 外掛分享: Message Bridge for Contact Form 7 and VK

首頁外掛目錄 › Message Bridge for Contact Form 7 and VK
WordPress 外掛 Message Bridge for Contact Form 7 and VK 的封面圖片
全新外掛
安裝啟用
尚無評分
3 天前
最後更新
問題解決
WordPress 6.0+ PHP 8.1+ v0.1.4 上架:2026-04-28

外掛標籤

開發者團隊

⬇ 下載最新版 (v0.1.4) 或搜尋安裝

① 下載 ZIP → 後台「外掛 › 安裝外掛 › 上傳外掛」
② 後台搜尋「Message Bridge for Contact Form 7 and VK」→ 直接安裝(推薦)
📦 歷史版本下載

原文外掛簡介

Message Bridge for Contact Form 7 and VK sends Contact Form 7 submissions to VKontakte users through a connected VK community. The number of VK recipients is not limited by the plugin: users subscribe to messages from the connected community, and the community acts as the notification bridge.
To set up delivery:

Create a VK community that will send the notifications.
In the VK community settings, open Community management > Messages and enable community messages.
Open Advanced > API usage, go to the LongPoll API tab, enable LongPoll API, and select API version 5.199 from the dropdown.
Switch to Event types and enable Incoming messages.
Open the Access keys tab and create a community access token with permission to use community messages.
Open the Callback API tab and copy the group_id value.
In the plugin interface, click Create Bot.
Enter the Group ID, save the access token, or use the Copy PHP const controls to keep these values in PHP constants. Then wait for the bot status to become online. Configured and working bots are shown in blue.
Ask each VK recipient to open the community messages and send start to the community.
Approve or reject each subscription request in the plugin interface.
Create a channel in the plugin interface to connect specific Contact Form 7 forms with the VK bot/community that should send their notifications.

Hooks
Filter cf7vk_skip_delivery
Return a truthy value to stop delivery for the current Contact Form 7 submission before channels and messages are resolved.
Arguments: $skip (bool), $contact_form (WPCF7_ContactForm), $submission (WPCF7_Submission).
Filter cf7vk_unfiltered_message
Filters the Contact Form 7 mail body after mail-tag replacement and before VK-specific formatting.
Arguments: $message (string), $submission (WPCF7_Submission).
Filter cf7vk_prepared_message
Filters the formatted VK notification text before it is passed to the linked delivery channels.
Arguments: $prepared_message (string), $submission (WPCF7_Submission), $contact_form (WPCF7_ContactForm), $mail (array).
Action cf7vk_channel_sendout
Fires when a channel starts processing a prepared outgoing message, before bot and chat availability checks.
Arguments: $channel (iTRON\cf7Vk\Channel), $message (string), $context (array).
Action cf7vk_delivery_exception
Fires when delivery relation lookup, chat status lookup, or VK transport delivery fails. The $chat argument can be null for relation lookup errors.
Arguments: $exception (Throwable), $channel (iTRON\cf7Vk\Channel), $chat (?iTRON\cf7Vk\Chat), $context (array).
Source Code and Build Tools
The development repository for this plugin is publicly available at:
https://github.com/hokoo/cf7-vk
The admin assets bundled in this plugin are generated from the React source in that repository.
Current build flow:

Install dependencies in plugin-dir/react with npm ci or npm install.
Run npm run build in plugin-dir/react to regenerate the production assets.

External Services
VK API
This plugin connects to the VK API to verify the configured community, request Bots Long Poll bootstrap data, load user and conversation details for connected dialogs, and send Contact Form 7 notifications to VK dialogs.
When an administrator verifies or syncs a connection, the plugin sends the configured community ID, community access token, API version, and the identifiers required for the requested VK API call, such as peer IDs, conversation message IDs, and user IDs.
When a Contact Form 7 submission is delivered, the plugin sends the destination dialog peer ID and the formatted notification text. That notification text can include the form title, mail subject, and submitted field values.
This service is provided by VK:
Terms of Service: https://vk.com/terms
Privacy Policy: https://vk.com/privacy
API documentation: https://dev.vk.com/
VK Bots Long Poll API
This plugin connects to the VK Bots Long Poll API to discover dialogs that send the configured authorization command to the connected community and to fetch new message events for linked dialogs.
When an administrator runs dialog sync, the plugin sends the current Long Poll server key and timestamp issued by VK. VK returns new community message events and related dialog metadata, which can include peer IDs, sender IDs, conversation message IDs, message text, and chat titles.
This service is provided by VK:
Terms of Service: https://vk.com/terms
Privacy Policy: https://vk.com/privacy
Long Poll documentation: https://dev.vk.com/ru/api/bots-long-poll/getting-started

延伸相關外掛

文章
Filter
Apply Filters
Mastodon