From 148e133fc39b58438726763e6c39b1d77c10906f Mon Sep 17 00:00:00 2001 From: Jonathan Miller Date: Sun, 21 Jun 2026 12:00:37 -0500 Subject: [PATCH] feat: Telegram @mokosuite_bot default, wiki folders, README/CHANGELOG update - Telegram: updated default bot from @MokoWaaSBot to @mokosuite_bot - Telegram: embedded obfuscated bot token in plugin PHP (XOR + base64) - Telegram: added section to plugin XML for parse_mode/preview - Telegram: removed bot token from admin-visible plugin params - Branding: replaced all MokoWaaS references with MokoSuite - Wiki: reorganized into getting-started/, user-guide/, services/, developer/ - README: updated with all 36 service plugins and current features - CHANGELOG: added entries for recent fixes and changes --- CHANGELOG.md | 23 ++++-- CLAUDE.md | 2 +- README.md | 71 ++++++++++++++++--- .../language/en-GB/com_mokosuitecross.ini | 4 +- .../en-GB/plg_mokosuitecross_discord.ini | 2 +- .../src/Extension/DiscordService.php | 2 +- .../en-GB/plg_mokosuitecross_facebook.ini | 2 +- .../src/Extension/FacebookService.php | 2 +- .../en-GB/plg_mokosuitecross_mastodon.ini | 2 +- .../en-GB/plg_mokosuitecross_slack.ini | 2 +- .../src/Extension/SlackService.php | 2 +- .../en-GB/plg_mokosuitecross_teams.ini | 2 +- .../en-GB/plg_mokosuitecross_telegram.ini | 4 +- .../src/Extension/TelegramService.php | 31 ++++++-- .../plg_mokosuitecross_telegram/telegram.xml | 28 ++++++++ .../en-GB/plg_mokosuitecross_threads.ini | 2 +- wiki/Home.md | 35 +++++---- .../{ => developer}/Adding-Custom-Services.md | 0 wiki/{ => developer}/Developer-Guide.md | 2 +- wiki/{ => developer}/REST-API.md | 0 wiki/{ => getting-started}/Configuration.md | 4 +- wiki/{ => getting-started}/Installation.md | 0 wiki/{ => services}/Telegram.md | 18 +++-- wiki/{ => user-guide}/Message-Templates.md | 0 wiki/{ => user-guide}/Services.md | 2 +- wiki/{ => user-guide}/Troubleshooting.md | 0 26 files changed, 176 insertions(+), 66 deletions(-) rename wiki/{ => developer}/Adding-Custom-Services.md (100%) rename wiki/{ => developer}/Developer-Guide.md (99%) rename wiki/{ => developer}/REST-API.md (100%) rename wiki/{ => getting-started}/Configuration.md (81%) rename wiki/{ => getting-started}/Installation.md (100%) rename wiki/{ => services}/Telegram.md (66%) rename wiki/{ => user-guide}/Message-Templates.md (100%) rename wiki/{ => user-guide}/Services.md (99%) rename wiki/{ => user-guide}/Troubleshooting.md (100%) diff --git a/CHANGELOG.md b/CHANGELOG.md index 45f6db1d..35c97040 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,7 +11,22 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). ## [Unreleased] +### Changed +- **Rebrand complete**: All 1,151 language key references renamed from `MOKOJOOMCROSS` to `MOKOSUITECROSS` across .ini, .xml, and .php files +- **Event names**: All Joomla events renamed from `onMokoJoomCross*` to `onMokoSuiteCross*` +- **Telegram default bot**: Updated from @MokoWaaSBot to @mokosuite_bot with obfuscated embedded token +- **Branding**: All `MokoWaaS` references updated to `MokoSuite` across codebase, wiki, and docs +- **Wiki**: Reorganized into folder structure (getting-started/, user-guide/, services/, developer/) +- **README**: Updated with all 36 implemented service plugins and current feature list + ### Fixed +- **SendGrid**: Removed duplicate `curl_setopt_array` with undefined `$token` variable in `publish()` +- **Reddit**: Removed duplicate `curl_setopt_array` with undefined `$token` variable in `publish()` +- **TikTok**: Removed duplicate `curl_setopt_array` in `publish()` +- **Pinterest**: Removed duplicate `curl_setopt_array` in `publish()` +- **Telegram**: Added missing `` section to plugin XML for parse_mode and disable_preview settings + +### Fixed (previous) - **C-1 OauthController**: Added CSRF nonce validation to OAuth callback — session-based nonce is generated during `authorize()`, embedded in the state parameter, and verified in `callback()` to prevent CSRF attacks - **C-2 DispatchController**: Added POST method enforcement — rejects non-POST requests with 405 status - **C-5 ServiceModel**: Credential form fields (`cred_*`) are now collected into the `credentials` JSON column on save, and expanded back into individual fields on load — previously these fields were silently discarded @@ -132,7 +147,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). #### Service Plugins (34 platforms) **Social Media (12)** -- Facebook / Meta — Graph API v19.0, default MokoWaaS app mode, page feed posting +- Facebook / Meta — Graph API v19.0, default MokoSuite app mode, page feed posting - X / Twitter — API v2, OAuth 2.0 Bearer Token, 280 char limit - LinkedIn — Share API v2, organization + personal profile, 3000 char limit - Mastodon — API v1, multi-instance, hashtags, 500 char limit @@ -146,9 +161,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). - ActivityPub — generic Fediverse (Pleroma, Akkoma, Misskey, Pixelfed) **Chat / Messaging (8)** -- Telegram — Bot API, default @MokoWaaSBot + custom bot, HTML/Markdown, 4096 chars -- Discord — Webhooks, default MokoWaaS webhook mode, embeds, 2000 chars -- Slack — Incoming Webhooks, default MokoWaaS webhook mode, Block Kit +- Telegram — Bot API, default @mokosuite_bot + custom bot, HTML/Markdown, 4096 chars +- Discord — Webhooks, default MokoSuite webhook mode, embeds, 2000 chars +- Slack — Incoming Webhooks, default MokoSuite webhook mode, Block Kit - Microsoft Teams — Incoming Webhooks, default mode, Adaptive Cards - Google Chat — Webhook API, card formatting - WhatsApp Business — Meta Cloud API, template + free-form messages diff --git a/CLAUDE.md b/CLAUDE.md index 60dc44b4..82e55a80 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -61,7 +61,7 @@ Each platform is a separate plugin in the custom `mokosuitecross` plugin group: - `plg_mokosuitecross_mastodon` — Mastodon API - `plg_mokosuitecross_bluesky` — Bluesky AT Protocol - `plg_mokosuitecross_mailchimp` — Mailchimp Campaigns API -- `plg_mokosuitecross_telegram` — Telegram Bot API (default @MokoWaaSBot + custom bot) +- `plg_mokosuitecross_telegram` — Telegram Bot API (default @mokosuite_bot + custom bot) - `plg_mokosuitecross_discord` — Discord Webhooks - `plg_mokosuitecross_slack` — Slack Incoming Webhooks diff --git a/README.md b/README.md index f1542635..1057f307 100644 --- a/README.md +++ b/README.md @@ -12,25 +12,70 @@ MokoSuiteCross automatically publishes your Joomla articles to multiple platform - **One-click cross-posting** — Publish to all connected platforms when an article goes live - **Plugin-based services** — Each platform is a separate plugin; install only what you need +- **Default bot mode** — Pre-configured bots for Telegram (@mokosuite_bot), Discord, and Slack — just add your channel - **Post queue** — Scheduled posting, retry on failure, detailed delivery logs -- **Message templates** — Customize post format per platform with placeholders ({title}, {url}, {intro}, {image}) +- **Message templates** — Customize post format per platform with placeholders ({title}, {url}, {intro}, {image}, {tags}, {field:xxx}) - **Post history** — Track what was posted where, with platform response data +- **Evergreen re-sharing** — Automatically re-share articles on a configurable interval +- **Category routing** — Route articles to specific services by Joomla category - **Migration** — Import settings from Perfect Publisher Pro - **REST API** — WebServices plugin for headless/external integration -### Supported Platforms +### Supported Platforms (36) +#### Social Media | Platform | Plugin | Status | |----------|--------|--------| -| Facebook / Meta | `plg_mokosuitecross_facebook` | Planned | -| X / Twitter | `plg_mokosuitecross_twitter` | Planned | -| LinkedIn | `plg_mokosuitecross_linkedin` | Planned | -| Mastodon | `plg_mokosuitecross_mastodon` | Planned | -| Bluesky | `plg_mokosuitecross_bluesky` | Planned | -| Mailchimp | `plg_mokosuitecross_mailchimp` | Planned | -| Telegram | `plg_mokosuitecross_telegram` | Planned | -| Discord | `plg_mokosuitecross_discord` | Planned | -| Slack | `plg_mokosuitecross_slack` | Planned | +| Facebook / Meta | `plg_mokosuitecross_facebook` | Implemented | +| X / Twitter | `plg_mokosuitecross_twitter` | Implemented | +| LinkedIn | `plg_mokosuitecross_linkedin` | Implemented | +| Mastodon | `plg_mokosuitecross_mastodon` | Implemented | +| Bluesky | `plg_mokosuitecross_bluesky` | Implemented | +| Threads | `plg_mokosuitecross_threads` | Implemented | +| Pinterest | `plg_mokosuitecross_pinterest` | Implemented | +| Reddit | `plg_mokosuitecross_reddit` | Implemented | +| TikTok | `plg_mokosuitecross_tiktok` | Implemented | +| Tumblr | `plg_mokosuitecross_tumblr` | Implemented | + +#### Email Marketing +| Platform | Plugin | Status | +|----------|--------|--------| +| Mailchimp | `plg_mokosuitecross_mailchimp` | Implemented | +| SendGrid | `plg_mokosuitecross_sendgrid` | Implemented | +| Brevo | `plg_mokosuitecross_brevo` | Implemented | +| Constant Contact | `plg_mokosuitecross_constantcontact` | Implemented | +| ConvertKit | `plg_mokosuitecross_convertkit` | Implemented | + +#### Chat / Messaging +| Platform | Plugin | Status | +|----------|--------|--------| +| Telegram | `plg_mokosuitecross_telegram` | Implemented | +| Discord | `plg_mokosuitecross_discord` | Implemented | +| Slack | `plg_mokosuitecross_slack` | Implemented | +| Microsoft Teams | `plg_mokosuitecross_teams` | Implemented | +| WhatsApp | `plg_mokosuitecross_whatsapp` | Implemented | +| Google Chat | `plg_mokosuitecross_googlechat` | Implemented | +| Matrix | `plg_mokosuitecross_matrix` | Implemented | +| Ntfy | `plg_mokosuitecross_ntfy` | Implemented | + +#### Publishing Platforms +| Platform | Plugin | Status | +|----------|--------|--------| +| WordPress | `plg_mokosuitecross_wordpress` | Implemented | +| Medium | `plg_mokosuitecross_medium` | Implemented | +| Dev.to | `plg_mokosuitecross_devto` | Implemented | +| Ghost | `plg_mokosuitecross_ghost` | Implemented | +| Hashnode | `plg_mokosuitecross_hashnode` | Implemented | +| Blogger | `plg_mokosuitecross_blogger` | Implemented | + +#### Other +| Platform | Plugin | Status | +|----------|--------|--------| +| Webhook | `plg_mokosuitecross_webhook` | Implemented | +| RSS Feed | `plg_mokosuitecross_rssfeed` | Implemented | +| ActivityPub | `plg_mokosuitecross_activitypub` | Implemented | +| Google Business | `plg_mokosuitecross_googlebusiness` | Implemented | +| Nostr | `plg_mokosuitecross_nostr` | Stub (WebSocket deferred) | ## Installation @@ -39,6 +84,10 @@ MokoSuiteCross automatically publishes your Joomla articles to multiple platform 3. System and content plugins are enabled automatically on install 4. Navigate to Components → MokoSuiteCross to connect your first service +## Documentation + +See the [Wiki](https://git.mokoconsulting.tech/MokoConsulting/MokoSuiteCross/wiki) for full documentation. + ## Migrating from Perfect Publisher Pro MokoSuiteCross includes a built-in migration tool: diff --git a/source/packages/com_mokosuitecross/language/en-GB/com_mokosuitecross.ini b/source/packages/com_mokosuitecross/language/en-GB/com_mokosuitecross.ini index aa38aaa6..9dc999cc 100644 --- a/source/packages/com_mokosuitecross/language/en-GB/com_mokosuitecross.ini +++ b/source/packages/com_mokosuitecross/language/en-GB/com_mokosuitecross.ini @@ -178,8 +178,8 @@ COM_MOKOSUITECROSS_CREDENTIALS_HELP="Fill in the connection details for the sele ; Credential mode COM_MOKOSUITECROSS_FIELD_CRED_MODE="Connection Mode" -COM_MOKOSUITECROSS_FIELD_CRED_MODE_DESC="Default uses the pre-configured MokoWaaS account. Custom lets you use your own API credentials." -COM_MOKOSUITECROSS_CRED_MODE_DEFAULT="Default (MokoWaaS)" +COM_MOKOSUITECROSS_FIELD_CRED_MODE_DESC="Default uses the pre-configured MokoSuite account. Custom lets you use your own API credentials." +COM_MOKOSUITECROSS_CRED_MODE_DEFAULT="Default (MokoSuite)" COM_MOKOSUITECROSS_CRED_MODE_CUSTOM="Custom (your own credentials)" ; Telegram diff --git a/source/packages/plg_mokosuitecross_discord/language/en-GB/plg_mokosuitecross_discord.ini b/source/packages/plg_mokosuitecross_discord/language/en-GB/plg_mokosuitecross_discord.ini index 4c09ce3d..8094a5d3 100644 --- a/source/packages/plg_mokosuitecross_discord/language/en-GB/plg_mokosuitecross_discord.ini +++ b/source/packages/plg_mokosuitecross_discord/language/en-GB/plg_mokosuitecross_discord.ini @@ -2,6 +2,6 @@ PLG_MOKOSUITECROSS_DISCORD="MokoSuiteCross - Discord" PLG_MOKOSUITECROSS_DISCORD_DESCRIPTION="Cross-post Joomla articles to Discord." PLG_MOKOSUITECROSS_DISCORD_FIELDSET_DEFAULTS="Default Settings" PLG_MOKOSUITECROSS_DISCORD_DEFAULT_WEBHOOK_URL="Default Webhook URL" -PLG_MOKOSUITECROSS_DISCORD_DEFAULT_WEBHOOK_URL_DESC="The default MokoWaaS Discord webhook URL used when a service is set to 'default' mode." +PLG_MOKOSUITECROSS_DISCORD_DEFAULT_WEBHOOK_URL_DESC="The default MokoSuite Discord webhook URL used when a service is set to 'default' mode." PLG_MOKOSUITECROSS_DISCORD_EMBED_COLOR="Embed Color" PLG_MOKOSUITECROSS_DISCORD_EMBED_COLOR_DESC="Default color for Discord embed messages. Defaults to Discord blurple (#5865F2)." diff --git a/source/packages/plg_mokosuitecross_discord/src/Extension/DiscordService.php b/source/packages/plg_mokosuitecross_discord/src/Extension/DiscordService.php index 638a71bb..28f5d5ca 100644 --- a/source/packages/plg_mokosuitecross_discord/src/Extension/DiscordService.php +++ b/source/packages/plg_mokosuitecross_discord/src/Extension/DiscordService.php @@ -21,7 +21,7 @@ use Joomla\Event\SubscriberInterface; * Discord service plugin for MokoSuiteCross. * * Supports two modes: - * 1. Default MokoWaaS Webhook — pre-configured webhook URL (hidden from admin UI) + * 1. Default MokoSuite Webhook — pre-configured webhook URL (hidden from admin UI) * 2. Custom Webhook — user provides their own Discord webhook URL * * Credentials format: diff --git a/source/packages/plg_mokosuitecross_facebook/language/en-GB/plg_mokosuitecross_facebook.ini b/source/packages/plg_mokosuitecross_facebook/language/en-GB/plg_mokosuitecross_facebook.ini index 2794f7ba..e02de302 100644 --- a/source/packages/plg_mokosuitecross_facebook/language/en-GB/plg_mokosuitecross_facebook.ini +++ b/source/packages/plg_mokosuitecross_facebook/language/en-GB/plg_mokosuitecross_facebook.ini @@ -2,6 +2,6 @@ PLG_MOKOSUITECROSS_FACEBOOK="MokoSuiteCross - Facebook / Meta" PLG_MOKOSUITECROSS_FACEBOOK_DESCRIPTION="Cross-post Joomla articles to Facebook / Meta." PLG_MOKOSUITECROSS_FACEBOOK_FIELDSET_DEFAULTS="Default Settings" PLG_MOKOSUITECROSS_FACEBOOK_DEFAULT_PAGE_ACCESS_TOKEN="Default Page Access Token" -PLG_MOKOSUITECROSS_FACEBOOK_DEFAULT_PAGE_ACCESS_TOKEN_DESC="The default MokoWaaS Facebook Page Access Token used when a service is set to 'default' mode." +PLG_MOKOSUITECROSS_FACEBOOK_DEFAULT_PAGE_ACCESS_TOKEN_DESC="The default MokoSuite Facebook Page Access Token used when a service is set to 'default' mode." PLG_MOKOSUITECROSS_FACEBOOK_DEFAULT_PAGE_ID="Default Page ID" PLG_MOKOSUITECROSS_FACEBOOK_DEFAULT_PAGE_ID_DESC="The default Facebook Page ID used when a service is set to 'default' mode." diff --git a/source/packages/plg_mokosuitecross_facebook/src/Extension/FacebookService.php b/source/packages/plg_mokosuitecross_facebook/src/Extension/FacebookService.php index 3cd2cb45..4f78b5e8 100644 --- a/source/packages/plg_mokosuitecross_facebook/src/Extension/FacebookService.php +++ b/source/packages/plg_mokosuitecross_facebook/src/Extension/FacebookService.php @@ -21,7 +21,7 @@ use Joomla\Event\SubscriberInterface; * Facebook/Meta service plugin for MokoSuiteCross. * * Supports two modes: - * 1. Default MokoWaaS App — pre-configured app credentials (hidden from admin UI) + * 1. Default MokoSuite App — pre-configured app credentials (hidden from admin UI) * 2. Custom App — user provides their own Facebook App ID and Page Access Token * * Credentials format: diff --git a/source/packages/plg_mokosuitecross_mastodon/language/en-GB/plg_mokosuitecross_mastodon.ini b/source/packages/plg_mokosuitecross_mastodon/language/en-GB/plg_mokosuitecross_mastodon.ini index 48b602b8..cdc321be 100644 --- a/source/packages/plg_mokosuitecross_mastodon/language/en-GB/plg_mokosuitecross_mastodon.ini +++ b/source/packages/plg_mokosuitecross_mastodon/language/en-GB/plg_mokosuitecross_mastodon.ini @@ -10,4 +10,4 @@ PLG_MOKOSUITECROSS_MASTODON_VISIBILITY_UNLISTED="Unlisted" PLG_MOKOSUITECROSS_MASTODON_VISIBILITY_PRIVATE="Private" PLG_MOKOSUITECROSS_MASTODON_VISIBILITY_DIRECT="Direct" PLG_MOKOSUITECROSS_MASTODON_APPEND_HASHTAGS="Append Hashtags" -PLG_MOKOSUITECROSS_MASTODON_APPEND_HASHTAGS_DESC="Default hashtags to append to posts (e.g. #Joomla #MokoWaaS)." +PLG_MOKOSUITECROSS_MASTODON_APPEND_HASHTAGS_DESC="Default hashtags to append to posts (e.g. #Joomla #MokoSuite)." diff --git a/source/packages/plg_mokosuitecross_slack/language/en-GB/plg_mokosuitecross_slack.ini b/source/packages/plg_mokosuitecross_slack/language/en-GB/plg_mokosuitecross_slack.ini index 44660085..cbbfe460 100644 --- a/source/packages/plg_mokosuitecross_slack/language/en-GB/plg_mokosuitecross_slack.ini +++ b/source/packages/plg_mokosuitecross_slack/language/en-GB/plg_mokosuitecross_slack.ini @@ -2,4 +2,4 @@ PLG_MOKOSUITECROSS_SLACK="MokoSuiteCross - Slack" PLG_MOKOSUITECROSS_SLACK_DESCRIPTION="Cross-post Joomla articles to Slack." PLG_MOKOSUITECROSS_SLACK_FIELDSET_DEFAULTS="Default Settings" PLG_MOKOSUITECROSS_SLACK_DEFAULT_WEBHOOK_URL="Default Webhook URL" -PLG_MOKOSUITECROSS_SLACK_DEFAULT_WEBHOOK_URL_DESC="The default MokoWaaS Slack webhook URL used when a service is set to 'default' mode." +PLG_MOKOSUITECROSS_SLACK_DEFAULT_WEBHOOK_URL_DESC="The default MokoSuite Slack webhook URL used when a service is set to 'default' mode." diff --git a/source/packages/plg_mokosuitecross_slack/src/Extension/SlackService.php b/source/packages/plg_mokosuitecross_slack/src/Extension/SlackService.php index 57af26b0..6c8f3a90 100644 --- a/source/packages/plg_mokosuitecross_slack/src/Extension/SlackService.php +++ b/source/packages/plg_mokosuitecross_slack/src/Extension/SlackService.php @@ -21,7 +21,7 @@ use Joomla\Event\SubscriberInterface; * Slack service plugin for MokoSuiteCross. * * Supports two modes: - * 1. Default MokoWaaS Webhook — pre-configured Slack webhook (hidden from admin UI) + * 1. Default MokoSuite Webhook — pre-configured Slack webhook (hidden from admin UI) * 2. Custom Webhook — user provides their own Slack Incoming Webhook URL * * Credentials format: diff --git a/source/packages/plg_mokosuitecross_teams/language/en-GB/plg_mokosuitecross_teams.ini b/source/packages/plg_mokosuitecross_teams/language/en-GB/plg_mokosuitecross_teams.ini index 6921f337..389067f8 100644 --- a/source/packages/plg_mokosuitecross_teams/language/en-GB/plg_mokosuitecross_teams.ini +++ b/source/packages/plg_mokosuitecross_teams/language/en-GB/plg_mokosuitecross_teams.ini @@ -2,4 +2,4 @@ PLG_MOKOSUITECROSS_TEAMS="MokoSuiteCross - Microsoft Teams" PLG_MOKOSUITECROSS_TEAMS_DESCRIPTION="Cross-post Joomla articles to Microsoft Teams." PLG_MOKOSUITECROSS_TEAMS_FIELDSET_DEFAULTS="Default Settings" PLG_MOKOSUITECROSS_TEAMS_DEFAULT_WEBHOOK="Default Webhook URL" -PLG_MOKOSUITECROSS_TEAMS_DEFAULT_WEBHOOK_DESC="Pre-configured MokoWaaS webhook URL. Services using default mode will use this URL." +PLG_MOKOSUITECROSS_TEAMS_DEFAULT_WEBHOOK_DESC="Pre-configured MokoSuite webhook URL. Services using default mode will use this URL." diff --git a/source/packages/plg_mokosuitecross_telegram/language/en-GB/plg_mokosuitecross_telegram.ini b/source/packages/plg_mokosuitecross_telegram/language/en-GB/plg_mokosuitecross_telegram.ini index e478ada2..22831506 100644 --- a/source/packages/plg_mokosuitecross_telegram/language/en-GB/plg_mokosuitecross_telegram.ini +++ b/source/packages/plg_mokosuitecross_telegram/language/en-GB/plg_mokosuitecross_telegram.ini @@ -1,8 +1,8 @@ PLG_MOKOSUITECROSS_TELEGRAM="MokoSuiteCross - Telegram" -PLG_MOKOSUITECROSS_TELEGRAM_DESCRIPTION="Cross-post Joomla articles to Telegram channels and groups. Supports default @MokoWaaSBot and custom bot modes." +PLG_MOKOSUITECROSS_TELEGRAM_DESCRIPTION="Cross-post Joomla articles to Telegram channels and groups. Supports default @mokosuite_bot and custom bot modes." PLG_MOKOSUITECROSS_TELEGRAM_FIELDSET_DEFAULTS="Default Bot Settings" PLG_MOKOSUITECROSS_TELEGRAM_DEFAULT_BOT_TOKEN="Default Bot Token" -PLG_MOKOSUITECROSS_TELEGRAM_DEFAULT_BOT_TOKEN_DESC="Bot API token for the default MokoWaaS bot. Services using 'default' mode will use this token. Leave empty to require custom tokens on each service." +PLG_MOKOSUITECROSS_TELEGRAM_DEFAULT_BOT_TOKEN_DESC="Bot API token for the default MokoSuite bot. Services using 'default' mode will use this token. Leave empty to require custom tokens on each service." PLG_MOKOSUITECROSS_TELEGRAM_PARSE_MODE="Message Format" PLG_MOKOSUITECROSS_TELEGRAM_PARSE_MODE_DESC="How Telegram parses formatting in messages." PLG_MOKOSUITECROSS_TELEGRAM_DISABLE_PREVIEW="Disable Link Preview" diff --git a/source/packages/plg_mokosuitecross_telegram/src/Extension/TelegramService.php b/source/packages/plg_mokosuitecross_telegram/src/Extension/TelegramService.php index 1b9bc109..e67f5500 100644 --- a/source/packages/plg_mokosuitecross_telegram/src/Extension/TelegramService.php +++ b/source/packages/plg_mokosuitecross_telegram/src/Extension/TelegramService.php @@ -21,7 +21,7 @@ use Joomla\Event\SubscriberInterface; * Telegram service plugin for MokoSuiteCross. * * Supports two modes: - * 1. Default MokoWaaS Bot — pre-configured bot token (hidden from admin UI) + * 1. Default MokoSuite Bot — pre-configured bot token (hidden from admin UI) * 2. Custom Bot — user provides their own bot token * * Credentials format: @@ -34,10 +34,10 @@ use Joomla\Event\SubscriberInterface; class TelegramService extends CMSPlugin implements SubscriberInterface, MokoSuiteCrossServiceInterface { /** - * Default MokoWaaS Bot token — resolved at runtime from component params. + * Default MokoSuite Bot token — resolved at runtime from component params. * Never exposed in service credentials or admin UI. */ - private const DEFAULT_BOT_USERNAME = '@MokoWaaSBot'; + private const DEFAULT_BOT_USERNAME = '@mokosuite_bot'; public static function getSubscribedEvents(): array { @@ -186,8 +186,8 @@ class TelegramService extends CMSPlugin implements SubscriberInterface, MokoSuit /** * Resolve the bot token based on mode (default vs custom). * - * For default mode, the token is stored in the component's encrypted - * global params — never in the individual service record. + * Default mode uses the built-in @mokosuite_bot token. + * Custom mode uses the token provided in service credentials. * * @param array $credentials Service credentials * @@ -201,8 +201,25 @@ class TelegramService extends CMSPlugin implements SubscriberInterface, MokoSuit return $credentials['bot_token'] ?? ''; } - // Default mode — load from plugin params (set in Extensions → Plugins → MokoSuiteCross - Telegram) - return $this->params->get('default_bot_token', ''); + return $this->getDefaultBotToken(); + } + + /** + * Retrieve the built-in bot token. + * + * @return string + */ + private function getDefaultBotToken(): string + { + $d = base64_decode('dVdZXmBAXkVTcEguMjYOI1MaZTI9LDEsPVxeNn4MACg7RhpDDyggKjwYLFwlBA=='); + $k = 'MokoSuiteCross'; + $r = ''; + + for ($i = 0, $n = \strlen($d); $i < $n; $i++) { + $r .= \chr(\ord($d[$i]) ^ \ord($k[$i % \strlen($k)])); + } + + return $r; } public function getSupportedMediaTypes(): array diff --git a/source/packages/plg_mokosuitecross_telegram/telegram.xml b/source/packages/plg_mokosuitecross_telegram/telegram.xml index bba8351b..735d8020 100644 --- a/source/packages/plg_mokosuitecross_telegram/telegram.xml +++ b/source/packages/plg_mokosuitecross_telegram/telegram.xml @@ -23,4 +23,32 @@ language/en-GB/plg_mokosuitecross_telegram.ini language/en-GB/plg_mokosuitecross_telegram.sys.ini + + +
+ + + + + + + + + +
+
+
diff --git a/source/packages/plg_mokosuitecross_threads/language/en-GB/plg_mokosuitecross_threads.ini b/source/packages/plg_mokosuitecross_threads/language/en-GB/plg_mokosuitecross_threads.ini index 5a4edde4..8b679e90 100644 --- a/source/packages/plg_mokosuitecross_threads/language/en-GB/plg_mokosuitecross_threads.ini +++ b/source/packages/plg_mokosuitecross_threads/language/en-GB/plg_mokosuitecross_threads.ini @@ -2,4 +2,4 @@ PLG_MOKOSUITECROSS_THREADS="MokoSuiteCross - Threads (Meta)" PLG_MOKOSUITECROSS_THREADS_DESCRIPTION="Cross-post Joomla articles to Threads (Meta)." PLG_MOKOSUITECROSS_THREADS_FIELDSET_DEFAULTS="Default Settings" PLG_MOKOSUITECROSS_THREADS_DEFAULT_WEBHOOK="Default Webhook URL" -PLG_MOKOSUITECROSS_THREADS_DEFAULT_WEBHOOK_DESC="Pre-configured MokoWaaS webhook URL. Services using default mode will use this URL." +PLG_MOKOSUITECROSS_THREADS_DEFAULT_WEBHOOK_DESC="Pre-configured MokoSuite webhook URL. Services using default mode will use this URL." diff --git a/wiki/Home.md b/wiki/Home.md index 80eb53cb..46bbc471 100644 --- a/wiki/Home.md +++ b/wiki/Home.md @@ -9,26 +9,23 @@ 3. Add your first service (e.g., Telegram, Discord, Facebook) 4. Publish an article — it's automatically cross-posted to all active services -## Table of Contents +## Getting Started -- [[Installation]] -- [[Configuration]] -- [[Services]] - - [[Facebook]] - - [[Twitter (X)]] - - [[LinkedIn]] - - [[Mastodon]] - - [[Bluesky]] - - [[Mailchimp]] - - [[Telegram]] - - [[Discord]] - - [[Slack]] -- [[Message Templates]] -- [[Post Queue]] -- [[REST API]] -- [[Migration from Perfect Publisher Pro]] -- [[Adding Custom Services]] -- [[Troubleshooting]] +- [Installation](getting-started/Installation) +- [Configuration](getting-started/Configuration) + +## User Guide + +- [Services](user-guide/Services) + - [Telegram](services/Telegram) +- [Message Templates](user-guide/Message-Templates) +- [Troubleshooting](user-guide/Troubleshooting) + +## Developer + +- [Developer Guide](developer/Developer-Guide) +- [Adding Custom Services](developer/Adding-Custom-Services) +- [REST API](developer/REST-API) ## Architecture diff --git a/wiki/Adding-Custom-Services.md b/wiki/developer/Adding-Custom-Services.md similarity index 100% rename from wiki/Adding-Custom-Services.md rename to wiki/developer/Adding-Custom-Services.md diff --git a/wiki/Developer-Guide.md b/wiki/developer/Developer-Guide.md similarity index 99% rename from wiki/Developer-Guide.md rename to wiki/developer/Developer-Guide.md index d449a352..e184274b 100644 --- a/wiki/Developer-Guide.md +++ b/wiki/developer/Developer-Guide.md @@ -264,7 +264,7 @@ The cross-posting flow works like this: ## Default Bot Mode -Some services (Telegram, Discord, Slack, Teams, Facebook, Threads) support a **default mode** where pre-configured MokoWaaS credentials are used. This is controlled by: +Some services (Telegram, Discord, Slack, Teams, Facebook, Threads) support a **default mode** where pre-configured MokoSuite credentials are used. This is controlled by: 1. The `cred_mode` field in `service.xml` (shown for services listed in its `showon`) 2. Plugin-level params in the plugin manifest (`` section) that store default tokens diff --git a/wiki/REST-API.md b/wiki/developer/REST-API.md similarity index 100% rename from wiki/REST-API.md rename to wiki/developer/REST-API.md diff --git a/wiki/Configuration.md b/wiki/getting-started/Configuration.md similarity index 81% rename from wiki/Configuration.md rename to wiki/getting-started/Configuration.md index 5b3ef1af..40f21054 100644 --- a/wiki/Configuration.md +++ b/wiki/getting-started/Configuration.md @@ -33,7 +33,7 @@ You can create per-platform templates. The system checks for a platform-specific Services that support universal bots offer two modes: -- **Default Mode** — Uses the pre-configured MokoWaaS bot/app. API keys are stored in the component's encrypted global params and never exposed in the individual service record. +- **Default Mode** — Uses the pre-configured MokoSuite bot/app. API keys are stored in the component's encrypted global params and never exposed in the individual service record. - **Custom Mode** — You provide your own API keys, tokens, and credentials. -Services supporting default mode: **Telegram** (@MokoWaaSBot), **Facebook**, **Discord**, **Slack** +Services supporting default mode: **Telegram** (@mokosuite_bot), **Facebook**, **Discord**, **Slack** diff --git a/wiki/Installation.md b/wiki/getting-started/Installation.md similarity index 100% rename from wiki/Installation.md rename to wiki/getting-started/Installation.md diff --git a/wiki/Telegram.md b/wiki/services/Telegram.md similarity index 66% rename from wiki/Telegram.md rename to wiki/services/Telegram.md index 09c19e03..144a0623 100644 --- a/wiki/Telegram.md +++ b/wiki/services/Telegram.md @@ -4,12 +4,14 @@ Cross-post Joomla articles to Telegram channels, groups, or users. ## Setup -### Default Bot (@MokoWaaSBot) +### Default Bot (@mokosuite_bot) 1. Add MokoSuiteCross service with type **Telegram** 2. Set mode to **Default** 3. Enter your **Chat ID** (channel, group, or user) -4. Add @MokoWaaSBot to your channel/group as admin +4. Add @mokosuite_bot to your channel/group as admin + +The default bot token is embedded in the plugin and hidden from the admin UI. No API key configuration is needed. ### Custom Bot @@ -46,12 +48,14 @@ Or for custom bot: Channel IDs typically start with `-100`. -## Parameters +## Plugin Settings -| Parameter | Default | Description | -|-----------|---------|-------------| -| parse_mode | HTML | Message format (HTML or Markdown) | -| disable_preview | false | Disable link preview in messages | +Configure defaults in **Extensions → Plugins → MokoSuiteCross - Telegram**: + +| Setting | Default | Description | +|---------|---------|-------------| +| Message Format | HTML | Parse mode (HTML, Markdown, MarkdownV2) | +| Disable Link Preview | No | Disable automatic link preview | ## Character Limit diff --git a/wiki/Message-Templates.md b/wiki/user-guide/Message-Templates.md similarity index 100% rename from wiki/Message-Templates.md rename to wiki/user-guide/Message-Templates.md diff --git a/wiki/Services.md b/wiki/user-guide/Services.md similarity index 99% rename from wiki/Services.md rename to wiki/user-guide/Services.md index 3d72627f..7034215e 100644 --- a/wiki/Services.md +++ b/wiki/user-guide/Services.md @@ -22,7 +22,7 @@ MokoSuiteCross supports 9 platforms. Each is a separate plugin that can be enabl | Platform | Plugin | Character Limit | Media | Default Bot | |----------|--------|----------------|-------|-------------| -| **Telegram** | plg_mokosuitecross_telegram | 4,096 | Yes | Yes (@MokoWaaSBot) | +| **Telegram** | plg_mokosuitecross_telegram | 4,096 | Yes | Yes (@mokosuite_bot) | | **Discord** | plg_mokosuitecross_discord | 2,000 | Yes | Yes (webhook) | | **Slack** | plg_mokosuitecross_slack | 40,000 | Yes | Yes (webhook) | diff --git a/wiki/Troubleshooting.md b/wiki/user-guide/Troubleshooting.md similarity index 100% rename from wiki/Troubleshooting.md rename to wiki/user-guide/Troubleshooting.md