Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 97b78244f5 |
@@ -1,72 +1 @@
|
||||
# Copyright (C) 2026 Moko Consulting <hello@mokoconsulting.tech>
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
#
|
||||
# FILE INFORMATION
|
||||
# DEFGROUP: Gitea.Workflow
|
||||
# INGROUP: mokocli.Universal
|
||||
# REPO: https://git.mokoconsulting.tech/MokoConsulting/mokocli
|
||||
# PATH: /.mokogitea/workflows/ci-issue-reporter.yml
|
||||
# VERSION: 01.00.00
|
||||
# BRIEF: Reusable workflow — creates/updates a Gitea issue when a CI gate fails.
|
||||
# Clones MokoCLI and runs cli/ci_issue_reporter.sh.
|
||||
|
||||
name: "Universal: CI Issue Reporter"
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
gate:
|
||||
description: "CI gate name (e.g. PR Validation, Repository Health)"
|
||||
required: true
|
||||
type: string
|
||||
details:
|
||||
description: "Human-readable failure description"
|
||||
required: true
|
||||
type: string
|
||||
severity:
|
||||
description: "error or warning"
|
||||
required: false
|
||||
type: string
|
||||
default: "error"
|
||||
workflow:
|
||||
description: "Workflow name for the issue title"
|
||||
required: false
|
||||
type: string
|
||||
default: ""
|
||||
secrets:
|
||||
MOKOGITEA_TOKEN:
|
||||
required: true
|
||||
|
||||
env:
|
||||
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
|
||||
|
||||
jobs:
|
||||
report:
|
||||
name: "Report: ${{ inputs.gate }}"
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Clone MokoCLI
|
||||
env:
|
||||
MOKOGITEA_TOKEN: ${{ secrets.MOKOGITEA_TOKEN }}
|
||||
MOKOGITEA_URL: ${{ vars.GITEA_URL || 'https://git.mokoconsulting.tech' }}
|
||||
run: |
|
||||
git clone --depth 1 --filter=blob:none --sparse "${MOKOGITEA_URL}/MokoConsulting/MokoCLI.git" /tmp/mokocli
|
||||
cd /tmp/mokocli && git sparse-checkout set cli/ci_issue_reporter.sh
|
||||
|
||||
- name: Report CI failure
|
||||
env:
|
||||
MOKOGITEA_TOKEN: ${{ secrets.MOKOGITEA_TOKEN }}
|
||||
MOKOGITEA_URL: ${{ vars.GITEA_URL || 'https://git.mokoconsulting.tech' }}
|
||||
INPUT_GATE: ${{ inputs.gate }}
|
||||
INPUT_DETAILS: ${{ inputs.details }}
|
||||
INPUT_SEVERITY: ${{ inputs.severity }}
|
||||
INPUT_WORKFLOW: ${{ inputs.workflow }}
|
||||
run: |
|
||||
chmod +x /tmp/mokocli/cli/ci_issue_reporter.sh
|
||||
/tmp/mokocli/cli/ci_issue_reporter.sh \
|
||||
--gate "$INPUT_GATE" \
|
||||
--details "$INPUT_DETAILS" \
|
||||
--severity "$INPUT_SEVERITY" \
|
||||
--workflow "$INPUT_WORKFLOW"
|
||||
IyBDb3B5cmlnaHQgKEMpIDIwMjYgTW9rbyBDb25zdWx0aW5nIDxoZWxsb0Btb2tvY29uc3VsdGluZy50ZWNoPgojCiMgU1BEWC1MaWNlbnNlLUlkZW50aWZpZXI6IEdQTC0zLjAtb3ItbGF0ZXIKIwojIEZJTEUgSU5GT1JNQVRJT04KIyBERUZHUk9VUDogR2l0ZWEuV29ya2Zsb3cKIyBJTkdST1VQOiBtb2tvY2xpLlVuaXZlcnNhbAojIFJFUE86IGh0dHBzOi8vZ2l0Lm1va29jb25zdWx0aW5nLnRlY2gvTW9rb0NvbnN1bHRpbmcvbW9rb2NsaQojIFBBVEg6IC8ubW9rb2dpdGVhL3dvcmtmbG93cy9jaS1pc3N1ZS1yZXBvcnRlci55bWwKIyBWRVJTSU9OOiAwMS4wMC4wMAojIEJSSUVGOiBSZXVzYWJsZSB3b3JrZmxvdyDigJQgY3JlYXRlcy91cGRhdGVzIGEgR2l0ZWEgaXNzdWUgd2hlbiBhIENJIGdhdGUgZmFpbHMuCiMgICAgICAgIENsb25lcyBNb2tvQ0xJIGFuZCBydW5zIGNsaS9jaV9pc3N1ZV9yZXBvcnRlci5zaC4KCm5hbWU6ICJVbml2ZXJzYWw6IENJIElzc3VlIFJlcG9ydGVyIgoKb246CiAgd29ya2Zsb3dfY2FsbDoKICAgIGlucHV0czoKICAgICAgZ2F0ZToKICAgICAgICBkZXNjcmlwdGlvbjogIkNJIGdhdGUgbmFtZSAoZS5nLiBQUiBWYWxpZGF0aW9uLCBSZXBvc2l0b3J5IEhlYWx0aCkiCiAgICAgICAgcmVxdWlyZWQ6IHRydWUKICAgICAgICB0eXBlOiBzdHJpbmcKICAgICAgZGV0YWlsczoKICAgICAgICBkZXNjcmlwdGlvbjogIkh1bWFuLXJlYWRhYmxlIGZhaWx1cmUgZGVzY3JpcHRpb24iCiAgICAgICAgcmVxdWlyZWQ6IHRydWUKICAgICAgICB0eXBlOiBzdHJpbmcKICAgICAgc2V2ZXJpdHk6CiAgICAgICAgZGVzY3JpcHRpb246ICJlcnJvciBvciB3YXJuaW5nIgogICAgICAgIHJlcXVpcmVkOiBmYWxzZQogICAgICAgIHR5cGU6IHN0cmluZwogICAgICAgIGRlZmF1bHQ6ICJlcnJvciIKICAgICAgd29ya2Zsb3c6CiAgICAgICAgZGVzY3JpcHRpb246ICJXb3JrZmxvdyBuYW1lIGZvciB0aGUgaXNzdWUgdGl0bGUiCiAgICAgICAgcmVxdWlyZWQ6IGZhbHNlCiAgICAgICAgdHlwZTogc3RyaW5nCiAgICAgICAgZGVmYXVsdDogIiIKICAgIHNlY3JldHM6CiAgICAgIE1PS09HSVRFQV9UT0tFTjoKICAgICAgICByZXF1aXJlZDogdHJ1ZQoKZW52OgogIEZPUkNFX0pBVkFTQ1JJUFRfQUNUSU9OU19UT19OT0RFMjQ6IHRydWUKCmpvYnM6CiAgcmVwb3J0OgogICAgbmFtZTogIlJlcG9ydDogJHt7IGlucHV0cy5nYXRlIH19IgogICAgcnVucy1vbjogdWJ1bnR1LWxhdGVzdAoKICAgIHN0ZXBzOgogICAgICAtIG5hbWU6IENsb25lIE1va29DTEkKICAgICAgICBlbnY6CiAgICAgICAgICBNT0tPR0lURUFfVE9LRU46ICR7eyBzZWNyZXRzLk1PS09HSVRFQV9UT0tFTiB9fQogICAgICAgIHJ1bjogfAogICAgICAgICAgTU9LT0dJVEVBX1VSTD0iJHt7IHZhcnMuR0lURUFfVVJMIHx8ICdodHRwczovL2dpdC5tb2tvY29uc3VsdGluZy50ZWNoJyB9fSIKICAgICAgICAgIGdpdCBjbG9uZSAtLWRlcHRoIDEgLS1maWx0ZXI9YmxvYjpub25lIC0tc3BhcnNlICIke01PS09HSVRFQV9VUkx9L01va29Db25zdWx0aW5nL01va29DTEkuZ2l0IiAvdG1wL21va29jbGkKICAgICAgICAgIGNkIC90bXAvbW9rb2NsaSAmJiBnaXQgc3BhcnNlLWNoZWNrb3V0IHNldCBjbGkvY2lfaXNzdWVfcmVwb3J0ZXIuc2gKCiAgICAgIC0gbmFtZTogUmVwb3J0IENJIGZhaWx1cmUKICAgICAgICBlbnY6CiAgICAgICAgICBNT0tPR0lURUFfVE9LRU46ICR7eyBzZWNyZXRzLk1PS09HSVRFQV9UT0tFTiB9fQogICAgICAgICAgTU9LT0dJVEVBX1VSTDogJHt7IHZhcnMuR0lURUFfVVJMIHx8ICdodHRwczovL2dpdC5tb2tvY29uc3VsdGluZy50ZWNoJyB9fQogICAgICAgIHJ1bjogfAogICAgICAgICAgY2htb2QgK3ggL3RtcC9tb2tvY2xpL2NsaS9jaV9pc3N1ZV9yZXBvcnRlci5zaAogICAgICAgICAgL3RtcC9tb2tvY2xpL2NsaS9jaV9pc3N1ZV9yZXBvcnRlci5zaCBcCiAgICAgICAgICAgIC0tZ2F0ZSAiJHt7IGlucHV0cy5nYXRlIH19IiBcCiAgICAgICAgICAgIC0tZGV0YWlscyAiJHt7IGlucHV0cy5kZXRhaWxzIH19IiBcCiAgICAgICAgICAgIC0tc2V2ZXJpdHkgIiR7eyBpbnB1dHMuc2V2ZXJpdHkgfX0iIFwKICAgICAgICAgICAgLS13b3JrZmxvdyAiJHt7IGlucHV0cy53b3JrZmxvdyB9fSIK
|
||||
@@ -5,7 +5,7 @@
|
||||
# FILE INFORMATION
|
||||
# DEFGROUP: Gitea.Workflow
|
||||
# INGROUP: mokocli.Automation
|
||||
# VERSION: 01.08.54
|
||||
# VERSION: 01.08.42
|
||||
# BRIEF: Auto-create feature branch when an issue is opened
|
||||
|
||||
name: "Universal: Issue Branch"
|
||||
|
||||
+1
-13
@@ -2,14 +2,6 @@
|
||||
## [Unreleased]
|
||||
|
||||
### Added
|
||||
- **Best time to post analytics**: engagement tracking with heatmap dashboard widget (#165)
|
||||
- **Analytics heatmap**: 7x24 day/hour grid showing optimal posting windows per platform
|
||||
- **Analytics recommendations**: top posting times based on historical engagement data
|
||||
- **Social image generator**: Generate Open Graph images with article title overlay using PHP GD library (#157)
|
||||
- **Social image config**: Background color, text color, overlay style, and site name override in component options (#157)
|
||||
- **AI caption generation**: Generate platform-optimized cross-post captions from article content using Claude or OpenAI (#161)
|
||||
- **AI provider config**: New "AI Caption Generation" fieldset in component options with provider, API key, model, and tone settings
|
||||
- **AI Generate button**: One-click AI generation button in the Share Content panel that fills all caption fields
|
||||
- **X/Twitter threads**: Auto-split messages exceeding 280 chars into reply chains at sentence boundaries
|
||||
- **X/Twitter cost-optimized posting**: Optional mode to post text-only tweet first ($0.015) with URL as separate reply ($0.20)
|
||||
- **X/Twitter cost warning**: Language string documenting X API pricing for text vs URL posts
|
||||
@@ -29,10 +21,6 @@
|
||||
- **Facebook Stories**: Publish image and video Stories via photo_stories/video_stories endpoints (#162)
|
||||
- **Facebook scheduled posts**: Schedule feed posts with scheduled_publish_time parameter (#162)
|
||||
- **Facebook draft posts**: Save feed posts as unpublished drafts (#162)
|
||||
- **TikTok video upload**: PULL_FROM_URL video publishing via video/init endpoint with status polling (#164)
|
||||
- **TikTok photo carousel**: Up to 35 image carousel posts via content/init endpoint (#164)
|
||||
- **TikTok posting mode**: Configurable DIRECT_POST or MEDIA_UPLOAD (sends to TikTok inbox for in-app editing) (#164)
|
||||
- **TikTok audit warning**: Language string explaining that unverified apps can only create private posts (#164)
|
||||
|
||||
### Fixed
|
||||
- Webservices plugin Joomla 6 compatibility — `onBeforeApiRoute` receives `BeforeApiRouteEvent` object, extract router via `$event->getRouter()`
|
||||
@@ -101,7 +89,7 @@
|
||||
## [01.03.00] --- 2026-06-21
|
||||
|
||||
|
||||
<!-- VERSION: 01.08.54 -->
|
||||
<!-- VERSION: 01.08.42 -->
|
||||
|
||||
All notable changes to MokoSuiteCross will be documented in this file.
|
||||
|
||||
|
||||
+1
-1
@@ -14,7 +14,7 @@
|
||||
DEFGROUP: Template-Joomla
|
||||
INGROUP: Template-Joomla.Documentation
|
||||
REPO: https://github.com/mokoconsulting-tech/Template-Joomla/
|
||||
VERSION: 01.08.54
|
||||
VERSION: 01.08.42
|
||||
PATH: ./CODE_OF_CONDUCT.md
|
||||
BRIEF: Community expectations and enforcement guidelines
|
||||
NOTE: Adapted with attribution from the Contributor Covenant v2.1
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# MokoSuiteCross
|
||||
|
||||
<!-- VERSION: 01.08.54 -->
|
||||
<!-- VERSION: 01.08.42 -->
|
||||
|
||||
Cross-posting Joomla content to social media, email marketing, and chat platforms for Joomla 5/6.
|
||||
|
||||
|
||||
+1
-1
@@ -23,7 +23,7 @@ DEFGROUP: Template-Joomla
|
||||
INGROUP: Template-Joomla.Documentation
|
||||
REPO: https://git.mokoconsulting.tech/MokoConsulting/Template-Joomla
|
||||
PATH: /SECURITY.md
|
||||
VERSION: 01.08.54
|
||||
VERSION: 01.08.42
|
||||
BRIEF: Security vulnerability reporting and handling policy
|
||||
-->
|
||||
|
||||
|
||||
@@ -120,42 +120,6 @@
|
||||
/>
|
||||
</fieldset>
|
||||
|
||||
<fieldset name="link_shortening" label="COM_MOKOSUITECROSS_CONFIG_LINK_SHORTENING">
|
||||
<field
|
||||
name="link_shortener"
|
||||
type="list"
|
||||
label="COM_MOKOSUITECROSS_CONFIG_LINK_SHORTENER"
|
||||
description="COM_MOKOSUITECROSS_CONFIG_LINK_SHORTENER_DESC"
|
||||
default="none">
|
||||
<option value="none">COM_MOKOSUITECROSS_CONFIG_LINK_SHORTENER_NONE</option>
|
||||
<option value="bitly">COM_MOKOSUITECROSS_CONFIG_LINK_SHORTENER_BITLY</option>
|
||||
<option value="rebrandly">COM_MOKOSUITECROSS_CONFIG_LINK_SHORTENER_REBRANDLY</option>
|
||||
<option value="yourls">COM_MOKOSUITECROSS_CONFIG_LINK_SHORTENER_YOURLS</option>
|
||||
</field>
|
||||
<field
|
||||
name="link_shortener_api_key"
|
||||
type="text"
|
||||
label="COM_MOKOSUITECROSS_CONFIG_LINK_SHORTENER_API_KEY"
|
||||
description="COM_MOKOSUITECROSS_CONFIG_LINK_SHORTENER_API_KEY_DESC"
|
||||
showon="link_shortener:bitly,rebrandly"
|
||||
/>
|
||||
<field
|
||||
name="link_shortener_yourls_url"
|
||||
type="url"
|
||||
label="COM_MOKOSUITECROSS_CONFIG_LINK_SHORTENER_YOURLS_URL"
|
||||
description="COM_MOKOSUITECROSS_CONFIG_LINK_SHORTENER_YOURLS_URL_DESC"
|
||||
hint="https://short.example.com/yourls-api.php"
|
||||
showon="link_shortener:yourls"
|
||||
/>
|
||||
<field
|
||||
name="link_shortener_yourls_token"
|
||||
type="text"
|
||||
label="COM_MOKOSUITECROSS_CONFIG_LINK_SHORTENER_YOURLS_TOKEN"
|
||||
description="COM_MOKOSUITECROSS_CONFIG_LINK_SHORTENER_YOURLS_TOKEN_DESC"
|
||||
showon="link_shortener:yourls"
|
||||
/>
|
||||
</fieldset>
|
||||
|
||||
<fieldset name="evergreen" label="COM_MOKOSUITECROSS_CONFIG_EVERGREEN">
|
||||
<field
|
||||
name="evergreen_enabled"
|
||||
@@ -227,79 +191,6 @@
|
||||
/>
|
||||
</fieldset>
|
||||
|
||||
<fieldset name="ai" label="COM_MOKOSUITECROSS_CONFIG_AI">
|
||||
<field
|
||||
name="ai_provider"
|
||||
type="list"
|
||||
label="COM_MOKOSUITECROSS_CONFIG_AI_PROVIDER"
|
||||
description="COM_MOKOSUITECROSS_CONFIG_AI_PROVIDER_DESC"
|
||||
default="none">
|
||||
<option value="none">COM_MOKOSUITECROSS_CONFIG_AI_PROVIDER_NONE</option>
|
||||
<option value="claude">COM_MOKOSUITECROSS_CONFIG_AI_PROVIDER_CLAUDE</option>
|
||||
<option value="openai">COM_MOKOSUITECROSS_CONFIG_AI_PROVIDER_OPENAI</option>
|
||||
</field>
|
||||
<field
|
||||
name="ai_api_key"
|
||||
type="text"
|
||||
label="COM_MOKOSUITECROSS_CONFIG_AI_API_KEY"
|
||||
description="COM_MOKOSUITECROSS_CONFIG_AI_API_KEY_DESC"
|
||||
showon="ai_provider:claude,openai"
|
||||
/>
|
||||
<field
|
||||
name="ai_model"
|
||||
type="text"
|
||||
label="COM_MOKOSUITECROSS_CONFIG_AI_MODEL"
|
||||
description="COM_MOKOSUITECROSS_CONFIG_AI_MODEL_DESC"
|
||||
hint="claude-haiku-4-5 / gpt-4o-mini"
|
||||
showon="ai_provider:claude,openai"
|
||||
/>
|
||||
<field
|
||||
name="ai_tone"
|
||||
type="list"
|
||||
label="COM_MOKOSUITECROSS_CONFIG_AI_TONE"
|
||||
description="COM_MOKOSUITECROSS_CONFIG_AI_TONE_DESC"
|
||||
default="professional"
|
||||
showon="ai_provider:claude,openai">
|
||||
<option value="professional">COM_MOKOSUITECROSS_CONFIG_AI_TONE_PROFESSIONAL</option>
|
||||
<option value="friendly">COM_MOKOSUITECROSS_CONFIG_AI_TONE_FRIENDLY</option>
|
||||
<option value="casual">COM_MOKOSUITECROSS_CONFIG_AI_TONE_CASUAL</option>
|
||||
</field>
|
||||
</fieldset>
|
||||
|
||||
<fieldset name="social_image" label="COM_MOKOSUITECROSS_CONFIG_SOCIAL_IMAGE">
|
||||
<field
|
||||
name="social_image_bg_color"
|
||||
type="color"
|
||||
label="COM_MOKOSUITECROSS_CONFIG_SOCIAL_IMAGE_BG_COLOR"
|
||||
description="COM_MOKOSUITECROSS_CONFIG_SOCIAL_IMAGE_BG_COLOR_DESC"
|
||||
default="#1a1a2e"
|
||||
/>
|
||||
<field
|
||||
name="social_image_text_color"
|
||||
type="color"
|
||||
label="COM_MOKOSUITECROSS_CONFIG_SOCIAL_IMAGE_TEXT_COLOR"
|
||||
description="COM_MOKOSUITECROSS_CONFIG_SOCIAL_IMAGE_TEXT_COLOR_DESC"
|
||||
default="#ffffff"
|
||||
/>
|
||||
<field
|
||||
name="social_image_overlay"
|
||||
type="list"
|
||||
label="COM_MOKOSUITECROSS_CONFIG_SOCIAL_IMAGE_OVERLAY"
|
||||
description="COM_MOKOSUITECROSS_CONFIG_SOCIAL_IMAGE_OVERLAY_DESC"
|
||||
default="dark">
|
||||
<option value="none">COM_MOKOSUITECROSS_CONFIG_SOCIAL_IMAGE_OVERLAY_NONE</option>
|
||||
<option value="light">COM_MOKOSUITECROSS_CONFIG_SOCIAL_IMAGE_OVERLAY_LIGHT</option>
|
||||
<option value="dark">COM_MOKOSUITECROSS_CONFIG_SOCIAL_IMAGE_OVERLAY_DARK</option>
|
||||
</field>
|
||||
<field
|
||||
name="social_image_site_name"
|
||||
type="text"
|
||||
label="COM_MOKOSUITECROSS_CONFIG_SOCIAL_IMAGE_SITE_NAME"
|
||||
description="COM_MOKOSUITECROSS_CONFIG_SOCIAL_IMAGE_SITE_NAME_DESC"
|
||||
hint="Leave blank to use Joomla site name"
|
||||
/>
|
||||
</fieldset>
|
||||
|
||||
<fieldset name="category_rules" label="COM_MOKOSUITECROSS_CONFIG_CATEGORY_RULES">
|
||||
<field
|
||||
name="category_rules_note"
|
||||
|
||||
@@ -534,66 +534,6 @@ COM_MOKOSUITECROSS_DISPATCH_INVALID_SERVICES="service_ids must be a non-empty ar
|
||||
COM_MOKOSUITECROSS_DISPATCH_ARTICLE_NOT_FOUND="Article not found."
|
||||
COM_MOKOSUITECROSS_DISPATCH_NO_SERVICES="No enabled services found matching the request."
|
||||
|
||||
; Link Shortening
|
||||
COM_MOKOSUITECROSS_CONFIG_LINK_SHORTENING="Link Shortening"
|
||||
COM_MOKOSUITECROSS_CONFIG_LINK_SHORTENER="Link Shortener"
|
||||
COM_MOKOSUITECROSS_CONFIG_LINK_SHORTENER_DESC="Select a link shortening service. Shortened URLs are available via the {url_short} placeholder in templates."
|
||||
COM_MOKOSUITECROSS_CONFIG_LINK_SHORTENER_NONE="None (disabled)"
|
||||
COM_MOKOSUITECROSS_CONFIG_LINK_SHORTENER_BITLY="Bitly"
|
||||
COM_MOKOSUITECROSS_CONFIG_LINK_SHORTENER_REBRANDLY="Rebrandly"
|
||||
COM_MOKOSUITECROSS_CONFIG_LINK_SHORTENER_YOURLS="YOURLS (self-hosted)"
|
||||
COM_MOKOSUITECROSS_CONFIG_LINK_SHORTENER_API_KEY="API Key"
|
||||
COM_MOKOSUITECROSS_CONFIG_LINK_SHORTENER_API_KEY_DESC="API key for Bitly or Rebrandly."
|
||||
COM_MOKOSUITECROSS_CONFIG_LINK_SHORTENER_YOURLS_URL="YOURLS API URL"
|
||||
COM_MOKOSUITECROSS_CONFIG_LINK_SHORTENER_YOURLS_URL_DESC="Full URL to your YOURLS API endpoint (e.g. https://short.example.com/yourls-api.php)."
|
||||
COM_MOKOSUITECROSS_CONFIG_LINK_SHORTENER_YOURLS_TOKEN="YOURLS Signature Token"
|
||||
COM_MOKOSUITECROSS_CONFIG_LINK_SHORTENER_YOURLS_TOKEN_DESC="Secret signature token from your YOURLS installation."
|
||||
|
||||
; AI Caption Generation
|
||||
COM_MOKOSUITECROSS_CONFIG_AI="AI Caption Generation"
|
||||
COM_MOKOSUITECROSS_CONFIG_AI_PROVIDER="AI Provider"
|
||||
COM_MOKOSUITECROSS_CONFIG_AI_PROVIDER_DESC="Select an AI provider to generate cross-post captions from article content. The API key is stored in Joomla component params (encrypted at rest)."
|
||||
COM_MOKOSUITECROSS_CONFIG_AI_PROVIDER_NONE="None (disabled)"
|
||||
COM_MOKOSUITECROSS_CONFIG_AI_PROVIDER_CLAUDE="Anthropic Claude"
|
||||
COM_MOKOSUITECROSS_CONFIG_AI_PROVIDER_OPENAI="OpenAI"
|
||||
COM_MOKOSUITECROSS_CONFIG_AI_API_KEY="API Key"
|
||||
COM_MOKOSUITECROSS_CONFIG_AI_API_KEY_DESC="API key for the selected AI provider."
|
||||
COM_MOKOSUITECROSS_CONFIG_AI_MODEL="Model"
|
||||
COM_MOKOSUITECROSS_CONFIG_AI_MODEL_DESC="AI model to use. Leave blank for the default (Claude Haiku 4.5 or GPT-4o Mini)."
|
||||
COM_MOKOSUITECROSS_CONFIG_AI_TONE="Tone"
|
||||
COM_MOKOSUITECROSS_CONFIG_AI_TONE_DESC="The writing tone for generated captions."
|
||||
COM_MOKOSUITECROSS_CONFIG_AI_TONE_PROFESSIONAL="Professional"
|
||||
COM_MOKOSUITECROSS_CONFIG_AI_TONE_FRIENDLY="Friendly"
|
||||
COM_MOKOSUITECROSS_CONFIG_AI_TONE_CASUAL="Casual"
|
||||
COM_MOKOSUITECROSS_AI_GENERATE="Generate with AI"
|
||||
COM_MOKOSUITECROSS_AI_GENERATE_DESC="Generate platform-optimized captions from the article content using AI."
|
||||
COM_MOKOSUITECROSS_AI_GENERATING="Generating captions..."
|
||||
COM_MOKOSUITECROSS_AI_GENERATED="AI captions generated successfully."
|
||||
COM_MOKOSUITECROSS_AI_ERROR="AI generation failed: %s"
|
||||
|
||||
; Social Image Generator
|
||||
COM_MOKOSUITECROSS_CONFIG_SOCIAL_IMAGE="Social Image Generator"
|
||||
COM_MOKOSUITECROSS_CONFIG_SOCIAL_IMAGE_BG_COLOR="Background Color"
|
||||
COM_MOKOSUITECROSS_CONFIG_SOCIAL_IMAGE_BG_COLOR_DESC="Default background color for generated OG images when no article image is available."
|
||||
COM_MOKOSUITECROSS_CONFIG_SOCIAL_IMAGE_TEXT_COLOR="Text Color"
|
||||
COM_MOKOSUITECROSS_CONFIG_SOCIAL_IMAGE_TEXT_COLOR_DESC="Color for the title and site name text overlay on generated images."
|
||||
COM_MOKOSUITECROSS_CONFIG_SOCIAL_IMAGE_OVERLAY="Image Overlay"
|
||||
COM_MOKOSUITECROSS_CONFIG_SOCIAL_IMAGE_OVERLAY_DESC="Darken or lighten the background image to improve text readability."
|
||||
COM_MOKOSUITECROSS_CONFIG_SOCIAL_IMAGE_OVERLAY_NONE="None"
|
||||
COM_MOKOSUITECROSS_CONFIG_SOCIAL_IMAGE_OVERLAY_LIGHT="Light"
|
||||
COM_MOKOSUITECROSS_CONFIG_SOCIAL_IMAGE_OVERLAY_DARK="Dark"
|
||||
COM_MOKOSUITECROSS_CONFIG_SOCIAL_IMAGE_SITE_NAME="Site Name Override"
|
||||
COM_MOKOSUITECROSS_CONFIG_SOCIAL_IMAGE_SITE_NAME_DESC="Custom site name shown at the bottom of generated images. Leave blank to use the Joomla site name."
|
||||
COM_MOKOSUITECROSS_AI_NOT_CONFIGURED="AI is not configured. Go to Options to set up a provider and API key."
|
||||
|
||||
|
||||
; Analytics
|
||||
COM_MOKOSUITECROSS_ANALYTICS="Analytics"
|
||||
COM_MOKOSUITECROSS_ANALYTICS_BEST_TIMES="Best Times to Post"
|
||||
COM_MOKOSUITECROSS_ANALYTICS_HEATMAP="Engagement Heatmap"
|
||||
COM_MOKOSUITECROSS_ANALYTICS_NO_DATA="Not enough data yet. Analytics will appear after posts collect engagement metrics."
|
||||
COM_MOKOSUITECROSS_ANALYTICS_ENGAGEMENT_RATE="Engagement Rate"
|
||||
COM_MOKOSUITECROSS_ANALYTICS_ALL_PLATFORMS="All Platforms"
|
||||
; Category Rules
|
||||
COM_MOKOSUITECROSS_CONFIG_CATEGORY_RULES="Category Rules"
|
||||
COM_MOKOSUITECROSS_CONFIG_CATEGORY_RULES_NOTE="Category Routing"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<extension type="component" method="upgrade">
|
||||
<name>com_mokosuitecross</name>
|
||||
<version>01.08.54</version>
|
||||
<version>01.08.42</version>
|
||||
<creationDate>2026-05-28</creationDate>
|
||||
<author>Moko Consulting</author>
|
||||
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
||||
|
||||
@@ -1,14 +1,5 @@
|
||||
; MokoSuiteCross -- Site Frontend Language File
|
||||
; MokoSuiteCross — Site Frontend Language File
|
||||
; Copyright (C) 2026 Moko Consulting. All rights reserved.
|
||||
; License: GPL-3.0-or-later
|
||||
|
||||
COM_MOKOSUITECROSS="MokoSuiteCross"
|
||||
COM_MOKOSUITECROSS_POSTS_LIST_TITLE="Cross-Posted Content"
|
||||
COM_MOKOSUITECROSS_POST_DETAIL_TITLE="Cross-Post History"
|
||||
COM_MOKOSUITECROSS_COLUMN_ARTICLE="Article"
|
||||
COM_MOKOSUITECROSS_COLUMN_PLATFORMS="Platforms"
|
||||
COM_MOKOSUITECROSS_COLUMN_LAST_POSTED="Last Posted"
|
||||
COM_MOKOSUITECROSS_COLUMN_STATUS="Status"
|
||||
COM_MOKOSUITECROSS_COLUMN_POSTED_DATE="Posted Date"
|
||||
COM_MOKOSUITECROSS_COLUMN_LINK="Platform Link"
|
||||
COM_MOKOSUITECROSS_NO_POSTS="No cross-posted content found."
|
||||
|
||||
@@ -17,5 +17,5 @@ use Joomla\CMS\MVC\Controller\BaseController;
|
||||
|
||||
class DisplayController extends BaseController
|
||||
{
|
||||
protected $default_view = 'posts';
|
||||
protected $default_view = 'post';
|
||||
}
|
||||
|
||||
@@ -1,64 +0,0 @@
|
||||
<?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\Site\Model;
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\MVC\Model\BaseDatabaseModel;
|
||||
|
||||
class PostModel extends BaseDatabaseModel
|
||||
{
|
||||
public function getArticle(int $articleId): ?object
|
||||
{
|
||||
$db = $this->getDatabase();
|
||||
$user = Factory::getApplication()->getIdentity();
|
||||
|
||||
$query = $db->getQuery(true)
|
||||
->select('a.id, a.title, a.alias, a.catid, a.access')
|
||||
->from($db->quoteName('#__content', 'a'))
|
||||
->where('a.id = ' . (int) $articleId)
|
||||
->where('a.state = 1');
|
||||
|
||||
$groups = $user->getAuthorisedViewLevels();
|
||||
$query->where('a.access IN (' . implode(',', array_map('intval', $groups)) . ')');
|
||||
|
||||
$db->setQuery($query);
|
||||
|
||||
return $db->loadObject() ?: null;
|
||||
}
|
||||
|
||||
public function getPosts(int $articleId): array
|
||||
{
|
||||
$db = $this->getDatabase();
|
||||
|
||||
$query = $db->getQuery(true)
|
||||
->select([
|
||||
'p.id',
|
||||
'p.status',
|
||||
'p.platform_post_id',
|
||||
'p.posted_at',
|
||||
'p.error_message',
|
||||
'p.created',
|
||||
's.title AS service_title',
|
||||
's.service_type',
|
||||
])
|
||||
->from($db->quoteName('#__mokosuitecross_posts', 'p'))
|
||||
->join('INNER', $db->quoteName('#__mokosuitecross_services', 's') . ' ON s.id = p.service_id')
|
||||
->where('p.article_id = ' . (int) $articleId)
|
||||
->order('p.created DESC');
|
||||
|
||||
$db->setQuery($query, 0, 50);
|
||||
|
||||
return $db->loadObjectList() ?: [];
|
||||
}
|
||||
}
|
||||
@@ -1,51 +0,0 @@
|
||||
<?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\Site\Model;
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\MVC\Model\ListModel;
|
||||
|
||||
class PostsModel extends ListModel
|
||||
{
|
||||
protected function getListQuery()
|
||||
{
|
||||
$db = $this->getDatabase();
|
||||
$user = Factory::getApplication()->getIdentity();
|
||||
$query = $db->getQuery(true);
|
||||
|
||||
$query->select([
|
||||
'a.id AS article_id',
|
||||
'a.title AS article_title',
|
||||
'a.alias AS article_alias',
|
||||
'a.catid',
|
||||
'MAX(p.posted_at) AS last_posted',
|
||||
'COUNT(p.id) AS post_count',
|
||||
'GROUP_CONCAT(DISTINCT s.service_type ORDER BY s.service_type SEPARATOR \',\') AS service_types',
|
||||
])
|
||||
->from($db->quoteName('#__mokosuitecross_posts', 'p'))
|
||||
->join('INNER', $db->quoteName('#__content', 'a') . ' ON a.id = p.article_id')
|
||||
->join('INNER', $db->quoteName('#__mokosuitecross_services', 's') . ' ON s.id = p.service_id')
|
||||
->where('p.status = ' . $db->quote('posted'))
|
||||
->where('a.state = 1');
|
||||
|
||||
// Access filtering
|
||||
$groups = $user->getAuthorisedViewLevels();
|
||||
$query->where('a.access IN (' . implode(',', array_map('intval', $groups)) . ')');
|
||||
|
||||
$query->group('a.id, a.title, a.alias, a.catid')
|
||||
->order('last_posted DESC');
|
||||
|
||||
return $query;
|
||||
}
|
||||
}
|
||||
@@ -1,33 +0,0 @@
|
||||
<?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\Site\View\Post;
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\MVC\View\HtmlView as BaseHtmlView;
|
||||
|
||||
class HtmlView extends BaseHtmlView
|
||||
{
|
||||
protected $article;
|
||||
protected $posts;
|
||||
|
||||
public function display($tpl = null): void
|
||||
{
|
||||
$articleId = Factory::getApplication()->getInput()->getInt('id', 0);
|
||||
$model = $this->getModel();
|
||||
$this->article = $model->getArticle($articleId);
|
||||
$this->posts = $model->getPosts($articleId);
|
||||
|
||||
parent::display($tpl);
|
||||
}
|
||||
}
|
||||
@@ -1,30 +0,0 @@
|
||||
<?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\Site\View\Posts;
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
use Joomla\CMS\MVC\View\HtmlView as BaseHtmlView;
|
||||
|
||||
class HtmlView extends BaseHtmlView
|
||||
{
|
||||
protected $items;
|
||||
protected $pagination;
|
||||
|
||||
public function display($tpl = null): void
|
||||
{
|
||||
$this->items = $this->get('Items');
|
||||
$this->pagination = $this->get('Pagination');
|
||||
|
||||
parent::display($tpl);
|
||||
}
|
||||
}
|
||||
@@ -1,84 +0,0 @@
|
||||
<?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
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\Router\Route;
|
||||
|
||||
$statusClasses = [
|
||||
'posted' => 'bg-success',
|
||||
'failed' => 'bg-danger',
|
||||
'permanently_failed' => 'bg-danger',
|
||||
'queued' => 'bg-warning text-dark',
|
||||
'posting' => 'bg-info',
|
||||
'scheduled' => 'bg-primary',
|
||||
'deleted' => 'bg-secondary',
|
||||
'cancelled' => 'bg-secondary',
|
||||
];
|
||||
|
||||
?>
|
||||
<div class="com-mokosuitecross-post">
|
||||
<?php if (!$this->article) : ?>
|
||||
<div class="alert alert-warning">
|
||||
<?php echo Text::_('COM_MOKOSUITECROSS_NO_POSTS'); ?>
|
||||
</div>
|
||||
<?php else : ?>
|
||||
<h2><?php echo Text::_('COM_MOKOSUITECROSS_POST_DETAIL_TITLE'); ?></h2>
|
||||
<p>
|
||||
<strong><?php echo $this->escape($this->article->title); ?></strong>
|
||||
</p>
|
||||
|
||||
<?php if (empty($this->posts)) : ?>
|
||||
<div class="alert alert-info">
|
||||
<?php echo Text::_('COM_MOKOSUITECROSS_NO_POSTS'); ?>
|
||||
</div>
|
||||
<?php else : ?>
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><?php echo Text::_('COM_MOKOSUITECROSS_HEADING_SERVICE'); ?></th>
|
||||
<th><?php echo Text::_('COM_MOKOSUITECROSS_COLUMN_STATUS'); ?></th>
|
||||
<th><?php echo Text::_('COM_MOKOSUITECROSS_COLUMN_POSTED_DATE'); ?></th>
|
||||
<th><?php echo Text::_('COM_MOKOSUITECROSS_COLUMN_LINK'); ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach ($this->posts as $post) : ?>
|
||||
<tr>
|
||||
<td>
|
||||
<span class="badge bg-secondary"><?php echo $this->escape($post->service_type); ?></span>
|
||||
<?php echo $this->escape($post->service_title); ?>
|
||||
</td>
|
||||
<td>
|
||||
<span class="badge <?php echo $statusClasses[$post->status] ?? 'bg-secondary'; ?>">
|
||||
<?php echo $this->escape(ucfirst($post->status)); ?>
|
||||
</span>
|
||||
</td>
|
||||
<td><?php echo $post->posted_at ? $this->escape($post->posted_at) : $this->escape($post->created); ?></td>
|
||||
<td>
|
||||
<?php if (!empty($post->platform_post_id)) : ?>
|
||||
<span class="text-muted small"><?php echo $this->escape($post->platform_post_id); ?></span>
|
||||
<?php else : ?>
|
||||
—
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
<?php endif; ?>
|
||||
|
||||
<a href="<?php echo Route::_('index.php?option=com_mokosuitecross&view=posts'); ?>" class="btn btn-secondary">
|
||||
← <?php echo Text::_('COM_MOKOSUITECROSS_POSTS_LIST_TITLE'); ?>
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
@@ -1,66 +0,0 @@
|
||||
<?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
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\Router\Route;
|
||||
|
||||
?>
|
||||
<div class="com-mokosuitecross-posts">
|
||||
<h2><?php echo Text::_('COM_MOKOSUITECROSS_POSTS_LIST_TITLE'); ?></h2>
|
||||
|
||||
<?php if (empty($this->items)) : ?>
|
||||
<div class="alert alert-info">
|
||||
<?php echo Text::_('COM_MOKOSUITECROSS_NO_POSTS'); ?>
|
||||
</div>
|
||||
<?php else : ?>
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><?php echo Text::_('COM_MOKOSUITECROSS_COLUMN_ARTICLE'); ?></th>
|
||||
<th><?php echo Text::_('COM_MOKOSUITECROSS_COLUMN_PLATFORMS'); ?></th>
|
||||
<th><?php echo Text::_('COM_MOKOSUITECROSS_COLUMN_LAST_POSTED'); ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach ($this->items as $item) : ?>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="<?php echo Route::_('index.php?option=com_mokosuitecross&view=post&id=' . (int) $item->article_id); ?>">
|
||||
<?php echo $this->escape($item->article_title); ?>
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
<?php
|
||||
$types = explode(',', $item->service_types ?? '');
|
||||
foreach ($types as $type) :
|
||||
$type = trim($type);
|
||||
if (empty($type)) continue;
|
||||
?>
|
||||
<span class="badge bg-secondary"><?php echo $this->escape($type); ?></span>
|
||||
<?php endforeach; ?>
|
||||
</td>
|
||||
<td>
|
||||
<?php echo $item->last_posted ? $this->escape($item->last_posted) : '—'; ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<?php if ($this->pagination->pagesTotal > 1) : ?>
|
||||
<div class="com-mokosuitecross-posts__pagination">
|
||||
<?php echo $this->pagination->getListFooter(); ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
@@ -96,27 +96,6 @@ INSERT INTO `#__mokosuitecross_templates` (`service_type`, `title`, `template_bo
|
||||
('instagram', 'Instagram Default', '{social}\n\n{hashtags}', 1, 21, NOW()),
|
||||
('youtube', 'YouTube Default', '{social}\n\n{url}', 1, 22, NOW());
|
||||
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `#__mokosuitecross_analytics` (
|
||||
`id` int unsigned NOT NULL AUTO_INCREMENT,
|
||||
`post_id` int unsigned NOT NULL,
|
||||
`service_id` int unsigned NOT NULL,
|
||||
`service_type` varchar(50) NOT NULL DEFAULT '',
|
||||
`posted_at` datetime DEFAULT NULL,
|
||||
`day_of_week` tinyint unsigned NOT NULL DEFAULT 0,
|
||||
`hour_of_day` tinyint unsigned NOT NULL DEFAULT 0,
|
||||
`impressions` int unsigned NOT NULL DEFAULT 0,
|
||||
`engagements` int unsigned NOT NULL DEFAULT 0,
|
||||
`clicks` int unsigned NOT NULL DEFAULT 0,
|
||||
`shares` int unsigned NOT NULL DEFAULT 0,
|
||||
`engagement_rate` decimal(5,2) NOT NULL DEFAULT 0.00,
|
||||
`created` datetime NOT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `idx_service_type` (`service_type`),
|
||||
KEY `idx_day_hour` (`day_of_week`, `hour_of_day`),
|
||||
KEY `idx_post` (`post_id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `#__mokosuitecross_category_rules` (
|
||||
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
||||
`category_id` int(10) unsigned NOT NULL,
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
/* 01.08.42 — no schema changes */
|
||||
@@ -1 +0,0 @@
|
||||
/* 01.08.43 — no schema changes */
|
||||
@@ -1 +0,0 @@
|
||||
/* 01.08.44 — no schema changes */
|
||||
@@ -1 +0,0 @@
|
||||
/* 01.08.45 — no schema changes */
|
||||
@@ -1 +0,0 @@
|
||||
/* 01.08.46 — no schema changes */
|
||||
@@ -1 +0,0 @@
|
||||
/* 01.08.47 — no schema changes */
|
||||
@@ -1 +0,0 @@
|
||||
/* 01.08.49 — no schema changes */
|
||||
@@ -1 +0,0 @@
|
||||
/* 01.08.50 — no schema changes */
|
||||
@@ -1 +0,0 @@
|
||||
/* 01.08.51 — no schema changes */
|
||||
@@ -1 +0,0 @@
|
||||
/* 01.08.52 — no schema changes */
|
||||
@@ -1 +0,0 @@
|
||||
/* 01.08.53 — no schema changes */
|
||||
@@ -1,23 +0,0 @@
|
||||
-- MokoSuiteCross 01.08.54 -- Best time to post analytics
|
||||
-- Copyright (C) 2026 Moko Consulting. All rights reserved.
|
||||
-- SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `#__mokosuitecross_analytics` (
|
||||
`id` int unsigned NOT NULL AUTO_INCREMENT,
|
||||
`post_id` int unsigned NOT NULL,
|
||||
`service_id` int unsigned NOT NULL,
|
||||
`service_type` varchar(50) NOT NULL DEFAULT '',
|
||||
`posted_at` datetime DEFAULT NULL,
|
||||
`day_of_week` tinyint unsigned NOT NULL DEFAULT 0,
|
||||
`hour_of_day` tinyint unsigned NOT NULL DEFAULT 0,
|
||||
`impressions` int unsigned NOT NULL DEFAULT 0,
|
||||
`engagements` int unsigned NOT NULL DEFAULT 0,
|
||||
`clicks` int unsigned NOT NULL DEFAULT 0,
|
||||
`shares` int unsigned NOT NULL DEFAULT 0,
|
||||
`engagement_rate` decimal(5,2) NOT NULL DEFAULT 0.00,
|
||||
`created` datetime NOT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `idx_service_type` (`service_type`),
|
||||
KEY `idx_day_hour` (`day_of_week`, `hour_of_day`),
|
||||
KEY `idx_post` (`post_id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||
@@ -1,100 +0,0 @@
|
||||
<?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\Component\MokoSuiteCross\Administrator\Helper\AiGeneratorHelper;
|
||||
|
||||
class AiController extends BaseController
|
||||
{
|
||||
public function generate(): void
|
||||
{
|
||||
if (!Session::checkToken('get')) {
|
||||
echo json_encode(['success' => false, 'error' => 'Invalid token']);
|
||||
$this->app->close();
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
$user = $this->app->getIdentity();
|
||||
|
||||
if (!$user->authorise('core.edit', 'com_mokosuitecross')) {
|
||||
echo json_encode(['success' => false, 'error' => 'Permission denied']);
|
||||
$this->app->close();
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
$articleId = $this->input->getInt('article_id', 0);
|
||||
|
||||
if ($articleId < 1) {
|
||||
echo json_encode(['success' => false, 'error' => 'Missing article ID']);
|
||||
$this->app->close();
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
$db = Factory::getDbo();
|
||||
$query = $db->getQuery(true)
|
||||
->select($db->quoteName(['id', 'title', 'introtext', 'catid']))
|
||||
->from($db->quoteName('#__content'))
|
||||
->where($db->quoteName('id') . ' = ' . $articleId);
|
||||
$db->setQuery($query);
|
||||
$article = $db->loadObject();
|
||||
|
||||
if (!$article) {
|
||||
echo json_encode(['success' => false, 'error' => 'Article not found']);
|
||||
$this->app->close();
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
$category = '';
|
||||
$catQuery = $db->getQuery(true)
|
||||
->select($db->quoteName('title'))
|
||||
->from($db->quoteName('#__categories'))
|
||||
->where($db->quoteName('id') . ' = ' . (int) $article->catid);
|
||||
$db->setQuery($catQuery);
|
||||
$category = $db->loadResult() ?: '';
|
||||
|
||||
$tagQuery = $db->getQuery(true)
|
||||
->select($db->quoteName('t.title'))
|
||||
->from($db->quoteName('#__tags', 't'))
|
||||
->join('INNER', $db->quoteName('#__contentitem_tag_map', 'm') . ' ON ' . $db->quoteName('m.tag_id') . ' = ' . $db->quoteName('t.id'))
|
||||
->where($db->quoteName('m.content_item_id') . ' = ' . $articleId)
|
||||
->where($db->quoteName('m.type_alias') . ' = ' . $db->quote('com_content.article'));
|
||||
$db->setQuery($tagQuery);
|
||||
$tags = $db->loadColumn() ?: [];
|
||||
|
||||
$introtext = strip_tags($article->introtext ?? '');
|
||||
$introtext = mb_substr($introtext, 0, 500);
|
||||
|
||||
$params = \Joomla\CMS\Component\ComponentHelper::getParams('com_mokosuitecross');
|
||||
|
||||
$config = [
|
||||
'ai_provider' => $params->get('ai_provider', 'none'),
|
||||
'ai_api_key' => $params->get('ai_api_key', ''),
|
||||
'ai_model' => $params->get('ai_model', ''),
|
||||
'ai_tone' => $params->get('ai_tone', 'professional'),
|
||||
];
|
||||
|
||||
$result = AiGeneratorHelper::generate($article->title, $introtext, $category, $tags, $config);
|
||||
|
||||
$this->app->setHeader('Content-Type', 'application/json; charset=utf-8');
|
||||
echo json_encode($result);
|
||||
$this->app->close();
|
||||
}
|
||||
}
|
||||
@@ -1,97 +0,0 @@
|
||||
<?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\MVC\Controller\BaseController;
|
||||
use Joomla\CMS\Session\Session;
|
||||
use Joomla\Component\MokoSuiteCross\Administrator\Helper\AnalyticsHelper;
|
||||
|
||||
class AnalyticsController extends BaseController
|
||||
{
|
||||
/**
|
||||
* Return heatmap grid data as JSON.
|
||||
*
|
||||
* Query params: service_type (string), days (int, default 90)
|
||||
*/
|
||||
public function heatmap(): void
|
||||
{
|
||||
if (!Session::checkToken('get')) {
|
||||
echo json_encode(['success' => false, 'error' => 'Invalid token']);
|
||||
$this->app->close();
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
$user = $this->app->getIdentity();
|
||||
|
||||
if (!$user->authorise('core.manage', 'com_mokosuitecross')) {
|
||||
echo json_encode(['success' => false, 'error' => 'Permission denied']);
|
||||
$this->app->close();
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
$serviceType = $this->input->getCmd('service_type', '');
|
||||
$days = $this->input->getInt('days', 90);
|
||||
|
||||
$grid = AnalyticsHelper::getHeatmapData($serviceType, $days);
|
||||
$bestTimes = AnalyticsHelper::getBestTimes($serviceType, 3);
|
||||
|
||||
$this->app->setHeader('Content-Type', 'application/json; charset=utf-8');
|
||||
echo json_encode([
|
||||
'success' => true,
|
||||
'grid' => $grid,
|
||||
'best_times' => $bestTimes,
|
||||
]);
|
||||
$this->app->close();
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the top posting times as JSON.
|
||||
*
|
||||
* Query params: service_type (string), limit (int, default 5)
|
||||
*/
|
||||
public function besttimes(): void
|
||||
{
|
||||
if (!Session::checkToken('get')) {
|
||||
echo json_encode(['success' => false, 'error' => 'Invalid token']);
|
||||
$this->app->close();
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
$user = $this->app->getIdentity();
|
||||
|
||||
if (!$user->authorise('core.manage', 'com_mokosuitecross')) {
|
||||
echo json_encode(['success' => false, 'error' => 'Permission denied']);
|
||||
$this->app->close();
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
$serviceType = $this->input->getCmd('service_type', '');
|
||||
$limit = $this->input->getInt('limit', 5);
|
||||
|
||||
$bestTimes = AnalyticsHelper::getBestTimes($serviceType, $limit);
|
||||
$serviceBreakdown = AnalyticsHelper::getServiceBreakdown();
|
||||
|
||||
$this->app->setHeader('Content-Type', 'application/json; charset=utf-8');
|
||||
echo json_encode([
|
||||
'success' => true,
|
||||
'best_times' => $bestTimes,
|
||||
'service_breakdown' => $serviceBreakdown,
|
||||
]);
|
||||
$this->app->close();
|
||||
}
|
||||
}
|
||||
@@ -1,98 +0,0 @@
|
||||
<?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\Component\ComponentHelper;
|
||||
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\SocialImageHelper;
|
||||
|
||||
class SocialImageController extends BaseController
|
||||
{
|
||||
public function generate(): void
|
||||
{
|
||||
if (!Session::checkToken('get')) {
|
||||
echo json_encode(['success' => false, 'error' => 'Invalid token']);
|
||||
$this->app->close();
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
$user = $this->app->getIdentity();
|
||||
|
||||
if (!$user->authorise('core.manage', 'com_mokosuitecross')) {
|
||||
echo json_encode(['success' => false, 'error' => 'Permission denied']);
|
||||
$this->app->close();
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
$articleId = $this->input->getInt('article_id', 0);
|
||||
|
||||
if ($articleId < 1) {
|
||||
echo json_encode(['success' => false, 'error' => 'Missing article ID']);
|
||||
$this->app->close();
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
$db = Factory::getDbo();
|
||||
$query = $db->getQuery(true)
|
||||
->select($db->quoteName(['id', 'title', 'images']))
|
||||
->from($db->quoteName('#__content'))
|
||||
->where($db->quoteName('id') . ' = ' . $articleId);
|
||||
$db->setQuery($query);
|
||||
$article = $db->loadObject();
|
||||
|
||||
if (!$article) {
|
||||
echo json_encode(['success' => false, 'error' => 'Article not found']);
|
||||
$this->app->close();
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
$params = ComponentHelper::getParams('com_mokosuitecross');
|
||||
$siteName = $params->get('social_image_site_name', '') ?: Factory::getApplication()->get('sitename', '');
|
||||
|
||||
$options = [
|
||||
'bg_color' => $params->get('social_image_bg_color', '#1a1a2e'),
|
||||
'text_color' => $params->get('social_image_text_color', '#ffffff'),
|
||||
'overlay' => $params->get('social_image_overlay', 'dark'),
|
||||
];
|
||||
|
||||
$backgroundPath = null;
|
||||
$images = json_decode($article->images ?? '{}', true);
|
||||
|
||||
if (!empty($images['image_intro'])) {
|
||||
$backgroundPath = JPATH_ROOT . '/' . ltrim($images['image_intro'], '/');
|
||||
} elseif (!empty($images['image_fulltext'])) {
|
||||
$backgroundPath = JPATH_ROOT . '/' . ltrim($images['image_fulltext'], '/');
|
||||
}
|
||||
|
||||
try {
|
||||
$imagePath = SocialImageHelper::generate($article->title, $siteName, $backgroundPath, $options);
|
||||
$imageUrl = str_replace(JPATH_ROOT, Uri::root(true), str_replace('\\', '/', $imagePath));
|
||||
|
||||
$result = ['success' => true, 'image_url' => $imageUrl, 'image_path' => $imagePath];
|
||||
} catch (\Throwable $e) {
|
||||
$result = ['success' => false, 'error' => $e->getMessage()];
|
||||
}
|
||||
|
||||
$this->app->setHeader('Content-Type', 'application/json; charset=utf-8');
|
||||
echo json_encode($result);
|
||||
$this->app->close();
|
||||
}
|
||||
}
|
||||
@@ -1,196 +0,0 @@
|
||||
<?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 AiGeneratorHelper
|
||||
{
|
||||
public static function generate(string $title, string $introtext, string $category, array $tags, array $config): array
|
||||
{
|
||||
$provider = $config['ai_provider'] ?? 'none';
|
||||
$apiKey = $config['ai_api_key'] ?? '';
|
||||
$model = $config['ai_model'] ?? '';
|
||||
$tone = $config['ai_tone'] ?? 'professional';
|
||||
|
||||
if ($provider === 'none' || $apiKey === '') {
|
||||
return ['success' => false, 'error' => 'AI provider not configured or API key missing.'];
|
||||
}
|
||||
|
||||
$prompt = self::buildPrompt($title, $introtext, $category, $tags, $tone);
|
||||
|
||||
$response = match ($provider) {
|
||||
'claude' => self::callClaude($prompt, $apiKey, $model ?: 'claude-haiku-4-5'),
|
||||
'openai' => self::callOpenAI($prompt, $apiKey, $model ?: 'gpt-4o-mini'),
|
||||
default => '',
|
||||
};
|
||||
|
||||
if ($response === '') {
|
||||
return ['success' => false, 'error' => 'AI provider returned an empty response.'];
|
||||
}
|
||||
|
||||
$parsed = self::parseResponse($response);
|
||||
|
||||
if ($parsed === null) {
|
||||
return ['success' => false, 'error' => 'Could not parse AI response as JSON.'];
|
||||
}
|
||||
|
||||
return ['success' => true, 'data' => $parsed];
|
||||
}
|
||||
|
||||
private static function callClaude(string $prompt, string $apiKey, string $model): string
|
||||
{
|
||||
$payload = json_encode([
|
||||
'model' => $model,
|
||||
'max_tokens' => 500,
|
||||
'messages' => [
|
||||
['role' => 'user', 'content' => $prompt],
|
||||
],
|
||||
]);
|
||||
|
||||
$ch = curl_init('https://api.anthropic.com/v1/messages');
|
||||
curl_setopt_array($ch, [
|
||||
CURLOPT_POST => true,
|
||||
CURLOPT_POSTFIELDS => $payload,
|
||||
CURLOPT_RETURNTRANSFER => true,
|
||||
CURLOPT_TIMEOUT => 30,
|
||||
CURLOPT_HTTPHEADER => [
|
||||
'Content-Type: application/json',
|
||||
'x-api-key: ' . $apiKey,
|
||||
'anthropic-version: 2023-06-01',
|
||||
],
|
||||
]);
|
||||
|
||||
$response = curl_exec($ch);
|
||||
|
||||
if ($response === false) {
|
||||
curl_close($ch);
|
||||
return '';
|
||||
}
|
||||
|
||||
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
|
||||
curl_close($ch);
|
||||
|
||||
if ($httpCode < 200 || $httpCode >= 300) {
|
||||
return '';
|
||||
}
|
||||
|
||||
$data = json_decode($response, true);
|
||||
|
||||
return $data['content'][0]['text'] ?? '';
|
||||
}
|
||||
|
||||
private static function callOpenAI(string $prompt, string $apiKey, string $model): string
|
||||
{
|
||||
$payload = json_encode([
|
||||
'model' => $model,
|
||||
'max_tokens' => 500,
|
||||
'messages' => [
|
||||
['role' => 'user', 'content' => $prompt],
|
||||
],
|
||||
]);
|
||||
|
||||
$ch = curl_init('https://api.openai.com/v1/chat/completions');
|
||||
curl_setopt_array($ch, [
|
||||
CURLOPT_POST => true,
|
||||
CURLOPT_POSTFIELDS => $payload,
|
||||
CURLOPT_RETURNTRANSFER => true,
|
||||
CURLOPT_TIMEOUT => 30,
|
||||
CURLOPT_HTTPHEADER => [
|
||||
'Content-Type: application/json',
|
||||
'Authorization: Bearer ' . $apiKey,
|
||||
],
|
||||
]);
|
||||
|
||||
$response = curl_exec($ch);
|
||||
|
||||
if ($response === false) {
|
||||
curl_close($ch);
|
||||
return '';
|
||||
}
|
||||
|
||||
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
|
||||
curl_close($ch);
|
||||
|
||||
if ($httpCode < 200 || $httpCode >= 300) {
|
||||
return '';
|
||||
}
|
||||
|
||||
$data = json_decode($response, true);
|
||||
|
||||
return $data['choices'][0]['message']['content'] ?? '';
|
||||
}
|
||||
|
||||
private static function buildPrompt(string $title, string $introtext, string $category, array $tags, string $tone): string
|
||||
{
|
||||
$tagList = !empty($tags) ? implode(', ', $tags) : 'none';
|
||||
|
||||
$toneGuide = match ($tone) {
|
||||
'casual' => 'Use a relaxed, conversational tone.',
|
||||
'friendly' => 'Use a warm, approachable tone with enthusiasm.',
|
||||
default => 'Use a professional, polished tone.',
|
||||
};
|
||||
|
||||
return <<<PROMPT
|
||||
Generate cross-post captions for this article. {$toneGuide}
|
||||
|
||||
Article title: {$title}
|
||||
Content summary: {$introtext}
|
||||
Category: {$category}
|
||||
Tags: {$tagList}
|
||||
|
||||
Return ONLY a JSON object with these keys (no markdown, no explanation):
|
||||
{
|
||||
"social": "Facebook/LinkedIn post (max 200 chars, include a call to action)",
|
||||
"short": "Twitter/Bluesky post (max 270 chars, punchy, include 1-2 relevant hashtags)",
|
||||
"chat": "Telegram/Discord message (max 300 chars, conversational)",
|
||||
"email_subject": "Email subject line (max 60 chars, compelling, no clickbait)"
|
||||
}
|
||||
|
||||
Rules:
|
||||
- Do not include the article URL (it is added automatically)
|
||||
- Do not wrap the JSON in markdown code fences
|
||||
- Respect the character limits strictly
|
||||
- Each caption should be unique, not just a reformatted version of the others
|
||||
PROMPT;
|
||||
}
|
||||
|
||||
private static function parseResponse(string $response): ?array
|
||||
{
|
||||
$response = trim($response);
|
||||
|
||||
if (preg_match('/\{[\s\S]*\}/', $response, $matches)) {
|
||||
$response = $matches[0];
|
||||
}
|
||||
|
||||
$data = json_decode($response, true);
|
||||
|
||||
if (!\is_array($data)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
$required = ['social', 'short', 'chat', 'email_subject'];
|
||||
|
||||
foreach ($required as $key) {
|
||||
if (!isset($data[$key]) || !\is_string($data[$key])) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
return [
|
||||
'social' => mb_substr($data['social'], 0, 500),
|
||||
'short' => mb_substr($data['short'], 0, 280),
|
||||
'chat' => mb_substr($data['chat'], 0, 500),
|
||||
'email_subject' => mb_substr($data['email_subject'], 0, 120),
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -1,252 +0,0 @@
|
||||
<?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;
|
||||
|
||||
use Joomla\CMS\Factory;
|
||||
|
||||
class AnalyticsHelper
|
||||
{
|
||||
/**
|
||||
* Record or update engagement metrics for a post.
|
||||
*
|
||||
* @param int $postId The post ID
|
||||
* @param int $serviceId The service ID
|
||||
* @param string $serviceType The service type (e.g. twitter, facebook)
|
||||
* @param array $metrics Engagement metrics: impressions, engagements, clicks, shares, posted_at
|
||||
*
|
||||
* @return bool True on success
|
||||
*/
|
||||
public static function recordEngagement(int $postId, int $serviceId, string $serviceType, array $metrics): bool
|
||||
{
|
||||
$db = Factory::getDbo();
|
||||
|
||||
$postedAt = $metrics['posted_at'] ?? null;
|
||||
|
||||
if ($postedAt) {
|
||||
$timestamp = strtotime($postedAt);
|
||||
$dayOfWeek = (int) date('w', $timestamp);
|
||||
$hourOfDay = (int) date('G', $timestamp);
|
||||
} else {
|
||||
$dayOfWeek = 0;
|
||||
$hourOfDay = 0;
|
||||
}
|
||||
|
||||
$impressions = (int) ($metrics['impressions'] ?? 0);
|
||||
$engagements = (int) ($metrics['engagements'] ?? 0);
|
||||
$clicks = (int) ($metrics['clicks'] ?? 0);
|
||||
$shares = (int) ($metrics['shares'] ?? 0);
|
||||
|
||||
$engagementRate = $impressions > 0
|
||||
? round(($engagements / $impressions) * 100, 2)
|
||||
: 0.00;
|
||||
|
||||
// Check if a row already exists for this post
|
||||
$query = $db->getQuery(true)
|
||||
->select($db->quoteName('id'))
|
||||
->from($db->quoteName('#__mokosuitecross_analytics'))
|
||||
->where($db->quoteName('post_id') . ' = ' . $postId)
|
||||
->where($db->quoteName('service_id') . ' = ' . $serviceId);
|
||||
$db->setQuery($query);
|
||||
$existingId = $db->loadResult();
|
||||
|
||||
if ($existingId) {
|
||||
$query = $db->getQuery(true)
|
||||
->update($db->quoteName('#__mokosuitecross_analytics'))
|
||||
->set($db->quoteName('impressions') . ' = ' . $impressions)
|
||||
->set($db->quoteName('engagements') . ' = ' . $engagements)
|
||||
->set($db->quoteName('clicks') . ' = ' . $clicks)
|
||||
->set($db->quoteName('shares') . ' = ' . $shares)
|
||||
->set($db->quoteName('engagement_rate') . ' = ' . $engagementRate)
|
||||
->where($db->quoteName('id') . ' = ' . (int) $existingId);
|
||||
$db->setQuery($query);
|
||||
$db->execute();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
$record = (object) [
|
||||
'post_id' => $postId,
|
||||
'service_id' => $serviceId,
|
||||
'service_type' => $serviceType,
|
||||
'posted_at' => $postedAt,
|
||||
'day_of_week' => $dayOfWeek,
|
||||
'hour_of_day' => $hourOfDay,
|
||||
'impressions' => $impressions,
|
||||
'engagements' => $engagements,
|
||||
'clicks' => $clicks,
|
||||
'shares' => $shares,
|
||||
'engagement_rate' => $engagementRate,
|
||||
'created' => Factory::getDate()->toSql(),
|
||||
];
|
||||
|
||||
$db->insertObject('#__mokosuitecross_analytics', $record);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get heatmap data as a 7x24 grid of average engagement rates.
|
||||
*
|
||||
* @param string $serviceType Optional service type filter
|
||||
* @param int $days Number of days to look back (0 = all time)
|
||||
*
|
||||
* @return array 7x24 grid: [ day_of_week => [ hour_of_day => avg_engagement_rate ] ]
|
||||
*/
|
||||
public static function getHeatmapData(string $serviceType = '', int $days = 90): array
|
||||
{
|
||||
$db = Factory::getDbo();
|
||||
|
||||
$query = $db->getQuery(true)
|
||||
->select([
|
||||
$db->quoteName('day_of_week'),
|
||||
$db->quoteName('hour_of_day'),
|
||||
'AVG(' . $db->quoteName('engagement_rate') . ') AS avg_rate',
|
||||
'COUNT(*) AS post_count',
|
||||
])
|
||||
->from($db->quoteName('#__mokosuitecross_analytics'))
|
||||
->group($db->quoteName('day_of_week'))
|
||||
->group($db->quoteName('hour_of_day'))
|
||||
->order($db->quoteName('day_of_week') . ' ASC')
|
||||
->order($db->quoteName('hour_of_day') . ' ASC');
|
||||
|
||||
if ($serviceType !== '') {
|
||||
$query->where($db->quoteName('service_type') . ' = ' . $db->quote($serviceType));
|
||||
}
|
||||
|
||||
if ($days > 0) {
|
||||
$cutoff = Factory::getDate('-' . $days . ' days')->toSql();
|
||||
$query->where($db->quoteName('posted_at') . ' >= ' . $db->quote($cutoff));
|
||||
}
|
||||
|
||||
$db->setQuery($query);
|
||||
$rows = $db->loadObjectList();
|
||||
|
||||
// Build 7x24 grid initialised to zero
|
||||
$grid = [];
|
||||
|
||||
for ($d = 0; $d < 7; $d++) {
|
||||
for ($h = 0; $h < 24; $h++) {
|
||||
$grid[$d][$h] = ['avg_rate' => 0.00, 'post_count' => 0];
|
||||
}
|
||||
}
|
||||
|
||||
foreach ($rows as $row) {
|
||||
$grid[(int) $row->day_of_week][(int) $row->hour_of_day] = [
|
||||
'avg_rate' => round((float) $row->avg_rate, 2),
|
||||
'post_count' => (int) $row->post_count,
|
||||
];
|
||||
}
|
||||
|
||||
return $grid;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the best times to post ranked by average engagement rate.
|
||||
*
|
||||
* @param string $serviceType Optional service type filter
|
||||
* @param int $limit Number of results to return
|
||||
*
|
||||
* @return array List of [day_of_week, hour_of_day, avg_rate, post_count]
|
||||
*/
|
||||
public static function getBestTimes(string $serviceType = '', int $limit = 5): array
|
||||
{
|
||||
$db = Factory::getDbo();
|
||||
|
||||
$query = $db->getQuery(true)
|
||||
->select([
|
||||
$db->quoteName('day_of_week'),
|
||||
$db->quoteName('hour_of_day'),
|
||||
'AVG(' . $db->quoteName('engagement_rate') . ') AS avg_rate',
|
||||
'COUNT(*) AS post_count',
|
||||
])
|
||||
->from($db->quoteName('#__mokosuitecross_analytics'))
|
||||
->group($db->quoteName('day_of_week'))
|
||||
->group($db->quoteName('hour_of_day'))
|
||||
->having('COUNT(*) >= 1')
|
||||
->order('avg_rate DESC');
|
||||
|
||||
if ($serviceType !== '') {
|
||||
$query->where($db->quoteName('service_type') . ' = ' . $db->quote($serviceType));
|
||||
}
|
||||
|
||||
$db->setQuery($query, 0, $limit);
|
||||
$rows = $db->loadAssocList();
|
||||
|
||||
$dayNames = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'];
|
||||
|
||||
$results = [];
|
||||
|
||||
foreach ($rows as $row) {
|
||||
$hour = (int) $row['hour_of_day'];
|
||||
$ampm = $hour < 12 ? 'AM' : 'PM';
|
||||
$hour12 = $hour % 12 ?: 12;
|
||||
|
||||
$results[] = [
|
||||
'day_of_week' => (int) $row['day_of_week'],
|
||||
'day_name' => $dayNames[(int) $row['day_of_week']],
|
||||
'hour_of_day' => $hour,
|
||||
'hour_label' => $hour12 . ':00 ' . $ampm,
|
||||
'avg_rate' => round((float) $row['avg_rate'], 2),
|
||||
'post_count' => (int) $row['post_count'],
|
||||
];
|
||||
}
|
||||
|
||||
return $results;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get engagement stats grouped by service type.
|
||||
*
|
||||
* @param int $days Number of days to look back (0 = all time)
|
||||
*
|
||||
* @return array List of [service_type, total_posts, avg_engagement_rate, total_impressions, total_engagements]
|
||||
*/
|
||||
public static function getServiceBreakdown(int $days = 30): array
|
||||
{
|
||||
$db = Factory::getDbo();
|
||||
|
||||
$query = $db->getQuery(true)
|
||||
->select([
|
||||
$db->quoteName('service_type'),
|
||||
'COUNT(*) AS total_posts',
|
||||
'AVG(' . $db->quoteName('engagement_rate') . ') AS avg_engagement_rate',
|
||||
'SUM(' . $db->quoteName('impressions') . ') AS total_impressions',
|
||||
'SUM(' . $db->quoteName('engagements') . ') AS total_engagements',
|
||||
'SUM(' . $db->quoteName('clicks') . ') AS total_clicks',
|
||||
'SUM(' . $db->quoteName('shares') . ') AS total_shares',
|
||||
])
|
||||
->from($db->quoteName('#__mokosuitecross_analytics'))
|
||||
->group($db->quoteName('service_type'))
|
||||
->order('avg_engagement_rate DESC');
|
||||
|
||||
if ($days > 0) {
|
||||
$cutoff = Factory::getDate('-' . $days . ' days')->toSql();
|
||||
$query->where($db->quoteName('posted_at') . ' >= ' . $db->quote($cutoff));
|
||||
}
|
||||
|
||||
$db->setQuery($query);
|
||||
$rows = $db->loadAssocList();
|
||||
|
||||
foreach ($rows as &$row) {
|
||||
$row['avg_engagement_rate'] = round((float) $row['avg_engagement_rate'], 2);
|
||||
$row['total_posts'] = (int) $row['total_posts'];
|
||||
$row['total_impressions'] = (int) $row['total_impressions'];
|
||||
$row['total_engagements'] = (int) $row['total_engagements'];
|
||||
$row['total_clicks'] = (int) $row['total_clicks'];
|
||||
$row['total_shares'] = (int) $row['total_shares'];
|
||||
}
|
||||
|
||||
return $rows;
|
||||
}
|
||||
}
|
||||
@@ -477,16 +477,12 @@ class CrossPostDispatcher
|
||||
$url = $url . $separator . http_build_query($utmParams);
|
||||
}
|
||||
|
||||
// Link shortening (#159) — shorten the final URL (with UTM if enabled)
|
||||
$urlShort = LinkShortenerHelper::shorten($url);
|
||||
|
||||
return [
|
||||
'{title}' => $titleText,
|
||||
'{introtext}' => $introStripped,
|
||||
'{fulltext}' => strip_tags(mb_substr($article->fulltext ?? '', 0, 500)),
|
||||
'{url}' => $url,
|
||||
'{url_raw}' => $urlRaw,
|
||||
'{url_short}' => $urlShort,
|
||||
'{image}' => $introImage,
|
||||
'{category}' => $categoryName,
|
||||
'{author}' => $authorName,
|
||||
|
||||
@@ -1,172 +0,0 @@
|
||||
<?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;
|
||||
|
||||
use Joomla\CMS\Component\ComponentHelper;
|
||||
|
||||
/**
|
||||
* Shortens URLs via Bitly, Rebrandly, or YOURLS.
|
||||
*
|
||||
* Returns the original URL on any failure so cross-posts are never broken.
|
||||
*/
|
||||
class LinkShortenerHelper
|
||||
{
|
||||
/**
|
||||
* Shorten a URL using the configured provider.
|
||||
*
|
||||
* @param string $url The URL to shorten
|
||||
*
|
||||
* @return string Shortened URL, or the original on failure/disabled
|
||||
*/
|
||||
public static function shorten(string $url): string
|
||||
{
|
||||
$params = ComponentHelper::getParams('com_mokosuitecross');
|
||||
$provider = $params->get('link_shortener', 'none');
|
||||
|
||||
if ($provider === 'none' || empty($url)) {
|
||||
return $url;
|
||||
}
|
||||
|
||||
$apiKey = $params->get('link_shortener_api_key', '');
|
||||
|
||||
switch ($provider) {
|
||||
case 'bitly':
|
||||
return self::shortenWithBitly($url, $apiKey);
|
||||
|
||||
case 'rebrandly':
|
||||
return self::shortenWithRebrandly($url, $apiKey);
|
||||
|
||||
case 'yourls':
|
||||
$apiUrl = $params->get('link_shortener_yourls_url', '');
|
||||
$token = $params->get('link_shortener_yourls_token', '');
|
||||
return self::shortenWithYourls($url, $apiUrl, $token);
|
||||
|
||||
default:
|
||||
return $url;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Shorten via Bitly API v4.
|
||||
*/
|
||||
public static function shortenWithBitly(string $url, string $apiKey): string
|
||||
{
|
||||
if (empty($apiKey)) {
|
||||
return $url;
|
||||
}
|
||||
|
||||
$ch = curl_init();
|
||||
curl_setopt_array($ch, [
|
||||
CURLOPT_URL => 'https://api-ssl.bitly.com/v4/shorten',
|
||||
CURLOPT_POST => true,
|
||||
CURLOPT_POSTFIELDS => json_encode(['long_url' => $url]),
|
||||
CURLOPT_HTTPHEADER => [
|
||||
'Authorization: Bearer ' . $apiKey,
|
||||
'Content-Type: application/json',
|
||||
],
|
||||
CURLOPT_RETURNTRANSFER => true,
|
||||
CURLOPT_TIMEOUT => 10,
|
||||
]);
|
||||
|
||||
$response = curl_exec($ch);
|
||||
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
|
||||
curl_close($ch);
|
||||
|
||||
if ($response === false || $httpCode < 200 || $httpCode >= 300) {
|
||||
return $url;
|
||||
}
|
||||
|
||||
$data = json_decode($response, true);
|
||||
|
||||
return $data['link'] ?? $url;
|
||||
}
|
||||
|
||||
/**
|
||||
* Shorten via Rebrandly API.
|
||||
*/
|
||||
public static function shortenWithRebrandly(string $url, string $apiKey, string $workspace = ''): string
|
||||
{
|
||||
if (empty($apiKey)) {
|
||||
return $url;
|
||||
}
|
||||
|
||||
$headers = [
|
||||
'apikey: ' . $apiKey,
|
||||
'Content-Type: application/json',
|
||||
];
|
||||
|
||||
if (!empty($workspace)) {
|
||||
$headers[] = 'workspace: ' . $workspace;
|
||||
}
|
||||
|
||||
$ch = curl_init();
|
||||
curl_setopt_array($ch, [
|
||||
CURLOPT_URL => 'https://api.rebrandly.com/v1/links',
|
||||
CURLOPT_POST => true,
|
||||
CURLOPT_POSTFIELDS => json_encode(['destination' => $url]),
|
||||
CURLOPT_HTTPHEADER => $headers,
|
||||
CURLOPT_RETURNTRANSFER => true,
|
||||
CURLOPT_TIMEOUT => 10,
|
||||
]);
|
||||
|
||||
$response = curl_exec($ch);
|
||||
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
|
||||
curl_close($ch);
|
||||
|
||||
if ($response === false || $httpCode < 200 || $httpCode >= 300) {
|
||||
return $url;
|
||||
}
|
||||
|
||||
$data = json_decode($response, true);
|
||||
$short = $data['shortUrl'] ?? '';
|
||||
|
||||
return !empty($short) ? 'https://' . ltrim($short, 'https://') : $url;
|
||||
}
|
||||
|
||||
/**
|
||||
* Shorten via YOURLS API (self-hosted).
|
||||
*/
|
||||
public static function shortenWithYourls(string $url, string $apiUrl, string $signatureToken): string
|
||||
{
|
||||
if (empty($apiUrl) || empty($signatureToken)) {
|
||||
return $url;
|
||||
}
|
||||
|
||||
$endpoint = rtrim($apiUrl, '/') . '?' . http_build_query([
|
||||
'action' => 'shorturl',
|
||||
'format' => 'json',
|
||||
'signature' => $signatureToken,
|
||||
'url' => $url,
|
||||
]);
|
||||
|
||||
$ch = curl_init();
|
||||
curl_setopt_array($ch, [
|
||||
CURLOPT_URL => $endpoint,
|
||||
CURLOPT_RETURNTRANSFER => true,
|
||||
CURLOPT_TIMEOUT => 10,
|
||||
]);
|
||||
|
||||
$response = curl_exec($ch);
|
||||
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
|
||||
curl_close($ch);
|
||||
|
||||
if ($response === false || $httpCode < 200 || $httpCode >= 300) {
|
||||
return $url;
|
||||
}
|
||||
|
||||
$data = json_decode($response, true);
|
||||
|
||||
return $data['shorturl'] ?? $url;
|
||||
}
|
||||
}
|
||||
@@ -1,230 +0,0 @@
|
||||
<?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;
|
||||
|
||||
use Joomla\CMS\Factory;
|
||||
|
||||
class SocialImageHelper
|
||||
{
|
||||
private const WIDTH = 1200;
|
||||
private const HEIGHT = 630;
|
||||
private const PADDING = 60;
|
||||
private const MAX_TITLE_CHARS_PER_LINE = 30;
|
||||
|
||||
public static function generate(string $title, string $siteName, ?string $backgroundPath = null, array $options = []): string
|
||||
{
|
||||
if (!\function_exists('imagecreatetruecolor')) {
|
||||
throw new \RuntimeException('PHP GD extension is required for social image generation.');
|
||||
}
|
||||
|
||||
$bgColor = $options['bg_color'] ?? '#1a1a2e';
|
||||
$textColor = $options['text_color'] ?? '#ffffff';
|
||||
$overlayType = $options['overlay'] ?? 'dark';
|
||||
$fontSize = (int) ($options['font_size'] ?? 36);
|
||||
|
||||
$image = imagecreatetruecolor(self::WIDTH, self::HEIGHT);
|
||||
|
||||
if ($image === false) {
|
||||
throw new \RuntimeException('Failed to create image canvas.');
|
||||
}
|
||||
|
||||
$bgRgb = self::hexToRgb($bgColor);
|
||||
$bg = imagecolorallocate($image, $bgRgb[0], $bgRgb[1], $bgRgb[2]);
|
||||
imagefill($image, 0, 0, $bg);
|
||||
|
||||
if ($backgroundPath !== null && is_file($backgroundPath)) {
|
||||
self::drawBackground($image, $backgroundPath);
|
||||
}
|
||||
|
||||
if ($overlayType !== 'none') {
|
||||
self::drawOverlay($image, $overlayType);
|
||||
}
|
||||
|
||||
$textRgb = self::hexToRgb($textColor);
|
||||
$textCol = imagecolorallocate($image, $textRgb[0], $textRgb[1], $textRgb[2]);
|
||||
|
||||
$fontPath = self::findFont();
|
||||
|
||||
if ($fontPath !== null) {
|
||||
self::drawTextTtf($image, $title, $siteName, $fontPath, $fontSize, $textCol);
|
||||
} else {
|
||||
self::drawTextFallback($image, $title, $siteName, $textCol);
|
||||
}
|
||||
|
||||
$tmpDir = Factory::getApplication()->get('tmp_path', JPATH_ROOT . '/tmp');
|
||||
$outPath = $tmpDir . '/social_' . md5($title . $siteName . microtime()) . '.png';
|
||||
|
||||
imagepng($image, $outPath, 6);
|
||||
imagedestroy($image);
|
||||
|
||||
return $outPath;
|
||||
}
|
||||
|
||||
private static function drawBackground(\GdImage $image, string $path): void
|
||||
{
|
||||
$info = @getimagesize($path);
|
||||
|
||||
if ($info === false) {
|
||||
return;
|
||||
}
|
||||
|
||||
$source = match ($info[2]) {
|
||||
IMAGETYPE_JPEG => @imagecreatefromjpeg($path),
|
||||
IMAGETYPE_PNG => @imagecreatefrompng($path),
|
||||
IMAGETYPE_WEBP => \function_exists('imagecreatefromwebp') ? @imagecreatefromwebp($path) : false,
|
||||
default => false,
|
||||
};
|
||||
|
||||
if ($source === false) {
|
||||
return;
|
||||
}
|
||||
|
||||
$srcW = imagesx($source);
|
||||
$srcH = imagesy($source);
|
||||
|
||||
$scale = max(self::WIDTH / $srcW, self::HEIGHT / $srcH);
|
||||
$newW = (int) ($srcW * $scale);
|
||||
$newH = (int) ($srcH * $scale);
|
||||
$dstX = (int) ((self::WIDTH - $newW) / 2);
|
||||
$dstY = (int) ((self::HEIGHT - $newH) / 2);
|
||||
|
||||
imagecopyresampled($image, $source, $dstX, $dstY, 0, 0, $newW, $newH, $srcW, $srcH);
|
||||
imagedestroy($source);
|
||||
}
|
||||
|
||||
private static function drawOverlay(\GdImage $image, string $type): void
|
||||
{
|
||||
$opacity = ($type === 'light') ? 80 : 160;
|
||||
$color = imagecolorallocatealpha($image, 0, 0, 0, 127 - (int) ($opacity * 127 / 255));
|
||||
|
||||
if ($color === false) {
|
||||
return;
|
||||
}
|
||||
|
||||
imagesavealpha($image, true);
|
||||
imagefilledrectangle($image, 0, 0, self::WIDTH - 1, self::HEIGHT - 1, $color);
|
||||
}
|
||||
|
||||
private static function drawTextTtf(\GdImage $image, string $title, string $siteName, string $fontPath, int $fontSize, int $color): void
|
||||
{
|
||||
$lines = self::wordWrap($title, $fontPath, $fontSize, self::WIDTH - self::PADDING * 2);
|
||||
$lineH = (int) ($fontSize * 1.4);
|
||||
$totalH = \count($lines) * $lineH;
|
||||
$startY = (int) ((self::HEIGHT - $totalH) / 2) + $fontSize;
|
||||
|
||||
foreach ($lines as $i => $line) {
|
||||
$box = imagettfbbox($fontSize, 0, $fontPath, $line);
|
||||
$lineW = abs($box[2] - $box[0]);
|
||||
$x = (int) ((self::WIDTH - $lineW) / 2);
|
||||
imagettftext($image, $fontSize, 0, $x, $startY + $i * $lineH, $color, $fontPath, $line);
|
||||
}
|
||||
|
||||
$siteSize = (int) ($fontSize * 0.5);
|
||||
$box = imagettfbbox($siteSize, 0, $fontPath, $siteName);
|
||||
$siteW = abs($box[2] - $box[0]);
|
||||
$siteX = (int) ((self::WIDTH - $siteW) / 2);
|
||||
$siteY = self::HEIGHT - self::PADDING;
|
||||
|
||||
$siteCol = imagecolorallocatealpha($image, 255, 255, 255, 40);
|
||||
|
||||
if ($siteCol !== false) {
|
||||
imagettftext($image, $siteSize, 0, $siteX, $siteY, $siteCol, $fontPath, $siteName);
|
||||
}
|
||||
}
|
||||
|
||||
private static function drawTextFallback(\GdImage $image, string $title, string $siteName, int $color): void
|
||||
{
|
||||
$maxChars = (int) (self::WIDTH / 10);
|
||||
$wrapped = wordwrap($title, $maxChars, "\n", true);
|
||||
$lines = explode("\n", $wrapped);
|
||||
$lineH = 20;
|
||||
$totalH = \count($lines) * $lineH;
|
||||
$startY = (int) ((self::HEIGHT - $totalH) / 2);
|
||||
|
||||
foreach ($lines as $i => $line) {
|
||||
$lineW = \strlen($line) * 9;
|
||||
$x = max(self::PADDING, (int) ((self::WIDTH - $lineW) / 2));
|
||||
imagestring($image, 5, $x, $startY + $i * $lineH, $line, $color);
|
||||
}
|
||||
|
||||
$siteW = \strlen($siteName) * 7;
|
||||
$siteX = max(self::PADDING, (int) ((self::WIDTH - $siteW) / 2));
|
||||
$siteY = self::HEIGHT - 40;
|
||||
|
||||
$gray = imagecolorallocate($image, 180, 180, 180);
|
||||
|
||||
if ($gray !== false) {
|
||||
imagestring($image, 3, $siteX, $siteY, $siteName, $gray);
|
||||
}
|
||||
}
|
||||
|
||||
private static function wordWrap(string $text, string $fontPath, int $fontSize, int $maxWidth): array
|
||||
{
|
||||
$words = explode(' ', $text);
|
||||
$lines = [];
|
||||
$line = '';
|
||||
|
||||
foreach ($words as $word) {
|
||||
$test = ($line === '') ? $word : $line . ' ' . $word;
|
||||
$box = imagettfbbox($fontSize, 0, $fontPath, $test);
|
||||
$testW = abs($box[2] - $box[0]);
|
||||
|
||||
if ($testW > $maxWidth && $line !== '') {
|
||||
$lines[] = $line;
|
||||
$line = $word;
|
||||
} else {
|
||||
$line = $test;
|
||||
}
|
||||
}
|
||||
|
||||
if ($line !== '') {
|
||||
$lines[] = $line;
|
||||
}
|
||||
|
||||
return $lines ?: [$text];
|
||||
}
|
||||
|
||||
private static function findFont(): ?string
|
||||
{
|
||||
$candidates = [
|
||||
JPATH_ROOT . '/media/com_mokosuitecross/fonts/OpenSans-Bold.ttf',
|
||||
'/usr/share/fonts/truetype/dejavu/DejaVuSans-Bold.ttf',
|
||||
'/usr/share/fonts/truetype/liberation/LiberationSans-Bold.ttf',
|
||||
'C:/Windows/Fonts/arialbd.ttf',
|
||||
];
|
||||
|
||||
foreach ($candidates as $path) {
|
||||
if (is_file($path)) {
|
||||
return $path;
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
private static function hexToRgb(string $hex): array
|
||||
{
|
||||
$hex = ltrim($hex, '#');
|
||||
|
||||
if (\strlen($hex) === 3) {
|
||||
$hex = $hex[0] . $hex[0] . $hex[1] . $hex[1] . $hex[2] . $hex[2];
|
||||
}
|
||||
|
||||
return [
|
||||
(int) hexdec(substr($hex, 0, 2)),
|
||||
(int) hexdec(substr($hex, 2, 2)),
|
||||
(int) hexdec(substr($hex, 4, 2)),
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -220,175 +220,6 @@ $queueProcessing = $componentParams->get('queue_processing', 'scheduler');
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<!-- Analytics: Best Times to Post Heatmap -->
|
||||
<div class="card mt-3">
|
||||
<div class="card-header d-flex justify-content-between align-items-center">
|
||||
<h5 class="card-title mb-0"><?php echo Text::_('COM_MOKOSUITECROSS_ANALYTICS_BEST_TIMES'); ?></h5>
|
||||
<select id="heatmapServiceFilter" class="form-select form-select-sm" style="width: auto;">
|
||||
<option value=""><?php echo Text::_('COM_MOKOSUITECROSS_ANALYTICS_ALL_PLATFORMS'); ?></option>
|
||||
<?php
|
||||
$db = \Joomla\CMS\Factory::getDbo();
|
||||
$stQuery = $db->getQuery(true)
|
||||
->select('DISTINCT ' . $db->quoteName('service_type'))
|
||||
->from($db->quoteName('#__mokosuitecross_services'))
|
||||
->where($db->quoteName('published') . ' = 1')
|
||||
->order($db->quoteName('service_type') . ' ASC');
|
||||
$db->setQuery($stQuery);
|
||||
$serviceTypes = $db->loadColumn();
|
||||
foreach ($serviceTypes as $st) :
|
||||
?>
|
||||
<option value="<?php echo htmlspecialchars($st); ?>"><?php echo htmlspecialchars(ucfirst($st)); ?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div id="heatmapContainer">
|
||||
<p class="text-muted" id="heatmapLoading"><?php echo Text::_('JLIB_HTML_BEHAVIOR_LOADING'); ?></p>
|
||||
<div id="heatmapNoData" style="display:none;">
|
||||
<p class="text-muted mb-0"><?php echo Text::_('COM_MOKOSUITECROSS_ANALYTICS_NO_DATA'); ?></p>
|
||||
</div>
|
||||
<div id="heatmapGrid" style="display:none;">
|
||||
<style>
|
||||
.msc-heatmap { border-collapse: collapse; width: 100%; font-size: 11px; }
|
||||
.msc-heatmap th, .msc-heatmap td { text-align: center; padding: 3px 2px; min-width: 28px; }
|
||||
.msc-heatmap th { font-weight: 600; color: #666; font-size: 10px; }
|
||||
.msc-heatmap td.msc-hm-cell { border-radius: 3px; cursor: default; position: relative; }
|
||||
.msc-heatmap td.msc-hm-cell:hover { outline: 2px solid #333; z-index: 1; }
|
||||
.msc-heatmap .msc-hm-day { text-align: right; padding-right: 8px; font-weight: 600; color: #555; white-space: nowrap; }
|
||||
</style>
|
||||
<table class="msc-heatmap" id="heatmapTable">
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th>
|
||||
<?php for ($h = 0; $h < 24; $h++) :
|
||||
$label = $h % 12 ?: 12;
|
||||
$suffix = $h < 12 ? 'a' : 'p';
|
||||
?>
|
||||
<th><?php echo $label . $suffix; ?></th>
|
||||
<?php endfor; ?>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
$dayLabels = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'];
|
||||
for ($d = 0; $d < 7; $d++) :
|
||||
?>
|
||||
<tr>
|
||||
<td class="msc-hm-day"><?php echo $dayLabels[$d]; ?></td>
|
||||
<?php for ($h = 0; $h < 24; $h++) : ?>
|
||||
<td class="msc-hm-cell" id="hm-<?php echo $d; ?>-<?php echo $h; ?>" title="<?php echo $dayLabels[$d] . ' ' . ($h % 12 ?: 12) . ':00 ' . ($h < 12 ? 'AM' : 'PM'); ?>"></td>
|
||||
<?php endfor; ?>
|
||||
</tr>
|
||||
<?php endfor; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="d-flex align-items-center justify-content-end mt-2" style="font-size:11px;color:#666;">
|
||||
<span class="me-1"><?php echo Text::_('COM_MOKOSUITECROSS_ANALYTICS_ENGAGEMENT_RATE'); ?>:</span>
|
||||
<span style="display:inline-block;width:14px;height:14px;background:#ebedf0;border-radius:2px;margin:0 1px;" title="0%"></span>
|
||||
<span style="display:inline-block;width:14px;height:14px;background:#9be9a8;border-radius:2px;margin:0 1px;" title="Low"></span>
|
||||
<span style="display:inline-block;width:14px;height:14px;background:#40c463;border-radius:2px;margin:0 1px;" title="Medium"></span>
|
||||
<span style="display:inline-block;width:14px;height:14px;background:#30a14e;border-radius:2px;margin:0 1px;" title="High"></span>
|
||||
<span style="display:inline-block;width:14px;height:14px;background:#216e39;border-radius:2px;margin:0 1px;" title="Very High"></span>
|
||||
</div>
|
||||
</div>
|
||||
<div id="heatmapBestTimes" style="display:none;" class="mt-3 pt-3 border-top">
|
||||
<strong><?php echo Text::_('COM_MOKOSUITECROSS_ANALYTICS_BEST_TIMES'); ?>:</strong>
|
||||
<ul id="bestTimesList" class="mb-0 mt-1"></ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
var token = '<?php echo \Joomla\CMS\Session\Session::getFormToken(); ?>';
|
||||
|
||||
function loadHeatmap(serviceType) {
|
||||
var url = 'index.php?option=com_mokosuitecross&task=analytics.heatmap&format=json'
|
||||
+ '&service_type=' + encodeURIComponent(serviceType || '')
|
||||
+ '&days=90&' + token + '=1';
|
||||
|
||||
document.getElementById('heatmapLoading').style.display = '';
|
||||
document.getElementById('heatmapGrid').style.display = 'none';
|
||||
document.getElementById('heatmapNoData').style.display = 'none';
|
||||
document.getElementById('heatmapBestTimes').style.display = 'none';
|
||||
|
||||
fetch(url)
|
||||
.then(function(r) { return r.json(); })
|
||||
.then(function(data) {
|
||||
document.getElementById('heatmapLoading').style.display = 'none';
|
||||
|
||||
if (!data.success) {
|
||||
document.getElementById('heatmapNoData').style.display = '';
|
||||
return;
|
||||
}
|
||||
|
||||
var grid = data.grid;
|
||||
var maxRate = 0;
|
||||
var hasData = false;
|
||||
|
||||
for (var d = 0; d < 7; d++) {
|
||||
for (var h = 0; h < 24; h++) {
|
||||
var rate = grid[d] && grid[d][h] ? parseFloat(grid[d][h].avg_rate) : 0;
|
||||
if (rate > maxRate) maxRate = rate;
|
||||
if (rate > 0) hasData = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (!hasData) {
|
||||
document.getElementById('heatmapNoData').style.display = '';
|
||||
return;
|
||||
}
|
||||
|
||||
document.getElementById('heatmapGrid').style.display = '';
|
||||
|
||||
var colors = ['#ebedf0', '#9be9a8', '#40c463', '#30a14e', '#216e39'];
|
||||
for (var d = 0; d < 7; d++) {
|
||||
for (var h = 0; h < 24; h++) {
|
||||
var cell = document.getElementById('hm-' + d + '-' + h);
|
||||
if (!cell) continue;
|
||||
var val = grid[d] && grid[d][h] ? grid[d][h] : {avg_rate: 0, post_count: 0};
|
||||
var rate = parseFloat(val.avg_rate);
|
||||
var count = parseInt(val.post_count, 10);
|
||||
var level = 0;
|
||||
if (maxRate > 0 && rate > 0) {
|
||||
var pct = rate / maxRate;
|
||||
if (pct <= 0.25) level = 1;
|
||||
else if (pct <= 0.50) level = 2;
|
||||
else if (pct <= 0.75) level = 3;
|
||||
else level = 4;
|
||||
}
|
||||
cell.style.backgroundColor = colors[level];
|
||||
cell.title = cell.title.split(' - ')[0] + ' - ' + rate.toFixed(1) + '% (' + count + ' posts)';
|
||||
}
|
||||
}
|
||||
|
||||
// Show best times
|
||||
if (data.best_times && data.best_times.length > 0) {
|
||||
document.getElementById('heatmapBestTimes').style.display = '';
|
||||
var list = document.getElementById('bestTimesList');
|
||||
list.innerHTML = '';
|
||||
var top = data.best_times.slice(0, 3);
|
||||
for (var i = 0; i < top.length; i++) {
|
||||
var bt = top[i];
|
||||
var li = document.createElement('li');
|
||||
li.textContent = bt.day_name + ' at ' + bt.hour_label + ' (' + bt.avg_rate.toFixed(1) + '% avg engagement)';
|
||||
list.appendChild(li);
|
||||
}
|
||||
}
|
||||
})
|
||||
.catch(function() {
|
||||
document.getElementById('heatmapLoading').style.display = 'none';
|
||||
document.getElementById('heatmapNoData').style.display = '';
|
||||
});
|
||||
}
|
||||
|
||||
document.getElementById('heatmapServiceFilter').addEventListener('change', function() {
|
||||
loadHeatmap(this.value);
|
||||
});
|
||||
|
||||
loadHeatmap('');
|
||||
});
|
||||
</script>
|
||||
<!-- Recent Activity -->
|
||||
<div class="card mt-3">
|
||||
<div class="card-header">
|
||||
|
||||
@@ -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.54</version>
|
||||
<version>01.08.42</version>
|
||||
<creationDate>2026-05-28</creationDate>
|
||||
<author>Moko Consulting</author>
|
||||
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
||||
|
||||
@@ -212,53 +212,8 @@ XML;
|
||||
|
||||
$form->load($xml);
|
||||
|
||||
// AI Generate button for the Share Content panel
|
||||
$articleId = Factory::getApplication()->input->getInt('id', 0);
|
||||
$aiParams = ComponentHelper::getParams('com_mokosuitecross');
|
||||
$aiEnabled = \in_array($aiParams->get('ai_provider', 'none'), ['claude', 'openai'], true);
|
||||
|
||||
if ($aiEnabled && $articleId > 0) {
|
||||
$aiToken = Session::getFormToken();
|
||||
$aiUrl = Uri::base() . 'index.php?option=com_mokosuitecross&task=ai.generate&format=raw&article_id=' . $articleId . '&' . $aiToken . '=1';
|
||||
|
||||
$aiButtonHtml = '<div class="mb-3">'
|
||||
. '<button type="button" id="mokosuitecross-ai-btn" class="btn btn-sm btn-outline-info" onclick="mokosuitecrossAiGenerate()">'
|
||||
. '<span class="icon-magic" aria-hidden="true"></span> '
|
||||
. \Joomla\CMS\Language\Text::_('COM_MOKOSUITECROSS_AI_GENERATE')
|
||||
. '</button>'
|
||||
. '<span id="mokosuitecross-ai-status" class="ms-2 small"></span>'
|
||||
. '</div>'
|
||||
. '<script>'
|
||||
. 'function mokosuitecrossAiGenerate(){'
|
||||
. 'var btn=document.getElementById("mokosuitecross-ai-btn");'
|
||||
. 'var st=document.getElementById("mokosuitecross-ai-status");'
|
||||
. 'btn.disabled=true;st.textContent="' . \Joomla\CMS\Language\Text::_('COM_MOKOSUITECROSS_AI_GENERATING', true) . '";'
|
||||
. 'fetch("' . $aiUrl . '")'
|
||||
. '.then(function(r){return r.json();})'
|
||||
. '.then(function(d){'
|
||||
. 'btn.disabled=false;'
|
||||
. 'if(!d.success){st.textContent=d.error||"Error";return;}'
|
||||
. 'st.textContent="' . \Joomla\CMS\Language\Text::_('COM_MOKOSUITECROSS_AI_GENERATED', true) . '";'
|
||||
. 'var f=d.data;'
|
||||
. 'var s=document.getElementById("jform_attribs_mokosuitecross_social_text");if(s)s.value=f.social;'
|
||||
. 'var h=document.getElementById("jform_attribs_mokosuitecross_short_text");if(h)h.value=f.short;'
|
||||
. 'var c=document.getElementById("jform_attribs_mokosuitecross_chat_text");if(c)c.value=f.chat;'
|
||||
. 'var e=document.getElementById("jform_attribs_mokosuitecross_email_subject");if(e)e.value=f.email_subject;'
|
||||
. '})'
|
||||
. '.catch(function(){btn.disabled=false;st.textContent="Request failed";});'
|
||||
. '}'
|
||||
. '</script>';
|
||||
|
||||
$aiXml = '<?xml version="1.0"?>
|
||||
<form><fields name="attribs"><fieldset name="mokosuitecross_share">
|
||||
<field name="mokosuitecross_ai_generate" type="note"
|
||||
label="" description="" />
|
||||
</fieldset></fields></form>';
|
||||
$form->load($aiXml);
|
||||
$form->setFieldAttribute('mokosuitecross_ai_generate', 'description', $aiButtonHtml, 'attribs');
|
||||
}
|
||||
|
||||
// Cross-post history panel for existing articles
|
||||
$articleId = Factory::getApplication()->input->getInt('id', 0);
|
||||
|
||||
if ($articleId > 0) {
|
||||
$query = $db->getQuery(true)
|
||||
|
||||
@@ -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.54</version>
|
||||
<version>01.08.42</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.54</version>
|
||||
<version>01.08.42</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.54</version>
|
||||
<version>01.08.42</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.54</version>
|
||||
<version>01.08.42</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.54</version>
|
||||
<version>01.08.42</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.54</version>
|
||||
<version>01.08.42</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.54</version>
|
||||
<version>01.08.42</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.54</version>
|
||||
<version>01.08.42</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.54</version>
|
||||
<version>01.08.42</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.54</version>
|
||||
<version>01.08.42</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.54</version>
|
||||
<version>01.08.42</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.54</version>
|
||||
<version>01.08.42</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.54</version>
|
||||
<version>01.08.42</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.54</version>
|
||||
<version>01.08.42</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.54</version>
|
||||
<version>01.08.42</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.54</version>
|
||||
<version>01.08.42</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.54</version>
|
||||
<version>01.08.42</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.54</version>
|
||||
<version>01.08.42</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.54</version>
|
||||
<version>01.08.42</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.54</version>
|
||||
<version>01.08.42</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.54</version>
|
||||
<version>01.08.42</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.54</version>
|
||||
<version>01.08.42</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.54</version>
|
||||
<version>01.08.42</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.54</version>
|
||||
<version>01.08.42</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.54</version>
|
||||
<version>01.08.42</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.54</version>
|
||||
<version>01.08.42</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.54</version>
|
||||
<version>01.08.42</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.54</version>
|
||||
<version>01.08.42</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.54</version>
|
||||
<version>01.08.42</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.54</version>
|
||||
<version>01.08.42</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.54</version>
|
||||
<version>01.08.42</version>
|
||||
<creationDate>2026-05-28</creationDate>
|
||||
<author>Moko Consulting</author>
|
||||
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
||||
|
||||
+1
-2
@@ -1,3 +1,2 @@
|
||||
PLG_MOKOSUITECROSS_TIKTOK="MokoSuiteCross - TikTok"
|
||||
PLG_MOKOSUITECROSS_TIKTOK_DESCRIPTION="Cross-post Joomla articles to TikTok via Content Posting API. Supports video uploads (PULL_FROM_URL) and photo carousels (up to 35 images)."
|
||||
PLG_MOKOSUITECROSS_TIKTOK_AUDIT_WARNING="Unverified TikTok developer apps can only create private posts. To publish publicly, your app must pass TikTok's Content Posting API audit. Visit the TikTok Developer Portal to submit your app for review."
|
||||
PLG_MOKOSUITECROSS_TIKTOK_DESCRIPTION="Cross-post Joomla articles to TikTok."
|
||||
|
||||
@@ -17,13 +17,13 @@ use Joomla\CMS\Plugin\CMSPlugin;
|
||||
use Joomla\Component\MokoSuiteCross\Administrator\Service\MokoSuiteCrossServiceInterface;
|
||||
use Joomla\Event\SubscriberInterface;
|
||||
|
||||
/**
|
||||
* TikTok service plugin for MokoSuiteCross.
|
||||
*
|
||||
* API: https://open.tiktokapis.com/v2/post/publish/content/init/
|
||||
*/
|
||||
class TiktokService extends CMSPlugin implements SubscriberInterface, MokoSuiteCrossServiceInterface
|
||||
{
|
||||
private const API_BASE = 'https://open.tiktokapis.com/v2/post/publish/';
|
||||
private const MAX_PHOTO_IMAGES = 35;
|
||||
private const MAX_POLL_ATTEMPTS = 10;
|
||||
private const POLL_INTERVAL_SECONDS = 3;
|
||||
|
||||
public static function getSubscribedEvents(): array
|
||||
{
|
||||
return ['onMokoSuiteCrossGetServices' => 'onMokoSuiteCrossGetServices'];
|
||||
@@ -47,129 +47,28 @@ class TiktokService extends CMSPlugin implements SubscriberInterface, MokoSuiteC
|
||||
return ['success' => false, 'platform_post_id' => '', 'response' => ['error' => 'Missing access token']];
|
||||
}
|
||||
|
||||
if (empty($media)) {
|
||||
if (empty($media[0])) {
|
||||
return ['success' => false, 'platform_post_id' => '', 'response' => ['error' => 'TikTok requires a video or image']];
|
||||
}
|
||||
|
||||
$postingMode = $params['posting_mode'] ?? 'DIRECT_POST';
|
||||
$privacyLevel = $params['privacy_level'] ?? 'SELF_ONLY';
|
||||
$caption = mb_substr($message, 0, 2200);
|
||||
$title = mb_substr(strip_tags($message), 0, 150);
|
||||
|
||||
if ($this->isVideoUrl($media[0])) {
|
||||
return $this->publishVideo($token, $title, $caption, $media[0], $postingMode, $privacyLevel);
|
||||
}
|
||||
|
||||
return $this->publishPhotos($token, $title, $caption, $media, $postingMode, $privacyLevel);
|
||||
}
|
||||
|
||||
private function publishVideo(string $token, string $title, string $caption, string $videoUrl, string $postingMode, string $privacyLevel): array
|
||||
{
|
||||
$payload = [
|
||||
$postData = json_encode([
|
||||
'post_info' => [
|
||||
'title' => $title,
|
||||
'description' => $caption,
|
||||
'privacy_level' => $privacyLevel,
|
||||
'title' => mb_substr(strip_tags($message), 0, 150),
|
||||
'description' => mb_substr($message, 0, 2200),
|
||||
'privacy_level' => 'SELF_ONLY',
|
||||
'disable_comment' => false,
|
||||
],
|
||||
'source_info' => [
|
||||
'source' => 'PULL_FROM_URL',
|
||||
'video_url' => $videoUrl,
|
||||
'source' => 'PULL_FROM_URL',
|
||||
'video_url' => $media[0],
|
||||
],
|
||||
'post_mode' => $postingMode,
|
||||
];
|
||||
]);
|
||||
|
||||
$result = $this->apiPost(self::API_BASE . 'video/init/', $token, $payload);
|
||||
|
||||
if (!$result['success']) {
|
||||
return ['success' => false, 'platform_post_id' => '', 'response' => $result['data']];
|
||||
}
|
||||
|
||||
$publishId = $result['data']['data']['publish_id'] ?? '';
|
||||
|
||||
if (empty($publishId)) {
|
||||
return ['success' => true, 'platform_post_id' => '', 'response' => $result['data']];
|
||||
}
|
||||
|
||||
return $this->pollPublishStatus($token, $publishId, $result['data']);
|
||||
}
|
||||
|
||||
private function publishPhotos(string $token, string $title, string $caption, array $media, string $postingMode, string $privacyLevel): array
|
||||
{
|
||||
$images = \array_slice($media, 0, self::MAX_PHOTO_IMAGES);
|
||||
|
||||
$photoImages = [];
|
||||
foreach ($images as $url) {
|
||||
$photoImages[] = ['image_url' => $url];
|
||||
}
|
||||
|
||||
$payload = [
|
||||
'post_info' => [
|
||||
'title' => $title,
|
||||
'description' => $caption,
|
||||
'privacy_level' => $privacyLevel,
|
||||
'disable_comment' => false,
|
||||
],
|
||||
'source_info' => [
|
||||
'source' => 'PULL_FROM_URL',
|
||||
'photo_images' => $photoImages,
|
||||
],
|
||||
'post_mode' => $postingMode,
|
||||
'media_type' => 'PHOTO',
|
||||
];
|
||||
|
||||
$result = $this->apiPost(self::API_BASE . 'content/init/', $token, $payload);
|
||||
|
||||
if (!$result['success']) {
|
||||
return ['success' => false, 'platform_post_id' => '', 'response' => $result['data']];
|
||||
}
|
||||
|
||||
$publishId = $result['data']['data']['publish_id'] ?? '';
|
||||
|
||||
if (empty($publishId)) {
|
||||
return ['success' => true, 'platform_post_id' => '', 'response' => $result['data']];
|
||||
}
|
||||
|
||||
return $this->pollPublishStatus($token, $publishId, $result['data']);
|
||||
}
|
||||
|
||||
private function pollPublishStatus(string $token, string $publishId, array $initResponse): array
|
||||
{
|
||||
for ($i = 0; $i < self::MAX_POLL_ATTEMPTS; $i++) {
|
||||
sleep(self::POLL_INTERVAL_SECONDS);
|
||||
|
||||
$statusResult = $this->apiPost(self::API_BASE . 'status/fetch/', $token, [
|
||||
'publish_id' => $publishId,
|
||||
]);
|
||||
|
||||
if (!$statusResult['success']) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$status = $statusResult['data']['data']['status'] ?? '';
|
||||
|
||||
if ($status === 'PUBLISH_COMPLETE') {
|
||||
$postId = $statusResult['data']['data']['publicaly_available_post_id']
|
||||
?? $statusResult['data']['data']['post_id']
|
||||
?? $publishId;
|
||||
return ['success' => true, 'platform_post_id' => (string) $postId, 'response' => $statusResult['data']];
|
||||
}
|
||||
|
||||
if ($status === 'FAILED') {
|
||||
$failReason = $statusResult['data']['data']['fail_reason'] ?? 'Unknown error';
|
||||
return ['success' => false, 'platform_post_id' => '', 'response' => ['error' => $failReason, 'data' => $statusResult['data']]];
|
||||
}
|
||||
}
|
||||
|
||||
return ['success' => true, 'platform_post_id' => $publishId, 'response' => array_merge($initResponse, ['note' => 'Publish initiated but status polling timed out'])];
|
||||
}
|
||||
|
||||
private function apiPost(string $url, string $token, array $payload): array
|
||||
{
|
||||
$ch = curl_init($url);
|
||||
$ch = curl_init();
|
||||
curl_setopt_array($ch, [
|
||||
CURLOPT_URL => 'https://open.tiktokapis.com/v2/post/publish/content/init/',
|
||||
CURLOPT_POST => true,
|
||||
CURLOPT_POSTFIELDS => json_encode($payload),
|
||||
CURLOPT_POSTFIELDS => $postData,
|
||||
CURLOPT_HTTPHEADER => ['Authorization: Bearer ' . $token, 'Content-Type: application/json'],
|
||||
CURLOPT_RETURNTRANSFER => true,
|
||||
CURLOPT_TIMEOUT => 30,
|
||||
@@ -178,26 +77,24 @@ class TiktokService extends CMSPlugin implements SubscriberInterface, MokoSuiteC
|
||||
$response = curl_exec($ch);
|
||||
|
||||
if ($response === false) {
|
||||
$curlError = curl_error($ch);
|
||||
curl_close($ch);
|
||||
return ['success' => false, 'data' => ['error' => 'Connection error: ' . $curlError]];
|
||||
}
|
||||
|
||||
$curlError = curl_error($ch);
|
||||
|
||||
curl_close($ch);
|
||||
|
||||
return ['success' => false, 'platform_post_id' => '', 'response' => ['error' => 'Connection error: ' . $curlError]];
|
||||
|
||||
}
|
||||
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
|
||||
curl_close($ch);
|
||||
|
||||
$data = json_decode($response, true) ?: [];
|
||||
|
||||
if ($httpCode >= 200 && $httpCode < 300) {
|
||||
return ['success' => true, 'data' => $data];
|
||||
return ['success' => true, 'platform_post_id' => $data['id'] ?? $data['uri'] ?? '', 'response' => $data];
|
||||
}
|
||||
|
||||
return ['success' => false, 'data' => $data];
|
||||
}
|
||||
|
||||
private function isVideoUrl(string $url): bool
|
||||
{
|
||||
return (bool) preg_match('/\.(mp4|mov|avi|wmv|webm|mkv)(\?|$)/i', $url);
|
||||
return ['success' => false, 'platform_post_id' => '', 'response' => $data];
|
||||
}
|
||||
|
||||
public function validateCredentials(array $credentials): array
|
||||
@@ -232,6 +129,6 @@ class TiktokService extends CMSPlugin implements SubscriberInterface, MokoSuiteC
|
||||
|
||||
public function getSupportedMediaTypes(): array
|
||||
{
|
||||
return ['image', 'video', 'carousel'];
|
||||
return ['image', 'video'];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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.54</version>
|
||||
<version>01.08.42</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.54</version>
|
||||
<version>01.08.42</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.54</version>
|
||||
<version>01.08.42</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.54</version>
|
||||
<version>01.08.42</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.54</version>
|
||||
<version>01.08.42</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.54</version>
|
||||
<version>01.08.42</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.54</version>
|
||||
<version>01.08.42</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.54</version>
|
||||
<version>01.08.42</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.54</version>
|
||||
<version>01.08.42</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.54</version>
|
||||
<version>01.08.42</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.54</version>
|
||||
<version>01.08.42</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.54</version>
|
||||
<version>01.08.42</version>
|
||||
<creationDate>2026-05-28</creationDate>
|
||||
<author>Moko Consulting</author>
|
||||
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<extension type="package" method="upgrade">
|
||||
<name>MokoSuiteCross</name>
|
||||
<packagename>mokosuitecross</packagename>
|
||||
<version>01.08.54</version>
|
||||
<version>01.08.42</version>
|
||||
<creationDate>2026-05-28</creationDate>
|
||||
<author>Moko Consulting</author>
|
||||
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
||||
|
||||
Reference in New Issue
Block a user