Compare commits

...

9 Commits

Author SHA1 Message Date
gitea-actions[bot] 16c2fd35ff chore(version): auto-bump patch 01.08.11-dev [skip ci] 2026-06-27 19:51:53 +00:00
jmiller 1b25f852a8 feat(#156): add social preview panel for article editor
Universal: Auto Version Bump / Version Bump (push) Successful in 8s
PreviewHelper renders platform-specific mockups (Twitter, Facebook,
LinkedIn, Mastodon, Bluesky, Telegram) showing how cross-posted content
will appear. PreviewController serves AJAX requests from the article
editor. Content plugin injects platform selector and preview button
into the Cross-Posting fieldset for existing articles.

Authored-by: Moko Consulting
2026-06-27 14:51:03 -05:00
gitea-actions[bot] ce9d72b50d chore(version): pre-release bump to 01.08.10-dev [skip ci] 2026-06-27 00:11:16 +00:00
gitea-actions[bot] 92358a673b chore(version): pre-release bump to 01.08.09-dev [skip ci] 2026-06-25 19:46:34 +00:00
gitea-actions[bot] 99308cd7a4 chore(version): pre-release bump to 01.08.08-dev [skip ci] 2026-06-25 17:09:50 +00:00
jmiller 561ba24090 Merge pull request 'fix: use typed Joomla 6 event parameters, remove legacy fallbacks' (#184) from fix/joomla6-event-handlers into dev
Universal: Auto Version Bump / Version Bump (push) Has been skipped
Universal: Pre-Release / Build Pre-Release (${{ inputs.stability || github.ref_name }}) (push) Successful in 11s
2026-06-25 17:09:13 +00:00
jmiller 3e1cb9a500 fix: use typed Joomla 6 event parameters, remove legacy fallbacks
Universal: PR Check / Branch Policy (pull_request) Successful in 1s
RC Revert / Rename rc/ back to dev/ (pull_request) Has been skipped
Branch Cleanup / Delete merged branch (pull_request) Successful in 1s
Universal: Pre-Release / Build Pre-Release (${{ inputs.stability || github.ref_name }}) (push) Failing after 4s
Universal: PR Check / Validate PR (pull_request) Failing after 5s
Universal: PR Check / Secret Scan (pull_request) Successful in 5s
Joomla: Metadata Validation / Validate Joomla Metadata (pull_request) Successful in 27s
Universal: PR Check / Build RC Package (pull_request) Has been cancelled
Universal: PR Check / Report Issues (pull_request) Has been cancelled
Remove func_get_arg() legacy fallbacks from onContentBeforeDisplay,
onContentAfterSave, and onContentChangeState. All methods now use
typed event parameters (Joomla 6 only).
2026-06-25 12:08:54 -05:00
gitea-actions[bot] 5ae8e3e001 chore(version): pre-release bump to 01.08.07-dev [skip ci] 2026-06-25 16:27:32 +00:00
jmiller faea3637e0 Merge pull request 'fix: add SQL update file to match manifest version' (#183) from fix/schema-version-file into dev
Universal: Auto Version Bump / Version Bump (push) Has been skipped
Universal: Pre-Release / Build Pre-Release (${{ inputs.stability || github.ref_name }}) (push) Successful in 11s
fix: add SQL update file to match manifest version
2026-06-25 16:26:37 +00:00
58 changed files with 407 additions and 97 deletions
+1 -1
View File
@@ -5,7 +5,7 @@
# FILE INFORMATION
# DEFGROUP: Gitea.Workflow
# INGROUP: mokocli.Automation
# VERSION: 01.08.05
# VERSION: 01.08.11
# BRIEF: Auto-create feature branch when an issue is opened
name: "Universal: Issue Branch"
+1 -1
View File
@@ -68,7 +68,7 @@
## [01.03.00] --- 2026-06-21
<!-- VERSION: 01.08.05 -->
<!-- VERSION: 01.08.11 -->
All notable changes to MokoSuiteCross will be documented in this file.
+1 -1
View File
@@ -1,6 +1,6 @@
# MokoSuiteCross
<!-- VERSION: 01.08.05 -->
<!-- VERSION: 01.08.11 -->
Cross-posting Joomla content to social media, email marketing, and chat platforms for Joomla 5/6.
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<extension type="component" method="upgrade">
<name>com_mokosuitecross</name>
<version>01.08.05</version>
<version>01.08.11</version>
<creationDate>2026-05-28</creationDate>
<author>Moko Consulting</author>
<authorEmail>hello@mokoconsulting.tech</authorEmail>
@@ -0,0 +1 @@
/* 01.08.07 — no schema changes */
@@ -0,0 +1 @@
/* 01.08.08 — no schema changes */
@@ -0,0 +1 @@
/* 01.08.09 — no schema changes */
@@ -0,0 +1 @@
/* 01.08.10 — no schema changes */
@@ -0,0 +1 @@
/* 01.08.11 — no schema changes */
@@ -0,0 +1,86 @@
<?php
/**
* @package MokoSuiteCross
* @subpackage com_mokosuitecross
* @author Moko Consulting <hello@mokoconsulting.tech>
* @copyright Copyright (C) 2026 Moko Consulting. All rights reserved.
* @license GNU General Public License version 3 or later; see LICENSE
* SPDX-License-Identifier: GPL-3.0-or-later
*/
namespace Joomla\Component\MokoSuiteCross\Administrator\Controller;
defined('_JEXEC') or die;
use Joomla\CMS\Factory;
use Joomla\CMS\MVC\Controller\BaseController;
use Joomla\CMS\Session\Session;
use Joomla\CMS\Uri\Uri;
use Joomla\Component\MokoSuiteCross\Administrator\Helper\CrossPostDispatcher;
use Joomla\Component\MokoSuiteCross\Administrator\Helper\PreviewHelper;
class PreviewController extends BaseController
{
public function render(): void
{
if (!Session::checkToken('get')) {
echo json_encode(['error' => 'Invalid token']);
$this->app->close();
return;
}
$articleId = $this->input->getInt('article_id', 0);
$platform = $this->input->getCmd('platform', 'twitter');
if ($articleId < 1) {
echo json_encode(['error' => 'Missing article ID']);
$this->app->close();
return;
}
$db = Factory::getDbo();
$query = $db->getQuery(true)
->select('*')
->from($db->quoteName('#__content'))
->where($db->quoteName('id') . ' = ' . $articleId);
$db->setQuery($query);
$article = $db->loadObject();
if (!$article) {
echo json_encode(['error' => 'Article not found']);
$this->app->close();
return;
}
$meta = CrossPostDispatcher::buildArticleMeta($article);
$title = $meta['{title}'] ?? '';
$text = $meta['{introtext}'] ?? '';
$url = $meta['{url}'] ?? '';
$imageUrl = $meta['{image}'] ?? '';
$authorName = $meta['{author}'] ?? '';
$supportedPlatforms = PreviewHelper::getSupportedPlatforms();
$html = '';
if ($platform === 'all') {
foreach ($supportedPlatforms as $p) {
$html .= '<div style="margin-bottom:20px;">'
. '<div style="font-weight:600;font-size:13px;color:#666;margin-bottom:6px;text-transform:uppercase;">' . htmlspecialchars(ucfirst($p)) . '</div>'
. PreviewHelper::render($p, $title, $text, $url, $imageUrl, $authorName)
. '</div>';
}
} else {
$html = PreviewHelper::render($platform, $title, $text, $url, $imageUrl, $authorName);
}
$this->app->setHeader('Content-Type', 'text/html; charset=utf-8');
echo $html;
$this->app->close();
}
}
@@ -0,0 +1,207 @@
<?php
/**
* @package MokoSuiteCross
* @subpackage com_mokosuitecross
* @author Moko Consulting <hello@mokoconsulting.tech>
* @copyright Copyright (C) 2026 Moko Consulting. All rights reserved.
* @license GNU General Public License version 3 or later; see LICENSE
* SPDX-License-Identifier: GPL-3.0-or-later
*/
namespace Joomla\Component\MokoSuiteCross\Administrator\Helper;
defined('_JEXEC') or die;
class PreviewHelper
{
public static function render(string $platform, string $title, string $text, string $url, string $imageUrl = '', string $authorName = ''): string
{
$title = htmlspecialchars($title, ENT_QUOTES, 'UTF-8');
$text = htmlspecialchars($text, ENT_QUOTES, 'UTF-8');
$url = htmlspecialchars($url, ENT_QUOTES, 'UTF-8');
$authorName = htmlspecialchars($authorName, ENT_QUOTES, 'UTF-8');
$imageHtml = '';
if (!empty($imageUrl)) {
$imageUrl = htmlspecialchars($imageUrl, ENT_QUOTES, 'UTF-8');
$imageHtml = '<img src="' . $imageUrl . '" alt="" style="width:100%;max-height:260px;object-fit:cover;border-radius:8px;margin:8px 0;">';
}
return match ($platform) {
'twitter' => self::renderTwitter($title, $text, $url, $imageHtml, $authorName),
'facebook' => self::renderFacebook($title, $text, $url, $imageHtml, $authorName),
'mastodon' => self::renderMastodon($title, $text, $url, $imageHtml, $authorName),
'linkedin' => self::renderLinkedIn($title, $text, $url, $imageHtml, $authorName),
'bluesky' => self::renderBluesky($title, $text, $url, $imageHtml, $authorName),
'telegram' => self::renderTelegram($title, $text, $url, $imageHtml),
default => self::renderGeneric($platform, $title, $text, $url, $imageHtml),
};
}
public static function getSupportedPlatforms(): array
{
return ['twitter', 'facebook', 'mastodon', 'linkedin', 'bluesky', 'telegram'];
}
private static function renderTwitter(string $title, string $text, string $url, string $imageHtml, string $author): string
{
$displayText = !empty($text) ? $text : $title;
$charCount = mb_strlen(strip_tags($displayText));
return <<<HTML
<div style="font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,sans-serif;max-width:500px;border:1px solid #cfd9de;border-radius:16px;padding:12px 16px;background:#fff;">
<div style="display:flex;align-items:center;margin-bottom:8px;">
<div style="width:40px;height:40px;border-radius:50%;background:#1da1f2;margin-right:10px;display:flex;align-items:center;justify-content:center;color:#fff;font-weight:bold;font-size:16px;">X</div>
<div>
<div style="font-weight:700;font-size:15px;color:#0f1419;">{$author}</div>
<div style="color:#536471;font-size:13px;">@username</div>
</div>
</div>
<div style="font-size:15px;line-height:1.4;color:#0f1419;margin-bottom:8px;">{$displayText}</div>
{$imageHtml}
<div style="margin-top:8px;padding:10px 12px;border:1px solid #cfd9de;border-radius:12px;background:#f7f9f9;">
<div style="font-size:13px;color:#536471;margin-bottom:2px;">yoursite.com</div>
<div style="font-size:15px;font-weight:600;color:#0f1419;">{$title}</div>
</div>
<div style="color:#536471;font-size:13px;margin-top:8px;text-align:right;">{$charCount}/280</div>
</div>
HTML;
}
private static function renderFacebook(string $title, string $text, string $url, string $imageHtml, string $author): string
{
$displayText = !empty($text) ? $text : $title;
return <<<HTML
<div style="font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,sans-serif;max-width:500px;border:1px solid #dddfe2;border-radius:8px;background:#fff;overflow:hidden;">
<div style="padding:12px 16px;">
<div style="display:flex;align-items:center;margin-bottom:8px;">
<div style="width:40px;height:40px;border-radius:50%;background:#1877f2;margin-right:10px;display:flex;align-items:center;justify-content:center;color:#fff;font-weight:bold;font-size:18px;">f</div>
<div>
<div style="font-weight:600;font-size:15px;color:#050505;">{$author}</div>
<div style="color:#65676b;font-size:13px;">Just now</div>
</div>
</div>
<div style="font-size:15px;line-height:1.4;color:#050505;">{$displayText}</div>
</div>
{$imageHtml}
<div style="padding:10px 16px;border-top:1px solid #dddfe2;background:#f0f2f5;">
<div style="font-size:12px;color:#65676b;text-transform:uppercase;">yoursite.com</div>
<div style="font-size:16px;font-weight:600;color:#050505;margin-top:2px;">{$title}</div>
</div>
</div>
HTML;
}
private static function renderMastodon(string $title, string $text, string $url, string $imageHtml, string $author): string
{
$displayText = !empty($text) ? $text : $title;
$charCount = mb_strlen(strip_tags($displayText));
return <<<HTML
<div style="font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,sans-serif;max-width:500px;border:1px solid #c0cdd9;border-radius:8px;padding:14px 16px;background:#fff;">
<div style="display:flex;align-items:center;margin-bottom:10px;">
<div style="width:46px;height:46px;border-radius:8px;background:#6364ff;margin-right:10px;display:flex;align-items:center;justify-content:center;color:#fff;font-weight:bold;font-size:20px;">M</div>
<div>
<div style="font-weight:700;font-size:15px;color:#1a1a2e;">{$author}</div>
<div style="color:#606984;font-size:13px;">@user@mastodon.social</div>
</div>
</div>
<div style="font-size:15px;line-height:1.5;color:#1a1a2e;">{$displayText}</div>
{$imageHtml}
<div style="margin-top:8px;padding:10px 12px;border:1px solid #c0cdd9;border-radius:8px;background:#f2f5f7;">
<div style="font-size:14px;font-weight:600;color:#1a1a2e;">{$title}</div>
<div style="font-size:12px;color:#606984;margin-top:2px;">yoursite.com</div>
</div>
<div style="color:#606984;font-size:13px;margin-top:8px;text-align:right;">{$charCount}/500</div>
</div>
HTML;
}
private static function renderLinkedIn(string $title, string $text, string $url, string $imageHtml, string $author): string
{
$displayText = !empty($text) ? $text : $title;
return <<<HTML
<div style="font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,sans-serif;max-width:500px;border:1px solid #e0dfdc;border-radius:8px;background:#fff;overflow:hidden;">
<div style="padding:12px 16px;">
<div style="display:flex;align-items:center;margin-bottom:8px;">
<div style="width:48px;height:48px;border-radius:50%;background:#0a66c2;margin-right:10px;display:flex;align-items:center;justify-content:center;color:#fff;font-weight:bold;font-size:18px;">in</div>
<div>
<div style="font-weight:600;font-size:14px;color:#191919;">{$author}</div>
<div style="color:#666;font-size:12px;">Just now</div>
</div>
</div>
<div style="font-size:14px;line-height:1.4;color:#191919;">{$displayText}</div>
</div>
{$imageHtml}
<div style="padding:8px 16px 12px;border-top:1px solid #e0dfdc;background:#f9fafb;">
<div style="font-size:14px;font-weight:600;color:#191919;">{$title}</div>
<div style="font-size:12px;color:#666;margin-top:2px;">yoursite.com</div>
</div>
</div>
HTML;
}
private static function renderBluesky(string $title, string $text, string $url, string $imageHtml, string $author): string
{
$displayText = !empty($text) ? $text : $title;
$charCount = mb_strlen(strip_tags($displayText));
return <<<HTML
<div style="font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,sans-serif;max-width:500px;border:1px solid #d1d5db;border-radius:12px;padding:12px 16px;background:#fff;">
<div style="display:flex;align-items:center;margin-bottom:8px;">
<div style="width:42px;height:42px;border-radius:50%;background:#0085ff;margin-right:10px;display:flex;align-items:center;justify-content:center;color:#fff;font-weight:bold;font-size:16px;">B</div>
<div>
<div style="font-weight:600;font-size:15px;color:#1e2937;">{$author}</div>
<div style="color:#6b7280;font-size:13px;">@user.bsky.social</div>
</div>
</div>
<div style="font-size:15px;line-height:1.4;color:#1e2937;">{$displayText}</div>
{$imageHtml}
<div style="margin-top:8px;padding:10px 12px;border:1px solid #d1d5db;border-radius:8px;background:#f9fafb;">
<div style="font-size:14px;font-weight:600;color:#1e2937;">{$title}</div>
<div style="font-size:12px;color:#6b7280;margin-top:2px;">yoursite.com</div>
</div>
<div style="color:#6b7280;font-size:13px;margin-top:8px;text-align:right;">{$charCount}/300</div>
</div>
HTML;
}
private static function renderTelegram(string $title, string $text, string $url, string $imageHtml): string
{
$displayText = !empty($text) ? $text : $title;
return <<<HTML
<div style="font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,sans-serif;max-width:500px;background:#effdde;border-radius:12px;padding:10px 14px;margin-left:60px;">
{$imageHtml}
<div style="font-size:15px;line-height:1.4;color:#000;">{$displayText}</div>
<div style="margin-top:8px;padding:8px 12px;border-left:3px solid #4fae4e;background:#fff;border-radius:0 8px 8px 0;">
<div style="font-size:14px;font-weight:600;color:#000;">{$title}</div>
<div style="font-size:12px;color:#888;margin-top:2px;">yoursite.com</div>
</div>
<div style="color:#5fb452;font-size:11px;text-align:right;margin-top:4px;">Just now</div>
</div>
HTML;
}
private static function renderGeneric(string $platform, string $title, string $text, string $url, string $imageHtml): string
{
$platformLabel = htmlspecialchars(ucfirst($platform), ENT_QUOTES, 'UTF-8');
$displayText = !empty($text) ? $text : $title;
return <<<HTML
<div style="font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,sans-serif;max-width:500px;border:1px solid #ddd;border-radius:8px;padding:12px 16px;background:#fff;">
<div style="font-weight:600;font-size:13px;color:#666;margin-bottom:8px;text-transform:uppercase;">{$platformLabel}</div>
<div style="font-size:15px;line-height:1.4;color:#333;">{$displayText}</div>
{$imageHtml}
<div style="margin-top:8px;padding:8px 12px;border:1px solid #ddd;border-radius:6px;background:#f9f9f9;">
<div style="font-size:14px;font-weight:600;color:#333;">{$title}</div>
<div style="font-size:12px;color:#999;">yoursite.com</div>
</div>
</div>
HTML;
}
}
@@ -31,3 +31,6 @@ PLG_CONTENT_MOKOSUITECROSS_SHARE_IMAGE_CUSTOM="Custom Image"
PLG_CONTENT_MOKOSUITECROSS_SHARE_IMAGE_NONE="No Image"
PLG_CONTENT_MOKOSUITECROSS_CUSTOM_IMAGE="Custom Share Image"
PLG_CONTENT_MOKOSUITECROSS_CUSTOM_IMAGE_DESC="Select an image from the media manager to use for cross-posting."
PLG_CONTENT_MOKOSUITECROSS_FIELDSET_PREVIEW="Social Preview"
PLG_CONTENT_MOKOSUITECROSS_PREVIEW="Preview Post"
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<extension type="plugin" group="content" method="upgrade">
<name>Content - MokoSuiteCross</name>
<version>01.08.05</version>
<version>01.08.11</version>
<creationDate>2026-05-28</creationDate>
<author>Moko Consulting</author>
<authorEmail>hello@mokoconsulting.tech</authorEmail>
@@ -19,6 +19,7 @@ use Joomla\CMS\Factory;
use Joomla\CMS\Form\Form;
use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Plugin\CMSPlugin;
use Joomla\CMS\Session\Session;
use Joomla\CMS\Uri\Uri;
use Joomla\Component\MokoSuiteCross\Administrator\Helper\CrossPostDispatcher;
use Joomla\Event\SubscriberInterface;
@@ -265,26 +266,57 @@ XML;
$form->load($historyXml);
$form->setFieldAttribute('mokosuitecross_history', 'description', $historyHtml, 'attribs');
}
// Social Preview panel (#156)
$token = Session::getFormToken();
$previewUrl = Uri::base() . 'index.php?option=com_mokosuitecross&task=preview.render&format=raw&article_id=' . $articleId . '&' . $token . '=1';
$previewButtonHtml = '<div id="mokosuitecross-preview-panel">'
. '<div class="mb-2">'
. '<select id="mokosuitecross-preview-platform" class="form-select form-select-sm" style="width:auto;display:inline-block;">'
. '<option value="all">All Platforms</option>'
. '<option value="twitter">X / Twitter</option>'
. '<option value="facebook">Facebook</option>'
. '<option value="linkedin">LinkedIn</option>'
. '<option value="mastodon">Mastodon</option>'
. '<option value="bluesky">Bluesky</option>'
. '<option value="telegram">Telegram</option>'
. '</select> '
. '<button type="button" class="btn btn-sm btn-outline-primary" onclick="mokosuitecrossLoadPreview()">'
. '<span class="icon-eye" aria-hidden="true"></span> Preview</button>'
. '</div>'
. '<div id="mokosuitecross-preview-output" style="max-height:600px;overflow-y:auto;"></div>'
. '</div>'
. '<script>'
. 'function mokosuitecrossLoadPreview(){'
. 'var p=document.getElementById("mokosuitecross-preview-platform").value;'
. 'var o=document.getElementById("mokosuitecross-preview-output");'
. 'o.innerHTML="<div class=\"text-center p-3\"><span class=\"spinner-border spinner-border-sm\"></span> Loading...</div>";'
. 'fetch("' . $previewUrl . '&platform="+p)'
. '.then(function(r){return r.text();})'
. '.then(function(h){o.innerHTML=h;})'
. '.catch(function(){o.innerHTML="<div class=\"alert alert-danger\">Preview failed</div>";});'
. '}'
. '</script>';
$previewXml = '<?xml version="1.0"?>
<form><fields name="attribs"><fieldset name="mokosuitecross_preview" label="PLG_CONTENT_MOKOSUITECROSS_FIELDSET_PREVIEW">
<field name="mokosuitecross_preview_panel" type="note"
label="PLG_CONTENT_MOKOSUITECROSS_PREVIEW"
description="" />
</fieldset></fields></form>';
$form->load($previewXml);
$form->setFieldAttribute('mokosuitecross_preview_panel', 'description', $previewButtonHtml, 'attribs');
}
}
/**
* Add cross-post status badges before article content in admin.
*
* Joomla 5/6 compatible — accepts both BeforeDisplayEvent and legacy parameters.
*/
public function onContentBeforeDisplay($event): string
public function onContentBeforeDisplay(\Joomla\CMS\Event\Content\BeforeDisplayEvent $event): string
{
// Joomla 5/6 compatibility
if ($event instanceof \Joomla\CMS\Event\Content\BeforeDisplayEvent) {
$context = $event->getContext();
$article = $event->getItem();
} elseif (is_string($event) && $event === 'com_content.article' && func_num_args() >= 2) {
$context = $event;
$article = func_get_arg(1);
} else {
return '';
}
$context = $event->getContext();
$article = $event->getItem();
$app = $this->getApplication();
@@ -326,31 +358,18 @@ XML;
/**
* Dispatch cross-post when an article is saved and published.
*
* Joomla 5/6 compatible — accepts both AfterSaveEvent and legacy parameters.
*/
public function onContentAfterSave($event): void
public function onContentAfterSave(\Joomla\CMS\Event\Content\AfterSaveEvent $event): void
{
// Joomla 6 passes an AfterSaveEvent object
if ($event instanceof \Joomla\CMS\Event\Content\AfterSaveEvent) {
$context = $event->getContext();
$context = $event->getContext();
if ($context !== 'com_content.article') {
return;
}
$article = $event->getItem();
$isNew = $event->getIsNew();
} elseif (is_string($event) && $event === 'com_content.article' && func_num_args() >= 3) {
// Legacy fallback (Joomla 4 style positional args)
$context = $event;
$article = func_get_arg(1);
$isNew = func_get_arg(2);
} else {
// Not our context or wrong argument count — bail
if ($context !== 'com_content.article') {
return;
}
$article = $event->getItem();
$isNew = $event->getIsNew();
if ((int) ($article->state ?? 0) !== 1) {
return;
}
@@ -376,28 +395,18 @@ XML;
/**
* Dispatch cross-post when article state changes to published.
*
* Joomla 5/6 compatible — accepts both ContentChangeStateEvent and legacy parameters.
*/
public function onContentChangeState($event): void
public function onContentChangeState(\Joomla\CMS\Event\Content\ContentChangeStateEvent $event): void
{
if ($event instanceof \Joomla\CMS\Event\Content\ContentChangeStateEvent) {
$context = $event->getContext();
$context = $event->getContext();
if ($context !== 'com_content.article') {
return;
}
$pks = $event->getPks();
$value = $event->getValue();
} elseif (is_string($event) && $event === 'com_content.article' && func_num_args() >= 3) {
$context = $event;
$pks = func_get_arg(1);
$value = func_get_arg(2);
} else {
if ($context !== 'com_content.article') {
return;
}
$pks = $event->getPks();
$value = $event->getValue();
$params = ComponentHelper::getParams('com_mokosuitecross');
// Unpublish/trash: delete from platforms if configured
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<extension type="plugin" group="mokosuitecross" method="upgrade">
<name>MokoSuiteCross - ActivityPub (Fediverse)</name>
<version>01.08.05</version>
<version>01.08.11</version>
<creationDate>2026-05-28</creationDate>
<author>Moko Consulting</author>
<authorEmail>hello@mokoconsulting.tech</authorEmail>
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<extension type="plugin" group="mokosuitecross" method="upgrade">
<name>MokoSuiteCross - Google Blogger</name>
<version>01.08.05</version>
<version>01.08.11</version>
<creationDate>2026-05-28</creationDate>
<author>Moko Consulting</author>
<authorEmail>hello@mokoconsulting.tech</authorEmail>
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<extension type="plugin" group="mokosuitecross" method="upgrade">
<name>MokoSuiteCross - Bluesky</name>
<version>01.08.05</version>
<version>01.08.11</version>
<creationDate>2026-05-28</creationDate>
<author>Moko Consulting</author>
<authorEmail>hello@mokoconsulting.tech</authorEmail>
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<extension type="plugin" group="mokosuitecross" method="upgrade">
<name>MokoSuiteCross - Brevo (Sendinblue)</name>
<version>01.08.05</version>
<version>01.08.11</version>
<creationDate>2026-05-28</creationDate>
<author>Moko Consulting</author>
<authorEmail>hello@mokoconsulting.tech</authorEmail>
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<extension type="plugin" group="mokosuitecross" method="upgrade">
<name>MokoSuiteCross - Constant Contact</name>
<version>01.08.05</version>
<version>01.08.11</version>
<creationDate>2026-05-28</creationDate>
<author>Moko Consulting</author>
<authorEmail>hello@mokoconsulting.tech</authorEmail>
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<extension type="plugin" group="mokosuitecross" method="upgrade">
<name>MokoSuiteCross - ConvertKit</name>
<version>01.08.05</version>
<version>01.08.11</version>
<creationDate>2026-05-28</creationDate>
<author>Moko Consulting</author>
<authorEmail>hello@mokoconsulting.tech</authorEmail>
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<extension type="plugin" group="mokosuitecross" method="upgrade">
<name>MokoSuiteCross - Dev.to</name>
<version>01.08.05</version>
<version>01.08.11</version>
<creationDate>2026-05-28</creationDate>
<author>Moko Consulting</author>
<authorEmail>hello@mokoconsulting.tech</authorEmail>
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<extension type="plugin" group="mokosuitecross" method="upgrade">
<name>MokoSuiteCross - Discord</name>
<version>01.08.05</version>
<version>01.08.11</version>
<creationDate>2026-05-28</creationDate>
<author>Moko Consulting</author>
<authorEmail>hello@mokoconsulting.tech</authorEmail>
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<extension type="plugin" group="mokosuitecross" method="upgrade">
<name>MokoSuiteCross - Facebook / Meta</name>
<version>01.08.05</version>
<version>01.08.11</version>
<creationDate>2026-05-28</creationDate>
<author>Moko Consulting</author>
<authorEmail>hello@mokoconsulting.tech</authorEmail>
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<extension type="plugin" group="mokosuitecross" method="upgrade">
<name>MokoSuiteCross - Ghost</name>
<version>01.08.05</version>
<version>01.08.11</version>
<creationDate>2026-05-28</creationDate>
<author>Moko Consulting</author>
<authorEmail>hello@mokoconsulting.tech</authorEmail>
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<extension type="plugin" group="mokosuitecross" method="upgrade">
<name>MokoSuiteCross - Google Business Profile</name>
<version>01.08.05</version>
<version>01.08.11</version>
<creationDate>2026-05-28</creationDate>
<author>Moko Consulting</author>
<authorEmail>hello@mokoconsulting.tech</authorEmail>
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<extension type="plugin" group="mokosuitecross" method="upgrade">
<name>MokoSuiteCross - Google Chat</name>
<version>01.08.05</version>
<version>01.08.11</version>
<creationDate>2026-05-28</creationDate>
<author>Moko Consulting</author>
<authorEmail>hello@mokoconsulting.tech</authorEmail>
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<extension type="plugin" group="mokosuitecross" method="upgrade">
<name>MokoSuiteCross - Hashnode</name>
<version>01.08.05</version>
<version>01.08.11</version>
<creationDate>2026-05-28</creationDate>
<author>Moko Consulting</author>
<authorEmail>hello@mokoconsulting.tech</authorEmail>
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<extension type="plugin" group="mokosuitecross" method="upgrade">
<name>MokoSuiteCross - Instagram</name>
<version>01.08.05</version>
<version>01.08.11</version>
<creationDate>2026-06-23</creationDate>
<author>Moko Consulting</author>
<authorEmail>hello@mokoconsulting.tech</authorEmail>
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<extension type="plugin" group="mokosuitecross" method="upgrade">
<name>MokoSuiteCross - LinkedIn</name>
<version>01.08.05</version>
<version>01.08.11</version>
<creationDate>2026-05-28</creationDate>
<author>Moko Consulting</author>
<authorEmail>hello@mokoconsulting.tech</authorEmail>
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<extension type="plugin" group="mokosuitecross" method="upgrade">
<name>MokoSuiteCross - Mailchimp</name>
<version>01.08.05</version>
<version>01.08.11</version>
<creationDate>2026-05-28</creationDate>
<author>Moko Consulting</author>
<authorEmail>hello@mokoconsulting.tech</authorEmail>
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<extension type="plugin" group="mokosuitecross" method="upgrade">
<name>MokoSuiteCross - Mastodon</name>
<version>01.08.05</version>
<version>01.08.11</version>
<creationDate>2026-05-28</creationDate>
<author>Moko Consulting</author>
<authorEmail>hello@mokoconsulting.tech</authorEmail>
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<extension type="plugin" group="mokosuitecross" method="upgrade">
<name>MokoSuiteCross - Matrix / Element</name>
<version>01.08.05</version>
<version>01.08.11</version>
<creationDate>2026-05-28</creationDate>
<author>Moko Consulting</author>
<authorEmail>hello@mokoconsulting.tech</authorEmail>
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<extension type="plugin" group="mokosuitecross" method="upgrade">
<name>MokoSuiteCross - Medium</name>
<version>01.08.05</version>
<version>01.08.11</version>
<creationDate>2026-05-28</creationDate>
<author>Moko Consulting</author>
<authorEmail>hello@mokoconsulting.tech</authorEmail>
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<extension type="plugin" group="mokosuitecross" method="upgrade">
<name>MokoSuiteCross - MokoSuiteCalendar Events</name>
<version>01.08.05</version>
<version>01.08.11</version>
<creationDate>2026-05-28</creationDate>
<author>Moko Consulting</author>
<authorEmail>hello@mokoconsulting.tech</authorEmail>
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<extension type="plugin" group="mokosuitecross" method="upgrade">
<name>MokoSuiteCross - MokoSuiteGallery</name>
<version>01.08.05</version>
<version>01.08.11</version>
<creationDate>2026-05-28</creationDate>
<author>Moko Consulting</author>
<authorEmail>hello@mokoconsulting.tech</authorEmail>
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<extension type="plugin" group="mokosuitecross" method="upgrade">
<name>MokoSuiteCross - Nostr</name>
<version>01.08.05</version>
<version>01.08.11</version>
<creationDate>2026-05-28</creationDate>
<author>Moko Consulting</author>
<authorEmail>hello@mokoconsulting.tech</authorEmail>
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<extension type="plugin" group="mokosuitecross" method="upgrade">
<name>MokoSuiteCross - Ntfy Push Notifications</name>
<version>01.08.05</version>
<version>01.08.11</version>
<creationDate>2026-05-28</creationDate>
<author>Moko Consulting</author>
<authorEmail>hello@mokoconsulting.tech</authorEmail>
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<extension type="plugin" group="mokosuitecross" method="upgrade">
<name>MokoSuiteCross - Pinterest</name>
<version>01.08.05</version>
<version>01.08.11</version>
<creationDate>2026-05-28</creationDate>
<author>Moko Consulting</author>
<authorEmail>hello@mokoconsulting.tech</authorEmail>
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<extension type="plugin" group="mokosuitecross" method="upgrade">
<name>MokoSuiteCross - Reddit</name>
<version>01.08.05</version>
<version>01.08.11</version>
<creationDate>2026-05-28</creationDate>
<author>Moko Consulting</author>
<authorEmail>hello@mokoconsulting.tech</authorEmail>
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<extension type="plugin" group="mokosuitecross" method="upgrade">
<name>MokoSuiteCross - RSS Feed</name>
<version>01.08.05</version>
<version>01.08.11</version>
<creationDate>2026-05-28</creationDate>
<author>Moko Consulting</author>
<authorEmail>hello@mokoconsulting.tech</authorEmail>
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<extension type="plugin" group="mokosuitecross" method="upgrade">
<name>MokoSuiteCross - SendGrid</name>
<version>01.08.05</version>
<version>01.08.11</version>
<creationDate>2026-05-28</creationDate>
<author>Moko Consulting</author>
<authorEmail>hello@mokoconsulting.tech</authorEmail>
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<extension type="plugin" group="mokosuitecross" method="upgrade">
<name>MokoSuiteCross - Slack</name>
<version>01.08.05</version>
<version>01.08.11</version>
<creationDate>2026-05-28</creationDate>
<author>Moko Consulting</author>
<authorEmail>hello@mokoconsulting.tech</authorEmail>
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<extension type="plugin" group="mokosuitecross" method="upgrade">
<name>MokoSuiteCross - Microsoft Teams</name>
<version>01.08.05</version>
<version>01.08.11</version>
<creationDate>2026-05-28</creationDate>
<author>Moko Consulting</author>
<authorEmail>hello@mokoconsulting.tech</authorEmail>
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<extension type="plugin" group="mokosuitecross" method="upgrade">
<name>MokoSuiteCross - Telegram</name>
<version>01.08.05</version>
<version>01.08.11</version>
<creationDate>2026-05-28</creationDate>
<author>Moko Consulting</author>
<authorEmail>hello@mokoconsulting.tech</authorEmail>
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<extension type="plugin" group="mokosuitecross" method="upgrade">
<name>MokoSuiteCross - Threads (Meta)</name>
<version>01.08.05</version>
<version>01.08.11</version>
<creationDate>2026-05-28</creationDate>
<author>Moko Consulting</author>
<authorEmail>hello@mokoconsulting.tech</authorEmail>
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<extension type="plugin" group="mokosuitecross" method="upgrade">
<name>MokoSuiteCross - TikTok</name>
<version>01.08.05</version>
<version>01.08.11</version>
<creationDate>2026-05-28</creationDate>
<author>Moko Consulting</author>
<authorEmail>hello@mokoconsulting.tech</authorEmail>
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<extension type="plugin" group="mokosuitecross" method="upgrade">
<name>MokoSuiteCross - Tumblr</name>
<version>01.08.05</version>
<version>01.08.11</version>
<creationDate>2026-05-28</creationDate>
<author>Moko Consulting</author>
<authorEmail>hello@mokoconsulting.tech</authorEmail>
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<extension type="plugin" group="mokosuitecross" method="upgrade">
<name>MokoSuiteCross - X / Twitter</name>
<version>01.08.05</version>
<version>01.08.11</version>
<creationDate>2026-05-28</creationDate>
<author>Moko Consulting</author>
<authorEmail>hello@mokoconsulting.tech</authorEmail>
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<extension type="plugin" group="mokosuitecross" method="upgrade">
<name>MokoSuiteCross - Generic Webhook</name>
<version>01.08.05</version>
<version>01.08.11</version>
<creationDate>2026-05-28</creationDate>
<author>Moko Consulting</author>
<authorEmail>hello@mokoconsulting.tech</authorEmail>
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<extension type="plugin" group="mokosuitecross" method="upgrade">
<name>MokoSuiteCross - WhatsApp Business</name>
<version>01.08.05</version>
<version>01.08.11</version>
<creationDate>2026-05-28</creationDate>
<author>Moko Consulting</author>
<authorEmail>hello@mokoconsulting.tech</authorEmail>
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<extension type="plugin" group="mokosuitecross" method="upgrade">
<name>MokoSuiteCross - WordPress</name>
<version>01.08.05</version>
<version>01.08.11</version>
<creationDate>2026-05-28</creationDate>
<author>Moko Consulting</author>
<authorEmail>hello@mokoconsulting.tech</authorEmail>
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<extension type="plugin" group="mokosuitecross" method="upgrade">
<name>MokoSuiteCross - Youtube</name>
<version>01.08.05</version>
<version>01.08.11</version>
<creationDate>2026-06-23</creationDate>
<author>Moko Consulting</author>
<authorEmail>hello@mokoconsulting.tech</authorEmail>
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<extension type="plugin" group="system" method="upgrade">
<name>System - MokoSuiteCross</name>
<version>01.08.05</version>
<version>01.08.11</version>
<creationDate>2026-05-28</creationDate>
<author>Moko Consulting</author>
<authorEmail>hello@mokoconsulting.tech</authorEmail>
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<extension type="plugin" group="system" method="upgrade">
<name>System - MokoSuiteCross Events</name>
<version>01.08.05</version>
<version>01.08.11</version>
<creationDate>2026-05-28</creationDate>
<author>Moko Consulting</author>
<authorEmail>hello@mokoconsulting.tech</authorEmail>
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<extension type="plugin" group="system" method="upgrade">
<name>System - MokoSuiteCross Gallery</name>
<version>01.08.05</version>
<version>01.08.11</version>
<creationDate>2026-05-28</creationDate>
<author>Moko Consulting</author>
<authorEmail>hello@mokoconsulting.tech</authorEmail>
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<extension type="plugin" group="task" method="upgrade">
<name>Task - MokoSuiteCross Queue Processor</name>
<version>01.08.05</version>
<version>01.08.11</version>
<creationDate>2026-05-28</creationDate>
<author>Moko Consulting</author>
<authorEmail>hello@mokoconsulting.tech</authorEmail>
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<extension type="plugin" group="webservices" method="upgrade">
<name>Web Services - MokoSuiteCross</name>
<version>01.08.05</version>
<version>01.08.11</version>
<creationDate>2026-05-28</creationDate>
<author>Moko Consulting</author>
<authorEmail>hello@mokoconsulting.tech</authorEmail>
+1 -1
View File
@@ -2,7 +2,7 @@
<extension type="package" method="upgrade">
<name>MokoSuiteCross</name>
<packagename>mokosuitecross</packagename>
<version>01.08.05</version>
<version>01.08.11</version>
<creationDate>2026-05-28</creationDate>
<author>Moko Consulting</author>
<authorEmail>hello@mokoconsulting.tech</authorEmail>