Compare commits
79 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 6970e888f5 | |||
| 34de7cd2fc | |||
| a9438c733e | |||
| 6e6cd7bb1c | |||
| f5fdd59e05 | |||
| 423f2f4cce | |||
| 32bff8e7be | |||
| 08a898cd7e | |||
| 7de7cea10e | |||
| dff90a26cf | |||
| 0d49195f52 | |||
| 9da83f1d40 | |||
| 96261987de | |||
| e702eb8d9e | |||
| febaa856c5 | |||
| acd8da441b | |||
| 437189830f | |||
| 1aa58e1d8d | |||
| 4810371bc0 | |||
| 36c9867857 | |||
| 657e5b2091 | |||
| eda0d222ed | |||
| 1627841983 | |||
| b8ebd8a5fd | |||
| 488f4df65a | |||
| 96f789dcec | |||
| 97619eea0c | |||
| c6ab0cc438 | |||
| a54b621f9d | |||
| 84513a81a5 | |||
| fceb3d5bf5 | |||
| 18e84fbcfe | |||
| c552a12a0e | |||
| 133944620b | |||
| ed5a143439 | |||
| c1fa8c816e | |||
| 1617452a3f | |||
| 313035cfa2 | |||
| a72028a1ad | |||
| 24a40a4117 | |||
| b6ec1cd5b3 | |||
| acef5eb3a3 | |||
| 5743915447 | |||
| 9905d1e634 | |||
| 47594c963d | |||
| 5621542141 | |||
| ee581032c3 | |||
| dd4de77202 | |||
| 3d567353c9 | |||
| ecb1ce592a | |||
| 819d615ede | |||
| f2947a088e | |||
| 845e0bd5fb | |||
| a78b3c224b | |||
| 7136e45a90 | |||
| 882b45cbbd | |||
| 36ab4ff1ac | |||
| f87ae2f922 | |||
| 3a49732dfb | |||
| da9ac28f22 | |||
| 176047d161 | |||
| 2fa2f86bd6 | |||
| ef066edffc | |||
| dec72b6af1 | |||
| 9ca3ab9fc2 | |||
| afc2737663 | |||
| aacf5de7f1 | |||
| 2f10a5fb80 | |||
| 25fb7e9272 | |||
| b39ba30dc5 | |||
| 14c218092b | |||
| 833c8ca41a | |||
| c7551854ac | |||
| 27990652d0 | |||
| 351f1fc7f8 | |||
| 1d5683ceda | |||
| f2cf0dfd24 | |||
| 3a1a201eb2 | |||
| 452d4795ed |
@@ -22,7 +22,7 @@ on:
|
|||||||
|
|
||||||
env:
|
env:
|
||||||
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
|
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
|
||||||
GITEA_URL: ${{ vars.GITEA_URL || 'https://git.mokoconsulting.tech' }}
|
MOKOGITEA_URL: ${{ vars.GITEA_URL || 'https://git.mokoconsulting.tech' }}
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: write
|
contents: write
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ name: "Universal: Build & Release"
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
pull_request:
|
pull_request:
|
||||||
types: [opened, closed]
|
types: [opened, synchronize, closed]
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
paths-ignore:
|
paths-ignore:
|
||||||
@@ -52,7 +52,7 @@ on:
|
|||||||
|
|
||||||
env:
|
env:
|
||||||
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
|
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
|
||||||
GITEA_URL: ${{ vars.GITEA_URL || 'https://git.mokoconsulting.tech' }}
|
MOKOGITEA_URL: ${{ vars.GITEA_URL || 'https://git.mokoconsulting.tech' }}
|
||||||
GITEA_ORG: ${{ vars.GITEA_ORG || github.repository_owner }}
|
GITEA_ORG: ${{ vars.GITEA_ORG || github.repository_owner }}
|
||||||
GITEA_REPO: ${{ vars.GITEA_REPO || github.event.repository.name }}
|
GITEA_REPO: ${{ vars.GITEA_REPO || github.event.repository.name }}
|
||||||
|
|
||||||
@@ -66,6 +66,7 @@ jobs:
|
|||||||
runs-on: release
|
runs-on: release
|
||||||
if: >-
|
if: >-
|
||||||
(github.event.action == 'opened' && github.event.pull_request.merged != true) ||
|
(github.event.action == 'opened' && github.event.pull_request.merged != true) ||
|
||||||
|
(github.event.action == 'synchronize' && github.event.pull_request.merged != true) ||
|
||||||
(github.event_name == 'workflow_dispatch' && inputs.action == 'promote-rc')
|
(github.event_name == 'workflow_dispatch' && inputs.action == 'promote-rc')
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
@@ -101,7 +102,7 @@ jobs:
|
|||||||
php ${MOKO_CLI}/branch_rename.php \
|
php ${MOKO_CLI}/branch_rename.php \
|
||||||
--from "${{ github.event.pull_request.head.ref || 'dev' }}" --to rc \
|
--from "${{ github.event.pull_request.head.ref || 'dev' }}" --to rc \
|
||||||
--token "${{ secrets.MOKOGITEA_TOKEN }}" \
|
--token "${{ secrets.MOKOGITEA_TOKEN }}" \
|
||||||
--api-base "${GITEA_URL}/api/v1/repos/${GITEA_ORG}/${GITEA_REPO}" \
|
--api-base "${MOKOGITEA_URL}/api/v1/repos/${GITEA_ORG}/${GITEA_REPO}" \
|
||||||
--pr "${{ github.event.pull_request.number }}"
|
--pr "${{ github.event.pull_request.number }}"
|
||||||
|
|
||||||
- name: Checkout rc and configure git
|
- name: Checkout rc and configure git
|
||||||
@@ -120,7 +121,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Update RC release notes from CHANGELOG.md
|
- name: Update RC release notes from CHANGELOG.md
|
||||||
run: |
|
run: |
|
||||||
API_BASE="${GITEA_URL}/api/v1/repos/${GITEA_ORG}/${GITEA_REPO}"
|
API_BASE="${MOKOGITEA_URL}/api/v1/repos/${GITEA_ORG}/${GITEA_REPO}"
|
||||||
TOKEN="${{ secrets.MOKOGITEA_TOKEN }}"
|
TOKEN="${{ secrets.MOKOGITEA_TOKEN }}"
|
||||||
|
|
||||||
# Extract [Unreleased] section from changelog
|
# Extract [Unreleased] section from changelog
|
||||||
@@ -268,7 +269,7 @@ jobs:
|
|||||||
!startsWith(steps.platform.outputs.platform, 'joomla')
|
!startsWith(steps.platform.outputs.platform, 'joomla')
|
||||||
run: |
|
run: |
|
||||||
VERSION="${{ steps.version.outputs.version }}"
|
VERSION="${{ steps.version.outputs.version }}"
|
||||||
API_BASE="${GITEA_URL}/api/v1/repos/${GITEA_ORG}/${GITEA_REPO}"
|
API_BASE="${MOKOGITEA_URL}/api/v1/repos/${GITEA_ORG}/${GITEA_REPO}"
|
||||||
TOKEN="${{ secrets.MOKOGITEA_TOKEN }}"
|
TOKEN="${{ secrets.MOKOGITEA_TOKEN }}"
|
||||||
SEMVER_TAG="v${VERSION}"
|
SEMVER_TAG="v${VERSION}"
|
||||||
|
|
||||||
@@ -293,7 +294,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Update release notes and promote changelog
|
- name: Update release notes and promote changelog
|
||||||
run: |
|
run: |
|
||||||
API_BASE="${GITEA_URL}/api/v1/repos/${GITEA_ORG}/${GITEA_REPO}"
|
API_BASE="${MOKOGITEA_URL}/api/v1/repos/${GITEA_ORG}/${GITEA_REPO}"
|
||||||
TOKEN="${{ secrets.MOKOGITEA_TOKEN }}"
|
TOKEN="${{ secrets.MOKOGITEA_TOKEN }}"
|
||||||
|
|
||||||
# Get the stable release info (version and ID)
|
# Get the stable release info (version and ID)
|
||||||
@@ -362,7 +363,7 @@ jobs:
|
|||||||
VERSION="${{ steps.bump.outputs.version || steps.version.outputs.version }}"
|
VERSION="${{ steps.bump.outputs.version || steps.version.outputs.version }}"
|
||||||
RELEASE_TAG="${{ steps.version.outputs.release_tag }}"
|
RELEASE_TAG="${{ steps.version.outputs.release_tag }}"
|
||||||
GH_REPO="${{ vars.GH_MIRROR_REPO || github.repository }}"
|
GH_REPO="${{ vars.GH_MIRROR_REPO || github.repository }}"
|
||||||
API_BASE="${GITEA_URL}/api/v1/repos/${GITEA_ORG}/${GITEA_REPO}"
|
API_BASE="${MOKOGITEA_URL}/api/v1/repos/${GITEA_ORG}/${GITEA_REPO}"
|
||||||
php ${MOKO_CLI}/release_mirror.php \
|
php ${MOKO_CLI}/release_mirror.php \
|
||||||
--version "$VERSION" --tag "$RELEASE_TAG" \
|
--version "$VERSION" --tag "$RELEASE_TAG" \
|
||||||
--token "${{ secrets.MOKOGITEA_TOKEN }}" --api-base "$API_BASE" \
|
--token "${{ secrets.MOKOGITEA_TOKEN }}" --api-base "$API_BASE" \
|
||||||
@@ -391,7 +392,7 @@ jobs:
|
|||||||
if: steps.version.outputs.skip != 'true'
|
if: steps.version.outputs.skip != 'true'
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
run: |
|
run: |
|
||||||
API_BASE="${GITEA_URL}/api/v1/repos/${GITEA_ORG}/${GITEA_REPO}"
|
API_BASE="${MOKOGITEA_URL}/api/v1/repos/${GITEA_ORG}/${GITEA_REPO}"
|
||||||
TOKEN="${{ secrets.MOKOGITEA_TOKEN }}"
|
TOKEN="${{ secrets.MOKOGITEA_TOKEN }}"
|
||||||
|
|
||||||
# Delete rc branch (ephemeral — created by promote-rc)
|
# Delete rc branch (ephemeral — created by promote-rc)
|
||||||
@@ -415,7 +416,7 @@ jobs:
|
|||||||
if: steps.version.outputs.skip != 'true'
|
if: steps.version.outputs.skip != 'true'
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
run: |
|
run: |
|
||||||
API_BASE="${GITEA_URL}/api/v1/repos/${GITEA_ORG}/${GITEA_REPO}"
|
API_BASE="${MOKOGITEA_URL}/api/v1/repos/${GITEA_ORG}/${GITEA_REPO}"
|
||||||
TOKEN="${{ secrets.MOKOGITEA_TOKEN }}"
|
TOKEN="${{ secrets.MOKOGITEA_TOKEN }}"
|
||||||
VERSION="${{ steps.bump.outputs.version || steps.version.outputs.version }}"
|
VERSION="${{ steps.bump.outputs.version || steps.version.outputs.version }}"
|
||||||
BRANCH_NAME="version/${VERSION}"
|
BRANCH_NAME="version/${VERSION}"
|
||||||
@@ -436,7 +437,7 @@ jobs:
|
|||||||
if: steps.version.outputs.skip != 'true'
|
if: steps.version.outputs.skip != 'true'
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
run: |
|
run: |
|
||||||
API_BASE="${GITEA_URL}/api/v1/repos/${GITEA_ORG}/${GITEA_REPO}"
|
API_BASE="${MOKOGITEA_URL}/api/v1/repos/${GITEA_ORG}/${GITEA_REPO}"
|
||||||
php ${MOKO_CLI}/version_reset_dev.php \
|
php ${MOKO_CLI}/version_reset_dev.php \
|
||||||
--token "${{ secrets.MOKOGITEA_TOKEN }}" --api-base "${API_BASE}" \
|
--token "${{ secrets.MOKOGITEA_TOKEN }}" --api-base "${API_BASE}" \
|
||||||
--branch dev --path . 2>&1 || true
|
--branch dev --path . 2>&1 || true
|
||||||
@@ -462,5 +463,5 @@ jobs:
|
|||||||
echo "| Version | \`${VERSION}\` |" >> $GITHUB_STEP_SUMMARY
|
echo "| Version | \`${VERSION}\` |" >> $GITHUB_STEP_SUMMARY
|
||||||
echo "| Branch | \`${{ steps.version.outputs.branch }}\` |" >> $GITHUB_STEP_SUMMARY
|
echo "| Branch | \`${{ steps.version.outputs.branch }}\` |" >> $GITHUB_STEP_SUMMARY
|
||||||
echo "| Tag | \`${{ steps.version.outputs.tag }}\` |" >> $GITHUB_STEP_SUMMARY
|
echo "| Tag | \`${{ steps.version.outputs.tag }}\` |" >> $GITHUB_STEP_SUMMARY
|
||||||
echo "| Release | [View](${GITEA_URL}/${GITEA_ORG}/${GITEA_REPO}/releases/tag/${{ steps.version.outputs.tag }}) |" >> $GITHUB_STEP_SUMMARY
|
echo "| Release | [View](${MOKOGITEA_URL}/${GITEA_ORG}/${GITEA_REPO}/releases/tag/${{ steps.version.outputs.tag }}) |" >> $GITHUB_STEP_SUMMARY
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -13,6 +13,12 @@
|
|||||||
name: "Generic: Project CI"
|
name: "Generic: Project CI"
|
||||||
|
|
||||||
on:
|
on:
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
- dev
|
||||||
|
- dev/**
|
||||||
|
- rc/**
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
|
|||||||
@@ -50,8 +50,8 @@ jobs:
|
|||||||
- name: Clone MokoCLI
|
- name: Clone MokoCLI
|
||||||
env:
|
env:
|
||||||
MOKOGITEA_TOKEN: ${{ secrets.MOKOGITEA_TOKEN }}
|
MOKOGITEA_TOKEN: ${{ secrets.MOKOGITEA_TOKEN }}
|
||||||
MOKOGITEA_URL: ${{ vars.GITEA_URL || 'https://git.mokoconsulting.tech' }}
|
|
||||||
run: |
|
run: |
|
||||||
|
MOKOGITEA_URL="${{ vars.GITEA_URL || 'https://git.mokoconsulting.tech' }}"
|
||||||
git clone --depth 1 --filter=blob:none --sparse "${MOKOGITEA_URL}/MokoConsulting/MokoCLI.git" /tmp/mokocli
|
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
|
cd /tmp/mokocli && git sparse-checkout set cli/ci_issue_reporter.sh
|
||||||
|
|
||||||
@@ -59,14 +59,10 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
MOKOGITEA_TOKEN: ${{ secrets.MOKOGITEA_TOKEN }}
|
MOKOGITEA_TOKEN: ${{ secrets.MOKOGITEA_TOKEN }}
|
||||||
MOKOGITEA_URL: ${{ vars.GITEA_URL || 'https://git.mokoconsulting.tech' }}
|
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: |
|
run: |
|
||||||
chmod +x /tmp/mokocli/cli/ci_issue_reporter.sh
|
chmod +x /tmp/mokocli/cli/ci_issue_reporter.sh
|
||||||
/tmp/mokocli/cli/ci_issue_reporter.sh \
|
/tmp/mokocli/cli/ci_issue_reporter.sh \
|
||||||
--gate "$INPUT_GATE" \
|
--gate "${{ inputs.gate }}" \
|
||||||
--details "$INPUT_DETAILS" \
|
--details "${{ inputs.details }}" \
|
||||||
--severity "$INPUT_SEVERITY" \
|
--severity "${{ inputs.severity }}" \
|
||||||
--workflow "$INPUT_WORKFLOW"
|
--workflow "${{ inputs.workflow }}"
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ permissions:
|
|||||||
contents: write
|
contents: write
|
||||||
|
|
||||||
env:
|
env:
|
||||||
GITEA_URL: ${{ vars.GITEA_URL || 'https://git.mokoconsulting.tech' }}
|
MOKOGITEA_URL: ${{ vars.GITEA_URL || 'https://git.mokoconsulting.tech' }}
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
cleanup:
|
cleanup:
|
||||||
@@ -33,17 +33,17 @@ jobs:
|
|||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
token: ${{ secrets.GA_TOKEN }}
|
token: ${{ secrets.MOKOGITEA_TOKEN }}
|
||||||
|
|
||||||
- name: Delete merged branches
|
- name: Delete merged branches
|
||||||
env:
|
env:
|
||||||
GA_TOKEN: ${{ secrets.GA_TOKEN }}
|
MOKOGITEA_TOKEN: ${{ secrets.MOKOGITEA_TOKEN }}
|
||||||
run: |
|
run: |
|
||||||
echo "=== Merged Branch Cleanup ==="
|
echo "=== Merged Branch Cleanup ==="
|
||||||
API="${GITEA_URL}/api/v1/repos/${{ github.repository }}"
|
API="${MOKOGITEA_URL}/api/v1/repos/${{ github.repository }}"
|
||||||
|
|
||||||
# List branches via API
|
# List branches via API
|
||||||
BRANCHES=$(curl -sS -H "Authorization: token ${GA_TOKEN}" \
|
BRANCHES=$(curl -sS -H "Authorization: token ${MOKOGITEA_TOKEN}" \
|
||||||
"${API}/branches?limit=50" | jq -r '.[].name')
|
"${API}/branches?limit=50" | jq -r '.[].name')
|
||||||
|
|
||||||
DELETED=0
|
DELETED=0
|
||||||
@@ -56,7 +56,7 @@ jobs:
|
|||||||
# Check if branch is merged into main
|
# Check if branch is merged into main
|
||||||
if git merge-base --is-ancestor "origin/${BRANCH}" origin/main 2>/dev/null; then
|
if git merge-base --is-ancestor "origin/${BRANCH}" origin/main 2>/dev/null; then
|
||||||
echo " Deleting merged branch: ${BRANCH}"
|
echo " Deleting merged branch: ${BRANCH}"
|
||||||
curl -sS -X DELETE -H "Authorization: token ${GA_TOKEN}" \
|
curl -sS -X DELETE -H "Authorization: token ${MOKOGITEA_TOKEN}" \
|
||||||
"${API}/branches/${BRANCH}" 2>/dev/null || true
|
"${API}/branches/${BRANCH}" 2>/dev/null || true
|
||||||
DELETED=$((DELETED + 1))
|
DELETED=$((DELETED + 1))
|
||||||
fi
|
fi
|
||||||
@@ -66,20 +66,20 @@ jobs:
|
|||||||
|
|
||||||
- name: Clean old workflow runs
|
- name: Clean old workflow runs
|
||||||
env:
|
env:
|
||||||
GA_TOKEN: ${{ secrets.GA_TOKEN }}
|
MOKOGITEA_TOKEN: ${{ secrets.MOKOGITEA_TOKEN }}
|
||||||
run: |
|
run: |
|
||||||
echo "=== Workflow Run Cleanup ==="
|
echo "=== Workflow Run Cleanup ==="
|
||||||
API="${GITEA_URL}/api/v1/repos/${{ github.repository }}"
|
API="${MOKOGITEA_URL}/api/v1/repos/${{ github.repository }}"
|
||||||
CUTOFF=$(date -d "30 days ago" +%Y-%m-%dT%H:%M:%SZ 2>/dev/null || date -v-30d +%Y-%m-%dT%H:%M:%SZ)
|
CUTOFF=$(date -d "30 days ago" +%Y-%m-%dT%H:%M:%SZ 2>/dev/null || date -v-30d +%Y-%m-%dT%H:%M:%SZ)
|
||||||
|
|
||||||
# Get old completed runs
|
# Get old completed runs
|
||||||
RUNS=$(curl -sS -H "Authorization: token ${GA_TOKEN}" \
|
RUNS=$(curl -sS -H "Authorization: token ${MOKOGITEA_TOKEN}" \
|
||||||
"${API}/actions/runs?status=completed&limit=50" | \
|
"${API}/actions/runs?status=completed&limit=50" | \
|
||||||
jq -r ".workflow_runs[] | select(.created_at < \"${CUTOFF}\") | .id" 2>/dev/null)
|
jq -r ".workflow_runs[] | select(.created_at < \"${CUTOFF}\") | .id" 2>/dev/null)
|
||||||
|
|
||||||
DELETED=0
|
DELETED=0
|
||||||
for RUN_ID in $RUNS; do
|
for RUN_ID in $RUNS; do
|
||||||
curl -sS -X DELETE -H "Authorization: token ${GA_TOKEN}" \
|
curl -sS -X DELETE -H "Authorization: token ${MOKOGITEA_TOKEN}" \
|
||||||
"${API}/actions/runs/${RUN_ID}" 2>/dev/null || true
|
"${API}/actions/runs/${RUN_ID}" 2>/dev/null || true
|
||||||
DELETED=$((DELETED + 1))
|
DELETED=$((DELETED + 1))
|
||||||
done
|
done
|
||||||
|
|||||||
@@ -0,0 +1,126 @@
|
|||||||
|
# Copyright (C) 2026 Moko Consulting <hello@mokoconsulting.tech>
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
#
|
||||||
|
# FILE INFORMATION
|
||||||
|
# DEFGROUP: Gitea.Workflow
|
||||||
|
# INGROUP: MokoStandards.Deploy
|
||||||
|
# REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards-API
|
||||||
|
# PATH: /templates/workflows/joomla/deploy-manual.yml.template
|
||||||
|
# VERSION: 04.07.00
|
||||||
|
# BRIEF: Manual SFTP deploy to dev server for Joomla repos
|
||||||
|
|
||||||
|
name: "Universal: Deploy to Dev (Manual)"
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
inputs:
|
||||||
|
clear_remote:
|
||||||
|
description: 'Delete all remote files before uploading'
|
||||||
|
required: false
|
||||||
|
default: 'false'
|
||||||
|
type: boolean
|
||||||
|
|
||||||
|
env:
|
||||||
|
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
deploy:
|
||||||
|
name: SFTP Deploy to Dev
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
|
||||||
|
|
||||||
|
- name: Setup PHP
|
||||||
|
run: |
|
||||||
|
php -v && composer --version
|
||||||
|
|
||||||
|
- name: Setup MokoStandards tools
|
||||||
|
env:
|
||||||
|
MOKOGITEA_TOKEN: ${{ secrets.MOKOGITEA_TOKEN || github.token }}
|
||||||
|
MOKO_CLONE_TOKEN: ${{ secrets.MOKOGITEA_TOKEN || github.token }}
|
||||||
|
MOKO_CLONE_HOST: ${{ secrets.MOKOGITEA_TOKEN && 'git.mokoconsulting.tech/MokoConsulting' || 'github.com/mokoconsulting-tech' }}
|
||||||
|
COMPOSER_AUTH: '{"github-oauth":{"github.com":"${{ secrets.MOKOGITEA_TOKEN || github.token }}"}}'
|
||||||
|
run: |
|
||||||
|
git clone --depth 1 --branch main --quiet \
|
||||||
|
"https://x-access-token:${MOKO_CLONE_TOKEN}@${MOKO_CLONE_HOST}/MokoStandards-API.git" \
|
||||||
|
/tmp/mokostandards-api 2>/dev/null || true
|
||||||
|
if [ -d "/tmp/mokostandards-api" ] && [ -f "/tmp/mokostandards-api/composer.json" ]; then
|
||||||
|
cd /tmp/mokostandards-api && composer install --no-dev --no-interaction --quiet 2>/dev/null || true
|
||||||
|
fi
|
||||||
|
|
||||||
|
- name: Check FTP configuration
|
||||||
|
id: check
|
||||||
|
env:
|
||||||
|
HOST: ${{ vars.DEV_FTP_HOST }}
|
||||||
|
PATH_VAR: ${{ vars.DEV_FTP_PATH }}
|
||||||
|
PORT: ${{ vars.DEV_FTP_PORT }}
|
||||||
|
run: |
|
||||||
|
if [ -z "$HOST" ] || [ -z "$PATH_VAR" ]; then
|
||||||
|
echo "DEV_FTP_HOST or DEV_FTP_PATH not configured -- cannot deploy"
|
||||||
|
echo "skip=true" >> "$GITHUB_OUTPUT"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
echo "skip=false" >> "$GITHUB_OUTPUT"
|
||||||
|
echo "host=$HOST" >> "$GITHUB_OUTPUT"
|
||||||
|
|
||||||
|
REMOTE="${PATH_VAR%/}"
|
||||||
|
echo "remote=$REMOTE" >> "$GITHUB_OUTPUT"
|
||||||
|
|
||||||
|
[ -z "$PORT" ] && PORT="22"
|
||||||
|
echo "port=$PORT" >> "$GITHUB_OUTPUT"
|
||||||
|
|
||||||
|
- name: Deploy via SFTP
|
||||||
|
if: steps.check.outputs.skip != 'true'
|
||||||
|
env:
|
||||||
|
SFTP_KEY: ${{ secrets.DEV_FTP_KEY }}
|
||||||
|
SFTP_PASS: ${{ secrets.DEV_FTP_PASSWORD }}
|
||||||
|
SFTP_USER: ${{ vars.DEV_FTP_USERNAME }}
|
||||||
|
run: |
|
||||||
|
SOURCE_DIR="src"
|
||||||
|
[ ! -d "$SOURCE_DIR" ] && SOURCE_DIR="htdocs"
|
||||||
|
[ ! -d "$SOURCE_DIR" ] && { echo "No src/ or htdocs/ -- nothing to deploy"; exit 0; }
|
||||||
|
|
||||||
|
printf '{"host":"%s","port":%s,"username":"%s","remotePath":"%s"' \
|
||||||
|
"${{ steps.check.outputs.host }}" "${{ steps.check.outputs.port }}" "$SFTP_USER" "${{ steps.check.outputs.remote }}" \
|
||||||
|
> /tmp/sftp-config.json
|
||||||
|
|
||||||
|
if [ -n "$SFTP_KEY" ]; then
|
||||||
|
echo "$SFTP_KEY" > /tmp/deploy_key
|
||||||
|
chmod 600 /tmp/deploy_key
|
||||||
|
printf ',"privateKeyPath":"/tmp/deploy_key"}' >> /tmp/sftp-config.json
|
||||||
|
else
|
||||||
|
printf ',"password":"%s"}' "$SFTP_PASS" >> /tmp/sftp-config.json
|
||||||
|
fi
|
||||||
|
|
||||||
|
DEPLOY_ARGS=(--path . --src-dir "$SOURCE_DIR" --config /tmp/sftp-config.json)
|
||||||
|
[ "${{ inputs.clear_remote }}" = "true" ] && DEPLOY_ARGS+=(--clear-remote)
|
||||||
|
|
||||||
|
PLATFORM=$(php /tmp/mokostandards-api/cli/platform_detect.php --path . 2>/dev/null || true)
|
||||||
|
if [ "$PLATFORM" = "waas-component" ] && [ -f "/tmp/mokostandards-api/deploy/deploy-joomla.php" ]; then
|
||||||
|
php /tmp/mokostandards-api/deploy/deploy-joomla.php "${DEPLOY_ARGS[@]}"
|
||||||
|
else
|
||||||
|
php /tmp/mokostandards-api/deploy/deploy-sftp.php "${DEPLOY_ARGS[@]}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
rm -f /tmp/deploy_key /tmp/sftp-config.json
|
||||||
|
|
||||||
|
- name: Summary
|
||||||
|
if: always()
|
||||||
|
run: |
|
||||||
|
if [ "${{ steps.check.outputs.skip }}" = "true" ]; then
|
||||||
|
echo "### Deploy Skipped -- FTP not configured" >> $GITHUB_STEP_SUMMARY
|
||||||
|
else
|
||||||
|
echo "### Manual Dev Deploy Complete" >> $GITHUB_STEP_SUMMARY
|
||||||
|
echo "" >> $GITHUB_STEP_SUMMARY
|
||||||
|
echo "| Field | Value |" >> $GITHUB_STEP_SUMMARY
|
||||||
|
echo "|-------|-------|" >> $GITHUB_STEP_SUMMARY
|
||||||
|
echo "| Host | \`${{ steps.check.outputs.host }}\` |" >> $GITHUB_STEP_SUMMARY
|
||||||
|
echo "| Remote | \`${{ steps.check.outputs.remote }}\` |" >> $GITHUB_STEP_SUMMARY
|
||||||
|
echo "| Clear | ${{ inputs.clear_remote }} |" >> $GITHUB_STEP_SUMMARY
|
||||||
|
fi
|
||||||
@@ -5,7 +5,7 @@
|
|||||||
# FILE INFORMATION
|
# FILE INFORMATION
|
||||||
# DEFGROUP: Gitea.Workflow
|
# DEFGROUP: Gitea.Workflow
|
||||||
# INGROUP: mokocli.Automation
|
# INGROUP: mokocli.Automation
|
||||||
# VERSION: 01.08.56
|
# VERSION: 01.13.03
|
||||||
# BRIEF: Auto-create feature branch when an issue is opened
|
# BRIEF: Auto-create feature branch when an issue is opened
|
||||||
|
|
||||||
name: "Universal: Issue Branch"
|
name: "Universal: Issue Branch"
|
||||||
@@ -19,7 +19,7 @@ permissions:
|
|||||||
issues: write
|
issues: write
|
||||||
|
|
||||||
env:
|
env:
|
||||||
GITEA_URL: ${{ vars.GITEA_URL || 'https://git.mokoconsulting.tech' }}
|
MOKOGITEA_URL: ${{ vars.GITEA_URL || 'https://git.mokoconsulting.tech' }}
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
create-branch:
|
create-branch:
|
||||||
@@ -28,8 +28,8 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- name: Create branch and comment
|
- name: Create branch and comment
|
||||||
run: |
|
run: |
|
||||||
TOKEN="${{ secrets.GA_TOKEN }}"
|
TOKEN="${{ secrets.MOKOGITEA_TOKEN }}"
|
||||||
API="${GITEA_URL}/api/v1/repos/${{ github.repository }}"
|
API="${MOKOGITEA_URL}/api/v1/repos/${{ github.repository }}"
|
||||||
ISSUE_NUM="${{ github.event.issue.number }}"
|
ISSUE_NUM="${{ github.event.issue.number }}"
|
||||||
ISSUE_TITLE="${{ github.event.issue.title }}"
|
ISSUE_TITLE="${{ github.event.issue.title }}"
|
||||||
|
|
||||||
@@ -58,7 +58,7 @@ jobs:
|
|||||||
echo "Created branch: ${BRANCH}"
|
echo "Created branch: ${BRANCH}"
|
||||||
|
|
||||||
# Comment on issue with branch link
|
# Comment on issue with branch link
|
||||||
REPO_URL="${GITEA_URL}/${{ github.repository }}"
|
REPO_URL="${MOKOGITEA_URL}/${{ github.repository }}"
|
||||||
BODY="Branch created: [\`${BRANCH}\`](${REPO_URL}/src/branch/${BRANCH})\n\n\`\`\`bash\ngit fetch origin\ngit checkout ${BRANCH}\n\`\`\`"
|
BODY="Branch created: [\`${BRANCH}\`](${REPO_URL}/src/branch/${BRANCH})\n\n\`\`\`bash\ngit fetch origin\ngit checkout ${BRANCH}\n\`\`\`"
|
||||||
|
|
||||||
curl -sf -X POST \
|
curl -sf -X POST \
|
||||||
|
|||||||
@@ -496,39 +496,26 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- name: Trigger RC pre-release
|
- name: Trigger RC pre-release
|
||||||
env:
|
env:
|
||||||
GA_TOKEN: ${{ secrets.MOKOGITEA_TOKEN }}
|
MOKOGITEA_TOKEN: ${{ secrets.MOKOGITEA_TOKEN }}
|
||||||
REPO: ${{ github.repository }}
|
REPO: ${{ github.repository }}
|
||||||
BRANCH: ${{ github.head_ref }}
|
BRANCH: ${{ github.head_ref }}
|
||||||
GITEA_URL: ${{ vars.GITEA_URL || 'https://git.mokoconsulting.tech' }}
|
MOKOGITEA_URL: ${{ vars.GITEA_URL || 'https://git.mokoconsulting.tech' }}
|
||||||
run: |
|
run: |
|
||||||
curl -s -X POST "${GITEA_URL}/api/v1/repos/${REPO}/actions/workflows/pre-release.yml/dispatches" -H "Authorization: token ${GITEA_TOKEN}" -H "Content-Type: application/json" -d "{\"ref\":\"${BRANCH}\",\"inputs\":{\"stability\":\"release-candidate\"}}"
|
curl -s -X POST "${MOKOGITEA_URL}/api/v1/repos/${REPO}/actions/workflows/pre-release.yml/dispatches" -H "Authorization: token ${MOKOGITEA_TOKEN}" -H "Content-Type: application/json" -d "{\"ref\":\"${BRANCH}\",\"inputs\":{\"stability\":\"release-candidate\"}}"
|
||||||
echo "### Pre-Release" >> $GITHUB_STEP_SUMMARY
|
echo "### Pre-Release" >> $GITHUB_STEP_SUMMARY
|
||||||
echo "Triggered RC build on branch \`${BRANCH}\`" >> $GITHUB_STEP_SUMMARY
|
echo "Triggered RC build on branch \`${BRANCH}\`" >> $GITHUB_STEP_SUMMARY
|
||||||
|
|
||||||
# ── Issue Reporter ──────────────────────────────────────────────────────
|
# ── Issue Reporter ──────────────────────────────────────────────────────
|
||||||
report-issues:
|
report-issues:
|
||||||
name: Report Issues
|
name: Report Issues
|
||||||
runs-on: ubuntu-latest
|
|
||||||
needs: [branch-policy, validate]
|
needs: [branch-policy, validate]
|
||||||
if: >-
|
if: >-
|
||||||
always() &&
|
always() &&
|
||||||
needs.validate.result == 'failure'
|
needs.validate.result == 'failure'
|
||||||
|
uses: ./.mokogitea/workflows/ci-issue-reporter.yml
|
||||||
steps:
|
with:
|
||||||
- name: Checkout
|
gate: "PR Validation"
|
||||||
uses: actions/checkout@v4
|
workflow: "PR Check"
|
||||||
with:
|
severity: error
|
||||||
sparse-checkout: automation/ci-issue-reporter.sh
|
details: "PR validation failed (syntax, manifest, changelog, or source checks). See the CI run for the specific check that failed."
|
||||||
sparse-checkout-cone-mode: false
|
secrets: inherit
|
||||||
|
|
||||||
- name: "File issue for PR validation failure"
|
|
||||||
env:
|
|
||||||
GITEA_TOKEN: ${{ secrets.MOKOGITEA_TOKEN }}
|
|
||||||
GITEA_URL: ${{ vars.GITEA_URL || 'https://git.mokoconsulting.tech' }}
|
|
||||||
run: |
|
|
||||||
chmod +x automation/ci-issue-reporter.sh
|
|
||||||
./automation/ci-issue-reporter.sh \
|
|
||||||
--gate "PR Validation" \
|
|
||||||
--workflow "PR Check" \
|
|
||||||
--severity error \
|
|
||||||
--details "PR validation failed (syntax, manifest, changelog, or source checks). See the CI run for the specific check that failed."
|
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ permissions:
|
|||||||
contents: read
|
contents: read
|
||||||
|
|
||||||
env:
|
env:
|
||||||
GITEA_URL: ${{ vars.GITEA_URL || 'https://git.mokoconsulting.tech' }}
|
MOKOGITEA_URL: ${{ vars.GITEA_URL || 'https://git.mokoconsulting.tech' }}
|
||||||
GITEA_ORG: ${{ vars.GITEA_ORG || github.repository_owner }}
|
GITEA_ORG: ${{ vars.GITEA_ORG || github.repository_owner }}
|
||||||
GITEA_REPO: ${{ vars.GITEA_REPO || github.event.repository.name }}
|
GITEA_REPO: ${{ vars.GITEA_REPO || github.event.repository.name }}
|
||||||
|
|
||||||
@@ -55,14 +55,14 @@ jobs:
|
|||||||
|
|
||||||
- name: Validate metadata against Joomla manifest
|
- name: Validate metadata against Joomla manifest
|
||||||
env:
|
env:
|
||||||
GITEA_TOKEN: ${{ secrets.MOKOGITEA_TOKEN }}
|
MOKOGITEA_TOKEN: ${{ secrets.MOKOGITEA_TOKEN }}
|
||||||
run: |
|
run: |
|
||||||
php ${MOKO_CLI}/joomla_metadata_validate.php \
|
php ${MOKO_CLI}/joomla_metadata_validate.php \
|
||||||
--path . \
|
--path . \
|
||||||
--token "${GITEA_TOKEN}" \
|
--token "${MOKOGITEA_TOKEN}" \
|
||||||
--org "${GITEA_ORG}" \
|
--org "${GITEA_ORG}" \
|
||||||
--repo "${GITEA_REPO}" \
|
--repo "${GITEA_REPO}" \
|
||||||
--api-base "${GITEA_URL}/api/v1" \
|
--api-base "${MOKOGITEA_URL}/api/v1" \
|
||||||
--ci
|
--ci
|
||||||
|
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
# INGROUP: mokocli.Release
|
# INGROUP: mokocli.Release
|
||||||
# REPO: https://git.mokoconsulting.tech/MokoConsulting/mokocli
|
# REPO: https://git.mokoconsulting.tech/MokoConsulting/mokocli
|
||||||
# PATH: /templates/workflows/universal/pre-release.yml.template
|
# PATH: /templates/workflows/universal/pre-release.yml.template
|
||||||
# VERSION: 05.01.00
|
# VERSION: 05.02.00
|
||||||
# BRIEF: Auto pre-release on push to dev/alpha/beta/rc branches
|
# BRIEF: Auto pre-release on push to dev/alpha/beta/rc branches
|
||||||
|
|
||||||
name: "Universal: Pre-Release"
|
name: "Universal: Pre-Release"
|
||||||
@@ -59,6 +59,11 @@ jobs:
|
|||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
token: ${{ secrets.MOKOGITEA_TOKEN }}
|
token: ${{ secrets.MOKOGITEA_TOKEN }}
|
||||||
ref: ${{ github.ref_name }}
|
ref: ${{ github.ref_name }}
|
||||||
|
submodules: recursive
|
||||||
|
|
||||||
|
- name: Update submodules to main
|
||||||
|
run: |
|
||||||
|
git submodule foreach --quiet 'git checkout main && git pull --quiet origin main' 2>/dev/null || true
|
||||||
|
|
||||||
- name: Setup mokocli tools
|
- name: Setup mokocli tools
|
||||||
env:
|
env:
|
||||||
|
|||||||
@@ -29,12 +29,20 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Rename branch
|
- name: Rename branch
|
||||||
|
env:
|
||||||
|
BRANCH: ${{ github.event.pull_request.head.ref }}
|
||||||
|
REPO: ${{ github.repository }}
|
||||||
|
GITEA_URL: ${{ vars.GITEA_URL || 'https://git.mokoconsulting.tech' }}
|
||||||
|
TOKEN: ${{ secrets.MOKOGITEA_TOKEN }}
|
||||||
run: |
|
run: |
|
||||||
BRANCH="${{ github.event.pull_request.head.ref }}"
|
set -euo pipefail
|
||||||
|
# BRANCH is attacker-controlled (PR head ref). Strict allowlist before ANY use.
|
||||||
|
if ! printf '%s' "$BRANCH" | grep -Eq '^rc/[A-Za-z0-9._/-]+$'; then
|
||||||
|
echo "::error::Refusing unsafe branch name: $BRANCH"; exit 1
|
||||||
|
fi
|
||||||
SUFFIX="${BRANCH#rc/}"
|
SUFFIX="${BRANCH#rc/}"
|
||||||
DEV_BRANCH="dev/${SUFFIX}"
|
DEV_BRANCH="dev/${SUFFIX}"
|
||||||
API="${{ vars.GITEA_URL || 'https://git.mokoconsulting.tech' }}/api/v1/repos/${{ github.repository }}/branches"
|
API="${GITEA_URL}/api/v1/repos/${REPO}/branches"
|
||||||
TOKEN="${{ secrets.MOKOGITEA_TOKEN }}"
|
|
||||||
|
|
||||||
# Create dev/ branch from rc/ branch
|
# Create dev/ branch from rc/ branch
|
||||||
STATUS=$(curl -sf -o /dev/null -w "%{http_code}" -X POST \
|
STATUS=$(curl -sf -o /dev/null -w "%{http_code}" -X POST \
|
||||||
@@ -42,25 +50,22 @@ jobs:
|
|||||||
-H "Content-Type: application/json" \
|
-H "Content-Type: application/json" \
|
||||||
-d "{\"new_branch_name\": \"${DEV_BRANCH}\", \"old_branch_name\": \"${BRANCH}\"}" \
|
-d "{\"new_branch_name\": \"${DEV_BRANCH}\", \"old_branch_name\": \"${BRANCH}\"}" \
|
||||||
"${API}" 2>/dev/null || true)
|
"${API}" 2>/dev/null || true)
|
||||||
|
|
||||||
if [ "$STATUS" = "201" ]; then
|
if [ "$STATUS" = "201" ]; then
|
||||||
echo "Created branch: ${DEV_BRANCH}" >> $GITHUB_STEP_SUMMARY
|
echo "Created branch: ${DEV_BRANCH}" >> "$GITHUB_STEP_SUMMARY"
|
||||||
else
|
else
|
||||||
echo "::error::Failed to create ${DEV_BRANCH} from ${BRANCH} (HTTP ${STATUS})"
|
echo "::error::Failed to create ${DEV_BRANCH} from ${BRANCH} (HTTP ${STATUS})"; exit 1
|
||||||
exit 1
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Delete rc/ branch
|
# Read BRANCH from the environment inside PHP (getenv, no string interpolation -> no PHP injection)
|
||||||
ENCODED=$(php -r "echo rawurlencode('${BRANCH}');")
|
ENCODED=$(php -r 'echo rawurlencode(getenv("BRANCH"));')
|
||||||
STATUS=$(curl -sf -o /dev/null -w "%{http_code}" -X DELETE \
|
STATUS=$(curl -sf -o /dev/null -w "%{http_code}" -X DELETE \
|
||||||
-H "Authorization: token ${TOKEN}" \
|
-H "Authorization: token ${TOKEN}" \
|
||||||
"${API}/${ENCODED}" 2>/dev/null || true)
|
"${API}/${ENCODED}" 2>/dev/null || true)
|
||||||
|
|
||||||
if [ "$STATUS" = "204" ]; then
|
if [ "$STATUS" = "204" ]; then
|
||||||
echo "Deleted branch: ${BRANCH}" >> $GITHUB_STEP_SUMMARY
|
echo "Deleted branch: ${BRANCH}" >> "$GITHUB_STEP_SUMMARY"
|
||||||
else
|
else
|
||||||
echo "::warning::Failed to delete ${BRANCH} (HTTP ${STATUS})"
|
echo "::warning::Failed to delete ${BRANCH} (HTTP ${STATUS})"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "### RC Reverted" >> $GITHUB_STEP_SUMMARY
|
echo "### RC Reverted" >> "$GITHUB_STEP_SUMMARY"
|
||||||
echo "${BRANCH} → ${DEV_BRANCH}" >> $GITHUB_STEP_SUMMARY
|
echo "${BRANCH} → ${DEV_BRANCH}" >> "$GITHUB_STEP_SUMMARY"
|
||||||
|
|||||||
@@ -77,7 +77,7 @@ jobs:
|
|||||||
- name: Check actor permission (admin only)
|
- name: Check actor permission (admin only)
|
||||||
id: perm
|
id: perm
|
||||||
env:
|
env:
|
||||||
TOKEN: ${{ secrets.MOKOGITEA_TOKEN || secrets.MOKOGITEA_TOKEN || github.token }}
|
TOKEN: ${{ secrets.MOKOGITEA_TOKEN || github.token }}
|
||||||
REPO: ${{ github.repository }}
|
REPO: ${{ github.repository }}
|
||||||
ACTOR: ${{ github.actor }}
|
ACTOR: ${{ github.actor }}
|
||||||
run: |
|
run: |
|
||||||
@@ -671,42 +671,30 @@ jobs:
|
|||||||
# ═══════════════════════════════════════════════════════════════════════
|
# ═══════════════════════════════════════════════════════════════════════
|
||||||
# Issue Reporter — file issues for failed gates
|
# Issue Reporter — file issues for failed gates
|
||||||
# ═══════════════════════════════════════════════════════════════════════
|
# ═══════════════════════════════════════════════════════════════════════
|
||||||
report-issues:
|
report-scripts:
|
||||||
name: "Report Issues"
|
name: "Report: Scripts Governance"
|
||||||
runs-on: ubuntu-latest
|
needs: [access_check, scripts_governance]
|
||||||
needs: [access_check, scripts_governance, repo_health]
|
|
||||||
if: >-
|
if: >-
|
||||||
always() &&
|
always() &&
|
||||||
(needs.scripts_governance.result == 'failure' ||
|
needs.scripts_governance.result == 'failure'
|
||||||
needs.repo_health.result == 'failure')
|
uses: ./.mokogitea/workflows/ci-issue-reporter.yml
|
||||||
|
with:
|
||||||
|
gate: "Scripts Governance"
|
||||||
|
workflow: "Repo Health"
|
||||||
|
severity: error
|
||||||
|
details: "Scripts directory policy violations detected. Review required and allowed directories."
|
||||||
|
secrets: inherit
|
||||||
|
|
||||||
steps:
|
report-health:
|
||||||
- name: Checkout
|
name: "Report: Repository Health"
|
||||||
uses: actions/checkout@v4
|
needs: [access_check, repo_health]
|
||||||
with:
|
if: >-
|
||||||
sparse-checkout: automation/ci-issue-reporter.sh
|
always() &&
|
||||||
sparse-checkout-cone-mode: false
|
needs.repo_health.result == 'failure'
|
||||||
|
uses: ./.mokogitea/workflows/ci-issue-reporter.yml
|
||||||
- name: "File issues for failed gates"
|
with:
|
||||||
env:
|
gate: "Repository Health"
|
||||||
GITEA_TOKEN: ${{ secrets.MOKOGITEA_TOKEN }}
|
workflow: "Repo Health"
|
||||||
GITEA_URL: ${{ vars.GITEA_URL || 'https://git.mokoconsulting.tech' }}
|
severity: error
|
||||||
run: |
|
details: "Repository health checks failed — missing required artifacts, disallowed files, or content warnings. Check the CI run summary."
|
||||||
chmod +x automation/ci-issue-reporter.sh
|
secrets: inherit
|
||||||
REPORTER="./automation/ci-issue-reporter.sh"
|
|
||||||
WF="Repo Health"
|
|
||||||
|
|
||||||
report_gate() {
|
|
||||||
local gate="$1" result="$2" details="$3"
|
|
||||||
if [ "$result" = "failure" ]; then
|
|
||||||
"$REPORTER" --gate "$gate" --details "$details" --workflow "$WF" --severity error
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
report_gate "Scripts Governance" \
|
|
||||||
"${{ needs.scripts_governance.result }}" \
|
|
||||||
"Scripts directory policy violations detected. Review required and allowed directories."
|
|
||||||
|
|
||||||
report_gate "Repository Health" \
|
|
||||||
"${{ needs.repo_health.result }}" \
|
|
||||||
"Repository health checks failed — missing required artifacts, disallowed files, or content warnings. Check the CI run summary."
|
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ jobs:
|
|||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
token: ${{ secrets.MOKOGITEA_TOKEN || secrets.GA_TOKEN || github.token }}
|
token: ${{ secrets.MOKOGITEA_TOKEN || github.token }}
|
||||||
ref: ${{ inputs.branch || github.ref }}
|
ref: ${{ inputs.branch || github.ref }}
|
||||||
fetch-depth: 1
|
fetch-depth: 1
|
||||||
|
|
||||||
|
|||||||
@@ -13,6 +13,7 @@
|
|||||||
name: "Universal: Workflow Sync Trigger"
|
name: "Universal: Workflow Sync Trigger"
|
||||||
|
|
||||||
on:
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
pull_request:
|
pull_request:
|
||||||
types: [closed]
|
types: [closed]
|
||||||
branches:
|
branches:
|
||||||
@@ -26,8 +27,9 @@ jobs:
|
|||||||
name: Sync workflows to live repos
|
name: Sync workflows to live repos
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
if: >-
|
if: >-
|
||||||
github.event.pull_request.merged == true &&
|
github.event_name == 'workflow_dispatch' ||
|
||||||
!contains(github.event.pull_request.title, '[skip sync]')
|
(github.event.pull_request.merged == true &&
|
||||||
|
!contains(github.event.pull_request.title, '[skip sync]'))
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Determine platform from repo name
|
- name: Determine platform from repo name
|
||||||
@@ -49,8 +51,14 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
MOKOGITEA_TOKEN: ${{ secrets.MOKOGITEA_TOKEN }}
|
MOKOGITEA_TOKEN: ${{ secrets.MOKOGITEA_TOKEN }}
|
||||||
run: |
|
run: |
|
||||||
GITEA_URL="${{ vars.GITEA_URL || 'https://git.mokoconsulting.tech' }}"
|
MOKOGITEA_URL="${{ vars.GITEA_URL || 'https://git.mokoconsulting.tech' }}"
|
||||||
git clone --depth 1 "${GITEA_URL}/MokoConsulting/mokocli.git" /tmp/mokocli
|
git clone --depth 1 "${MOKOGITEA_URL}/MokoConsulting/mokocli.git" /tmp/mokocli
|
||||||
|
|
||||||
|
- name: Install PHP
|
||||||
|
run: |
|
||||||
|
if ! command -v php &> /dev/null; then
|
||||||
|
apt-get update -qq && apt-get install -y -qq php-cli php-json php-curl > /dev/null 2>&1
|
||||||
|
fi
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
+14
-24
@@ -1,6 +1,10 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
## [Unreleased]
|
## [Unreleased]
|
||||||
|
|
||||||
|
## [01.12.00] --- 2026-06-28
|
||||||
|
|
||||||
|
## [01.12.00] --- 2026-06-28
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
- **Visual post calendar**: Monthly calendar grid view showing scheduled, queued, and posted cross-posts with status badges (#160)
|
- **Visual post calendar**: Monthly calendar grid view showing scheduled, queued, and posted cross-posts with status badges (#160)
|
||||||
- **Calendar navigation**: Month-by-month navigation with today highlighting (#160)
|
- **Calendar navigation**: Month-by-month navigation with today highlighting (#160)
|
||||||
@@ -8,8 +12,9 @@
|
|||||||
- **Analytics service filter**: Filter heatmap and stats by service type with configurable date range
|
- **Analytics service filter**: Filter heatmap and stats by service type with configurable date range
|
||||||
- **Analytics service breakdown**: Per-service success rate, failure count, and average posts per day
|
- **Analytics service breakdown**: Per-service success rate, failure count, and average posts per day
|
||||||
- **Analytics AJAX endpoint**: JSON heatmap data for dynamic filtering without page reload
|
- **Analytics AJAX endpoint**: JSON heatmap data for dynamic filtering without page reload
|
||||||
- **Social image generator**: Generate Open Graph images with article title overlay using PHP GD library (#157)
|
- **Social image generator**: Generate branded 1200x630 OG images with article title overlay using PHP GD (#157)
|
||||||
- **Social image config**: Background color, text color, overlay style, and site name override in component options (#157)
|
- **Social image config**: Background color, text color, font size, and site name branding options (#157)
|
||||||
|
- **Generate Social Image button**: One-click image generation in the Share Content panel (#157)
|
||||||
- **AI caption generation**: Generate platform-optimized cross-post captions from article content using Claude or OpenAI (#161)
|
- **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 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
|
- **AI Generate button**: One-click AI generation button in the Share Content panel that fills all caption fields
|
||||||
@@ -36,9 +41,15 @@
|
|||||||
- **TikTok photo carousel**: Up to 35 image carousel posts via content/init endpoint (#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 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)
|
- **TikTok audit warning**: Language string explaining that unverified apps can only create private posts (#164)
|
||||||
|
- **Link shortening**: Shorten URLs via Bitly, Rebrandly, or YOURLS with {url_short} placeholder (#159)
|
||||||
|
- **Site frontend**: Public-facing cross-post list and detail views for site visitors (#133)
|
||||||
|
- **Social preview**: AJAX platform mockups (Twitter, Facebook, LinkedIn, Instagram, Mastodon, Bluesky) in article editor (#156)
|
||||||
|
- **PHPUnit test suite**: Unit tests for models, helpers, and service plugins (#132)
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
- Webservices plugin Joomla 6 compatibility — `onBeforeApiRoute` receives `BeforeApiRouteEvent` object, extract router via `$event->getRouter()`
|
- **Content plugin**: Remove Joomla 5 typed event hints -- Joomla 6 dispatches `Model\AfterSaveEvent` instead of `Content\AfterSaveEvent`, causing fatal TypeError on article save
|
||||||
|
- **PreviewController**: Add ACL check and parameterized query to prevent unauthorized article access (IDOR)
|
||||||
|
- Webservices plugin Joomla 6 compatibility -- `onBeforeApiRoute` receives `BeforeApiRouteEvent` object, extract router via `$event->getRouter()`
|
||||||
|
|
||||||
## [01.07.00] --- 2026-06-23
|
## [01.07.00] --- 2026-06-23
|
||||||
|
|
||||||
@@ -88,24 +99,3 @@
|
|||||||
- **Bluesky**: Replaced md5() with hash('sha256', ...) for cache key
|
- **Bluesky**: Replaced md5() with hash('sha256', ...) for cache key
|
||||||
- **ServiceController**: Exception details no longer exposed to client
|
- **ServiceController**: Exception details no longer exposed to client
|
||||||
- **License warning**: Removed duplicate from system plugin -- install script already shows it with direct edit link
|
- **License warning**: Removed duplicate from system plugin -- install script already shows it with direct edit link
|
||||||
|
|
||||||
## [01.04.01] --- 2026-06-21
|
|
||||||
|
|
||||||
|
|
||||||
## [01.04.01] --- 2026-06-21
|
|
||||||
|
|
||||||
|
|
||||||
## [01.04.00] --- 2026-06-21
|
|
||||||
|
|
||||||
### Fixed
|
|
||||||
- **Package manifest**: Added missing `plg_system_mokosuitecross_events` and `plg_system_mokosuitecross_gallery` to `pkg_mokosuitecross.xml` — these system plugins were not installed with the package
|
|
||||||
- **Cleanup**: Removed old `src/` directory (pre-rename cruft with `mokojoomcross` files)
|
|
||||||
|
|
||||||
## [01.03.00] --- 2026-06-21
|
|
||||||
|
|
||||||
|
|
||||||
<!-- VERSION: 01.08.56 -->
|
|
||||||
|
|
||||||
All notable changes to MokoSuiteCross will be documented in this file.
|
|
||||||
|
|
||||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
|
|
||||||
|
|||||||
+1
-1
@@ -14,7 +14,7 @@
|
|||||||
DEFGROUP: Template-Joomla
|
DEFGROUP: Template-Joomla
|
||||||
INGROUP: Template-Joomla.Documentation
|
INGROUP: Template-Joomla.Documentation
|
||||||
REPO: https://github.com/mokoconsulting-tech/Template-Joomla/
|
REPO: https://github.com/mokoconsulting-tech/Template-Joomla/
|
||||||
VERSION: 01.08.56
|
VERSION: 01.13.03
|
||||||
PATH: ./CODE_OF_CONDUCT.md
|
PATH: ./CODE_OF_CONDUCT.md
|
||||||
BRIEF: Community expectations and enforcement guidelines
|
BRIEF: Community expectations and enforcement guidelines
|
||||||
NOTE: Adapted with attribution from the Contributor Covenant v2.1
|
NOTE: Adapted with attribution from the Contributor Covenant v2.1
|
||||||
|
|||||||
+119
-1
File diff suppressed because one or more lines are too long
@@ -1,8 +1,8 @@
|
|||||||
# MokoSuiteCross
|
# MokoSuiteCross
|
||||||
|
|
||||||
<!-- VERSION: 01.08.56 -->
|
<!-- VERSION: 01.13.03 -->
|
||||||
|
|
||||||
Cross-posting Joomla content to social media, email marketing, and chat platforms for Joomla 5/6.
|
Cross-posting Joomla content to social media, email marketing, and chat platforms for Joomla 6.
|
||||||
|
|
||||||
## Overview
|
## Overview
|
||||||
|
|
||||||
@@ -16,8 +16,14 @@ MokoSuiteCross automatically publishes your Joomla articles to multiple platform
|
|||||||
- **Post queue** — Scheduled posting, retry on failure, detailed delivery logs
|
- **Post queue** — Scheduled posting, retry on failure, detailed delivery logs
|
||||||
- **Message templates** — Customize post format per platform with placeholders ({title}, {url}, {social}, {short}, {chat}, {email_subject}, {email_body}, {field:xxx})
|
- **Message templates** — Customize post format per platform with placeholders ({title}, {url}, {social}, {short}, {chat}, {email_subject}, {email_body}, {field:xxx})
|
||||||
- **Share Content panel** — Per-article fields for platform-optimized text (social, short, chat, email) with image picker
|
- **Share Content panel** — Per-article fields for platform-optimized text (social, short, chat, email) with image picker
|
||||||
|
- **AI caption generation** — Generate platform-optimized captions using Claude or OpenAI with one click
|
||||||
|
- **Social preview** — AJAX platform mockups (Twitter, Facebook, LinkedIn, Instagram, Mastodon, Bluesky) in the article editor
|
||||||
|
- **Social image generator** — Generate Open Graph images with article title overlay using PHP GD
|
||||||
|
- **Link shortening** — Shorten URLs via Bitly, Rebrandly, or YOURLS with {url_short} placeholder
|
||||||
- **Caption rotation** — {random:opt1|opt2|opt3} placeholder for varying evergreen re-shares
|
- **Caption rotation** — {random:opt1|opt2|opt3} placeholder for varying evergreen re-shares
|
||||||
- **UTM tracking** — Auto-append UTM parameters to shared links with {platform} token
|
- **UTM tracking** — Auto-append UTM parameters to shared links with {platform} token
|
||||||
|
- **Post calendar** — Visual monthly calendar view of scheduled and completed cross-posts
|
||||||
|
- **Posting analytics** — Best time to post heatmap with per-service breakdown and recommendations
|
||||||
- **Delete from platforms** — Remove cross-posted content when articles are unpublished/trashed (7 platforms)
|
- **Delete from platforms** — Remove cross-posted content when articles are unpublished/trashed (7 platforms)
|
||||||
- **Post history** — Track what was posted where, with platform response data
|
- **Post history** — Track what was posted where, with platform response data
|
||||||
- **Evergreen re-sharing** — Automatically re-share articles on a configurable interval
|
- **Evergreen re-sharing** — Automatically re-share articles on a configurable interval
|
||||||
@@ -82,7 +88,7 @@ MokoSuiteCross automatically publishes your Joomla articles to multiple platform
|
|||||||
| RSS Feed | `plg_mokosuitecross_rssfeed` | Implemented |
|
| RSS Feed | `plg_mokosuitecross_rssfeed` | Implemented |
|
||||||
| ActivityPub | `plg_mokosuitecross_activitypub` | Implemented |
|
| ActivityPub | `plg_mokosuitecross_activitypub` | Implemented |
|
||||||
| Google Business | `plg_mokosuitecross_googlebusiness` | Implemented |
|
| Google Business | `plg_mokosuitecross_googlebusiness` | Implemented |
|
||||||
| Nostr | `plg_mokosuitecross_nostr` | Stub (WebSocket deferred) |
|
| Nostr | `plg_mokosuitecross_nostr` | Implemented |
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
|
|||||||
+4
-4
@@ -23,7 +23,7 @@ DEFGROUP: Template-Joomla
|
|||||||
INGROUP: Template-Joomla.Documentation
|
INGROUP: Template-Joomla.Documentation
|
||||||
REPO: https://git.mokoconsulting.tech/MokoConsulting/Template-Joomla
|
REPO: https://git.mokoconsulting.tech/MokoConsulting/Template-Joomla
|
||||||
PATH: /SECURITY.md
|
PATH: /SECURITY.md
|
||||||
VERSION: 01.08.56
|
VERSION: 01.13.03
|
||||||
BRIEF: Security vulnerability reporting and handling policy
|
BRIEF: Security vulnerability reporting and handling policy
|
||||||
-->
|
-->
|
||||||
|
|
||||||
@@ -224,10 +224,10 @@ The following are explicitly out of scope:
|
|||||||
|
|
||||||
## Metadata
|
## Metadata
|
||||||
|
|
||||||
| Field | Value |
|
| Field | Value |
|
||||||
| ------------ | ------------------------------------------------------------------------------------------------------------ |
|
| ------------ | ------------------------------------------------------------------------------------------------------------ |
|
||||||
| Document | Security Policy |
|
| Document | Security Policy |
|
||||||
| Path | /SECURITY.md |
|
| Path | /SECURITY.md |
|
||||||
| Repository | [https://github.com/mokoconsulting-tech/Template-Joomla](https://github.com/mokoconsulting-tech/Template-Joomla) |
|
| Repository | [https://github.com/mokoconsulting-tech/Template-Joomla](https://github.com/mokoconsulting-tech/Template-Joomla) |
|
||||||
| Owner | Moko Consulting |
|
| Owner | Moko Consulting |
|
||||||
| Scope | Security vulnerability handling |
|
| Scope | Security vulnerability handling |
|
||||||
|
|||||||
@@ -266,7 +266,7 @@
|
|||||||
</field>
|
</field>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
|
|
||||||
<fieldset name="social_image" label="COM_MOKOSUITECROSS_CONFIG_SOCIAL_IMAGE">
|
<fieldset name="social_image" label="COM_MOKOSUITECROSS_CONFIG_SOCIAL_IMAGE">
|
||||||
<field
|
<field
|
||||||
name="social_image_enabled"
|
name="social_image_enabled"
|
||||||
type="radio"
|
type="radio"
|
||||||
|
|||||||
@@ -570,65 +570,22 @@ COM_MOKOSUITECROSS_AI_GENERATE_DESC="Generate platform-optimized captions from t
|
|||||||
COM_MOKOSUITECROSS_AI_GENERATING="Generating captions..."
|
COM_MOKOSUITECROSS_AI_GENERATING="Generating captions..."
|
||||||
COM_MOKOSUITECROSS_AI_GENERATED="AI captions generated successfully."
|
COM_MOKOSUITECROSS_AI_GENERATED="AI captions generated successfully."
|
||||||
COM_MOKOSUITECROSS_AI_ERROR="AI generation failed: %s"
|
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."
|
COM_MOKOSUITECROSS_AI_NOT_CONFIGURED="AI is not configured. Go to Options to set up a provider and API key."
|
||||||
|
|
||||||
; Analytics
|
|
||||||
COM_MOKOSUITECROSS_SUBMENU_ANALYTICS="Analytics"
|
|
||||||
COM_MOKOSUITECROSS_ANALYTICS_PERIOD="Time Period"
|
|
||||||
COM_MOKOSUITECROSS_ANALYTICS_SERVICE_FILTER="Service"
|
|
||||||
COM_MOKOSUITECROSS_ANALYTICS_ALL_SERVICES="All Services"
|
|
||||||
COM_MOKOSUITECROSS_ANALYTICS_BEST_TIMES="Best Times to Post"
|
|
||||||
COM_MOKOSUITECROSS_ANALYTICS_HEATMAP="Engagement Heatmap"
|
|
||||||
COM_MOKOSUITECROSS_ANALYTICS_HOURLY="Hourly Distribution"
|
|
||||||
COM_MOKOSUITECROSS_ANALYTICS_DAILY="Day of Week Distribution"
|
|
||||||
COM_MOKOSUITECROSS_ANALYTICS_NO_DATA="Not enough posting data to generate recommendations. Post at least 3 times per time slot over the selected period."
|
|
||||||
COM_MOKOSUITECROSS_ANALYTICS_POSTS_SUCCESS="%d of %d successful"
|
|
||||||
COM_MOKOSUITECROSS_ANALYTICS_DAY_SUN="Sun"
|
|
||||||
COM_MOKOSUITECROSS_ANALYTICS_DAY_MON="Mon"
|
|
||||||
COM_MOKOSUITECROSS_ANALYTICS_DAY_TUE="Tue"
|
|
||||||
COM_MOKOSUITECROSS_ANALYTICS_DAY_WED="Wed"
|
|
||||||
COM_MOKOSUITECROSS_ANALYTICS_DAY_THU="Thu"
|
|
||||||
COM_MOKOSUITECROSS_ANALYTICS_DAY_FRI="Fri"
|
|
||||||
COM_MOKOSUITECROSS_ANALYTICS_DAY_SAT="Sat"
|
|
||||||
COM_MOKOSUITECROSS_ANALYTICS_LEGEND_HIGH="High success rate"
|
|
||||||
COM_MOKOSUITECROSS_ANALYTICS_LEGEND_MEDIUM="Medium success rate"
|
|
||||||
COM_MOKOSUITECROSS_ANALYTICS_LEGEND_LOW="Low success rate"
|
|
||||||
COM_MOKOSUITECROSS_ANALYTICS_LEGEND_NONE="No data"
|
|
||||||
COM_MOKOSUITECROSS_PERIOD_180_DAYS="Last 180 days"
|
|
||||||
COM_MOKOSUITECROSS_PERIOD_365_DAYS="Last 365 days"
|
|
||||||
; Category Rules
|
; Category Rules
|
||||||
COM_MOKOSUITECROSS_CONFIG_CATEGORY_RULES="Category Rules"
|
COM_MOKOSUITECROSS_CONFIG_CATEGORY_RULES="Category Rules"
|
||||||
COM_MOKOSUITECROSS_CONFIG_CATEGORY_RULES_NOTE="Category Routing"
|
COM_MOKOSUITECROSS_CONFIG_CATEGORY_RULES_NOTE="Category Routing"
|
||||||
COM_MOKOSUITECROSS_CONFIG_CATEGORY_RULES_NOTE_DESC="Category routing rules let you map Joomla categories to specific cross-post services. When rules exist for a category, only those services receive posts. When no rules exist, all services are used (default behaviour). Rules are managed in the database table #__mokosuitecross_category_rules. A full admin UI will be added in a future release."
|
COM_MOKOSUITECROSS_CONFIG_CATEGORY_RULES_NOTE_DESC="Category routing rules let you map Joomla categories to specific cross-post services. When rules exist for a category, only those services receive posts. When no rules exist, all services are used (default behaviour). Rules are managed in the database table #__mokosuitecross_category_rules. A full admin UI will be added in a future release."
|
||||||
|
|
||||||
; Posting Analytics
|
; Post Calendar
|
||||||
COM_MOKOSUITECROSS_ANALYTICS_FILTER_SERVICE="Service"
|
COM_MOKOSUITECROSS_CALENDAR="Post Calendar"
|
||||||
COM_MOKOSUITECROSS_ANALYTICS_ALL_SERVICES="All Services"
|
COM_MOKOSUITECROSS_CALENDAR_DESC="Visual calendar of scheduled and posted content"
|
||||||
COM_MOKOSUITECROSS_ANALYTICS_PERIOD="Period"
|
COM_MOKOSUITECROSS_SUBMENU_CALENDAR="Calendar"
|
||||||
COM_MOKOSUITECROSS_ANALYTICS_BEST_TIMES="Best Times to Post"
|
COM_MOKOSUITECROSS_CALENDAR_TODAY="Today"
|
||||||
COM_MOKOSUITECROSS_ANALYTICS_POSTS_COUNT="%d posts"
|
COM_MOKOSUITECROSS_CALENDAR_MONTH="Month"
|
||||||
COM_MOKOSUITECROSS_ANALYTICS_HEATMAP="Posting Heatmap"
|
COM_MOKOSUITECROSS_CALENDAR_WEEK="Week"
|
||||||
COM_MOKOSUITECROSS_ANALYTICS_NO_DATA="No posting data available for the selected period."
|
COM_MOKOSUITECROSS_CALENDAR_LIST="List"
|
||||||
COM_MOKOSUITECROSS_ANALYTICS_LESS="Less"
|
COM_MOKOSUITECROSS_CALENDAR_RESCHEDULE_SUCCESS="Post rescheduled successfully"
|
||||||
COM_MOKOSUITECROSS_ANALYTICS_MORE="More"
|
COM_MOKOSUITECROSS_CALENDAR_RESCHEDULE_ERROR="Failed to reschedule post"
|
||||||
COM_MOKOSUITECROSS_ANALYTICS_SERVICE_BREAKDOWN="Service Breakdown"
|
COM_MOKOSUITECROSS_CALENDAR_CANNOT_RESCHEDULE="Only scheduled or queued posts can be rescheduled"
|
||||||
COM_MOKOSUITECROSS_ANALYTICS_SERVICE="Service"
|
COM_MOKOSUITECROSS_CALENDAR_LOAD_ERROR="Failed to load calendar events"
|
||||||
COM_MOKOSUITECROSS_ANALYTICS_TOTAL="Total"
|
|
||||||
COM_MOKOSUITECROSS_ANALYTICS_SUCCESS="Success"
|
|
||||||
COM_MOKOSUITECROSS_ANALYTICS_FAILED="Failed"
|
|
||||||
COM_MOKOSUITECROSS_ANALYTICS_SUCCESS_RATE="Success Rate"
|
|
||||||
COM_MOKOSUITECROSS_ANALYTICS_AVG_PER_DAY="Avg/Day"
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<extension type="component" method="upgrade">
|
<extension type="component" method="upgrade">
|
||||||
<name>com_mokosuitecross</name>
|
<name>com_mokosuitecross</name>
|
||||||
<version>01.08.56</version>
|
<version>01.13.03</version>
|
||||||
<creationDate>2026-05-28</creationDate>
|
<creationDate>2026-05-28</creationDate>
|
||||||
<author>Moko Consulting</author>
|
<author>Moko Consulting</author>
|
||||||
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
||||||
|
|||||||
@@ -96,6 +96,27 @@ INSERT INTO `#__mokosuitecross_templates` (`service_type`, `title`, `template_bo
|
|||||||
('instagram', 'Instagram Default', '{social}\n\n{hashtags}', 1, 21, NOW()),
|
('instagram', 'Instagram Default', '{social}\n\n{hashtags}', 1, 21, NOW()),
|
||||||
('youtube', 'YouTube Default', '{social}\n\n{url}', 1, 22, 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` (
|
CREATE TABLE IF NOT EXISTS `#__mokosuitecross_category_rules` (
|
||||||
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
||||||
`category_id` int(10) unsigned NOT NULL,
|
`category_id` int(10) unsigned NOT NULL,
|
||||||
|
|||||||
@@ -1 +1,23 @@
|
|||||||
/* 01.08.54 — no schema changes */
|
-- 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;
|
||||||
|
|||||||
@@ -0,0 +1 @@
|
|||||||
|
/* 01.08.57 — no schema changes */
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
/* 01.08.58 — no schema changes */
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
/* 01.08.59 — no schema changes */
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
/* 01.08.61 — no schema changes */
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
/* 01.11.00 — no schema changes */
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
/* 01.11.01 — no schema changes */
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
/* 01.11.02 — no schema changes */
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
/* 01.11.03 — no schema changes */
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
/* 01.12.00 — no schema changes */
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
/* 01.12.01 — no schema changes */
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
/* 01.12.03 — no schema changes */
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
/* 01.12.04 — no schema changes */
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
/* 01.12.05 — no schema changes */
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
/* 01.12.06 — no schema changes */
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
/* 01.13.01 — no schema changes */
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
/* 01.13.02 — no schema changes */
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
/* 01.13.03 — no schema changes */
|
||||||
@@ -19,7 +19,12 @@ use Joomla\Component\MokoSuiteCross\Administrator\Helper\AnalyticsHelper;
|
|||||||
|
|
||||||
class AnalyticsController extends BaseController
|
class AnalyticsController extends BaseController
|
||||||
{
|
{
|
||||||
public function getHeatmapData(): void
|
/**
|
||||||
|
* Return heatmap grid data as JSON.
|
||||||
|
*
|
||||||
|
* Query params: service_type (string), days (int, default 90)
|
||||||
|
*/
|
||||||
|
public function heatmap(): void
|
||||||
{
|
{
|
||||||
if (!Session::checkToken('get')) {
|
if (!Session::checkToken('get')) {
|
||||||
echo json_encode(['success' => false, 'error' => 'Invalid token']);
|
echo json_encode(['success' => false, 'error' => 'Invalid token']);
|
||||||
@@ -28,7 +33,9 @@ class AnalyticsController extends BaseController
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$this->app->getIdentity()->authorise('core.manage', 'com_mokosuitecross')) {
|
$user = $this->app->getIdentity();
|
||||||
|
|
||||||
|
if (!$user->authorise('core.manage', 'com_mokosuitecross')) {
|
||||||
echo json_encode(['success' => false, 'error' => 'Permission denied']);
|
echo json_encode(['success' => false, 'error' => 'Permission denied']);
|
||||||
$this->app->close();
|
$this->app->close();
|
||||||
|
|
||||||
@@ -38,15 +45,53 @@ class AnalyticsController extends BaseController
|
|||||||
$serviceType = $this->input->getCmd('service_type', '');
|
$serviceType = $this->input->getCmd('service_type', '');
|
||||||
$days = $this->input->getInt('days', 90);
|
$days = $this->input->getInt('days', 90);
|
||||||
|
|
||||||
$heatmap = AnalyticsHelper::getPostingHeatmap($serviceType, $days);
|
$grid = AnalyticsHelper::getHeatmapData($serviceType, $days);
|
||||||
$bestTimes = AnalyticsHelper::getBestTimes($serviceType, $days);
|
$bestTimes = AnalyticsHelper::getBestTimes($serviceType, 3);
|
||||||
|
|
||||||
$this->app->setHeader('Content-Type', 'application/json; charset=utf-8');
|
$this->app->setHeader('Content-Type', 'application/json; charset=utf-8');
|
||||||
echo json_encode([
|
echo json_encode([
|
||||||
'success' => true,
|
'success' => true,
|
||||||
'heatmap' => $heatmap,
|
'grid' => $grid,
|
||||||
'best_times' => $bestTimes,
|
'best_times' => $bestTimes,
|
||||||
]);
|
]);
|
||||||
$this->app->close();
|
$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();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,12 +13,256 @@ namespace Joomla\Component\MokoSuiteCross\Administrator\Controller;
|
|||||||
|
|
||||||
defined('_JEXEC') or die;
|
defined('_JEXEC') or die;
|
||||||
|
|
||||||
|
use Joomla\CMS\Factory;
|
||||||
|
use Joomla\CMS\Language\Text;
|
||||||
use Joomla\CMS\MVC\Controller\BaseController;
|
use Joomla\CMS\MVC\Controller\BaseController;
|
||||||
|
use Joomla\CMS\Session\Session;
|
||||||
|
use Joomla\Component\MokoSuiteCross\Administrator\Table\PostTable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Calendar controller -- provides AJAX endpoints for the visual post calendar.
|
||||||
|
*
|
||||||
|
* Endpoints:
|
||||||
|
* task=calendar.events -- GET JSON feed for FullCalendar (filtered by start/end)
|
||||||
|
* task=calendar.reschedule -- POST reschedule a post to a new date/time
|
||||||
|
*/
|
||||||
class CalendarController extends BaseController
|
class CalendarController extends BaseController
|
||||||
{
|
{
|
||||||
public function display($cachable = false, $urlparams = []): static
|
/**
|
||||||
|
* Return posts as FullCalendar-compatible JSON events.
|
||||||
|
*
|
||||||
|
* Query params: start, end (ISO 8601 date range from FullCalendar).
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function events(): void
|
||||||
{
|
{
|
||||||
return parent::display($cachable, $urlparams);
|
$app = $this->app;
|
||||||
|
$db = Factory::getDbo();
|
||||||
|
|
||||||
|
// ACL check
|
||||||
|
if (!$app->getIdentity()->authorise('core.manage', 'com_mokosuitecross')) {
|
||||||
|
$this->sendJsonResponse(['error' => 'Forbidden'], 403);
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// FullCalendar sends start/end as ISO date strings
|
||||||
|
$start = $this->input->getString('start', '');
|
||||||
|
$end = $this->input->getString('end', '');
|
||||||
|
|
||||||
|
$query = $db->getQuery(true)
|
||||||
|
->select([
|
||||||
|
'p.' . $db->quoteName('id'),
|
||||||
|
'p.' . $db->quoteName('article_id'),
|
||||||
|
'p.' . $db->quoteName('service_id'),
|
||||||
|
'p.' . $db->quoteName('status'),
|
||||||
|
'p.' . $db->quoteName('scheduled_at'),
|
||||||
|
'p.' . $db->quoteName('posted_at'),
|
||||||
|
'p.' . $db->quoteName('created'),
|
||||||
|
'p.' . $db->quoteName('message'),
|
||||||
|
'a.' . $db->quoteName('title', 'article_title'),
|
||||||
|
's.' . $db->quoteName('title', 'service_title'),
|
||||||
|
's.' . $db->quoteName('service_type'),
|
||||||
|
])
|
||||||
|
->from($db->quoteName('#__mokosuitecross_posts', 'p'))
|
||||||
|
->leftJoin(
|
||||||
|
$db->quoteName('#__content', 'a')
|
||||||
|
. ' ON ' . $db->quoteName('a.id') . ' = ' . $db->quoteName('p.article_id')
|
||||||
|
)
|
||||||
|
->leftJoin(
|
||||||
|
$db->quoteName('#__mokosuitecross_services', 's')
|
||||||
|
. ' ON ' . $db->quoteName('s.id') . ' = ' . $db->quoteName('p.service_id')
|
||||||
|
)
|
||||||
|
->order($db->quoteName('p.created') . ' DESC');
|
||||||
|
|
||||||
|
// Filter by date range when provided
|
||||||
|
if ($start !== '') {
|
||||||
|
$dateExpr = 'COALESCE(p.scheduled_at, p.posted_at, p.created)';
|
||||||
|
$query->where($dateExpr . ' >= ' . $db->quote($start));
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($end !== '') {
|
||||||
|
$dateExpr = 'COALESCE(p.scheduled_at, p.posted_at, p.created)';
|
||||||
|
$query->where($dateExpr . ' <= ' . $db->quote($end));
|
||||||
|
}
|
||||||
|
|
||||||
|
$db->setQuery($query);
|
||||||
|
$rows = $db->loadObjectList() ?: [];
|
||||||
|
|
||||||
|
// Map status to colour
|
||||||
|
$statusColors = [
|
||||||
|
'posted' => '#28a745',
|
||||||
|
'scheduled' => '#007bff',
|
||||||
|
'queued' => '#ffc107',
|
||||||
|
'failed' => '#dc3545',
|
||||||
|
'posting' => '#17a2b8',
|
||||||
|
];
|
||||||
|
|
||||||
|
$events = [];
|
||||||
|
|
||||||
|
foreach ($rows as $row) {
|
||||||
|
// Pick the best date for the calendar event
|
||||||
|
$eventDate = $row->scheduled_at ?: ($row->posted_at ?: $row->created);
|
||||||
|
|
||||||
|
// Skip rows with no usable date
|
||||||
|
if (empty($eventDate) || $eventDate === '0000-00-00 00:00:00') {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
$title = ($row->article_title ?: 'Post #' . $row->id);
|
||||||
|
|
||||||
|
if ($row->service_title) {
|
||||||
|
$title .= ' - ' . $row->service_title;
|
||||||
|
}
|
||||||
|
|
||||||
|
$events[] = [
|
||||||
|
'id' => (int) $row->id,
|
||||||
|
'title' => $title,
|
||||||
|
'start' => $eventDate,
|
||||||
|
'color' => $statusColors[$row->status] ?? '#6c757d',
|
||||||
|
'url' => 'index.php?option=com_mokosuitecross&task=post.edit&id=' . (int) $row->id,
|
||||||
|
'extendedProps' => [
|
||||||
|
'status' => $row->status,
|
||||||
|
'service_type' => $row->service_type ?? '',
|
||||||
|
'article_id' => (int) $row->article_id,
|
||||||
|
'service_id' => (int) $row->service_id,
|
||||||
|
'message' => mb_substr($row->message ?? '', 0, 200),
|
||||||
|
],
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->sendJsonResponse($events, 200);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reschedule a post to a new date/time via drag-drop.
|
||||||
|
*
|
||||||
|
* POST params: post_id (int), new_date (ISO 8601 datetime string).
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function reschedule(): void
|
||||||
|
{
|
||||||
|
$app = $this->app;
|
||||||
|
|
||||||
|
// CSRF check
|
||||||
|
if (!Session::checkToken('post')) {
|
||||||
|
$this->sendJsonResponse(['error' => Text::_('JINVALID_TOKEN')], 403);
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// ACL check
|
||||||
|
if (!$app->getIdentity()->authorise('core.edit', 'com_mokosuitecross')) {
|
||||||
|
$this->sendJsonResponse(['error' => 'Forbidden'], 403);
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
$postId = $this->input->getInt('post_id', 0);
|
||||||
|
$newDate = $this->input->getString('new_date', '');
|
||||||
|
|
||||||
|
if ($postId < 1 || $newDate === '') {
|
||||||
|
$this->sendJsonResponse(
|
||||||
|
['error' => Text::_('COM_MOKOSUITECROSS_CALENDAR_RESCHEDULE_ERROR')],
|
||||||
|
400
|
||||||
|
);
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Validate the date format
|
||||||
|
try {
|
||||||
|
$dateObj = Factory::getDate($newDate);
|
||||||
|
} catch (\Exception $e) {
|
||||||
|
$this->sendJsonResponse(
|
||||||
|
['error' => Text::_('COM_MOKOSUITECROSS_CALENDAR_RESCHEDULE_ERROR')],
|
||||||
|
400
|
||||||
|
);
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Load the post using Table bind/check/store pattern
|
||||||
|
$db = Factory::getDbo();
|
||||||
|
$table = new PostTable($db);
|
||||||
|
|
||||||
|
if (!$table->load($postId)) {
|
||||||
|
$this->sendJsonResponse(
|
||||||
|
['error' => Text::_('COM_MOKOSUITECROSS_CALENDAR_RESCHEDULE_ERROR')],
|
||||||
|
404
|
||||||
|
);
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Only allow rescheduling of scheduled or queued posts
|
||||||
|
$allowedStatuses = ['scheduled', 'queued'];
|
||||||
|
|
||||||
|
if (!in_array($table->status, $allowedStatuses, true)) {
|
||||||
|
$this->sendJsonResponse(
|
||||||
|
['error' => Text::_('COM_MOKOSUITECROSS_CALENDAR_RESCHEDULE_ERROR')],
|
||||||
|
400
|
||||||
|
);
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Update the post
|
||||||
|
$data = [
|
||||||
|
'scheduled_at' => $dateObj->toSql(),
|
||||||
|
'status' => 'scheduled',
|
||||||
|
'modified' => Factory::getDate()->toSql(),
|
||||||
|
];
|
||||||
|
|
||||||
|
if (!$table->bind($data) || !$table->check() || !$table->store()) {
|
||||||
|
$this->sendJsonResponse(
|
||||||
|
['error' => Text::_('COM_MOKOSUITECROSS_CALENDAR_RESCHEDULE_ERROR')],
|
||||||
|
500
|
||||||
|
);
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Log the reschedule
|
||||||
|
$log = (object) [
|
||||||
|
'post_id' => $postId,
|
||||||
|
'service_id' => (int) $table->service_id,
|
||||||
|
'level' => 'info',
|
||||||
|
'message' => sprintf('Post rescheduled to %s via calendar drag-drop', $dateObj->toSql()),
|
||||||
|
'context' => '{}',
|
||||||
|
'created' => Factory::getDate()->toSql(),
|
||||||
|
];
|
||||||
|
|
||||||
|
$db->insertObject('#__mokosuitecross_logs', $log);
|
||||||
|
|
||||||
|
$this->sendJsonResponse(
|
||||||
|
[
|
||||||
|
'success' => true,
|
||||||
|
'message' => Text::_('COM_MOKOSUITECROSS_CALENDAR_RESCHEDULE_SUCCESS'),
|
||||||
|
],
|
||||||
|
200
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Send a JSON response and close the application.
|
||||||
|
*
|
||||||
|
* @param array $data Response data
|
||||||
|
* @param int $httpCode HTTP status code
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
private function sendJsonResponse(array $data, int $httpCode): void
|
||||||
|
{
|
||||||
|
$app = $this->app;
|
||||||
|
|
||||||
|
$app->setHeader('Content-Type', 'application/json; charset=utf-8');
|
||||||
|
$app->setHeader('Status', (string) $httpCode);
|
||||||
|
|
||||||
|
echo json_encode($data, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES);
|
||||||
|
|
||||||
|
$app->close();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -31,6 +31,17 @@ class PreviewController extends BaseController
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$user = $this->app->getIdentity();
|
||||||
|
|
||||||
|
if (!$user->authorise('core.manage', 'com_mokosuitecross')
|
||||||
|
&& !$user->authorise('core.edit', 'com_content')
|
||||||
|
&& !$user->authorise('core.edit.own', 'com_content')) {
|
||||||
|
echo json_encode(['error' => 'Permission denied']);
|
||||||
|
$this->app->close();
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
$articleId = $this->input->getInt('article_id', 0);
|
$articleId = $this->input->getInt('article_id', 0);
|
||||||
$platform = $this->input->getCmd('platform', 'twitter');
|
$platform = $this->input->getCmd('platform', 'twitter');
|
||||||
|
|
||||||
@@ -43,10 +54,14 @@ class PreviewController extends BaseController
|
|||||||
|
|
||||||
$db = Factory::getDbo();
|
$db = Factory::getDbo();
|
||||||
|
|
||||||
|
$groups = $user->getAuthorisedViewLevels();
|
||||||
|
|
||||||
$query = $db->getQuery(true)
|
$query = $db->getQuery(true)
|
||||||
->select('*')
|
->select('*')
|
||||||
->from($db->quoteName('#__content'))
|
->from($db->quoteName('#__content'))
|
||||||
->where($db->quoteName('id') . ' = ' . $articleId);
|
->where($db->quoteName('id') . ' = :id')
|
||||||
|
->where($db->quoteName('access') . ' IN (' . implode(',', array_map('intval', $groups)) . ')')
|
||||||
|
->bind(':id', $articleId, \Joomla\Database\ParameterType::INTEGER);
|
||||||
$db->setQuery($query);
|
$db->setQuery($query);
|
||||||
$article = $db->loadObject();
|
$article = $db->loadObject();
|
||||||
|
|
||||||
|
|||||||
@@ -17,7 +17,6 @@ use Joomla\CMS\Component\ComponentHelper;
|
|||||||
use Joomla\CMS\Factory;
|
use Joomla\CMS\Factory;
|
||||||
use Joomla\CMS\MVC\Controller\BaseController;
|
use Joomla\CMS\MVC\Controller\BaseController;
|
||||||
use Joomla\CMS\Session\Session;
|
use Joomla\CMS\Session\Session;
|
||||||
use Joomla\CMS\Uri\Uri;
|
|
||||||
use Joomla\Component\MokoSuiteCross\Administrator\Helper\SocialImageHelper;
|
use Joomla\Component\MokoSuiteCross\Administrator\Helper\SocialImageHelper;
|
||||||
|
|
||||||
class SocialImageController extends BaseController
|
class SocialImageController extends BaseController
|
||||||
@@ -33,7 +32,7 @@ class SocialImageController extends BaseController
|
|||||||
|
|
||||||
$user = $this->app->getIdentity();
|
$user = $this->app->getIdentity();
|
||||||
|
|
||||||
if (!$user->authorise('core.manage', 'com_mokosuitecross')) {
|
if (!$user->authorise('core.edit', 'com_mokosuitecross')) {
|
||||||
echo json_encode(['success' => false, 'error' => 'Permission denied']);
|
echo json_encode(['success' => false, 'error' => 'Permission denied']);
|
||||||
$this->app->close();
|
$this->app->close();
|
||||||
|
|
||||||
@@ -49,47 +48,40 @@ class SocialImageController extends BaseController
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$params = ComponentHelper::getParams('com_mokosuitecross');
|
||||||
|
|
||||||
|
if (!(int) $params->get('social_image_enabled', 0)) {
|
||||||
|
echo json_encode(['success' => false, 'error' => 'Social image generator is not enabled']);
|
||||||
|
$this->app->close();
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
$db = Factory::getDbo();
|
$db = Factory::getDbo();
|
||||||
$query = $db->getQuery(true)
|
$query = $db->getQuery(true)
|
||||||
->select($db->quoteName(['id', 'title', 'images']))
|
->select($db->quoteName('title'))
|
||||||
->from($db->quoteName('#__content'))
|
->from($db->quoteName('#__content'))
|
||||||
->where($db->quoteName('id') . ' = ' . $articleId);
|
->where($db->quoteName('id') . ' = ' . $articleId);
|
||||||
$db->setQuery($query);
|
$db->setQuery($query);
|
||||||
$article = $db->loadObject();
|
$title = $db->loadResult();
|
||||||
|
|
||||||
if (!$article) {
|
if (!$title) {
|
||||||
echo json_encode(['success' => false, 'error' => 'Article not found']);
|
echo json_encode(['success' => false, 'error' => 'Article not found']);
|
||||||
$this->app->close();
|
$this->app->close();
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$params = ComponentHelper::getParams('com_mokosuitecross');
|
$siteName = $this->app->get('sitename', '');
|
||||||
$siteName = $params->get('social_image_site_name', '') ?: Factory::getApplication()->get('sitename', '');
|
|
||||||
|
|
||||||
$options = [
|
$config = [
|
||||||
'bg_color' => $params->get('social_image_bg_color', '#1a1a2e'),
|
'bg_color' => $params->get('social_image_bg_color', '#1a1a2e'),
|
||||||
'text_color' => $params->get('social_image_text_color', '#ffffff'),
|
'text_color' => $params->get('social_image_text_color', '#ffffff'),
|
||||||
'overlay' => $params->get('social_image_overlay', 'dark'),
|
'font_size' => $params->get('social_image_font_size', 48),
|
||||||
|
'show_site_name' => (bool) $params->get('social_image_show_site_name', 1),
|
||||||
];
|
];
|
||||||
|
|
||||||
$backgroundPath = null;
|
$result = SocialImageHelper::generate($title, $siteName, $config);
|
||||||
$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');
|
$this->app->setHeader('Content-Type', 'application/json; charset=utf-8');
|
||||||
echo json_encode($result);
|
echo json_encode($result);
|
||||||
|
|||||||
@@ -17,144 +17,236 @@ use Joomla\CMS\Factory;
|
|||||||
|
|
||||||
class AnalyticsHelper
|
class AnalyticsHelper
|
||||||
{
|
{
|
||||||
private static array $dayNames = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'];
|
/**
|
||||||
|
* 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();
|
||||||
|
|
||||||
public static function getPostingHeatmap(string $serviceType = '', int $days = 90): array
|
$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();
|
$db = Factory::getDbo();
|
||||||
|
|
||||||
$query = $db->getQuery(true)
|
$query = $db->getQuery(true)
|
||||||
->select('DAYOFWEEK(' . $db->quoteName('p.posted_at') . ') - 1 AS dow')
|
->select([
|
||||||
->select('HOUR(' . $db->quoteName('p.posted_at') . ') AS hr')
|
$db->quoteName('day_of_week'),
|
||||||
->select('COUNT(*) AS cnt')
|
$db->quoteName('hour_of_day'),
|
||||||
->from($db->quoteName('#__mokosuitecross_posts', 'p'))
|
'AVG(' . $db->quoteName('engagement_rate') . ') AS avg_rate',
|
||||||
->where($db->quoteName('p.status') . ' = ' . $db->quote('posted'))
|
'COUNT(*) AS post_count',
|
||||||
->where($db->quoteName('p.posted_at') . ' IS NOT NULL');
|
])
|
||||||
|
->from($db->quoteName('#__mokosuitecross_analytics'))
|
||||||
if ($days > 0) {
|
->group($db->quoteName('day_of_week'))
|
||||||
$since = Factory::getDate('now - ' . $days . ' days')->toSql();
|
->group($db->quoteName('hour_of_day'))
|
||||||
$query->where($db->quoteName('p.posted_at') . ' >= ' . $db->quote($since));
|
->order($db->quoteName('day_of_week') . ' ASC')
|
||||||
}
|
->order($db->quoteName('hour_of_day') . ' ASC');
|
||||||
|
|
||||||
if ($serviceType !== '') {
|
if ($serviceType !== '') {
|
||||||
$query->join('INNER', $db->quoteName('#__mokosuitecross_services', 's') . ' ON ' . $db->quoteName('s.id') . ' = ' . $db->quoteName('p.service_id'))
|
$query->where($db->quoteName('service_type') . ' = ' . $db->quote($serviceType));
|
||||||
->where($db->quoteName('s.service_type') . ' = ' . $db->quote($serviceType));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$query->group('dow, hr')
|
if ($days > 0) {
|
||||||
->order('dow ASC, hr ASC');
|
$cutoff = Factory::getDate('-' . $days . ' days')->toSql();
|
||||||
|
$query->where($db->quoteName('posted_at') . ' >= ' . $db->quote($cutoff));
|
||||||
|
}
|
||||||
|
|
||||||
$db->setQuery($query);
|
$db->setQuery($query);
|
||||||
$rows = $db->loadObjectList();
|
$rows = $db->loadObjectList();
|
||||||
|
|
||||||
|
// Build 7x24 grid initialised to zero
|
||||||
$grid = [];
|
$grid = [];
|
||||||
|
|
||||||
for ($d = 0; $d < 7; $d++) {
|
for ($d = 0; $d < 7; $d++) {
|
||||||
$grid[$d] = array_fill(0, 24, 0);
|
for ($h = 0; $h < 24; $h++) {
|
||||||
|
$grid[$d][$h] = ['avg_rate' => 0.00, 'post_count' => 0];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach ($rows as $row) {
|
foreach ($rows as $row) {
|
||||||
$grid[(int) $row->dow][(int) $row->hr] = (int) $row->cnt;
|
$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;
|
return $grid;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function getBestTimes(string $serviceType = '', int $days = 90, int $limit = 5): array
|
/**
|
||||||
|
* 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
|
||||||
{
|
{
|
||||||
$grid = self::getPostingHeatmap($serviceType, $days);
|
$db = Factory::getDbo();
|
||||||
$slots = [];
|
|
||||||
|
|
||||||
foreach ($grid as $dow => $hours) {
|
$query = $db->getQuery(true)
|
||||||
foreach ($hours as $hour => $count) {
|
->select([
|
||||||
if ($count > 0) {
|
$db->quoteName('day_of_week'),
|
||||||
$slots[] = [
|
$db->quoteName('hour_of_day'),
|
||||||
'day' => self::$dayNames[$dow],
|
'AVG(' . $db->quoteName('engagement_rate') . ') AS avg_rate',
|
||||||
'hour' => $hour,
|
'COUNT(*) AS post_count',
|
||||||
'count' => $count,
|
])
|
||||||
'label' => self::$dayNames[$dow] . ' ' . self::formatHour($hour),
|
->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));
|
||||||
}
|
}
|
||||||
|
|
||||||
usort($slots, static fn($a, $b) => $b['count'] <=> $a['count']);
|
$db->setQuery($query, 0, $limit);
|
||||||
|
$rows = $db->loadAssocList();
|
||||||
|
|
||||||
return \array_slice($slots, 0, $limit);
|
$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
|
public static function getServiceBreakdown(int $days = 30): array
|
||||||
{
|
{
|
||||||
$db = Factory::getDbo();
|
$db = Factory::getDbo();
|
||||||
|
|
||||||
$query = $db->getQuery(true)
|
$query = $db->getQuery(true)
|
||||||
->select($db->quoteName('s.service_type'))
|
->select([
|
||||||
->select($db->quoteName('s.title', 'service_title'))
|
$db->quoteName('service_type'),
|
||||||
->select('COUNT(*) AS total')
|
'COUNT(*) AS total_posts',
|
||||||
->select('SUM(CASE WHEN ' . $db->quoteName('p.status') . ' = ' . $db->quote('posted') . ' THEN 1 ELSE 0 END) AS success')
|
'AVG(' . $db->quoteName('engagement_rate') . ') AS avg_engagement_rate',
|
||||||
->select('SUM(CASE WHEN ' . $db->quoteName('p.status') . ' = ' . $db->quote('failed') . ' THEN 1 ELSE 0 END) AS failed')
|
'SUM(' . $db->quoteName('impressions') . ') AS total_impressions',
|
||||||
->from($db->quoteName('#__mokosuitecross_posts', 'p'))
|
'SUM(' . $db->quoteName('engagements') . ') AS total_engagements',
|
||||||
->join('INNER', $db->quoteName('#__mokosuitecross_services', 's') . ' ON ' . $db->quoteName('s.id') . ' = ' . $db->quoteName('p.service_id'));
|
'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) {
|
if ($days > 0) {
|
||||||
$since = Factory::getDate('now - ' . $days . ' days')->toSql();
|
$cutoff = Factory::getDate('-' . $days . ' days')->toSql();
|
||||||
$query->where($db->quoteName('p.created') . ' >= ' . $db->quote($since));
|
$query->where($db->quoteName('posted_at') . ' >= ' . $db->quote($cutoff));
|
||||||
}
|
}
|
||||||
|
|
||||||
$query->group($db->quoteName(['s.service_type', 's.title']))
|
|
||||||
->order('total DESC');
|
|
||||||
|
|
||||||
$db->setQuery($query);
|
$db->setQuery($query);
|
||||||
$rows = $db->loadObjectList();
|
$rows = $db->loadAssocList();
|
||||||
|
|
||||||
$result = [];
|
foreach ($rows as &$row) {
|
||||||
|
$row['avg_engagement_rate'] = round((float) $row['avg_engagement_rate'], 2);
|
||||||
foreach ($rows as $row) {
|
$row['total_posts'] = (int) $row['total_posts'];
|
||||||
$total = (int) $row->total;
|
$row['total_impressions'] = (int) $row['total_impressions'];
|
||||||
$success = (int) $row->success;
|
$row['total_engagements'] = (int) $row['total_engagements'];
|
||||||
$result[] = [
|
$row['total_clicks'] = (int) $row['total_clicks'];
|
||||||
'service_type' => $row->service_type,
|
$row['total_shares'] = (int) $row['total_shares'];
|
||||||
'service_title' => $row->service_title,
|
|
||||||
'total' => $total,
|
|
||||||
'success' => $success,
|
|
||||||
'failed' => (int) $row->failed,
|
|
||||||
'success_rate' => $total > 0 ? round(($success / $total) * 100, 1) : 0.0,
|
|
||||||
'avg_per_day' => $days > 0 ? round($total / $days, 1) : 0.0,
|
|
||||||
];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return $result;
|
return $rows;
|
||||||
}
|
|
||||||
|
|
||||||
public static function getServiceTypes(): array
|
|
||||||
{
|
|
||||||
$db = Factory::getDbo();
|
|
||||||
|
|
||||||
$query = $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($query);
|
|
||||||
|
|
||||||
return $db->loadColumn() ?: [];
|
|
||||||
}
|
|
||||||
|
|
||||||
private static function formatHour(int $hour): string
|
|
||||||
{
|
|
||||||
if ($hour === 0) {
|
|
||||||
return '12:00 AM';
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($hour < 12) {
|
|
||||||
return $hour . ':00 AM';
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($hour === 12) {
|
|
||||||
return '12:00 PM';
|
|
||||||
}
|
|
||||||
|
|
||||||
return ($hour - 12) . ':00 PM';
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -40,7 +40,10 @@ class MokoSuiteCrossHelper
|
|||||||
'posts' => 'COM_MOKOSUITECROSS_SUBMENU_POSTS',
|
'posts' => 'COM_MOKOSUITECROSS_SUBMENU_POSTS',
|
||||||
'services' => 'COM_MOKOSUITECROSS_SUBMENU_SERVICES',
|
'services' => 'COM_MOKOSUITECROSS_SUBMENU_SERVICES',
|
||||||
'templates' => 'COM_MOKOSUITECROSS_SUBMENU_TEMPLATES',
|
'templates' => 'COM_MOKOSUITECROSS_SUBMENU_TEMPLATES',
|
||||||
|
'calendar' => 'COM_MOKOSUITECROSS_SUBMENU_CALENDAR',
|
||||||
'logs' => 'COM_MOKOSUITECROSS_SUBMENU_LOGS',
|
'logs' => 'COM_MOKOSUITECROSS_SUBMENU_LOGS',
|
||||||
|
'calendar' => 'COM_MOKOSUITECROSS_SUBMENU_CALENDAR',
|
||||||
|
'analytics' => 'COM_MOKOSUITECROSS_SUBMENU_ANALYTICS',
|
||||||
];
|
];
|
||||||
|
|
||||||
// Joomla 5+ toolbar submenu
|
// Joomla 5+ toolbar submenu
|
||||||
|
|||||||
@@ -0,0 +1,169 @@
|
|||||||
|
<?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\Model;
|
||||||
|
|
||||||
|
defined('_JEXEC') or die;
|
||||||
|
|
||||||
|
use Joomla\CMS\Factory;
|
||||||
|
use Joomla\CMS\MVC\Model\BaseDatabaseModel;
|
||||||
|
|
||||||
|
class AnalyticsModel extends BaseDatabaseModel
|
||||||
|
{
|
||||||
|
public function getHeatmap(int $days = 90, ?int $serviceId = null): array
|
||||||
|
{
|
||||||
|
$db = $this->getDatabase();
|
||||||
|
|
||||||
|
$cutoff = Factory::getDate('now - ' . $days . ' days')->format('Y-m-d H:i:s');
|
||||||
|
|
||||||
|
$query = $db->getQuery(true)
|
||||||
|
->select([
|
||||||
|
'DAYOFWEEK(' . $db->quoteName('posted_at') . ') AS dow',
|
||||||
|
'HOUR(' . $db->quoteName('posted_at') . ') AS hour_of_day',
|
||||||
|
'COUNT(*) AS total',
|
||||||
|
'SUM(CASE WHEN ' . $db->quoteName('status') . ' = ' . $db->quote('posted') . ' THEN 1 ELSE 0 END) AS success',
|
||||||
|
])
|
||||||
|
->from($db->quoteName('#__mokosuitecross_posts'))
|
||||||
|
->where($db->quoteName('posted_at') . ' IS NOT NULL')
|
||||||
|
->where($db->quoteName('posted_at') . ' >= ' . $db->quote($cutoff))
|
||||||
|
->group('DAYOFWEEK(' . $db->quoteName('posted_at') . '), HOUR(' . $db->quoteName('posted_at') . ')')
|
||||||
|
->order('dow ASC, hour_of_day ASC');
|
||||||
|
|
||||||
|
if ($serviceId !== null && $serviceId > 0) {
|
||||||
|
$query->where($db->quoteName('service_id') . ' = ' . (int) $serviceId);
|
||||||
|
}
|
||||||
|
|
||||||
|
$db->setQuery($query);
|
||||||
|
$rows = $db->loadAssocList() ?: [];
|
||||||
|
|
||||||
|
$grid = [];
|
||||||
|
|
||||||
|
for ($d = 1; $d <= 7; $d++) {
|
||||||
|
for ($h = 0; $h < 24; $h++) {
|
||||||
|
$grid[$d][$h] = ['total' => 0, 'success' => 0, 'rate' => 0];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach ($rows as $row) {
|
||||||
|
$d = (int) $row['dow'];
|
||||||
|
$h = (int) $row['hour_of_day'];
|
||||||
|
$grid[$d][$h] = [
|
||||||
|
'total' => (int) $row['total'],
|
||||||
|
'success' => (int) $row['success'],
|
||||||
|
'rate' => (int) $row['total'] > 0
|
||||||
|
? round(((int) $row['success'] / (int) $row['total']) * 100)
|
||||||
|
: 0,
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
return $grid;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getBestTimes(int $days = 90, ?int $serviceId = null, int $limit = 5): array
|
||||||
|
{
|
||||||
|
$db = $this->getDatabase();
|
||||||
|
|
||||||
|
$cutoff = Factory::getDate('now - ' . $days . ' days')->format('Y-m-d H:i:s');
|
||||||
|
|
||||||
|
$query = $db->getQuery(true)
|
||||||
|
->select([
|
||||||
|
'DAYOFWEEK(' . $db->quoteName('posted_at') . ') AS dow',
|
||||||
|
'HOUR(' . $db->quoteName('posted_at') . ') AS hour_of_day',
|
||||||
|
'COUNT(*) AS total',
|
||||||
|
'SUM(CASE WHEN ' . $db->quoteName('status') . ' = ' . $db->quote('posted') . ' THEN 1 ELSE 0 END) AS success',
|
||||||
|
])
|
||||||
|
->from($db->quoteName('#__mokosuitecross_posts'))
|
||||||
|
->where($db->quoteName('posted_at') . ' IS NOT NULL')
|
||||||
|
->where($db->quoteName('posted_at') . ' >= ' . $db->quote($cutoff))
|
||||||
|
->group('DAYOFWEEK(' . $db->quoteName('posted_at') . '), HOUR(' . $db->quoteName('posted_at') . ')')
|
||||||
|
->having('COUNT(*) >= 3')
|
||||||
|
->order('success DESC, total DESC');
|
||||||
|
|
||||||
|
if ($serviceId !== null && $serviceId > 0) {
|
||||||
|
$query->where($db->quoteName('service_id') . ' = ' . (int) $serviceId);
|
||||||
|
}
|
||||||
|
|
||||||
|
$db->setQuery($query, 0, $limit);
|
||||||
|
|
||||||
|
return $db->loadAssocList() ?: [];
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getHourlyDistribution(int $days = 90, ?int $serviceId = null): array
|
||||||
|
{
|
||||||
|
$db = $this->getDatabase();
|
||||||
|
|
||||||
|
$cutoff = Factory::getDate('now - ' . $days . ' days')->format('Y-m-d H:i:s');
|
||||||
|
|
||||||
|
$query = $db->getQuery(true)
|
||||||
|
->select([
|
||||||
|
'HOUR(' . $db->quoteName('posted_at') . ') AS hour_of_day',
|
||||||
|
'COUNT(*) AS total',
|
||||||
|
'SUM(CASE WHEN ' . $db->quoteName('status') . ' = ' . $db->quote('posted') . ' THEN 1 ELSE 0 END) AS success',
|
||||||
|
'SUM(CASE WHEN ' . $db->quoteName('status') . ' = ' . $db->quote('failed') . ' THEN 1 ELSE 0 END) AS failed',
|
||||||
|
])
|
||||||
|
->from($db->quoteName('#__mokosuitecross_posts'))
|
||||||
|
->where($db->quoteName('posted_at') . ' IS NOT NULL')
|
||||||
|
->where($db->quoteName('posted_at') . ' >= ' . $db->quote($cutoff))
|
||||||
|
->group('HOUR(' . $db->quoteName('posted_at') . ')')
|
||||||
|
->order('hour_of_day ASC');
|
||||||
|
|
||||||
|
if ($serviceId !== null && $serviceId > 0) {
|
||||||
|
$query->where($db->quoteName('service_id') . ' = ' . (int) $serviceId);
|
||||||
|
}
|
||||||
|
|
||||||
|
$db->setQuery($query);
|
||||||
|
|
||||||
|
return $db->loadAssocList() ?: [];
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getDayOfWeekDistribution(int $days = 90, ?int $serviceId = null): array
|
||||||
|
{
|
||||||
|
$db = $this->getDatabase();
|
||||||
|
|
||||||
|
$cutoff = Factory::getDate('now - ' . $days . ' days')->format('Y-m-d H:i:s');
|
||||||
|
|
||||||
|
$query = $db->getQuery(true)
|
||||||
|
->select([
|
||||||
|
'DAYOFWEEK(' . $db->quoteName('posted_at') . ') AS dow',
|
||||||
|
'COUNT(*) AS total',
|
||||||
|
'SUM(CASE WHEN ' . $db->quoteName('status') . ' = ' . $db->quote('posted') . ' THEN 1 ELSE 0 END) AS success',
|
||||||
|
'SUM(CASE WHEN ' . $db->quoteName('status') . ' = ' . $db->quote('failed') . ' THEN 1 ELSE 0 END) AS failed',
|
||||||
|
])
|
||||||
|
->from($db->quoteName('#__mokosuitecross_posts'))
|
||||||
|
->where($db->quoteName('posted_at') . ' IS NOT NULL')
|
||||||
|
->where($db->quoteName('posted_at') . ' >= ' . $db->quote($cutoff))
|
||||||
|
->group('DAYOFWEEK(' . $db->quoteName('posted_at') . ')')
|
||||||
|
->order('dow ASC');
|
||||||
|
|
||||||
|
if ($serviceId !== null && $serviceId > 0) {
|
||||||
|
$query->where($db->quoteName('service_id') . ' = ' . (int) $serviceId);
|
||||||
|
}
|
||||||
|
|
||||||
|
$db->setQuery($query);
|
||||||
|
|
||||||
|
return $db->loadAssocList() ?: [];
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getServices(): array
|
||||||
|
{
|
||||||
|
$db = $this->getDatabase();
|
||||||
|
|
||||||
|
$query = $db->getQuery(true)
|
||||||
|
->select([$db->quoteName('id'), $db->quoteName('title'), $db->quoteName('service_type')])
|
||||||
|
->from($db->quoteName('#__mokosuitecross_services'))
|
||||||
|
->where($db->quoteName('published') . ' = 1')
|
||||||
|
->order($db->quoteName('title') . ' ASC');
|
||||||
|
|
||||||
|
$db->setQuery($query);
|
||||||
|
|
||||||
|
return $db->loadAssocList() ?: [];
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -15,31 +15,41 @@ defined('_JEXEC') or die;
|
|||||||
|
|
||||||
use Joomla\CMS\Factory;
|
use Joomla\CMS\Factory;
|
||||||
use Joomla\CMS\MVC\View\HtmlView as BaseHtmlView;
|
use Joomla\CMS\MVC\View\HtmlView as BaseHtmlView;
|
||||||
use Joomla\CMS\Router\Route;
|
|
||||||
use Joomla\CMS\Toolbar\Toolbar;
|
|
||||||
use Joomla\CMS\Toolbar\ToolbarHelper;
|
use Joomla\CMS\Toolbar\ToolbarHelper;
|
||||||
use Joomla\Component\MokoSuiteCross\Administrator\Helper\AnalyticsHelper;
|
|
||||||
use Joomla\Component\MokoSuiteCross\Administrator\Helper\MokoSuiteCrossHelper;
|
use Joomla\Component\MokoSuiteCross\Administrator\Helper\MokoSuiteCrossHelper;
|
||||||
|
|
||||||
class HtmlView extends BaseHtmlView
|
class HtmlView extends BaseHtmlView
|
||||||
{
|
{
|
||||||
public array $heatmap = [];
|
public $heatmap;
|
||||||
public array $bestTimes = [];
|
public $bestTimes;
|
||||||
public array $serviceBreakdown = [];
|
public $hourlyDistribution;
|
||||||
public array $serviceTypes = [];
|
public $dayDistribution;
|
||||||
public string $serviceFilter = '';
|
public $services;
|
||||||
public int $days = 90;
|
public $serviceId;
|
||||||
|
public $period;
|
||||||
|
|
||||||
public function display($tpl = null): void
|
public function display($tpl = null): void
|
||||||
{
|
{
|
||||||
$input = Factory::getApplication()->input;
|
/** @var \Joomla\Component\MokoSuiteCross\Administrator\Model\AnalyticsModel $model */
|
||||||
|
$model = $this->getModel();
|
||||||
|
|
||||||
$this->serviceFilter = $input->getCmd('service_type', '');
|
$input = Factory::getApplication()->input;
|
||||||
$this->days = $input->getInt('days', 90);
|
$this->period = $input->getInt('period', 90);
|
||||||
$this->heatmap = AnalyticsHelper::getPostingHeatmap($this->serviceFilter, $this->days);
|
$this->serviceId = $input->getInt('service_id', 0);
|
||||||
$this->bestTimes = AnalyticsHelper::getBestTimes($this->serviceFilter, $this->days);
|
|
||||||
$this->serviceBreakdown = AnalyticsHelper::getServiceBreakdown($this->days);
|
$validPeriods = [7, 30, 90, 180, 365];
|
||||||
$this->serviceTypes = AnalyticsHelper::getServiceTypes();
|
|
||||||
|
if (!\in_array($this->period, $validPeriods, true)) {
|
||||||
|
$this->period = 90;
|
||||||
|
}
|
||||||
|
|
||||||
|
$sid = $this->serviceId > 0 ? $this->serviceId : null;
|
||||||
|
|
||||||
|
$this->heatmap = $model->getHeatmap($this->period, $sid);
|
||||||
|
$this->bestTimes = $model->getBestTimes($this->period, $sid);
|
||||||
|
$this->hourlyDistribution = $model->getHourlyDistribution($this->period, $sid);
|
||||||
|
$this->dayDistribution = $model->getDayOfWeekDistribution($this->period, $sid);
|
||||||
|
$this->services = $model->getServices();
|
||||||
|
|
||||||
$this->addToolbar();
|
$this->addToolbar();
|
||||||
|
|
||||||
@@ -50,14 +60,6 @@ class HtmlView extends BaseHtmlView
|
|||||||
|
|
||||||
protected function addToolbar(): void
|
protected function addToolbar(): void
|
||||||
{
|
{
|
||||||
ToolbarHelper::title('MokoSuiteCross -- Posting Analytics', 'chart');
|
ToolbarHelper::title('MokoSuiteCross -- Analytics', 'chart');
|
||||||
|
|
||||||
$toolbar = Toolbar::getInstance('toolbar');
|
|
||||||
$toolbar->appendButton(
|
|
||||||
'Link',
|
|
||||||
'home',
|
|
||||||
'COM_MOKOSUITECROSS_SUBMENU_DASHBOARD',
|
|
||||||
Route::_('index.php?option=com_mokosuitecross&view=dashboard', false)
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,52 +14,48 @@ namespace Joomla\Component\MokoSuiteCross\Administrator\View\Calendar;
|
|||||||
defined('_JEXEC') or die;
|
defined('_JEXEC') or die;
|
||||||
|
|
||||||
use Joomla\CMS\Factory;
|
use Joomla\CMS\Factory;
|
||||||
|
use Joomla\CMS\Language\Text;
|
||||||
use Joomla\CMS\MVC\View\HtmlView as BaseHtmlView;
|
use Joomla\CMS\MVC\View\HtmlView as BaseHtmlView;
|
||||||
|
use Joomla\CMS\Router\Route;
|
||||||
use Joomla\CMS\Toolbar\ToolbarHelper;
|
use Joomla\CMS\Toolbar\ToolbarHelper;
|
||||||
use Joomla\Component\MokoSuiteCross\Administrator\Helper\MokoSuiteCrossHelper;
|
use Joomla\Component\MokoSuiteCross\Administrator\Helper\MokoSuiteCrossHelper;
|
||||||
|
|
||||||
class HtmlView extends BaseHtmlView
|
class HtmlView extends BaseHtmlView
|
||||||
{
|
{
|
||||||
public int $year;
|
|
||||||
public int $month;
|
|
||||||
public array $events;
|
|
||||||
public $sidebar;
|
public $sidebar;
|
||||||
|
public $ajaxUrl;
|
||||||
|
|
||||||
public function display($tpl = null): void
|
public function display($tpl = null): void
|
||||||
{
|
{
|
||||||
$input = Factory::getApplication()->input;
|
// ACL check
|
||||||
|
$canDo = MokoSuiteCrossHelper::getActions();
|
||||||
|
|
||||||
$this->year = $input->getInt('year', (int) date('Y'));
|
if (!$canDo->get('core.manage')) {
|
||||||
$this->month = $input->getInt('month', (int) date('n'));
|
throw new \RuntimeException(Text::_('JERROR_ALERTNOAUTHOR'), 403);
|
||||||
|
|
||||||
if ($this->month < 1 || $this->month > 12) {
|
|
||||||
$this->month = (int) date('n');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($this->year < 2000 || $this->year > 2100) {
|
// Build AJAX URL for FullCalendar event source
|
||||||
$this->year = (int) date('Y');
|
$this->ajaxUrl = Route::_('index.php?option=com_mokosuitecross&task=calendar.events&format=json', false);
|
||||||
}
|
|
||||||
|
|
||||||
$model = $this->getModel();
|
|
||||||
$this->events = $model->getEvents($this->year, $this->month);
|
|
||||||
|
|
||||||
$this->addToolbar();
|
$this->addToolbar();
|
||||||
|
|
||||||
MokoSuiteCrossHelper::addSubmenu('calendar');
|
MokoSuiteCrossHelper::addSubmenu('calendar');
|
||||||
$this->sidebar = \Joomla\CMS\HTML\Sidebar::render();
|
$this->sidebar = \Joomla\CMS\HTML\Sidebar::render();
|
||||||
|
|
||||||
|
// Set document title
|
||||||
|
Factory::getApplication()->getDocument()->setTitle(
|
||||||
|
Text::_('COM_MOKOSUITECROSS_CALENDAR') . ' - ' . Text::_('COM_MOKOSUITECROSS')
|
||||||
|
);
|
||||||
|
|
||||||
parent::display($tpl);
|
parent::display($tpl);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function addToolbar(): void
|
protected function addToolbar(): void
|
||||||
{
|
{
|
||||||
$canDo = MokoSuiteCrossHelper::getActions();
|
ToolbarHelper::title(
|
||||||
|
Text::_('COM_MOKOSUITECROSS') . ' - ' . Text::_('COM_MOKOSUITECROSS_CALENDAR'),
|
||||||
ToolbarHelper::title('MokoSuiteCross -- Post Calendar', 'calendar');
|
'calendar'
|
||||||
ToolbarHelper::back('JTOOLBAR_BACK', 'index.php?option=com_mokosuitecross&view=dashboard');
|
);
|
||||||
|
ToolbarHelper::back('JTOOLBAR_BACK', Route::_('index.php?option=com_mokosuitecross&view=dashboard', false));
|
||||||
if ($canDo->get('core.admin')) {
|
|
||||||
ToolbarHelper::preferences('com_mokosuitecross');
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -100,6 +100,7 @@ $dayNames = [
|
|||||||
<tbody>
|
<tbody>
|
||||||
<?php
|
<?php
|
||||||
$maxTotal = 1;
|
$maxTotal = 1;
|
||||||
|
|
||||||
foreach ($this->heatmap as $dayData) {
|
foreach ($this->heatmap as $dayData) {
|
||||||
foreach ($dayData as $cell) {
|
foreach ($dayData as $cell) {
|
||||||
if ($cell['total'] > $maxTotal) {
|
if ($cell['total'] > $maxTotal) {
|
||||||
@@ -113,10 +114,13 @@ $dayNames = [
|
|||||||
<th class="text-nowrap small"><?php echo $dayNames[$dow]; ?></th>
|
<th class="text-nowrap small"><?php echo $dayNames[$dow]; ?></th>
|
||||||
<?php foreach ($hours as $hour => $cell) :
|
<?php foreach ($hours as $hour => $cell) :
|
||||||
$intensity = $maxTotal > 0 ? $cell['total'] / $maxTotal : 0;
|
$intensity = $maxTotal > 0 ? $cell['total'] / $maxTotal : 0;
|
||||||
$r = $g = $b = 255;
|
$r = 255;
|
||||||
|
$g = 255;
|
||||||
|
$b = 255;
|
||||||
|
|
||||||
if ($cell['total'] > 0) {
|
if ($cell['total'] > 0) {
|
||||||
$rate = $cell['rate'];
|
$rate = $cell['rate'];
|
||||||
|
|
||||||
if ($rate >= 80) {
|
if ($rate >= 80) {
|
||||||
$r = (int) (255 - (155 * $intensity));
|
$r = (int) (255 - (155 * $intensity));
|
||||||
$g = (int) (255 - (100 * $intensity));
|
$g = (int) (255 - (100 * $intensity));
|
||||||
@@ -179,7 +183,10 @@ $dayNames = [
|
|||||||
<script>
|
<script>
|
||||||
document.addEventListener('DOMContentLoaded', function() {
|
document.addEventListener('DOMContentLoaded', function() {
|
||||||
var hourlyData = <?php echo json_encode(array_values($this->hourlyDistribution)); ?>;
|
var hourlyData = <?php echo json_encode(array_values($this->hourlyDistribution)); ?>;
|
||||||
var hourLabels = [], hourSuccess = [], hourFailed = [];
|
var hourLabels = [];
|
||||||
|
var hourSuccess = [];
|
||||||
|
var hourFailed = [];
|
||||||
|
|
||||||
for (var h = 0; h < 24; h++) {
|
for (var h = 0; h < 24; h++) {
|
||||||
hourLabels.push(('0' + h).slice(-2) + ':00');
|
hourLabels.push(('0' + h).slice(-2) + ':00');
|
||||||
var found = hourlyData.find(function(d) { return parseInt(d.hour_of_day, 10) === h; });
|
var found = hourlyData.find(function(d) { return parseInt(d.hour_of_day, 10) === h; });
|
||||||
@@ -192,8 +199,8 @@ document.addEventListener('DOMContentLoaded', function() {
|
|||||||
data: {
|
data: {
|
||||||
labels: hourLabels,
|
labels: hourLabels,
|
||||||
datasets: [
|
datasets: [
|
||||||
{ label: '<?php echo Text::_("COM_MOKOSUITECROSS_DASHBOARD_POSTED", true); ?>', data: hourSuccess, backgroundColor: 'rgba(25,135,84,0.7)' },
|
{ label: '<?php echo Text::_('COM_MOKOSUITECROSS_DASHBOARD_POSTED', true); ?>', data: hourSuccess, backgroundColor: 'rgba(25,135,84,0.7)' },
|
||||||
{ label: '<?php echo Text::_("COM_MOKOSUITECROSS_DASHBOARD_FAILED", true); ?>', data: hourFailed, backgroundColor: 'rgba(220,53,69,0.7)' }
|
{ label: '<?php echo Text::_('COM_MOKOSUITECROSS_DASHBOARD_FAILED', true); ?>', data: hourFailed, backgroundColor: 'rgba(220,53,69,0.7)' }
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
options: {
|
options: {
|
||||||
@@ -205,7 +212,9 @@ document.addEventListener('DOMContentLoaded', function() {
|
|||||||
|
|
||||||
var dayData = <?php echo json_encode(array_values($this->dayDistribution)); ?>;
|
var dayData = <?php echo json_encode(array_values($this->dayDistribution)); ?>;
|
||||||
var dayLabels = <?php echo json_encode(array_values($dayNames)); ?>;
|
var dayLabels = <?php echo json_encode(array_values($dayNames)); ?>;
|
||||||
var daySuccess = [], dayFailed = [];
|
var daySuccess = [];
|
||||||
|
var dayFailed = [];
|
||||||
|
|
||||||
for (var d = 1; d <= 7; d++) {
|
for (var d = 1; d <= 7; d++) {
|
||||||
var found = dayData.find(function(r) { return parseInt(r.dow, 10) === d; });
|
var found = dayData.find(function(r) { return parseInt(r.dow, 10) === d; });
|
||||||
daySuccess.push(found ? parseInt(found.success, 10) : 0);
|
daySuccess.push(found ? parseInt(found.success, 10) : 0);
|
||||||
@@ -217,8 +226,8 @@ document.addEventListener('DOMContentLoaded', function() {
|
|||||||
data: {
|
data: {
|
||||||
labels: dayLabels,
|
labels: dayLabels,
|
||||||
datasets: [
|
datasets: [
|
||||||
{ label: '<?php echo Text::_("COM_MOKOSUITECROSS_DASHBOARD_POSTED", true); ?>', data: daySuccess, backgroundColor: 'rgba(25,135,84,0.7)' },
|
{ label: '<?php echo Text::_('COM_MOKOSUITECROSS_DASHBOARD_POSTED', true); ?>', data: daySuccess, backgroundColor: 'rgba(25,135,84,0.7)' },
|
||||||
{ label: '<?php echo Text::_("COM_MOKOSUITECROSS_DASHBOARD_FAILED", true); ?>', data: dayFailed, backgroundColor: 'rgba(220,53,69,0.7)' }
|
{ label: '<?php echo Text::_('COM_MOKOSUITECROSS_DASHBOARD_FAILED', true); ?>', data: dayFailed, backgroundColor: 'rgba(220,53,69,0.7)' }
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
options: {
|
options: {
|
||||||
|
|||||||
@@ -12,118 +12,150 @@
|
|||||||
defined('_JEXEC') or die;
|
defined('_JEXEC') or die;
|
||||||
|
|
||||||
use Joomla\CMS\Language\Text;
|
use Joomla\CMS\Language\Text;
|
||||||
use Joomla\CMS\Router\Route;
|
use Joomla\CMS\Session\Session;
|
||||||
|
|
||||||
/** @var \Joomla\Component\MokoSuiteCross\Administrator\View\Calendar\HtmlView $this */
|
/** @var \Joomla\Component\MokoSuiteCross\Administrator\View\Calendar\HtmlView $this */
|
||||||
|
|
||||||
$year = $this->year;
|
$token = Session::getFormToken();
|
||||||
$month = $this->month;
|
$ajaxUrl = $this->ajaxUrl;
|
||||||
$events = $this->events;
|
|
||||||
$today = date('Y-m-d');
|
|
||||||
|
|
||||||
$prevMonth = $month - 1;
|
|
||||||
$prevYear = $year;
|
|
||||||
|
|
||||||
if ($prevMonth < 1) {
|
|
||||||
$prevMonth = 12;
|
|
||||||
$prevYear--;
|
|
||||||
}
|
|
||||||
|
|
||||||
$nextMonth = $month + 1;
|
|
||||||
$nextYear = $year;
|
|
||||||
|
|
||||||
if ($nextMonth > 12) {
|
|
||||||
$nextMonth = 1;
|
|
||||||
$nextYear++;
|
|
||||||
}
|
|
||||||
|
|
||||||
$monthName = date('F', mktime(0, 0, 0, $month, 1, $year));
|
|
||||||
$daysInMonth = (int) date('t', mktime(0, 0, 0, $month, 1, $year));
|
|
||||||
$firstWeekday = ((int) date('N', mktime(0, 0, 0, $month, 1, $year))) - 1;
|
|
||||||
|
|
||||||
$statusClass = static function (string $status): string {
|
|
||||||
return match ($status) {
|
|
||||||
'posted' => 'bg-success',
|
|
||||||
'failed' => 'bg-danger',
|
|
||||||
default => 'bg-warning text-dark',
|
|
||||||
};
|
|
||||||
};
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<div class="d-flex justify-content-between align-items-center mb-3">
|
<style>
|
||||||
<a href="<?php echo Route::_('index.php?option=com_mokosuitecross&view=calendar&year=' . $prevYear . '&month=' . $prevMonth); ?>"
|
#mokosuitecross-calendar {
|
||||||
class="btn btn-outline-secondary btn-sm">
|
max-width: 1100px;
|
||||||
<span class="icon-chevron-left" aria-hidden="true"></span>
|
margin: 0 auto;
|
||||||
<?php echo Text::_('COM_MOKOSUITECROSS_CALENDAR_PREV_MONTH'); ?>
|
}
|
||||||
</a>
|
.fc .fc-toolbar-title {
|
||||||
<h3 class="mb-0"><?php echo htmlspecialchars($monthName . ' ' . $year); ?></h3>
|
font-size: 1.4em;
|
||||||
<a href="<?php echo Route::_('index.php?option=com_mokosuitecross&view=calendar&year=' . $nextYear . '&month=' . $nextMonth); ?>"
|
}
|
||||||
class="btn btn-outline-secondary btn-sm">
|
.mokosuitecross-calendar-legend {
|
||||||
<?php echo Text::_('COM_MOKOSUITECROSS_CALENDAR_NEXT_MONTH'); ?>
|
display: flex;
|
||||||
<span class="icon-chevron-right" aria-hidden="true"></span>
|
gap: 1.5rem;
|
||||||
</a>
|
flex-wrap: wrap;
|
||||||
|
margin-bottom: 1rem;
|
||||||
|
}
|
||||||
|
.mokosuitecross-calendar-legend span {
|
||||||
|
display: inline-flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 0.35rem;
|
||||||
|
font-size: 0.875rem;
|
||||||
|
}
|
||||||
|
.mokosuitecross-calendar-legend .swatch {
|
||||||
|
display: inline-block;
|
||||||
|
width: 14px;
|
||||||
|
height: 14px;
|
||||||
|
border-radius: 3px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<div class="mokosuitecross-calendar-legend">
|
||||||
|
<span><span class="swatch" style="background:#28a745;"></span> <?php echo Text::_('COM_MOKOSUITECROSS_STATUS_POSTED'); ?></span>
|
||||||
|
<span><span class="swatch" style="background:#007bff;"></span> <?php echo Text::_('COM_MOKOSUITECROSS_STATUS_SCHEDULED'); ?></span>
|
||||||
|
<span><span class="swatch" style="background:#ffc107;"></span> <?php echo Text::_('COM_MOKOSUITECROSS_STATUS_QUEUED'); ?></span>
|
||||||
|
<span><span class="swatch" style="background:#dc3545;"></span> <?php echo Text::_('COM_MOKOSUITECROSS_STATUS_FAILED'); ?></span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="table-responsive">
|
<div id="mokosuitecross-calendar"></div>
|
||||||
<table class="table table-bordered">
|
|
||||||
<thead class="table-light">
|
|
||||||
<tr>
|
|
||||||
<th style="width:14.28%"><?php echo Text::_('MON'); ?></th>
|
|
||||||
<th style="width:14.28%"><?php echo Text::_('TUE'); ?></th>
|
|
||||||
<th style="width:14.28%"><?php echo Text::_('WED'); ?></th>
|
|
||||||
<th style="width:14.28%"><?php echo Text::_('THU'); ?></th>
|
|
||||||
<th style="width:14.28%"><?php echo Text::_('FRI'); ?></th>
|
|
||||||
<th style="width:14.28%"><?php echo Text::_('SAT'); ?></th>
|
|
||||||
<th style="width:14.28%"><?php echo Text::_('SUN'); ?></th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
<?php
|
|
||||||
$day = 1;
|
|
||||||
$started = false;
|
|
||||||
|
|
||||||
while ($day <= $daysInMonth) : ?>
|
<script src="https://cdn.jsdelivr.net/npm/fullcalendar@6.1.15/index.global.min.js" integrity="sha384-B1OFx8Gy9GjPu8UbUyXbGQpzll9ubAUQ9agInFJ8NnD7nYG1u/CLR+Sqr5yifl4q" crossorigin="anonymous"></script>
|
||||||
<tr>
|
<script>
|
||||||
<?php for ($col = 0; $col < 7; $col++) :
|
document.addEventListener('DOMContentLoaded', function() {
|
||||||
if (!$started && $col < $firstWeekday) : ?>
|
var calendarEl = document.getElementById('mokosuitecross-calendar');
|
||||||
<td class="text-muted bg-light"> </td>
|
var token = '<?php echo $token; ?>';
|
||||||
<?php
|
|
||||||
continue;
|
|
||||||
endif;
|
|
||||||
|
|
||||||
$started = true;
|
var calendar = new FullCalendar.Calendar(calendarEl, {
|
||||||
|
initialView: 'dayGridMonth',
|
||||||
|
headerToolbar: {
|
||||||
|
left: 'prev,next today',
|
||||||
|
center: 'title',
|
||||||
|
right: 'dayGridMonth,timeGridWeek,listWeek'
|
||||||
|
},
|
||||||
|
buttonText: {
|
||||||
|
today: '<?php echo Text::_('COM_MOKOSUITECROSS_CALENDAR_TODAY', true); ?>',
|
||||||
|
month: '<?php echo Text::_('COM_MOKOSUITECROSS_CALENDAR_MONTH', true); ?>',
|
||||||
|
week: '<?php echo Text::_('COM_MOKOSUITECROSS_CALENDAR_WEEK', true); ?>',
|
||||||
|
list: '<?php echo Text::_('COM_MOKOSUITECROSS_CALENDAR_LIST', true); ?>'
|
||||||
|
},
|
||||||
|
editable: true,
|
||||||
|
droppable: false,
|
||||||
|
navLinks: true,
|
||||||
|
dayMaxEvents: true,
|
||||||
|
eventSources: [{
|
||||||
|
url: '<?php echo $ajaxUrl; ?>',
|
||||||
|
method: 'GET',
|
||||||
|
failure: function() {
|
||||||
|
Joomla.renderMessages({
|
||||||
|
error: ['<?php echo Text::_('COM_MOKOSUITECROSS_CALENDAR_LOAD_ERROR', true); ?>']
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}],
|
||||||
|
eventClick: function(info) {
|
||||||
|
info.jsEvent.preventDefault();
|
||||||
|
if (info.event.url) {
|
||||||
|
window.location.href = info.event.url;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
eventDrop: function(info) {
|
||||||
|
var postId = info.event.id;
|
||||||
|
var status = info.event.extendedProps.status;
|
||||||
|
|
||||||
if ($day > $daysInMonth) : ?>
|
// Only allow rescheduling of scheduled or queued posts
|
||||||
<td class="text-muted bg-light"> </td>
|
if (status !== 'scheduled' && status !== 'queued') {
|
||||||
<?php
|
info.revert();
|
||||||
continue;
|
Joomla.renderMessages({
|
||||||
endif;
|
warning: ['<?php echo Text::_('COM_MOKOSUITECROSS_CALENDAR_CANNOT_RESCHEDULE', true); ?>']
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
$dateKey = sprintf('%04d-%02d-%02d', $year, $month, $day);
|
var newDate = info.event.start.toISOString();
|
||||||
$isToday = ($dateKey === $today);
|
|
||||||
$cellClass = $isToday ? 'border border-primary border-2 bg-primary bg-opacity-10' : '';
|
var formData = new FormData();
|
||||||
$dayEvents = $events[$dateKey] ?? [];
|
formData.append('post_id', postId);
|
||||||
?>
|
formData.append('new_date', newDate);
|
||||||
<td class="<?php echo $cellClass; ?>" style="vertical-align: top; min-height: 80px;">
|
formData.append(token, '1');
|
||||||
<div class="fw-bold mb-1<?php echo $isToday ? ' text-primary' : ''; ?>">
|
|
||||||
<?php echo $day; ?>
|
fetch('index.php?option=com_mokosuitecross&task=calendar.reschedule&format=json', {
|
||||||
<?php if ($isToday) : ?>
|
method: 'POST',
|
||||||
<small class="text-primary"><?php echo Text::_('COM_MOKOSUITECROSS_CALENDAR_TODAY'); ?></small>
|
body: formData
|
||||||
<?php endif; ?>
|
})
|
||||||
</div>
|
.then(function(response) { return response.json(); })
|
||||||
<?php foreach ($dayEvents as $event) : ?>
|
.then(function(data) {
|
||||||
<span class="badge <?php echo $statusClass($event->status); ?> mb-1 d-block text-truncate" style="max-width: 100%;"
|
if (data.success) {
|
||||||
title="<?php echo htmlspecialchars(ucfirst($event->service_type) . ': ' . $event->article_title . ' (' . $event->status . ')'); ?>">
|
// Update the event colour to scheduled
|
||||||
<?php echo htmlspecialchars(ucfirst($event->service_type)); ?>:
|
info.event.setProp('color', '#007bff');
|
||||||
<?php echo htmlspecialchars(mb_substr($event->article_title, 0, 20)); ?>
|
info.event.setExtendedProp('status', 'scheduled');
|
||||||
</span>
|
Joomla.renderMessages({
|
||||||
<?php endforeach; ?>
|
message: ['<?php echo Text::_('COM_MOKOSUITECROSS_CALENDAR_RESCHEDULE_SUCCESS', true); ?>']
|
||||||
</td>
|
});
|
||||||
<?php
|
} else {
|
||||||
$day++;
|
info.revert();
|
||||||
endfor; ?>
|
Joomla.renderMessages({
|
||||||
</tr>
|
error: [data.error || '<?php echo Text::_('COM_MOKOSUITECROSS_CALENDAR_RESCHEDULE_ERROR', true); ?>']
|
||||||
<?php endwhile; ?>
|
});
|
||||||
</tbody>
|
}
|
||||||
</table>
|
})
|
||||||
</div>
|
.catch(function() {
|
||||||
|
info.revert();
|
||||||
|
Joomla.renderMessages({
|
||||||
|
error: ['<?php echo Text::_('COM_MOKOSUITECROSS_CALENDAR_RESCHEDULE_ERROR', true); ?>']
|
||||||
|
});
|
||||||
|
});
|
||||||
|
},
|
||||||
|
eventDidMount: function(info) {
|
||||||
|
// Add tooltip with post details
|
||||||
|
var props = info.event.extendedProps;
|
||||||
|
var tip = info.event.title;
|
||||||
|
if (props.status) {
|
||||||
|
tip += ' [' + props.status + ']';
|
||||||
|
}
|
||||||
|
if (props.message) {
|
||||||
|
tip += '\n' + props.message;
|
||||||
|
}
|
||||||
|
info.el.setAttribute('title', tip);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
calendar.render();
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|||||||
@@ -282,6 +282,10 @@ $queueProcessing = $componentParams->get('queue_processing', 'scheduler');
|
|||||||
class="list-group-item list-group-item-action">
|
class="list-group-item list-group-item-action">
|
||||||
<?php echo Text::_('COM_MOKOSUITECROSS_SUBMENU_LOGS'); ?>
|
<?php echo Text::_('COM_MOKOSUITECROSS_SUBMENU_LOGS'); ?>
|
||||||
</a>
|
</a>
|
||||||
|
<a href="<?php echo Route::_('index.php?option=com_mokosuitecross&view=calendar'); ?>"
|
||||||
|
class="list-group-item list-group-item-action">
|
||||||
|
<?php echo Text::_('COM_MOKOSUITECROSS_CALENDAR'); ?>
|
||||||
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<extension type="plugin" group="content" method="upgrade">
|
<extension type="plugin" group="content" method="upgrade">
|
||||||
<name>Content - MokoSuiteCross</name>
|
<name>Content - MokoSuiteCross</name>
|
||||||
<version>01.08.56</version>
|
<version>01.13.03</version>
|
||||||
<creationDate>2026-05-28</creationDate>
|
<creationDate>2026-05-28</creationDate>
|
||||||
<author>Moko Consulting</author>
|
<author>Moko Consulting</author>
|
||||||
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
||||||
|
|||||||
@@ -257,6 +257,53 @@ XML;
|
|||||||
$form->load($aiXml);
|
$form->load($aiXml);
|
||||||
$form->setFieldAttribute('mokosuitecross_ai_generate', 'description', $aiButtonHtml, 'attribs');
|
$form->setFieldAttribute('mokosuitecross_ai_generate', 'description', $aiButtonHtml, 'attribs');
|
||||||
}
|
}
|
||||||
|
// Social Image Generator button (#157)
|
||||||
|
$siParams = ComponentHelper::getParams('com_mokosuitecross');
|
||||||
|
$siEnabled = (bool) $siParams->get('social_image_enabled', 0);
|
||||||
|
|
||||||
|
if ($siEnabled && $articleId > 0) {
|
||||||
|
$siToken = Session::getFormToken();
|
||||||
|
$siUrl = Uri::base() . 'index.php?option=com_mokosuitecross&task=socialimage.generate&format=raw&article_id=' . $articleId . '&' . $siToken . '=1';
|
||||||
|
|
||||||
|
$siButtonHtml = '<div class="mb-3">'
|
||||||
|
. '<button type="button" id="mokosuitecross-si-btn" class="btn btn-sm btn-outline-success" onclick="mokosuitecrossSiGenerate()">'
|
||||||
|
. '<span class="icon-image" aria-hidden="true"></span> '
|
||||||
|
. \Joomla\CMS\Language\Text::_('COM_MOKOSUITECROSS_SOCIAL_IMAGE_GENERATE')
|
||||||
|
. '</button>'
|
||||||
|
. '<span id="mokosuitecross-si-status" class="ms-2 small"></span>'
|
||||||
|
. '<div id="mokosuitecross-si-preview" class="mt-2" style="display:none;">'
|
||||||
|
. '<img id="mokosuitecross-si-thumb" src="" alt="Social image preview" style="max-width:300px;border:1px solid #ccc;border-radius:4px;" />'
|
||||||
|
. '</div>'
|
||||||
|
. '</div>'
|
||||||
|
. '<script>'
|
||||||
|
. 'function mokosuitecrossSiGenerate(){'
|
||||||
|
. 'var btn=document.getElementById("mokosuitecross-si-btn");'
|
||||||
|
. 'var st=document.getElementById("mokosuitecross-si-status");'
|
||||||
|
. 'var pv=document.getElementById("mokosuitecross-si-preview");'
|
||||||
|
. 'var img=document.getElementById("mokosuitecross-si-thumb");'
|
||||||
|
. 'btn.disabled=true;st.textContent="' . \Joomla\CMS\Language\Text::_('COM_MOKOSUITECROSS_SOCIAL_IMAGE_GENERATING', true) . '";'
|
||||||
|
. 'pv.style.display="none";'
|
||||||
|
. 'fetch("' . $siUrl . '")'
|
||||||
|
. '.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_SOCIAL_IMAGE_GENERATED', true) . '";'
|
||||||
|
. 'img.src="' . Uri::root() . '"+d.image_url+"?t="+Date.now();'
|
||||||
|
. 'pv.style.display="block";'
|
||||||
|
. '})'
|
||||||
|
. '.catch(function(){btn.disabled=false;st.textContent="Request failed";});'
|
||||||
|
. '}'
|
||||||
|
. '</script>';
|
||||||
|
|
||||||
|
$siXml = '<?xml version="1.0"?>
|
||||||
|
<form><fields name="attribs"><fieldset name="mokosuitecross_share">
|
||||||
|
<field name="mokosuitecross_si_generate" type="note"
|
||||||
|
label="" description="" />
|
||||||
|
</fieldset></fields></form>';
|
||||||
|
$form->load($siXml);
|
||||||
|
$form->setFieldAttribute('mokosuitecross_si_generate', 'description', $siButtonHtml, 'attribs');
|
||||||
|
}
|
||||||
|
|
||||||
// Cross-post history panel for existing articles
|
// Cross-post history panel for existing articles
|
||||||
|
|
||||||
@@ -404,7 +451,7 @@ XML;
|
|||||||
/**
|
/**
|
||||||
* Dispatch cross-post when an article is saved and published.
|
* Dispatch cross-post when an article is saved and published.
|
||||||
*/
|
*/
|
||||||
public function onContentAfterSave(\Joomla\CMS\Event\Content\AfterSaveEvent $event): void
|
public function onContentAfterSave($event): void
|
||||||
{
|
{
|
||||||
$context = $event->getContext();
|
$context = $event->getContext();
|
||||||
|
|
||||||
@@ -441,7 +488,7 @@ XML;
|
|||||||
/**
|
/**
|
||||||
* Dispatch cross-post when article state changes to published.
|
* Dispatch cross-post when article state changes to published.
|
||||||
*/
|
*/
|
||||||
public function onContentChangeState(\Joomla\CMS\Event\Content\ContentChangeStateEvent $event): void
|
public function onContentChangeState($event): void
|
||||||
{
|
{
|
||||||
$context = $event->getContext();
|
$context = $event->getContext();
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<extension type="plugin" group="mokosuitecross" method="upgrade">
|
<extension type="plugin" group="mokosuitecross" method="upgrade">
|
||||||
<name>MokoSuiteCross - ActivityPub (Fediverse)</name>
|
<name>MokoSuiteCross - ActivityPub (Fediverse)</name>
|
||||||
<version>01.08.56</version>
|
<version>01.13.03</version>
|
||||||
<creationDate>2026-05-28</creationDate>
|
<creationDate>2026-05-28</creationDate>
|
||||||
<author>Moko Consulting</author>
|
<author>Moko Consulting</author>
|
||||||
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<extension type="plugin" group="mokosuitecross" method="upgrade">
|
<extension type="plugin" group="mokosuitecross" method="upgrade">
|
||||||
<name>MokoSuiteCross - Google Blogger</name>
|
<name>MokoSuiteCross - Google Blogger</name>
|
||||||
<version>01.08.56</version>
|
<version>01.13.03</version>
|
||||||
<creationDate>2026-05-28</creationDate>
|
<creationDate>2026-05-28</creationDate>
|
||||||
<author>Moko Consulting</author>
|
<author>Moko Consulting</author>
|
||||||
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<extension type="plugin" group="mokosuitecross" method="upgrade">
|
<extension type="plugin" group="mokosuitecross" method="upgrade">
|
||||||
<name>MokoSuiteCross - Bluesky</name>
|
<name>MokoSuiteCross - Bluesky</name>
|
||||||
<version>01.08.56</version>
|
<version>01.13.03</version>
|
||||||
<creationDate>2026-05-28</creationDate>
|
<creationDate>2026-05-28</creationDate>
|
||||||
<author>Moko Consulting</author>
|
<author>Moko Consulting</author>
|
||||||
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<extension type="plugin" group="mokosuitecross" method="upgrade">
|
<extension type="plugin" group="mokosuitecross" method="upgrade">
|
||||||
<name>MokoSuiteCross - Brevo (Sendinblue)</name>
|
<name>MokoSuiteCross - Brevo (Sendinblue)</name>
|
||||||
<version>01.08.56</version>
|
<version>01.13.03</version>
|
||||||
<creationDate>2026-05-28</creationDate>
|
<creationDate>2026-05-28</creationDate>
|
||||||
<author>Moko Consulting</author>
|
<author>Moko Consulting</author>
|
||||||
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<extension type="plugin" group="mokosuitecross" method="upgrade">
|
<extension type="plugin" group="mokosuitecross" method="upgrade">
|
||||||
<name>MokoSuiteCross - Constant Contact</name>
|
<name>MokoSuiteCross - Constant Contact</name>
|
||||||
<version>01.08.56</version>
|
<version>01.13.03</version>
|
||||||
<creationDate>2026-05-28</creationDate>
|
<creationDate>2026-05-28</creationDate>
|
||||||
<author>Moko Consulting</author>
|
<author>Moko Consulting</author>
|
||||||
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<extension type="plugin" group="mokosuitecross" method="upgrade">
|
<extension type="plugin" group="mokosuitecross" method="upgrade">
|
||||||
<name>MokoSuiteCross - ConvertKit</name>
|
<name>MokoSuiteCross - ConvertKit</name>
|
||||||
<version>01.08.56</version>
|
<version>01.13.03</version>
|
||||||
<creationDate>2026-05-28</creationDate>
|
<creationDate>2026-05-28</creationDate>
|
||||||
<author>Moko Consulting</author>
|
<author>Moko Consulting</author>
|
||||||
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<extension type="plugin" group="mokosuitecross" method="upgrade">
|
<extension type="plugin" group="mokosuitecross" method="upgrade">
|
||||||
<name>MokoSuiteCross - Dev.to</name>
|
<name>MokoSuiteCross - Dev.to</name>
|
||||||
<version>01.08.56</version>
|
<version>01.13.03</version>
|
||||||
<creationDate>2026-05-28</creationDate>
|
<creationDate>2026-05-28</creationDate>
|
||||||
<author>Moko Consulting</author>
|
<author>Moko Consulting</author>
|
||||||
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<extension type="plugin" group="mokosuitecross" method="upgrade">
|
<extension type="plugin" group="mokosuitecross" method="upgrade">
|
||||||
<name>MokoSuiteCross - Discord</name>
|
<name>MokoSuiteCross - Discord</name>
|
||||||
<version>01.08.56</version>
|
<version>01.13.03</version>
|
||||||
<creationDate>2026-05-28</creationDate>
|
<creationDate>2026-05-28</creationDate>
|
||||||
<author>Moko Consulting</author>
|
<author>Moko Consulting</author>
|
||||||
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<extension type="plugin" group="mokosuitecross" method="upgrade">
|
<extension type="plugin" group="mokosuitecross" method="upgrade">
|
||||||
<name>MokoSuiteCross - Facebook / Meta</name>
|
<name>MokoSuiteCross - Facebook / Meta</name>
|
||||||
<version>01.08.56</version>
|
<version>01.13.03</version>
|
||||||
<creationDate>2026-05-28</creationDate>
|
<creationDate>2026-05-28</creationDate>
|
||||||
<author>Moko Consulting</author>
|
<author>Moko Consulting</author>
|
||||||
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<extension type="plugin" group="mokosuitecross" method="upgrade">
|
<extension type="plugin" group="mokosuitecross" method="upgrade">
|
||||||
<name>MokoSuiteCross - Ghost</name>
|
<name>MokoSuiteCross - Ghost</name>
|
||||||
<version>01.08.56</version>
|
<version>01.13.03</version>
|
||||||
<creationDate>2026-05-28</creationDate>
|
<creationDate>2026-05-28</creationDate>
|
||||||
<author>Moko Consulting</author>
|
<author>Moko Consulting</author>
|
||||||
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<extension type="plugin" group="mokosuitecross" method="upgrade">
|
<extension type="plugin" group="mokosuitecross" method="upgrade">
|
||||||
<name>MokoSuiteCross - Google Business Profile</name>
|
<name>MokoSuiteCross - Google Business Profile</name>
|
||||||
<version>01.08.56</version>
|
<version>01.13.03</version>
|
||||||
<creationDate>2026-05-28</creationDate>
|
<creationDate>2026-05-28</creationDate>
|
||||||
<author>Moko Consulting</author>
|
<author>Moko Consulting</author>
|
||||||
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<extension type="plugin" group="mokosuitecross" method="upgrade">
|
<extension type="plugin" group="mokosuitecross" method="upgrade">
|
||||||
<name>MokoSuiteCross - Google Chat</name>
|
<name>MokoSuiteCross - Google Chat</name>
|
||||||
<version>01.08.56</version>
|
<version>01.13.03</version>
|
||||||
<creationDate>2026-05-28</creationDate>
|
<creationDate>2026-05-28</creationDate>
|
||||||
<author>Moko Consulting</author>
|
<author>Moko Consulting</author>
|
||||||
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<extension type="plugin" group="mokosuitecross" method="upgrade">
|
<extension type="plugin" group="mokosuitecross" method="upgrade">
|
||||||
<name>MokoSuiteCross - Hashnode</name>
|
<name>MokoSuiteCross - Hashnode</name>
|
||||||
<version>01.08.56</version>
|
<version>01.13.03</version>
|
||||||
<creationDate>2026-05-28</creationDate>
|
<creationDate>2026-05-28</creationDate>
|
||||||
<author>Moko Consulting</author>
|
<author>Moko Consulting</author>
|
||||||
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<extension type="plugin" group="mokosuitecross" method="upgrade">
|
<extension type="plugin" group="mokosuitecross" method="upgrade">
|
||||||
<name>MokoSuiteCross - Instagram</name>
|
<name>MokoSuiteCross - Instagram</name>
|
||||||
<version>01.08.56</version>
|
<version>01.13.03</version>
|
||||||
<creationDate>2026-06-23</creationDate>
|
<creationDate>2026-06-23</creationDate>
|
||||||
<author>Moko Consulting</author>
|
<author>Moko Consulting</author>
|
||||||
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<extension type="plugin" group="mokosuitecross" method="upgrade">
|
<extension type="plugin" group="mokosuitecross" method="upgrade">
|
||||||
<name>MokoSuiteCross - LinkedIn</name>
|
<name>MokoSuiteCross - LinkedIn</name>
|
||||||
<version>01.08.56</version>
|
<version>01.13.03</version>
|
||||||
<creationDate>2026-05-28</creationDate>
|
<creationDate>2026-05-28</creationDate>
|
||||||
<author>Moko Consulting</author>
|
<author>Moko Consulting</author>
|
||||||
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<extension type="plugin" group="mokosuitecross" method="upgrade">
|
<extension type="plugin" group="mokosuitecross" method="upgrade">
|
||||||
<name>MokoSuiteCross - Mailchimp</name>
|
<name>MokoSuiteCross - Mailchimp</name>
|
||||||
<version>01.08.56</version>
|
<version>01.13.03</version>
|
||||||
<creationDate>2026-05-28</creationDate>
|
<creationDate>2026-05-28</creationDate>
|
||||||
<author>Moko Consulting</author>
|
<author>Moko Consulting</author>
|
||||||
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<extension type="plugin" group="mokosuitecross" method="upgrade">
|
<extension type="plugin" group="mokosuitecross" method="upgrade">
|
||||||
<name>MokoSuiteCross - Mastodon</name>
|
<name>MokoSuiteCross - Mastodon</name>
|
||||||
<version>01.08.56</version>
|
<version>01.13.03</version>
|
||||||
<creationDate>2026-05-28</creationDate>
|
<creationDate>2026-05-28</creationDate>
|
||||||
<author>Moko Consulting</author>
|
<author>Moko Consulting</author>
|
||||||
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<extension type="plugin" group="mokosuitecross" method="upgrade">
|
<extension type="plugin" group="mokosuitecross" method="upgrade">
|
||||||
<name>MokoSuiteCross - Matrix / Element</name>
|
<name>MokoSuiteCross - Matrix / Element</name>
|
||||||
<version>01.08.56</version>
|
<version>01.13.03</version>
|
||||||
<creationDate>2026-05-28</creationDate>
|
<creationDate>2026-05-28</creationDate>
|
||||||
<author>Moko Consulting</author>
|
<author>Moko Consulting</author>
|
||||||
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<extension type="plugin" group="mokosuitecross" method="upgrade">
|
<extension type="plugin" group="mokosuitecross" method="upgrade">
|
||||||
<name>MokoSuiteCross - Medium</name>
|
<name>MokoSuiteCross - Medium</name>
|
||||||
<version>01.08.56</version>
|
<version>01.13.03</version>
|
||||||
<creationDate>2026-05-28</creationDate>
|
<creationDate>2026-05-28</creationDate>
|
||||||
<author>Moko Consulting</author>
|
<author>Moko Consulting</author>
|
||||||
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<extension type="plugin" group="mokosuitecross" method="upgrade">
|
<extension type="plugin" group="mokosuitecross" method="upgrade">
|
||||||
<name>MokoSuiteCross - MokoSuiteCalendar Events</name>
|
<name>MokoSuiteCross - MokoSuiteCalendar Events</name>
|
||||||
<version>01.08.56</version>
|
<version>01.13.03</version>
|
||||||
<creationDate>2026-05-28</creationDate>
|
<creationDate>2026-05-28</creationDate>
|
||||||
<author>Moko Consulting</author>
|
<author>Moko Consulting</author>
|
||||||
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<extension type="plugin" group="mokosuitecross" method="upgrade">
|
<extension type="plugin" group="mokosuitecross" method="upgrade">
|
||||||
<name>MokoSuiteCross - MokoSuiteGallery</name>
|
<name>MokoSuiteCross - MokoSuiteGallery</name>
|
||||||
<version>01.08.56</version>
|
<version>01.13.03</version>
|
||||||
<creationDate>2026-05-28</creationDate>
|
<creationDate>2026-05-28</creationDate>
|
||||||
<author>Moko Consulting</author>
|
<author>Moko Consulting</author>
|
||||||
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<extension type="plugin" group="mokosuitecross" method="upgrade">
|
<extension type="plugin" group="mokosuitecross" method="upgrade">
|
||||||
<name>MokoSuiteCross - Nostr</name>
|
<name>MokoSuiteCross - Nostr</name>
|
||||||
<version>01.08.56</version>
|
<version>01.13.03</version>
|
||||||
<creationDate>2026-05-28</creationDate>
|
<creationDate>2026-05-28</creationDate>
|
||||||
<author>Moko Consulting</author>
|
<author>Moko Consulting</author>
|
||||||
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<extension type="plugin" group="mokosuitecross" method="upgrade">
|
<extension type="plugin" group="mokosuitecross" method="upgrade">
|
||||||
<name>MokoSuiteCross - Ntfy Push Notifications</name>
|
<name>MokoSuiteCross - Ntfy Push Notifications</name>
|
||||||
<version>01.08.56</version>
|
<version>01.13.03</version>
|
||||||
<creationDate>2026-05-28</creationDate>
|
<creationDate>2026-05-28</creationDate>
|
||||||
<author>Moko Consulting</author>
|
<author>Moko Consulting</author>
|
||||||
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<extension type="plugin" group="mokosuitecross" method="upgrade">
|
<extension type="plugin" group="mokosuitecross" method="upgrade">
|
||||||
<name>MokoSuiteCross - Pinterest</name>
|
<name>MokoSuiteCross - Pinterest</name>
|
||||||
<version>01.08.56</version>
|
<version>01.13.03</version>
|
||||||
<creationDate>2026-05-28</creationDate>
|
<creationDate>2026-05-28</creationDate>
|
||||||
<author>Moko Consulting</author>
|
<author>Moko Consulting</author>
|
||||||
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<extension type="plugin" group="mokosuitecross" method="upgrade">
|
<extension type="plugin" group="mokosuitecross" method="upgrade">
|
||||||
<name>MokoSuiteCross - Reddit</name>
|
<name>MokoSuiteCross - Reddit</name>
|
||||||
<version>01.08.56</version>
|
<version>01.13.03</version>
|
||||||
<creationDate>2026-05-28</creationDate>
|
<creationDate>2026-05-28</creationDate>
|
||||||
<author>Moko Consulting</author>
|
<author>Moko Consulting</author>
|
||||||
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<extension type="plugin" group="mokosuitecross" method="upgrade">
|
<extension type="plugin" group="mokosuitecross" method="upgrade">
|
||||||
<name>MokoSuiteCross - RSS Feed</name>
|
<name>MokoSuiteCross - RSS Feed</name>
|
||||||
<version>01.08.56</version>
|
<version>01.13.03</version>
|
||||||
<creationDate>2026-05-28</creationDate>
|
<creationDate>2026-05-28</creationDate>
|
||||||
<author>Moko Consulting</author>
|
<author>Moko Consulting</author>
|
||||||
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<extension type="plugin" group="mokosuitecross" method="upgrade">
|
<extension type="plugin" group="mokosuitecross" method="upgrade">
|
||||||
<name>MokoSuiteCross - SendGrid</name>
|
<name>MokoSuiteCross - SendGrid</name>
|
||||||
<version>01.08.56</version>
|
<version>01.13.03</version>
|
||||||
<creationDate>2026-05-28</creationDate>
|
<creationDate>2026-05-28</creationDate>
|
||||||
<author>Moko Consulting</author>
|
<author>Moko Consulting</author>
|
||||||
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<extension type="plugin" group="mokosuitecross" method="upgrade">
|
<extension type="plugin" group="mokosuitecross" method="upgrade">
|
||||||
<name>MokoSuiteCross - Slack</name>
|
<name>MokoSuiteCross - Slack</name>
|
||||||
<version>01.08.56</version>
|
<version>01.13.03</version>
|
||||||
<creationDate>2026-05-28</creationDate>
|
<creationDate>2026-05-28</creationDate>
|
||||||
<author>Moko Consulting</author>
|
<author>Moko Consulting</author>
|
||||||
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<extension type="plugin" group="mokosuitecross" method="upgrade">
|
<extension type="plugin" group="mokosuitecross" method="upgrade">
|
||||||
<name>MokoSuiteCross - Microsoft Teams</name>
|
<name>MokoSuiteCross - Microsoft Teams</name>
|
||||||
<version>01.08.56</version>
|
<version>01.13.03</version>
|
||||||
<creationDate>2026-05-28</creationDate>
|
<creationDate>2026-05-28</creationDate>
|
||||||
<author>Moko Consulting</author>
|
<author>Moko Consulting</author>
|
||||||
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<extension type="plugin" group="mokosuitecross" method="upgrade">
|
<extension type="plugin" group="mokosuitecross" method="upgrade">
|
||||||
<name>MokoSuiteCross - Telegram</name>
|
<name>MokoSuiteCross - Telegram</name>
|
||||||
<version>01.08.56</version>
|
<version>01.13.03</version>
|
||||||
<creationDate>2026-05-28</creationDate>
|
<creationDate>2026-05-28</creationDate>
|
||||||
<author>Moko Consulting</author>
|
<author>Moko Consulting</author>
|
||||||
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<extension type="plugin" group="mokosuitecross" method="upgrade">
|
<extension type="plugin" group="mokosuitecross" method="upgrade">
|
||||||
<name>MokoSuiteCross - Threads (Meta)</name>
|
<name>MokoSuiteCross - Threads (Meta)</name>
|
||||||
<version>01.08.56</version>
|
<version>01.13.03</version>
|
||||||
<creationDate>2026-05-28</creationDate>
|
<creationDate>2026-05-28</creationDate>
|
||||||
<author>Moko Consulting</author>
|
<author>Moko Consulting</author>
|
||||||
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<extension type="plugin" group="mokosuitecross" method="upgrade">
|
<extension type="plugin" group="mokosuitecross" method="upgrade">
|
||||||
<name>MokoSuiteCross - TikTok</name>
|
<name>MokoSuiteCross - TikTok</name>
|
||||||
<version>01.08.56</version>
|
<version>01.13.03</version>
|
||||||
<creationDate>2026-05-28</creationDate>
|
<creationDate>2026-05-28</creationDate>
|
||||||
<author>Moko Consulting</author>
|
<author>Moko Consulting</author>
|
||||||
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<extension type="plugin" group="mokosuitecross" method="upgrade">
|
<extension type="plugin" group="mokosuitecross" method="upgrade">
|
||||||
<name>MokoSuiteCross - Tumblr</name>
|
<name>MokoSuiteCross - Tumblr</name>
|
||||||
<version>01.08.56</version>
|
<version>01.13.03</version>
|
||||||
<creationDate>2026-05-28</creationDate>
|
<creationDate>2026-05-28</creationDate>
|
||||||
<author>Moko Consulting</author>
|
<author>Moko Consulting</author>
|
||||||
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<extension type="plugin" group="mokosuitecross" method="upgrade">
|
<extension type="plugin" group="mokosuitecross" method="upgrade">
|
||||||
<name>MokoSuiteCross - X / Twitter</name>
|
<name>MokoSuiteCross - X / Twitter</name>
|
||||||
<version>01.08.56</version>
|
<version>01.13.03</version>
|
||||||
<creationDate>2026-05-28</creationDate>
|
<creationDate>2026-05-28</creationDate>
|
||||||
<author>Moko Consulting</author>
|
<author>Moko Consulting</author>
|
||||||
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<extension type="plugin" group="mokosuitecross" method="upgrade">
|
<extension type="plugin" group="mokosuitecross" method="upgrade">
|
||||||
<name>MokoSuiteCross - Generic Webhook</name>
|
<name>MokoSuiteCross - Generic Webhook</name>
|
||||||
<version>01.08.56</version>
|
<version>01.13.03</version>
|
||||||
<creationDate>2026-05-28</creationDate>
|
<creationDate>2026-05-28</creationDate>
|
||||||
<author>Moko Consulting</author>
|
<author>Moko Consulting</author>
|
||||||
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<extension type="plugin" group="mokosuitecross" method="upgrade">
|
<extension type="plugin" group="mokosuitecross" method="upgrade">
|
||||||
<name>MokoSuiteCross - WhatsApp Business</name>
|
<name>MokoSuiteCross - WhatsApp Business</name>
|
||||||
<version>01.08.56</version>
|
<version>01.13.03</version>
|
||||||
<creationDate>2026-05-28</creationDate>
|
<creationDate>2026-05-28</creationDate>
|
||||||
<author>Moko Consulting</author>
|
<author>Moko Consulting</author>
|
||||||
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<extension type="plugin" group="mokosuitecross" method="upgrade">
|
<extension type="plugin" group="mokosuitecross" method="upgrade">
|
||||||
<name>MokoSuiteCross - WordPress</name>
|
<name>MokoSuiteCross - WordPress</name>
|
||||||
<version>01.08.56</version>
|
<version>01.13.03</version>
|
||||||
<creationDate>2026-05-28</creationDate>
|
<creationDate>2026-05-28</creationDate>
|
||||||
<author>Moko Consulting</author>
|
<author>Moko Consulting</author>
|
||||||
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<extension type="plugin" group="mokosuitecross" method="upgrade">
|
<extension type="plugin" group="mokosuitecross" method="upgrade">
|
||||||
<name>MokoSuiteCross - Youtube</name>
|
<name>MokoSuiteCross - Youtube</name>
|
||||||
<version>01.08.56</version>
|
<version>01.13.03</version>
|
||||||
<creationDate>2026-06-23</creationDate>
|
<creationDate>2026-06-23</creationDate>
|
||||||
<author>Moko Consulting</author>
|
<author>Moko Consulting</author>
|
||||||
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<extension type="plugin" group="system" method="upgrade">
|
<extension type="plugin" group="system" method="upgrade">
|
||||||
<name>System - MokoSuiteCross</name>
|
<name>System - MokoSuiteCross</name>
|
||||||
<version>01.08.56</version>
|
<version>01.13.03</version>
|
||||||
<creationDate>2026-05-28</creationDate>
|
<creationDate>2026-05-28</creationDate>
|
||||||
<author>Moko Consulting</author>
|
<author>Moko Consulting</author>
|
||||||
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<extension type="plugin" group="system" method="upgrade">
|
<extension type="plugin" group="system" method="upgrade">
|
||||||
<name>System - MokoSuiteCross Events</name>
|
<name>System - MokoSuiteCross Events</name>
|
||||||
<version>01.08.56</version>
|
<version>01.13.03</version>
|
||||||
<creationDate>2026-05-28</creationDate>
|
<creationDate>2026-05-28</creationDate>
|
||||||
<author>Moko Consulting</author>
|
<author>Moko Consulting</author>
|
||||||
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<extension type="plugin" group="system" method="upgrade">
|
<extension type="plugin" group="system" method="upgrade">
|
||||||
<name>System - MokoSuiteCross Gallery</name>
|
<name>System - MokoSuiteCross Gallery</name>
|
||||||
<version>01.08.56</version>
|
<version>01.13.03</version>
|
||||||
<creationDate>2026-05-28</creationDate>
|
<creationDate>2026-05-28</creationDate>
|
||||||
<author>Moko Consulting</author>
|
<author>Moko Consulting</author>
|
||||||
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<extension type="plugin" group="task" method="upgrade">
|
<extension type="plugin" group="task" method="upgrade">
|
||||||
<name>Task - MokoSuiteCross Queue Processor</name>
|
<name>Task - MokoSuiteCross Queue Processor</name>
|
||||||
<version>01.08.56</version>
|
<version>01.13.03</version>
|
||||||
<creationDate>2026-05-28</creationDate>
|
<creationDate>2026-05-28</creationDate>
|
||||||
<author>Moko Consulting</author>
|
<author>Moko Consulting</author>
|
||||||
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<extension type="plugin" group="webservices" method="upgrade">
|
<extension type="plugin" group="webservices" method="upgrade">
|
||||||
<name>Web Services - MokoSuiteCross</name>
|
<name>Web Services - MokoSuiteCross</name>
|
||||||
<version>01.08.56</version>
|
<version>01.13.03</version>
|
||||||
<creationDate>2026-05-28</creationDate>
|
<creationDate>2026-05-28</creationDate>
|
||||||
<author>Moko Consulting</author>
|
<author>Moko Consulting</author>
|
||||||
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
<extension type="package" method="upgrade">
|
<extension type="package" method="upgrade">
|
||||||
<name>MokoSuiteCross</name>
|
<name>MokoSuiteCross</name>
|
||||||
<packagename>mokosuitecross</packagename>
|
<packagename>mokosuitecross</packagename>
|
||||||
<version>01.08.56</version>
|
<version>01.13.03</version>
|
||||||
<creationDate>2026-05-28</creationDate>
|
<creationDate>2026-05-28</creationDate>
|
||||||
<author>Moko Consulting</author>
|
<author>Moko Consulting</author>
|
||||||
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
||||||
@@ -76,6 +76,6 @@
|
|||||||
<blockChildUninstall>true</blockChildUninstall>
|
<blockChildUninstall>true</blockChildUninstall>
|
||||||
|
|
||||||
<updateservers>
|
<updateservers>
|
||||||
<server type="extension" name="MokoSuiteCross Updates">https://git.mokoconsulting.tech/MokoConsulting/MokoSuiteCross/updates.xml</server>
|
<server type="extension" name="MokoSuiteCross Updates">https://git.mokoconsulting.tech/api/packages/MokoConsulting/generic/MokoSuiteCross/latest/updates.xml</server>
|
||||||
</updateservers>
|
</updateservers>
|
||||||
</extension>
|
</extension>
|
||||||
|
|||||||
Reference in New Issue
Block a user