185 Commits

Author SHA1 Message Date
jmiller 889b5ef40b chore: sync auto-release.yml from Template-Generic [skip ci] 2026-06-22 00:34:22 +00:00
jmiller da1169bb47 chore: remove unused Makefile - builds handled by CI auto-release 2026-06-21 23:55:11 +00:00
jmiller bff55c6abd chore: sync issue-branch.yml from Template-Generic [skip ci] 2026-06-21 23:20:38 +00:00
gitea-actions[bot] cd3ae254a6 chore: promote changelog [Unreleased] → [01.21.01] 2026-06-21 23:17:15 +00:00
gitea-actions[bot] a0cfe4b3ee chore(release): build 01.21.01 [skip ci]
Publish to Composer / Publish Package (release) Failing after 46s
2026-06-21 23:17:08 +00:00
jmiller 6cbb0b8a37 Merge pull request 'chore: remove automation and scripts directories' (#72) from fix/remove-automation into main 2026-06-21 23:08:19 +00:00
gitea-actions[bot] a626ddd62d chore(version): pre-release bump to 01.21.01-dev [skip ci]
Universal: Build & Release / Promote to RC (pull_request) Has been skipped
Universal: Build & Release / Build & Release Pipeline (pull_request) Successful in 28s
Publish to Composer / Publish Package (release) Failing after 55s
RC Revert / Rename rc/ back to dev/ (pull_request) Has been skipped
Branch Cleanup / Delete merged branch (pull_request) Failing after 2s
Universal: Workflow Sync Trigger / Sync workflows to live repos (pull_request) Failing after 3s
2026-06-21 23:05:58 +00:00
Jonathan Miller 4b6fce936a chore: remove automation/ and scripts/ directories
Joomla: Extension CI / Tests (PHP 8.2) (pull_request) Blocked by required conditions
Joomla: Extension CI / Tests (PHP 8.3) (pull_request) Blocked by required conditions
Joomla: Extension CI / PHPStan Analysis (pull_request) Blocked by required conditions
Joomla: Extension CI / Build RC Pre-Release (pull_request) Blocked by required conditions
Universal: PR Check / Build RC Package (pull_request) Blocked by required conditions
Universal: PR Check / Report Issues (pull_request) Blocked by required conditions
Generic: Repo Health / Scripts governance (pull_request) Blocked by required conditions
Generic: Repo Health / Repository health (pull_request) Blocked by required conditions
Generic: Repo Health / Report Issues (pull_request) Blocked by required conditions
Universal: Pre-Release / Build Pre-Release (${{ inputs.stability || github.ref_name }}) (push) Successful in 33s
Joomla: Extension CI / Release Readiness Check (pull_request) Failing after 7s
Universal: PR Check / Branch Policy (pull_request) Failing after 3s
Joomla: Extension CI / Lint & Validate (pull_request) Failing after 12s
Universal: PR Check / Validate PR (pull_request) Failing after 7s
Universal: PR Check / Secret Scan (pull_request) Successful in 8s
Generic: Repo Health / Site Health (pull_request) Has been skipped
Generic: Repo Health / Access control (pull_request) Successful in 3s
Joomla: Metadata Validation / Validate Joomla Metadata (pull_request) Failing after 16s
Universal: Build & Release / Promote to RC (pull_request) Failing after 14s
Universal: Build & Release / Build & Release Pipeline (pull_request) Has been skipped
2026-06-21 18:01:46 -05:00
jmiller f929073242 chore: sync auto-release.yml from Template-Generic [skip ci] 2026-06-21 22:02:12 +00:00
jmiller 0cd8d631c3 chore: sync pre-release.yml from Template-Generic [skip ci] 2026-06-21 16:04:58 +00:00
jmiller c4f9694815 chore: sync composer-publish.yml from Template-Generic [skip ci] 2026-06-21 06:34:20 +00:00
jmiller 52ee78a75e chore: sync workflow-sync-trigger.yml from Template-Generic [skip ci] 2026-06-21 01:27:02 +00:00
jmiller dc3afef823 chore: sync auto-release.yml from Template-Generic [skip ci] 2026-06-21 01:26:59 +00:00
jmiller 0e1f258658 ci: sync rc-revert.yml from Template-Joomla [skip ci] 2026-06-21 00:15:03 +00:00
jmiller 9fdb34ed87 ci: sync issue-branch.yml from Template-Joomla [skip ci] 2026-06-21 00:14:34 +00:00
jmiller 5b8bfd48bb ci: sync ci-joomla.yml from Template-Joomla [skip ci] 2026-06-21 00:14:10 +00:00
jmiller edf4624497 chore: sync pr-check.yml from Template-Generic [skip ci] 2026-06-20 23:45:44 +00:00
jmiller d621415cd2 chore: sync gitleaks.yml from Template-Generic [skip ci] 2026-06-20 23:45:43 +00:00
jmiller 446b525784 chore: sync ci-generic.yml from Template-Generic [skip ci] 2026-06-20 23:45:43 +00:00
jmiller 28392c0cfc chore: sync repo-health.yml from Template-Generic [skip ci] 2026-06-20 22:29:42 +00:00
jmiller 694e63e58d chore: sync rc-revert.yml from Template-Generic [skip ci] 2026-06-20 22:29:41 +00:00
jmiller 9edeabcb5a chore: sync pr-check.yml from Template-Generic [skip ci] 2026-06-20 22:29:40 +00:00
jmiller 2c52ebb501 chore: sync cleanup.yml from Template-Generic [skip ci] 2026-06-20 22:29:38 +00:00
jmiller 46c79246bd ci: sync security-audit.yml from Template-Joomla [skip ci] 2026-06-20 22:26:29 +00:00
jmiller 428f49a27d ci: sync repo-health.yml from Template-Joomla [skip ci] 2026-06-20 22:26:00 +00:00
jmiller a1047970c1 ci: sync rc-revert.yml from Template-Joomla [skip ci] 2026-06-20 22:25:52 +00:00
jmiller 2eeae02e7a ci: sync pr-check.yml from Template-Joomla [skip ci] 2026-06-20 22:24:44 +00:00
jmiller 72f57f1cd1 ci: sync issue-branch.yml from Template-Joomla [skip ci] 2026-06-20 22:22:19 +00:00
jmiller 1f6de50b39 ci: sync cleanup.yml from Template-Joomla [skip ci] 2026-06-20 22:15:32 +00:00
jmiller b9656f819e chore: sync ci-generic.yml from Template-Generic [skip ci] 2026-06-20 21:35:08 +00:00
jmiller 09d221a25a ci: sync ci-generic.yml from Template-Joomla [skip ci] 2026-06-20 21:34:00 +00:00
jmiller f1292f4fb5 ci: sync cascade-dev.yml from Template-Joomla [skip ci] 2026-06-20 21:31:31 +00:00
jmiller 9836922397 ci: sync branch-cleanup.yml from Template-Joomla [skip ci] 2026-06-20 21:28:06 +00:00
jmiller 96540fbe95 ci: sync auto-release.yml from Template-Joomla [skip ci] 2026-06-20 21:26:55 +00:00
jmiller 8f21769b6d chore: sync workflow-sync-trigger.yml from Template-Generic [skip ci] 2026-06-20 20:50:39 +00:00
jmiller e4819c6c8c chore: sync rc-revert.yml from Template-Generic [skip ci] 2026-06-20 20:50:38 +00:00
jmiller 3d83e80949 chore: sync issue-branch.yml from Template-Generic [skip ci] 2026-06-20 20:50:37 +00:00
jmiller 65fd7f0a72 ci: sync ci-generic.yml from Template-Joomla [skip ci] 2026-06-20 20:35:03 +00:00
jmiller 85a8d817e5 ci: sync cascade-dev.yml from Template-Joomla [skip ci] 2026-06-20 20:32:49 +00:00
jmiller 4ac7863173 ci: sync branch-cleanup.yml from Template-Joomla [skip ci] 2026-06-20 20:31:51 +00:00
jmiller 17ef6ac4af ci: sync auto-release.yml from Template-Joomla [skip ci] 2026-06-20 20:30:57 +00:00
jmiller cf2a3c9c4a ci: sync auto-bump.yml from Template-Joomla [skip ci] 2026-06-20 19:59:06 +00:00
jmiller c18e01b711 ci: sync ci-generic.yml from Template-Joomla [skip ci] 2026-06-20 19:05:58 +00:00
jmiller 52e141c1a3 ci: sync cascade-dev.yml from Template-Joomla [skip ci] 2026-06-20 19:03:16 +00:00
jmiller 3e23a39b29 ci: sync branch-cleanup.yml from Template-Joomla [skip ci] 2026-06-20 19:02:43 +00:00
jmiller eed0b18ed4 ci: sync auto-release.yml from Template-Joomla [skip ci] 2026-06-20 19:01:03 +00:00
jmiller 52b351c1c9 ci: sync auto-bump.yml from Template-Joomla [skip ci] 2026-06-20 18:53:49 +00:00
jmiller 7e1da10d38 ci: sync pre-release workflow from Template-Joomla
Generic: Project CI / Lint & Validate (push) Successful in 37s
Generic: Project CI / Tests (push) Has been cancelled
2026-06-20 18:49:28 +00:00
jmiller 13f5c43753 ci: add Joomla metadata validation workflow for PRs
Generic: Project CI / Lint & Validate (push) Successful in 7s
Generic: Project CI / Tests (push) Has been cancelled
2026-06-20 18:39:05 +00:00
jmiller a62bef0b85 fix: rename moko-platform to mokocli + changelog promotion in workflows
Generic: Project CI / Lint & Validate (push) Successful in 35s
Generic: Project CI / Tests (push) Has been cancelled
2026-06-20 17:15:39 +00:00
jmiller 7e64c186db fix: rename moko-platform to mokocli + changelog promotion in workflows
Generic: Project CI / Lint & Validate (push) Successful in 7s
Generic: Project CI / Tests (push) Has been cancelled
2026-06-20 17:15:38 +00:00
jmiller 52575292ce fix: rename moko-platform to mokocli + changelog promotion in workflows
Generic: Repo Health / Access control (push) Successful in 1s
Generic: Repo Health / Site Health (push) Has been skipped
Generic: Project CI / Lint & Validate (push) Successful in 7s
Generic: Project CI / Tests (push) Has been cancelled
Generic: Repo Health / Scripts governance (push) Has been cancelled
Generic: Repo Health / Repository health (push) Has been cancelled
Generic: Repo Health / Report Issues (push) Has been cancelled
2026-06-20 17:15:37 +00:00
jmiller 697e60fee2 fix: rename moko-platform to mokocli + changelog promotion in workflows
Generic: Repo Health / Access control (push) Successful in 1s
Generic: Repo Health / Site Health (push) Has been skipped
Generic: Project CI / Lint & Validate (push) Successful in 7s
Generic: Project CI / Tests (push) Has been cancelled
Generic: Repo Health / Scripts governance (push) Has been cancelled
Generic: Repo Health / Repository health (push) Has been cancelled
Generic: Repo Health / Report Issues (push) Has been cancelled
2026-06-20 17:15:36 +00:00
jmiller 2475c1318c fix: rename moko-platform to mokocli + changelog promotion in workflows
Generic: Repo Health / Access control (push) Successful in 2s
Generic: Repo Health / Site Health (push) Has been skipped
Generic: Project CI / Lint & Validate (push) Successful in 7s
Generic: Project CI / Tests (push) Has been cancelled
Generic: Repo Health / Scripts governance (push) Has been cancelled
Generic: Repo Health / Repository health (push) Has been cancelled
Generic: Repo Health / Report Issues (push) Has been cancelled
2026-06-20 17:15:34 +00:00
jmiller ca72edf9f2 fix: rename moko-platform to mokocli + changelog promotion in workflows
Generic: Repo Health / Access control (push) Successful in 2s
Generic: Repo Health / Site Health (push) Has been skipped
Generic: Project CI / Lint & Validate (push) Successful in 8s
Generic: Project CI / Tests (push) Has been cancelled
Generic: Repo Health / Scripts governance (push) Has been cancelled
Generic: Repo Health / Repository health (push) Has been cancelled
Generic: Repo Health / Report Issues (push) Has been cancelled
2026-06-20 17:15:33 +00:00
gitea-actions[bot] 544ba942f7 chore(release): build 01.21.00 [skip ci] 2026-06-19 07:14:47 +00:00
jmiller fb883fba4b Merge pull request 'fix: remove deprecated .mokogitea/manifest.xml' (#71) from fix into main
Generic: Repo Health / Access control (push) Successful in 1s
Generic: Repo Health / Site Health (push) Has been skipped
Generic: Project CI / Lint & Validate (push) Successful in 9s
Generic: Project CI / Tests (push) Has been cancelled
Generic: Repo Health / Scripts governance (push) Has been cancelled
Generic: Repo Health / Repository health (push) Has been cancelled
Generic: Repo Health / Report Issues (push) Has been cancelled
2026-06-19 07:08:39 +00:00
Jonathan Miller cc87938cbe fix: remove deprecated .mokogitea/manifest.xml — metadata managed via API
Generic: Repo Health / Site Health (push) Has been skipped
Generic: Repo Health / Access control (push) Successful in 1s
Joomla: Extension CI / Release Readiness Check (pull_request) Failing after 7s
Universal: PR Check / Branch Policy (pull_request) Successful in 2s
Generic: Repo Health / Access control (pull_request) Successful in 1s
Generic: Repo Health / Site Health (pull_request) Has been skipped
Universal: Secret Scanning / Gitleaks Secret Scan (pull_request) Successful in 11s
Universal: PR Check / Validate PR (pull_request) Failing after 6s
Generic: Project CI / Lint & Validate (pull_request) Successful in 38s
Joomla: Extension CI / Lint & Validate (pull_request) Failing after 45s
Branch Cleanup / Delete merged branch (pull_request) Successful in 3s
Universal: Pre-Release / Build Pre-Release (${{ inputs.stability || 'development' }}) (pull_request_target) Failing after 8s
Universal: Build & Release / Promote to RC (pull_request) Has been skipped
Universal: Build & Release / Build & Release Pipeline (pull_request) Successful in 7s
Generic: Repo Health / Scripts governance (push) Has been cancelled
Generic: Repo Health / Repository health (push) Has been cancelled
Generic: Repo Health / Report Issues (push) Has been cancelled
Generic: Project CI / Tests (pull_request) Has been cancelled
Joomla: Extension CI / Tests (PHP 8.2) (pull_request) Has been cancelled
Joomla: Extension CI / Tests (PHP 8.3) (pull_request) Has been cancelled
Joomla: Extension CI / PHPStan Analysis (pull_request) Has been cancelled
Joomla: Extension CI / Build RC Pre-Release (pull_request) Has been cancelled
Universal: PR Check / Build RC Package (pull_request) Has been cancelled
Universal: PR Check / Report Issues (pull_request) Has been cancelled
Generic: Repo Health / Scripts governance (pull_request) Has been cancelled
Generic: Repo Health / Repository health (pull_request) Has been cancelled
Generic: Repo Health / Report Issues (pull_request) Has been cancelled
2026-06-19 02:04:18 -05:00
jmiller 739af71312 fix(ci): detect rebuild by branch name not version suffix [skip ci] 2026-06-19 01:53:50 +00:00
jmiller ed78806e20 fix(ci): detect rebuild by branch name not version suffix [skip ci] 2026-06-19 01:52:40 +00:00
jmiller a86118fe30 ci: patch bump on same-branch rebuilds, minor only on elevation [skip ci] 2026-06-19 00:42:25 +00:00
jmiller f2b4f52e98 ci: deploy full pre-release workflow from mokoplatform [skip ci] 2026-06-18 13:47:54 +00:00
jmiller e0b0b6ba39 revert: re-enable auto-bump on dev push [skip ci] 2026-06-18 13:18:51 +00:00
jmiller 38e79983b8 revert: re-enable auto-bump on dev push [skip ci] 2026-06-17 04:47:33 +00:00
jmiller 8194194bd7 ci: disable auto-bump on push to dev [skip ci] 2026-06-16 18:21:45 +00:00
jmiller 2b67ff1170 chore: sync security-audit.yml from Template-Joomla [skip ci] 2026-06-07 17:54:23 +00:00
jmiller 96f3b54cff chore: sync pre-release.yml from Template-Joomla [skip ci] 2026-06-07 17:54:22 +00:00
jmiller 435dd36e3c chore: sync notify.yml from Template-Joomla [skip ci] 2026-06-07 17:54:20 +00:00
jmiller 51b97848ee chore: sync issue-branch.yml from Template-Joomla [skip ci] 2026-06-07 17:54:19 +00:00
jmiller 405607b0ac chore: sync gitleaks.yml from Template-Joomla [skip ci] 2026-06-07 17:54:18 +00:00
jmiller 3df1bc9935 chore: sync deploy-manual.yml from Template-Joomla [skip ci] 2026-06-07 17:54:17 +00:00
jmiller b8751eea48 chore: sync cleanup.yml from Template-Joomla [skip ci] 2026-06-07 17:54:16 +00:00
jmiller 7d490522b0 chore: sync ci-joomla.yml from Template-Joomla [skip ci] 2026-06-07 17:54:15 +00:00
jmiller c0002bd069 chore: sync ci-generic.yml from Template-Joomla [skip ci] 2026-06-07 17:54:14 +00:00
jmiller 1c72b617db chore: sync cascade-dev.yml from Template-Joomla [skip ci] 2026-06-07 17:54:13 +00:00
jmiller 59bc850567 chore: sync auto-release.yml from Template-Joomla [skip ci] 2026-06-07 17:54:12 +00:00
jmiller 411b4c4691 chore: sync auto-bump.yml from Template-Joomla [skip ci] 2026-06-07 17:54:11 +00:00
jmiller 275e01662d chore: remove update-server workflow [skip ci] 2026-06-05 00:07:20 +00:00
gitea-actions[bot] a45b97d6dd chore(release): build 01.20.00 [skip ci] 2026-06-04 23:47:13 +00:00
jmiller 25018ee236 Merge pull request 'docs: update manifest description and rewrite README' (#70) from dev into main
Generic: Repo Health / Site Health (push) Has been cancelled
Generic: Repo Health / Access control (push) Has been cancelled
Generic: Repo Health / Scripts governance (push) Has been cancelled
Generic: Repo Health / Repository health (push) Has been cancelled
Generic: Repo Health / Report Issues (push) Has been cancelled
2026-06-04 23:47:05 +00:00
Jonathan Miller aa29f601c5 chore: merge main into dev
Generic: Repo Health / Site Health (push) Has been cancelled
Generic: Repo Health / Access control (push) Has been cancelled
Generic: Repo Health / Site Health (pull_request) Has been cancelled
Universal: PR Check / Branch Policy (pull_request) Has been cancelled
Generic: Repo Health / Access control (pull_request) Has been cancelled
Joomla: Extension CI / Release Readiness Check (pull_request) Has been cancelled
Universal: Secret Scanning / Gitleaks Secret Scan (pull_request) Has been cancelled
Joomla: Extension CI / Lint & Validate (pull_request) Has been cancelled
Universal: PR Check / Validate PR (pull_request) Has been cancelled
Universal: Build & Release / Promote to RC (pull_request) Has been cancelled
Branch Cleanup / Delete merged branch (pull_request) Has been cancelled
Universal: Build & Release / Build & Release Pipeline (pull_request) Has been cancelled
Generic: Repo Health / Scripts governance (push) Has been cancelled
Generic: Repo Health / Repository health (push) Has been cancelled
Generic: Repo Health / Report Issues (push) Has been cancelled
Joomla: Extension CI / Tests (PHP 8.2) (pull_request) Has been cancelled
Joomla: Extension CI / Tests (PHP 8.3) (pull_request) Has been cancelled
Joomla: Extension CI / PHPStan Analysis (pull_request) Has been cancelled
Joomla: Extension CI / Build RC Pre-Release (pull_request) Has been cancelled
Universal: PR Check / Build RC Package (pull_request) Has been cancelled
Universal: PR Check / Report Issues (pull_request) Has been cancelled
Generic: Repo Health / Scripts governance (pull_request) Has been cancelled
Generic: Repo Health / Repository health (pull_request) Has been cancelled
Generic: Repo Health / Report Issues (pull_request) Has been cancelled
2026-06-04 18:46:49 -05:00
Jonathan Miller 95f4fe998c docs: update manifest description and rewrite README for current features
Generic: Repo Health / Site Health (push) Has been cancelled
Generic: Repo Health / Access control (push) Has been cancelled
Universal: PR Check / Branch Policy (pull_request) Has been cancelled
Generic: Repo Health / Site Health (pull_request) Has been cancelled
Universal: Build & Release / Build & Release Pipeline (pull_request) Has been cancelled
Generic: Repo Health / Access control (pull_request) Has been cancelled
Joomla: Extension CI / Release Readiness Check (pull_request) Has been cancelled
Universal: Secret Scanning / Gitleaks Secret Scan (pull_request) Has been cancelled
Joomla: Extension CI / Lint & Validate (pull_request) Has been cancelled
Universal: Build & Release / Promote to RC (pull_request) Has been cancelled
Universal: PR Check / Validate PR (pull_request) Has been cancelled
Generic: Repo Health / Scripts governance (push) Has been cancelled
Generic: Repo Health / Repository health (push) Has been cancelled
Generic: Repo Health / Report Issues (push) Has been cancelled
Joomla: Extension CI / Tests (PHP 8.2) (pull_request) Has been cancelled
Joomla: Extension CI / Tests (PHP 8.3) (pull_request) Has been cancelled
Joomla: Extension CI / PHPStan Analysis (pull_request) Has been cancelled
Joomla: Extension CI / Build RC Pre-Release (pull_request) Has been cancelled
Universal: PR Check / Build RC Package (pull_request) Has been cancelled
Universal: PR Check / Report Issues (pull_request) Has been cancelled
Generic: Repo Health / Scripts governance (pull_request) Has been cancelled
Generic: Repo Health / Repository health (pull_request) Has been cancelled
Generic: Repo Health / Report Issues (pull_request) Has been cancelled
Update module description to reflect all current capabilities. Rewrite
README from old template-era content to accurate module documentation
with feature list, project structure, and installation instructions.
Update Gitea repo description.

Authored-by: Moko Consulting
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-06-04 18:39:24 -05:00
gitea-actions[bot] 3bdaeee40f chore(release): build 01.19.00 [skip ci] 2026-06-04 22:43:23 +00:00
jmiller 23ab29afab Merge pull request 'fix: remove dlid from manifest' (#69) from dev into main
Generic: Repo Health / Site Health (push) Has been cancelled
Generic: Repo Health / Access control (push) Has been cancelled
Generic: Repo Health / Scripts governance (push) Has been cancelled
Generic: Repo Health / Repository health (push) Has been cancelled
Generic: Repo Health / Report Issues (push) Has been cancelled
2026-06-04 22:43:10 +00:00
Jonathan Miller e870a0adfb fix: remove dlid from manifest — free extension, no download key needed
Generic: Repo Health / Site Health (push) Has been cancelled
Generic: Repo Health / Access control (push) Has been cancelled
Universal: PR Check / Branch Policy (pull_request) Has been cancelled
Generic: Repo Health / Site Health (pull_request) Has been cancelled
Joomla: Extension CI / Release Readiness Check (pull_request) Has been cancelled
Universal: Secret Scanning / Gitleaks Secret Scan (pull_request) Has been cancelled
Generic: Repo Health / Access control (pull_request) Has been cancelled
Joomla: Extension CI / Lint & Validate (pull_request) Has been cancelled
Universal: PR Check / Validate PR (pull_request) Has been cancelled
Branch Cleanup / Delete merged branch (pull_request) Has been cancelled
Universal: Build & Release / Promote to RC (pull_request) Has been cancelled
Universal: Build & Release / Build & Release Pipeline (pull_request) Has been cancelled
Generic: Repo Health / Scripts governance (push) Has been cancelled
Generic: Repo Health / Repository health (push) Has been cancelled
Generic: Repo Health / Report Issues (push) Has been cancelled
Joomla: Extension CI / Tests (PHP 8.2) (pull_request) Has been cancelled
Joomla: Extension CI / Tests (PHP 8.3) (pull_request) Has been cancelled
Joomla: Extension CI / PHPStan Analysis (pull_request) Has been cancelled
Joomla: Extension CI / Build RC Pre-Release (pull_request) Has been cancelled
Universal: PR Check / Build RC Package (pull_request) Has been cancelled
Universal: PR Check / Report Issues (pull_request) Has been cancelled
Generic: Repo Health / Scripts governance (pull_request) Has been cancelled
Generic: Repo Health / Repository health (pull_request) Has been cancelled
Generic: Repo Health / Report Issues (pull_request) Has been cancelled
Authored-by: Moko Consulting
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-06-04 17:40:21 -05:00
gitea-actions[bot] 21f4d203c7 chore(release): build 01.18.00 [skip ci] 2026-06-04 22:33:02 +00:00
jmiller 8cf8472bec Merge pull request 'fix: overlay on gradient modes, dlid support, changelog' (#68) from dev into main
Generic: Repo Health / Site Health (push) Has been cancelled
Generic: Repo Health / Access control (push) Has been cancelled
Generic: Repo Health / Scripts governance (push) Has been cancelled
Generic: Repo Health / Repository health (push) Has been cancelled
Generic: Repo Health / Report Issues (push) Has been cancelled
2026-06-04 22:32:52 +00:00
Jonathan Miller 1708e6386b chore: merge main into dev
Generic: Repo Health / Site Health (push) Has been cancelled
Generic: Repo Health / Access control (push) Has been cancelled
Universal: PR Check / Branch Policy (pull_request) Has been cancelled
Generic: Repo Health / Site Health (pull_request) Has been cancelled
Joomla: Extension CI / Release Readiness Check (pull_request) Has been cancelled
Universal: Secret Scanning / Gitleaks Secret Scan (pull_request) Has been cancelled
Generic: Repo Health / Access control (pull_request) Has been cancelled
Joomla: Extension CI / Lint & Validate (pull_request) Has been cancelled
Universal: PR Check / Validate PR (pull_request) Has been cancelled
Branch Cleanup / Delete merged branch (pull_request) Has been cancelled
Universal: Build & Release / Promote to RC (pull_request) Has been cancelled
Universal: Build & Release / Build & Release Pipeline (pull_request) Has been cancelled
Generic: Repo Health / Scripts governance (push) Has been cancelled
Generic: Repo Health / Repository health (push) Has been cancelled
Generic: Repo Health / Report Issues (push) Has been cancelled
Joomla: Extension CI / Tests (PHP 8.2) (pull_request) Has been cancelled
Joomla: Extension CI / Tests (PHP 8.3) (pull_request) Has been cancelled
Joomla: Extension CI / PHPStan Analysis (pull_request) Has been cancelled
Joomla: Extension CI / Build RC Pre-Release (pull_request) Has been cancelled
Universal: PR Check / Build RC Package (pull_request) Has been cancelled
Universal: PR Check / Report Issues (pull_request) Has been cancelled
Generic: Repo Health / Scripts governance (pull_request) Has been cancelled
Generic: Repo Health / Repository health (pull_request) Has been cancelled
Generic: Repo Health / Report Issues (pull_request) Has been cancelled
2026-06-04 17:32:35 -05:00
Jonathan Miller a9399f9aef docs: update changelog for 01.17
Generic: Repo Health / Site Health (push) Has been cancelled
Generic: Repo Health / Access control (push) Has been cancelled
Universal: Build & Release / Build & Release Pipeline (pull_request) Has been cancelled
Joomla: Extension CI / Release Readiness Check (pull_request) Has been cancelled
Universal: Secret Scanning / Gitleaks Secret Scan (pull_request) Has been cancelled
Joomla: Extension CI / Lint & Validate (pull_request) Has been cancelled
Universal: PR Check / Branch Policy (pull_request) Has been cancelled
Generic: Repo Health / Site Health (pull_request) Has been cancelled
Generic: Repo Health / Access control (pull_request) Has been cancelled
Universal: Build & Release / Promote to RC (pull_request) Has been cancelled
Universal: PR Check / Validate PR (pull_request) Has been cancelled
Generic: Repo Health / Scripts governance (push) Has been cancelled
Generic: Repo Health / Repository health (push) Has been cancelled
Generic: Repo Health / Report Issues (push) Has been cancelled
Joomla: Extension CI / Tests (PHP 8.2) (pull_request) Has been cancelled
Joomla: Extension CI / Tests (PHP 8.3) (pull_request) Has been cancelled
Joomla: Extension CI / PHPStan Analysis (pull_request) Has been cancelled
Joomla: Extension CI / Build RC Pre-Release (pull_request) Has been cancelled
Universal: PR Check / Build RC Package (pull_request) Has been cancelled
Universal: PR Check / Report Issues (pull_request) Has been cancelled
Generic: Repo Health / Scripts governance (pull_request) Has been cancelled
Generic: Repo Health / Repository health (pull_request) Has been cancelled
Generic: Repo Health / Report Issues (pull_request) Has been cancelled
Authored-by: Moko Consulting
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-06-04 17:26:45 -05:00
Jonathan Miller a2dcf2f072 fix: skip overlay background on solid colour and gradient hero modes
Generic: Repo Health / Site Health (push) Has been cancelled
Generic: Repo Health / Access control (push) Has been cancelled
Generic: Repo Health / Scripts governance (push) Has been cancelled
Generic: Repo Health / Repository health (push) Has been cancelled
Generic: Repo Health / Report Issues (push) Has been cancelled
The overlay's semi-transparent background was covering the gradient,
making it invisible. Color/gradient modes use controlled backgrounds
that don't need an overlay for text readability — the card handles
that. Overlay layout (flex positioning) is preserved.

Authored-by: Moko Consulting
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-06-04 17:24:07 -05:00
gitea-actions[bot] 32a5dd2d0d chore(release): build 01.17.00 [skip ci] 2026-06-04 22:08:39 +00:00
jmiller 7bd77d3b68 Merge pull request 'feat: add dlid to module manifest for update server auth' (#67) from dev into main
Generic: Repo Health / Site Health (push) Has been cancelled
Generic: Repo Health / Access control (push) Has been cancelled
Generic: Repo Health / Scripts governance (push) Has been cancelled
Generic: Repo Health / Repository health (push) Has been cancelled
Generic: Repo Health / Report Issues (push) Has been cancelled
2026-06-04 22:08:30 +00:00
Jonathan Miller f38b5180b7 fix: remove blockChildUninstall — only applies to templates
Generic: Repo Health / Site Health (push) Has been cancelled
Generic: Repo Health / Access control (push) Has been cancelled
Joomla: Extension CI / Release Readiness Check (pull_request) Has been cancelled
Generic: Repo Health / Site Health (pull_request) Has been cancelled
Universal: Secret Scanning / Gitleaks Secret Scan (pull_request) Has been cancelled
Universal: PR Check / Branch Policy (pull_request) Has been cancelled
Generic: Repo Health / Access control (pull_request) Has been cancelled
Joomla: Extension CI / Lint & Validate (pull_request) Has been cancelled
Universal: PR Check / Validate PR (pull_request) Has been cancelled
Universal: Build & Release / Promote to RC (pull_request) Has been cancelled
Branch Cleanup / Delete merged branch (pull_request) Has been cancelled
Universal: Build & Release / Build & Release Pipeline (pull_request) Has been cancelled
Generic: Repo Health / Scripts governance (push) Has been cancelled
Generic: Repo Health / Repository health (push) Has been cancelled
Generic: Repo Health / Report Issues (push) Has been cancelled
Joomla: Extension CI / Tests (PHP 8.2) (pull_request) Has been cancelled
Joomla: Extension CI / Tests (PHP 8.3) (pull_request) Has been cancelled
Joomla: Extension CI / PHPStan Analysis (pull_request) Has been cancelled
Joomla: Extension CI / Build RC Pre-Release (pull_request) Has been cancelled
Universal: PR Check / Build RC Package (pull_request) Has been cancelled
Universal: PR Check / Report Issues (pull_request) Has been cancelled
Generic: Repo Health / Scripts governance (pull_request) Has been cancelled
Generic: Repo Health / Repository health (pull_request) Has been cancelled
Generic: Repo Health / Report Issues (pull_request) Has been cancelled
Authored-by: Moko Consulting
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-06-04 17:04:25 -05:00
Jonathan Miller f1112c1762 feat: add dlid and blockChildUninstall to module manifest
Generic: Repo Health / Site Health (push) Has been cancelled
Generic: Repo Health / Access control (push) Has been cancelled
Generic: Repo Health / Scripts governance (push) Has been cancelled
Generic: Repo Health / Repository health (push) Has been cancelled
Generic: Repo Health / Report Issues (push) Has been cancelled
Add download key support (dlid prefix) for update server authentication
and blockChildUninstall to prevent accidental removal of sub-extensions.

Authored-by: Moko Consulting
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-06-04 17:03:51 -05:00
gitea-actions[bot] 692f7ab0ef chore(release): build 01.16.00 [skip ci] 2026-06-04 18:13:52 +00:00
jmiller 636d568fe2 Merge pull request 'feat: auto-remove deprecated system plugin on install/upgrade' (#66) from dev into main
Generic: Repo Health / Site Health (push) Has been cancelled
Generic: Repo Health / Access control (push) Has been cancelled
Generic: Repo Health / Scripts governance (push) Has been cancelled
Generic: Repo Health / Repository health (push) Has been cancelled
Generic: Repo Health / Report Issues (push) Has been cancelled
2026-06-04 18:13:42 +00:00
Jonathan Miller f05c30b662 feat: auto-remove deprecated system plugin on install/upgrade
Generic: Repo Health / Site Health (push) Has been cancelled
Generic: Repo Health / Access control (push) Has been cancelled
Universal: PR Check / Branch Policy (pull_request) Has been cancelled
Generic: Repo Health / Site Health (pull_request) Has been cancelled
Generic: Repo Health / Access control (pull_request) Has been cancelled
Joomla: Extension CI / Release Readiness Check (pull_request) Has been cancelled
Universal: Secret Scanning / Gitleaks Secret Scan (pull_request) Has been cancelled
Joomla: Extension CI / Lint & Validate (pull_request) Has been cancelled
Universal: PR Check / Validate PR (pull_request) Has been cancelled
Branch Cleanup / Delete merged branch (pull_request) Has been cancelled
Universal: Build & Release / Promote to RC (pull_request) Has been cancelled
Universal: Build & Release / Build & Release Pipeline (pull_request) Has been cancelled
Generic: Repo Health / Scripts governance (push) Has been cancelled
Generic: Repo Health / Repository health (push) Has been cancelled
Generic: Repo Health / Report Issues (push) Has been cancelled
Joomla: Extension CI / Tests (PHP 8.2) (pull_request) Has been cancelled
Joomla: Extension CI / Tests (PHP 8.3) (pull_request) Has been cancelled
Joomla: Extension CI / PHPStan Analysis (pull_request) Has been cancelled
Joomla: Extension CI / Build RC Pre-Release (pull_request) Has been cancelled
Universal: PR Check / Build RC Package (pull_request) Has been cancelled
Universal: PR Check / Report Issues (pull_request) Has been cancelled
Generic: Repo Health / Scripts governance (pull_request) Has been cancelled
Generic: Repo Health / Repository health (pull_request) Has been cancelled
Generic: Repo Health / Report Issues (pull_request) Has been cancelled
The install script now uninstalls plg_system_mokojoomhero if present,
cleaning up the old package extension remnant. Uses Joomla Installer
for proper DB and file cleanup. Non-critical — silently skips if the
plugin is already gone.

Authored-by: Moko Consulting
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-06-04 13:09:27 -05:00
gitea-actions[bot] 03e29b3945 chore(release): build 01.15.00 [skip ci] 2026-06-04 17:55:48 +00:00
jmiller 8ced44cf1d Merge pull request 'docs: consolidate changelog for all minor versions' (#65) from dev into main
Generic: Repo Health / Site Health (push) Has been cancelled
Generic: Repo Health / Access control (push) Has been cancelled
Generic: Repo Health / Scripts governance (push) Has been cancelled
Generic: Repo Health / Repository health (push) Has been cancelled
Generic: Repo Health / Report Issues (push) Has been cancelled
2026-06-04 17:55:36 +00:00
Jonathan Miller ed2bbebd3e chore: merge main into dev
Generic: Repo Health / Site Health (push) Has been cancelled
Generic: Repo Health / Access control (push) Has been cancelled
Universal: PR Check / Branch Policy (pull_request) Has been cancelled
Generic: Repo Health / Site Health (pull_request) Has been cancelled
Generic: Repo Health / Access control (pull_request) Has been cancelled
Universal: Secret Scanning / Gitleaks Secret Scan (pull_request) Has been cancelled
Joomla: Extension CI / Release Readiness Check (pull_request) Has been cancelled
Joomla: Extension CI / Lint & Validate (pull_request) Has been cancelled
Universal: PR Check / Validate PR (pull_request) Has been cancelled
Universal: Build & Release / Promote to RC (pull_request) Has been cancelled
Branch Cleanup / Delete merged branch (pull_request) Has been cancelled
Universal: Build & Release / Build & Release Pipeline (pull_request) Has been cancelled
Generic: Repo Health / Scripts governance (push) Has been cancelled
Generic: Repo Health / Repository health (push) Has been cancelled
Generic: Repo Health / Report Issues (push) Has been cancelled
Joomla: Extension CI / Tests (PHP 8.2) (pull_request) Has been cancelled
Joomla: Extension CI / Tests (PHP 8.3) (pull_request) Has been cancelled
Joomla: Extension CI / PHPStan Analysis (pull_request) Has been cancelled
Joomla: Extension CI / Build RC Pre-Release (pull_request) Has been cancelled
Universal: PR Check / Build RC Package (pull_request) Has been cancelled
Universal: PR Check / Report Issues (pull_request) Has been cancelled
Generic: Repo Health / Scripts governance (pull_request) Has been cancelled
Generic: Repo Health / Repository health (pull_request) Has been cancelled
Generic: Repo Health / Report Issues (pull_request) Has been cancelled
2026-06-04 12:55:08 -05:00
Jonathan Miller 11dbf4d785 docs: consolidate changelog with release notes for all minor versions
Generic: Repo Health / Site Health (push) Has been cancelled
Generic: Repo Health / Access control (push) Has been cancelled
Universal: PR Check / Branch Policy (pull_request) Has been cancelled
Universal: Build & Release / Build & Release Pipeline (pull_request) Has been cancelled
Joomla: Extension CI / Release Readiness Check (pull_request) Has been cancelled
Generic: Repo Health / Site Health (pull_request) Has been cancelled
Universal: Secret Scanning / Gitleaks Secret Scan (pull_request) Has been cancelled
Generic: Repo Health / Access control (pull_request) Has been cancelled
Joomla: Extension CI / Lint & Validate (pull_request) Has been cancelled
Universal: Build & Release / Promote to RC (pull_request) Has been cancelled
Universal: PR Check / Validate PR (pull_request) Has been cancelled
Generic: Repo Health / Scripts governance (push) Has been cancelled
Generic: Repo Health / Repository health (push) Has been cancelled
Generic: Repo Health / Report Issues (push) Has been cancelled
Joomla: Extension CI / Tests (PHP 8.2) (pull_request) Has been cancelled
Joomla: Extension CI / Tests (PHP 8.3) (pull_request) Has been cancelled
Joomla: Extension CI / PHPStan Analysis (pull_request) Has been cancelled
Joomla: Extension CI / Build RC Pre-Release (pull_request) Has been cancelled
Universal: PR Check / Build RC Package (pull_request) Has been cancelled
Universal: PR Check / Report Issues (pull_request) Has been cancelled
Generic: Repo Health / Scripts governance (pull_request) Has been cancelled
Generic: Repo Health / Repository health (pull_request) Has been cancelled
Generic: Repo Health / Report Issues (pull_request) Has been cancelled
Authored-by: Moko Consulting
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-06-04 12:34:46 -05:00
gitea-actions[bot] 96ae87b19d chore(release): build 01.14.00 [skip ci] 2026-06-04 17:16:56 +00:00
jmiller 8cb2ea30a1 Merge pull request 'fix: update server URL and pretty name in manifest' (#64) from dev into main
Generic: Repo Health / Site Health (push) Has been cancelled
Generic: Repo Health / Access control (push) Has been cancelled
Generic: Repo Health / Scripts governance (push) Has been cancelled
Generic: Repo Health / Repository health (push) Has been cancelled
Generic: Repo Health / Report Issues (push) Has been cancelled
2026-06-04 17:16:41 +00:00
Jonathan Miller 9a62d9d7cc fix: use pretty name for update server
Generic: Repo Health / Site Health (push) Has been cancelled
Generic: Repo Health / Access control (push) Has been cancelled
Universal: PR Check / Branch Policy (pull_request) Has been cancelled
Generic: Repo Health / Site Health (pull_request) Has been cancelled
Joomla: Extension CI / Lint & Validate (pull_request) Has been cancelled
Generic: Repo Health / Access control (pull_request) Has been cancelled
Universal: Secret Scanning / Gitleaks Secret Scan (pull_request) Has been cancelled
Joomla: Extension CI / Release Readiness Check (pull_request) Has been cancelled
Universal: PR Check / Validate PR (pull_request) Has been cancelled
Branch Cleanup / Delete merged branch (pull_request) Has been cancelled
Universal: Build & Release / Promote to RC (pull_request) Has been cancelled
Universal: Build & Release / Build & Release Pipeline (pull_request) Has been cancelled
Generic: Repo Health / Scripts governance (push) Has been cancelled
Generic: Repo Health / Repository health (push) Has been cancelled
Generic: Repo Health / Report Issues (push) Has been cancelled
Joomla: Extension CI / Tests (PHP 8.2) (pull_request) Has been cancelled
Joomla: Extension CI / Tests (PHP 8.3) (pull_request) Has been cancelled
Joomla: Extension CI / PHPStan Analysis (pull_request) Has been cancelled
Joomla: Extension CI / Build RC Pre-Release (pull_request) Has been cancelled
Universal: PR Check / Build RC Package (pull_request) Has been cancelled
Universal: PR Check / Report Issues (pull_request) Has been cancelled
Generic: Repo Health / Scripts governance (pull_request) Has been cancelled
Generic: Repo Health / Repository health (pull_request) Has been cancelled
Generic: Repo Health / Report Issues (pull_request) Has been cancelled
Authored-by: Moko Consulting
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-06-04 12:14:36 -05:00
Jonathan Miller cf1fb26390 fix: update server URL to new Gitea release system
Generic: Repo Health / Site Health (push) Has been cancelled
Generic: Repo Health / Access control (push) Has been cancelled
Generic: Repo Health / Scripts governance (push) Has been cancelled
Generic: Repo Health / Repository health (push) Has been cancelled
Generic: Repo Health / Report Issues (push) Has been cancelled
Change update server from raw/branch/main/updates.xml to the new
Gitea-managed updates.xml endpoint.

Authored-by: Moko Consulting
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-06-04 12:13:44 -05:00
Jonathan Miller a7cf29d220 fix: add updateservers to module manifest
Generic: Repo Health / Access control (push) Has been cancelled
Generic: Repo Health / Site Health (push) Has been cancelled
Generic: Repo Health / Scripts governance (push) Has been cancelled
Generic: Repo Health / Repository health (push) Has been cancelled
Generic: Repo Health / Report Issues (push) Has been cancelled
The updateservers section was only in the old package manifest and
was lost during the module restructure. Without it Joomla cannot
discover updates.

Authored-by: Moko Consulting
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-06-04 12:10:52 -05:00
gitea-actions[bot] e978090bb8 chore(release): build 01.13.00 [skip ci] 2026-06-04 16:31:26 +00:00
jmiller 7f7dd60a4a Merge pull request 'refactor: restructure from package back to standalone module' (#63) from dev into main
Generic: Repo Health / Site Health (push) Has been cancelled
Generic: Repo Health / Access control (push) Has been cancelled
Generic: Repo Health / Scripts governance (push) Has been cancelled
Generic: Repo Health / Repository health (push) Has been cancelled
Generic: Repo Health / Report Issues (push) Has been cancelled
2026-06-04 16:31:10 +00:00
Jonathan Miller e711bb4fa0 chore: merge main into dev, resolve conflicts for module restructure
Generic: Repo Health / Site Health (push) Has been cancelled
Generic: Repo Health / Access control (push) Has been cancelled
Generic: Repo Health / Site Health (pull_request) Has been cancelled
Universal: PR Check / Branch Policy (pull_request) Has been cancelled
Joomla: Extension CI / Release Readiness Check (pull_request) Has been cancelled
Universal: Secret Scanning / Gitleaks Secret Scan (pull_request) Has been cancelled
Generic: Repo Health / Access control (pull_request) Has been cancelled
Joomla: Extension CI / Lint & Validate (pull_request) Has been cancelled
Universal: PR Check / Validate PR (pull_request) Has been cancelled
Branch Cleanup / Delete merged branch (pull_request) Has been cancelled
Universal: Build & Release / Promote to RC (pull_request) Has been cancelled
Universal: Build & Release / Build & Release Pipeline (pull_request) Has been cancelled
Generic: Repo Health / Scripts governance (push) Has been cancelled
Generic: Repo Health / Repository health (push) Has been cancelled
Generic: Repo Health / Report Issues (push) Has been cancelled
Joomla: Extension CI / Tests (PHP 8.2) (pull_request) Has been cancelled
Joomla: Extension CI / Tests (PHP 8.3) (pull_request) Has been cancelled
Joomla: Extension CI / PHPStan Analysis (pull_request) Has been cancelled
Joomla: Extension CI / Build RC Pre-Release (pull_request) Has been cancelled
Universal: PR Check / Build RC Package (pull_request) Has been cancelled
Universal: PR Check / Report Issues (pull_request) Has been cancelled
Generic: Repo Health / Scripts governance (pull_request) Has been cancelled
Generic: Repo Health / Repository health (pull_request) Has been cancelled
Generic: Repo Health / Report Issues (pull_request) Has been cancelled
2026-06-04 11:30:38 -05:00
Jonathan Miller ea9ea5c3a7 refactor: restructure from package back to standalone module
Generic: Repo Health / Site Health (push) Has been cancelled
Generic: Repo Health / Access control (push) Has been cancelled
Universal: PR Check / Branch Policy (pull_request) Has been cancelled
Universal: Build & Release / Build & Release Pipeline (pull_request) Has been cancelled
Joomla: Extension CI / Release Readiness Check (pull_request) Has been cancelled
Universal: Secret Scanning / Gitleaks Secret Scan (pull_request) Has been cancelled
Joomla: Extension CI / Lint & Validate (pull_request) Has been cancelled
Universal: Build & Release / Promote to RC (pull_request) Has been cancelled
Universal: PR Check / Validate PR (pull_request) Has been cancelled
Generic: Repo Health / Scripts governance (push) Has been cancelled
Generic: Repo Health / Repository health (push) Has been cancelled
Generic: Repo Health / Report Issues (push) Has been cancelled
Joomla: Extension CI / Tests (PHP 8.2) (pull_request) Has been cancelled
Joomla: Extension CI / Tests (PHP 8.3) (pull_request) Has been cancelled
Joomla: Extension CI / PHPStan Analysis (pull_request) Has been cancelled
Joomla: Extension CI / Build RC Pre-Release (pull_request) Has been cancelled
Universal: PR Check / Build RC Package (pull_request) Has been cancelled
Universal: PR Check / Report Issues (pull_request) Has been cancelled
Remove plg_system_mokojoomhero and package wrapper. Move module files
from src/packages/mod_mokojoomhero/ back to src/. Update Makefile
build target for module ZIP. Update CLAUDE.md and file PATH headers.

Authored-by: Moko Consulting
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-06-04 11:07:42 -05:00
jmiller 49f9a762df chore: sync .mokogitea/workflows/pr-check.yml from moko-platform [skip ci] 2026-06-04 15:57:44 +00:00
jmiller a6e9302730 chore: sync .mokogitea/workflows/pr-check.yml from moko-platform [skip ci] 2026-06-04 15:56:08 +00:00
Jonathan Miller ce498da605 chore: update creationDate to 2026-06-04 in all manifests
Generic: Repo Health / Site Health (push) Has been cancelled
Generic: Repo Health / Access control (push) Has been cancelled
Generic: Repo Health / Scripts governance (push) Has been cancelled
Generic: Repo Health / Repository health (push) Has been cancelled
Generic: Repo Health / Report Issues (push) Has been cancelled
Authored-by: Moko Consulting
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-06-04 10:48:45 -05:00
jmiller d46325e13b chore: sync .mokogitea/workflows/pr-check.yml from moko-platform [skip ci] 2026-06-04 15:40:21 +00:00
jmiller 69362e0aca chore: sync .mokogitea/workflows/pr-check.yml from moko-platform [skip ci] 2026-06-04 15:38:16 +00:00
gitea-actions[bot] 84b3b9acb1 chore(release): build 01.12.00 [skip ci] 2026-06-04 15:36:31 +00:00
jmiller 9f0c01739f Merge pull request 'chore: remove updates.xml - update server migrated' (#62) from dev into main
Generic: Repo Health / Site Health (push) Has been cancelled
Generic: Repo Health / Access control (push) Has been cancelled
Generic: Repo Health / Scripts governance (push) Has been cancelled
Generic: Repo Health / Repository health (push) Has been cancelled
Generic: Repo Health / Report Issues (push) Has been cancelled
2026-06-04 15:36:20 +00:00
Jonathan Miller a7eabcf9d7 chore: remove updates.xml and update.xml — update server migrated
Generic: Repo Health / Site Health (push) Has been cancelled
Generic: Repo Health / Access control (push) Has been cancelled
Generic: Repo Health / Site Health (pull_request) Has been cancelled
Universal: PR Check / Branch Policy (pull_request) Has been cancelled
Generic: Repo Health / Access control (pull_request) Has been cancelled
Joomla: Extension CI / Release Readiness Check (pull_request) Has been cancelled
Universal: Secret Scanning / Gitleaks Secret Scan (pull_request) Has been cancelled
Joomla: Extension CI / Lint & Validate (pull_request) Has been cancelled
Universal: PR Check / Validate PR (pull_request) Has been cancelled
Branch Cleanup / Delete merged branch (pull_request) Has been cancelled
Universal: Build & Release / Promote to RC (pull_request) Has been cancelled
Universal: Build & Release / Build & Release Pipeline (pull_request) Has been cancelled
Generic: Repo Health / Scripts governance (push) Has been cancelled
Generic: Repo Health / Repository health (push) Has been cancelled
Generic: Repo Health / Report Issues (push) Has been cancelled
Joomla: Extension CI / Tests (PHP 8.2) (pull_request) Has been cancelled
Joomla: Extension CI / Tests (PHP 8.3) (pull_request) Has been cancelled
Joomla: Extension CI / PHPStan Analysis (pull_request) Has been cancelled
Joomla: Extension CI / Build RC Pre-Release (pull_request) Has been cancelled
Universal: PR Check / Build RC Package (pull_request) Has been cancelled
Universal: PR Check / Report Issues (pull_request) Has been cancelled
Generic: Repo Health / Scripts governance (pull_request) Has been cancelled
Generic: Repo Health / Repository health (pull_request) Has been cancelled
Generic: Repo Health / Report Issues (pull_request) Has been cancelled
Update server now managed externally. Remove local updates.xml and
legacy update.xml files.

Authored-by: Moko Consulting
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-06-04 10:34:20 -05:00
jmiller 724c4d61f4 chore: sync .mokogitea/workflows/pr-check.yml from moko-platform [skip ci] 2026-06-04 15:31:37 +00:00
jmiller 35cb0a988c chore: sync .mokogitea/workflows/pr-check.yml from moko-platform [skip ci] 2026-06-04 15:28:39 +00:00
jmiller 9e27c5c167 chore: remove static updates.xml [skip ci] 2026-06-04 15:22:59 +00:00
jmiller f56bfa6c36 chore: sync updates.xml 01.11.00 from main [skip ci] 2026-06-04 15:22:44 +00:00
gitea-actions[bot] f4dfcc4c7e chore: update channels for 01.11.00 [skip ci] 2026-06-04 15:22:43 +00:00
gitea-actions[bot] f9187cd816 chore(release): build 01.11.00 [skip ci] 2026-06-04 15:22:41 +00:00
jmiller a9d4534f0b Merge pull request 'chore: clean up updates.xml for stable 01.10.00' (#61) from dev into main
Generic: Repo Health / Site Health (push) Has been cancelled
Generic: Repo Health / Access control (push) Has been cancelled
Generic: Repo Health / Scripts governance (push) Has been cancelled
Generic: Repo Health / Repository health (push) Has been cancelled
Generic: Repo Health / Report Issues (push) Has been cancelled
2026-06-04 15:22:33 +00:00
Jonathan Miller a922ef3033 chore: merge main into dev, resolve updates.xml conflicts
Generic: Repo Health / Site Health (push) Has been cancelled
Generic: Repo Health / Access control (push) Has been cancelled
Generic: Repo Health / Site Health (pull_request) Has been cancelled
Universal: PR Check / Branch Policy (pull_request) Has been cancelled
Generic: Repo Health / Access control (pull_request) Has been cancelled
Joomla: Extension CI / Release Readiness Check (pull_request) Has been cancelled
Universal: Secret Scanning / Gitleaks Secret Scan (pull_request) Has been cancelled
Joomla: Extension CI / Lint & Validate (pull_request) Has been cancelled
Universal: PR Check / Validate PR (pull_request) Has been cancelled
Universal: Build & Release / Promote to RC (pull_request) Has been cancelled
Branch Cleanup / Delete merged branch (pull_request) Has been cancelled
Universal: Build & Release / Build & Release Pipeline (pull_request) Has been cancelled
Generic: Repo Health / Scripts governance (push) Has been cancelled
Generic: Repo Health / Repository health (push) Has been cancelled
Generic: Repo Health / Report Issues (push) Has been cancelled
Joomla: Extension CI / Tests (PHP 8.2) (pull_request) Has been cancelled
Joomla: Extension CI / Tests (PHP 8.3) (pull_request) Has been cancelled
Joomla: Extension CI / PHPStan Analysis (pull_request) Has been cancelled
Joomla: Extension CI / Build RC Pre-Release (pull_request) Has been cancelled
Universal: PR Check / Build RC Package (pull_request) Has been cancelled
Universal: PR Check / Report Issues (pull_request) Has been cancelled
Generic: Repo Health / Scripts governance (pull_request) Has been cancelled
Generic: Repo Health / Repository health (pull_request) Has been cancelled
Generic: Repo Health / Report Issues (pull_request) Has been cancelled
2026-06-04 10:21:47 -05:00
jmiller 9fbc273658 chore: sync .mokogitea/workflows/pr-check.yml from moko-platform [skip ci] 2026-06-04 15:18:27 +00:00
Jonathan Miller 95319c0513 chore: clean up updates.xml — remove stale entries, keep stable + legacy migration
Generic: Repo Health / Site Health (push) Has been cancelled
Generic: Repo Health / Access control (push) Has been cancelled
Universal: Build & Release / Build & Release Pipeline (pull_request) Has been cancelled
Universal: PR Check / Branch Policy (pull_request) Has been cancelled
Generic: Repo Health / Site Health (pull_request) Has been cancelled
Generic: Repo Health / Access control (pull_request) Has been cancelled
Joomla: Extension CI / Release Readiness Check (pull_request) Has been cancelled
Universal: Secret Scanning / Gitleaks Secret Scan (pull_request) Has been cancelled
Joomla: Extension CI / Lint & Validate (pull_request) Has been cancelled
Universal: Build & Release / Promote to RC (pull_request) Has been cancelled
Universal: PR Check / Validate PR (pull_request) Has been cancelled
Generic: Repo Health / Scripts governance (push) Has been cancelled
Generic: Repo Health / Repository health (push) Has been cancelled
Generic: Repo Health / Report Issues (push) Has been cancelled
Joomla: Extension CI / Tests (PHP 8.2) (pull_request) Has been cancelled
Joomla: Extension CI / Tests (PHP 8.3) (pull_request) Has been cancelled
Joomla: Extension CI / PHPStan Analysis (pull_request) Has been cancelled
Joomla: Extension CI / Build RC Pre-Release (pull_request) Has been cancelled
Universal: PR Check / Build RC Package (pull_request) Has been cancelled
Universal: PR Check / Report Issues (pull_request) Has been cancelled
Generic: Repo Health / Scripts governance (pull_request) Has been cancelled
Generic: Repo Health / Repository health (pull_request) Has been cancelled
Generic: Repo Health / Report Issues (pull_request) Has been cancelled
Remove old dev/alpha/beta/rc entries. Keep current stable 01.10.00
package entry and legacy mod_mokojoomhero entry pointing to the
package for migration from old standalone module installs.

Authored-by: Moko Consulting
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-06-04 10:14:36 -05:00
jmiller 10412c1120 chore: sync .mokogitea/workflows/pr-check.yml from moko-platform [skip ci] 2026-06-04 15:13:06 +00:00
gitea-actions[bot] ab82a8f810 chore: update channels for 01.10.00 [skip ci] 2026-06-04 15:03:47 +00:00
jmiller 19db4cb637 chore: sync updates.xml 01.10.00 from main [skip ci] 2026-06-04 15:03:47 +00:00
gitea-actions[bot] 28bc4f042a chore(release): build 01.10.00 [skip ci] 2026-06-04 15:03:45 +00:00
jmiller 9de47e9fe2 Merge pull request 'feat: scheduling, A/B testing, repo metadata update' (#60) from dev into main
Generic: Repo Health / Site Health (push) Has been cancelled
Generic: Repo Health / Access control (push) Has been cancelled
Generic: Repo Health / Scripts governance (push) Has been cancelled
Generic: Repo Health / Repository health (push) Has been cancelled
Generic: Repo Health / Report Issues (push) Has been cancelled
2026-06-04 15:03:36 +00:00
Jonathan Miller af3acc6fd2 feat: scheduling and A/B testing (#21, #22)
Generic: Repo Health / Site Health (push) Has been cancelled
Generic: Repo Health / Access control (push) Has been cancelled
Generic: Repo Health / Site Health (pull_request) Has been cancelled
Universal: PR Check / Branch Policy (pull_request) Has been cancelled
Generic: Repo Health / Access control (pull_request) Has been cancelled
Joomla: Extension CI / Release Readiness Check (pull_request) Has been cancelled
Universal: Secret Scanning / Gitleaks Secret Scan (pull_request) Has been cancelled
Universal: PR Check / Validate PR (pull_request) Has been cancelled
Joomla: Extension CI / Lint & Validate (pull_request) Has been cancelled
Branch Cleanup / Delete merged branch (pull_request) Has been cancelled
Universal: Build & Release / Promote to RC (pull_request) Has been cancelled
Universal: Build & Release / Build & Release Pipeline (pull_request) Has been cancelled
Generic: Repo Health / Scripts governance (push) Has been cancelled
Generic: Repo Health / Repository health (push) Has been cancelled
Generic: Repo Health / Report Issues (push) Has been cancelled
Joomla: Extension CI / Tests (PHP 8.2) (pull_request) Has been cancelled
Joomla: Extension CI / Tests (PHP 8.3) (pull_request) Has been cancelled
Joomla: Extension CI / PHPStan Analysis (pull_request) Has been cancelled
Joomla: Extension CI / Build RC Pre-Release (pull_request) Has been cancelled
Universal: PR Check / Build RC Package (pull_request) Has been cancelled
Universal: PR Check / Report Issues (pull_request) Has been cancelled
Generic: Repo Health / Scripts governance (pull_request) Has been cancelled
Generic: Repo Health / Repository health (pull_request) Has been cancelled
Generic: Repo Health / Report Issues (pull_request) Has been cancelled
Add hero scheduling with start/end datetime fields using Joomla
calendar type and site timezone. Hero skips rendering outside the
configured range. Add A/B testing with weighted random variation
selection, session-sticky per module instance via subform repeatable.
Close #23 as substantially complete (animation library implemented
in prior phases). Language strings in all locales.

Authored-by: Moko Consulting
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-06-04 09:59:04 -05:00
jmiller ad0c5bc51c feat(update): migrate update server URL to Gitea Pages [skip ci] 2026-06-04 14:33:21 +00:00
jmiller fdf07d833f feat(update): migrate update server URL to Gitea Pages [skip ci] 2026-06-04 14:33:15 +00:00
jmiller 765086d7a0 chore: sync updates.xml 01.09.00 from main [skip ci] 2026-06-04 14:31:56 +00:00
gitea-actions[bot] 9e729c059d chore: update channels for 01.09.00 [skip ci] 2026-06-04 14:31:55 +00:00
gitea-actions[bot] d708ac995d chore(release): build 01.09.00 [skip ci] 2026-06-04 14:31:53 +00:00
jmiller 8895ba9ffb Merge pull request 'feat: restore licensing system with free tier' (#59) from dev into main
Generic: Repo Health / Site Health (push) Has been cancelled
Generic: Repo Health / Access control (push) Has been cancelled
Generic: Repo Health / Scripts governance (push) Has been cancelled
Generic: Repo Health / Repository health (push) Has been cancelled
Generic: Repo Health / Report Issues (push) Has been cancelled
Merge PR #59: restore licensing system with free tier
2026-06-04 14:31:41 +00:00
jmiller 2f88eb50fb chore: sync .mokogitea/workflows/auto-release.yml from moko-platform [skip ci] 2026-06-04 14:22:50 +00:00
jmiller d22ba60eea chore: sync .mokogitea/workflows/auto-release.yml from moko-platform [skip ci]
Universal: Build & Release / Promote to RC (pull_request) Has been cancelled
Branch Cleanup / Delete merged branch (pull_request) Has been cancelled
Universal: Build & Release / Build & Release Pipeline (pull_request) Has been cancelled
2026-06-04 14:20:08 +00:00
Jonathan Miller 52e362a769 feat: restore licensing system with free tier (no key required)
Generic: Repo Health / Site Health (push) Has been cancelled
Generic: Repo Health / Access control (push) Has been cancelled
Universal: Build & Release / Build & Release Pipeline (pull_request) Has been cancelled
Universal: PR Check / Branch Policy (pull_request) Has been cancelled
Generic: Repo Health / Site Health (pull_request) Has been cancelled
Generic: Repo Health / Access control (pull_request) Has been cancelled
Joomla: Extension CI / Release Readiness Check (pull_request) Has been cancelled
Universal: Secret Scanning / Gitleaks Secret Scan (pull_request) Has been cancelled
Universal: PR Check / Validate PR (pull_request) Has been cancelled
Joomla: Extension CI / Lint & Validate (pull_request) Has been cancelled
Universal: Build & Release / Promote to RC (pull_request) Has been cancelled
Generic: Repo Health / Scripts governance (push) Has been cancelled
Generic: Repo Health / Repository health (push) Has been cancelled
Generic: Repo Health / Report Issues (push) Has been cancelled
Joomla: Extension CI / Tests (PHP 8.2) (pull_request) Has been cancelled
Joomla: Extension CI / Tests (PHP 8.3) (pull_request) Has been cancelled
Joomla: Extension CI / PHPStan Analysis (pull_request) Has been cancelled
Joomla: Extension CI / Build RC Pre-Release (pull_request) Has been cancelled
Universal: PR Check / Build RC Package (pull_request) Has been cancelled
Universal: PR Check / Report Issues (pull_request) Has been cancelled
Generic: Repo Health / Scripts governance (pull_request) Has been cancelled
Generic: Repo Health / Repository health (pull_request) Has been cancelled
Generic: Repo Health / Report Issues (pull_request) Has been cancelled
Re-enable the system plugin license check with a LICENSE_TYPE constant.
Set to 'free' — check exits immediately with zero overhead. Change to
'pro' to enable download key validation. Update plugin descriptions
and CLAUDE.md to document the licensing model.

Authored-by: Moko Consulting
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-06-04 09:14:54 -05:00
jmiller 012f8adc3d chore: sync updates.xml 01.08.00 from main [skip ci] 2026-06-04 13:15:19 +00:00
gitea-actions[bot] 5e7050576a chore: update channels for 01.08.00 [skip ci] 2026-06-04 13:15:18 +00:00
gitea-actions[bot] 95bba21c91 chore(release): build 01.08.00 [skip ci] 2026-06-04 13:15:17 +00:00
jmiller 998f62fcfb Merge pull request 'feat: package restructure, 10 feature expansions, review fixes' (#58) from dev into main
Generic: Repo Health / Site Health (push) Has been cancelled
Generic: Repo Health / Access control (push) Has been cancelled
Generic: Repo Health / Scripts governance (push) Has been cancelled
Generic: Repo Health / Repository health (push) Has been cancelled
Generic: Repo Health / Report Issues (push) Has been cancelled
2026-06-04 13:15:08 +00:00
Jonathan Miller ba5ae04755 chore: merge main into dev, resolve conflicts from package restructure
Generic: Repo Health / Site Health (push) Has been cancelled
Generic: Repo Health / Access control (push) Has been cancelled
Universal: PR Check / Branch Policy (pull_request) Has been cancelled
Generic: Repo Health / Site Health (pull_request) Has been cancelled
Universal: Secret Scanning / Gitleaks Secret Scan (pull_request) Has been cancelled
Generic: Repo Health / Access control (pull_request) Has been cancelled
Joomla: Extension CI / Lint & Validate (pull_request) Has been cancelled
Branch Cleanup / Delete merged branch (pull_request) Has been cancelled
Universal: Build & Release / Promote to RC (pull_request) Has been cancelled
Joomla: Extension CI / Release Readiness Check (pull_request) Has been cancelled
Universal: PR Check / Validate PR (pull_request) Has been cancelled
Universal: Build & Release / Build & Release Pipeline (pull_request) Has been cancelled
Generic: Repo Health / Scripts governance (push) Has been cancelled
Generic: Repo Health / Repository health (push) Has been cancelled
Generic: Repo Health / Report Issues (push) Has been cancelled
Joomla: Extension CI / Tests (PHP 8.2) (pull_request) Has been cancelled
Joomla: Extension CI / Tests (PHP 8.3) (pull_request) Has been cancelled
Joomla: Extension CI / PHPStan Analysis (pull_request) Has been cancelled
Joomla: Extension CI / Build RC Pre-Release (pull_request) Has been cancelled
Universal: PR Check / Build RC Package (pull_request) Has been cancelled
Universal: PR Check / Report Issues (pull_request) Has been cancelled
Generic: Repo Health / Scripts governance (pull_request) Has been cancelled
Generic: Repo Health / Repository health (pull_request) Has been cancelled
Generic: Repo Health / Report Issues (pull_request) Has been cancelled
Resolve modify/delete conflicts for old src/ files that moved to
src/packages/. Keep dev workflow files. Remove deleted cascade-dev.yml.

Authored-by: Moko Consulting
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-06-04 08:14:07 -05:00
jmiller b3b410e190 chore: sync updates.xml 01.08.00-rc from rc [skip ci] 2026-06-04 13:02:22 +00:00
jmiller c38307f98b chore: sync updates.xml 01.08.00-rc from rc [skip ci] 2026-06-04 13:02:21 +00:00
Jonathan Miller c3a4a1f28d fix: final review — logging, null guards, XSS filter, stale descriptions
Universal: Build & Release / Build & Release Pipeline (pull_request) Has been cancelled
Generic: Repo Health / Site Health (pull_request) Has been cancelled
Universal: PR Check / Branch Policy (pull_request) Has been cancelled
Joomla: Extension CI / Release Readiness Check (pull_request) Has been cancelled
Generic: Repo Health / Access control (pull_request) Has been cancelled
Joomla: Extension CI / Lint & Validate (pull_request) Has been cancelled
Universal: Secret Scanning / Gitleaks Secret Scan (pull_request) Has been cancelled
Universal: PR Check / Validate PR (pull_request) Has been cancelled
Generic: Repo Health / Site Health (push) Has been cancelled
Generic: Repo Health / Access control (push) Has been cancelled
Universal: Build & Release / Promote to RC (pull_request) Has been cancelled
Joomla: Extension CI / Tests (PHP 8.2) (pull_request) Has been cancelled
Joomla: Extension CI / Tests (PHP 8.3) (pull_request) Has been cancelled
Joomla: Extension CI / PHPStan Analysis (pull_request) Has been cancelled
Joomla: Extension CI / Build RC Pre-Release (pull_request) Has been cancelled
Universal: PR Check / Build RC Package (pull_request) Has been cancelled
Universal: PR Check / Report Issues (pull_request) Has been cancelled
Generic: Repo Health / Scripts governance (pull_request) Has been cancelled
Generic: Repo Health / Repository health (pull_request) Has been cancelled
Generic: Repo Health / Report Issues (pull_request) Has been cancelled
Generic: Repo Health / Scripts governance (push) Has been cancelled
Generic: Repo Health / Repository health (push) Has been cancelled
Generic: Repo Health / Report Issues (push) Has been cancelled
Add Joomla Log::add for article query, DirectoryIterator, and JSON
decode failures. Filter article content through HTMLHelper content.prepare
to prevent XSS. Add null guards on scroll indicator and mute toggle
hero/icon elements. Add console.warn on slide content JSON parse failure.
Remove stale license key references from package and plugin descriptions.

Authored-by: Moko Consulting
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-06-04 07:58:34 -05:00
Jonathan Miller 4d67a32cb0 feat: article content source, per-slide content, remove license check (#56, #57)
Generic: Repo Health / Site Health (push) Has been cancelled
Generic: Repo Health / Access control (push) Has been cancelled
Generic: Repo Health / Scripts governance (push) Has been cancelled
Generic: Repo Health / Repository health (push) Has been cancelled
Generic: Repo Health / Report Issues (push) Has been cancelled
Add content source selector — manual editor or Joomla article with
optional article title override. Add per-slide unique content via
subform repeatable field with heading, body, link, and link text per
slide, swapped in sync with background transitions using safe DOM
methods. Remove license key check from system plugin and plugin
dependency from module — extension is now free. Language strings in
all locales.

Authored-by: Moko Consulting
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-06-04 07:45:23 -05:00
Jonathan Miller 6f9aa71573 feat: content entrance animations and parallax scroll effect (#48, #52)
Generic: Repo Health / Site Health (push) Has been cancelled
Generic: Repo Health / Access control (push) Has been cancelled
Generic: Repo Health / Scripts governance (push) Has been cancelled
Generic: Repo Health / Repository health (push) Has been cancelled
Generic: Repo Health / Report Issues (push) Has been cancelled
Add configurable content entrance animations (fade-in, slide-up,
slide-left, slide-right) triggered by IntersectionObserver on scroll
into view, with adjustable delay. Add parallax scroll effect with
configurable speed (0.1–0.9) using passive scroll listener and GPU-
accelerated transforms. Both features respect prefers-reduced-motion.
Language strings in all locales.

Authored-by: Moko Consulting
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-06-04 07:37:59 -05:00
Jonathan Miller 4a18f46c68 feat: reduced motion, scroll indicator, and video poster (#49, #50, #51)
Generic: Repo Health / Site Health (push) Has been cancelled
Generic: Repo Health / Access control (push) Has been cancelled
Generic: Repo Health / Scripts governance (push) Has been cancelled
Generic: Repo Health / Repository health (push) Has been cancelled
Generic: Repo Health / Report Issues (push) Has been cancelled
Add prefers-reduced-motion support (WCAG 2.1 AA) — disables slideshow
cycling, CSS transitions/animations, and Ken Burns zoom when OS setting
is enabled. Add optional scroll-down chevron indicator with bounce
animation and smooth-scroll click handler. Add video poster image
fallback displayed while video loads. Language strings in all locales.

Authored-by: Moko Consulting
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-06-04 07:30:12 -05:00
Jonathan Miller f5fdf6742f fix: input validation, JS error handling, and package description
Generic: Repo Health / Site Health (push) Has been cancelled
Generic: Repo Health / Access control (push) Has been cancelled
Generic: Repo Health / Scripts governance (push) Has been cancelled
Generic: Repo Health / Repository health (push) Has been cancelled
Generic: Repo Health / Report Issues (push) Has been cancelled
Add hex color validation for all color params, allowlist validation
for textAlign/fadeType/overlayType, range clamp for gradientAngle,
and try-catch around DirectoryIterator. Fix video.play() promise
rejection and iframe.contentWindow null guards in JS. Hardcode
package description in manifest. Normalize tabs throughout.

Authored-by: Moko Consulting
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-06-04 07:23:31 -05:00
Jonathan Miller fe3abf6ddb feat: vertical alignment, mobile height, and gradient overlay (#53, #54, #55)
Generic: Repo Health / Site Health (push) Has been cancelled
Generic: Repo Health / Access control (push) Has been cancelled
Generic: Repo Health / Scripts governance (push) Has been cancelled
Generic: Repo Health / Repository health (push) Has been cancelled
Generic: Repo Health / Report Issues (push) Has been cancelled
Add vertical text alignment (top/center/bottom) for overlay content,
mobile-specific hero height via CSS custom property, and directional
gradient overlay (dark at bottom/top/left/right) reusing existing
overlay colour controls. Language strings added to all locale files.

Authored-by: Moko Consulting
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-06-04 07:13:04 -05:00
Jonathan Miller 601cf77170 fix: address PR review issues and add configurable slide transitions
Fix CSS injection on heroHeight with regex validation, add missing
language keys to .sys.ini files, fix plugin manifest languages folder
attribute and display name, narrow catch to \Exception with logging,
add error handling to pkg_script auto-enable, fix mobile CSS for
color/gradient modes, add SPDX headers, remove dead code, and update
stale file path headers.

Add configurable transition type for image slideshow: crossfade, slide,
fade-to-black, and zoom (Ken Burns).

Authored-by: Moko Consulting
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-06-04 06:46:47 -05:00
Jonathan Miller 902321de47 feat: restructure as package extension with solid color and gradient hero modes
Generic: Repo Health / Site Health (push) Has been cancelled
Generic: Repo Health / Access control (push) Has been cancelled
Generic: Repo Health / Scripts governance (push) Has been cancelled
Generic: Repo Health / Repository health (push) Has been cancelled
Generic: Repo Health / Report Issues (push) Has been cancelled
Restructure from standalone module to package extension (pkg_mokojoomhero)
containing mod_mokojoomhero and plg_system_mokojoomhero. Add two new hero
modes — solid color and gradient — with color pickers and angle controls,
using Joomla showon for conditional field display.

Authored-by: Moko Consulting
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-06-03 21:21:14 -05:00
jmiller d085c79d9e chore: sync .mokogitea/workflows/repo-health.yml from moko-platform [skip ci] 2026-06-03 09:36:44 +00:00
jmiller ae19e32407 chore: sync .mokogitea/workflows/repo-health.yml from moko-platform [skip ci] 2026-06-03 03:10:24 +00:00
jmiller 61cd30471f chore: add .mokogitea/workflows/auto-release.yml from moko-platform [skip ci] 2026-06-02 23:47:02 +00:00
jmiller 46bfeaa2e1 chore: sync .mokogitea/workflows/pr-check.yml from moko-platform [skip ci] 2026-06-02 21:51:19 +00:00
Moko Consulting ea1391ab38 chore(ci): sync CI issue reporter from Template-Joomla
Generic: Repo Health / Site Health (push) Has been cancelled
Generic: Repo Health / Access control (push) Has been cancelled
Generic: Repo Health / Release configuration (push) Has been cancelled
Generic: Repo Health / Scripts governance (push) Has been cancelled
Generic: Repo Health / Repository health (push) Has been cancelled
Generic: Repo Health / Report Issues (push) Has been cancelled
2026-06-02 21:32:32 +00:00
Moko Consulting fe84d02827 chore(ci): sync CI issue reporter from Template-Joomla
Generic: Repo Health / Site Health (push) Has been cancelled
Generic: Repo Health / Access control (push) Has been cancelled
Generic: Repo Health / Release configuration (push) Has been cancelled
Generic: Repo Health / Scripts governance (push) Has been cancelled
Generic: Repo Health / Repository health (push) Has been cancelled
Generic: Repo Health / Report Issues (push) Has been cancelled
2026-06-02 21:32:30 +00:00
Moko Consulting cfe69452db chore(ci): sync CI issue reporter from Template-Joomla
Generic: Repo Health / Site Health (push) Has been cancelled
Generic: Repo Health / Access control (push) Has been cancelled
Generic: Repo Health / Release configuration (push) Has been cancelled
Generic: Repo Health / Scripts governance (push) Has been cancelled
Generic: Repo Health / Repository health (push) Has been cancelled
Generic: Repo Health / Report Issues (push) Has been cancelled
2026-06-02 21:32:29 +00:00
Moko Consulting a465ee1d38 chore(ci): sync CI issue reporter from Template-Joomla
Generic: Repo Health / Site Health (push) Has been cancelled
Generic: Repo Health / Access control (push) Has been cancelled
Generic: Repo Health / Release configuration (push) Has been cancelled
Generic: Repo Health / Scripts governance (push) Has been cancelled
Generic: Repo Health / Repository health (push) Has been cancelled
Generic: Repo Health / Report Issues (push) Has been cancelled
2026-06-02 21:32:25 +00:00
Moko Consulting 0742f056be chore(ci): sync CI issue reporter from Template-Joomla
Generic: Repo Health / Site Health (push) Has been cancelled
Generic: Repo Health / Access control (push) Has been cancelled
Generic: Repo Health / Release configuration (push) Has been cancelled
Generic: Repo Health / Scripts governance (push) Has been cancelled
Generic: Repo Health / Repository health (push) Has been cancelled
Generic: Repo Health / Report Issues (push) Has been cancelled
2026-06-02 21:32:23 +00:00
Moko Consulting 1b74b9c8d7 chore(ci): sync CI issue reporter from Template-Joomla
Generic: Repo Health / Site Health (push) Has been cancelled
Generic: Repo Health / Access control (push) Has been cancelled
Generic: Repo Health / Release configuration (push) Has been cancelled
Generic: Repo Health / Scripts governance (push) Has been cancelled
Generic: Repo Health / Repository health (push) Has been cancelled
Generic: Repo Health / Report Issues (push) Has been cancelled
2026-06-02 21:32:21 +00:00
Moko Consulting 518f8f8850 chore(ci): add CI issue reporter for auto-filing gate failures
Generic: Repo Health / Site Health (push) Has been cancelled
Generic: Repo Health / Access control (push) Has been cancelled
Generic: Repo Health / Release configuration (push) Has been cancelled
Generic: Repo Health / Scripts governance (push) Has been cancelled
Generic: Repo Health / Repository health (push) Has been cancelled
Generic: Repo Health / Report Issues (push) Has been cancelled
2026-06-02 20:36:43 +00:00
Moko Consulting fe908b68a2 chore(ci): add CI issue reporter for auto-filing gate failures
Generic: Repo Health / Site Health (push) Has been cancelled
Generic: Repo Health / Access control (push) Has been cancelled
Generic: Repo Health / Release configuration (push) Has been cancelled
Generic: Repo Health / Scripts governance (push) Has been cancelled
Generic: Repo Health / Repository health (push) Has been cancelled
Generic: Repo Health / Report Issues (push) Has been cancelled
2026-06-02 20:36:43 +00:00
Moko Consulting b85921697f chore(ci): add CI issue reporter for auto-filing gate failures
Generic: Repo Health / Site Health (push) Has been cancelled
Generic: Repo Health / Access control (push) Has been cancelled
Generic: Repo Health / Release configuration (push) Has been cancelled
Generic: Repo Health / Scripts governance (push) Has been cancelled
Generic: Repo Health / Repository health (push) Has been cancelled
Generic: Repo Health / Report Issues (push) Has been cancelled
2026-06-02 20:36:43 +00:00
Moko Consulting 77b39a2d52 chore(ci): add CI issue reporter for auto-filing gate failures
Generic: Repo Health / Site Health (push) Has been cancelled
Generic: Repo Health / Access control (push) Has been cancelled
Generic: Repo Health / Release configuration (push) Has been cancelled
Generic: Repo Health / Scripts governance (push) Has been cancelled
Generic: Repo Health / Repository health (push) Has been cancelled
Generic: Repo Health / Report Issues (push) Has been cancelled
2026-06-02 20:36:42 +00:00
Moko Consulting 351e86328f chore(ci): add CI issue reporter for auto-filing gate failures
Generic: Repo Health / Site Health (push) Has been cancelled
Generic: Repo Health / Access control (push) Has been cancelled
Generic: Repo Health / Release configuration (push) Has been cancelled
Generic: Repo Health / Scripts governance (push) Has been cancelled
Generic: Repo Health / Repository health (push) Has been cancelled
Generic: Repo Health / Report Issues (push) Has been cancelled
2026-06-02 20:36:41 +00:00
Moko Consulting 31de00c741 chore(ci): add CI issue reporter for auto-filing gate failures
Generic: Repo Health / Site Health (push) Has been cancelled
Generic: Repo Health / Access control (push) Has been cancelled
Generic: Repo Health / Release configuration (push) Has been cancelled
Generic: Repo Health / Scripts governance (push) Has been cancelled
Generic: Repo Health / Repository health (push) Has been cancelled
Generic: Repo Health / Report Issues (push) Has been cancelled
2026-06-02 20:36:41 +00:00
gitea-actions[bot] 595bc94b4b chore(ci): remove update-server.yml for update server migration [skip ci] 2026-05-31 03:47:33 +00:00
gitea-actions[bot] f1049fd289 chore(ci): remove cascade-dev.yml for update server migration [skip ci] 2026-05-31 03:47:31 +00:00
gitea-actions[bot] 79627c4f1d chore(ci): remove auto-bump.yml for update server migration [skip ci] 2026-05-31 03:47:29 +00:00
gitea-actions[bot] 519c735e20 chore(ci): remove pre-release.yml for update server migration [skip ci] 2026-05-31 03:47:24 +00:00
gitea-actions[bot] bc31cad73a chore(ci): remove auto-release.yml for update server migration [skip ci] 2026-05-31 03:47:18 +00:00
jmiller c583ebd56e chore: sync .mokogitea/workflows/cascade-dev.yml from moko-platform [skip ci] 2026-05-31 01:45:07 +00:00
jmiller f9543058df chore: sync .mokogitea/workflows/cascade-dev.yml from moko-platform [skip ci] 2026-05-31 01:41:22 +00:00
jmiller 4b08e5d889 chore: sync CONTRIBUTING.md from moko-platform [skip ci] 2026-05-31 01:09:44 +00:00
Jonathan Miller 2f2832c661 chore(manifest): fix display-name structure and update CONTRIBUTING.md
Generic: Repo Health / Site Health (push) Has been cancelled
Generic: Repo Health / Access control (push) Has been cancelled
Universal: Auto Version Bump / Version Bump (push) Has been cancelled
Generic: Repo Health / Release configuration (push) Has been cancelled
Generic: Repo Health / Scripts governance (push) Has been cancelled
Generic: Repo Health / Repository health (push) Has been cancelled
Standardize manifest.xml identity block: ensure <name> contains only
the machine identifier (PascalCase) and <display-name> contains the
human-readable label with Joomla extension type prefix. Remove duplicate
<version> tags where present. Update CONTRIBUTING.md from moko-platform
default.

Authored-by: Moko Consulting
2026-05-30 19:11:11 -05:00
gitea-actions[bot] 69e75f50fb chore: update channels for 01.07.00 [skip ci] 2026-05-30 22:25:29 +00:00
jmiller 7df3c7afd7 chore: sync updates.xml 01.07.00 from main [skip ci] 2026-05-30 22:25:29 +00:00
51 changed files with 4655 additions and 3310 deletions
-32
View File
@@ -1,32 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
MokoStandards Repository Manifest
Schema: https://standards.mokoconsulting.tech/moko-platform/1.0
See: https://git.mokoconsulting.tech/MokoConsulting/moko-platform/wiki/MANIFEST-STANDARD
-->
<moko-platform xmlns="https://standards.mokoconsulting.tech/moko-platform/1.0" schema-version="1.0">
<identity>
<name>Module - MokoJoomHero</name>
<org>MokoConsulting</org>
<description>A Joomla Module designed to provide a random image from a folder with content on top as a Hero.</description>
<version>01.07.00</version>
<license spdx="GPL-3.0-or-later">GNU General Public License v3</license>
</identity>
<governance>
<platform>joomla</platform>
<standards-version>09.01.00</standards-version>
<standards-source>https://git.mokoconsulting.tech/MokoConsulting/moko-platform</standards-source>
<last-synced>2026-05-30T15:00:00+00:00</last-synced>
</governance>
<build>
<language>PHP</language>
<package-type>joomla-extension</package-type>
<entry-point>src/</entry-point>
</build>
<deploy>
<source-dir>src/</source-dir>
<remote-subdir>modules/mod_mokojoomhero</remote-subdir>
<dev-host>mokoconsulting_dev@waas.dev.mokoconsulting.tech</dev-host>
<demo-host>mokoconsulting_demo@waas.demo.mokoconsulting.tech</demo-host>
</deploy>
</moko-platform>
-464
View File
@@ -1,464 +0,0 @@
# Copyright (C) 2026 Moko Consulting <hello@mokoconsulting.tech>
#
# SPDX-License-Identifier: GPL-3.0-or-later
#
# FILE INFORMATION
# DEFGROUP: Gitea.Workflow
# INGROUP: MokoStandards.Joomla
# REPO: https://git.mokoconsulting.tech/mokoconsulting-tech/MokoStandards-API
# PATH: /templates/workflows/joomla/update-server.yml.template
# VERSION: 04.06.00
# BRIEF: Update Joomla update server XML feed with stable/rc/dev entries
#
# Writes updates.xml with multiple <update> entries:
# - <tag>stable</tag> on push to main (from auto-release)
# - <tag>rc</tag> on push to rc/**
# - <tag>development</tag> on push to dev or dev/**
#
# Joomla filters by user's "Minimum Stability" setting.
name: Update Joomla Update Server XML Feed
on:
push:
branches:
- 'dev'
- 'dev/**'
- 'alpha/**'
- 'beta/**'
- 'rc/**'
paths:
- 'src/**'
- 'htdocs/**'
pull_request:
types: [closed]
branches:
- 'dev'
- 'dev/**'
- 'alpha/**'
- 'beta/**'
- 'rc/**'
paths:
- 'src/**'
- 'htdocs/**'
workflow_dispatch:
inputs:
stability:
description: 'Stability tag'
required: true
default: 'development'
type: choice
options:
- development
- alpha
- beta
- rc
- stable
env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
GITEA_URL: ${{ vars.GITEA_URL || 'https://git.mokoconsulting.tech' }}
GITEA_ORG: ${{ vars.GITEA_ORG || github.repository_owner }}
GITEA_REPO: ${{ vars.GITEA_REPO || github.event.repository.name }}
permissions:
contents: write
jobs:
update-xml:
name: Update updates.xml
runs-on: release
if: >-
github.event.pull_request.merged == true || github.event_name == 'workflow_dispatch' || github.event_name == 'push'
steps:
- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
with:
token: ${{ secrets.GA_TOKEN }}
fetch-depth: 0
- name: Setup MokoStandards tools
env:
MOKO_CLONE_TOKEN: ${{ secrets.GA_TOKEN }}
MOKO_CLONE_HOST: git.mokoconsulting.tech/MokoConsulting
COMPOSER_AUTH: '{"http-basic":{"git.mokoconsulting.tech":{"username":"token","password":"${{ secrets.GA_TOKEN }}"}}}'
run: |
if ! command -v composer &> /dev/null; then
sudo apt-get update -qq && sudo apt-get install -y -qq php-cli php-mbstring php-xml php-zip php-curl composer >/dev/null 2>&1
fi
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: Generate updates.xml entry
id: update
run: |
BRANCH="${{ github.ref_name }}"
REPO="${{ github.repository }}"
API_BASE="${GITEA_URL}/api/v1/repos/${GITEA_ORG}/${GITEA_REPO}"
VERSION=$(php /tmp/mokostandards-api/cli/version_read.php --path . 2>/dev/null || echo "0.0.0")
# Auto-bump patch on all branches (dev, alpha, beta, rc)
git config --local user.email "gitea-actions[bot]@mokoconsulting.tech"
git config --local user.name "gitea-actions[bot]"
BUMPED=$(php /tmp/mokostandards-api/cli/version_bump.php --path . 2>/dev/null || true)
if [ -n "$BUMPED" ]; then
VERSION=$(php /tmp/mokostandards-api/cli/version_read.php --path . 2>/dev/null || echo "$VERSION")
git add -A
git commit -m "chore(version): auto-bump patch ${VERSION} [skip ci]" \
--author="gitea-actions[bot] <gitea-actions[bot]@mokoconsulting.tech>" 2>/dev/null || true
git push 2>/dev/null || true
fi
# Determine stability from branch or input
if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
STABILITY="${{ inputs.stability }}"
elif [[ "$BRANCH" == rc/* ]]; then
STABILITY="rc"
elif [[ "$BRANCH" == beta/* ]]; then
STABILITY="beta"
elif [[ "$BRANCH" == alpha/* ]]; then
STABILITY="alpha"
elif [[ "$BRANCH" == dev/* ]] || [[ "$BRANCH" == "dev" ]]; then
STABILITY="development"
else
STABILITY="stable"
fi
echo "stability=${STABILITY}" >> "$GITHUB_OUTPUT"
# Parse manifest (portable — no grep -P)
MANIFEST=$(find . -maxdepth 3 -name "*.xml" ! -path "./.git/*" ! -path "./build/*" -exec grep -l '<extension' {} \; 2>/dev/null | head -1)
if [ -z "$MANIFEST" ]; then
echo "No Joomla manifest found — skipping"
exit 0
fi
# Extract fields using sed (works on all runners)
EXT_NAME=$(sed -n 's/.*<name>\([^<]*\)<\/name>.*/\1/p' "$MANIFEST" | head -1)
EXT_TYPE=$(sed -n 's/.*<extension[^>]*type="\([^"]*\)".*/\1/p' "$MANIFEST" | head -1)
EXT_ELEMENT=$(sed -n 's/.*<element>\([^<]*\)<\/element>.*/\1/p' "$MANIFEST" | head -1)
EXT_CLIENT=$(sed -n 's/.*<extension[^>]*client="\([^"]*\)".*/\1/p' "$MANIFEST" | head -1)
EXT_FOLDER=$(sed -n 's/.*<extension[^>]*group="\([^"]*\)".*/\1/p' "$MANIFEST" | head -1)
EXT_VERSION=$(sed -n 's/.*<version>\([^<]*\)<\/version>.*/\1/p' "$MANIFEST" | head -1)
TARGET_PLATFORM=$(sed -n 's/.*\(<targetplatform[^/]*\/>\).*/\1/p' "$MANIFEST" | head -1)
PHP_MINIMUM=$(sed -n 's/.*<php_minimum>\([^<]*\)<\/php_minimum>.*/\1/p' "$MANIFEST" | head -1)
# Fallbacks
[ -z "$EXT_NAME" ] && EXT_NAME="${{ github.event.repository.name }}"
[ -z "$EXT_TYPE" ] && EXT_TYPE="component"
# Derive element if not in manifest: try XML filename, then repo name
if [ -z "$EXT_ELEMENT" ]; then
EXT_ELEMENT=$(basename "$MANIFEST" .xml | tr '[:upper:]' '[:lower:]')
case "$EXT_ELEMENT" in
templatedetails|manifest|*.xml) EXT_ELEMENT=$(echo "${{ github.event.repository.name }}" | tr '[:upper:]' '[:lower:]' | tr -d ' -') ;;
esac
fi
# Use manifest version if README version is empty
[ "$VERSION" = "0.0.0" ] && [ -n "$EXT_VERSION" ] && VERSION="$EXT_VERSION"
[ -z "$TARGET_PLATFORM" ] && TARGET_PLATFORM=$(printf '<targetplatform name="joomla" version="((5.[0-9])|(6.[0-9]))" %s>' "/")
CLIENT_TAG=""
[ -n "$EXT_CLIENT" ] && CLIENT_TAG="<client>${EXT_CLIENT}</client>"
[ -z "$CLIENT_TAG" ] && ([ "$EXT_TYPE" = "module" ] || [ "$EXT_TYPE" = "plugin" ]) && CLIENT_TAG="<client>site</client>"
FOLDER_TAG=""
[ -n "$EXT_FOLDER" ] && [ "$EXT_TYPE" = "plugin" ] && FOLDER_TAG="<folder>${EXT_FOLDER}</folder>"
PHP_TAG=""
[ -n "$PHP_MINIMUM" ] && PHP_TAG="<php_minimum>${PHP_MINIMUM}</php_minimum>"
# Version suffix for non-stable
DISPLAY_VERSION="$VERSION"
case "$STABILITY" in
development) DISPLAY_VERSION="${VERSION}-dev" ;;
alpha) DISPLAY_VERSION="${VERSION}-alpha" ;;
beta) DISPLAY_VERSION="${VERSION}-beta" ;;
rc) DISPLAY_VERSION="${VERSION}-rc" ;;
esac
MAJOR=$(echo "$VERSION" | awk -F. '{print $1}')
# Each stability level has its own release tag
case "$STABILITY" in
development) RELEASE_TAG="development" ;;
alpha) RELEASE_TAG="alpha" ;;
beta) RELEASE_TAG="beta" ;;
rc) RELEASE_TAG="release-candidate" ;;
*) RELEASE_TAG="v${MAJOR}" ;;
esac
PACKAGE_NAME="${EXT_ELEMENT}-${DISPLAY_VERSION}.zip"
DOWNLOAD_URL="${GITEA_URL}/${GITEA_ORG}/${GITEA_REPO}/releases/download/${RELEASE_TAG}/${PACKAGE_NAME}"
INFO_URL="${GITEA_URL}/${GITEA_ORG}/${GITEA_REPO}"
# -- Build install packages (ZIP + tar.gz) --------------------
SOURCE_DIR="src"
[ ! -d "$SOURCE_DIR" ] && SOURCE_DIR="htdocs"
if [ -d "$SOURCE_DIR" ]; then
EXCLUDES=".ftpignore sftp-config* *.ppk *.pem *.key .env*"
TAR_NAME="${EXT_ELEMENT}-${DISPLAY_VERSION}.tar.gz"
cd "$SOURCE_DIR"
zip -r "/tmp/${PACKAGE_NAME}" . -x $EXCLUDES
cd ..
tar -czf "/tmp/${TAR_NAME}" -C "$SOURCE_DIR" \
--exclude='.ftpignore' --exclude='sftp-config*' \
--exclude='*.ppk' --exclude='*.pem' --exclude='*.key' --exclude='.env*' .
SHA256=$(sha256sum "/tmp/${PACKAGE_NAME}" | cut -d' ' -f1)
# Ensure release exists on Gitea
RELEASE_JSON=$(curl -sf -H "Authorization: token ${{ secrets.GA_TOKEN }}" \
"${API_BASE}/releases/tags/${RELEASE_TAG}" 2>/dev/null || true)
RELEASE_ID=$(echo "$RELEASE_JSON" | python3 -c "import sys,json; print(json.load(sys.stdin).get('id',''))" 2>/dev/null || true)
if [ -z "$RELEASE_ID" ]; then
# Create release
RELEASE_JSON=$(curl -sf -X POST -H "Authorization: token ${{ secrets.GA_TOKEN }}" \
-H "Content-Type: application/json" \
"${API_BASE}/releases" \
-d "$(python3 -c "import json; print(json.dumps({
'tag_name': '${RELEASE_TAG}',
'name': '${RELEASE_TAG} (${DISPLAY_VERSION})',
'body': '${STABILITY} release',
'prerelease': True,
'target_commitish': 'main'
}))")" 2>/dev/null || true)
RELEASE_ID=$(echo "$RELEASE_JSON" | python3 -c "import sys,json; print(json.load(sys.stdin).get('id',''))" 2>/dev/null || true)
fi
if [ -n "$RELEASE_ID" ]; then
# Delete existing assets with same name before uploading
ASSETS=$(curl -sf -H "Authorization: token ${{ secrets.GA_TOKEN }}" \
"${API_BASE}/releases/${RELEASE_ID}/assets" 2>/dev/null || echo "[]")
for ASSET_FILE in "$PACKAGE_NAME" "$TAR_NAME"; do
ASSET_ID=$(echo "$ASSETS" | python3 -c "
import sys,json
assets = json.load(sys.stdin)
for a in assets:
if a['name'] == '${ASSET_FILE}':
print(a['id']); break
" 2>/dev/null || true)
if [ -n "$ASSET_ID" ]; then
curl -sf -X DELETE -H "Authorization: token ${{ secrets.GA_TOKEN }}" \
"${API_BASE}/releases/${RELEASE_ID}/assets/${ASSET_ID}" 2>/dev/null || true
fi
done
# Upload both formats
curl -sf -X POST -H "Authorization: token ${{ secrets.GA_TOKEN }}" \
-H "Content-Type: application/octet-stream" \
--data-binary @"/tmp/${PACKAGE_NAME}" \
"${API_BASE}/releases/${RELEASE_ID}/assets?name=${PACKAGE_NAME}" > /dev/null 2>&1 || true
curl -sf -X POST -H "Authorization: token ${{ secrets.GA_TOKEN }}" \
-H "Content-Type: application/octet-stream" \
--data-binary @"/tmp/${TAR_NAME}" \
"${API_BASE}/releases/${RELEASE_ID}/assets?name=${TAR_NAME}" > /dev/null 2>&1 || true
fi
echo "Packages: ${PACKAGE_NAME} + ${TAR_NAME} (SHA: ${SHA256})" >> $GITHUB_STEP_SUMMARY
else
SHA256=""
fi
# -- Build the new entry (canonical format matching release.yml) --
NEW_ENTRY=""
NEW_ENTRY="${NEW_ENTRY} <update>\n"
NEW_ENTRY="${NEW_ENTRY} <name>${EXT_NAME}</name>\n"
NEW_ENTRY="${NEW_ENTRY} <description>${EXT_NAME} ${STABILITY} build.</description>\n"
NEW_ENTRY="${NEW_ENTRY} <element>${EXT_ELEMENT}</element>\n"
NEW_ENTRY="${NEW_ENTRY} <type>${EXT_TYPE}</type>\n"
[ -n "$CLIENT_TAG" ] && NEW_ENTRY="${NEW_ENTRY} ${CLIENT_TAG}\n"
[ -n "$FOLDER_TAG" ] && NEW_ENTRY="${NEW_ENTRY} ${FOLDER_TAG}\n"
NEW_ENTRY="${NEW_ENTRY} <version>${VERSION}</version>\n"
NEW_ENTRY="${NEW_ENTRY} <creationDate>$(date +%Y-%m-%d)</creationDate>\n"
NEW_ENTRY="${NEW_ENTRY} <infourl title='${EXT_NAME}'>https://git.mokoconsulting.tech/${GITEA_ORG}/${GITEA_REPO}/releases/tag/${RELEASE_TAG}</infourl>\n"
NEW_ENTRY="${NEW_ENTRY} <downloads>\n"
NEW_ENTRY="${NEW_ENTRY} <downloadurl type='full' format='zip'>${DOWNLOAD_URL}</downloadurl>\n"
NEW_ENTRY="${NEW_ENTRY} </downloads>\n"
[ -n "$SHA256" ] && NEW_ENTRY="${NEW_ENTRY} <sha256>${SHA256}</sha256>\n"
NEW_ENTRY="${NEW_ENTRY} <tags><tag>${STABILITY}</tag></tags>\n"
NEW_ENTRY="${NEW_ENTRY} <maintainer>Moko Consulting</maintainer>\n"
NEW_ENTRY="${NEW_ENTRY} <maintainerurl>https://mokoconsulting.tech</maintainerurl>\n"
NEW_ENTRY="${NEW_ENTRY} <targetplatform name='joomla' version='(5|6).*'/>\n"
[ -n "$PHP_MINIMUM" ] && NEW_ENTRY="${NEW_ENTRY} <php_minimum>${PHP_MINIMUM}</php_minimum>\n"
NEW_ENTRY="${NEW_ENTRY} </update>"
# -- Write new entry to temp file --------------------------------
printf '%b' "$NEW_ENTRY" > /tmp/new_entry.xml
# -- Merge into updates.xml ----------------------------------------
# Cascade: stable→all | rc→rc+lower | beta→beta+lower | alpha→alpha+dev | dev→dev
CASCADE_MAP="stable:development,alpha,beta,rc,stable rc:development,alpha,beta,rc beta:development,alpha,beta alpha:development,alpha development:development"
TARGETS=""
for entry in $CASCADE_MAP; do
key="${entry%%:*}"
vals="${entry#*:}"
if [ "$key" = "${STABILITY}" ]; then
TARGETS="$vals"
break
fi
done
[ -z "$TARGETS" ] && TARGETS="${STABILITY}"
echo "Cascade: ${STABILITY} → ${TARGETS}"
# Create updates.xml if missing
if [ ! -f "updates.xml" ]; then
printf '%s\n' "<?xml version='1.0' encoding='UTF-8'?>" > updates.xml
printf '%s\n' "<!-- Copyright (C) $(date +%Y) Moko Consulting -->" >> updates.xml
printf '%s\n' "<updates>" >> updates.xml
printf '%s\n' "</updates>" >> updates.xml
fi
# Update existing blocks or create missing ones
export PY_TARGETS="$TARGETS" PY_VERSION="$VERSION" PY_DATE="$(date +%Y-%m-%d)"
python3 << 'PYEOF'
import re, os
targets = os.environ["PY_TARGETS"].split(",")
version = os.environ["PY_VERSION"]
date = os.environ["PY_DATE"]
with open("updates.xml") as f:
content = f.read()
with open("/tmp/new_entry.xml") as f:
new_entry_template = f.read()
for tag in targets:
tag = tag.strip()
# Build entry with this tag's name
new_entry = re.sub(r"<tag>[^<]*</tag>", f"<tag>{tag}</tag>", new_entry_template)
# Try to find existing block (handles both single-line and multi-line <tags>)
block_pattern = r"(<update>(?:(?!</update>).)*?<tag>" + re.escape(tag) + r"</tag>.*?</update>)"
match = re.search(block_pattern, content, re.DOTALL)
if match:
# Update in place — replace entire block
content = content.replace(match.group(1), new_entry.strip())
print(f" UPDATED: <tag>{tag}</tag> → {version}")
else:
# Create — insert before </updates>
content = content.replace("</updates>", "\n" + new_entry.strip() + "\n\n</updates>")
print(f" CREATED: <tag>{tag}</tag> → {version}")
# Clean up excessive blank lines
content = re.sub(r"\n{3,}", "\n\n", content)
with open("updates.xml", "w") as f:
f.write(content)
PYEOF
# Commit
git config --local user.email "gitea-actions[bot]@mokoconsulting.tech"
git config --local user.name "gitea-actions[bot]"
git add updates.xml
git diff --cached --quiet || {
git commit -m "chore: update updates.xml (${STABILITY}: ${DISPLAY_VERSION}) [skip ci]" \
--author="gitea-actions[bot] <gitea-actions[bot]@mokoconsulting.tech>"
git push
}
# -- Sync updates.xml to main (for non-main branches) ----------------------
- name: Sync updates.xml to main
if: github.ref_name != 'main'
run: |
API_BASE="${GITEA_URL}/api/v1/repos/${GITEA_ORG}/${GITEA_REPO}"
GA_TOKEN="${{ secrets.GA_TOKEN }}"
FILE_SHA=$(curl -sf -H "Authorization: token ${GA_TOKEN}" \
"${API_BASE}/contents/updates.xml?ref=main" | python3 -c "import sys,json; print(json.load(sys.stdin).get('sha',''))" 2>/dev/null || true)
if [ -n "$FILE_SHA" ] && [ -f "updates.xml" ]; then
CONTENT=$(base64 -w0 updates.xml)
curl -sf -X PUT -H "Authorization: token ${GA_TOKEN}" \
-H "Content-Type: application/json" \
"${API_BASE}/contents/updates.xml" \
-d "$(python3 -c "import json; print(json.dumps({
'content': '${CONTENT}',
'sha': '${FILE_SHA}',
'message': 'chore: sync updates.xml from ${STABILITY} [skip ci]',
'branch': 'main'
}))")" > /dev/null 2>&1 \
&& echo "updates.xml synced to main (${STABILITY})" >> $GITHUB_STEP_SUMMARY \
|| echo "WARNING: failed to sync updates.xml to main" >> $GITHUB_STEP_SUMMARY
else
echo "WARNING: could not get updates.xml SHA from main" >> $GITHUB_STEP_SUMMARY
fi
- name: SFTP deploy to dev server
if: contains(github.ref, 'dev/') || github.ref == 'refs/heads/dev'
env:
DEV_HOST: ${{ vars.DEV_FTP_HOST }}
DEV_PATH: ${{ vars.DEV_FTP_PATH }}
DEV_SUFFIX: ${{ vars.DEV_FTP_SUFFIX }}
DEV_USER: ${{ vars.DEV_FTP_USERNAME }}
DEV_PORT: ${{ vars.DEV_FTP_PORT }}
DEV_KEY: ${{ secrets.DEV_FTP_KEY }}
DEV_PASS: ${{ secrets.DEV_FTP_PASSWORD }}
run: |
# -- Permission check: admin or maintain role required --------
ACTOR="${{ github.actor }}"
REPO="${{ github.repository }}"
API_BASE="${GITEA_URL}/api/v1/repos/${GITEA_ORG}/${GITEA_REPO}"
PERMISSION=$(curl -sf -H "Authorization: token ${{ secrets.GA_TOKEN }}" \
"${API_BASE}/collaborators/${ACTOR}/permission" 2>/dev/null | \
python3 -c "import sys,json; print(json.load(sys.stdin).get('permission','read'))" 2>/dev/null || echo "read")
case "$PERMISSION" in
admin|maintain|write) ;;
*)
echo "Deploy denied: ${ACTOR} has '${PERMISSION}' — requires admin, maintain, or write"
exit 0
;;
esac
[ -z "$DEV_HOST" ] || [ -z "$DEV_PATH" ] && { echo "DEV FTP not configured — skipping SFTP"; exit 0; }
SOURCE_DIR="src"
[ ! -d "$SOURCE_DIR" ] && SOURCE_DIR="htdocs"
[ ! -d "$SOURCE_DIR" ] && exit 0
PORT="${DEV_PORT:-22}"
REMOTE="${DEV_PATH%/}"
[ -n "$DEV_SUFFIX" ] && REMOTE="${REMOTE}/${DEV_SUFFIX#/}"
printf '{"host":"%s","port":%s,"username":"%s","remotePath":"%s"' \
"$DEV_HOST" "$PORT" "$DEV_USER" "$REMOTE" > /tmp/sftp-config.json
if [ -n "$DEV_KEY" ]; then
echo "$DEV_KEY" > /tmp/deploy_key && chmod 600 /tmp/deploy_key
printf ',"privateKeyPath":"/tmp/deploy_key"}' >> /tmp/sftp-config.json
else
printf ',"password":"%s"}' "$DEV_PASS" >> /tmp/sftp-config.json
fi
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 --path . --src-dir "$SOURCE_DIR" --config /tmp/sftp-config.json
elif [ -f "/tmp/mokostandards-api/deploy/deploy-sftp.php" ]; then
php /tmp/mokostandards-api/deploy/deploy-sftp.php --path . --src-dir "$SOURCE_DIR" --config /tmp/sftp-config.json
fi
rm -f /tmp/deploy_key /tmp/sftp-config.json
echo "SFTP deploy to dev complete" >> $GITHUB_STEP_SUMMARY
- name: Summary
if: always()
run: |
echo "## Joomla Update Server" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "| Field | Value |" >> $GITHUB_STEP_SUMMARY
echo "|-------|-------|" >> $GITHUB_STEP_SUMMARY
echo "| Stability | \`${STABILITY}\` |" >> $GITHUB_STEP_SUMMARY
echo "| Version | \`${DISPLAY_VERSION}\` |" >> $GITHUB_STEP_SUMMARY
echo "| Element | \`${EXT_ELEMENT}\` |" >> $GITHUB_STEP_SUMMARY
echo "| Download | [ZIP](${DOWNLOAD_URL}) |" >> $GITHUB_STEP_SUMMARY
+9 -9
View File
@@ -4,8 +4,8 @@
# #
# FILE INFORMATION # FILE INFORMATION
# DEFGROUP: Gitea.Workflow # DEFGROUP: Gitea.Workflow
# INGROUP: moko-platform.Release # INGROUP: mokocli.Release
# REPO: https://git.mokoconsulting.tech/MokoConsulting/moko-platform # REPO: https://git.mokoconsulting.tech/MokoConsulting/mokocli
# PATH: /.mokogitea/workflows/auto-bump.yml # PATH: /.mokogitea/workflows/auto-bump.yml
# VERSION: 09.02.00 # VERSION: 09.02.00
# BRIEF: Auto patch-bump version on every push to dev (skips merge commits) # BRIEF: Auto patch-bump version on every push to dev (skips merge commits)
@@ -43,19 +43,19 @@ jobs:
token: ${{ secrets.MOKOGITEA_TOKEN }} token: ${{ secrets.MOKOGITEA_TOKEN }}
fetch-depth: 1 fetch-depth: 1
- name: Setup moko-platform tools - name: Setup mokocli tools
run: | run: |
if ! command -v composer &> /dev/null; then if ! command -v composer &> /dev/null; then
sudo apt-get update -qq && sudo apt-get install -y -qq php-cli php-mbstring php-xml php-zip php-curl composer >/dev/null 2>&1 sudo apt-get update -qq && sudo apt-get install -y -qq php-cli php-mbstring php-xml php-zip php-curl composer >/dev/null 2>&1
fi fi
if [ -d "/opt/moko-platform/cli" ]; then if [ -d "/opt/mokocli/cli" ]; then
echo "MOKO_CLI=/opt/moko-platform/cli" >> "$GITHUB_ENV" echo "MOKO_CLI=/opt/mokocli/cli" >> "$GITHUB_ENV"
else else
git clone --depth 1 --branch main --quiet \ git clone --depth 1 --branch main --quiet \
"https://x-access-token:${{ secrets.MOKOGITEA_TOKEN }}@git.mokoconsulting.tech/MokoConsulting/moko-platform.git" \ "https://x-access-token:${{ secrets.MOKOGITEA_TOKEN }}@git.mokoconsulting.tech/MokoConsulting/mokocli.git" \
/tmp/moko-platform-api /tmp/mokocli
cd /tmp/moko-platform-api && composer install --no-dev --no-interaction --quiet cd /tmp/mokocli && composer install --no-dev --no-interaction --quiet
echo "MOKO_CLI=/tmp/moko-platform-api/cli" >> "$GITHUB_ENV" echo "MOKO_CLI=/tmp/mokocli/cli" >> "$GITHUB_ENV"
fi fi
- name: Bump version - name: Bump version
+466 -270
View File
@@ -1,270 +1,466 @@
# Copyright (C) 2026 Moko Consulting <hello@mokoconsulting.tech> # Copyright (C) 2026 Moko Consulting <hello@mokoconsulting.tech>
# #
# SPDX-License-Identifier: GPL-3.0-or-later # SPDX-License-Identifier: GPL-3.0-or-later
# #
# FILE INFORMATION # FILE INFORMATION
# DEFGROUP: Gitea.Workflow # DEFGROUP: Gitea.Workflow
# INGROUP: moko-platform.Release # INGROUP: mokocli.Release
# REPO: https://git.mokoconsulting.tech/mokoconsulting-tech/moko-platform # REPO: https://git.mokoconsulting.tech/mokoconsulting-tech/mokocli
# PATH: /templates/workflows/universal/auto-release.yml.template # PATH: /templates/workflows/universal/auto-release.yml.template
# VERSION: 05.00.00 # VERSION: 05.00.00
# BRIEF: Universal build & release detects platform from manifest.xml # BRIEF: Universal build & release detects platform from manifest.xml
# #
# +========================================================================+ # +=======================================================================+
# | UNIVERSAL BUILD & RELEASE PIPELINE | # | UNIVERSAL BUILD & RELEASE PIPELINE |
# +========================================================================+ # +=======================================================================+
# | | # | |
# | Reads manifest.xml (joomla|dolibarr|generic) to branch logic. | # | Reads manifest.xml (joomla|dolibarr|generic) to branch logic. |
# | | # | |
# | Platform-specific: | # | Platform-specific: |
# | joomla: XML manifest, updates.xml, type-prefixed packages | # | joomla: XML manifest, type-prefixed packages |
# | dolibarr: mod*.class.php, update.txt, dev version reset | # | dolibarr: mod*.class.php, update.txt, dev version reset |
# | generic: README-only, no update stream | # | generic: README-only, no update stream |
# | | # | |
# +========================================================================+ # +=======================================================================+
name: "Universal: Build & Release" name: "Universal: Build & Release"
on: on:
pull_request: pull_request:
types: [opened, closed] types: [opened, closed]
branches: branches:
- main - main
workflow_dispatch: paths-ignore:
inputs: - '.mokogitea/workflows/**'
action: - '*.md'
description: 'Action to perform' - 'wiki/**'
required: false - '.editorconfig'
type: choice - '.gitignore'
default: release - '.gitattributes'
options: - '.gitmessage'
- release - 'LICENSE'
- promote-rc workflow_dispatch:
inputs:
env: action:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true description: 'Action to perform'
GITEA_URL: ${{ vars.GITEA_URL || 'https://git.mokoconsulting.tech' }} required: false
GITEA_ORG: ${{ vars.GITEA_ORG || github.repository_owner }} type: choice
GITEA_REPO: ${{ vars.GITEA_REPO || github.event.repository.name }} default: release
options:
permissions: - release
contents: write - promote-rc
jobs: env:
# ── PR Opened → Rename branch to RC and build RC release ───────────────────── FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
promote-rc: GITEA_URL: ${{ vars.GITEA_URL || 'https://git.mokoconsulting.tech' }}
name: Promote to RC GITEA_ORG: ${{ vars.GITEA_ORG || github.repository_owner }}
runs-on: release GITEA_REPO: ${{ vars.GITEA_REPO || github.event.repository.name }}
if: >-
(github.event.action == 'opened' && github.event.pull_request.merged != true) || permissions:
(github.event_name == 'workflow_dispatch' && inputs.action == 'promote-rc') contents: write
steps: jobs:
- name: Checkout repository # ── PR Opened → Rename branch to RC and build RC release ─────────────────────────
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 promote-rc:
with: name: Promote to RC
token: ${{ secrets.MOKOGITEA_TOKEN }} runs-on: release
fetch-depth: 1 if: >-
(github.event.action == 'opened' && github.event.pull_request.merged != true) ||
- name: Setup moko-platform tools (github.event_name == 'workflow_dispatch' && inputs.action == 'promote-rc')
env:
MOKO_CLONE_TOKEN: ${{ secrets.MOKOGITEA_TOKEN }} steps:
MOKO_CLONE_HOST: git.mokoconsulting.tech/MokoConsulting - name: Checkout repository
run: | uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
if ! command -v composer &> /dev/null; then with:
sudo apt-get update -qq && sudo apt-get install -y -qq php-cli php-mbstring php-xml php-zip php-curl composer >/dev/null 2>&1 token: ${{ secrets.MOKOGITEA_TOKEN }}
fi fetch-depth: 1
# Always fetch latest CLI tools — never use stale cache from previous runs
rm -rf /tmp/moko-platform-api - name: Setup mokocli tools
git clone --depth 1 --branch main --quiet \ env:
"https://x-access-token:${MOKO_CLONE_TOKEN}@${MOKO_CLONE_HOST}/moko-platform.git" \ MOKO_CLONE_TOKEN: ${{ secrets.MOKOGITEA_TOKEN }}
/tmp/moko-platform-api MOKO_CLONE_HOST: git.mokoconsulting.tech/MokoConsulting
cd /tmp/moko-platform-api run: |
composer install --no-dev --no-interaction --quiet if [ -f /opt/mokocli/cli/version_bump.php ] && [ -f /opt/mokocli/vendor/autoload.php ]; then
echo Using pre-installed /opt/mokocli
- name: Rename branch to rc echo MOKO_CLI=/opt/mokocli/cli >> $GITHUB_ENV
run: | else
php /tmp/moko-platform-api/cli/branch_rename.php \ echo Falling back to fresh clone
--from "${{ github.event.pull_request.head.ref || 'dev' }}" --to rc \ if ! command -v composer > /dev/null 2>&1; then
--token "${{ secrets.MOKOGITEA_TOKEN }}" \ sudo apt-get update -qq && sudo apt-get install -y -qq php-cli php-mbstring php-xml php-zip php-curl composer > /dev/null 2>&1
--api-base "${GITEA_URL}/api/v1/repos/${GITEA_ORG}/${GITEA_REPO}" \ fi
--pr "${{ github.event.pull_request.number }}" rm -rf /tmp/mokocli
CLONE_URL=https://x-access-token:${MOKO_CLONE_TOKEN}@${MOKO_CLONE_HOST}/mokocli.git
- name: Checkout rc and configure git git clone --depth 1 --branch main --quiet $CLONE_URL /tmp/mokocli
run: | cd /tmp/mokocli
git fetch origin rc composer install --no-dev --no-interaction --quiet
git checkout rc echo MOKO_CLI=/tmp/mokocli/cli >> $GITHUB_ENV
git config --local user.email "gitea-actions[bot]@mokoconsulting.tech" fi
git config --local user.name "gitea-actions[bot]"
git remote set-url origin "https://x-access-token:${{ secrets.MOKOGITEA_TOKEN }}@git.mokoconsulting.tech/${{ github.repository }}.git" - name: Rename branch to rc
run: |
- name: Publish RC release php ${MOKO_CLI}/branch_rename.php \
run: | --from "${{ github.event.pull_request.head.ref || 'dev' }}" --to rc \
php /tmp/moko-platform-api/cli/release_publish.php \ --token "${{ secrets.MOKOGITEA_TOKEN }}" \
--path . --stability rc --bump minor --branch rc \ --api-base "${GITEA_URL}/api/v1/repos/${GITEA_ORG}/${GITEA_REPO}" \
--token "${{ secrets.MOKOGITEA_TOKEN }}" --pr "${{ github.event.pull_request.number }}"
- name: Summary - name: Checkout rc and configure git
if: always() run: |
run: | git fetch origin rc
echo "## Promoted to Release Candidate" >> $GITHUB_STEP_SUMMARY git checkout rc
echo "Branch renamed to rc, minor bump, RC + lesser stream releases built, updates.xml synced" >> $GITHUB_STEP_SUMMARY git config --local user.email "gitea-actions[bot]@mokoconsulting.tech"
git config --local user.name "gitea-actions[bot]"
# ── Merged PR → Build & Release (or promote RC to stable) ──────────────────── git remote set-url origin "https://x-access-token:${{ secrets.MOKOGITEA_TOKEN }}@git.mokoconsulting.tech/${{ github.repository }}.git"
release:
name: Build & Release Pipeline - name: Publish RC release
runs-on: release run: |
if: >- php ${MOKO_CLI}/release_publish.php \
github.event.pull_request.merged == true || --path . --stability rc --bump minor --branch rc \
(github.event_name == 'workflow_dispatch' && inputs.action != 'promote-rc') --token "${{ secrets.MOKOGITEA_TOKEN }}"
steps: - name: Update RC release notes from CHANGELOG.md
- name: Checkout repository run: |
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 API_BASE="${GITEA_URL}/api/v1/repos/${GITEA_ORG}/${GITEA_REPO}"
with: TOKEN="${{ secrets.MOKOGITEA_TOKEN }}"
token: ${{ secrets.MOKOGITEA_TOKEN }}
fetch-depth: 0 # Extract [Unreleased] section from changelog
NOTES=""
- name: Configure git for bot pushes if [ -f "CHANGELOG.md" ]; then
run: | NOTES=$(awk '/^## \[Unreleased\]/{found=1; next} /^## \[/{if(found) exit} found{print}' CHANGELOG.md)
git config --local user.email "gitea-actions[bot]@mokoconsulting.tech" fi
git config --local user.name "gitea-actions[bot]" [ -z "$NOTES" ] && NOTES="Release candidate"
git remote set-url origin "https://x-access-token:${{ secrets.MOKOGITEA_TOKEN }}@git.mokoconsulting.tech/${{ github.repository }}.git"
# Find the RC release and update its body
- name: Setup moko-platform tools RELEASE_ID=$(curl -sf -H "Authorization: token ${TOKEN}" \
env: "${API_BASE}/releases/tags/release-candidate" \
MOKO_CLONE_TOKEN: ${{ secrets.MOKOGITEA_TOKEN }} | python3 -c "import json,sys; print(json.load(sys.stdin).get('id',''))" 2>/dev/null || true)
MOKO_CLONE_HOST: git.mokoconsulting.tech/MokoConsulting
COMPOSER_AUTH: '{"github-oauth":{"github.com":"${{ secrets.GH_MIRROR_TOKEN }}"}}' if [ -n "$RELEASE_ID" ]; then
run: | python3 -c "
# Ensure PHP + Composer are available import json, urllib.request
if ! command -v composer &> /dev/null; then body = open('/dev/stdin').read()
sudo apt-get update -qq && sudo apt-get install -y -qq php-cli php-mbstring php-xml php-zip php-curl composer >/dev/null 2>&1 payload = json.dumps({'body': body}).encode()
fi req = urllib.request.Request(
# Always fetch latest CLI tools — never use stale cache from previous runs '${API_BASE}/releases/${RELEASE_ID}',
rm -rf /tmp/moko-platform-api data=payload, method='PATCH',
git clone --depth 1 --branch main --quiet \ headers={
"https://x-access-token:${MOKO_CLONE_TOKEN}@${MOKO_CLONE_HOST}/moko-platform.git" \ 'Authorization': 'token ${TOKEN}',
/tmp/moko-platform-api 'Content-Type': 'application/json'
cd /tmp/moko-platform-api })
composer install --no-dev --no-interaction --quiet urllib.request.urlopen(req)
" <<< "$NOTES"
echo "RC release notes updated from CHANGELOG.md"
- name: "Publish stable release" fi
run: |
php /tmp/moko-platform-api/cli/release_publish.php \ - name: Summary
--path . --stability stable --bump minor --branch main \ if: always()
--token "${{ secrets.MOKOGITEA_TOKEN }}" run: |
echo "## Promoted to Release Candidate" >> $GITHUB_STEP_SUMMARY
# -- STEP 9: Mirror to GitHub (stable only) -------------------------------- echo "Branch renamed to rc, minor bump, RC release built" >> $GITHUB_STEP_SUMMARY
- name: "Step 9: Mirror release to GitHub"
if: >- # ── Merged PR → Build & Release (or promote RC to stable) ─────────────────────────
steps.version.outputs.skip != 'true' && release:
secrets.GH_MIRROR_TOKEN != '' name: Build & Release Pipeline
continue-on-error: true runs-on: release
run: | if: >-
VERSION="${{ steps.bump.outputs.version || steps.version.outputs.version }}" github.event.pull_request.merged == true ||
RELEASE_TAG="${{ steps.version.outputs.release_tag }}" (github.event_name == 'workflow_dispatch' && inputs.action != 'promote-rc')
GH_REPO="${{ vars.GH_MIRROR_REPO || github.repository }}"
API_BASE="${GITEA_URL}/api/v1/repos/${GITEA_ORG}/${GITEA_REPO}" steps:
php /tmp/moko-platform-api/cli/release_mirror.php \ - name: Checkout repository
--version "$VERSION" --tag "$RELEASE_TAG" \ uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
--token "${{ secrets.MOKOGITEA_TOKEN }}" --api-base "$API_BASE" \ with:
--gh-token "${{ secrets.GH_MIRROR_TOKEN }}" --gh-repo "$GH_REPO" \ token: ${{ secrets.MOKOGITEA_TOKEN }}
--branch main 2>&1 || true fetch-depth: 0
echo "GitHub mirror updated" >> $GITHUB_STEP_SUMMARY
- name: Configure git for bot pushes
# -- STEP 10: Sync main branch to GitHub mirror ---------------------------- run: |
- name: "Step 10: Push main to GitHub mirror" git config --local user.email "gitea-actions[bot]@mokoconsulting.tech"
if: >- git config --local user.name "gitea-actions[bot]"
steps.version.outputs.skip != 'true' && git remote set-url origin "https://x-access-token:${{ secrets.MOKOGITEA_TOKEN }}@git.mokoconsulting.tech/${{ github.repository }}.git"
secrets.GH_MIRROR_TOKEN != ''
continue-on-error: true - name: Check for merge conflict markers
run: | run: |
GH_REPO="${{ vars.GH_MIRROR_REPO || github.repository }}" CONFLICTS=$(grep -rn '<<<<<<< \|>>>>>>> \|^=======$' --include='*.php' --include='*.xml' --include='*.css' --include='*.js' --include='*.json' --include='*.md' --include='*.yml' --include='*.yaml' --include='*.ini' --include='*.txt' . 2>/dev/null | grep -v '.git/' || true)
GH_ORG=$(echo "$GH_REPO" | cut -d/ -f1) if [ -n "$CONFLICTS" ]; then
GH_NAME=$(echo "$GH_REPO" | cut -d/ -f2) echo "::error::Merge conflict markers found — aborting release"
git remote add github "https://x-access-token:${{ secrets.GH_MIRROR_TOKEN }}@github.com/${GH_ORG}/${GH_NAME}.git" 2>/dev/null || \ echo "## Release Blocked: Conflict Markers" >> $GITHUB_STEP_SUMMARY
git remote set-url github "https://x-access-token:${{ secrets.GH_MIRROR_TOKEN }}@github.com/${GH_ORG}/${GH_NAME}.git" echo '```' >> $GITHUB_STEP_SUMMARY
git fetch origin main --depth=1 echo "$CONFLICTS" >> $GITHUB_STEP_SUMMARY
git push github origin/main:refs/heads/main --force 2>/dev/null \ echo '```' >> $GITHUB_STEP_SUMMARY
&& echo "main branch pushed to GitHub mirror" \ exit 1
|| echo "WARNING: GitHub mirror push failed" fi
echo "No conflict markers found"
- name: "Step 11: Delete rc branch and recreate dev from main"
if: steps.version.outputs.skip != 'true' - name: Setup mokocli tools
continue-on-error: true env:
run: | MOKO_CLONE_TOKEN: ${{ secrets.MOKOGITEA_TOKEN }}
API_BASE="${GITEA_URL}/api/v1/repos/${GITEA_ORG}/${GITEA_REPO}" MOKO_CLONE_HOST: git.mokoconsulting.tech/MokoConsulting
TOKEN="${{ secrets.MOKOGITEA_TOKEN }}" COMPOSER_AUTH: '{"github-oauth":{"github.com":"${{ secrets.GH_MIRROR_TOKEN }}"}}'
run: |
# Delete rc branch (ephemeral — created by promote-rc) if [ -f /opt/mokocli/cli/version_bump.php ] && [ -f /opt/mokocli/vendor/autoload.php ]; then
curl -sf -X DELETE -H "Authorization: token ${TOKEN}" \ echo Using pre-installed /opt/mokocli
"${API_BASE}/branches/rc" 2>/dev/null \ echo MOKO_CLI=/opt/mokocli/cli >> $GITHUB_ENV
&& echo "Deleted rc branch" || echo "rc branch not found" else
echo Falling back to fresh clone
# Delete dev branch if ! command -v composer > /dev/null 2>&1; then
curl -sf -X DELETE -H "Authorization: token ${TOKEN}" \ sudo apt-get update -qq && sudo apt-get install -y -qq php-cli php-mbstring php-xml php-zip php-curl composer > /dev/null 2>&1
"${API_BASE}/branches/dev" 2>/dev/null && echo "Deleted dev branch" fi
rm -rf /tmp/mokocli
# Recreate dev from main (now includes version bump + changelog promotion) CLONE_URL=https://x-access-token:${MOKO_CLONE_TOKEN}@${MOKO_CLONE_HOST}/mokocli.git
curl -sf -X POST -H "Authorization: token ${TOKEN}" \ git clone --depth 1 --branch main --quiet $CLONE_URL /tmp/mokocli
-H "Content-Type: application/json" \ cd /tmp/mokocli
"${API_BASE}/branches" \ composer install --no-dev --no-interaction --quiet
-d '{"new_branch_name":"dev","old_branch_name":"main"}' 2>/dev/null && echo "Recreated dev from main" echo MOKO_CLI=/tmp/mokocli/cli >> $GITHUB_ENV
fi
echo "Pre-release branches cleaned, dev reset from main" >> $GITHUB_STEP_SUMMARY
- name: "Detect platform"
- name: "Step 12: Create version branch from main" id: platform
if: steps.version.outputs.skip != 'true' run: |
continue-on-error: true php ${MOKO_CLI}/platform_detect.php --path . --github-output 2>/dev/null || true
run: | php ${MOKO_CLI}/manifest_read.php --path . --github-output 2>/dev/null || true
API_BASE="${GITEA_URL}/api/v1/repos/${GITEA_ORG}/${GITEA_REPO}"
TOKEN="${{ secrets.MOKOGITEA_TOKEN }}" - name: "Determine version bump level"
VERSION="${{ steps.bump.outputs.version || steps.version.outputs.version }}" id: bump
BRANCH_NAME="version/${VERSION}" run: |
MAIN_SHA=$(git rev-parse HEAD) # Fix/patch branches: version was already bumped by pre-release, just strip suffix
# Feature/dev branches: bump minor for the new stable release
# Delete old version branch if it exists (same version re-release) HEAD_REF="${{ github.event.pull_request.head.ref || 'dev' }}"
curl -sf -X DELETE -H "Authorization: token ${TOKEN}" "${API_BASE}/branches/${BRANCH_NAME}" 2>/dev/null && echo "Deleted old ${BRANCH_NAME}" case "$HEAD_REF" in
fix/*|patch/*|hotfix/*|bugfix/*) BUMP="none" ;;
# Create version/XX.YY.ZZ from main *) BUMP="minor" ;;
curl -sf -X POST -H "Authorization: token ${TOKEN}" -H "Content-Type: application/json" "${API_BASE}/branches" -d "{\"new_branch_name\":\"${BRANCH_NAME}\",\"old_branch_name\":\"main\"}" 2>/dev/null && echo "Created ${BRANCH_NAME} from main (${MAIN_SHA})" || echo "WARNING: ${BRANCH_NAME} creation failed" esac
echo "level=${BUMP}" >> "$GITHUB_OUTPUT"
echo "Version branch created: ${BRANCH_NAME} (${MAIN_SHA})" >> $GITHUB_STEP_SUMMARY echo "Bump level: ${BUMP} (from branch: ${HEAD_REF})"
- name: "Publish stable release"
run: |
# -- Dolibarr post-release: Reset dev version ----------------------------- BUMP_FLAG=""
- name: "Post-release: Reset dev version" if [ "${{ steps.bump.outputs.level }}" != "none" ]; then
if: steps.version.outputs.skip != 'true' BUMP_FLAG="--bump ${{ steps.bump.outputs.level }}"
continue-on-error: true fi
run: | php ${MOKO_CLI}/release_publish.php \
API_BASE="${GITEA_URL}/api/v1/repos/${GITEA_ORG}/${GITEA_REPO}" --path . --stability stable ${BUMP_FLAG} --branch main \
php /tmp/moko-platform-api/cli/version_reset_dev.php \ --token "${{ secrets.MOKOGITEA_TOKEN }}"
--token "${{ secrets.MOKOGITEA_TOKEN }}" --api-base "${API_BASE}" \
--branch dev --path . 2>&1 || true - name: "Read published version"
id: version
# -- Summary -------------------------------------------------------------- run: |
- name: Pipeline Summary VERSION=$(php ${MOKO_CLI}/version_read.php --path . 2>/dev/null || echo "")
if: always() VERSION=$(echo "$VERSION" | sed 's/-\(dev\|alpha\|beta\|rc\)$//')
run: | [ -z "$VERSION" ] && VERSION="00.00.00" && echo "skip=true" >> "$GITHUB_OUTPUT"
VERSION="${{ steps.bump.outputs.version || steps.version.outputs.version }}" echo "version=${VERSION}" >> "$GITHUB_OUTPUT"
PLATFORM="${{ steps.platform.outputs.platform }}" PLATFORM="${{ steps.platform.outputs.platform }}"
if [ "${{ steps.version.outputs.skip }}" = "true" ]; then if [[ "$PLATFORM" == joomla* ]]; then
echo "## Release Skipped" >> $GITHUB_STEP_SUMMARY echo "tag=stable" >> "$GITHUB_OUTPUT"
echo "No VERSION in README.md" >> $GITHUB_STEP_SUMMARY echo "release_tag=stable" >> "$GITHUB_OUTPUT"
elif [ "${{ steps.check.outputs.already_released }}" = "true" ]; then else
echo "## Already Released — ${VERSION}" >> $GITHUB_STEP_SUMMARY echo "tag=v${VERSION}" >> "$GITHUB_OUTPUT"
else echo "release_tag=v${VERSION}" >> "$GITHUB_OUTPUT"
echo "" >> $GITHUB_STEP_SUMMARY fi
echo "## Build & Release Complete (${PLATFORM})" >> $GITHUB_STEP_SUMMARY echo "branch=main" >> "$GITHUB_OUTPUT"
echo "" >> $GITHUB_STEP_SUMMARY echo "Published version: ${VERSION}"
echo "| Step | Result |" >> $GITHUB_STEP_SUMMARY
echo "|------|--------|" >> $GITHUB_STEP_SUMMARY - name: "Create semver tag for non-Joomla repos"
echo "| Platform | \`${PLATFORM}\` |" >> $GITHUB_STEP_SUMMARY id: semver
echo "| Version | \`${VERSION}\` |" >> $GITHUB_STEP_SUMMARY if: |
echo "| Branch | \`${{ steps.version.outputs.branch }}\` |" >> $GITHUB_STEP_SUMMARY steps.version.outputs.skip != 'true' &&
echo "| Tag | \`${{ steps.version.outputs.tag }}\` |" >> $GITHUB_STEP_SUMMARY !startsWith(steps.platform.outputs.platform, 'joomla')
echo "| Release | [View](${GITEA_URL}/${GITEA_ORG}/${GITEA_REPO}/releases/tag/${{ steps.version.outputs.tag }}) |" >> $GITHUB_STEP_SUMMARY run: |
fi VERSION="${{ steps.version.outputs.version }}"
API_BASE="${GITEA_URL}/api/v1/repos/${GITEA_ORG}/${GITEA_REPO}"
TOKEN="${{ secrets.MOKOGITEA_TOKEN }}"
SEMVER_TAG="v${VERSION}"
echo "Creating semver tag: ${SEMVER_TAG}"
# Create the git tag via API
HTTP_CODE=$(curl -sf -o /dev/null -w "%{http_code}" \
-X POST -H "Authorization: token ${TOKEN}" \
-H "Content-Type: application/json" \
"${API_BASE}/tags" \
-d "{\"tag_name\":\"${SEMVER_TAG}\",\"target\":\"main\",\"message\":\"Release ${VERSION}\"}" 2>/dev/null || echo "000")
if [ "$HTTP_CODE" = "201" ] || [ "$HTTP_CODE" = "200" ]; then
echo "Created semver tag: ${SEMVER_TAG}"
elif [ "$HTTP_CODE" = "409" ]; then
echo "Semver tag ${SEMVER_TAG} already exists (skipped)"
else
echo "::warning::Failed to create semver tag ${SEMVER_TAG} (HTTP ${HTTP_CODE})"
fi
echo "semver_tag=${SEMVER_TAG}" >> "$GITHUB_OUTPUT"
- name: Update release notes and promote changelog
run: |
API_BASE="${GITEA_URL}/api/v1/repos/${GITEA_ORG}/${GITEA_REPO}"
TOKEN="${{ secrets.MOKOGITEA_TOKEN }}"
# Get the stable release info (version and ID)
RELEASE_JSON=$(curl -sf -H "Authorization: token ${TOKEN}" \
"${API_BASE}/releases/tags/stable" 2>/dev/null || echo '{}')
RELEASE_ID=$(python3 -c "import json,sys; print(json.load(sys.stdin).get('id',''))" <<< "$RELEASE_JSON" 2>/dev/null || true)
# Extract version from release name (e.g. "06.17.00" or "v06.17.00")
VERSION=$(python3 -c "
import json, sys, re
r = json.load(sys.stdin)
name = r.get('name', '')
m = re.search(r'(\d+\.\d+\.\d+)', name)
print(m.group(1) if m else '')
" <<< "$RELEASE_JSON" 2>/dev/null || true)
# Extract [Unreleased] section from changelog
NOTES=""
if [ -f "CHANGELOG.md" ]; then
NOTES=$(awk '/^## \[Unreleased\]/{found=1; next} /^## \[/{if(found) exit} found{print}' CHANGELOG.md)
fi
[ -z "$NOTES" ] && NOTES="Stable release"
# Update release body via API
if [ -n "$RELEASE_ID" ]; then
python3 -c "
import json, urllib.request
body = open('/dev/stdin').read()
payload = json.dumps({'body': body}).encode()
req = urllib.request.Request(
'${API_BASE}/releases/${RELEASE_ID}',
data=payload, method='PATCH',
headers={
'Authorization': 'token ${TOKEN}',
'Content-Type': 'application/json'
})
urllib.request.urlopen(req)
" <<< "$NOTES"
echo "Release notes updated from CHANGELOG.md"
fi
# Promote [Unreleased] → [version] in CHANGELOG.md and reset
if [ -n "$VERSION" ] && [ -f "CHANGELOG.md" ]; then
DATE=$(date +%Y-%m-%d)
python3 -c "
import sys
version, date = sys.argv[1], sys.argv[2]
content = open('CHANGELOG.md').read()
old = '## [Unreleased]'
new = f'## [Unreleased]\n\n## [{version}] --- {date}'
content = content.replace(old, new, 1)
open('CHANGELOG.md', 'w').write(content)
" "$VERSION" "$DATE"
git add CHANGELOG.md
git commit -m "chore: promote changelog [Unreleased] → [${VERSION}]" || true
git push origin main || true
echo "Changelog promoted: [Unreleased] → [${VERSION}]"
fi
# -- STEP 9: Mirror to GitHub (stable only) --------------------------------
- name: "Step 9: Mirror release to GitHub"
if: >-
steps.version.outputs.skip != 'true' &&
secrets.GH_MIRROR_TOKEN != ''
continue-on-error: true
run: |
VERSION="${{ steps.bump.outputs.version || steps.version.outputs.version }}"
RELEASE_TAG="${{ steps.version.outputs.release_tag }}"
GH_REPO="${{ vars.GH_MIRROR_REPO || github.repository }}"
API_BASE="${GITEA_URL}/api/v1/repos/${GITEA_ORG}/${GITEA_REPO}"
php ${MOKO_CLI}/release_mirror.php \
--version "$VERSION" --tag "$RELEASE_TAG" \
--token "${{ secrets.MOKOGITEA_TOKEN }}" --api-base "$API_BASE" \
--gh-token "${{ secrets.GH_MIRROR_TOKEN }}" --gh-repo "$GH_REPO" \
--branch main 2>&1 || true
echo "GitHub mirror updated" >> $GITHUB_STEP_SUMMARY
# -- STEP 10: Sync main branch to GitHub mirror ----------------------------
- name: "Step 10: Push main to GitHub mirror"
if: >-
steps.version.outputs.skip != 'true' &&
secrets.GH_MIRROR_TOKEN != ''
continue-on-error: true
run: |
GH_REPO="${{ vars.GH_MIRROR_REPO || github.repository }}"
GH_ORG=$(echo "$GH_REPO" | cut -d/ -f1)
GH_NAME=$(echo "$GH_REPO" | cut -d/ -f2)
git remote add github "https://x-access-token:${{ secrets.GH_MIRROR_TOKEN }}@github.com/${GH_ORG}/${GH_NAME}.git" 2>/dev/null || \
git remote set-url github "https://x-access-token:${{ secrets.GH_MIRROR_TOKEN }}@github.com/${GH_ORG}/${GH_NAME}.git"
git fetch origin main --depth=1
git push github origin/main:refs/heads/main --force 2>/dev/null \
&& echo "main branch pushed to GitHub mirror" \
|| echo "WARNING: GitHub mirror push failed"
- name: "Step 11: Delete rc branch and recreate dev from main"
if: steps.version.outputs.skip != 'true'
continue-on-error: true
run: |
API_BASE="${GITEA_URL}/api/v1/repos/${GITEA_ORG}/${GITEA_REPO}"
TOKEN="${{ secrets.MOKOGITEA_TOKEN }}"
# Delete rc branch (ephemeral — created by promote-rc)
curl -sf -X DELETE -H "Authorization: token ${TOKEN}" \
"${API_BASE}/branches/rc" 2>/dev/null \
&& echo "Deleted rc branch" || echo "rc branch not found"
# Delete dev branch
curl -sf -X DELETE -H "Authorization: token ${TOKEN}" \
"${API_BASE}/branches/dev" 2>/dev/null && echo "Deleted dev branch"
# Recreate dev from main (now includes version bump + changelog promotion)
curl -sf -X POST -H "Authorization: token ${TOKEN}" \
-H "Content-Type: application/json" \
"${API_BASE}/branches" \
-d '{"new_branch_name":"dev","old_branch_name":"main"}' 2>/dev/null && echo "Recreated dev from main"
echo "Pre-release branches cleaned, dev reset from main" >> $GITHUB_STEP_SUMMARY
- name: "Step 12: Create version branch from main"
if: steps.version.outputs.skip != 'true'
continue-on-error: true
run: |
API_BASE="${GITEA_URL}/api/v1/repos/${GITEA_ORG}/${GITEA_REPO}"
TOKEN="${{ secrets.MOKOGITEA_TOKEN }}"
VERSION="${{ steps.bump.outputs.version || steps.version.outputs.version }}"
BRANCH_NAME="version/${VERSION}"
MAIN_SHA=$(git rev-parse HEAD)
# Delete old version branch if it exists (same version re-release)
curl -sf -X DELETE -H "Authorization: token ${TOKEN}" "${API_BASE}/branches/${BRANCH_NAME}" 2>/dev/null && echo "Deleted old ${BRANCH_NAME}"
# Create version/XX.YY.ZZ from main
curl -sf -X POST -H "Authorization: token ${TOKEN}" -H "Content-Type: application/json" "${API_BASE}/branches" -d "{\"new_branch_name\":\"${BRANCH_NAME}\",\"old_branch_name\":\"main\"}" 2>/dev/null && echo "Created ${BRANCH_NAME} from main (${MAIN_SHA})" || echo "WARNING: ${BRANCH_NAME} creation failed"
echo "Version branch created: ${BRANCH_NAME} (${MAIN_SHA})" >> $GITHUB_STEP_SUMMARY
# -- Dolibarr post-release: Reset dev version -----------------------------
- name: "Post-release: Reset dev version"
if: steps.version.outputs.skip != 'true'
continue-on-error: true
run: |
API_BASE="${GITEA_URL}/api/v1/repos/${GITEA_ORG}/${GITEA_REPO}"
php ${MOKO_CLI}/version_reset_dev.php \
--token "${{ secrets.MOKOGITEA_TOKEN }}" --api-base "${API_BASE}" \
--branch dev --path . 2>&1 || true
# -- Summary --------------------------------------------------------------
- name: Pipeline Summary
if: always()
run: |
VERSION="${{ steps.bump.outputs.version || steps.version.outputs.version }}"
PLATFORM="${{ steps.platform.outputs.platform }}"
if [ "${{ steps.version.outputs.skip }}" = "true" ]; then
echo "## Release Skipped" >> $GITHUB_STEP_SUMMARY
echo "No VERSION in README.md" >> $GITHUB_STEP_SUMMARY
elif [ "${{ steps.check.outputs.already_released }}" = "true" ]; then
echo "## Already Released — ${VERSION}" >> $GITHUB_STEP_SUMMARY
else
echo "" >> $GITHUB_STEP_SUMMARY
echo "## Build & Release Complete (${PLATFORM})" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "| Step | Result |" >> $GITHUB_STEP_SUMMARY
echo "|------|--------|" >> $GITHUB_STEP_SUMMARY
echo "| Platform | \`${PLATFORM}\` |" >> $GITHUB_STEP_SUMMARY
echo "| Version | \`${VERSION}\` |" >> $GITHUB_STEP_SUMMARY
echo "| Branch | \`${{ steps.version.outputs.branch }}\` |" >> $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
fi
+1 -1
View File
@@ -5,7 +5,7 @@
# FILE INFORMATION # FILE INFORMATION
# DEFGROUP: Gitea.Workflow # DEFGROUP: Gitea.Workflow
# INGROUP: MokoStandards.Universal # INGROUP: MokoStandards.Universal
# REPO: https://git.mokoconsulting.tech/MokoConsulting/moko-platform # REPO: https://git.mokoconsulting.tech/MokoConsulting/mokocli
# PATH: /.mokogitea/workflows/branch-cleanup.yml # PATH: /.mokogitea/workflows/branch-cleanup.yml
# VERSION: 01.00.00 # VERSION: 01.00.00
# BRIEF: Delete feature branches after PR merge # BRIEF: Delete feature branches after PR merge
+7 -210
View File
@@ -1,213 +1,10 @@
# Copyright (C) 2026 Moko Consulting <hello@mokoconsulting.tech> # DISABLED — auto-release Step 11 recreates dev from main after every release.
# # Cascade-dev is redundant and causes version conflicts when both main and dev
# SPDX-License-Identifier: GPL-3.0-or-later # have different version numbers in templateDetails.xml / manifest.xml.
# name: "Cascade Main → Dev (DISABLED)"
# FILE INFORMATION on: workflow_dispatch
# DEFGROUP: Gitea.Workflow
# INGROUP: moko-platform.Maintenance
# REPO: https://git.mokoconsulting.tech/mokoconsulting-tech/moko-platform
# PATH: /templates/workflows/cascade-dev.yml.template
# VERSION: 02.00.00
# BRIEF: Forward-merge main → all open branches after every push to main
#
# +========================================================================+
# | CASCADE MAIN → ALL BRANCHES |
# +========================================================================+
# | |
# | Triggers on every push to main (PR merges, bot commits, etc.) |
# | |
# | 1. List all branches matching: dev, rc/*, beta/*, alpha/* |
# | 2. For each: create PR (main → branch), auto-merge if clean |
# | 3. On conflict: leave PR open for manual resolution |
# | |
# +========================================================================+
name: "Universal: Cascade Main → Dev"
on:
push:
branches:
- main
workflow_dispatch:
env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
GITEA_URL: ${{ vars.GITEA_URL || 'https://git.mokoconsulting.tech' }}
GITEA_ORG: ${{ vars.GITEA_ORG || github.repository_owner }}
GITEA_REPO: ${{ vars.GITEA_REPO || github.event.repository.name }}
permissions:
contents: write
pull-requests: write
jobs: jobs:
cascade: noop:
name: Cascade main → branches
runs-on: ubuntu-latest runs-on: ubuntu-latest
if: >-
!contains(github.event.head_commit.message, '[skip ci]') &&
!contains(github.event.head_commit.message, '[skip cascade]')
steps: steps:
- name: Discover target branches - run: echo "Cascade disabled — auto-release handles dev recreation"
id: branches
env:
GA_TOKEN: ${{ secrets.MOKOGITEA_TOKEN }}
run: |
API="${GITEA_URL}/api/v1/repos/${GITEA_ORG}/${GITEA_REPO}"
# Fetch all branches (paginated)
PAGE=1
ALL_BRANCHES=""
while true; do
BATCH=$(curl -sS \
-H "Authorization: token ${GITEA_TOKEN}" \
"${API}/branches?page=${PAGE}&limit=50" \
| jq -r '.[].name // empty')
[ -z "$BATCH" ] && break
ALL_BRANCHES="$ALL_BRANCHES $BATCH"
PAGE=$((PAGE + 1))
done
# Filter to cascade targets: dev, dev/*, rc/*, beta/*, alpha/*
TARGETS=""
for BRANCH in $ALL_BRANCHES; do
case "$BRANCH" in
dev|dev/*|rc/*|beta/*|alpha/*)
TARGETS="$TARGETS $BRANCH"
;;
esac
done
TARGETS=$(echo "$TARGETS" | xargs) # trim whitespace
if [ -z "$TARGETS" ]; then
echo "targets=" >> "$GITHUB_OUTPUT"
echo "️ No cascade target branches found"
else
echo "targets=$TARGETS" >> "$GITHUB_OUTPUT"
COUNT=$(echo "$TARGETS" | wc -w)
echo "📋 Found ${COUNT} target branch(es): ${TARGETS}"
fi
- name: Cascade to all target branches
if: steps.branches.outputs.targets != ''
env:
GA_TOKEN: ${{ secrets.MOKOGITEA_TOKEN }}
run: |
API="${GITEA_URL}/api/v1/repos/${GITEA_ORG}/${GITEA_REPO}"
SHORT_SHA="${GITHUB_SHA:0:7}"
TARGETS="${{ steps.branches.outputs.targets }}"
SUCCESS=0
CONFLICTS=0
SKIPPED=0
FAILED=0
for BRANCH in $TARGETS; do
echo ""
echo "═══ main → ${BRANCH} ═══"
# Check if branch is already up to date
ENCODED_BRANCH=$(echo "$BRANCH" | sed 's|/|%2F|g')
RESPONSE=$(curl -sS \
-H "Authorization: token ${GITEA_TOKEN}" \
"${API}/compare/${ENCODED_BRANCH}...main")
AHEAD=$(echo "$RESPONSE" | jq '.total_commits // 0')
if [ "$AHEAD" -eq 0 ]; then
echo " ✅ Already up to date"
SKIPPED=$((SKIPPED + 1))
continue
fi
echo " ️ main is ${AHEAD} commit(s) ahead"
# Check for existing cascade PR
EXISTING=$(curl -sS \
-H "Authorization: token ${GITEA_TOKEN}" \
"${API}/pulls?state=open&head=${GITEA_ORG}:main&base=${ENCODED_BRANCH}&limit=1")
EXISTING_COUNT=$(echo "$EXISTING" | jq 'length')
PR_NUMBER=""
if [ "$EXISTING_COUNT" -gt 0 ]; then
PR_NUMBER=$(echo "$EXISTING" | jq -r '.[0].number')
echo " ️ Reusing existing PR #${PR_NUMBER}"
else
# Create cascade PR
PR_RESPONSE=$(curl -sS -w "\n%{http_code}" \
-X POST \
-H "Authorization: token ${GITEA_TOKEN}" \
-H "Content-Type: application/json" \
-d "{
\"title\": \"chore: cascade main → ${BRANCH} (${SHORT_SHA}) [skip ci]\",
\"body\": \"## Automatic cascade\\n\\nForward-merging \`main\` (${SHORT_SHA}) into \`${BRANCH}\`.\\n\\nIf conflicts exist, resolve manually and merge.\\n\\n> Auto-created by **Cascade Main → Dev**.\",
\"head\": \"main\",
\"base\": \"${BRANCH}\"
}" \
"${API}/pulls")
HTTP_CODE=$(echo "$PR_RESPONSE" | tail -1)
BODY=$(echo "$PR_RESPONSE" | sed '$d')
PR_NUMBER=$(echo "$BODY" | jq -r '.number // empty')
if [ "$HTTP_CODE" != "201" ] || [ -z "$PR_NUMBER" ]; then
MSG=$(echo "$BODY" | jq -r '.message // .' 2>/dev/null | head -1)
echo " ❌ Failed to create PR (HTTP ${HTTP_CODE}): ${MSG}"
FAILED=$((FAILED + 1))
continue
fi
echo " ✅ Created PR #${PR_NUMBER}"
fi
# Try auto-merge
PR_DATA=$(curl -sS \
-H "Authorization: token ${GITEA_TOKEN}" \
"${API}/pulls/${PR_NUMBER}")
MERGEABLE=$(echo "$PR_DATA" | jq -r '.mergeable // false')
if [ "$MERGEABLE" != "true" ]; then
echo " ⚠️ Conflicts — PR #${PR_NUMBER} left open"
CONFLICTS=$((CONFLICTS + 1))
continue
fi
MERGE_RESPONSE=$(curl -sS -w "\n%{http_code}" \
-X POST \
-H "Authorization: token ${GITEA_TOKEN}" \
-H "Content-Type: application/json" \
-d "{
\"Do\": \"merge\",
\"merge_message_field\": \"chore: cascade main → ${BRANCH} [skip ci]\",
\"delete_branch_after_merge\": false
}" \
"${API}/pulls/${PR_NUMBER}/merge")
MERGE_HTTP=$(echo "$MERGE_RESPONSE" | tail -1)
if [ "$MERGE_HTTP" = "200" ] || [ "$MERGE_HTTP" = "204" ]; then
echo " ✅ Merged — ${BRANCH} is in sync"
SUCCESS=$((SUCCESS + 1))
else
MERGE_BODY=$(echo "$MERGE_RESPONSE" | sed '$d')
echo " ⚠️ Merge failed (HTTP ${MERGE_HTTP}) — PR #${PR_NUMBER} left open"
CONFLICTS=$((CONFLICTS + 1))
fi
done
# Summary
echo ""
echo "════════════════════════════════════════"
echo " ✅ Merged: ${SUCCESS}"
echo " ⚠️ Conflicts: ${CONFLICTS}"
echo " ⏭️ Up to date: ${SKIPPED}"
echo " ❌ Failed: ${FAILED}"
echo "════════════════════════════════════════"
if [ "$FAILED" -gt 0 ]; then
exit 1
fi
+191
View File
@@ -0,0 +1,191 @@
# Copyright (C) 2026 Moko Consulting <hello@mokoconsulting.tech>
#
# SPDX-License-Identifier: GPL-3.0-or-later
#
# FILE INFORMATION
# DEFGROUP: Gitea.Workflow
# INGROUP: MokoStandards.CI
# REPO: https://git.mokoconsulting.tech/MokoConsulting/Template-Generic
# PATH: /.gitea/workflows/ci-generic.yml
# VERSION: 01.00.00
# BRIEF: CI pipeline — lint, validate, and test for generic projects (PHP + Node.js)
name: "Generic: Project CI"
on:
workflow_dispatch:
permissions:
contents: read
env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
jobs:
# ── Lint & Validate ───────────────────────────────────────────────────
lint:
name: Lint & Validate
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Detect toolchain
id: detect
run: |
HAS_PHP=false
HAS_NODE=false
[ -f "composer.json" ] && HAS_PHP=true
[ -f "package.json" ] && HAS_NODE=true
echo "has_php=$HAS_PHP" >> "$GITHUB_OUTPUT"
echo "has_node=$HAS_NODE" >> "$GITHUB_OUTPUT"
echo "Toolchain: PHP=$HAS_PHP Node=$HAS_NODE"
- name: Setup PHP
if: steps.detect.outputs.has_php == 'true'
run: |
if ! command -v php &> /dev/null; then
sudo apt-get update -qq
sudo apt-get install -y -qq php-cli php-mbstring php-xml >/dev/null 2>&1
fi
php -v
- name: Setup Node.js
if: steps.detect.outputs.has_node == 'true'
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Install PHP dependencies
if: steps.detect.outputs.has_php == 'true'
run: |
if [ -f "composer.json" ]; then
composer install --no-interaction --prefer-dist --quiet 2>/dev/null || true
fi
- name: Install Node.js dependencies
if: steps.detect.outputs.has_node == 'true'
run: |
if [ -f "package.json" ]; then
npm ci --quiet 2>/dev/null || npm install --quiet 2>/dev/null || true
fi
- name: PHP syntax check
if: steps.detect.outputs.has_php == 'true'
run: |
ERRORS=0
while IFS= read -r -d '' file; do
if ! php -l "$file" 2>&1 | grep -q "No syntax errors"; then
echo "::error file=${file}::PHP syntax error"
ERRORS=$((ERRORS + 1))
fi
done < <(find . -name "*.php" -not -path "./.git/*" -not -path "./vendor/*" -not -path "./node_modules/*" -print0)
echo "## PHP Lint" >> $GITHUB_STEP_SUMMARY
if [ "$ERRORS" -eq 0 ]; then
echo "All PHP files passed syntax check." >> $GITHUB_STEP_SUMMARY
else
echo "${ERRORS} file(s) with syntax errors." >> $GITHUB_STEP_SUMMARY
exit 1
fi
- name: TypeScript/JavaScript lint
if: steps.detect.outputs.has_node == 'true'
run: |
if [ -f "node_modules/.bin/eslint" ]; then
npx eslint src/ --quiet 2>&1 || { echo "::error::ESLint errors found"; exit 1; }
echo "## ESLint" >> $GITHUB_STEP_SUMMARY
echo "All files passed ESLint." >> $GITHUB_STEP_SUMMARY
elif [ -f ".eslintrc.json" ] || [ -f ".eslintrc.js" ] || [ -f "eslint.config.js" ]; then
echo "::warning::ESLint config found but eslint not installed"
else
echo "No ESLint configured — skipping"
fi
- name: TypeScript compile check
if: steps.detect.outputs.has_node == 'true'
run: |
if [ -f "tsconfig.json" ] && [ -f "node_modules/.bin/tsc" ]; then
npx tsc --noEmit 2>&1 || { echo "::error::TypeScript compilation errors"; exit 1; }
echo "## TypeScript" >> $GITHUB_STEP_SUMMARY
echo "TypeScript compilation passed." >> $GITHUB_STEP_SUMMARY
fi
- name: PHPStan static analysis
if: steps.detect.outputs.has_php == 'true'
run: |
if [ -f "phpstan.neon" ] && [ -f "vendor/bin/phpstan" ]; then
vendor/bin/phpstan analyse --no-progress 2>&1 || { echo "::warning::PHPStan found issues"; }
fi
# ── Tests ─────────────────────────────────────────────────────────────
test:
name: Tests
runs-on: ubuntu-latest
needs: lint
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Detect toolchain
id: detect
run: |
HAS_PHP=false
HAS_NODE=false
[ -f "composer.json" ] && HAS_PHP=true
[ -f "package.json" ] && HAS_NODE=true
echo "has_php=$HAS_PHP" >> "$GITHUB_OUTPUT"
echo "has_node=$HAS_NODE" >> "$GITHUB_OUTPUT"
- name: Setup PHP
if: steps.detect.outputs.has_php == 'true'
run: |
if ! command -v php &> /dev/null; then
sudo apt-get update -qq
sudo apt-get install -y -qq php-cli php-mbstring php-xml >/dev/null 2>&1
fi
- name: Setup Node.js
if: steps.detect.outputs.has_node == 'true'
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Install dependencies
run: |
[ -f "composer.json" ] && composer install --no-interaction --prefer-dist --quiet 2>/dev/null || true
[ -f "package.json" ] && { npm ci --quiet 2>/dev/null || npm install --quiet 2>/dev/null || true; }
- name: Run PHP tests
if: steps.detect.outputs.has_php == 'true'
run: |
if [ -f "vendor/bin/phpunit" ]; then
vendor/bin/phpunit --testdox 2>&1
echo "## PHPUnit" >> $GITHUB_STEP_SUMMARY
echo "Tests passed." >> $GITHUB_STEP_SUMMARY
elif [ -f "phpunit.xml" ] || [ -f "phpunit.xml.dist" ]; then
echo "::warning::PHPUnit config found but phpunit not installed"
else
echo "No PHPUnit configured — skipping"
fi
- name: Run Node.js tests
if: steps.detect.outputs.has_node == 'true'
run: |
if jq -e '.scripts.test' package.json > /dev/null 2>&1; then
npm test 2>&1
echo "## Node.js Tests" >> $GITHUB_STEP_SUMMARY
echo "Tests passed." >> $GITHUB_STEP_SUMMARY
else
echo "No test script in package.json — skipping"
fi
- name: Build check
run: |
if [ -f "Makefile" ]; then
make build 2>&1 || echo "::warning::Build failed or not configured"
elif [ -f "package.json" ] && jq -e '.scripts.build' package.json > /dev/null 2>&1; then
npm run build 2>&1 || echo "::warning::Build failed"
fi
+454 -18
View File
@@ -35,25 +35,32 @@ jobs:
steps: steps:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 uses: actions/checkout@v4
- name: Setup PHP - name: Setup PHP
run: | run: |
if ! command -v php &> /dev/null; then
sudo apt-get update -qq
sudo apt-get install -y -qq php-cli php-mbstring php-xml php-zip php-curl composer >/dev/null 2>&1
fi
php -v && composer --version php -v && composer --version
- name: Clone MokoStandards - name: Setup mokocli tools
env: env:
GA_TOKEN: ${{ secrets.MOKOGITEA_TOKEN || secrets.MOKOGITEA_TOKEN || github.token }} MOKO_CLONE_TOKEN: ${{ secrets.MOKOGITEA_TOKEN || secrets.GA_TOKEN || github.token }}
MOKO_CLONE_TOKEN: ${{ secrets.MOKOGITEA_TOKEN || secrets.MOKOGITEA_TOKEN || github.token }}
MOKO_CLONE_HOST: ${{ secrets.MOKOGITEA_TOKEN && 'git.mokoconsulting.tech/MokoConsulting' || 'github.com/mokoconsulting-tech' }} MOKO_CLONE_HOST: ${{ secrets.MOKOGITEA_TOKEN && 'git.mokoconsulting.tech/MokoConsulting' || 'github.com/mokoconsulting-tech' }}
run: | run: |
git clone --depth 1 --branch main --quiet \ if [ -d "/opt/mokocli" ] || [ -d "/tmp/mokocli" ]; then
"https://x-access-token:${MOKO_CLONE_TOKEN}@${MOKO_CLONE_HOST}/MokoStandards-API.git" \ echo "mokocli already available on runner — skipping clone"
/tmp/mokostandards-api else
git clone --depth 1 --branch main --quiet \
"https://x-access-token:${MOKO_CLONE_TOKEN}@${MOKO_CLONE_HOST}/mokocli.git" \
/tmp/mokocli 2>/dev/null || echo "mokocli clone skipped — continuing without it"
fi
- name: Install dependencies - name: Install dependencies
env: env:
COMPOSER_AUTH: '{"github-oauth":{"github.com":"${{ secrets.MOKOGITEA_TOKEN || github.token }}"}}' COMPOSER_AUTH: '{"github-oauth":{"github.com":"${{ secrets.GH_TOKEN || secrets.GA_TOKEN || github.token }}"}}'
run: | run: |
if [ -f "composer.json" ]; then if [ -f "composer.json" ]; then
composer install \ composer install \
@@ -124,8 +131,8 @@ jobs:
echo "Manifest is well-formed XML." >> $GITHUB_STEP_SUMMARY echo "Manifest is well-formed XML." >> $GITHUB_STEP_SUMMARY
fi fi
# Check required tags: name, version, author, namespace (Joomla 5+) # Check required tags: name, version, author
for TAG in name version author namespace; do for TAG in name version author; do
if ! grep -q "<${TAG}>" "$MANIFEST" 2>/dev/null; then if ! grep -q "<${TAG}>" "$MANIFEST" 2>/dev/null; then
echo "Missing required tag: \`<${TAG}>\`" >> $GITHUB_STEP_SUMMARY echo "Missing required tag: \`<${TAG}>\`" >> $GITHUB_STEP_SUMMARY
ERRORS=$((ERRORS + 1)) ERRORS=$((ERRORS + 1))
@@ -133,6 +140,19 @@ jobs:
echo "Found required tag: \`<${TAG}>\`" >> $GITHUB_STEP_SUMMARY echo "Found required tag: \`<${TAG}>\`" >> $GITHUB_STEP_SUMMARY
fi fi
done done
# Namespace is required for components/plugins but not packages
EXT_TYPE=$(grep -oP '<extension[^>]*\btype="\K[^"]+' "$MANIFEST" | head -1)
if [ "$EXT_TYPE" != "package" ]; then
if ! grep -q "<namespace" "$MANIFEST" 2>/dev/null; then
echo "Missing required tag: \`<namespace>\` (required for Joomla 5+ ${EXT_TYPE} extensions)" >> $GITHUB_STEP_SUMMARY
ERRORS=$((ERRORS + 1))
else
echo "Found required tag: \`<namespace>\`" >> $GITHUB_STEP_SUMMARY
fi
else
echo "Package extension — \`<namespace>\` not required." >> $GITHUB_STEP_SUMMARY
fi
fi fi
if [ "${ERRORS}" -gt 0 ]; then if [ "${ERRORS}" -gt 0 ]; then
@@ -225,14 +245,417 @@ jobs:
echo "All ${CHECKED} directories contain index.html." >> $GITHUB_STEP_SUMMARY echo "All ${CHECKED} directories contain index.html." >> $GITHUB_STEP_SUMMARY
fi fi
- name: Check config.xml and access.xml for components
run: |
echo "### Component Config & ACL Check" >> $GITHUB_STEP_SUMMARY
ERRORS=0
# Find all component manifests (XML with type="component")
COMP_MANIFESTS=$(find . -maxdepth 4 -name "*.xml" -not -path "./.git/*" -not -path "./vendor/*" -exec grep -l '<extension[^>]*type="component"' {} ; 2>/dev/null || true)
if [ -z "$COMP_MANIFESTS" ]; then
echo "No component extensions found — skipping." >> $GITHUB_STEP_SUMMARY
else
for MANIFEST in $COMP_MANIFESTS; do
COMP_DIR=$(dirname "$MANIFEST")
COMP_NAME=$(basename "$COMP_DIR")
echo "Component: `${COMP_NAME}` (manifest: `${MANIFEST}`)" >> $GITHUB_STEP_SUMMARY
# Check access.xml exists
ACCESS_FILE=$(find "$COMP_DIR" -name "access.xml" -not -path "./.git/*" 2>/dev/null | head -1)
if [ -z "$ACCESS_FILE" ]; then
echo "- Missing `access.xml` — ACL permissions will not work." >> $GITHUB_STEP_SUMMARY
ERRORS=$((ERRORS + 1))
else
if command -v php &> /dev/null; then
if ! php -r "@simplexml_load_file('$ACCESS_FILE') ?: exit(1);" 2>/dev/null; then
echo "- `access.xml` is not well-formed XML." >> $GITHUB_STEP_SUMMARY
ERRORS=$((ERRORS + 1))
else
for ACTION in core.admin core.manage; do
if ! grep -q "name=\"${ACTION}\"" "$ACCESS_FILE" 2>/dev/null; then
echo "- `access.xml` missing required action: `${ACTION}`" >> $GITHUB_STEP_SUMMARY
ERRORS=$((ERRORS + 1))
fi
done
echo "- `access.xml`: valid" >> $GITHUB_STEP_SUMMARY
fi
fi
fi
# Check config.xml exists
CONFIG_FILE=$(find "$COMP_DIR" -name "config.xml" -not -path "./.git/*" 2>/dev/null | head -1)
if [ -z "$CONFIG_FILE" ]; then
echo "- Missing `config.xml` — component Options page will be empty." >> $GITHUB_STEP_SUMMARY
ERRORS=$((ERRORS + 1))
else
if command -v php &> /dev/null; then
if ! php -r "@simplexml_load_file('$CONFIG_FILE') ?: exit(1);" 2>/dev/null; then
echo "- `config.xml` is not well-formed XML." >> $GITHUB_STEP_SUMMARY
ERRORS=$((ERRORS + 1))
else
echo "- `config.xml`: valid" >> $GITHUB_STEP_SUMMARY
fi
fi
fi
done
fi
echo "" >> $GITHUB_STEP_SUMMARY
if [ "${ERRORS}" -gt 0 ]; then
echo "**${ERRORS} config/ACL issue(s) found.**" >> $GITHUB_STEP_SUMMARY
exit 1
else
echo "**Component config & ACL check passed.**" >> $GITHUB_STEP_SUMMARY
fi
- name: SQL schema validation
run: |
echo "### SQL Schema Validation" >> $GITHUB_STEP_SUMMARY
ERRORS=0
# Find SQL files in source/htdocs
SQL_FILES=$(find . -name "*.sql" -path "*/sql/*" -not -path "./.git/*" -not -path "./vendor/*" 2>/dev/null)
if [ -z "$SQL_FILES" ]; then
echo "No SQL files found — skipping." >> $GITHUB_STEP_SUMMARY
else
echo "Found $(echo "$SQL_FILES" | wc -l) SQL file(s)" >> $GITHUB_STEP_SUMMARY
for FILE in $SQL_FILES; do
# Basic syntax check: balanced parentheses, no empty files
SIZE=$(wc -c < "$FILE" | tr -d ' ')
if [ "$SIZE" -eq 0 ]; then
echo "- Empty SQL file: \`${FILE}\`" >> $GITHUB_STEP_SUMMARY
ERRORS=$((ERRORS + 1))
continue
fi
# Check for common SQL errors
if grep -qP '^\s*$' "$FILE" && [ "$SIZE" -lt 5 ]; then
echo "- Whitespace-only SQL file: \`${FILE}\`" >> $GITHUB_STEP_SUMMARY
ERRORS=$((ERRORS + 1))
continue
fi
echo "- \`${FILE}\`: ${SIZE} bytes" >> $GITHUB_STEP_SUMMARY
done
# Check update SQL files follow version numbering pattern
UPDATE_DIR=$(find . -path "*/sql/updates/mysql" -type d -not -path "./.git/*" 2>/dev/null | head -1)
if [ -n "$UPDATE_DIR" ]; then
BAD_NAMES=0
for UFILE in "$UPDATE_DIR"/*.sql; do
[ ! -f "$UFILE" ] && continue
BASENAME=$(basename "$UFILE" .sql)
if ! echo "$BASENAME" | grep -qP '^\d+\.\d+\.\d+'; then
echo "- Update file \`${UFILE}\` does not follow version naming (expected X.Y.Z.sql)" >> $GITHUB_STEP_SUMMARY
BAD_NAMES=$((BAD_NAMES + 1))
fi
done
if [ "$BAD_NAMES" -gt 0 ]; then
ERRORS=$((ERRORS + BAD_NAMES))
fi
fi
fi
echo "" >> $GITHUB_STEP_SUMMARY
if [ "${ERRORS}" -gt 0 ]; then
echo "**${ERRORS} SQL issue(s) found.**" >> $GITHUB_STEP_SUMMARY
exit 1
else
echo "**SQL schema validation passed.**" >> $GITHUB_STEP_SUMMARY
fi
- name: Manifest file references check
run: |
echo "### Manifest File References" >> $GITHUB_STEP_SUMMARY
ERRORS=0
MANIFEST=""
for XML_FILE in $(find . -maxdepth 2 -name "*.xml" -not -path "./.git/*" -not -path "./vendor/*"); do
if grep -q "<extension" "$XML_FILE" 2>/dev/null; then
MANIFEST="$XML_FILE"
break
fi
done
if [ -z "$MANIFEST" ]; then
echo "No manifest found — skipping." >> $GITHUB_STEP_SUMMARY
else
MANIFEST_DIR=$(dirname "$MANIFEST")
# Check <filename> references
FILENAMES=$(grep -oP '<filename[^>]*>\K[^<]+' "$MANIFEST" 2>/dev/null || true)
for F in $FILENAMES; do
if [ ! -f "${MANIFEST_DIR}/${F}" ] && [ ! -d "${MANIFEST_DIR}/${F}" ]; then
echo "- Missing: \`${F}\` (referenced in manifest)" >> $GITHUB_STEP_SUMMARY
ERRORS=$((ERRORS + 1))
fi
done
# Check <folder> references
FOLDERS=$(grep -oP '<folder[^>]*>\K[^<]+' "$MANIFEST" 2>/dev/null || true)
for F in $FOLDERS; do
if [ ! -d "${MANIFEST_DIR}/${F}" ]; then
echo "- Missing folder: \`${F}\` (referenced in manifest)" >> $GITHUB_STEP_SUMMARY
ERRORS=$((ERRORS + 1))
fi
done
# Check <file> references in package manifests (ZIP files won't exist in source)
EXT_TYPE=$(grep -oP '<extension[^>]*\btype="\K[^"]+' "$MANIFEST" | head -1)
if [ "$EXT_TYPE" != "package" ]; then
FILES=$(grep -oP '<file[^>]*>\K[^<]+' "$MANIFEST" 2>/dev/null || true)
for F in $FILES; do
if [ ! -f "${MANIFEST_DIR}/${F}" ]; then
echo "- Missing file: \`${F}\` (referenced in manifest)" >> $GITHUB_STEP_SUMMARY
ERRORS=$((ERRORS + 1))
fi
done
fi
fi
echo "" >> $GITHUB_STEP_SUMMARY
if [ "${ERRORS}" -gt 0 ]; then
echo "**${ERRORS} missing file reference(s).**" >> $GITHUB_STEP_SUMMARY
exit 1
else
echo "**Manifest file references check passed.**" >> $GITHUB_STEP_SUMMARY
fi
- name: Form XML validation
run: |
echo "### Form XML Validation" >> $GITHUB_STEP_SUMMARY
ERRORS=0
FORM_FILES=$(find . -name "*.xml" -path "*/forms/*" -not -path "./.git/*" -not -path "./vendor/*" 2>/dev/null)
if [ -z "$FORM_FILES" ]; then
echo "No form XML files found — skipping." >> $GITHUB_STEP_SUMMARY
else
echo "Found $(echo "$FORM_FILES" | wc -l) form file(s)" >> $GITHUB_STEP_SUMMARY
for FILE in $FORM_FILES; do
if command -v php &> /dev/null; then
if ! php -r "@simplexml_load_file('$FILE') ?: exit(1);" 2>/dev/null; then
echo "- \`${FILE}\`: malformed XML" >> $GITHUB_STEP_SUMMARY
ERRORS=$((ERRORS + 1))
else
# Check for valid Joomla form structure
if ! grep -qE '<form|<field|<fieldset' "$FILE" 2>/dev/null; then
echo "- \`${FILE}\`: no \`<form>\`, \`<field>\`, or \`<fieldset>\` elements found" >> $GITHUB_STEP_SUMMARY
ERRORS=$((ERRORS + 1))
else
echo "- \`${FILE}\`: valid" >> $GITHUB_STEP_SUMMARY
fi
fi
fi
done
fi
echo "" >> $GITHUB_STEP_SUMMARY
if [ "${ERRORS}" -gt 0 ]; then
echo "**${ERRORS} form XML issue(s).**" >> $GITHUB_STEP_SUMMARY
exit 1
else
echo "**Form XML validation passed.**" >> $GITHUB_STEP_SUMMARY
fi
- name: Deprecated Joomla API check
continue-on-error: true
run: |
echo "### Deprecated Joomla API Check" >> $GITHUB_STEP_SUMMARY
WARNINGS=0
SRC_DIR=""
for DIR in source/ src/ htdocs/; do
[ -d "$DIR" ] && SRC_DIR="$DIR" && break
done
if [ -z "$SRC_DIR" ]; then
echo "No source directory found — skipping." >> $GITHUB_STEP_SUMMARY
else
# Joomla 3/4 deprecated patterns that break in Joomla 6
PATTERNS=(
'JFactory::'
'JText::'
'JHtml::'
'JRoute::'
'JUri::'
'JLog::'
'JTable::'
'JInput'
'CMSFactory::\$application'
'JApplicationCms'
)
for PATTERN in "${PATTERNS[@]}"; do
HITS=$(grep -rnl "$PATTERN" "$SRC_DIR" --include="*.php" 2>/dev/null || true)
if [ -n "$HITS" ]; then
COUNT=$(echo "$HITS" | wc -l)
echo "- \`${PATTERN}\` found in ${COUNT} file(s)" >> $GITHUB_STEP_SUMMARY
WARNINGS=$((WARNINGS + COUNT))
fi
done
echo "" >> $GITHUB_STEP_SUMMARY
if [ "$WARNINGS" -gt 0 ]; then
echo "**${WARNINGS} deprecated API usage(s) found.** These will break in Joomla 6." >> $GITHUB_STEP_SUMMARY
else
echo "**No deprecated APIs found.**" >> $GITHUB_STEP_SUMMARY
fi
fi
- name: Template output escaping check
continue-on-error: true
run: |
echo "### Template Output Escaping" >> $GITHUB_STEP_SUMMARY
WARNINGS=0
TMPL_FILES=$(find . -name "*.php" -path "*/tmpl/*" -not -path "./.git/*" -not -path "./vendor/*" 2>/dev/null)
if [ -z "$TMPL_FILES" ]; then
echo "No template files found — skipping." >> $GITHUB_STEP_SUMMARY
else
echo "Found $(echo "$TMPL_FILES" | wc -l) template file(s)" >> $GITHUB_STEP_SUMMARY
for FILE in $TMPL_FILES; do
# Check for unescaped output: <?= $var ?> or echo $var without escape()
UNESCAPED=$(grep -nP '<\?=\s*\$(?!this->escape)' "$FILE" 2>/dev/null || true)
if [ -n "$UNESCAPED" ]; then
HITS=$(echo "$UNESCAPED" | wc -l)
echo "- \`${FILE}\`: ${HITS} unescaped \`<?= \$var ?>\` output(s) — use \`<?= \$this->escape(\$var) ?>\`" >> $GITHUB_STEP_SUMMARY
WARNINGS=$((WARNINGS + HITS))
fi
# Check for echo without escaping in template context
RAW_ECHO=$(grep -nP '^\s*echo\s+\$(?!this->escape)' "$FILE" 2>/dev/null || true)
if [ -n "$RAW_ECHO" ]; then
HITS=$(echo "$RAW_ECHO" | wc -l)
echo "- \`${FILE}\`: ${HITS} raw \`echo \$var\` — consider \`echo \$this->escape(\$var)\`" >> $GITHUB_STEP_SUMMARY
WARNINGS=$((WARNINGS + HITS))
fi
done
echo "" >> $GITHUB_STEP_SUMMARY
if [ "$WARNINGS" -gt 0 ]; then
echo "**${WARNINGS} potential XSS risk(s) in templates.** Review unescaped output." >> $GITHUB_STEP_SUMMARY
else
echo "**All template output appears properly escaped.**" >> $GITHUB_STEP_SUMMARY
fi
fi
- name: Namespace consistency check
run: |
echo "### Namespace Consistency" >> $GITHUB_STEP_SUMMARY
ERRORS=0
# Find component/plugin manifests with <namespace> tags
MANIFESTS=$(find . -maxdepth 4 -name "*.xml" -not -path "./.git/*" -not -path "./vendor/*" -exec grep -l '<namespace' {} \; 2>/dev/null || true)
if [ -z "$MANIFESTS" ]; then
echo "No manifests with \`<namespace>\` found — skipping." >> $GITHUB_STEP_SUMMARY
else
for MANIFEST in $MANIFESTS; do
NS_PATH=$(grep -oP '<namespace[^>]*>\K[^<]+' "$MANIFEST" 2>/dev/null | head -1)
[ -z "$NS_PATH" ] && continue
MANIFEST_DIR=$(dirname "$MANIFEST")
echo "Manifest: \`${MANIFEST}\` → namespace \`${NS_PATH}\`" >> $GITHUB_STEP_SUMMARY
# Check PHP files have matching namespace
while IFS= read -r -d '' PHP_FILE; do
FILE_NS=$(grep -oP '^\s*namespace\s+\K[^;]+' "$PHP_FILE" 2>/dev/null | head -1)
[ -z "$FILE_NS" ] && continue
# Namespace should start with the manifest namespace path
if ! echo "$FILE_NS" | grep -qF "${NS_PATH}"; then
echo "- \`${PHP_FILE}\`: namespace \`${FILE_NS}\` doesn't match manifest \`${NS_PATH}\`" >> $GITHUB_STEP_SUMMARY
ERRORS=$((ERRORS + 1))
fi
done < <(find "$MANIFEST_DIR" -name "*.php" -path "*/src/*" -not -path "./vendor/*" -print0 2>/dev/null)
done
fi
echo "" >> $GITHUB_STEP_SUMMARY
if [ "${ERRORS}" -gt 0 ]; then
echo "**${ERRORS} namespace mismatch(es).**" >> $GITHUB_STEP_SUMMARY
exit 1
else
echo "**Namespace consistency check passed.**" >> $GITHUB_STEP_SUMMARY
fi
- name: SPDX license header check
continue-on-error: true
run: |
echo "### SPDX License Headers" >> $GITHUB_STEP_SUMMARY
MISSING=0
SRC_DIR=""
for DIR in source/ src/ htdocs/; do
[ -d "$DIR" ] && SRC_DIR="$DIR" && break
done
if [ -z "$SRC_DIR" ]; then
echo "No source directory found — skipping." >> $GITHUB_STEP_SUMMARY
else
TOTAL=0
while IFS= read -r -d '' FILE; do
TOTAL=$((TOTAL + 1))
if ! head -10 "$FILE" | grep -qi "SPDX"; then
echo "- Missing SPDX header: \`${FILE}\`" >> $GITHUB_STEP_SUMMARY
MISSING=$((MISSING + 1))
fi
done < <(find "$SRC_DIR" -name "*.php" -not -path "./vendor/*" -print0)
echo "" >> $GITHUB_STEP_SUMMARY
if [ "$MISSING" -gt 0 ]; then
echo "**${MISSING}/${TOTAL} PHP file(s) missing SPDX license header.**" >> $GITHUB_STEP_SUMMARY
else
echo "**All ${TOTAL} PHP files have SPDX headers.**" >> $GITHUB_STEP_SUMMARY
fi
fi
- name: Service provider check
run: |
echo "### Service Provider Check" >> $GITHUB_STEP_SUMMARY
ERRORS=0
PROVIDERS=$(find . -name "provider.php" -path "*/services/*" -not -path "./.git/*" -not -path "./vendor/*" 2>/dev/null)
if [ -z "$PROVIDERS" ]; then
echo "No service providers found — skipping." >> $GITHUB_STEP_SUMMARY
else
for FILE in $PROVIDERS; do
# Must return a ServiceProviderInterface
if ! grep -qP 'ServiceProviderInterface|ComponentInterface|MVCFactoryInterface|DispatcherInterface' "$FILE" 2>/dev/null; then
echo "- \`${FILE}\`: does not reference ServiceProviderInterface or component interfaces" >> $GITHUB_STEP_SUMMARY
ERRORS=$((ERRORS + 1))
else
echo "- \`${FILE}\`: valid service provider" >> $GITHUB_STEP_SUMMARY
fi
# Must have return statement
if ! grep -qP '^\s*return\s+new\s+' "$FILE" 2>/dev/null; then
echo "- \`${FILE}\`: missing \`return new ...\` statement" >> $GITHUB_STEP_SUMMARY
ERRORS=$((ERRORS + 1))
fi
done
fi
echo "" >> $GITHUB_STEP_SUMMARY
if [ "${ERRORS}" -gt 0 ]; then
echo "**${ERRORS} service provider issue(s).**" >> $GITHUB_STEP_SUMMARY
exit 1
else
echo "**Service provider check passed.**" >> $GITHUB_STEP_SUMMARY
fi
release-readiness: release-readiness:
name: Release Readiness Check name: Release Readiness Check
runs-on: ubuntu-latest runs-on: ubuntu-latest
if: github.event_name == 'pull_request' && github.base_ref == 'main' if: github.event_name == 'pull_request' && github.base_ref == 'main'
continue-on-error: true
steps: steps:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 uses: actions/checkout@v4
- name: Validate release readiness - name: Validate release readiness
run: | run: |
@@ -338,15 +761,19 @@ jobs:
steps: steps:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 uses: actions/checkout@v4
- name: Setup PHP ${{ matrix.php }} - name: Setup PHP ${{ matrix.php }}
run: | run: |
if ! command -v php &> /dev/null; then
sudo apt-get update -qq
sudo apt-get install -y -qq php-cli php-mbstring php-xml php-zip php-curl composer >/dev/null 2>&1
fi
php -v && composer --version php -v && composer --version
- name: Install dependencies - name: Install dependencies
env: env:
COMPOSER_AUTH: '{"github-oauth":{"github.com":"${{ secrets.MOKOGITEA_TOKEN || github.token }}"}}' COMPOSER_AUTH: '{"github-oauth":{"github.com":"${{ secrets.GH_TOKEN || secrets.GA_TOKEN || github.token }}"}}'
run: | run: |
if [ -f "composer.json" ]; then if [ -f "composer.json" ]; then
composer install \ composer install \
@@ -384,14 +811,19 @@ jobs:
steps: steps:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 uses: actions/checkout@v4
- name: Setup PHP - name: Setup PHP
run: php -v && composer --version run: |
if ! command -v php &> /dev/null; then
sudo apt-get update -qq
sudo apt-get install -y -qq php-cli php-mbstring php-xml php-zip php-curl composer >/dev/null 2>&1
fi
php -v && composer --version
- name: Install dependencies - name: Install dependencies
env: env:
COMPOSER_AUTH: '{"github-oauth":{"github.com":"${{ secrets.MOKOGITEA_TOKEN || github.token }}"}}' COMPOSER_AUTH: '{"github-oauth":{"github.com":"${{ secrets.GH_TOKEN || secrets.GA_TOKEN || github.token }}"}}'
run: | run: |
if [ -f "composer.json" ]; then if [ -f "composer.json" ]; then
composer install --no-interaction --prefer-dist --optimize-autoloader composer install --no-interaction --prefer-dist --optimize-autoloader
@@ -458,10 +890,14 @@ jobs:
steps: steps:
- name: Trigger pre-release build - name: Trigger pre-release build
env: env:
GA_TOKEN: ${{ secrets.MOKOGITEA_TOKEN }} GA_TOKEN: ${{ secrets.GA_TOKEN }}
REPO: ${{ github.repository }} REPO: ${{ github.repository }}
BRANCH: ${{ github.head_ref }} BRANCH: ${{ github.head_ref }}
run: | run: |
curl -s -X POST "${GITEA_URL:-https://git.mokoconsulting.tech}/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 \
"${GITEA_URL:-https://git.mokoconsulting.tech}/api/v1/repos/${REPO}/actions/workflows/pre-release.yml/dispatches" \
-H "Authorization: token ${GA_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
+9 -9
View File
@@ -4,8 +4,8 @@
# #
# FILE INFORMATION # FILE INFORMATION
# DEFGROUP: Gitea.Workflow # DEFGROUP: Gitea.Workflow
# INGROUP: moko-platform.Maintenance # INGROUP: MokoStandards.Maintenance
# REPO: https://git.mokoconsulting.tech/MokoConsulting/moko-platform # REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards
# PATH: /.gitea/workflows/cleanup.yml # PATH: /.gitea/workflows/cleanup.yml
# VERSION: 01.00.00 # VERSION: 01.00.00
# BRIEF: Scheduled cleanup — delete merged branches and old workflow runs # BRIEF: Scheduled cleanup — delete merged branches and old workflow runs
@@ -33,17 +33,17 @@ jobs:
uses: actions/checkout@v4 uses: actions/checkout@v4
with: with:
fetch-depth: 0 fetch-depth: 0
token: ${{ secrets.MOKOGITEA_TOKEN }} token: ${{ secrets.GA_TOKEN }}
- name: Delete merged branches - name: Delete merged branches
env: env:
GA_TOKEN: ${{ secrets.MOKOGITEA_TOKEN }} GA_TOKEN: ${{ secrets.GA_TOKEN }}
run: | run: |
echo "=== Merged Branch Cleanup ===" echo "=== Merged Branch Cleanup ==="
API="${GITEA_URL}/api/v1/repos/${{ github.repository }}" API="${GITEA_URL}/api/v1/repos/${{ github.repository }}"
# List branches via API # List branches via API
BRANCHES=$(curl -sS -H "Authorization: token ${GITEA_TOKEN}" \ BRANCHES=$(curl -sS -H "Authorization: token ${GA_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 ${GITEA_TOKEN}" \ curl -sS -X DELETE -H "Authorization: token ${GA_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.MOKOGITEA_TOKEN }} GA_TOKEN: ${{ secrets.GA_TOKEN }}
run: | run: |
echo "=== Workflow Run Cleanup ===" echo "=== Workflow Run Cleanup ==="
API="${GITEA_URL}/api/v1/repos/${{ github.repository }}" API="${GITEA_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 ${GITEA_TOKEN}" \ RUNS=$(curl -sS -H "Authorization: token ${GA_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 ${GITEA_TOKEN}" \ curl -sS -X DELETE -H "Authorization: token ${GA_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
+76
View File
@@ -0,0 +1,76 @@
# Copyright (C) 2026 Moko Consulting <hello@mokoconsulting.tech>
# SPDX-License-Identifier: GPL-3.0-or-later
name: "Publish to Composer"
on:
push:
tags:
- 'v*'
- '[0-9]*.[0-9]*.[0-9]*'
release:
types: [published]
workflow_dispatch:
env:
GITEA_URL: ${{ vars.GITEA_URL || 'https://git.mokoconsulting.tech' }}
jobs:
publish:
name: Publish Package
runs-on: ubuntu-latest
if: >-
!contains(github.event.head_commit.message, '[skip ci]') &&
!contains(github.event.head_commit.message, '[skip publish]')
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup PHP
run: |
if ! command -v php &> /dev/null; then
sudo apt-get update -qq
sudo apt-get install -y -qq php-cli php-mbstring php-xml php-zip php-curl composer >/dev/null 2>&1
fi
- name: Install dependencies
run: composer install --no-dev --no-interaction --prefer-dist --quiet
- name: Determine version
id: version
run: |
VERSION=$(php -r "echo json_decode(file_get_contents('composer.json'))->version;")
echo "version=${VERSION}" >> "$GITHUB_OUTPUT"
echo "Package version: ${VERSION}"
# Gitea Composer Registry — auto-publishes from tags
# The tag push itself registers the package at:
# https://git.mokoconsulting.tech/api/packages/MokoConsulting/composer
- name: Verify Gitea registry
run: |
echo "Gitea Composer registry auto-publishes from tags."
echo "Package available at: ${GITEA_URL}/api/packages/MokoConsulting/composer"
echo "Install: composer require mokoconsulting/mokocli"
# Packagist — notify of new version
- name: Notify Packagist
if: secrets.PACKAGIST_TOKEN != ''
run: |
VERSION="${{ steps.version.outputs.version }}"
echo "Notifying Packagist of version ${VERSION}..."
curl -sf -X POST \
-H "Content-Type: application/json" \
-d '{"repository":{"url":"https://git.mokoconsulting.tech/MokoConsulting/mokocli"}}' \
"https://packagist.org/api/update-package?username=mokoconsulting&apiToken=${{ secrets.PACKAGIST_TOKEN }}" \
&& echo "Packagist notified" \
|| echo "::warning::Packagist notification failed (package may not be registered yet)"
- name: Summary
run: |
VERSION="${{ steps.version.outputs.version }}"
echo "## Composer Package Published" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "| Registry | Status |" >> $GITHUB_STEP_SUMMARY
echo "|----------|--------|" >> $GITHUB_STEP_SUMMARY
echo "| Gitea | \`composer require mokoconsulting/mokocli:${VERSION}\` |" >> $GITHUB_STEP_SUMMARY
echo "| Packagist | \`composer require mokoconsulting/mokocli\` |" >> $GITHUB_STEP_SUMMARY
+126
View File
@@ -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:
GA_TOKEN: ${{ secrets.GA_TOKEN || secrets.GA_TOKEN || github.token }}
MOKO_CLONE_TOKEN: ${{ secrets.GA_TOKEN || secrets.GA_TOKEN || github.token }}
MOKO_CLONE_HOST: ${{ secrets.GA_TOKEN && 'git.mokoconsulting.tech/MokoConsulting' || 'github.com/mokoconsulting-tech' }}
COMPOSER_AUTH: '{"github-oauth":{"github.com":"${{ secrets.GA_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
+2 -6
View File
@@ -4,8 +4,8 @@
# #
# FILE INFORMATION # FILE INFORMATION
# DEFGROUP: Gitea.Workflow # DEFGROUP: Gitea.Workflow
# INGROUP: moko-platform.Security # INGROUP: MokoStandards.Security
# REPO: https://git.mokoconsulting.tech/mokoconsulting-tech/moko-platform # REPO: https://git.mokoconsulting.tech/mokoconsulting-tech/MokoStandards-API
# PATH: /templates/workflows/gitleaks.yml.template # PATH: /templates/workflows/gitleaks.yml.template
# VERSION: 01.00.00 # VERSION: 01.00.00
# BRIEF: Secret scanning — detect leaked credentials, API keys, and tokens # BRIEF: Secret scanning — detect leaked credentials, API keys, and tokens
@@ -25,10 +25,6 @@
name: "Universal: Secret Scanning" name: "Universal: Secret Scanning"
on: on:
pull_request:
branches:
- main
- 'dev/**'
schedule: schedule:
- cron: '0 5 * * 1' # Weekly Monday 05:00 UTC - cron: '0 5 * * 1' # Weekly Monday 05:00 UTC
workflow_dispatch: workflow_dispatch:
+2 -2
View File
@@ -4,8 +4,8 @@
# #
# FILE INFORMATION # FILE INFORMATION
# DEFGROUP: Gitea.Workflow # DEFGROUP: Gitea.Workflow
# INGROUP: moko-platform.Automation # INGROUP: mokocli.Automation
# VERSION: 01.07.00 # VERSION: 01.00.00
# 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"
+2 -2
View File
@@ -4,8 +4,8 @@
# #
# FILE INFORMATION # FILE INFORMATION
# DEFGROUP: Gitea.Workflow # DEFGROUP: Gitea.Workflow
# INGROUP: moko-platform.Notifications # INGROUP: MokoStandards.Notifications
# REPO: https://git.mokoconsulting.tech/MokoConsulting/moko-platform # REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards
# PATH: /.gitea/workflows/notify.yml # PATH: /.gitea/workflows/notify.yml
# VERSION: 01.00.00 # VERSION: 01.00.00
# BRIEF: Push notifications via ntfy on release success or workflow failure # BRIEF: Push notifications via ntfy on release success or workflow failure
+534 -236
View File
@@ -1,236 +1,534 @@
# Copyright (C) 2026 Moko Consulting <hello@mokoconsulting.tech> # Copyright (C) 2026 Moko Consulting <hello@mokoconsulting.tech>
# #
# SPDX-License-Identifier: GPL-3.0-or-later # SPDX-License-Identifier: GPL-3.0-or-later
# #
# FILE INFORMATION # FILE INFORMATION
# DEFGROUP: Gitea.Workflow # DEFGROUP: Gitea.Workflow
# INGROUP: moko-platform.CI # INGROUP: moko-platform.CI
# REPO: https://git.mokoconsulting.tech/mokoconsulting-tech/moko-platform # REPO: https://git.mokoconsulting.tech/mokoconsulting-tech/moko-platform
# PATH: /templates/workflows/universal/pr-check.yml.template # PATH: /templates/workflows/universal/pr-check.yml.template
# VERSION: 05.00.00 # VERSION: 09.23.00
# BRIEF: PR gate — branch policy + code validation before merge # BRIEF: PR gate — branch policy + code validation before merge
name: "Universal: PR Check" name: "Universal: PR Check"
on: on:
pull_request: pull_request:
types: [opened, synchronize, reopened, edited] types: [opened, synchronize, reopened, edited]
permissions: permissions:
contents: read contents: read
pull-requests: write pull-requests: write
env: env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
jobs: jobs:
# ── Branch Policy ────────────────────────────────────────────────────── # ── Branch Policy ──────────────────────────────────────────────────────
branch-policy: branch-policy:
name: Branch Policy name: Branch Policy
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Check branch merge target - name: Check branch merge target
run: | run: |
HEAD="${{ github.head_ref }}" HEAD="${{ github.head_ref }}"
BASE="${{ github.base_ref }}" BASE="${{ github.base_ref }}"
echo "PR: ${HEAD} → ${BASE}" echo "PR: ${HEAD} → ${BASE}"
ALLOWED=true ALLOWED=true
REASON="" REASON=""
case "$HEAD" in case "$HEAD" in
feature/*|feat/*) feature/*|feat/*)
if [ "$BASE" != "dev" ]; then if [ "$BASE" != "dev" ]; then
ALLOWED=false ALLOWED=false
REASON="Feature branches must target 'dev', not '${BASE}'" REASON="Feature branches must target 'dev', not '${BASE}'"
fi fi
;; ;;
fix/*|bugfix/*) fix/*|bugfix/*)
if [ "$BASE" != "dev" ]; then if [ "$BASE" != "dev" ]; then
ALLOWED=false ALLOWED=false
REASON="Fix branches must target 'dev', not '${BASE}'" REASON="Fix branches must target 'dev', not '${BASE}'"
fi fi
;; ;;
patch/*) patch/*)
if [ "$BASE" != "dev" ] && [ "$BASE" != "rc" ]; then if [ "$BASE" != "dev" ] && [ "$BASE" != "rc" ]; then
ALLOWED=false ALLOWED=false
REASON="Patch branches must target 'dev' or 'rc', not '${BASE}'" REASON="Patch branches must target 'dev' or 'rc', not '${BASE}'"
fi fi
;; ;;
hotfix/*) hotfix/*)
if [ "$BASE" != "dev" ] && [ "$BASE" != "main" ]; then if [ "$BASE" != "dev" ] && [ "$BASE" != "main" ]; then
ALLOWED=false ALLOWED=false
REASON="Hotfix branches can only target 'dev' or 'main', not '${BASE}'" REASON="Hotfix branches can only target 'dev' or 'main', not '${BASE}'"
fi fi
;; ;;
rc) rc)
if [ "$BASE" != "main" ]; then if [ "$BASE" != "main" ]; then
ALLOWED=false ALLOWED=false
REASON="RC branch can only merge into 'main', not '${BASE}'" REASON="RC branch can only merge into 'main', not '${BASE}'"
fi fi
;; ;;
dev) dev)
if [ "$BASE" != "main" ]; then if [ "$BASE" != "main" ]; then
ALLOWED=false ALLOWED=false
REASON="Dev branch can only merge into 'main', not '${BASE}'" REASON="Dev branch can only merge into 'main', not '${BASE}'"
fi fi
;; ;;
esac esac
if [ "$ALLOWED" = false ]; then if [ "$ALLOWED" = false ]; then
echo "::error::${REASON}" echo "::error::${REASON}"
echo "## Branch Policy Violation" >> $GITHUB_STEP_SUMMARY echo "## Branch Policy Violation" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY echo "" >> $GITHUB_STEP_SUMMARY
echo "${REASON}" >> $GITHUB_STEP_SUMMARY echo "${REASON}" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY echo "" >> $GITHUB_STEP_SUMMARY
echo "### Allowed merge paths:" >> $GITHUB_STEP_SUMMARY echo "### Allowed merge paths:" >> $GITHUB_STEP_SUMMARY
echo "- \`feature/*\` → \`dev\`" >> $GITHUB_STEP_SUMMARY echo "- \`feature/*\` → \`dev\`" >> $GITHUB_STEP_SUMMARY
echo "- \`fix/*\` → \`dev\`" >> $GITHUB_STEP_SUMMARY echo "- \`fix/*\` → \`dev\`" >> $GITHUB_STEP_SUMMARY
echo "- \`hotfix/*\` → \`dev\` or \`main\`" >> $GITHUB_STEP_SUMMARY echo "- \`hotfix/*\` → \`dev\` or \`main\`" >> $GITHUB_STEP_SUMMARY
echo "- \`dev\` → \`main\`" >> $GITHUB_STEP_SUMMARY echo "- \`dev\` → \`main\`" >> $GITHUB_STEP_SUMMARY
echo "- \`rc/*\` → \`main\`" >> $GITHUB_STEP_SUMMARY echo "- \`rc/*\` → \`main\`" >> $GITHUB_STEP_SUMMARY
exit 1 exit 1
fi fi
echo "Branch policy: OK (${HEAD} → ${BASE})" echo "Branch policy: OK (${HEAD} → ${BASE})"
echo "## Branch Policy: Passed" >> $GITHUB_STEP_SUMMARY echo "## Branch Policy: Passed" >> $GITHUB_STEP_SUMMARY
# ── Code Validation ──────────────────────────────────────────────────── # ── Secret Scanning ──────────────────────────────────────────────────
validate: gitleaks:
name: Validate PR name: Secret Scan
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps:
steps: - name: Checkout
- name: Checkout uses: actions/checkout@v4
uses: actions/checkout@v4 with:
fetch-depth: 0
- name: Detect platform
id: platform - name: Install Gitleaks
run: | run: |
# Read platform from XML manifest (<platform> tag) or plain text fallback GITLEAKS_VERSION="8.21.2"
PLATFORM=$(sed -n 's/.*<platform>\([^<]*\)<\/platform>.*/\1/p' .mokogitea/manifest.xml 2>/dev/null | head -1) curl -sSL "https://github.com/gitleaks/gitleaks/releases/download/v${GITLEAKS_VERSION}/gitleaks_${GITLEAKS_VERSION}_linux_x64.tar.gz" \
[ -z "$PLATFORM" ] && PLATFORM=$(cat .mokogitea/manifest.xml 2>/dev/null | tr -d '[:space:]') | tar -xz -C /usr/local/bin gitleaks
[ -z "$PLATFORM" ] && PLATFORM="generic"
echo "platform=$PLATFORM" >> "$GITHUB_OUTPUT" - name: Scan PR commits for secrets
run: |
- name: Setup PHP if gitleaks detect --source . --verbose \
if: steps.platform.outputs.platform == 'joomla' || steps.platform.outputs.platform == 'dolibarr' --log-opts=${{ github.event.pull_request.base.sha }}..${{ github.event.pull_request.head.sha }} 2>&1; then
run: | echo "**No secrets detected.**" >> $GITHUB_STEP_SUMMARY
if ! command -v php &> /dev/null; then else
sudo apt-get update -qq echo "::error::Potential secrets detected in PR commits"
sudo apt-get install -y -qq php-cli php-mbstring php-xml >/dev/null 2>&1 exit 1
fi fi
- name: PHP syntax check # ── Code Validation ────────────────────────────────────────────────────
if: steps.platform.outputs.platform == 'joomla' || steps.platform.outputs.platform == 'dolibarr' validate:
run: | name: Validate PR
ERRORS=0 runs-on: ubuntu-latest
while IFS= read -r -d '' file; do
if ! php -l "$file" 2>&1 | grep -q "No syntax errors"; then steps:
ERRORS=$((ERRORS + 1)) - name: Checkout
fi uses: actions/checkout@v4
done < <(find . -name "*.php" -not -path "./.git/*" -not -path "./vendor/*" -print0)
echo "PHP lint: ${ERRORS} error(s)" - name: Check for merge conflict markers
[ "$ERRORS" -eq 0 ] || { echo "::error::PHP syntax errors found"; exit 1; } run: |
CONFLICTS=$(grep -rn '<<<<<<< \|>>>>>>> \|^=======$' --include='*.php' --include='*.xml' --include='*.css' --include='*.js' --include='*.json' --include='*.md' --include='*.yml' --include='*.yaml' --include='*.ini' --include='*.txt' . 2>/dev/null | grep -v '.git/' || true)
- name: Validate platform manifest if [ -n "$CONFLICTS" ]; then
run: | echo "::error::Merge conflict markers found in source files"
PLATFORM="${{ steps.platform.outputs.platform }}" echo "## Conflict Markers Found" >> $GITHUB_STEP_SUMMARY
case "$PLATFORM" in echo '```' >> $GITHUB_STEP_SUMMARY
joomla) echo "$CONFLICTS" >> $GITHUB_STEP_SUMMARY
MANIFEST=$(find . -maxdepth 3 -name "*.xml" ! -path "./.git/*" -exec grep -l '<extension' {} \; 2>/dev/null | head -1) echo '```' >> $GITHUB_STEP_SUMMARY
if [ -z "$MANIFEST" ]; then exit 1
echo "::warning::No Joomla manifest found (WaaS site)" fi
exit 0 echo "No conflict markers found"
fi
echo "Manifest: ${MANIFEST}" - name: Detect platform
if command -v php &> /dev/null; then id: platform
php -r "libxml_use_internal_errors(true); \$x = simplexml_load_file('$MANIFEST'); if(!\$x){foreach(libxml_get_errors() as \$e) echo \$e->message; exit(1);}" || { echo "::error::Manifest XML is malformed"; exit 1; } run: |
fi # Read platform from XML manifest (<platform> tag) or plain text fallback
for ELEMENT in name version description; do PLATFORM=$(sed -n 's/.*<platform>\([^<]*\)<\/platform>.*/\1/p' .mokogitea/manifest.xml 2>/dev/null | head -1)
grep -q "<${ELEMENT}>" "$MANIFEST" || { echo "::error::Missing <${ELEMENT}> in manifest"; exit 1; } [ -z "$PLATFORM" ] && PLATFORM=$(cat .mokogitea/manifest.xml 2>/dev/null | tr -d '[:space:]')
done [ -z "$PLATFORM" ] && PLATFORM="generic"
echo "Joomla manifest valid" echo "platform=$PLATFORM" >> "$GITHUB_OUTPUT"
;;
dolibarr) - name: Setup PHP
MOD_FILE=$(find . -maxdepth 4 -name "mod*.class.php" ! -path "./.git/*" -exec grep -l 'extends DolibarrModules' {} \; 2>/dev/null | head -1) if: steps.platform.outputs.platform == 'joomla' || steps.platform.outputs.platform == 'dolibarr'
if [ -z "$MOD_FILE" ]; then run: |
echo "::error::No mod*.class.php found" if ! command -v php &> /dev/null; then
exit 1 sudo apt-get update -qq
fi sudo apt-get install -y -qq php-cli php-mbstring php-xml >/dev/null 2>&1
echo "Dolibarr module: ${MOD_FILE}" fi
;;
*) - name: PHP syntax check
echo "Generic platform — no manifest validation" if: steps.platform.outputs.platform == 'joomla' || steps.platform.outputs.platform == 'dolibarr'
;; run: |
esac ERRORS=0
while IFS= read -r -d '' file; do
- name: Check update stream format if ! php -l "$file" 2>&1 | grep -q "No syntax errors"; then
run: | ERRORS=$((ERRORS + 1))
PLATFORM="${{ steps.platform.outputs.platform }}" fi
case "$PLATFORM" in done < <(find . -name "*.php" -not -path "./.git/*" -not -path "./vendor/*" -print0)
joomla) echo "PHP lint: ${ERRORS} error(s)"
if [ -f "updates.xml" ]; then [ "$ERRORS" -eq 0 ] || { echo "::error::PHP syntax errors found"; exit 1; }
if command -v php &> /dev/null; then
php -r "libxml_use_internal_errors(true); \$x = simplexml_load_file('updates.xml'); if(!\$x){foreach(libxml_get_errors() as \$e) echo \$e->message; exit(1);}" || { echo "::error::updates.xml is malformed"; exit 1; } - name: Joomla JEXEC guard check
fi if: steps.platform.outputs.platform == 'joomla'
echo "updates.xml valid" run: |
fi ERRORS=0
;; while IFS= read -r -d '' file; do
dolibarr) # Skip vendor, node_modules, and index.html stub files
[ -f "update.txt" ] && echo "update.txt present" || echo "::warning::No update.txt" case "$file" in ./vendor/*|./node_modules/*) continue ;; esac
;; # Check first 10 lines for JEXEC or JPATH guard
esac if ! head -20 "$file" | grep -qE "defined\s*\(\s*['\"](_JEXEC|JPATH_BASE|\\\\JPATH_PLATFORM)['\"]"; then
echo "::error file=${file}::Missing JEXEC guard: ${file}"
- name: Check changelog has unreleased entry ERRORS=$((ERRORS + 1))
run: | fi
if [ ! -f "CHANGELOG.md" ]; then done < <(find . -name "*.php" -path "*/src/*" -not -path "./.git/*" -not -path "./vendor/*" -print0)
echo "::warning::No CHANGELOG.md found" if [ "$ERRORS" -gt 0 ]; then
exit 0 echo "::error::${ERRORS} PHP file(s) missing defined('_JEXEC') or die guard"
fi echo "## JEXEC Guard Check: Failed" >> $GITHUB_STEP_SUMMARY
# Check for content under [Unreleased] section echo "${ERRORS} file(s) in src/ are missing the Joomla execution guard." >> $GITHUB_STEP_SUMMARY
if ! grep -q "## \[Unreleased\]" CHANGELOG.md; then exit 1
echo "::error::CHANGELOG.md missing [Unreleased] section" fi
exit 1 echo "JEXEC guard: OK"
fi
# Check there's at least one entry (Added/Changed/Fixed/Removed) under Unreleased - name: Joomla directory listing protection
UNRELEASED_CONTENT=$(sed -n '/## \[Unreleased\]/,/## \[/p' CHANGELOG.md | grep -cE '^\s*-\s' || true) if: steps.platform.outputs.platform == 'joomla'
if [ "$UNRELEASED_CONTENT" -eq 0 ]; then run: |
echo "::error::CHANGELOG.md [Unreleased] section has no entries. Add a changelog entry describing your changes." MISSING=0
echo "## Changelog Check: Failed" >> $GITHUB_STEP_SUMMARY SOURCE_DIR="src"
echo "The \`[Unreleased]\` section in CHANGELOG.md has no entries." >> $GITHUB_STEP_SUMMARY [ ! -d "$SOURCE_DIR" ] && exit 0
echo "Add a line like \`- Description of your change\` under a heading (\`### Added\`, \`### Changed\`, \`### Fixed\`, etc.)" >> $GITHUB_STEP_SUMMARY while IFS= read -r dir; do
exit 1 if [ ! -f "${dir}/index.html" ]; then
fi echo "::warning::Missing index.html in ${dir} (directory listing protection)"
echo "Changelog: ${UNRELEASED_CONTENT} entry/entries in [Unreleased]" MISSING=$((MISSING + 1))
fi
- name: Verify package source done < <(find "$SOURCE_DIR" -type d -not -path "./.git/*" -not -path "*/vendor/*" -not -path "*/node_modules/*")
run: | if [ "$MISSING" -gt 0 ]; then
SOURCE_DIR="src" echo "## Directory Protection" >> $GITHUB_STEP_SUMMARY
[ ! -d "$SOURCE_DIR" ] && SOURCE_DIR="htdocs" echo "${MISSING} director(ies) missing index.html" >> $GITHUB_STEP_SUMMARY
if [ ! -d "$SOURCE_DIR" ]; then fi
echo "::warning::No src/ or htdocs/ directory" echo "Directory protection: ${MISSING} missing (advisory)"
exit 0
fi - name: Joomla script file and asset checks
FILE_COUNT=$(find "$SOURCE_DIR" -type f | wc -l) if: steps.platform.outputs.platform == 'joomla'
echo "Source: ${FILE_COUNT} files" run: |
[ "$FILE_COUNT" -gt 0 ] || { echo "::error::Source directory is empty"; exit 1; } ERRORS=0
MANIFEST=$(find . -maxdepth 3 -name "*.xml" ! -path "./.git/*" -exec grep -l '<extension' {} \; 2>/dev/null | head -1)
# ── Pre-Release RC Build ───────────────────────────────────────────────── [ -z "$MANIFEST" ] && exit 0
pre-release: MANIFEST_DIR=$(dirname "$MANIFEST")
name: Build RC Package
runs-on: ubuntu-latest # Check scriptfile exists if declared
needs: [branch-policy, validate] SCRIPTFILE=$(sed -n 's/.*<scriptfile>\([^<]*\)<\/scriptfile>.*/\1/p' "$MANIFEST" 2>/dev/null)
if [ -n "$SCRIPTFILE" ]; then
steps: if [ ! -f "${MANIFEST_DIR}/${SCRIPTFILE}" ]; then
- name: Trigger RC pre-release echo "::error::Manifest declares <scriptfile>${SCRIPTFILE}</scriptfile> but file not found at ${MANIFEST_DIR}/${SCRIPTFILE}"
env: ERRORS=$((ERRORS + 1))
GA_TOKEN: ${{ secrets.MOKOGITEA_TOKEN }} else
REPO: ${{ github.repository }} echo "Script file: ${MANIFEST_DIR}/${SCRIPTFILE} (OK)"
BRANCH: ${{ github.head_ref }} fi
GITEA_URL: ${{ vars.GITEA_URL || 'https://git.mokoconsulting.tech' }} fi
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\"}}" # Require joomla.asset.json and validate it
echo "### Pre-Release" >> $GITHUB_STEP_SUMMARY ASSET_JSON=$(find "$MANIFEST_DIR" -name "joomla.asset.json" -not -path "./.git/*" 2>/dev/null | head -1)
echo "Triggered RC build on branch \`${BRANCH}\`" >> $GITHUB_STEP_SUMMARY if [ -z "$ASSET_JSON" ]; then
echo "::error::joomla.asset.json not found — Joomla asset system is required"
ERRORS=$((ERRORS + 1))
else
if command -v php &> /dev/null; then
php -r "json_decode(file_get_contents('$ASSET_JSON')); if(json_last_error()!==JSON_ERROR_NONE){echo json_last_error_msg();exit(1);}" 2>&1 || {
echo "::error::joomla.asset.json is not valid JSON"
ERRORS=$((ERRORS + 1))
}
fi
echo "joomla.asset.json: valid"
fi
# Validate all XML files in src/ are well-formed
XML_ERRORS=0
if command -v php &> /dev/null; then
while IFS= read -r -d '' xmlfile; do
if ! php -r "libxml_use_internal_errors(true); \$x = simplexml_load_file('$xmlfile'); if(!\$x){foreach(libxml_get_errors() as \$e) echo trim(\$e->message) . ' in $xmlfile'; exit(1);}" 2>&1; then
XML_ERRORS=$((XML_ERRORS + 1))
fi
done < <(find "$MANIFEST_DIR" -name "*.xml" -not -path "./.git/*" -print0)
fi
if [ "$XML_ERRORS" -gt 0 ]; then
echo "::error::${XML_ERRORS} XML file(s) are malformed"
ERRORS=$((ERRORS + 1))
else
echo "XML well-formedness: OK"
fi
[ "$ERRORS" -gt 0 ] && exit 1
echo "Joomla asset checks: OK"
- name: Validate platform manifest
run: |
PLATFORM="${{ steps.platform.outputs.platform }}"
case "$PLATFORM" in
joomla)
MANIFEST=$(find . -maxdepth 3 -name "*.xml" ! -path "./.git/*" -exec grep -l '<extension' {} \; 2>/dev/null | head -1)
if [ -z "$MANIFEST" ]; then
echo "::warning::No Joomla manifest found (WaaS site)"
exit 0
fi
echo "Manifest: ${MANIFEST}"
if command -v php &> /dev/null; then
php -r "libxml_use_internal_errors(true); \$x = simplexml_load_file('$MANIFEST'); if(!\$x){foreach(libxml_get_errors() as \$e) echo \$e->message; exit(1);}" || { echo "::error::Manifest XML is malformed"; exit 1; }
fi
for ELEMENT in name version description; do
grep -q "<${ELEMENT}>" "$MANIFEST" || { echo "::error::Missing <${ELEMENT}> in manifest"; exit 1; }
done
# Block legacy raw/branch update server URLs on MokoGitea
RAW_URLS=$(grep -n 'raw/branch' "$MANIFEST" | grep -i 'mokoconsulting\|mokogitea\|git\.mokoconsulting\.tech' || true)
if [ -n "$RAW_URLS" ]; then
echo "::error::Manifest contains legacy raw/branch update server URL on MokoGitea. Use the Gitea Pages URL instead (e.g. /{REPO}/updates.xml not /{REPO}/raw/branch/main/updates.xml)"
echo "$RAW_URLS"
exit 1
fi
echo "Joomla manifest valid"
;;
dolibarr)
MOD_FILE=$(find . -maxdepth 4 -name "mod*.class.php" ! -path "./.git/*" -exec grep -l 'extends DolibarrModules' {} \; 2>/dev/null | head -1)
if [ -z "$MOD_FILE" ]; then
echo "::error::No mod*.class.php found"
exit 1
fi
echo "Dolibarr module: ${MOD_FILE}"
;;
*)
echo "Generic platform — no manifest validation"
;;
esac
- name: Check update stream format
run: |
PLATFORM="${{ steps.platform.outputs.platform }}"
case "$PLATFORM" in
joomla)
if [ -f "updates.xml" ]; then
if command -v php &> /dev/null; then
php -r "libxml_use_internal_errors(true); \$x = simplexml_load_file('updates.xml'); if(!\$x){foreach(libxml_get_errors() as \$e) echo \$e->message; exit(1);}" || { echo "::error::updates.xml is malformed"; exit 1; }
fi
echo "updates.xml valid"
fi
;;
dolibarr)
[ -f "update.txt" ] && echo "update.txt present" || echo "::warning::No update.txt"
;;
esac
- name: Validate Joomla language files
if: steps.platform.outputs.platform == 'joomla'
run: |
ERRORS=0
WARNINGS=0
# Require both en-GB and en-US language directories
LANG_ROOT=$(find . -path "*/language" -type d -not -path "./.git/*" 2>/dev/null | head -1)
if [ -z "$LANG_ROOT" ]; then
echo "No language/ directory found — skipping"
exit 0
fi
if [ ! -d "$LANG_ROOT/en-GB" ]; then
echo "::error::Missing en-GB language directory (${LANG_ROOT}/en-GB)"
ERRORS=$((ERRORS + 1))
fi
if [ ! -d "$LANG_ROOT/en-US" ]; then
echo "::error::Missing en-US language directory (${LANG_ROOT}/en-US)"
ERRORS=$((ERRORS + 1))
fi
# Check that en-GB and en-US have matching .ini files
if [ -d "$LANG_ROOT/en-GB" ] && [ -d "$LANG_ROOT/en-US" ]; then
for GB_INI in "$LANG_ROOT/en-GB"/*.ini; do
[ ! -f "$GB_INI" ] && continue
US_INI="$LANG_ROOT/en-US/$(basename "$GB_INI")"
if [ ! -f "$US_INI" ]; then
echo "::error::$(basename "$GB_INI") exists in en-GB but missing from en-US"
ERRORS=$((ERRORS + 1))
fi
done
for US_INI in "$LANG_ROOT/en-US"/*.ini; do
[ ! -f "$US_INI" ] && continue
GB_INI="$LANG_ROOT/en-GB/$(basename "$US_INI")"
if [ ! -f "$GB_INI" ]; then
echo "::error::$(basename "$US_INI") exists in en-US but missing from en-GB"
ERRORS=$((ERRORS + 1))
fi
done
fi
# Find all .ini language files
INI_FILES=$(find . -path "*/language/*/*.ini" -not -path "./.git/*" 2>/dev/null)
if [ -z "$INI_FILES" ]; then
echo "No .ini language files found"
[ "$ERRORS" -gt 0 ] && exit 1
exit 0
fi
echo "Found $(echo "$INI_FILES" | wc -l) language file(s)"
for FILE in $INI_FILES; do
FNAME=$(basename "$FILE")
LINENUM=0
SEEN_KEYS=""
while IFS= read -r line || [ -n "$line" ]; do
LINENUM=$((LINENUM + 1))
# Skip empty lines and comments
[ -z "$line" ] && continue
echo "$line" | grep -qE '^\s*;' && continue
echo "$line" | grep -qE '^\s*$' && continue
# Must match KEY="VALUE" format
if ! echo "$line" | grep -qE '^[A-Z_][A-Z0-9_]*=".*"$'; then
echo "::error file=${FILE},line=${LINENUM}::Malformed line: ${line}"
ERRORS=$((ERRORS + 1))
continue
fi
# Extract key and check for duplicates
KEY=$(echo "$line" | sed 's/=.*//')
if echo "$SEEN_KEYS" | grep -qx "$KEY"; then
echo "::error file=${FILE},line=${LINENUM}::Duplicate key: ${KEY}"
ERRORS=$((ERRORS + 1))
fi
SEEN_KEYS="${SEEN_KEYS}
${KEY}"
done < "$FILE"
echo " ${FILE}: checked ${LINENUM} lines"
done
# Cross-check en-GB vs en-US key consistency
GB_DIR=$(find . -path "*/language/en-GB" -type d -not -path "./.git/*" 2>/dev/null | head -1)
US_DIR=$(find . -path "*/language/en-US" -type d -not -path "./.git/*" 2>/dev/null | head -1)
if [ -n "$GB_DIR" ] && [ -n "$US_DIR" ]; then
for GB_FILE in "$GB_DIR"/*.ini; do
[ ! -f "$GB_FILE" ] && continue
FNAME=$(basename "$GB_FILE")
US_FILE="$US_DIR/$FNAME"
[ ! -f "$US_FILE" ] && continue
GB_KEYS=$(grep -oP '^[A-Z_][A-Z0-9_]*(?==)' "$GB_FILE" 2>/dev/null | sort)
US_KEYS=$(grep -oP '^[A-Z_][A-Z0-9_]*(?==)' "$US_FILE" 2>/dev/null | sort)
# Keys in en-GB but not en-US
MISSING_US=$(comm -23 <(echo "$GB_KEYS") <(echo "$US_KEYS"))
if [ -n "$MISSING_US" ]; then
echo "::warning::Keys in en-GB/$FNAME but missing from en-US/$FNAME:"
echo "$MISSING_US" | while read -r k; do echo " - $k"; done
WARNINGS=$((WARNINGS + 1))
fi
# Keys in en-US but not en-GB
MISSING_GB=$(comm -13 <(echo "$GB_KEYS") <(echo "$US_KEYS"))
if [ -n "$MISSING_GB" ]; then
echo "::warning::Keys in en-US/$FNAME but missing from en-GB/$FNAME:"
echo "$MISSING_GB" | while read -r k; do echo " - $k"; done
WARNINGS=$((WARNINGS + 1))
fi
done
fi
{
echo "### Language File Validation"
echo "| Metric | Count |"
echo "|---|---|"
echo "| Files checked | $(echo "$INI_FILES" | wc -l) |"
echo "| Errors | ${ERRORS} |"
echo "| Warnings | ${WARNINGS} |"
} >> $GITHUB_STEP_SUMMARY
if [ "$ERRORS" -gt 0 ]; then
echo "::error::Language validation failed with ${ERRORS} error(s)"
exit 1
fi
echo "Language files: OK (${WARNINGS} warning(s))"
- name: Check changelog has unreleased entry
run: |
if [ ! -f "CHANGELOG.md" ]; then
echo "::warning::No CHANGELOG.md found"
exit 0
fi
# Check for content under [Unreleased] section
if ! grep -q "## \[Unreleased\]" CHANGELOG.md; then
echo "::error::CHANGELOG.md missing [Unreleased] section"
exit 1
fi
# Check there's at least one entry (Added/Changed/Fixed/Removed) under Unreleased
UNRELEASED_CONTENT=$(sed -n '/## \[Unreleased\]/,/## \[/p' CHANGELOG.md | grep -cE '^\s*-\s' || true)
if [ "$UNRELEASED_CONTENT" -eq 0 ]; then
echo "::error::CHANGELOG.md [Unreleased] section has no entries. Add a changelog entry describing your changes."
echo "## Changelog Check: Failed" >> $GITHUB_STEP_SUMMARY
echo "The \`[Unreleased]\` section in CHANGELOG.md has no entries." >> $GITHUB_STEP_SUMMARY
echo "Add a line like \`- Description of your change\` under a heading (\`### Added\`, \`### Changed\`, \`### Fixed\`, etc.)" >> $GITHUB_STEP_SUMMARY
exit 1
fi
echo "Changelog: ${UNRELEASED_CONTENT} entry/entries in [Unreleased]"
- name: Verify package source
run: |
SOURCE_DIR="src"
[ ! -d "$SOURCE_DIR" ] && SOURCE_DIR="htdocs"
if [ ! -d "$SOURCE_DIR" ]; then
echo "::warning::No src/ or htdocs/ directory"
exit 0
fi
FILE_COUNT=$(find "$SOURCE_DIR" -type f | wc -l)
echo "Source: ${FILE_COUNT} files"
[ "$FILE_COUNT" -gt 0 ] || { echo "::error::Source directory is empty"; exit 1; }
# ── Pre-Release RC Build ─────────────────────────────────────────────────
pre-release:
name: Build RC Package
runs-on: ubuntu-latest
needs: [branch-policy, validate]
steps:
- name: Trigger RC pre-release
env:
GA_TOKEN: ${{ secrets.MOKOGITEA_TOKEN }}
REPO: ${{ github.repository }}
BRANCH: ${{ github.head_ref }}
GITEA_URL: ${{ vars.GITEA_URL || 'https://git.mokoconsulting.tech' }}
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\"}}"
echo "### Pre-Release" >> $GITHUB_STEP_SUMMARY
echo "Triggered RC build on branch \`${BRANCH}\`" >> $GITHUB_STEP_SUMMARY
# ── Issue Reporter ──────────────────────────────────────────────────────
report-issues:
name: Report Issues
runs-on: ubuntu-latest
needs: [branch-policy, validate]
if: >-
always() &&
needs.validate.result == 'failure'
steps:
- name: Checkout
uses: actions/checkout@v4
with:
sparse-checkout: automation/ci-issue-reporter.sh
sparse-checkout-cone-mode: false
- 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."
@@ -0,0 +1,71 @@
# Copyright (C) 2026 Moko Consulting <hello@mokoconsulting.tech>
#
# SPDX-License-Identifier: GPL-3.0-or-later
#
# FILE INFORMATION
# DEFGROUP: Gitea.Workflow
# INGROUP: mokocli.Validation
# REPO: https://git.mokoconsulting.tech/MokoConsulting/mokocli
# PATH: /templates/workflows/joomla/pr-metadata-check.yml.template
# VERSION: 01.00.00
# BRIEF: Validate MokoGitea metadata matches Joomla extension manifest on PRs
name: "Joomla: Metadata Validation"
on:
pull_request:
types: [opened, synchronize, reopened, converted_to_draft, ready_for_review]
permissions:
contents: read
env:
GITEA_URL: ${{ vars.GITEA_URL || 'https://git.mokoconsulting.tech' }}
GITEA_ORG: ${{ vars.GITEA_ORG || github.repository_owner }}
GITEA_REPO: ${{ vars.GITEA_REPO || github.event.repository.name }}
jobs:
validate-metadata:
name: "Validate Joomla Metadata"
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup mokocli tools
env:
MOKO_CLONE_TOKEN: ${{ secrets.MOKOGITEA_TOKEN }}
MOKO_CLONE_HOST: git.mokoconsulting.tech/MokoConsulting
run: |
if [ -f /opt/mokocli/cli/joomla_metadata_validate.php ] && [ -f /opt/mokocli/vendor/autoload.php ]; then
echo Using pre-installed /opt/mokocli
echo MOKO_CLI=/opt/mokocli/cli >> $GITHUB_ENV
else
echo Falling back to fresh clone
if ! command -v composer > /dev/null 2>&1; then
sudo apt-get update -qq && sudo apt-get install -y -qq php-cli php-mbstring php-xml php-zip php-curl composer > /dev/null 2>&1
fi
rm -rf /tmp/mokocli
CLONE_URL=https://x-access-token:${MOKO_CLONE_TOKEN}@${MOKO_CLONE_HOST}/mokocli.git
git clone --depth 1 --branch main --quiet $CLONE_URL /tmp/mokocli
cd /tmp/mokocli && composer install --no-dev --no-interaction --quiet
echo MOKO_CLI=/tmp/mokocli/cli >> $GITHUB_ENV
fi
- name: Validate metadata against Joomla manifest
env:
GITEA_TOKEN: ${{ secrets.MOKOGITEA_TOKEN }}
run: |
php ${MOKO_CLI}/joomla_metadata_validate.php \
--path . \
--token "${GITEA_TOKEN}" \
--org "${GITEA_ORG}" \
--repo "${GITEA_REPO}" \
--api-base "${GITEA_URL}/api/v1" \
--ci
if [ $? -ne 0 ]; then
echo "::error::Joomla metadata mismatch — update delivery will fail. Run 'php cli/joomla_metadata_validate.php' locally to see details."
exit 1
fi
+110 -75
View File
@@ -4,19 +4,26 @@
# #
# FILE INFORMATION # FILE INFORMATION
# DEFGROUP: Gitea.Workflow # DEFGROUP: Gitea.Workflow
# INGROUP: moko-platform.Release # INGROUP: mokocli.Release
# REPO: https://git.mokoconsulting.tech/MokoConsulting/moko-platform # 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.01.00
# BRIEF: Manual pre-release -- builds dev/alpha/beta/rc packages from any branch # BRIEF: Auto pre-release on push to dev/alpha/beta/rc branches
name: "Universal: Pre-Release" name: "Universal: Pre-Release"
on: on:
pull_request: push:
types: [closed]
branches: branches:
- dev - dev
- 'fix/**'
- 'patch/**'
- 'hotfix/**'
- 'bugfix/**'
- 'chore/**'
- alpha
- beta
- rc
workflow_dispatch: workflow_dispatch:
inputs: inputs:
stability: stability:
@@ -39,11 +46,11 @@ env:
jobs: jobs:
build: build:
name: "Build Pre-Release (${{ inputs.stability || 'development' }})" name: "Build Pre-Release (${{ inputs.stability || github.ref_name }})"
runs-on: release runs-on: release
if: >- if: >-
github.event_name == 'workflow_dispatch' || github.event_name == 'workflow_dispatch' ||
(github.event.pull_request.merged == true && github.event.pull_request.base.ref == 'dev') github.event_name == 'push'
steps: steps:
- name: Checkout - name: Checkout
@@ -51,32 +58,62 @@ jobs:
with: with:
fetch-depth: 0 fetch-depth: 0
token: ${{ secrets.MOKOGITEA_TOKEN }} token: ${{ secrets.MOKOGITEA_TOKEN }}
ref: ${{ github.ref_name }}
- name: Setup moko-platform tools - name: Setup mokocli tools
env: env:
MOKO_CLONE_TOKEN: ${{ secrets.MOKOGITEA_TOKEN }} MOKO_CLONE_TOKEN: ${{ secrets.MOKOGITEA_TOKEN }}
MOKO_CLONE_HOST: git.mokoconsulting.tech/MokoConsulting MOKO_CLONE_HOST: git.mokoconsulting.tech/MokoConsulting
run: | run: |
if ! command -v composer &> /dev/null; then # Use pre-installed /opt/mokocli if available (updated by cron every 6h)
sudo apt-get update -qq && sudo apt-get install -y -qq php-cli php-mbstring php-xml php-zip php-curl composer >/dev/null 2>&1 if [ -f /opt/mokocli/cli/version_bump.php ] && [ -f /opt/mokocli/cli/manifest_element.php ] && [ -f /opt/mokocli/vendor/autoload.php ]; then
echo Using pre-installed /opt/mokocli
echo MOKO_CLI=/opt/mokocli/cli >> $GITHUB_ENV
else
echo Falling back to fresh clone
if ! command -v composer > /dev/null 2>&1; then
sudo apt-get update -qq && sudo apt-get install -y -qq php-cli php-mbstring php-xml php-zip php-curl composer > /dev/null 2>&1
fi
rm -rf /tmp/mokocli
CLONE_URL=https://x-access-token:${MOKO_CLONE_TOKEN}@${MOKO_CLONE_HOST}/mokocli.git
git clone --depth 1 --branch main --quiet $CLONE_URL /tmp/mokocli
cd /tmp/mokocli && composer install --no-dev --no-interaction --quiet
echo MOKO_CLI=/tmp/mokocli/cli >> $GITHUB_ENV
fi fi
# Always fetch latest CLI tools — never use stale cache from previous runs
rm -rf /tmp/moko-platform-api
git clone --depth 1 --branch main --quiet \
"https://x-access-token:${MOKO_CLONE_TOKEN}@${MOKO_CLONE_HOST}/moko-platform.git" \
/tmp/moko-platform-api
cd /tmp/moko-platform-api && composer install --no-dev --no-interaction --quiet
echo "MOKO_CLI=/tmp/moko-platform-api/cli" >> "$GITHUB_ENV"
- name: Detect platform - name: Detect platform
id: platform id: platform
run: | run: |
# Auto-detect and update platform if not set in manifest
php ${MOKO_CLI}/platform_detect.php --path . --github-output 2>/dev/null || true
php ${MOKO_CLI}/manifest_read.php --path . --github-output php ${MOKO_CLI}/manifest_read.php --path . --github-output
- name: Check platform eligibility (Joomla only)
id: eligibility
run: |
PLATFORM="${{ steps.platform.outputs.platform }}"
if [[ "$PLATFORM" == joomla* ]] || [[ "$PLATFORM" == "joomla" ]]; then
echo "proceed=true" >> "$GITHUB_OUTPUT"
else
echo "proceed=false" >> "$GITHUB_OUTPUT"
echo "::notice::Platform '$PLATFORM' — non-Joomla, skipping pre-release auto-bump"
fi
- name: Resolve metadata and bump version - name: Resolve metadata and bump version
id: meta id: meta
if: steps.eligibility.outputs.proceed == 'true'
run: | run: |
STABILITY="${{ inputs.stability || 'development' }}" # Auto-detect stability from branch name on push, or use input on dispatch
if [ "${{ github.event_name }}" = "push" ]; then
case "${{ github.ref_name }}" in
rc) STABILITY="release-candidate" ;;
alpha) STABILITY="alpha" ;;
beta) STABILITY="beta" ;;
*) STABILITY="development" ;;
esac
else
STABILITY="${{ inputs.stability || 'development' }}"
fi
case "$STABILITY" in case "$STABILITY" in
development) SUFFIX="-dev"; TAG="development" ;; development) SUFFIX="-dev"; TAG="development" ;;
@@ -85,20 +122,26 @@ jobs:
release-candidate) SUFFIX="-rc"; TAG="release-candidate" ;; release-candidate) SUFFIX="-rc"; TAG="release-candidate" ;;
esac esac
# Read current version (bump already handled by push workflow) # Bump version via CLI: patch for dev/alpha/beta, minor for RC
VERSION=$(php ${MOKO_CLI}/version_read.php --path . 2>/dev/null) case "$STABILITY" in
[ -z "$VERSION" ] && VERSION="00.00.01" release-candidate) BUMP="minor" ;;
*) BUMP="patch" ;;
esac
# Strip any existing suffix from version before applying stability php ${MOKO_CLI}/version_bump.php --path . $([ "$BUMP" = "minor" ] && echo "--minor") 2>/dev/null || true
# Set stability suffix and verify consistency
VERSION=$(php ${MOKO_CLI}/version_read.php --path . 2>/dev/null || echo "00.00.01")
VERSION=$(echo "$VERSION" | sed 's/-\(dev\|alpha\|beta\|rc\)$//') VERSION=$(echo "$VERSION" | sed 's/-\(dev\|alpha\|beta\|rc\)$//')
php ${MOKO_CLI}/version_set_platform.php \ php ${MOKO_CLI}/version_set_platform.php \
--path . --version "$VERSION" --branch "${{ github.ref_name }}" --stability "$STABILITY" 2>/dev/null || true --path . --version "$VERSION" --branch "${{ github.ref_name }}" --stability "$STABILITY" 2>/dev/null || true
# Verify version consistency across all files
php ${MOKO_CLI}/version_check.php --path . --fix 2>/dev/null || true php ${MOKO_CLI}/version_check.php --path . --fix 2>/dev/null || true
# Update VERSION variable with suffix # Ensure licensing tags (updateservers, dlid) if enabled in manifest.xml
php ${MOKO_CLI}/manifest_licensing.php --path . --fix 2>/dev/null || true
# Append suffix for output
if [ -n "$SUFFIX" ]; then if [ -n "$SUFFIX" ]; then
VERSION="${VERSION}${SUFFIX}" VERSION="${VERSION}${SUFFIX}"
fi fi
@@ -135,6 +178,7 @@ jobs:
- name: Create release - name: Create release
id: release id: release
if: steps.eligibility.outputs.proceed == 'true'
run: | run: |
TAG="${{ steps.meta.outputs.tag }}" TAG="${{ steps.meta.outputs.tag }}"
VERSION="${{ steps.meta.outputs.version }}" VERSION="${{ steps.meta.outputs.version }}"
@@ -142,10 +186,47 @@ jobs:
php ${MOKO_CLI}/release_create.php \ php ${MOKO_CLI}/release_create.php \
--path . --version "$VERSION" --tag "$TAG" \ --path . --version "$VERSION" --tag "$TAG" \
--token "${{ secrets.MOKOGITEA_TOKEN }}" --api-base "$API_BASE" \ --token "${{ secrets.MOKOGITEA_TOKEN }}" --api-base "$API_BASE" \
--repo "${GITEA_REPO}" --branch dev --prerelease --repo "${GITEA_REPO}" --branch "${{ github.ref_name }}" --prerelease
- name: Update release notes from CHANGELOG.md
if: steps.eligibility.outputs.proceed == 'true'
run: |
TAG="${{ steps.meta.outputs.tag }}"
VERSION="${{ steps.meta.outputs.version }}"
API_BASE="${GITEA_URL}/api/v1/repos/${GITEA_ORG}/${GITEA_REPO}"
# Extract [Unreleased] section from changelog (everything between [Unreleased] and next ## heading)
if [ -f "CHANGELOG.md" ]; then
NOTES=$(awk '/^## \[Unreleased\]/{found=1; next} /^## \[/{if(found) exit} found{print}' CHANGELOG.md)
[ -z "$NOTES" ] && NOTES="Release ${VERSION}"
else
NOTES="Release ${VERSION}"
fi
# Update release body via API
RELEASE_ID=$(curl -sf -H "Authorization: token ${{ secrets.MOKOGITEA_TOKEN }}" \
"${API_BASE}/releases/tags/${TAG}" | python3 -c "import json,sys; print(json.load(sys.stdin).get('id',''))" 2>/dev/null || true)
if [ -n "$RELEASE_ID" ]; then
python3 -c "
import json, urllib.request
body = open('/dev/stdin').read()
payload = json.dumps({'body': body}).encode()
req = urllib.request.Request(
'${API_BASE}/releases/${RELEASE_ID}',
data=payload, method='PATCH',
headers={
'Authorization': 'token ${{ secrets.MOKOGITEA_TOKEN }}',
'Content-Type': 'application/json'
})
urllib.request.urlopen(req)
" <<< "$NOTES"
echo "Release notes updated from CHANGELOG.md"
fi
- name: Build package and upload - name: Build package and upload
id: package id: package
if: steps.eligibility.outputs.proceed == 'true'
run: | run: |
VERSION="${{ steps.meta.outputs.version }}" VERSION="${{ steps.meta.outputs.version }}"
TAG="${{ steps.meta.outputs.tag }}" TAG="${{ steps.meta.outputs.tag }}"
@@ -155,57 +236,11 @@ jobs:
--token "${{ secrets.MOKOGITEA_TOKEN }}" --api-base "$API_BASE" \ --token "${{ secrets.MOKOGITEA_TOKEN }}" --api-base "$API_BASE" \
--repo "${GITEA_REPO}" --output /tmp || true --repo "${GITEA_REPO}" --output /tmp || true
- name: Update updates.xml # updates.xml is generated dynamically by MokoGitea license server
if: steps.platform.outputs.platform == 'joomla' # No need to build, commit, or sync updates.xml from workflows
run: |
VERSION="${{ steps.meta.outputs.version }}"
STABILITY="${{ steps.meta.outputs.stability }}"
SHA256="${{ steps.package.outputs.sha256_zip }}"
if [ ! -f "updates.xml" ]; then
echo "No updates.xml -- skipping"
exit 0
fi
SHA_FLAG=""
[ -n "$SHA256" ] && SHA_FLAG="--sha ${SHA256}"
php ${MOKO_CLI}/updates_xml_build.php \
--path . --version "${VERSION}" --stability "${STABILITY}" \
--gitea-url "${GITEA_URL}" --org "${GITEA_ORG}" --repo "${GITEA_REPO}" \
${SHA_FLAG}
# Commit and push
if ! git diff --quiet updates.xml 2>/dev/null; then
git config --local user.email "gitea-actions[bot]@mokoconsulting.tech"
git config --local user.name "gitea-actions[bot]"
git add updates.xml
git commit -m "chore: update ${STABILITY} channel ${VERSION} [skip ci]"
git push origin HEAD 2>&1 || echo "WARNING: push failed"
fi
- name: "Sync updates.xml to all branches"
if: steps.platform.outputs.platform == 'joomla'
run: |
CURRENT_BRANCH="${{ github.ref_name }}"
git config --local user.email "gitea-actions[bot]@mokoconsulting.tech"
git config --local user.name "gitea-actions[bot]"
for BRANCH in main dev; do
[ "$BRANCH" = "$CURRENT_BRANCH" ] && continue
echo "Syncing updates.xml -> ${BRANCH}"
git fetch origin "${BRANCH}" 2>/dev/null || continue
git checkout "origin/${BRANCH}" -- updates.xml 2>/dev/null || continue
git checkout "${CURRENT_BRANCH}" -- updates.xml
if ! git diff --quiet updates.xml 2>/dev/null; then
git add updates.xml
git commit -m "chore: sync updates.xml from ${CURRENT_BRANCH} [skip ci]"
git push origin HEAD:refs/heads/${BRANCH} 2>&1 || echo "WARNING: push to ${BRANCH} failed"
fi
git checkout "${CURRENT_BRANCH}" 2>/dev/null
done
- name: "Delete lesser pre-release channels (cascade)" - name: "Delete lesser pre-release channels (cascade)"
if: steps.eligibility.outputs.proceed == 'true'
continue-on-error: true continue-on-error: true
run: | run: |
API_BASE="${GITEA_URL}/api/v1/repos/${GITEA_ORG}/${GITEA_REPO}" API_BASE="${GITEA_URL}/api/v1/repos/${GITEA_ORG}/${GITEA_REPO}"
+66
View File
@@ -0,0 +1,66 @@
# Copyright (C) 2026 Moko Consulting <hello@mokoconsulting.tech>
#
# SPDX-License-Identifier: GPL-3.0-or-later
#
# FILE INFORMATION
# DEFGROUP: Gitea.Workflow
# INGROUP: mokocli.Universal
# REPO: https://git.mokoconsulting.tech/MokoConsulting/mokocli
# PATH: /.mokogitea/workflows/rc-revert.yml
# VERSION: 09.23.00
# BRIEF: Rename rc/ branch back to dev/ when PR is closed without merge
name: "RC Revert"
on:
pull_request:
types: [closed]
env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
jobs:
revert:
name: Rename rc/ back to dev/
runs-on: ubuntu-latest
if: >-
github.event.pull_request.merged == false &&
startsWith(github.event.pull_request.head.ref, 'rc/')
steps:
- name: Rename branch
run: |
BRANCH="${{ github.event.pull_request.head.ref }}"
SUFFIX="${BRANCH#rc/}"
DEV_BRANCH="dev/${SUFFIX}"
API="${{ vars.GITEA_URL || 'https://git.mokoconsulting.tech' }}/api/v1/repos/${{ github.repository }}/branches"
TOKEN="${{ secrets.MOKOGITEA_TOKEN }}"
# Create dev/ branch from rc/ branch
STATUS=$(curl -sf -o /dev/null -w "%{http_code}" -X POST \
-H "Authorization: token ${TOKEN}" \
-H "Content-Type: application/json" \
-d "{\"new_branch_name\": \"${DEV_BRANCH}\", \"old_branch_name\": \"${BRANCH}\"}" \
"${API}" 2>/dev/null || true)
if [ "$STATUS" = "201" ]; then
echo "Created branch: ${DEV_BRANCH}" >> $GITHUB_STEP_SUMMARY
else
echo "::error::Failed to create ${DEV_BRANCH} from ${BRANCH} (HTTP ${STATUS})"
exit 1
fi
# Delete rc/ branch
ENCODED=$(php -r "echo rawurlencode('${BRANCH}');")
STATUS=$(curl -sf -o /dev/null -w "%{http_code}" -X DELETE \
-H "Authorization: token ${TOKEN}" \
"${API}/${ENCODED}" 2>/dev/null || true)
if [ "$STATUS" = "204" ]; then
echo "Deleted branch: ${BRANCH}" >> $GITHUB_STEP_SUMMARY
else
echo "::warning::Failed to delete ${BRANCH} (HTTP ${STATUS})"
fi
echo "### RC Reverted" >> $GITHUB_STEP_SUMMARY
echo "${BRANCH} → ${DEV_BRANCH}" >> $GITHUB_STEP_SUMMARY
File diff suppressed because it is too large Load Diff
+2 -18
View File
@@ -4,8 +4,8 @@
# #
# FILE INFORMATION # FILE INFORMATION
# DEFGROUP: Gitea.Workflow # DEFGROUP: Gitea.Workflow
# INGROUP: moko-platform.Security # INGROUP: MokoStandards.Security
# REPO: https://git.mokoconsulting.tech/MokoConsulting/moko-platform # REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoStandards
# PATH: /.gitea/workflows/security-audit.yml # PATH: /.gitea/workflows/security-audit.yml
# VERSION: 01.00.00 # VERSION: 01.00.00
# BRIEF: Dependency vulnerability scanning for composer and npm packages # BRIEF: Dependency vulnerability scanning for composer and npm packages
@@ -80,19 +80,3 @@ jobs:
-H "Priority: high" \ -H "Priority: high" \
-d "Security audit found vulnerabilities. Review dependency updates." \ -d "Security audit found vulnerabilities. Review dependency updates." \
"${NTFY_URL}/${NTFY_TOPIC}" || true "${NTFY_URL}/${NTFY_TOPIC}" || true
- name: Joomla version audit
if: always()
run: |
if [ -f "monitoring/joomla-version-audit.php" ] && [ -n "$JOOMLA_SITES" ]; then
echo "$JOOMLA_SITES" > /tmp/sites.json
php monitoring/joomla-version-audit.php --sites /tmp/sites.json || true
echo "### Joomla Version Audit" >> $GITHUB_STEP_SUMMARY
rm -f /tmp/sites.json
else
echo "Joomla audit skipped (no script or JOOMLA_SITES_JSON not configured)"
fi
env:
JOOMLA_SITES: ${{ vars.JOOMLA_SITES_JSON }}
-312
View File
@@ -1,312 +0,0 @@
# Copyright (C) 2026 Moko Consulting <hello@mokoconsulting.tech>
#
# SPDX-License-Identifier: GPL-3.0-or-later
#
# FILE INFORMATION
# DEFGROUP: Gitea.Workflow
# INGROUP: moko-platform.Universal
# REPO: https://git.mokoconsulting.tech/MokoConsulting/moko-platform
# PATH: /templates/workflows/update-server.yml
# VERSION: 05.00.00
# BRIEF: Pre-release build + update server XML for dev/alpha/beta/rc branches
#
# Thin wrapper around moko-platform CLI tools.
# Builds packages, updates updates.xml, and optionally deploys via SFTP.
#
# Joomla filters update entries by the user's "Minimum Stability" setting.
name: "Update Server"
on:
push:
branches:
- 'dev'
- 'dev/**'
- 'alpha/**'
- 'beta/**'
- 'rc/**'
paths:
- 'src/**'
- 'htdocs/**'
pull_request:
types: [closed]
branches:
- 'dev'
- 'dev/**'
- 'alpha/**'
- 'beta/**'
- 'rc/**'
paths:
- 'src/**'
- 'htdocs/**'
workflow_dispatch:
inputs:
stability:
description: 'Stability tag'
required: true
default: 'development'
type: choice
options:
- development
- alpha
- beta
- rc
- stable
env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
GITEA_URL: ${{ vars.GITEA_URL || 'https://git.mokoconsulting.tech' }}
GITEA_ORG: ${{ vars.GITEA_ORG || github.repository_owner }}
GITEA_REPO: ${{ vars.GITEA_REPO || github.event.repository.name }}
permissions:
contents: write
jobs:
update-xml:
name: Update Server
runs-on: release
if: >-
github.event.pull_request.merged == true || github.event_name == 'workflow_dispatch' || github.event_name == 'push'
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
token: ${{ secrets.MOKOGITEA_TOKEN }}
fetch-depth: 0
- name: Setup moko-platform tools
env:
MOKO_CLONE_TOKEN: ${{ secrets.MOKOGITEA_TOKEN }}
MOKO_CLONE_HOST: git.mokoconsulting.tech/MokoConsulting
COMPOSER_AUTH: '{"http-basic":{"git.mokoconsulting.tech":{"username":"token","password":"${{ secrets.MOKOGITEA_TOKEN }}"}}}'
run: |
if ! command -v composer &> /dev/null; then
sudo apt-get update -qq && sudo apt-get install -y -qq php-cli php-mbstring php-xml php-zip php-curl composer >/dev/null 2>&1
fi
# Always fetch latest CLI tools — never use stale cache from previous runs
rm -rf /tmp/moko-platform
git clone --depth 1 --branch main --quiet \
"https://x-access-token:${MOKO_CLONE_TOKEN}@${MOKO_CLONE_HOST}/moko-platform.git" \
/tmp/moko-platform 2>/dev/null || true
if [ -d "/tmp/moko-platform" ] && [ -f "/tmp/moko-platform/composer.json" ]; then
cd /tmp/moko-platform && composer install --no-dev --no-interaction --quiet 2>/dev/null || true
fi
echo "MOKO_CLI=/tmp/moko-platform/cli" >> "$GITHUB_ENV"
- name: Detect platform
id: platform
run: php ${MOKO_CLI}/manifest_read.php --path . --github-output
- name: Resolve stability and bump version
id: meta
run: |
BRANCH="${{ github.ref_name }}"
# Configure git for bot pushes
git config --local user.email "gitea-actions[bot]@mokoconsulting.tech"
git config --local user.name "gitea-actions[bot]"
git remote set-url origin "https://x-access-token:${{ secrets.MOKOGITEA_TOKEN }}@git.mokoconsulting.tech/${{ github.repository }}.git"
# Auto-bump patch version
php ${MOKO_CLI}/version_bump.php --path . 2>/dev/null || true
VERSION=$(php ${MOKO_CLI}/version_read.php --path . 2>/dev/null || echo "0.0.0")
# Strip any existing suffix before applying stability
VERSION=$(echo "$VERSION" | sed 's/-\(dev\|alpha\|beta\|rc\)$//')
# Determine stability from branch or manual input
if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
STABILITY="${{ inputs.stability }}"
elif [[ "$BRANCH" == rc/* ]]; then
STABILITY="rc"
elif [[ "$BRANCH" == beta/* ]]; then
STABILITY="beta"
elif [[ "$BRANCH" == alpha/* ]]; then
STABILITY="alpha"
else
STABILITY="development"
fi
# Version suffix per stability stream
case "$STABILITY" in
development) SUFFIX="-dev"; TAG="development" ;;
alpha) SUFFIX="-alpha"; TAG="alpha" ;;
beta) SUFFIX="-beta"; TAG="beta" ;;
rc) SUFFIX="-rc"; TAG="release-candidate" ;;
*) SUFFIX=""; TAG="stable" ;;
esac
# Propagate version with stability suffix to all manifest files
php ${MOKO_CLI}/version_set_platform.php \
--path . --version "$VERSION" --branch "$BRANCH" --stability "$STABILITY" 2>/dev/null || true
php ${MOKO_CLI}/version_check.php --path . --fix 2>/dev/null || true
# Re-read version (now includes suffix from version_set_platform)
if [ -n "$SUFFIX" ]; then
VERSION="${VERSION}${SUFFIX}"
fi
echo "version=${VERSION}" >> "$GITHUB_OUTPUT"
echo "stability=${STABILITY}" >> "$GITHUB_OUTPUT"
echo "suffix=${SUFFIX}" >> "$GITHUB_OUTPUT"
echo "tag=${TAG}" >> "$GITHUB_OUTPUT"
echo "display_version=${VERSION}" >> "$GITHUB_OUTPUT"
# Commit version bump if changed
git add -A
git diff --cached --quiet || {
git commit -m "chore(version): auto-bump ${VERSION} [skip ci]" \
--author="gitea-actions[bot] <gitea-actions[bot]@mokoconsulting.tech>"
git push
}
- name: Create release and upload package
id: package
run: |
VERSION="${{ steps.meta.outputs.version }}"
TAG="${{ steps.meta.outputs.tag }}"
API_BASE="${GITEA_URL}/api/v1/repos/${GITEA_ORG}/${GITEA_REPO}"
# Create or update Gitea release
php ${MOKO_CLI}/release_create.php \
--path . --version "$VERSION" --tag "$TAG" \
--token "${{ secrets.MOKOGITEA_TOKEN }}" --api-base "$API_BASE" \
--repo "${GITEA_REPO}" --branch "${{ github.ref_name }}" --prerelease
# Build package and upload
php ${MOKO_CLI}/release_package.php \
--path . --version "$VERSION" --tag "$TAG" \
--token "${{ secrets.MOKOGITEA_TOKEN }}" --api-base "$API_BASE" \
--repo "${GITEA_REPO}" --output /tmp || true
- name: Update updates.xml
if: steps.platform.outputs.platform == 'joomla'
run: |
VERSION="${{ steps.meta.outputs.version }}"
STABILITY="${{ steps.meta.outputs.stability }}"
SHA256="${{ steps.package.outputs.sha256_zip }}"
if [ ! -f "updates.xml" ]; then
echo "No updates.xml — skipping"
exit 0
fi
SHA_FLAG=""
[ -n "$SHA256" ] && SHA_FLAG="--sha ${SHA256}"
php ${MOKO_CLI}/updates_xml_build.php \
--path . --version "${VERSION}" --stability "${STABILITY}" \
--gitea-url "${GITEA_URL}" --org "${GITEA_ORG}" --repo "${GITEA_REPO}" \
${SHA_FLAG}
# Commit and push updates.xml
git add updates.xml
git diff --cached --quiet || {
git commit -m "chore: update ${STABILITY} channel ${VERSION} [skip ci]"
git push
}
- name: Sync updates.xml to main
if: github.ref_name != 'main' && steps.platform.outputs.platform == 'joomla'
run: |
API_BASE="${GITEA_URL}/api/v1/repos/${GITEA_ORG}/${GITEA_REPO}"
GITEA_TOKEN="${{ secrets.MOKOGITEA_TOKEN }}"
FILE_SHA=$(curl -sf -H "Authorization: token ${GITEA_TOKEN}" \
"${API_BASE}/contents/updates.xml?ref=main" | python3 -c "import sys,json; print(json.load(sys.stdin).get('sha',''))" 2>/dev/null || true)
if [ -n "$FILE_SHA" ] && [ -f "updates.xml" ]; then
python3 -c "
import base64, json, urllib.request, sys
with open('updates.xml', 'rb') as f:
content = base64.b64encode(f.read()).decode()
payload = json.dumps({
'content': content,
'sha': '${FILE_SHA}',
'message': 'chore: sync updates.xml from ${{ steps.meta.outputs.stability }} [skip ci]',
'branch': 'main'
}).encode()
req = urllib.request.Request(
'${API_BASE}/contents/updates.xml',
data=payload, method='PUT',
headers={
'Authorization': 'token ${GITEA_TOKEN}',
'Content-Type': 'application/json'
})
try:
urllib.request.urlopen(req)
print('updates.xml synced to main')
except Exception as e:
print(f'WARNING: sync to main failed: {e}', file=sys.stderr)
"
fi
- name: SFTP deploy to dev server
if: contains(github.ref, 'dev/') || github.ref == 'refs/heads/dev'
env:
DEV_HOST: ${{ vars.DEV_FTP_HOST }}
DEV_PATH: ${{ vars.DEV_FTP_PATH }}
DEV_SUFFIX: ${{ vars.DEV_FTP_SUFFIX }}
DEV_USER: ${{ vars.DEV_FTP_USERNAME }}
DEV_PORT: ${{ vars.DEV_FTP_PORT }}
DEV_KEY: ${{ secrets.DEV_FTP_KEY }}
DEV_PASS: ${{ secrets.DEV_FTP_PASSWORD }}
run: |
# Permission check: admin or maintain role required
ACTOR="${{ github.actor }}"
API_BASE="${GITEA_URL}/api/v1/repos/${GITEA_ORG}/${GITEA_REPO}"
PERMISSION=$(curl -sf -H "Authorization: token ${{ secrets.MOKOGITEA_TOKEN }}" \
"${API_BASE}/collaborators/${ACTOR}/permission" 2>/dev/null | \
python3 -c "import sys,json; print(json.load(sys.stdin).get('permission','read'))" 2>/dev/null || echo "read")
case "$PERMISSION" in
admin|maintain|write) ;;
*)
echo "Deploy denied: ${ACTOR} has '${PERMISSION}' — requires admin, maintain, or write"
exit 0
;;
esac
[ -z "$DEV_HOST" ] || [ -z "$DEV_PATH" ] && { echo "DEV FTP not configured — skipping SFTP"; exit 0; }
SOURCE_DIR="src"
[ ! -d "$SOURCE_DIR" ] && SOURCE_DIR="htdocs"
[ ! -d "$SOURCE_DIR" ] && exit 0
PORT="${DEV_PORT:-22}"
REMOTE="${DEV_PATH%/}"
[ -n "$DEV_SUFFIX" ] && REMOTE="${REMOTE}/${DEV_SUFFIX#/}"
printf '{"host":"%s","port":%s,"username":"%s","remotePath":"%s"' \
"$DEV_HOST" "$PORT" "$DEV_USER" "$REMOTE" > /tmp/sftp-config.json
if [ -n "$DEV_KEY" ]; then
echo "$DEV_KEY" > /tmp/deploy_key && chmod 600 /tmp/deploy_key
printf ',"privateKeyPath":"/tmp/deploy_key"}' >> /tmp/sftp-config.json
else
printf ',"password":"%s"}' "$DEV_PASS" >> /tmp/sftp-config.json
fi
PLATFORM=$(php ${MOKO_CLI}/platform_detect.php --path . 2>/dev/null || true)
if [ "$PLATFORM" = "waas-component" ] && [ -f "${MOKO_CLI}/../deploy/deploy-joomla.php" ]; then
php ${MOKO_CLI}/../deploy/deploy-joomla.php --path . --src-dir "$SOURCE_DIR" --config /tmp/sftp-config.json
elif [ -f "${MOKO_CLI}/../deploy/deploy-sftp.php" ]; then
php ${MOKO_CLI}/../deploy/deploy-sftp.php --path . --src-dir "$SOURCE_DIR" --config /tmp/sftp-config.json
fi
rm -f /tmp/deploy_key /tmp/sftp-config.json
echo "SFTP deploy to dev complete" >> $GITHUB_STEP_SUMMARY
- name: Summary
if: always()
run: |
VERSION="${{ steps.meta.outputs.version }}"
STABILITY="${{ steps.meta.outputs.stability }}"
DISPLAY="${{ steps.meta.outputs.display_version }}"
echo "## Update Server" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "| Field | Value |" >> $GITHUB_STEP_SUMMARY
echo "|-------|-------|" >> $GITHUB_STEP_SUMMARY
echo "| Stability | \`${STABILITY}\` |" >> $GITHUB_STEP_SUMMARY
echo "| Version | \`${DISPLAY}\` |" >> $GITHUB_STEP_SUMMARY
@@ -0,0 +1,73 @@
# Copyright (C) 2026 Moko Consulting <hello@mokoconsulting.tech>
#
# SPDX-License-Identifier: GPL-3.0-or-later
#
# FILE INFORMATION
# DEFGROUP: Gitea.Workflow
# INGROUP: mokocli.Universal
# REPO: https://git.mokoconsulting.tech/MokoConsulting/mokocli
# PATH: /.mokogitea/workflows/workflow-sync-trigger.yml
# VERSION: 01.01.00
# BRIEF: Trigger workflow sync to live repos when a PR is merged to main
name: "Universal: Workflow Sync Trigger"
on:
pull_request:
types: [closed]
branches:
- main
env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
jobs:
sync:
name: Sync workflows to live repos
runs-on: ubuntu-latest
if: >-
github.event.pull_request.merged == true &&
!contains(github.event.pull_request.title, '[skip sync]')
steps:
- name: Determine platform from repo name
id: platform
run: |
REPO="${{ github.event.repository.name }}"
case "$REPO" in
Template-Joomla) PLATFORM="joomla" ;;
Template-Dolibarr) PLATFORM="dolibarr" ;;
Template-Go) PLATFORM="go" ;;
Template-MCP) PLATFORM="mcp" ;;
Template-Generic) PLATFORM="" ;;
*) PLATFORM="" ;;
esac
echo "platform=$PLATFORM" >> "$GITHUB_OUTPUT"
echo "Platform: ${PLATFORM:-all}"
- name: Clone mokocli
env:
MOKOGITEA_TOKEN: ${{ secrets.MOKOGITEA_TOKEN }}
run: |
GITEA_URL="${{ vars.GITEA_URL || 'https://git.mokoconsulting.tech' }}"
git clone --depth 1 "${GITEA_URL}/MokoConsulting/mokocli.git" /tmp/mokocli
- name: Install dependencies
run: |
cd /tmp/mokocli
composer install --no-dev --no-interaction --quiet 2>/dev/null || true
- name: Run workflow sync
env:
MOKOGITEA_TOKEN: ${{ secrets.MOKOGITEA_TOKEN }}
run: |
ARGS="--token ${MOKOGITEA_TOKEN}"
ARGS="${ARGS} --org ${{ vars.GITEA_ORG || github.repository_owner }}"
ARGS="${ARGS} --phase repos"
PLATFORM="${{ steps.platform.outputs.platform }}"
if [ -n "$PLATFORM" ]; then
ARGS="${ARGS} --platform-filter ${PLATFORM}"
fi
php /tmp/mokocli/cli/workflow_sync.php ${ARGS}
+9 -32
View File
@@ -1,38 +1,15 @@
# Changelog # Changelog
## [Unreleased] ## [Unreleased]
## [01.21.01] --- 2026-06-21
## [01.07.00] --- 2026-05-30 ## [01.21.01] --- 2026-06-21
## [01.21.00] --- 2026-06-19
## [01.20.00] --- 2026-06-04
## [01.19.00] --- 2026-06-04
All notable changes to this project will be documented in this file. ## [01.18.00] --- 2026-06-04
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
Version format: `XX.YY.ZZ` (zero-padded semver).
## [01.06.00] --- 2026-05-30
## [01.04.00] - 2026-05-30
### Added
- Local Video hero mode with Joomla Media Manager file picker (`localVideoFile` param)
- Install script (`script.php`) creates `images/heroes/` folder on install/update
## [01.03.00] - 2026-05-30
### Added
- Configurable card fade-in delay with slide-up animation (`cardDelay` param, 0-5000ms) (#39)
- Video mute/unmute toggle button (`showMuteToggle` param) -- supports YouTube, Vimeo, and native video (#40)
## [01.02.00] - 2026-05-30
### Fixed
- WebAsset registration: added `#style`/`#script` suffixes to preset dependencies (was causing `UnsatisfiedDependencyException`)
- Asset URI resolution: use `extension/filename` pattern instead of `extension/folder/filename` (Joomla auto-inserts `css/`/`js/` folders)
- iframe video cover: split CSS into `<video>` (`object-fit: cover`) and `<iframe>` (oversize + centre-crop) rules since `object-fit` doesn't apply to iframes
- Card link styling: exclude `.btn` elements from `color: inherit` so buttons retain their own styles
### Added
- Module title renders inside the hero card as `<h2>`, respecting Joomla's Show Title toggle
- IntersectionObserver pauses/resumes videos when the hero scrolls out of/into the viewport (YouTube, Vimeo, and native `<video>`)
- YouTube embeds include `enablejsapi=1` for postMessage playback control
+22 -9
View File
@@ -4,7 +4,7 @@ This file provides guidance to Claude Code when working with this repository.
## Project Overview ## Project Overview
**MokoJoomHero** -- A Joomla Module designed to provide a random image from a folder with content on top as a Hero. **MokoJoomHero** -- Random hero image slideshow/video with content overlay for Joomla
| Field | Value | | Field | Value |
|---|---| |---|---|
@@ -32,20 +32,33 @@ composer install # Install PHP dependencies
## Architecture ## Architecture
This is a Joomla extension. Key directories: This is a Joomla **site module** (`mod_mokojoomhero`).
- `src/` -- extension source (deployed to Joomla)
- `src/*.xml` -- manifest file (version, files, params) - Random hero image slideshow or background video with content overlay
- `src/src/` or `src/services/` -- PHP classes - Supports image folders, YouTube, Vimeo, local video, solid colour, gradient
- `src/language/` -- translation strings - Configurable overlay, text alignment, card animation, parallax, content animations
- `src/media/` -- CSS/JS/images - A/B testing with weighted variations, scheduling with start/end datetime
- Article content source, per-slide unique content via subform
### Key files
- `src/mod_mokojoomhero.xml` — module manifest
- `src/mod_mokojoomhero.php` — module entry point
- `src/tmpl/default.php` — template
- `src/media/` — CSS, JS, and web asset registry
- `src/language/` — en-GB and en-US translations
- `src/script.php` — install script (creates default image folder)
## Rules ## Rules
- **Workflow directory**: `.mokogitea/` (not `.gitea/` or `.github/`) - **Workflow directory**: `.mokogitea/` (not `.gitea/` or `.github/`)
- **Never commit** `.claude/`, `.mcp.json`, `TODO.md`, or `*.min.css`/`*.min.js` - **Never commit** `.claude/`, `.mcp.json`, `TODO.md`, or `*.min.css`/`*.min.js`
- **Attribution**: use `Authored-by: Moko Consulting` in commits - **Attribution**: use `Authored-by: Moko Consulting` in commits
- **Branch strategy**: develop on `dev`, merge to `main` for release - **Branch strategy**: develop on `dev`, merge to `main` for release
- **Minification**: handled at build time (CI) and runtime (MokoMinifyHelper for Joomla templates) - **Minification**: handled at build time (CI)
- **Wiki**: documentation lives in the Gitea wiki, not in `docs/` files - **Wiki**: documentation lives in the Gitea wiki, not in `docs/` files
- **Standards**: this repo follows [MokoStandards](https://git.mokoconsulting.tech/MokoConsulting/moko-platform/wiki/Home) - **Standards**: this repo follows [MokoStandards](https://git.mokoconsulting.tech/MokoConsulting/moko-platform/wiki/Home)
## Coding Standards
- PHP 8.1+ minimum
- SPDX license headers on all PHP files
+1 -1
View File
@@ -14,7 +14,7 @@
DEFGROUP: DEFGROUP:
INGROUP: Project.Documentation INGROUP: Project.Documentation
REPO: REPO:
VERSION: 01.07.00 VERSION: 01.21.01
PATH: ./CODE_OF_CONDUCT.md PATH: ./CODE_OF_CONDUCT.md
BRIEF: Reference + packaging repo for Moko Consulting Developer GPT Other Default BRIEF: Reference + packaging repo for Moko Consulting Developer GPT Other Default
--> -->
+141 -108
View File
@@ -1,128 +1,161 @@
<!-- # Contributing to Moko Consulting Projects
Copyright (C) 2026 Moko Consulting <hello@mokoconsulting.tech>
This file is part of a Moko Consulting project. Thank you for your interest in contributing. All Moko Consulting repositories follow this universal workflow and version policy.
SPDX-License-Identifier: GPL-3.0-or-later ## Branching Workflow
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License (./LICENSE).
# FILE INFORMATION
DEFGROUP: {{DEFGROUP}}
INGROUP: Project.Documentation
REPO: https://github.com/mokoconsulting-tech/MokoJoomHero
VERSION: 01.07.00
PATH: ./CONTRIBUTING.md
BRIEF: How to contribute; branch strategy, commit conventions, PR workflow, and release pipeline
-->
# Contributing
Thank you for your interest in contributing to **MokoJoomHero**!
This repository is governed by **[MokoStandards](https://github.com/mokoconsulting-tech/MokoStandards)** — the authoritative source of coding standards, workflows, and policies for all Moko Consulting repositories.
## Branch Strategy
| Branch | Purpose | Deploys To |
|--------|---------|------------|
| `main` | Bleeding edge — all development merges here | CI only |
| `dev/XX.YY.ZZ` | Feature development | Dev server (version: "development") |
| `version/XX.YY` | Stable frozen snapshot | Demo + RS servers |
### Development Workflow
``` ```
1. Create branch: git checkout -b dev/XX.YY.ZZ/my-feature feature/* ──PR──> dev ──draft PR──> (renamed to rc) ──merge──> main
2. Develop + test (dev server auto-deploys on push)
3. Open PR → main (squash merge only)
4. Auto-release (version branch + tag + GitHub Release created automatically)
``` ```
### Branch Naming ### Step by step
| Prefix | Use | 1. **Create a feature branch** from `dev`:
|--------|-----| ```bash
| `dev/XX.YY.ZZ` | Feature development (e.g., `dev/02.00.00/add-extrafields`) | git checkout dev && git pull
| `version/XX.YY` | Stable release (auto-created, never manually pushed) | git checkout -b feature/my-change
| `chore/` | Automated sync branches (managed by MokoStandards) | ```
> **Never use** `feature/`, `hotfix/`, or `release/` prefixes — they are not part of the MokoStandards branch strategy. 2. **Work and commit** on your feature branch. Push to origin.
## Commit Conventions 3. **Open a PR**: `feature/my-change` → `dev`. After review and checks, merge it.
Use [conventional commits](https://www.conventionalcommits.org/): 4. **When ready for release**, open a **draft PR**: `dev` → `main`.
- This automatically renames the source branch to `rc` (release candidate)
- An RC pre-release is built and uploaded
5. **Alpha and beta branches** are created by manually renaming the branch before the RC stage:
- Rename `dev` to `alpha` for early testing → alpha pre-release is built
- Rename `alpha` to `beta` for feature-complete testing → beta pre-release is built
- When the draft PR is created, the branch is renamed to `rc`
6. **Once PR checks pass** on the `rc` branch, mark the PR as ready and merge to `main`.
7. **Merging to main** triggers the stable release pipeline:
- Minor version bump (e.g., `02.09.xx` → `02.10.00`)
- Stability suffix stripped (clean version)
- Gitea release created with ZIP/tar.gz packages
- `updates.xml` updated (Joomla extensions)
- `dev` branch recreated from `main`
### Branch summary
| Branch | Purpose | Created by |
|--------|---------|-----------|
| `feature/*` | New features and fixes | Developer |
| `dev` | Integration branch | Auto-recreated after release |
| `alpha` | Alpha pre-release testing | Manual rename from `dev` |
| `beta` | Beta pre-release testing | Manual rename from `alpha` |
| `rc` | Release candidate | Auto-renamed on draft PR to main |
| `main` | Stable releases | Protected, merge only |
| `version/XX.YY.ZZ` | Archived release snapshots | Auto-created by CI |
### Protected branches
| Branch | Direct push | Merge via |
|--------|------------|-----------|
| `main` | Blocked (CI bot whitelisted) | PR merge only |
| `dev` | Blocked (CI bot whitelisted) | PR merge from feature/* |
| `rc` | Blocked (CI bot whitelisted) | Auto-created on draft PR |
| `alpha` | Blocked (CI bot whitelisted) | Manual rename |
| `beta` | Blocked (CI bot whitelisted) | Manual rename |
| `feature/*` | Open | N/A (source branch) |
## Version Policy
### Format
All versions use `XX.YY.ZZ` — three two-digit segments, zero-padded:
- **XX** — Major version (breaking changes)
- **YY** — Minor version (new features, bumped on release to main)
- **ZZ** — Patch version (auto-incremented on every push to dev/feature branches)
Rollover: patch `99` → `00` increments minor; minor `99` → `00` increments major.
### Stability suffixes
Each branch appends a suffix to indicate stability:
| Branch | Suffix | Example |
|--------|--------|---------|
| `main` | (none) | `02.09.00` |
| `dev` | `-dev` | `02.09.01-dev` |
| `feature/*` | `-dev` | `02.09.01-dev` |
| `alpha` | `-alpha` | `02.09.01-alpha` |
| `beta` | `-beta` | `02.09.01-beta` |
| `rc` | `-rc` | `02.09.01-rc` |
### Auto version bump
On every push to `dev`, `feature/*`, or `patch/*`:
1. Patch version incremented
2. Stability suffix `-dev` applied
3. All version-bearing files updated (manifests, CHANGELOG, PHP headers, etc.)
4. Commit created with `[skip ci]` to avoid loops
### Release version flow
Version bumps happen at specific release events:
| Event | Bump | Example |
|-------|------|---------|
| Feature merged to dev | Patch bump after dev release | `02.09.01-dev` → release → `02.09.02-dev` |
| Dev promoted to RC | Minor bump | `02.09.02-dev` → `02.10.00-rc` |
| RC merged to main | Minor bump | `02.10.00-rc` → `02.11.00` (stable) |
| Dev recreated from main | Patch bump | `02.11.00` → `02.11.01-dev` |
### Release stream copies
When a higher-stability release is published, copies are created for all lesser streams with the same base version:
- **RC `02.10.00-rc`** also creates: `02.10.00-dev`, `02.10.00-alpha`, `02.10.00-beta`
- **Stable `02.11.00`** also creates: `02.11.00-dev`, `02.11.00-alpha`, `02.11.00-beta`, `02.11.00-rc`
This ensures Joomla sites on ANY stability channel see the update (Joomla only shows versions higher than what's installed).
### Version files
The version tools update all files containing version stamps:
- `.mokogitea/manifest.xml` (canonical source)
- Joomla XML manifests (`<version>` tag)
- `README.md`, `CHANGELOG.md` (`VERSION:` pattern)
- `package.json`, `pyproject.toml`
- Any text file with a `VERSION: XX.YY.ZZ` label
Files synced from other repos (with a `# REPO:` header) are not touched.
## Code Standards
- **PHP**: PSR-12, tabs for indentation
- **Copyright**: all files must include the Moko Consulting copyright header
- **License**: SPDX identifier `GPL-3.0-or-later` (or as specified per repo)
- **Attribution**: use `Authored-by: Moko Consulting` in commits, not individual names
## Commit Messages
Use conventional commit format:
``` ```
feat(scope): add new extrafield for invoice tracking type(scope): short description
fix(sql): correct column type in llx_mytable
docs(readme): update installation instructions Optional body with context.
chore(deps): bump enterprise library to 04.02.30
Authored-by: Moko Consulting
``` ```
**Valid types:** `feat` | `fix` | `docs` | `chore` | `ci` | `refactor` | `style` | `test` | `perf` | `revert` | `build` Types: `feat`, `fix`, `chore`, `docs`, `style`, `refactor`, `test`, `ci`
## Pull Request Workflow Special flags in commit messages:
- `[skip ci]` — skip all CI workflows
- `[skip bump]` — skip auto version bump only
1. **Branch** from `main` using `dev/XX.YY.ZZ/description` format ## Reporting Issues
2. **Bump** the patch version in `README.md` before opening the PR
3. **Title** must be a valid conventional commit subject line
4. **Target** `main` — squash merge only (merge commits are disabled)
5. **CI checks** must pass before merge
### What Happens on Merge Use the repository's issue tracker with the appropriate template.
When your PR is merged to `main`, these workflows run automatically:
1. **sync-version-on-merge** — auto-bumps patch version, propagates to all file headers
2. **auto-release** — creates `version/XX.YY` branch, git tag, and GitHub Release
3. **deploy-demo / deploy-rs** — deploys to demo and RS servers (if `src/**` changed)
## Coding Standards
All contributions must follow [MokoStandards](https://github.com/mokoconsulting-tech/MokoStandards):
| Standard | Reference |
|----------|-----------|
| Coding Style | [coding-style-guide.md](https://github.com/mokoconsulting-tech/MokoStandards/blob/main/docs/policy/coding-style-guide.md) |
| File Headers | [file-header-standards.md](https://github.com/mokoconsulting-tech/MokoStandards/blob/main/docs/policy/file-header-standards.md) |
| Branching | [branch-release-strategy.md](https://github.com/mokoconsulting-tech/MokoStandards/blob/main/docs/policy/branch-release-strategy.md) |
| Merge Strategy | [merge-strategy.md](https://github.com/mokoconsulting-tech/MokoStandards/blob/main/docs/policy/merge-strategy.md) |
| Scripting | [scripting-standards.md](https://github.com/mokoconsulting-tech/MokoStandards/blob/main/docs/policy/scripting-standards.md) |
| Build & Release | [build-release.md](https://github.com/mokoconsulting-tech/MokoStandards/blob/main/docs/workflows/build-release.md) |
## PR Checklist
- [ ] Branch named `dev/XX.YY.ZZ/description`
- [ ] Patch version bumped in `README.md`
- [ ] Conventional commit format for PR title
- [ ] All new files have FILE INFORMATION headers
- [ ] `declare(strict_types=1)` in all PHP files
- [ ] PHPDoc on all public methods
- [ ] Tests pass
- [ ] CHANGELOG.md updated
- [ ] No secrets, tokens, or credentials committed
## Custom Workflows
Place repo-specific workflows in `.github/workflows/custom/` — they are **never overwritten or deleted** by MokoStandards sync:
```
.github/workflows/
├── deploy-dev.yml ← Synced from MokoStandards
├── auto-release.yml ← Synced from MokoStandards
└── custom/ ← Your custom workflows (safe)
└── my-custom-ci.yml
```
## License
By contributing, you agree that your contributions will be licensed under the [GPL-3.0-or-later](LICENSE) license.
--- ---
*This file is synced from [MokoStandards](https://github.com/mokoconsulting-tech/MokoStandards). Do not edit directly — changes will be overwritten on the next sync.* *Moko Consulting <hello@mokoconsulting.tech>*
-377
View File
@@ -1,377 +0,0 @@
# Makefile for Joomla Extensions
# Copyright (C) 2026 Moko Consulting <hello@mokoconsulting.tech>
# SPDX-License-Identifier: GPL-3.0-or-later
#
# This is a reference Makefile for building Joomla extensions.
# Copy this to your repository root as "Makefile" and customize as needed.
#
# Supports: Modules, Plugins, Components, Packages, Templates
# ==============================================================================
# CONFIGURATION - Customize these for your extension
# ==============================================================================
# Extension Configuration
EXTENSION_NAME := mokojoomhero
EXTENSION_TYPE := module
# Options: module, plugin, component, package, template
EXTENSION_VERSION := 1.0.0
# Module Configuration (for modules only)
MODULE_TYPE := site
# Options: site, admin
# Plugin Configuration (for plugins only)
PLUGIN_GROUP := system
# Options: system, content, user, authentication, etc.
# Directories
SRC_DIR := .
BUILD_DIR := build
DIST_DIR := dist
DOCS_DIR := docs
# Joomla Installation (for local testing - customize paths)
JOOMLA_ROOT := /var/www/html/joomla
JOOMLA_VERSION := 4
# Tools
PHP := php
COMPOSER := composer
NPM := npm
PHPCS := vendor/bin/phpcs
PHPCBF := vendor/bin/phpcbf
PHPUNIT := vendor/bin/phpunit
ZIP := zip
# Coding Standards
PHPCS_STANDARD := Joomla
# Colors for output
COLOR_RESET := \033[0m
COLOR_GREEN := \033[32m
COLOR_YELLOW := \033[33m
COLOR_BLUE := \033[34m
COLOR_RED := \033[31m
# ==============================================================================
# TARGETS
# ==============================================================================
.PHONY: help
help: ## Show this help message
@echo "$(COLOR_BLUE)╔════════════════════════════════════════════════════════════╗$(COLOR_RESET)"
@echo "$(COLOR_BLUE)║ Joomla Extension Makefile ║$(COLOR_RESET)"
@echo "$(COLOR_BLUE)╚════════════════════════════════════════════════════════════╝$(COLOR_RESET)"
@echo ""
@echo "Extension: $(EXTENSION_NAME) ($(EXTENSION_TYPE)) v$(EXTENSION_VERSION)"
@echo ""
@echo "$(COLOR_GREEN)Available targets:$(COLOR_RESET)"
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf " $(COLOR_BLUE)%-20s$(COLOR_RESET) %s\n", $$1, $$2}'
@echo ""
@echo "$(COLOR_YELLOW)Quick Start:$(COLOR_RESET)"
@echo " 1. make install-deps # Install dependencies"
@echo " 2. make build # Build extension package"
@echo " 3. make test # Run tests"
@echo ""
.PHONY: install-deps
install-deps: ## Install all dependencies (Composer + npm)
@echo "$(COLOR_BLUE)Installing dependencies...$(COLOR_RESET)"
@if [ -f "composer.json" ]; then \
$(COMPOSER) install; \
echo "$(COLOR_GREEN)✓ Composer dependencies installed$(COLOR_RESET)"; \
fi
@if [ -f "package.json" ]; then \
$(NPM) install; \
echo "$(COLOR_GREEN)✓ npm dependencies installed$(COLOR_RESET)"; \
fi
.PHONY: update-deps
update-deps: ## Update all dependencies
@echo "$(COLOR_BLUE)Updating dependencies...$(COLOR_RESET)"
@if [ -f "composer.json" ]; then \
$(COMPOSER) update; \
echo "$(COLOR_GREEN)✓ Composer dependencies updated$(COLOR_RESET)"; \
fi
@if [ -f "package.json" ]; then \
$(NPM) update; \
echo "$(COLOR_GREEN)✓ npm dependencies updated$(COLOR_RESET)"; \
fi
.PHONY: lint
lint: ## Run PHP linter (syntax check)
@echo "$(COLOR_BLUE)Running PHP linter...$(COLOR_RESET)"
@find . -name "*.php" ! -path "./vendor/*" ! -path "./node_modules/*" ! -path "./$(BUILD_DIR)/*" \
-exec $(PHP) -l {} \; | grep -v "No syntax errors" || true
@echo "$(COLOR_GREEN)✓ PHP linting complete$(COLOR_RESET)"
.PHONY: phpcs
phpcs: ## Run PHP CodeSniffer (Joomla standards)
@echo "$(COLOR_BLUE)Running PHP CodeSniffer...$(COLOR_RESET)"
@if [ -f "$(PHPCS)" ]; then \
$(PHPCS) --standard=$(PHPCS_STANDARD) --extensions=php --ignore=vendor,node_modules,$(BUILD_DIR) .; \
else \
echo "$(COLOR_YELLOW)⚠ PHP CodeSniffer not installed. Run: make install-deps$(COLOR_RESET)"; \
fi
.PHONY: phpcbf
phpcbf: ## Fix coding standards automatically
@echo "$(COLOR_BLUE)Running PHP Code Beautifier...$(COLOR_RESET)"
@if [ -f "$(PHPCBF)" ]; then \
$(PHPCBF) --standard=$(PHPCS_STANDARD) --extensions=php --ignore=vendor,node_modules,$(BUILD_DIR) .; \
echo "$(COLOR_GREEN)✓ Code formatting applied$(COLOR_RESET)"; \
else \
echo "$(COLOR_YELLOW)⚠ PHP Code Beautifier not installed. Run: make install-deps$(COLOR_RESET)"; \
fi
.PHONY: validate
validate: lint phpcs ## Run all validation checks
@echo "$(COLOR_GREEN)✓ All validation checks passed$(COLOR_RESET)"
.PHONY: test
test: ## Run PHPUnit tests
@echo "$(COLOR_BLUE)Running tests...$(COLOR_RESET)"
@if [ -f "$(PHPUNIT)" ] && [ -f "phpunit.xml" ]; then \
$(PHPUNIT); \
else \
echo "$(COLOR_YELLOW)⚠ PHPUnit not configured$(COLOR_RESET)"; \
fi
.PHONY: test-coverage
test-coverage: ## Run tests with coverage report
@echo "$(COLOR_BLUE)Running tests with coverage...$(COLOR_RESET)"
@if [ -f "$(PHPUNIT)" ] && [ -f "phpunit.xml" ]; then \
$(PHPUNIT) --coverage-html $(BUILD_DIR)/coverage; \
echo "$(COLOR_GREEN)✓ Coverage report: $(BUILD_DIR)/coverage/index.html$(COLOR_RESET)"; \
else \
echo "$(COLOR_YELLOW)⚠ PHPUnit not configured$(COLOR_RESET)"; \
fi
.PHONY: clean
clean: ## Clean build artifacts
@echo "$(COLOR_BLUE)Cleaning build artifacts...$(COLOR_RESET)"
@rm -rf $(BUILD_DIR) $(DIST_DIR)
@echo "$(COLOR_GREEN)✓ Build artifacts cleaned$(COLOR_RESET)"
.PHONY: build
build: clean validate ## Build extension package
@echo "$(COLOR_BLUE)Building Joomla extension package...$(COLOR_RESET)"
@mkdir -p $(DIST_DIR) $(BUILD_DIR)
# Determine package prefix based on extension type
@case "$(EXTENSION_TYPE)" in \
module) \
PACKAGE_PREFIX="mod_$(EXTENSION_NAME)"; \
BUILD_TARGET="$(BUILD_DIR)/$$PACKAGE_PREFIX"; \
;; \
plugin) \
PACKAGE_PREFIX="plg_$(PLUGIN_GROUP)_$(EXTENSION_NAME)"; \
BUILD_TARGET="$(BUILD_DIR)/$$PACKAGE_PREFIX"; \
;; \
component) \
PACKAGE_PREFIX="com_$(EXTENSION_NAME)"; \
BUILD_TARGET="$(BUILD_DIR)/$$PACKAGE_PREFIX"; \
;; \
package) \
PACKAGE_PREFIX="pkg_$(EXTENSION_NAME)"; \
BUILD_TARGET="$(BUILD_DIR)/$$PACKAGE_PREFIX"; \
;; \
template) \
PACKAGE_PREFIX="tpl_$(EXTENSION_NAME)"; \
BUILD_TARGET="$(BUILD_DIR)/$$PACKAGE_PREFIX"; \
;; \
*) \
echo "$(COLOR_RED)✗ Unknown extension type: $(EXTENSION_TYPE)$(COLOR_RESET)"; \
exit 1; \
;; \
esac; \
\
mkdir -p "$$BUILD_TARGET"; \
\
echo "Building $$PACKAGE_PREFIX..."; \
\
rsync -av --progress \
--exclude='$(BUILD_DIR)' \
--exclude='$(DIST_DIR)' \
--exclude='.git*' \
--exclude='vendor/' \
--exclude='node_modules/' \
--exclude='tests/' \
--exclude='Makefile' \
--exclude='composer.json' \
--exclude='composer.lock' \
--exclude='package.json' \
--exclude='package-lock.json' \
--exclude='phpunit.xml' \
--exclude='*.md' \
--exclude='.editorconfig' \
. "$$BUILD_TARGET/"; \
\
cd $(BUILD_DIR) && $(ZIP) -r "../$(DIST_DIR)/$${PACKAGE_PREFIX}-$(EXTENSION_VERSION).zip" "$${PACKAGE_PREFIX}"; \
\
echo "$(COLOR_GREEN)✓ Package created: $(DIST_DIR)/$${PACKAGE_PREFIX}-$(EXTENSION_VERSION).zip$(COLOR_RESET)"
.PHONY: package
package: build ## Alias for build
@echo "$(COLOR_GREEN)✓ Package ready for distribution$(COLOR_RESET)"
.PHONY: install-local
install-local: build ## Install to local Joomla (upload via admin)
@echo "$(COLOR_BLUE)Package ready for installation$(COLOR_RESET)"
@case "$(EXTENSION_TYPE)" in \
module) PACKAGE="mod_$(EXTENSION_NAME)";; \
plugin) PACKAGE="plg_$(PLUGIN_GROUP)_$(EXTENSION_NAME)";; \
component) PACKAGE="com_$(EXTENSION_NAME)";; \
package) PACKAGE="pkg_$(EXTENSION_NAME)";; \
template) PACKAGE="tpl_$(EXTENSION_NAME)";; \
esac; \
echo "$(COLOR_YELLOW)Upload $(DIST_DIR)/$${PACKAGE}-$(EXTENSION_VERSION).zip via Joomla Administrator$(COLOR_RESET)"; \
echo "Admin URL: $(JOOMLA_ROOT) → Extensions → Install"
.PHONY: dev-install
dev-install: ## Create symlink for development (Joomla 4+)
@echo "$(COLOR_BLUE)Creating development symlink...$(COLOR_RESET)"
@if [ ! -d "$(JOOMLA_ROOT)" ]; then \
echo "$(COLOR_RED)✗ Joomla root not found at $(JOOMLA_ROOT)$(COLOR_RESET)"; \
echo "Update JOOMLA_ROOT in Makefile"; \
exit 1; \
fi
@case "$(EXTENSION_TYPE)" in \
module) \
if [ "$(MODULE_TYPE)" = "admin" ]; then \
TARGET="$(JOOMLA_ROOT)/administrator/modules/mod_$(EXTENSION_NAME)"; \
else \
TARGET="$(JOOMLA_ROOT)/modules/mod_$(EXTENSION_NAME)"; \
fi; \
;; \
plugin) \
TARGET="$(JOOMLA_ROOT)/plugins/$(PLUGIN_GROUP)/$(EXTENSION_NAME)"; \
;; \
component) \
echo "$(COLOR_YELLOW)⚠ Components require complex symlink setup$(COLOR_RESET)"; \
echo "Manual setup recommended for component development"; \
exit 1; \
;; \
*) \
echo "$(COLOR_RED)✗ dev-install not supported for $(EXTENSION_TYPE)$(COLOR_RESET)"; \
exit 1; \
;; \
esac; \
\
rm -rf "$$TARGET"; \
ln -s "$(PWD)" "$$TARGET"; \
echo "$(COLOR_GREEN)✓ Development symlink created at $$TARGET$(COLOR_RESET)"
.PHONY: watch
watch: ## Watch for changes and rebuild
@echo "$(COLOR_BLUE)Watching for changes...$(COLOR_RESET)"
@echo "$(COLOR_YELLOW)Press Ctrl+C to stop$(COLOR_RESET)"
@while true; do \
inotifywait -r -e modify,create,delete --exclude '($(BUILD_DIR)|$(DIST_DIR)|vendor|node_modules)' . 2>/dev/null || \
(echo "$(COLOR_YELLOW)⚠ inotifywait not installed. Install: apt-get install inotify-tools$(COLOR_RESET)" && sleep 5); \
make build; \
done
.PHONY: version
version: ## Display version information
@echo "$(COLOR_BLUE)Extension Information:$(COLOR_RESET)"
@echo " Name: $(EXTENSION_NAME)"
@echo " Type: $(EXTENSION_TYPE)"
@echo " Version: $(EXTENSION_VERSION)"
@if [ "$(EXTENSION_TYPE)" = "module" ]; then \
echo " Module: $(MODULE_TYPE)"; \
fi
@if [ "$(EXTENSION_TYPE)" = "plugin" ]; then \
echo " Group: $(PLUGIN_GROUP)"; \
fi
.PHONY: docs
docs: ## Generate documentation
@echo "$(COLOR_BLUE)Generating documentation...$(COLOR_RESET)"
@mkdir -p $(DOCS_DIR)
@echo "$(COLOR_YELLOW)⚠ Documentation generation not configured$(COLOR_RESET)"
@echo "Consider adding phpDocumentor or similar"
.PHONY: release
release: validate test build ## Create a release (validate + test + build)
@echo "$(COLOR_GREEN)✓ Release package ready$(COLOR_RESET)"
@echo ""
@echo "$(COLOR_BLUE)Release Checklist:$(COLOR_RESET)"
@echo " [ ] Update CHANGELOG.md"
@echo " [ ] Update version in XML manifest"
@echo " [ ] Test installation in clean Joomla"
@echo " [ ] Tag release in git: git tag v$(EXTENSION_VERSION)"
@echo " [ ] Push tags: git push --tags"
@echo " [ ] Create GitHub release"
@echo ""
@case "$(EXTENSION_TYPE)" in \
module) PACKAGE="mod_$(EXTENSION_NAME)";; \
plugin) PACKAGE="plg_$(PLUGIN_GROUP)_$(EXTENSION_NAME)";; \
component) PACKAGE="com_$(EXTENSION_NAME)";; \
package) PACKAGE="pkg_$(EXTENSION_NAME)";; \
template) PACKAGE="tpl_$(EXTENSION_NAME)";; \
esac; \
echo "$(COLOR_GREEN)Package: $(DIST_DIR)/$${PACKAGE}-$(EXTENSION_VERSION).zip$(COLOR_RESET)"
.PHONY: security-check
security-check: ## Run security checks on dependencies
@echo "$(COLOR_BLUE)Running security checks...$(COLOR_RESET)"
@if [ -f "composer.json" ]; then \
$(COMPOSER) audit || echo "$(COLOR_YELLOW)⚠ Vulnerabilities found$(COLOR_RESET)"; \
fi
@if [ -f "package.json" ]; then \
$(NPM) audit || echo "$(COLOR_YELLOW)⚠ Vulnerabilities found$(COLOR_RESET)"; \
fi
.PHONY: deploy
deploy: ## Deploy to a Joomla site via SSH (usage: make deploy HOST=user@host WEBROOT=/path/to/joomla)
@if [ -z "$(HOST)" ] || [ -z "$(WEBROOT)" ]; then \
echo "$(COLOR_RED)✗ Usage: make deploy HOST=user@host WEBROOT=/path/to/joomla [KEY=~/.ssh/id_rsa]$(COLOR_RESET)"; \
exit 1; \
fi
@SSH_OPTS="-o StrictHostKeyChecking=no -o ConnectTimeout=10"; \
if [ -n "$(KEY)" ]; then SSH_OPTS="$$SSH_OPTS -i $(KEY)"; fi; \
echo "$(COLOR_BLUE)Deploying mod_$(EXTENSION_NAME) to $(HOST):$(WEBROOT)...$(COLOR_RESET)"; \
ssh $$SSH_OPTS $(HOST) "\
W=$(WEBROOT) && \
cp -r \$$W/modules/mod_$(EXTENSION_NAME)/language/en-US/* /dev/null 2>&1; \
true" && \
for f in src/mod_mokojoomhero.php src/mod_mokojoomhero.xml src/script.php; do \
scp $$SSH_OPTS $$f $(HOST):$(WEBROOT)/modules/mod_$(EXTENSION_NAME)/$$(basename $$f); \
done && \
scp -r $$SSH_OPTS src/tmpl/* $(HOST):$(WEBROOT)/modules/mod_$(EXTENSION_NAME)/tmpl/ && \
scp -r $$SSH_OPTS src/language/* $(HOST):$(WEBROOT)/modules/mod_$(EXTENSION_NAME)/language/ && \
scp $$SSH_OPTS src/media/joomla.asset.json $(HOST):$(WEBROOT)/media/mod_$(EXTENSION_NAME)/ && \
scp -r $$SSH_OPTS src/media/css/* $(HOST):$(WEBROOT)/media/mod_$(EXTENSION_NAME)/css/ && \
scp -r $$SSH_OPTS src/media/js/* $(HOST):$(WEBROOT)/media/mod_$(EXTENSION_NAME)/js/ && \
ssh $$SSH_OPTS $(HOST) "\
W=$(WEBROOT) && \
mkdir -p \$$W/images/heroes && \
for lang in en-US en-GB; do \
for ini in mod_mokojoomhero.ini mod_mokojoomhero.sys.ini; do \
src=\$$W/modules/mod_$(EXTENSION_NAME)/language/\$$lang/\$$ini; \
if [ -f \$$src ]; then \
cp \$$src \$$W/administrator/language/\$$lang/\$$ini 2>/dev/null; \
cp \$$src \$$W/language/\$$lang/\$$ini 2>/dev/null; \
fi; \
done; \
done && \
echo 'OK'" && \
echo "$(COLOR_GREEN)✓ Deployed to $(HOST)$(COLOR_RESET)"
.PHONY: deploy-all
deploy-all: ## Deploy to all configured sites (requires SITES_FILE or inline)
@echo "$(COLOR_BLUE)Deploying to all sites...$(COLOR_RESET)"
@echo "$(COLOR_YELLOW)Usage: Create a sites.conf with HOST:WEBROOT per line, then:$(COLOR_RESET)"
@echo " while IFS=: read -r host webroot; do"
@echo " make deploy HOST=\$$host WEBROOT=\$$webroot KEY=path/to/key"
@echo " done < sites.conf"
.PHONY: all
all: install-deps validate test build ## Run complete build pipeline
@echo "$(COLOR_GREEN)✓ Complete build pipeline finished$(COLOR_RESET)"
# Default target
.DEFAULT_GOAL := help
+50 -76
View File
@@ -7,108 +7,83 @@
# FILE INFORMATION # FILE INFORMATION
REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoJoomHero REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoJoomHero
FILE: ./README.md FILE: ./README.md
VERSION: 01.07.00 BRIEF: MokoJoomHero - Joomla Hero Module
BRIEF: MokoJoomHero - Joomla Module
--> -->
# MokoJoomHero # MokoJoomHero
A Joomla 5 site template developed following MokoStandards. A Joomla site module for random hero image slideshows, video backgrounds, solid colours, gradients, and content overlays.
[![License](https://img.shields.io/badge/license-GPL--3.0--or--later-blue.svg)](LICENSE) [![License](https://img.shields.io/badge/license-GPL--3.0--or--later-blue.svg)](LICENSE)
## Overview ## Overview
MokoJoomHero is a modern, accessible Joomla 5 template by Moko Consulting. It features a prominent hero section, flexible module positions, sticky header, customisable brand colour, and responsive layout — all built on Joomla's Web Asset Manager. MokoJoomHero is a free, open-source Joomla module that creates dynamic hero sections with multiple background modes, configurable content overlays, and advanced features like parallax scrolling, A/B testing, and scheduling. Designed for the MokoOnyx template but works with any Joomla 5/6 template.
## Features ## Features
- **Hero Section**: Dedicated `hero` module position with gradient styling ### Background Modes
- **Flexible Layout**: 11 module positions including sidebars, topbar, banner, and footer - **Image Slideshow** — random images from a folder with 4 transition types (crossfade, slide, fade-to-black, zoom/Ken Burns)
- **Sticky Header**: Optional sticky navigation with smooth scroll - **Video** — YouTube, Vimeo, or local video with autoplay, mute toggle, and poster image
- **Brand Customisation**: Configurable brand colour, logo, and tagline via Template Manager - **Solid Colour** — single colour picker
- **Responsive**: Mobile-first layout with CSS custom properties - **Gradient** — two-colour gradient with configurable angle
- **Accessibility**: Semantic HTML5, ARIA landmarks, skip-to-content support
- **Web Asset Manager**: Modern asset loading via `joomla.asset.json` ### Content & Overlay
- **Error & Offline Pages**: Custom styled error and offline templates - **WYSIWYG Editor** or **Joomla Article** as content source
- **Per-slide content** — unique heading, body, and CTA per image slide via subform
- **Card mode** — white card with shadow and fade-in delay
- **Overlay** — solid or directional gradient (dark at bottom/top/left/right)
- **Text alignment** — horizontal (left/center/right) and vertical (top/center/bottom)
- **Content animations** — fade-in, slide-up, slide-left, slide-right with configurable delay
### Advanced
- **Parallax scroll** — background moves at configurable speed (0.10.9)
- **A/B testing** — weighted random content variations, session-sticky per visitor
- **Scheduling** — start/end datetime with site timezone support
- **Scroll indicator** — animated chevron with smooth-scroll click handler
- **Mobile height** — separate height setting for mobile viewports
- **Reduced motion** — WCAG 2.1 AA compliant, respects `prefers-reduced-motion`
## Prerequisites ## Prerequisites
- **PHP**: 8.1 or higher - **PHP**: 8.1 or higher
- **Joomla**: 5.x (also compatible with 6.x) - **Joomla**: 5.x or 6.x
- **Make**: GNU Make for build automation
## Installation ## Installation
1. Build the template package: 1. Download the latest release from the [releases page](https://git.mokoconsulting.tech/MokoConsulting/MokoJoomHero/releases)
```bash 2. Upload `mod_mokojoomhero-*.zip` via **System > Install > Upload Package File**
make build 3. Assign the module to a template position and configure
```
2. Upload the generated `tpl_mokojoomhero-1.0.0.zip` via Joomla's Extension Manager Or build from source:
3. Set as default template in **System → Site Template Styles**
## Usage
```bash ```bash
# Display available commands
make help
# Validate code
make validate
# Build template package
make build make build
``` ```
## Module Positions ## Usage
| Position | Purpose | 1. Go to **Content > Site Modules > MokoJoomHero**
|----------|---------| 2. Select a **Hero Mode** (Images, Video, Solid Colour, or Gradient)
| `topbar` | Slim bar above the header (contact info, social links) | 3. Add content via the **Hero Content** tab
| `banner` | Full-width banner below the header | 4. Configure overlay, text alignment, and animations in **Overlay & Text**
| `menu` | Main navigation inside the header | 5. Assign to a module position and publish
| `hero` | Hero section with gradient background |
| `breadcrumbs` | Breadcrumb trail |
| `sidebar-left` | Left sidebar |
| `sidebar-right` | Right sidebar |
| `main-top` | Above the main content area |
| `main-bottom` | Below the main content area |
| `footer` | Footer area |
| `debug` | Debug output (hidden from users) |
## Template Parameters
Configure via **System → Site Template Styles → MokoJoomHero**:
- **Logo** — Upload a site logo image
- **Site Description** — Tagline displayed next to the logo
- **Brand Colour** — Primary accent colour (default: `#1a73e8`)
- **Fluid Container** — Toggle full-width vs fixed-width layout
- **Sticky Header** — Keep the header visible on scroll
- **Back to Top** — Floating scroll-to-top button
## Project Structure ## Project Structure
``` ```
. src/
├── docs/ # Documentation files ├── mod_mokojoomhero.php # Module entry point
├── scripts/ # Build and deployment scripts ├── mod_mokojoomhero.xml # Joomla manifest
├── src/ # Template source code ├── script.php # Install script
│ ├── css/template.css # Main stylesheet ├── tmpl/default.php # Template
│ ├── js/template.js # Main JavaScript ├── media/
│ ├── images/ # Template images │ ├── css/mod_mokojoomhero.css
│ ├── html/ # Template overrides │ ├── js/mod_mokojoomhero.js
── language/en-GB/ # Language files ── joomla.asset.json
│ ├── templateDetails.xml # Joomla manifest └── language/
├── joomla.asset.json # Web Asset Manager config ├── en-GB/
── index.php # Main template ── en-US/
│ ├── error.php # Error page
│ ├── offline.php # Offline page
│ └── component.php # Component-only output
├── Makefile # Build automation
└── README.md # This file
``` ```
## Contributing ## Contributing
@@ -117,9 +92,7 @@ We welcome contributions! Please see [CONTRIBUTING.md](CONTRIBUTING.md) for guid
## Versioning ## Versioning
This project uses [Semantic Versioning](https://semver.org/). This project uses [Semantic Versioning](https://semver.org/). See [CHANGELOG.md](CHANGELOG.md) for version history.
See [CHANGELOG.md](CHANGELOG.md) for version history.
## License ## License
@@ -131,6 +104,7 @@ SPDX-License-Identifier: GPL-3.0-or-later
## Support ## Support
- **Documentation**: See the [docs/](docs/) directory - **Wiki**: [MokoJoomHero Wiki](https://git.mokoconsulting.tech/MokoConsulting/MokoJoomHero/wiki)
- **Issues**: [Issue Tracker](https://git.mokoconsulting.tech/MokoConsulting/MokoJoomHero/issues)
- **Contact**: hello@mokoconsulting.tech - **Contact**: hello@mokoconsulting.tech
- **Website**: [mokoconsulting.tech](https://mokoconsulting.tech) - **Website**: [mokoconsulting.tech](https://mokoconsulting.tech)
+1 -1
View File
@@ -23,7 +23,7 @@ DEFGROUP: [PROJECT_NAME]
INGROUP: [PROJECT_NAME].Documentation INGROUP: [PROJECT_NAME].Documentation
REPO: [REPOSITORY_URL] REPO: [REPOSITORY_URL]
PATH: /SECURITY.md PATH: /SECURITY.md
VERSION: 01.07.00 VERSION: 01.21.01
BRIEF: Security vulnerability reporting and handling policy BRIEF: Security vulnerability reporting and handling policy
--> -->
View File
-16
View File
@@ -1,16 +0,0 @@
# Docs Index: /templates/repos/joomla/module/scripts
## Purpose
This index provides navigation to documentation within this folder.
## Metadata
- **Document Type:** index
- **Auto-generated:** This file is automatically generated by rebuild_indexes.py
## Revision History
| Change | Notes | Author |
| --- | --- | --- |
| Automated update | Generated by documentation index automation | rebuild_indexes.py |
+1
View File
@@ -0,0 +1 @@
<html><body bgcolor="#FFFFFF"></body></html>
-16
View File
@@ -1,16 +0,0 @@
# Docs Index: /templates/repos/joomla/module/src
## Purpose
This index provides navigation to documentation within this folder.
## Metadata
- **Document Type:** index
- **Auto-generated:** This file is automatically generated by rebuild_indexes.py
## Revision History
| Change | Notes | Author |
| --- | --- | --- |
| Automated update | Generated by documentation index automation | rebuild_indexes.py |
+1
View File
@@ -0,0 +1 @@
<html><body bgcolor="#FFFFFF"></body></html>
+104 -3
View File
@@ -6,24 +6,43 @@
; INGROUP: MokoJoomHero.Module ; INGROUP: MokoJoomHero.Module
; REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoJoomHero ; REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoJoomHero
; PATH: /src/language/en-GB/mod_mokojoomhero.ini ; PATH: /src/language/en-GB/mod_mokojoomhero.ini
; VERSION: 01.07.00 ; VERSION: 01.21.01
; BRIEF: Language strings for MokoJoomHero module (frontend + admin form fields) ; BRIEF: Language strings for MokoJoomHero module (frontend + admin form fields)
MOD_MOKOJOOMHERO_NO_CONTENT="Add content to this module to display it over the hero image." MOD_MOKOJOOMHERO_NO_CONTENT="Add content to this module to display it over the hero image."
; Content fieldset ; Content fieldset
MOD_MOKOJOOMHERO_FIELDSET_CONTENT="Hero Content" MOD_MOKOJOOMHERO_FIELDSET_CONTENT="Hero Content"
MOD_MOKOJOOMHERO_CONTENT_SOURCE_LABEL="Content Source"
MOD_MOKOJOOMHERO_CONTENT_SOURCE_DESC="Choose whether to enter content manually or pull from a Joomla article."
MOD_MOKOJOOMHERO_SOURCE_MANUAL="Manual Editor"
MOD_MOKOJOOMHERO_SOURCE_ARTICLE="Joomla Article"
MOD_MOKOJOOMHERO_CONTENT_LABEL="Content" MOD_MOKOJOOMHERO_CONTENT_LABEL="Content"
MOD_MOKOJOOMHERO_CONTENT_DESC="HTML content displayed on the hero. Use the editor to add headings, text, buttons, or any HTML." MOD_MOKOJOOMHERO_CONTENT_DESC="HTML content displayed on the hero. Use the editor to add headings, text, buttons, or any HTML."
MOD_MOKOJOOMHERO_ARTICLE_LABEL="Article"
MOD_MOKOJOOMHERO_ARTICLE_DESC="Select a published article to use as the hero content. The article introtext (or fulltext) is displayed."
MOD_MOKOJOOMHERO_ARTICLE_SELECT="- Select Article -"
MOD_MOKOJOOMHERO_USE_ARTICLE_TITLE_LABEL="Use Article Title"
MOD_MOKOJOOMHERO_USE_ARTICLE_TITLE_DESC="Replace the module title with the selected article's title."
MOD_MOKOJOOMHERO_SHOW_CARD_LABEL="Show Card" MOD_MOKOJOOMHERO_SHOW_CARD_LABEL="Show Card"
MOD_MOKOJOOMHERO_SHOW_CARD_DESC="Wrap the content in a card with a white background and shadow." MOD_MOKOJOOMHERO_SHOW_CARD_DESC="Wrap the content in a card with a white background and shadow."
; Hero mode ; Hero mode
MOD_MOKOJOOMHERO_MODE_LABEL="Hero Mode" MOD_MOKOJOOMHERO_MODE_LABEL="Hero Mode"
MOD_MOKOJOOMHERO_MODE_DESC="Choose between a slideshow of images, an embedded video (YouTube/Vimeo), or a local video file." MOD_MOKOJOOMHERO_MODE_DESC="Choose between a slideshow of images, an embedded video (YouTube/Vimeo), a local video file, a solid colour, or a gradient."
MOD_MOKOJOOMHERO_MODE_IMAGES="Images" MOD_MOKOJOOMHERO_MODE_IMAGES="Images"
MOD_MOKOJOOMHERO_MODE_VIDEO="Video (YouTube/Vimeo)" MOD_MOKOJOOMHERO_MODE_VIDEO="Video (YouTube/Vimeo)"
MOD_MOKOJOOMHERO_MODE_LOCALVIDEO="Local Video" MOD_MOKOJOOMHERO_MODE_LOCALVIDEO="Local Video"
MOD_MOKOJOOMHERO_MODE_COLOR="Solid Colour"
MOD_MOKOJOOMHERO_MODE_GRADIENT="Gradient"
; Transition type
MOD_MOKOJOOMHERO_FADE_TYPE_LABEL="Transition Type"
MOD_MOKOJOOMHERO_FADE_TYPE_DESC="How images transition between slides."
MOD_MOKOJOOMHERO_FADE_CROSSFADE="Crossfade"
MOD_MOKOJOOMHERO_FADE_SLIDE="Slide"
MOD_MOKOJOOMHERO_FADE_BLACK="Fade to Black"
MOD_MOKOJOOMHERO_FADE_ZOOM="Zoom (Ken Burns)"
; Image settings ; Image settings
MOD_MOKOJOOMHERO_IMAGE_FOLDER_LABEL="Image Folder" MOD_MOKOJOOMHERO_IMAGE_FOLDER_LABEL="Image Folder"
@@ -33,6 +52,15 @@ MOD_MOKOJOOMHERO_IMAGE_COUNT_DESC="How many random images to include in the slid
MOD_MOKOJOOMHERO_SLIDE_INTERVAL_LABEL="Slide Interval (ms)" MOD_MOKOJOOMHERO_SLIDE_INTERVAL_LABEL="Slide Interval (ms)"
MOD_MOKOJOOMHERO_SLIDE_INTERVAL_DESC="Time between slides in milliseconds (e.g. 5000 = 5 seconds)." MOD_MOKOJOOMHERO_SLIDE_INTERVAL_DESC="Time between slides in milliseconds (e.g. 5000 = 5 seconds)."
; Per-slide content
MOD_MOKOJOOMHERO_SLIDE_CONTENT_LABEL="Slide Content"
MOD_MOKOJOOMHERO_SLIDE_CONTENT_DESC="Define individual slides with unique images and content. When populated, this overrides the random image folder. Leave empty to use the folder-based slideshow."
MOD_MOKOJOOMHERO_SLIDE_IMAGE_LABEL="Image"
MOD_MOKOJOOMHERO_SLIDE_HEADING_LABEL="Heading"
MOD_MOKOJOOMHERO_SLIDE_BODY_LABEL="Body Text"
MOD_MOKOJOOMHERO_SLIDE_LINK_LABEL="Link URL"
MOD_MOKOJOOMHERO_SLIDE_LINK_TEXT_LABEL="Link Text"
; Video settings (embedded) ; Video settings (embedded)
MOD_MOKOJOOMHERO_VIDEO_FILE_LABEL="Video URL" MOD_MOKOJOOMHERO_VIDEO_FILE_LABEL="Video URL"
MOD_MOKOJOOMHERO_VIDEO_FILE_DESC="YouTube or Vimeo URL. The module auto-detects the source." MOD_MOKOJOOMHERO_VIDEO_FILE_DESC="YouTube or Vimeo URL. The module auto-detects the source."
@@ -41,31 +69,104 @@ MOD_MOKOJOOMHERO_VIDEO_FILE_DESC="YouTube or Vimeo URL. The module auto-detects
MOD_MOKOJOOMHERO_LOCAL_VIDEO_LABEL="Video File" MOD_MOKOJOOMHERO_LOCAL_VIDEO_LABEL="Video File"
MOD_MOKOJOOMHERO_LOCAL_VIDEO_DESC="Select a video file from the Media Manager (mp4, webm, ogg)." MOD_MOKOJOOMHERO_LOCAL_VIDEO_DESC="Select a video file from the Media Manager (mp4, webm, ogg)."
; Content animation
MOD_MOKOJOOMHERO_CONTENT_ANIM_LABEL="Content Animation"
MOD_MOKOJOOMHERO_CONTENT_ANIM_DESC="Entrance animation for the overlay content when the hero scrolls into view."
MOD_MOKOJOOMHERO_CONTENT_ANIM_DELAY_LABEL="Animation Delay (ms)"
MOD_MOKOJOOMHERO_CONTENT_ANIM_DELAY_DESC="Delay before the content animation starts."
MOD_MOKOJOOMHERO_ANIM_NONE="None"
MOD_MOKOJOOMHERO_ANIM_FADE_IN="Fade In"
MOD_MOKOJOOMHERO_ANIM_SLIDE_UP="Slide Up"
MOD_MOKOJOOMHERO_ANIM_SLIDE_LEFT="Slide from Right"
MOD_MOKOJOOMHERO_ANIM_SLIDE_RIGHT="Slide from Left"
; Card delay ; Card delay
MOD_MOKOJOOMHERO_CARD_DELAY_LABEL="Card Fade-in Delay (ms)" MOD_MOKOJOOMHERO_CARD_DELAY_LABEL="Card Fade-in Delay (ms)"
MOD_MOKOJOOMHERO_CARD_DELAY_DESC="Delay in milliseconds before the content card fades in. Set to 0 for no delay." MOD_MOKOJOOMHERO_CARD_DELAY_DESC="Delay in milliseconds before the content card fades in. Set to 0 for no delay."
; Parallax
MOD_MOKOJOOMHERO_PARALLAX_LABEL="Parallax Effect"
MOD_MOKOJOOMHERO_PARALLAX_DESC="Background moves at a slower rate than page content on scroll, creating a depth effect."
MOD_MOKOJOOMHERO_PARALLAX_SPEED_LABEL="Parallax Speed"
MOD_MOKOJOOMHERO_PARALLAX_SPEED_DESC="How much the background moves relative to scroll (0.1 = subtle, 0.9 = dramatic)."
; A/B testing
MOD_MOKOJOOMHERO_FIELDSET_AB="A/B Testing"
MOD_MOKOJOOMHERO_AB_ENABLED_LABEL="Enable A/B Testing"
MOD_MOKOJOOMHERO_AB_ENABLED_DESC="Randomly show different content variations to visitors. Assignment is sticky per session."
MOD_MOKOJOOMHERO_AB_VARIATIONS_LABEL="Variations"
MOD_MOKOJOOMHERO_AB_VARIATIONS_DESC="Define content variations with relative weights. Higher weight = higher chance of being shown."
MOD_MOKOJOOMHERO_AB_VAR_LABEL="Label"
MOD_MOKOJOOMHERO_AB_VAR_CONTENT="Content"
MOD_MOKOJOOMHERO_AB_VAR_WEIGHT="Weight"
; Scheduling
MOD_MOKOJOOMHERO_FIELDSET_SCHEDULING="Scheduling"
MOD_MOKOJOOMHERO_SCHEDULE_ENABLED_LABEL="Enable Scheduling"
MOD_MOKOJOOMHERO_SCHEDULE_ENABLED_DESC="Only display the hero during a specific date/time range. Uses the site timezone."
MOD_MOKOJOOMHERO_SCHEDULE_START_LABEL="Start Date/Time"
MOD_MOKOJOOMHERO_SCHEDULE_START_DESC="The hero will not display before this date and time. Leave empty for no start restriction."
MOD_MOKOJOOMHERO_SCHEDULE_END_LABEL="End Date/Time"
MOD_MOKOJOOMHERO_SCHEDULE_END_DESC="The hero will not display after this date and time. Leave empty for no end restriction."
; Video poster
MOD_MOKOJOOMHERO_VIDEO_POSTER_LABEL="Video Poster Image"
MOD_MOKOJOOMHERO_VIDEO_POSTER_DESC="Fallback image displayed while the video loads. Prevents a blank hero on slow connections."
; Scroll indicator
MOD_MOKOJOOMHERO_SCROLL_INDICATOR_LABEL="Show Scroll Indicator"
MOD_MOKOJOOMHERO_SCROLL_INDICATOR_DESC="Show an animated down-arrow at the bottom of the hero prompting users to scroll."
; Mute toggle ; Mute toggle
MOD_MOKOJOOMHERO_MUTE_TOGGLE_LABEL="Show Mute Toggle" MOD_MOKOJOOMHERO_MUTE_TOGGLE_LABEL="Show Mute Toggle"
MOD_MOKOJOOMHERO_MUTE_TOGGLE_DESC="Show a mute/unmute button on the hero video. Videos always start muted (required for autoplay)." MOD_MOKOJOOMHERO_MUTE_TOGGLE_DESC="Show a mute/unmute button on the hero video. Videos always start muted (required for autoplay)."
; Solid colour background
MOD_MOKOJOOMHERO_BG_COLOR_LABEL="Background Colour"
MOD_MOKOJOOMHERO_BG_COLOR_DESC="Solid background colour for the hero section."
; Gradient background
MOD_MOKOJOOMHERO_GRADIENT_START_LABEL="Gradient Start Colour"
MOD_MOKOJOOMHERO_GRADIENT_START_DESC="Starting colour of the gradient."
MOD_MOKOJOOMHERO_GRADIENT_END_LABEL="Gradient End Colour"
MOD_MOKOJOOMHERO_GRADIENT_END_DESC="Ending colour of the gradient."
MOD_MOKOJOOMHERO_GRADIENT_ANGLE_LABEL="Gradient Angle"
MOD_MOKOJOOMHERO_GRADIENT_ANGLE_DESC="Direction of the gradient in degrees (0 = bottom to top, 90 = left to right, 135 = diagonal)."
; Hero height ; Hero height
MOD_MOKOJOOMHERO_HERO_HEIGHT_LABEL="Hero Height" MOD_MOKOJOOMHERO_HERO_HEIGHT_LABEL="Hero Height"
MOD_MOKOJOOMHERO_HERO_HEIGHT_DESC="Height of the hero section. Use px for fixed pixels (e.g. 400px) or vh for viewport height (e.g. 60vh for 60%% of screen)." MOD_MOKOJOOMHERO_HERO_HEIGHT_DESC="Height of the hero section. Use px for fixed pixels (e.g. 400px) or vh for viewport height (e.g. 60vh for 60%% of screen)."
MOD_MOKOJOOMHERO_HERO_HEIGHT_HINT="e.g. 60vh or 400px" MOD_MOKOJOOMHERO_HERO_HEIGHT_HINT="e.g. 60vh or 400px"
; Hero height (mobile)
MOD_MOKOJOOMHERO_HERO_HEIGHT_MOBILE_LABEL="Mobile Hero Height"
MOD_MOKOJOOMHERO_HERO_HEIGHT_MOBILE_DESC="Height of the hero on mobile devices. Leave empty for auto height. Uses the same units as Hero Height."
MOD_MOKOJOOMHERO_HERO_HEIGHT_MOBILE_HINT="e.g. 40vh or 300px (empty = auto)"
; Overlay fieldset ; Overlay fieldset
MOD_MOKOJOOMHERO_FIELDSET_OVERLAY="Overlay &amp; Text" MOD_MOKOJOOMHERO_FIELDSET_OVERLAY="Overlay &amp; Text"
MOD_MOKOJOOMHERO_OVERLAY_TYPE_LABEL="Overlay Type"
MOD_MOKOJOOMHERO_OVERLAY_TYPE_DESC="How the overlay is applied. Solid fills evenly; gradient fades from transparent to opaque in the chosen direction."
MOD_MOKOJOOMHERO_OVERLAY_SOLID="Solid"
MOD_MOKOJOOMHERO_OVERLAY_GRADIENT_BOTTOM="Gradient (dark at bottom)"
MOD_MOKOJOOMHERO_OVERLAY_GRADIENT_TOP="Gradient (dark at top)"
MOD_MOKOJOOMHERO_OVERLAY_GRADIENT_LEFT="Gradient (dark at left)"
MOD_MOKOJOOMHERO_OVERLAY_GRADIENT_RIGHT="Gradient (dark at right)"
MOD_MOKOJOOMHERO_OVERLAY_COLOR_LABEL="Overlay Colour" MOD_MOKOJOOMHERO_OVERLAY_COLOR_LABEL="Overlay Colour"
MOD_MOKOJOOMHERO_OVERLAY_COLOR_DESC="Background colour of the overlay on top of the hero image." MOD_MOKOJOOMHERO_OVERLAY_COLOR_DESC="Background colour of the overlay on top of the hero image."
MOD_MOKOJOOMHERO_OVERLAY_OPACITY_LABEL="Overlay Opacity" MOD_MOKOJOOMHERO_OVERLAY_OPACITY_LABEL="Overlay Opacity"
MOD_MOKOJOOMHERO_OVERLAY_OPACITY_DESC="Transparency of the overlay (0 = fully transparent, 1 = fully opaque)." MOD_MOKOJOOMHERO_OVERLAY_OPACITY_DESC="Transparency of the overlay (0 = fully transparent, 1 = fully opaque)."
MOD_MOKOJOOMHERO_TEXT_ALIGN_LABEL="Text Alignment" MOD_MOKOJOOMHERO_TEXT_ALIGN_LABEL="Text Alignment"
MOD_MOKOJOOMHERO_TEXT_ALIGN_DESC="Horizontal alignment of the overlay text." MOD_MOKOJOOMHERO_TEXT_ALIGN_DESC="Horizontal alignment of the overlay text."
MOD_MOKOJOOMHERO_VALIGN_LABEL="Vertical Alignment"
MOD_MOKOJOOMHERO_VALIGN_DESC="Vertical position of the content within the hero."
MOD_MOKOJOOMHERO_VALIGN_TOP="Top"
MOD_MOKOJOOMHERO_VALIGN_CENTER="Centre"
MOD_MOKOJOOMHERO_VALIGN_BOTTOM="Bottom"
MOD_MOKOJOOMHERO_TEXT_COLOR_LABEL="Text Colour" MOD_MOKOJOOMHERO_TEXT_COLOR_LABEL="Text Colour"
MOD_MOKOJOOMHERO_TEXT_COLOR_DESC="Colour of the text displayed over the hero image." MOD_MOKOJOOMHERO_TEXT_COLOR_DESC="Colour of the text displayed over the hero image."
; Alignment options ; Horizontal alignment options
MOD_MOKOJOOMHERO_ALIGN_LEFT="Left" MOD_MOKOJOOMHERO_ALIGN_LEFT="Left"
MOD_MOKOJOOMHERO_ALIGN_CENTER="Centre" MOD_MOKOJOOMHERO_ALIGN_CENTER="Centre"
MOD_MOKOJOOMHERO_ALIGN_RIGHT="Right" MOD_MOKOJOOMHERO_ALIGN_RIGHT="Right"
+104 -3
View File
@@ -6,7 +6,7 @@
; INGROUP: MokoJoomHero.Module ; INGROUP: MokoJoomHero.Module
; REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoJoomHero ; REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoJoomHero
; PATH: /src/language/en-GB/mod_mokojoomhero.sys.ini ; PATH: /src/language/en-GB/mod_mokojoomhero.sys.ini
; VERSION: 01.07.00 ; VERSION: 01.21.01
; BRIEF: System language strings — used in admin Extension Manager and Module Manager ; BRIEF: System language strings — used in admin Extension Manager and Module Manager
MOD_MOKOJOOMHERO="Module - MokoJoomHero" MOD_MOKOJOOMHERO="Module - MokoJoomHero"
@@ -14,17 +14,36 @@ MOD_MOKOJOOMHERO_DESCRIPTION="Displays a random hero image slideshow or backgrou
; Content fieldset ; Content fieldset
MOD_MOKOJOOMHERO_FIELDSET_CONTENT="Hero Content" MOD_MOKOJOOMHERO_FIELDSET_CONTENT="Hero Content"
MOD_MOKOJOOMHERO_CONTENT_SOURCE_LABEL="Content Source"
MOD_MOKOJOOMHERO_CONTENT_SOURCE_DESC="Choose whether to enter content manually or pull from a Joomla article."
MOD_MOKOJOOMHERO_SOURCE_MANUAL="Manual Editor"
MOD_MOKOJOOMHERO_SOURCE_ARTICLE="Joomla Article"
MOD_MOKOJOOMHERO_CONTENT_LABEL="Content" MOD_MOKOJOOMHERO_CONTENT_LABEL="Content"
MOD_MOKOJOOMHERO_CONTENT_DESC="HTML content displayed on the hero. Use the editor to add headings, text, buttons, or any HTML." MOD_MOKOJOOMHERO_CONTENT_DESC="HTML content displayed on the hero. Use the editor to add headings, text, buttons, or any HTML."
MOD_MOKOJOOMHERO_ARTICLE_LABEL="Article"
MOD_MOKOJOOMHERO_ARTICLE_DESC="Select a published article to use as the hero content."
MOD_MOKOJOOMHERO_ARTICLE_SELECT="- Select Article -"
MOD_MOKOJOOMHERO_USE_ARTICLE_TITLE_LABEL="Use Article Title"
MOD_MOKOJOOMHERO_USE_ARTICLE_TITLE_DESC="Replace the module title with the selected article's title."
MOD_MOKOJOOMHERO_SHOW_CARD_LABEL="Show Card" MOD_MOKOJOOMHERO_SHOW_CARD_LABEL="Show Card"
MOD_MOKOJOOMHERO_SHOW_CARD_DESC="Wrap the content in a card with a white background and shadow." MOD_MOKOJOOMHERO_SHOW_CARD_DESC="Wrap the content in a card with a white background and shadow."
; Hero mode ; Hero mode
MOD_MOKOJOOMHERO_MODE_LABEL="Hero Mode" MOD_MOKOJOOMHERO_MODE_LABEL="Hero Mode"
MOD_MOKOJOOMHERO_MODE_DESC="Choose between a slideshow of images, an embedded video (YouTube/Vimeo), or a local video file." MOD_MOKOJOOMHERO_MODE_DESC="Choose between a slideshow of images, an embedded video (YouTube/Vimeo), a local video file, a solid colour, or a gradient."
MOD_MOKOJOOMHERO_MODE_IMAGES="Images" MOD_MOKOJOOMHERO_MODE_IMAGES="Images"
MOD_MOKOJOOMHERO_MODE_VIDEO="Video (YouTube/Vimeo)" MOD_MOKOJOOMHERO_MODE_VIDEO="Video (YouTube/Vimeo)"
MOD_MOKOJOOMHERO_MODE_LOCALVIDEO="Local Video" MOD_MOKOJOOMHERO_MODE_LOCALVIDEO="Local Video"
MOD_MOKOJOOMHERO_MODE_COLOR="Solid Colour"
MOD_MOKOJOOMHERO_MODE_GRADIENT="Gradient"
; Transition type
MOD_MOKOJOOMHERO_FADE_TYPE_LABEL="Transition Type"
MOD_MOKOJOOMHERO_FADE_TYPE_DESC="How images transition between slides."
MOD_MOKOJOOMHERO_FADE_CROSSFADE="Crossfade"
MOD_MOKOJOOMHERO_FADE_SLIDE="Slide"
MOD_MOKOJOOMHERO_FADE_BLACK="Fade to Black"
MOD_MOKOJOOMHERO_FADE_ZOOM="Zoom (Ken Burns)"
; Image settings ; Image settings
MOD_MOKOJOOMHERO_IMAGE_FOLDER_LABEL="Image Folder" MOD_MOKOJOOMHERO_IMAGE_FOLDER_LABEL="Image Folder"
@@ -34,6 +53,15 @@ MOD_MOKOJOOMHERO_IMAGE_COUNT_DESC="How many random images to include in the slid
MOD_MOKOJOOMHERO_SLIDE_INTERVAL_LABEL="Slide Interval (ms)" MOD_MOKOJOOMHERO_SLIDE_INTERVAL_LABEL="Slide Interval (ms)"
MOD_MOKOJOOMHERO_SLIDE_INTERVAL_DESC="Time between slides in milliseconds (e.g. 5000 = 5 seconds)." MOD_MOKOJOOMHERO_SLIDE_INTERVAL_DESC="Time between slides in milliseconds (e.g. 5000 = 5 seconds)."
; Per-slide content
MOD_MOKOJOOMHERO_SLIDE_CONTENT_LABEL="Slide Content"
MOD_MOKOJOOMHERO_SLIDE_CONTENT_DESC="Define individual slides with unique images and content."
MOD_MOKOJOOMHERO_SLIDE_IMAGE_LABEL="Image"
MOD_MOKOJOOMHERO_SLIDE_HEADING_LABEL="Heading"
MOD_MOKOJOOMHERO_SLIDE_BODY_LABEL="Body Text"
MOD_MOKOJOOMHERO_SLIDE_LINK_LABEL="Link URL"
MOD_MOKOJOOMHERO_SLIDE_LINK_TEXT_LABEL="Link Text"
; Video settings (embedded) ; Video settings (embedded)
MOD_MOKOJOOMHERO_VIDEO_FILE_LABEL="Video URL" MOD_MOKOJOOMHERO_VIDEO_FILE_LABEL="Video URL"
MOD_MOKOJOOMHERO_VIDEO_FILE_DESC="YouTube or Vimeo URL. The module auto-detects the source." MOD_MOKOJOOMHERO_VIDEO_FILE_DESC="YouTube or Vimeo URL. The module auto-detects the source."
@@ -42,31 +70,104 @@ MOD_MOKOJOOMHERO_VIDEO_FILE_DESC="YouTube or Vimeo URL. The module auto-detects
MOD_MOKOJOOMHERO_LOCAL_VIDEO_LABEL="Video File" MOD_MOKOJOOMHERO_LOCAL_VIDEO_LABEL="Video File"
MOD_MOKOJOOMHERO_LOCAL_VIDEO_DESC="Select a video file from the Media Manager (mp4, webm, ogg)." MOD_MOKOJOOMHERO_LOCAL_VIDEO_DESC="Select a video file from the Media Manager (mp4, webm, ogg)."
; Content animation
MOD_MOKOJOOMHERO_CONTENT_ANIM_LABEL="Content Animation"
MOD_MOKOJOOMHERO_CONTENT_ANIM_DESC="Entrance animation for the overlay content when the hero scrolls into view."
MOD_MOKOJOOMHERO_CONTENT_ANIM_DELAY_LABEL="Animation Delay (ms)"
MOD_MOKOJOOMHERO_CONTENT_ANIM_DELAY_DESC="Delay before the content animation starts."
MOD_MOKOJOOMHERO_ANIM_NONE="None"
MOD_MOKOJOOMHERO_ANIM_FADE_IN="Fade In"
MOD_MOKOJOOMHERO_ANIM_SLIDE_UP="Slide Up"
MOD_MOKOJOOMHERO_ANIM_SLIDE_LEFT="Slide from Right"
MOD_MOKOJOOMHERO_ANIM_SLIDE_RIGHT="Slide from Left"
; Card delay ; Card delay
MOD_MOKOJOOMHERO_CARD_DELAY_LABEL="Card Fade-in Delay (ms)" MOD_MOKOJOOMHERO_CARD_DELAY_LABEL="Card Fade-in Delay (ms)"
MOD_MOKOJOOMHERO_CARD_DELAY_DESC="Delay in milliseconds before the content card fades in. Set to 0 for no delay." MOD_MOKOJOOMHERO_CARD_DELAY_DESC="Delay in milliseconds before the content card fades in. Set to 0 for no delay."
; Parallax
MOD_MOKOJOOMHERO_PARALLAX_LABEL="Parallax Effect"
MOD_MOKOJOOMHERO_PARALLAX_DESC="Background moves at a slower rate than page content on scroll."
MOD_MOKOJOOMHERO_PARALLAX_SPEED_LABEL="Parallax Speed"
MOD_MOKOJOOMHERO_PARALLAX_SPEED_DESC="How much the background moves relative to scroll (0.1 = subtle, 0.9 = dramatic)."
; A/B testing
MOD_MOKOJOOMHERO_FIELDSET_AB="A/B Testing"
MOD_MOKOJOOMHERO_AB_ENABLED_LABEL="Enable A/B Testing"
MOD_MOKOJOOMHERO_AB_ENABLED_DESC="Randomly show different content variations to visitors."
MOD_MOKOJOOMHERO_AB_VARIATIONS_LABEL="Variations"
MOD_MOKOJOOMHERO_AB_VARIATIONS_DESC="Define content variations with relative weights."
MOD_MOKOJOOMHERO_AB_VAR_LABEL="Label"
MOD_MOKOJOOMHERO_AB_VAR_CONTENT="Content"
MOD_MOKOJOOMHERO_AB_VAR_WEIGHT="Weight"
; Scheduling
MOD_MOKOJOOMHERO_FIELDSET_SCHEDULING="Scheduling"
MOD_MOKOJOOMHERO_SCHEDULE_ENABLED_LABEL="Enable Scheduling"
MOD_MOKOJOOMHERO_SCHEDULE_ENABLED_DESC="Only display the hero during a specific date/time range."
MOD_MOKOJOOMHERO_SCHEDULE_START_LABEL="Start Date/Time"
MOD_MOKOJOOMHERO_SCHEDULE_START_DESC="The hero will not display before this date and time."
MOD_MOKOJOOMHERO_SCHEDULE_END_LABEL="End Date/Time"
MOD_MOKOJOOMHERO_SCHEDULE_END_DESC="The hero will not display after this date and time."
; Video poster
MOD_MOKOJOOMHERO_VIDEO_POSTER_LABEL="Video Poster Image"
MOD_MOKOJOOMHERO_VIDEO_POSTER_DESC="Fallback image displayed while the video loads."
; Scroll indicator
MOD_MOKOJOOMHERO_SCROLL_INDICATOR_LABEL="Show Scroll Indicator"
MOD_MOKOJOOMHERO_SCROLL_INDICATOR_DESC="Show an animated down-arrow at the bottom of the hero prompting users to scroll."
; Mute toggle ; Mute toggle
MOD_MOKOJOOMHERO_MUTE_TOGGLE_LABEL="Show Mute Toggle" MOD_MOKOJOOMHERO_MUTE_TOGGLE_LABEL="Show Mute Toggle"
MOD_MOKOJOOMHERO_MUTE_TOGGLE_DESC="Show a mute/unmute button on the hero video. Videos always start muted (required for autoplay)." MOD_MOKOJOOMHERO_MUTE_TOGGLE_DESC="Show a mute/unmute button on the hero video. Videos always start muted (required for autoplay)."
; Solid colour background
MOD_MOKOJOOMHERO_BG_COLOR_LABEL="Background Colour"
MOD_MOKOJOOMHERO_BG_COLOR_DESC="Solid background colour for the hero section."
; Gradient background
MOD_MOKOJOOMHERO_GRADIENT_START_LABEL="Gradient Start Colour"
MOD_MOKOJOOMHERO_GRADIENT_START_DESC="Starting colour of the gradient."
MOD_MOKOJOOMHERO_GRADIENT_END_LABEL="Gradient End Colour"
MOD_MOKOJOOMHERO_GRADIENT_END_DESC="Ending colour of the gradient."
MOD_MOKOJOOMHERO_GRADIENT_ANGLE_LABEL="Gradient Angle"
MOD_MOKOJOOMHERO_GRADIENT_ANGLE_DESC="Direction of the gradient in degrees (0 = bottom to top, 90 = left to right, 135 = diagonal)."
; Hero height ; Hero height
MOD_MOKOJOOMHERO_HERO_HEIGHT_LABEL="Hero Height" MOD_MOKOJOOMHERO_HERO_HEIGHT_LABEL="Hero Height"
MOD_MOKOJOOMHERO_HERO_HEIGHT_DESC="Height of the hero section. Use px for fixed pixels (e.g. 400px) or vh for viewport height (e.g. 60vh for 60%% of screen)." MOD_MOKOJOOMHERO_HERO_HEIGHT_DESC="Height of the hero section. Use px for fixed pixels (e.g. 400px) or vh for viewport height (e.g. 60vh for 60%% of screen)."
MOD_MOKOJOOMHERO_HERO_HEIGHT_HINT="e.g. 60vh or 400px" MOD_MOKOJOOMHERO_HERO_HEIGHT_HINT="e.g. 60vh or 400px"
; Hero height (mobile)
MOD_MOKOJOOMHERO_HERO_HEIGHT_MOBILE_LABEL="Mobile Hero Height"
MOD_MOKOJOOMHERO_HERO_HEIGHT_MOBILE_DESC="Height of the hero on mobile devices. Leave empty for auto height."
MOD_MOKOJOOMHERO_HERO_HEIGHT_MOBILE_HINT="e.g. 40vh or 300px (empty = auto)"
; Overlay fieldset ; Overlay fieldset
MOD_MOKOJOOMHERO_FIELDSET_OVERLAY="Overlay &amp; Text" MOD_MOKOJOOMHERO_FIELDSET_OVERLAY="Overlay &amp; Text"
MOD_MOKOJOOMHERO_OVERLAY_TYPE_LABEL="Overlay Type"
MOD_MOKOJOOMHERO_OVERLAY_TYPE_DESC="How the overlay is applied. Solid fills evenly; gradient fades from transparent to opaque in the chosen direction."
MOD_MOKOJOOMHERO_OVERLAY_SOLID="Solid"
MOD_MOKOJOOMHERO_OVERLAY_GRADIENT_BOTTOM="Gradient (dark at bottom)"
MOD_MOKOJOOMHERO_OVERLAY_GRADIENT_TOP="Gradient (dark at top)"
MOD_MOKOJOOMHERO_OVERLAY_GRADIENT_LEFT="Gradient (dark at left)"
MOD_MOKOJOOMHERO_OVERLAY_GRADIENT_RIGHT="Gradient (dark at right)"
MOD_MOKOJOOMHERO_OVERLAY_COLOR_LABEL="Overlay Colour" MOD_MOKOJOOMHERO_OVERLAY_COLOR_LABEL="Overlay Colour"
MOD_MOKOJOOMHERO_OVERLAY_COLOR_DESC="Background colour of the overlay on top of the hero image." MOD_MOKOJOOMHERO_OVERLAY_COLOR_DESC="Background colour of the overlay on top of the hero image."
MOD_MOKOJOOMHERO_OVERLAY_OPACITY_LABEL="Overlay Opacity" MOD_MOKOJOOMHERO_OVERLAY_OPACITY_LABEL="Overlay Opacity"
MOD_MOKOJOOMHERO_OVERLAY_OPACITY_DESC="Transparency of the overlay (0 = fully transparent, 1 = fully opaque)." MOD_MOKOJOOMHERO_OVERLAY_OPACITY_DESC="Transparency of the overlay (0 = fully transparent, 1 = fully opaque)."
MOD_MOKOJOOMHERO_TEXT_ALIGN_LABEL="Text Alignment" MOD_MOKOJOOMHERO_TEXT_ALIGN_LABEL="Text Alignment"
MOD_MOKOJOOMHERO_TEXT_ALIGN_DESC="Horizontal alignment of the overlay text." MOD_MOKOJOOMHERO_TEXT_ALIGN_DESC="Horizontal alignment of the overlay text."
MOD_MOKOJOOMHERO_VALIGN_LABEL="Vertical Alignment"
MOD_MOKOJOOMHERO_VALIGN_DESC="Vertical position of the content within the hero."
MOD_MOKOJOOMHERO_VALIGN_TOP="Top"
MOD_MOKOJOOMHERO_VALIGN_CENTER="Centre"
MOD_MOKOJOOMHERO_VALIGN_BOTTOM="Bottom"
MOD_MOKOJOOMHERO_TEXT_COLOR_LABEL="Text Colour" MOD_MOKOJOOMHERO_TEXT_COLOR_LABEL="Text Colour"
MOD_MOKOJOOMHERO_TEXT_COLOR_DESC="Colour of the text displayed over the hero image." MOD_MOKOJOOMHERO_TEXT_COLOR_DESC="Colour of the text displayed over the hero image."
; Alignment options ; Horizontal alignment options
MOD_MOKOJOOMHERO_ALIGN_LEFT="Left" MOD_MOKOJOOMHERO_ALIGN_LEFT="Left"
MOD_MOKOJOOMHERO_ALIGN_CENTER="Centre" MOD_MOKOJOOMHERO_ALIGN_CENTER="Centre"
MOD_MOKOJOOMHERO_ALIGN_RIGHT="Right" MOD_MOKOJOOMHERO_ALIGN_RIGHT="Right"
+1
View File
@@ -0,0 +1 @@
<html><body bgcolor="#FFFFFF"></body></html>
+104 -3
View File
@@ -6,24 +6,43 @@
; INGROUP: MokoJoomHero.Module ; INGROUP: MokoJoomHero.Module
; REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoJoomHero ; REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoJoomHero
; PATH: /src/language/en-US/mod_mokojoomhero.ini ; PATH: /src/language/en-US/mod_mokojoomhero.ini
; VERSION: 01.07.00 ; VERSION: 01.21.01
; BRIEF: Language strings for MokoJoomHero module (en-US, frontend + admin form fields) ; BRIEF: Language strings for MokoJoomHero module (en-US, frontend + admin form fields)
MOD_MOKOJOOMHERO_NO_CONTENT="Add content to this module to display it over the hero image." MOD_MOKOJOOMHERO_NO_CONTENT="Add content to this module to display it over the hero image."
; Content fieldset ; Content fieldset
MOD_MOKOJOOMHERO_FIELDSET_CONTENT="Hero Content" MOD_MOKOJOOMHERO_FIELDSET_CONTENT="Hero Content"
MOD_MOKOJOOMHERO_CONTENT_SOURCE_LABEL="Content Source"
MOD_MOKOJOOMHERO_CONTENT_SOURCE_DESC="Choose whether to enter content manually or pull from a Joomla article."
MOD_MOKOJOOMHERO_SOURCE_MANUAL="Manual Editor"
MOD_MOKOJOOMHERO_SOURCE_ARTICLE="Joomla Article"
MOD_MOKOJOOMHERO_CONTENT_LABEL="Content" MOD_MOKOJOOMHERO_CONTENT_LABEL="Content"
MOD_MOKOJOOMHERO_CONTENT_DESC="HTML content displayed on the hero. Use the editor to add headings, text, buttons, or any HTML." MOD_MOKOJOOMHERO_CONTENT_DESC="HTML content displayed on the hero. Use the editor to add headings, text, buttons, or any HTML."
MOD_MOKOJOOMHERO_ARTICLE_LABEL="Article"
MOD_MOKOJOOMHERO_ARTICLE_DESC="Select a published article to use as the hero content. The article introtext (or fulltext) is displayed."
MOD_MOKOJOOMHERO_ARTICLE_SELECT="- Select Article -"
MOD_MOKOJOOMHERO_USE_ARTICLE_TITLE_LABEL="Use Article Title"
MOD_MOKOJOOMHERO_USE_ARTICLE_TITLE_DESC="Replace the module title with the selected article's title."
MOD_MOKOJOOMHERO_SHOW_CARD_LABEL="Show Card" MOD_MOKOJOOMHERO_SHOW_CARD_LABEL="Show Card"
MOD_MOKOJOOMHERO_SHOW_CARD_DESC="Wrap the content in a card with a white background and shadow." MOD_MOKOJOOMHERO_SHOW_CARD_DESC="Wrap the content in a card with a white background and shadow."
; Hero mode ; Hero mode
MOD_MOKOJOOMHERO_MODE_LABEL="Hero Mode" MOD_MOKOJOOMHERO_MODE_LABEL="Hero Mode"
MOD_MOKOJOOMHERO_MODE_DESC="Choose between a slideshow of images, an embedded video (YouTube/Vimeo), or a local video file." MOD_MOKOJOOMHERO_MODE_DESC="Choose between a slideshow of images, an embedded video (YouTube/Vimeo), a local video file, a solid color, or a gradient."
MOD_MOKOJOOMHERO_MODE_IMAGES="Images" MOD_MOKOJOOMHERO_MODE_IMAGES="Images"
MOD_MOKOJOOMHERO_MODE_VIDEO="Video (YouTube/Vimeo)" MOD_MOKOJOOMHERO_MODE_VIDEO="Video (YouTube/Vimeo)"
MOD_MOKOJOOMHERO_MODE_LOCALVIDEO="Local Video" MOD_MOKOJOOMHERO_MODE_LOCALVIDEO="Local Video"
MOD_MOKOJOOMHERO_MODE_COLOR="Solid Color"
MOD_MOKOJOOMHERO_MODE_GRADIENT="Gradient"
; Transition type
MOD_MOKOJOOMHERO_FADE_TYPE_LABEL="Transition Type"
MOD_MOKOJOOMHERO_FADE_TYPE_DESC="How images transition between slides."
MOD_MOKOJOOMHERO_FADE_CROSSFADE="Crossfade"
MOD_MOKOJOOMHERO_FADE_SLIDE="Slide"
MOD_MOKOJOOMHERO_FADE_BLACK="Fade to Black"
MOD_MOKOJOOMHERO_FADE_ZOOM="Zoom (Ken Burns)"
; Image settings ; Image settings
MOD_MOKOJOOMHERO_IMAGE_FOLDER_LABEL="Image Folder" MOD_MOKOJOOMHERO_IMAGE_FOLDER_LABEL="Image Folder"
@@ -33,6 +52,15 @@ MOD_MOKOJOOMHERO_IMAGE_COUNT_DESC="How many random images to include in the slid
MOD_MOKOJOOMHERO_SLIDE_INTERVAL_LABEL="Slide Interval (ms)" MOD_MOKOJOOMHERO_SLIDE_INTERVAL_LABEL="Slide Interval (ms)"
MOD_MOKOJOOMHERO_SLIDE_INTERVAL_DESC="Time between slides in milliseconds (e.g. 5000 = 5 seconds)." MOD_MOKOJOOMHERO_SLIDE_INTERVAL_DESC="Time between slides in milliseconds (e.g. 5000 = 5 seconds)."
; Per-slide content
MOD_MOKOJOOMHERO_SLIDE_CONTENT_LABEL="Slide Content"
MOD_MOKOJOOMHERO_SLIDE_CONTENT_DESC="Define individual slides with unique images and content. When populated, this overrides the random image folder. Leave empty to use the folder-based slideshow."
MOD_MOKOJOOMHERO_SLIDE_IMAGE_LABEL="Image"
MOD_MOKOJOOMHERO_SLIDE_HEADING_LABEL="Heading"
MOD_MOKOJOOMHERO_SLIDE_BODY_LABEL="Body Text"
MOD_MOKOJOOMHERO_SLIDE_LINK_LABEL="Link URL"
MOD_MOKOJOOMHERO_SLIDE_LINK_TEXT_LABEL="Link Text"
; Video settings (embedded) ; Video settings (embedded)
MOD_MOKOJOOMHERO_VIDEO_FILE_LABEL="Video URL" MOD_MOKOJOOMHERO_VIDEO_FILE_LABEL="Video URL"
MOD_MOKOJOOMHERO_VIDEO_FILE_DESC="YouTube or Vimeo URL. The module auto-detects the source." MOD_MOKOJOOMHERO_VIDEO_FILE_DESC="YouTube or Vimeo URL. The module auto-detects the source."
@@ -41,6 +69,18 @@ MOD_MOKOJOOMHERO_VIDEO_FILE_DESC="YouTube or Vimeo URL. The module auto-detects
MOD_MOKOJOOMHERO_LOCAL_VIDEO_LABEL="Video File" MOD_MOKOJOOMHERO_LOCAL_VIDEO_LABEL="Video File"
MOD_MOKOJOOMHERO_LOCAL_VIDEO_DESC="Select a video file from the Media Manager (mp4, webm, ogg)." MOD_MOKOJOOMHERO_LOCAL_VIDEO_DESC="Select a video file from the Media Manager (mp4, webm, ogg)."
; Solid color background
MOD_MOKOJOOMHERO_BG_COLOR_LABEL="Background Color"
MOD_MOKOJOOMHERO_BG_COLOR_DESC="Solid background color for the hero section."
; Gradient background
MOD_MOKOJOOMHERO_GRADIENT_START_LABEL="Gradient Start Color"
MOD_MOKOJOOMHERO_GRADIENT_START_DESC="Starting color of the gradient."
MOD_MOKOJOOMHERO_GRADIENT_END_LABEL="Gradient End Color"
MOD_MOKOJOOMHERO_GRADIENT_END_DESC="Ending color of the gradient."
MOD_MOKOJOOMHERO_GRADIENT_ANGLE_LABEL="Gradient Angle"
MOD_MOKOJOOMHERO_GRADIENT_ANGLE_DESC="Direction of the gradient in degrees (0 = bottom to top, 90 = left to right, 135 = diagonal)."
; Hero height ; Hero height
MOD_MOKOJOOMHERO_HERO_HEIGHT_LABEL="Hero Height" MOD_MOKOJOOMHERO_HERO_HEIGHT_LABEL="Hero Height"
MOD_MOKOJOOMHERO_HERO_HEIGHT_DESC="Height of the hero section. Use px for fixed pixels (e.g. 400px) or vh for viewport height (e.g. 60vh for 60% of screen)." MOD_MOKOJOOMHERO_HERO_HEIGHT_DESC="Height of the hero section. Use px for fixed pixels (e.g. 400px) or vh for viewport height (e.g. 60vh for 60% of screen)."
@@ -50,22 +90,83 @@ MOD_MOKOJOOMHERO_HERO_HEIGHT_HINT="e.g. 60vh or 400px"
MOD_MOKOJOOMHERO_CARD_DELAY_LABEL="Card Fade-in Delay (ms)" MOD_MOKOJOOMHERO_CARD_DELAY_LABEL="Card Fade-in Delay (ms)"
MOD_MOKOJOOMHERO_CARD_DELAY_DESC="Delay in milliseconds before the content card fades in. Set to 0 for no delay." MOD_MOKOJOOMHERO_CARD_DELAY_DESC="Delay in milliseconds before the content card fades in. Set to 0 for no delay."
; Content animation
MOD_MOKOJOOMHERO_CONTENT_ANIM_LABEL="Content Animation"
MOD_MOKOJOOMHERO_CONTENT_ANIM_DESC="Entrance animation for the overlay content when the hero scrolls into view."
MOD_MOKOJOOMHERO_CONTENT_ANIM_DELAY_LABEL="Animation Delay (ms)"
MOD_MOKOJOOMHERO_CONTENT_ANIM_DELAY_DESC="Delay before the content animation starts."
MOD_MOKOJOOMHERO_ANIM_NONE="None"
MOD_MOKOJOOMHERO_ANIM_FADE_IN="Fade In"
MOD_MOKOJOOMHERO_ANIM_SLIDE_UP="Slide Up"
MOD_MOKOJOOMHERO_ANIM_SLIDE_LEFT="Slide from Right"
MOD_MOKOJOOMHERO_ANIM_SLIDE_RIGHT="Slide from Left"
; Parallax
MOD_MOKOJOOMHERO_PARALLAX_LABEL="Parallax Effect"
MOD_MOKOJOOMHERO_PARALLAX_DESC="Background moves at a slower rate than page content on scroll, creating a depth effect."
MOD_MOKOJOOMHERO_PARALLAX_SPEED_LABEL="Parallax Speed"
MOD_MOKOJOOMHERO_PARALLAX_SPEED_DESC="How much the background moves relative to scroll (0.1 = subtle, 0.9 = dramatic)."
; A/B testing
MOD_MOKOJOOMHERO_FIELDSET_AB="A/B Testing"
MOD_MOKOJOOMHERO_AB_ENABLED_LABEL="Enable A/B Testing"
MOD_MOKOJOOMHERO_AB_ENABLED_DESC="Randomly show different content variations to visitors. Assignment is sticky per session."
MOD_MOKOJOOMHERO_AB_VARIATIONS_LABEL="Variations"
MOD_MOKOJOOMHERO_AB_VARIATIONS_DESC="Define content variations with relative weights. Higher weight = higher chance of being shown."
MOD_MOKOJOOMHERO_AB_VAR_LABEL="Label"
MOD_MOKOJOOMHERO_AB_VAR_CONTENT="Content"
MOD_MOKOJOOMHERO_AB_VAR_WEIGHT="Weight"
; Scheduling
MOD_MOKOJOOMHERO_FIELDSET_SCHEDULING="Scheduling"
MOD_MOKOJOOMHERO_SCHEDULE_ENABLED_LABEL="Enable Scheduling"
MOD_MOKOJOOMHERO_SCHEDULE_ENABLED_DESC="Only display the hero during a specific date/time range. Uses the site timezone."
MOD_MOKOJOOMHERO_SCHEDULE_START_LABEL="Start Date/Time"
MOD_MOKOJOOMHERO_SCHEDULE_START_DESC="The hero will not display before this date and time. Leave empty for no start restriction."
MOD_MOKOJOOMHERO_SCHEDULE_END_LABEL="End Date/Time"
MOD_MOKOJOOMHERO_SCHEDULE_END_DESC="The hero will not display after this date and time. Leave empty for no end restriction."
; Video poster
MOD_MOKOJOOMHERO_VIDEO_POSTER_LABEL="Video Poster Image"
MOD_MOKOJOOMHERO_VIDEO_POSTER_DESC="Fallback image displayed while the video loads. Prevents a blank hero on slow connections."
; Scroll indicator
MOD_MOKOJOOMHERO_SCROLL_INDICATOR_LABEL="Show Scroll Indicator"
MOD_MOKOJOOMHERO_SCROLL_INDICATOR_DESC="Show an animated down-arrow at the bottom of the hero prompting users to scroll."
; Mute toggle ; Mute toggle
MOD_MOKOJOOMHERO_MUTE_TOGGLE_LABEL="Show Mute Toggle" MOD_MOKOJOOMHERO_MUTE_TOGGLE_LABEL="Show Mute Toggle"
MOD_MOKOJOOMHERO_MUTE_TOGGLE_DESC="Show a mute/unmute button on the hero video. Videos always start muted (required for autoplay)." MOD_MOKOJOOMHERO_MUTE_TOGGLE_DESC="Show a mute/unmute button on the hero video. Videos always start muted (required for autoplay)."
; Hero height (mobile)
MOD_MOKOJOOMHERO_HERO_HEIGHT_MOBILE_LABEL="Mobile Hero Height"
MOD_MOKOJOOMHERO_HERO_HEIGHT_MOBILE_DESC="Height of the hero on mobile devices. Leave empty for auto height. Uses the same units as Hero Height."
MOD_MOKOJOOMHERO_HERO_HEIGHT_MOBILE_HINT="e.g. 40vh or 300px (empty = auto)"
; Overlay fieldset ; Overlay fieldset
MOD_MOKOJOOMHERO_FIELDSET_OVERLAY="Overlay &amp; Text" MOD_MOKOJOOMHERO_FIELDSET_OVERLAY="Overlay &amp; Text"
MOD_MOKOJOOMHERO_OVERLAY_TYPE_LABEL="Overlay Type"
MOD_MOKOJOOMHERO_OVERLAY_TYPE_DESC="How the overlay is applied. Solid fills evenly; gradient fades from transparent to opaque in the chosen direction."
MOD_MOKOJOOMHERO_OVERLAY_SOLID="Solid"
MOD_MOKOJOOMHERO_OVERLAY_GRADIENT_BOTTOM="Gradient (dark at bottom)"
MOD_MOKOJOOMHERO_OVERLAY_GRADIENT_TOP="Gradient (dark at top)"
MOD_MOKOJOOMHERO_OVERLAY_GRADIENT_LEFT="Gradient (dark at left)"
MOD_MOKOJOOMHERO_OVERLAY_GRADIENT_RIGHT="Gradient (dark at right)"
MOD_MOKOJOOMHERO_OVERLAY_COLOR_LABEL="Overlay Color" MOD_MOKOJOOMHERO_OVERLAY_COLOR_LABEL="Overlay Color"
MOD_MOKOJOOMHERO_OVERLAY_COLOR_DESC="Background color of the overlay on top of the hero image." MOD_MOKOJOOMHERO_OVERLAY_COLOR_DESC="Background color of the overlay on top of the hero image."
MOD_MOKOJOOMHERO_OVERLAY_OPACITY_LABEL="Overlay Opacity" MOD_MOKOJOOMHERO_OVERLAY_OPACITY_LABEL="Overlay Opacity"
MOD_MOKOJOOMHERO_OVERLAY_OPACITY_DESC="Transparency of the overlay (0 = fully transparent, 1 = fully opaque)." MOD_MOKOJOOMHERO_OVERLAY_OPACITY_DESC="Transparency of the overlay (0 = fully transparent, 1 = fully opaque)."
MOD_MOKOJOOMHERO_TEXT_ALIGN_LABEL="Text Alignment" MOD_MOKOJOOMHERO_TEXT_ALIGN_LABEL="Text Alignment"
MOD_MOKOJOOMHERO_TEXT_ALIGN_DESC="Horizontal alignment of the overlay text." MOD_MOKOJOOMHERO_TEXT_ALIGN_DESC="Horizontal alignment of the overlay text."
MOD_MOKOJOOMHERO_VALIGN_LABEL="Vertical Alignment"
MOD_MOKOJOOMHERO_VALIGN_DESC="Vertical position of the content within the hero."
MOD_MOKOJOOMHERO_VALIGN_TOP="Top"
MOD_MOKOJOOMHERO_VALIGN_CENTER="Center"
MOD_MOKOJOOMHERO_VALIGN_BOTTOM="Bottom"
MOD_MOKOJOOMHERO_TEXT_COLOR_LABEL="Text Color" MOD_MOKOJOOMHERO_TEXT_COLOR_LABEL="Text Color"
MOD_MOKOJOOMHERO_TEXT_COLOR_DESC="Color of the text displayed over the hero image." MOD_MOKOJOOMHERO_TEXT_COLOR_DESC="Color of the text displayed over the hero image."
; Alignment options ; Horizontal alignment options
MOD_MOKOJOOMHERO_ALIGN_LEFT="Left" MOD_MOKOJOOMHERO_ALIGN_LEFT="Left"
MOD_MOKOJOOMHERO_ALIGN_CENTER="Center" MOD_MOKOJOOMHERO_ALIGN_CENTER="Center"
MOD_MOKOJOOMHERO_ALIGN_RIGHT="Right" MOD_MOKOJOOMHERO_ALIGN_RIGHT="Right"
+104 -3
View File
@@ -6,7 +6,7 @@
; INGROUP: MokoJoomHero.Module ; INGROUP: MokoJoomHero.Module
; REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoJoomHero ; REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoJoomHero
; PATH: /src/language/en-US/mod_mokojoomhero.sys.ini ; PATH: /src/language/en-US/mod_mokojoomhero.sys.ini
; VERSION: 01.07.00 ; VERSION: 01.21.01
; BRIEF: System language strings — used in admin Extension Manager and Module Manager (en-US) ; BRIEF: System language strings — used in admin Extension Manager and Module Manager (en-US)
MOD_MOKOJOOMHERO="Module - MokoJoomHero" MOD_MOKOJOOMHERO="Module - MokoJoomHero"
@@ -14,17 +14,36 @@ MOD_MOKOJOOMHERO_DESCRIPTION="Displays a random hero image slideshow or backgrou
; Content fieldset ; Content fieldset
MOD_MOKOJOOMHERO_FIELDSET_CONTENT="Hero Content" MOD_MOKOJOOMHERO_FIELDSET_CONTENT="Hero Content"
MOD_MOKOJOOMHERO_CONTENT_SOURCE_LABEL="Content Source"
MOD_MOKOJOOMHERO_CONTENT_SOURCE_DESC="Choose whether to enter content manually or pull from a Joomla article."
MOD_MOKOJOOMHERO_SOURCE_MANUAL="Manual Editor"
MOD_MOKOJOOMHERO_SOURCE_ARTICLE="Joomla Article"
MOD_MOKOJOOMHERO_CONTENT_LABEL="Content" MOD_MOKOJOOMHERO_CONTENT_LABEL="Content"
MOD_MOKOJOOMHERO_CONTENT_DESC="HTML content displayed on the hero. Use the editor to add headings, text, buttons, or any HTML." MOD_MOKOJOOMHERO_CONTENT_DESC="HTML content displayed on the hero. Use the editor to add headings, text, buttons, or any HTML."
MOD_MOKOJOOMHERO_ARTICLE_LABEL="Article"
MOD_MOKOJOOMHERO_ARTICLE_DESC="Select a published article to use as the hero content."
MOD_MOKOJOOMHERO_ARTICLE_SELECT="- Select Article -"
MOD_MOKOJOOMHERO_USE_ARTICLE_TITLE_LABEL="Use Article Title"
MOD_MOKOJOOMHERO_USE_ARTICLE_TITLE_DESC="Replace the module title with the selected article's title."
MOD_MOKOJOOMHERO_SHOW_CARD_LABEL="Show Card" MOD_MOKOJOOMHERO_SHOW_CARD_LABEL="Show Card"
MOD_MOKOJOOMHERO_SHOW_CARD_DESC="Wrap the content in a card with a white background and shadow." MOD_MOKOJOOMHERO_SHOW_CARD_DESC="Wrap the content in a card with a white background and shadow."
; Hero mode ; Hero mode
MOD_MOKOJOOMHERO_MODE_LABEL="Hero Mode" MOD_MOKOJOOMHERO_MODE_LABEL="Hero Mode"
MOD_MOKOJOOMHERO_MODE_DESC="Choose between a slideshow of images, an embedded video (YouTube/Vimeo), or a local video file." MOD_MOKOJOOMHERO_MODE_DESC="Choose between a slideshow of images, an embedded video (YouTube/Vimeo), a local video file, a solid color, or a gradient."
MOD_MOKOJOOMHERO_MODE_IMAGES="Images" MOD_MOKOJOOMHERO_MODE_IMAGES="Images"
MOD_MOKOJOOMHERO_MODE_VIDEO="Video (YouTube/Vimeo)" MOD_MOKOJOOMHERO_MODE_VIDEO="Video (YouTube/Vimeo)"
MOD_MOKOJOOMHERO_MODE_LOCALVIDEO="Local Video" MOD_MOKOJOOMHERO_MODE_LOCALVIDEO="Local Video"
MOD_MOKOJOOMHERO_MODE_COLOR="Solid Color"
MOD_MOKOJOOMHERO_MODE_GRADIENT="Gradient"
; Transition type
MOD_MOKOJOOMHERO_FADE_TYPE_LABEL="Transition Type"
MOD_MOKOJOOMHERO_FADE_TYPE_DESC="How images transition between slides."
MOD_MOKOJOOMHERO_FADE_CROSSFADE="Crossfade"
MOD_MOKOJOOMHERO_FADE_SLIDE="Slide"
MOD_MOKOJOOMHERO_FADE_BLACK="Fade to Black"
MOD_MOKOJOOMHERO_FADE_ZOOM="Zoom (Ken Burns)"
; Image settings ; Image settings
MOD_MOKOJOOMHERO_IMAGE_FOLDER_LABEL="Image Folder" MOD_MOKOJOOMHERO_IMAGE_FOLDER_LABEL="Image Folder"
@@ -34,6 +53,15 @@ MOD_MOKOJOOMHERO_IMAGE_COUNT_DESC="How many random images to include in the slid
MOD_MOKOJOOMHERO_SLIDE_INTERVAL_LABEL="Slide Interval (ms)" MOD_MOKOJOOMHERO_SLIDE_INTERVAL_LABEL="Slide Interval (ms)"
MOD_MOKOJOOMHERO_SLIDE_INTERVAL_DESC="Time between slides in milliseconds (e.g. 5000 = 5 seconds)." MOD_MOKOJOOMHERO_SLIDE_INTERVAL_DESC="Time between slides in milliseconds (e.g. 5000 = 5 seconds)."
; Per-slide content
MOD_MOKOJOOMHERO_SLIDE_CONTENT_LABEL="Slide Content"
MOD_MOKOJOOMHERO_SLIDE_CONTENT_DESC="Define individual slides with unique images and content."
MOD_MOKOJOOMHERO_SLIDE_IMAGE_LABEL="Image"
MOD_MOKOJOOMHERO_SLIDE_HEADING_LABEL="Heading"
MOD_MOKOJOOMHERO_SLIDE_BODY_LABEL="Body Text"
MOD_MOKOJOOMHERO_SLIDE_LINK_LABEL="Link URL"
MOD_MOKOJOOMHERO_SLIDE_LINK_TEXT_LABEL="Link Text"
; Video settings (embedded) ; Video settings (embedded)
MOD_MOKOJOOMHERO_VIDEO_FILE_LABEL="Video URL" MOD_MOKOJOOMHERO_VIDEO_FILE_LABEL="Video URL"
MOD_MOKOJOOMHERO_VIDEO_FILE_DESC="YouTube or Vimeo URL. The module auto-detects the source." MOD_MOKOJOOMHERO_VIDEO_FILE_DESC="YouTube or Vimeo URL. The module auto-detects the source."
@@ -42,31 +70,104 @@ MOD_MOKOJOOMHERO_VIDEO_FILE_DESC="YouTube or Vimeo URL. The module auto-detects
MOD_MOKOJOOMHERO_LOCAL_VIDEO_LABEL="Video File" MOD_MOKOJOOMHERO_LOCAL_VIDEO_LABEL="Video File"
MOD_MOKOJOOMHERO_LOCAL_VIDEO_DESC="Select a video file from the Media Manager (mp4, webm, ogg)." MOD_MOKOJOOMHERO_LOCAL_VIDEO_DESC="Select a video file from the Media Manager (mp4, webm, ogg)."
; Content animation
MOD_MOKOJOOMHERO_CONTENT_ANIM_LABEL="Content Animation"
MOD_MOKOJOOMHERO_CONTENT_ANIM_DESC="Entrance animation for the overlay content when the hero scrolls into view."
MOD_MOKOJOOMHERO_CONTENT_ANIM_DELAY_LABEL="Animation Delay (ms)"
MOD_MOKOJOOMHERO_CONTENT_ANIM_DELAY_DESC="Delay before the content animation starts."
MOD_MOKOJOOMHERO_ANIM_NONE="None"
MOD_MOKOJOOMHERO_ANIM_FADE_IN="Fade In"
MOD_MOKOJOOMHERO_ANIM_SLIDE_UP="Slide Up"
MOD_MOKOJOOMHERO_ANIM_SLIDE_LEFT="Slide from Right"
MOD_MOKOJOOMHERO_ANIM_SLIDE_RIGHT="Slide from Left"
; Card delay ; Card delay
MOD_MOKOJOOMHERO_CARD_DELAY_LABEL="Card Fade-in Delay (ms)" MOD_MOKOJOOMHERO_CARD_DELAY_LABEL="Card Fade-in Delay (ms)"
MOD_MOKOJOOMHERO_CARD_DELAY_DESC="Delay in milliseconds before the content card fades in. Set to 0 for no delay." MOD_MOKOJOOMHERO_CARD_DELAY_DESC="Delay in milliseconds before the content card fades in. Set to 0 for no delay."
; Parallax
MOD_MOKOJOOMHERO_PARALLAX_LABEL="Parallax Effect"
MOD_MOKOJOOMHERO_PARALLAX_DESC="Background moves at a slower rate than page content on scroll."
MOD_MOKOJOOMHERO_PARALLAX_SPEED_LABEL="Parallax Speed"
MOD_MOKOJOOMHERO_PARALLAX_SPEED_DESC="How much the background moves relative to scroll (0.1 = subtle, 0.9 = dramatic)."
; A/B testing
MOD_MOKOJOOMHERO_FIELDSET_AB="A/B Testing"
MOD_MOKOJOOMHERO_AB_ENABLED_LABEL="Enable A/B Testing"
MOD_MOKOJOOMHERO_AB_ENABLED_DESC="Randomly show different content variations to visitors."
MOD_MOKOJOOMHERO_AB_VARIATIONS_LABEL="Variations"
MOD_MOKOJOOMHERO_AB_VARIATIONS_DESC="Define content variations with relative weights."
MOD_MOKOJOOMHERO_AB_VAR_LABEL="Label"
MOD_MOKOJOOMHERO_AB_VAR_CONTENT="Content"
MOD_MOKOJOOMHERO_AB_VAR_WEIGHT="Weight"
; Scheduling
MOD_MOKOJOOMHERO_FIELDSET_SCHEDULING="Scheduling"
MOD_MOKOJOOMHERO_SCHEDULE_ENABLED_LABEL="Enable Scheduling"
MOD_MOKOJOOMHERO_SCHEDULE_ENABLED_DESC="Only display the hero during a specific date/time range."
MOD_MOKOJOOMHERO_SCHEDULE_START_LABEL="Start Date/Time"
MOD_MOKOJOOMHERO_SCHEDULE_START_DESC="The hero will not display before this date and time."
MOD_MOKOJOOMHERO_SCHEDULE_END_LABEL="End Date/Time"
MOD_MOKOJOOMHERO_SCHEDULE_END_DESC="The hero will not display after this date and time."
; Video poster
MOD_MOKOJOOMHERO_VIDEO_POSTER_LABEL="Video Poster Image"
MOD_MOKOJOOMHERO_VIDEO_POSTER_DESC="Fallback image displayed while the video loads."
; Scroll indicator
MOD_MOKOJOOMHERO_SCROLL_INDICATOR_LABEL="Show Scroll Indicator"
MOD_MOKOJOOMHERO_SCROLL_INDICATOR_DESC="Show an animated down-arrow at the bottom of the hero prompting users to scroll."
; Mute toggle ; Mute toggle
MOD_MOKOJOOMHERO_MUTE_TOGGLE_LABEL="Show Mute Toggle" MOD_MOKOJOOMHERO_MUTE_TOGGLE_LABEL="Show Mute Toggle"
MOD_MOKOJOOMHERO_MUTE_TOGGLE_DESC="Show a mute/unmute button on the hero video. Videos always start muted (required for autoplay)." MOD_MOKOJOOMHERO_MUTE_TOGGLE_DESC="Show a mute/unmute button on the hero video. Videos always start muted (required for autoplay)."
; Solid color background
MOD_MOKOJOOMHERO_BG_COLOR_LABEL="Background Color"
MOD_MOKOJOOMHERO_BG_COLOR_DESC="Solid background color for the hero section."
; Gradient background
MOD_MOKOJOOMHERO_GRADIENT_START_LABEL="Gradient Start Color"
MOD_MOKOJOOMHERO_GRADIENT_START_DESC="Starting color of the gradient."
MOD_MOKOJOOMHERO_GRADIENT_END_LABEL="Gradient End Color"
MOD_MOKOJOOMHERO_GRADIENT_END_DESC="Ending color of the gradient."
MOD_MOKOJOOMHERO_GRADIENT_ANGLE_LABEL="Gradient Angle"
MOD_MOKOJOOMHERO_GRADIENT_ANGLE_DESC="Direction of the gradient in degrees (0 = bottom to top, 90 = left to right, 135 = diagonal)."
; Hero height ; Hero height
MOD_MOKOJOOMHERO_HERO_HEIGHT_LABEL="Hero Height" MOD_MOKOJOOMHERO_HERO_HEIGHT_LABEL="Hero Height"
MOD_MOKOJOOMHERO_HERO_HEIGHT_DESC="Height of the hero section. Use px for fixed pixels (e.g. 400px) or vh for viewport height (e.g. 60vh for 60% of screen)." MOD_MOKOJOOMHERO_HERO_HEIGHT_DESC="Height of the hero section. Use px for fixed pixels (e.g. 400px) or vh for viewport height (e.g. 60vh for 60% of screen)."
MOD_MOKOJOOMHERO_HERO_HEIGHT_HINT="e.g. 60vh or 400px" MOD_MOKOJOOMHERO_HERO_HEIGHT_HINT="e.g. 60vh or 400px"
; Hero height (mobile)
MOD_MOKOJOOMHERO_HERO_HEIGHT_MOBILE_LABEL="Mobile Hero Height"
MOD_MOKOJOOMHERO_HERO_HEIGHT_MOBILE_DESC="Height of the hero on mobile devices. Leave empty for auto height."
MOD_MOKOJOOMHERO_HERO_HEIGHT_MOBILE_HINT="e.g. 40vh or 300px (empty = auto)"
; Overlay fieldset ; Overlay fieldset
MOD_MOKOJOOMHERO_FIELDSET_OVERLAY="Overlay &amp; Text" MOD_MOKOJOOMHERO_FIELDSET_OVERLAY="Overlay &amp; Text"
MOD_MOKOJOOMHERO_OVERLAY_TYPE_LABEL="Overlay Type"
MOD_MOKOJOOMHERO_OVERLAY_TYPE_DESC="How the overlay is applied. Solid fills evenly; gradient fades from transparent to opaque in the chosen direction."
MOD_MOKOJOOMHERO_OVERLAY_SOLID="Solid"
MOD_MOKOJOOMHERO_OVERLAY_GRADIENT_BOTTOM="Gradient (dark at bottom)"
MOD_MOKOJOOMHERO_OVERLAY_GRADIENT_TOP="Gradient (dark at top)"
MOD_MOKOJOOMHERO_OVERLAY_GRADIENT_LEFT="Gradient (dark at left)"
MOD_MOKOJOOMHERO_OVERLAY_GRADIENT_RIGHT="Gradient (dark at right)"
MOD_MOKOJOOMHERO_OVERLAY_COLOR_LABEL="Overlay Color" MOD_MOKOJOOMHERO_OVERLAY_COLOR_LABEL="Overlay Color"
MOD_MOKOJOOMHERO_OVERLAY_COLOR_DESC="Background color of the overlay on top of the hero image." MOD_MOKOJOOMHERO_OVERLAY_COLOR_DESC="Background color of the overlay on top of the hero image."
MOD_MOKOJOOMHERO_OVERLAY_OPACITY_LABEL="Overlay Opacity" MOD_MOKOJOOMHERO_OVERLAY_OPACITY_LABEL="Overlay Opacity"
MOD_MOKOJOOMHERO_OVERLAY_OPACITY_DESC="Transparency of the overlay (0 = fully transparent, 1 = fully opaque)." MOD_MOKOJOOMHERO_OVERLAY_OPACITY_DESC="Transparency of the overlay (0 = fully transparent, 1 = fully opaque)."
MOD_MOKOJOOMHERO_TEXT_ALIGN_LABEL="Text Alignment" MOD_MOKOJOOMHERO_TEXT_ALIGN_LABEL="Text Alignment"
MOD_MOKOJOOMHERO_TEXT_ALIGN_DESC="Horizontal alignment of the overlay text." MOD_MOKOJOOMHERO_TEXT_ALIGN_DESC="Horizontal alignment of the overlay text."
MOD_MOKOJOOMHERO_VALIGN_LABEL="Vertical Alignment"
MOD_MOKOJOOMHERO_VALIGN_DESC="Vertical position of the content within the hero."
MOD_MOKOJOOMHERO_VALIGN_TOP="Top"
MOD_MOKOJOOMHERO_VALIGN_CENTER="Center"
MOD_MOKOJOOMHERO_VALIGN_BOTTOM="Bottom"
MOD_MOKOJOOMHERO_TEXT_COLOR_LABEL="Text Color" MOD_MOKOJOOMHERO_TEXT_COLOR_LABEL="Text Color"
MOD_MOKOJOOMHERO_TEXT_COLOR_DESC="Color of the text displayed over the hero image." MOD_MOKOJOOMHERO_TEXT_COLOR_DESC="Color of the text displayed over the hero image."
; Alignment options ; Horizontal alignment options
MOD_MOKOJOOMHERO_ALIGN_LEFT="Left" MOD_MOKOJOOMHERO_ALIGN_LEFT="Left"
MOD_MOKOJOOMHERO_ALIGN_CENTER="Center" MOD_MOKOJOOMHERO_ALIGN_CENTER="Center"
MOD_MOKOJOOMHERO_ALIGN_RIGHT="Right" MOD_MOKOJOOMHERO_ALIGN_RIGHT="Right"
+1
View File
@@ -0,0 +1 @@
<html><body bgcolor="#FFFFFF"></body></html>
+1
View File
@@ -0,0 +1 @@
<html><body bgcolor="#FFFFFF"></body></html>
+196 -7
View File
@@ -6,9 +6,9 @@
* DEFGROUP: MokoJoomHero.Module.Assets * DEFGROUP: MokoJoomHero.Module.Assets
* INGROUP: MokoJoomHero.Module * INGROUP: MokoJoomHero.Module
* REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoJoomHero * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoJoomHero
* PATH: /src/css/template.css * PATH: /src/media/css/mod_mokojoomhero.css
* VERSION: 01.07.00 * VERSION: 01.21.01
* BRIEF: Hero module stylesheet slideshow, video background, overlay * BRIEF: Hero module stylesheet slideshow, video, colour/gradient, overlay, card, mute toggle, responsive
*/ */
/* ============================================================ /* ============================================================
@@ -23,7 +23,15 @@
} }
/* ============================================================ /* ============================================================
Image slides Solid colour / gradient background
============================================================ */
.mokojoomhero__color {
position: absolute;
inset: 0;
}
/* ============================================================
Image slides base
============================================================ */ ============================================================ */
.mokojoomhero__slide { .mokojoomhero__slide {
position: absolute; position: absolute;
@@ -32,13 +40,51 @@
background-position: center; background-position: center;
background-repeat: no-repeat; background-repeat: no-repeat;
opacity: 0; opacity: 0;
transition: opacity 1s ease;
} }
.mokojoomhero__slide--active { .mokojoomhero__slide--active {
opacity: 1; opacity: 1;
} }
/* ── Crossfade (default) ── */
.mokojoomhero[data-transition="crossfade"] .mokojoomhero__slide {
transition: opacity 1s ease;
}
/* ── Slide ── */
.mokojoomhero[data-transition="slide"] .mokojoomhero__slide {
opacity: 1;
transform: translateX(100%);
transition: transform 0.8s ease;
}
.mokojoomhero[data-transition="slide"] .mokojoomhero__slide--active {
transform: translateX(0);
}
.mokojoomhero[data-transition="slide"] .mokojoomhero__slide--exit {
transform: translateX(-100%);
}
/* ── Fade to black ── */
.mokojoomhero[data-transition="fade-black"] .mokojoomhero__slide {
transition: opacity 0.6s ease;
}
/* ── Zoom (Ken Burns) ── */
.mokojoomhero[data-transition="zoom"] .mokojoomhero__slide {
transition: opacity 1s ease;
}
.mokojoomhero[data-transition="zoom"] .mokojoomhero__slide--active {
animation: mokojoomhero-zoom 8s ease forwards;
}
@keyframes mokojoomhero-zoom {
from { transform: scale(1); }
to { transform: scale(1.08); }
}
/* ============================================================ /* ============================================================
Video background Video background
============================================================ */ ============================================================ */
@@ -75,7 +121,6 @@ iframe.mokojoomhero__video {
position: relative; position: relative;
z-index: 1; z-index: 1;
display: flex; display: flex;
align-items: center;
justify-content: center; justify-content: center;
width: 100%; width: 100%;
height: 100%; height: 100%;
@@ -165,12 +210,147 @@ iframe.mokojoomhero__video {
background: rgba(0, 0, 0, 0.7); background: rgba(0, 0, 0, 0.7);
} }
/* ============================================================
Video poster image
============================================================ */
.mokojoomhero__poster {
position: absolute;
inset: 0;
background-size: cover;
background-position: center;
background-repeat: no-repeat;
}
/* ============================================================
Scroll-down indicator
============================================================ */
.mokojoomhero__scroll-indicator {
position: absolute;
bottom: 1.5rem;
left: 50%;
transform: translateX(-50%);
z-index: 2;
background: none;
border: none;
color: #fff;
cursor: pointer;
padding: 0;
opacity: 0.8;
transition: opacity 0.3s;
animation: mokojoomhero-bounce 2s infinite;
}
.mokojoomhero__scroll-indicator:hover {
opacity: 1;
}
.mokojoomhero__scroll-indicator--hidden {
display: none;
}
@keyframes mokojoomhero-bounce {
0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
40% { transform: translateX(-50%) translateY(-8px); }
60% { transform: translateX(-50%) translateY(-4px); }
}
/* ============================================================
Content entrance animations
============================================================ */
.mokojoomhero__content[class*="mokojoomhero__content--anim-"] {
opacity: 0;
}
.mokojoomhero__content--anim-fade-in.mokojoomhero__content--visible {
animation: mokojoomhero-anim-fade-in 0.8s ease forwards;
}
.mokojoomhero__content--anim-slide-up.mokojoomhero__content--visible {
animation: mokojoomhero-anim-slide-up 0.8s ease forwards;
}
.mokojoomhero__content--anim-slide-left.mokojoomhero__content--visible {
animation: mokojoomhero-anim-slide-left 0.8s ease forwards;
}
.mokojoomhero__content--anim-slide-right.mokojoomhero__content--visible {
animation: mokojoomhero-anim-slide-right 0.8s ease forwards;
}
@keyframes mokojoomhero-anim-fade-in {
from { opacity: 0; }
to { opacity: 1; }
}
@keyframes mokojoomhero-anim-slide-up {
from { opacity: 0; transform: translateY(30px); }
to { opacity: 1; transform: translateY(0); }
}
@keyframes mokojoomhero-anim-slide-left {
from { opacity: 0; transform: translateX(30px); }
to { opacity: 1; transform: translateX(0); }
}
@keyframes mokojoomhero-anim-slide-right {
from { opacity: 0; transform: translateX(-30px); }
to { opacity: 1; transform: translateX(0); }
}
/* ============================================================
Parallax
============================================================ */
.mokojoomhero[data-parallax] .mokojoomhero__slide,
.mokojoomhero[data-parallax] .mokojoomhero__color,
.mokojoomhero[data-parallax] .mokojoomhero__poster,
.mokojoomhero[data-parallax] video.mokojoomhero__video,
.mokojoomhero[data-parallax] iframe.mokojoomhero__video {
will-change: transform;
}
/* ============================================================
Reduced motion WCAG 2.1 AA (SC 2.3.3)
============================================================ */
@media (prefers-reduced-motion: reduce) {
.mokojoomhero__slide {
transition: none !important;
animation: none !important;
}
.mokojoomhero__card[data-card-delay] {
opacity: 1;
animation: none !important;
}
.mokojoomhero__scroll-indicator {
animation: none;
}
.mokojoomhero[data-transition="zoom"] .mokojoomhero__slide--active {
animation: none !important;
}
.mokojoomhero__content[class*="mokojoomhero__content--anim-"] {
opacity: 1;
animation: none !important;
}
.mokojoomhero[data-parallax] .mokojoomhero__slide,
.mokojoomhero[data-parallax] .mokojoomhero__color,
.mokojoomhero[data-parallax] .mokojoomhero__poster,
.mokojoomhero[data-parallax] video.mokojoomhero__video,
.mokojoomhero[data-parallax] iframe.mokojoomhero__video {
will-change: auto;
transform: none !important;
}
}
/* ============================================================ /* ============================================================
Responsive Responsive
============================================================ */ ============================================================ */
@media (max-width: 768px) { @media (max-width: 768px) {
.mokojoomhero { .mokojoomhero {
height: auto !important; height: var(--mokojoomhero-mobile-height, auto) !important;
} }
.mokojoomhero__video, .mokojoomhero__video,
@@ -178,8 +358,17 @@ iframe.mokojoomhero__video {
display: none; display: none;
} }
/* Keep colour/gradient backgrounds visible on mobile */
.mokojoomhero__color {
position: relative;
}
.mokojoomhero__overlay { .mokojoomhero__overlay {
padding: 1rem; padding: 1rem;
}
/* Only clear overlay background when media is hidden (image/video modes) */
.mokojoomhero:not(:has(.mokojoomhero__color)) .mokojoomhero__overlay {
background-color: transparent !important; background-color: transparent !important;
} }
+1
View File
@@ -0,0 +1 @@
<html><body bgcolor="#FFFFFF"></body></html>
+1
View File
@@ -0,0 +1 @@
<html><body bgcolor="#FFFFFF"></body></html>
+199 -19
View File
@@ -7,9 +7,9 @@
* DEFGROUP: MokoJoomHero.Module.Assets * DEFGROUP: MokoJoomHero.Module.Assets
* INGROUP: MokoJoomHero.Module * INGROUP: MokoJoomHero.Module
* REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoJoomHero * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoJoomHero
* PATH: /src/js/template.js * PATH: /src/media/js/mod_mokojoomhero.js
* VERSION: 01.07.00 * VERSION: 01.21.01
* BRIEF: Hero module JavaScript image slideshow crossfade * BRIEF: Hero module JavaScript slideshow crossfade, video viewport control, mute toggle
*/ */
'use strict'; 'use strict';
@@ -20,25 +20,114 @@ document.addEventListener('DOMContentLoaded', function () {
return; return;
} }
var prefersReducedMotion = window.matchMedia('(prefers-reduced-motion: reduce)').matches;
// ── Image slideshow ── // ── Image slideshow ──
document.querySelectorAll('.mokojoomhero[data-slides]').forEach(function (hero) { document.querySelectorAll('.mokojoomhero[data-slides]').forEach(function (hero) {
var slides = hero.querySelectorAll('.mokojoomhero__slide'); var slides = hero.querySelectorAll('.mokojoomhero__slide');
var interval = parseInt(hero.dataset.interval, 10) || 5000; var interval = parseInt(hero.dataset.interval, 10) || 5000;
var current = 0; var transition = hero.dataset.transition || 'crossfade';
var current = 0;
if (slides.length < 2) { // Per-slide content data
var slideContentData = null;
var contentEl = hero.querySelector('.mokojoomhero__content');
if (hero.dataset.slideContent) {
try {
slideContentData = JSON.parse(hero.dataset.slideContent);
} catch (e) {
console.warn('MokoJoomHero: Failed to parse slide content data:', e.message);
slideContentData = null;
}
}
if (slides.length < 2 || prefersReducedMotion) {
return; return;
} }
setInterval(function () { function updateSlideContent(index) {
slides[current].classList.remove('mokojoomhero__slide--active'); if (!slideContentData || !slideContentData[index] || !contentEl) {
slides[current].setAttribute('aria-hidden', 'true'); return;
}
var data = slideContentData[index];
var card = contentEl.querySelector('.mokojoomhero__card');
var target = card || contentEl;
// Clear existing content safely
while (target.firstChild) {
target.removeChild(target.firstChild);
}
if (data.heading) {
var h2 = document.createElement('h2');
h2.className = 'mokojoomhero__title';
h2.textContent = data.heading;
target.appendChild(h2);
}
if (data.body) {
var p = document.createElement('p');
p.textContent = data.body;
target.appendChild(p);
}
if (data.link && data.linkText) {
var linkP = document.createElement('p');
var a = document.createElement('a');
a.href = data.link;
a.className = 'btn btn-primary';
a.textContent = data.linkText;
linkP.appendChild(a);
target.appendChild(linkP);
}
}
function advanceSlide() {
var prev = current;
current = (current + 1) % slides.length; current = (current + 1) % slides.length;
slides[current].classList.add('mokojoomhero__slide--active'); if (transition === 'slide') {
slides[current].setAttribute('aria-hidden', 'false'); slides[prev].classList.add('mokojoomhero__slide--exit');
}, interval); slides[prev].classList.remove('mokojoomhero__slide--active');
slides[prev].setAttribute('aria-hidden', 'true');
slides[current].classList.add('mokojoomhero__slide--active');
slides[current].setAttribute('aria-hidden', 'false');
// Reset exiting slide after transition completes
setTimeout(function () {
slides[prev].classList.remove('mokojoomhero__slide--exit');
}, 800);
} else if (transition === 'fade-black') {
// Phase 1: fade out current
slides[prev].classList.remove('mokojoomhero__slide--active');
slides[prev].setAttribute('aria-hidden', 'true');
// Phase 2: fade in next after a brief black gap
setTimeout(function () {
slides[current].classList.add('mokojoomhero__slide--active');
slides[current].setAttribute('aria-hidden', 'false');
}, 600);
} else {
// Crossfade and zoom use the same JS logic
slides[prev].classList.remove('mokojoomhero__slide--active');
slides[prev].setAttribute('aria-hidden', 'true');
slides[current].classList.add('mokojoomhero__slide--active');
slides[current].setAttribute('aria-hidden', 'false');
}
updateSlideContent(current);
}
// Set initial slide content
updateSlideContent(0);
setInterval(advanceSlide, interval);
}); });
// ── Pause/resume videos when out of viewport ── // ── Pause/resume videos when out of viewport ──
@@ -55,9 +144,14 @@ document.addEventListener('DOMContentLoaded', function () {
if (entry.isIntersecting) { if (entry.isIntersecting) {
// Resume // Resume
if (video) { if (video) {
video.play(); var playPromise = video.play();
if (playPromise !== undefined) {
playPromise.catch(function () {
// Autoplay blocked by browser policy — not actionable
});
}
} }
if (iframe) { if (iframe && iframe.contentWindow) {
var src = iframe.src || ''; var src = iframe.src || '';
if (src.indexOf('youtube') !== -1) { if (src.indexOf('youtube') !== -1) {
iframe.contentWindow.postMessage('{"event":"command","func":"playVideo","args":""}', '*'); iframe.contentWindow.postMessage('{"event":"command","func":"playVideo","args":""}', '*');
@@ -70,7 +164,7 @@ document.addEventListener('DOMContentLoaded', function () {
if (video) { if (video) {
video.pause(); video.pause();
} }
if (iframe) { if (iframe && iframe.contentWindow) {
var src = iframe.src || ''; var src = iframe.src || '';
if (src.indexOf('youtube') !== -1) { if (src.indexOf('youtube') !== -1) {
iframe.contentWindow.postMessage('{"event":"command","func":"pauseVideo","args":""}', '*'); iframe.contentWindow.postMessage('{"event":"command","func":"pauseVideo","args":""}', '*');
@@ -86,9 +180,92 @@ document.addEventListener('DOMContentLoaded', function () {
observer.observe(hero); observer.observe(hero);
}); });
// ── Content entrance animations ──
if (!prefersReducedMotion) {
var animObserver = new IntersectionObserver(function (entries) {
entries.forEach(function (entry) {
if (entry.isIntersecting) {
entry.target.classList.add('mokojoomhero__content--visible');
animObserver.unobserve(entry.target);
}
});
}, { threshold: 0.2 });
document.querySelectorAll('.mokojoomhero__content[class*="mokojoomhero__content--anim-"]').forEach(function (el) {
animObserver.observe(el);
});
}
// ── Parallax scroll ──
if (!prefersReducedMotion) {
var parallaxHeroes = document.querySelectorAll('.mokojoomhero[data-parallax]');
if (parallaxHeroes.length) {
var onScroll = function () {
parallaxHeroes.forEach(function (hero) {
var rect = hero.getBoundingClientRect();
var speed = parseFloat(hero.dataset.parallax) || 0.5;
if (rect.bottom > 0 && rect.top < window.innerHeight) {
var offset = Math.round(rect.top * speed * -1);
var bg = hero.querySelector('.mokojoomhero__slide, .mokojoomhero__color, .mokojoomhero__poster, video.mokojoomhero__video');
if (bg) {
bg.style.transform = 'translateY(' + offset + 'px)';
}
var iframe = hero.querySelector('iframe.mokojoomhero__video');
if (iframe) {
iframe.style.transform = 'translate(-50%, calc(-50% + ' + offset + 'px))';
}
}
});
};
window.addEventListener('scroll', onScroll, { passive: true });
onScroll();
}
}
// ── Scroll-down indicator ──
document.querySelectorAll('.mokojoomhero__scroll-indicator').forEach(function (btn) {
var hero = btn.closest('.mokojoomhero');
if (!hero) {
return;
}
btn.addEventListener('click', function () {
var nextEl = hero.nextElementSibling || hero.parentElement.nextElementSibling;
if (nextEl) {
nextEl.scrollIntoView({ behavior: prefersReducedMotion ? 'auto' : 'smooth' });
}
});
// Hide indicator once hero scrolls out of view
var scrollObserver = new IntersectionObserver(function (entries) {
entries.forEach(function (entry) {
if (!entry.isIntersecting) {
btn.classList.add('mokojoomhero__scroll-indicator--hidden');
} else {
btn.classList.remove('mokojoomhero__scroll-indicator--hidden');
}
});
}, { threshold: 0.1 });
scrollObserver.observe(hero);
});
// ── Mute/unmute toggle ── // ── Mute/unmute toggle ──
document.querySelectorAll('.mokojoomhero__mute-toggle').forEach(function (btn) { document.querySelectorAll('.mokojoomhero__mute-toggle').forEach(function (btn) {
var hero = btn.closest('.mokojoomhero'); var hero = btn.closest('.mokojoomhero');
if (!hero) {
return;
}
var video = hero.querySelector('video.mokojoomhero__video'); var video = hero.querySelector('video.mokojoomhero__video');
var iframe = hero.querySelector('iframe.mokojoomhero__video'); var iframe = hero.querySelector('iframe.mokojoomhero__video');
var icon = btn.querySelector('.mokojoomhero__mute-icon'); var icon = btn.querySelector('.mokojoomhero__mute-icon');
@@ -99,7 +276,7 @@ document.addEventListener('DOMContentLoaded', function () {
if (video) { if (video) {
video.muted = !muted; video.muted = !muted;
} }
if (iframe) { if (iframe && iframe.contentWindow) {
var src = iframe.src || ''; var src = iframe.src || '';
if (src.indexOf('youtube') !== -1) { if (src.indexOf('youtube') !== -1) {
var func = muted ? 'unMute' : 'mute'; var func = muted ? 'unMute' : 'mute';
@@ -112,7 +289,10 @@ document.addEventListener('DOMContentLoaded', function () {
btn.setAttribute('data-muted', muted ? 'false' : 'true'); btn.setAttribute('data-muted', muted ? 'false' : 'true');
btn.setAttribute('aria-label', muted ? 'Mute video' : 'Unmute video'); btn.setAttribute('aria-label', muted ? 'Mute video' : 'Unmute video');
icon.textContent = muted ? '\u{1F50A}' : '\u{1F507}';
if (icon) {
icon.textContent = muted ? '\u{1F50A}' : '\u{1F507}';
}
}); });
}); });
}); });
+255 -35
View File
@@ -6,6 +6,7 @@
* *
* @copyright Copyright (C) 2026 Moko Consulting. All rights reserved. * @copyright Copyright (C) 2026 Moko Consulting. All rights reserved.
* @license GPL-3.0-or-later * @license GPL-3.0-or-later
* SPDX-License-Identifier: GPL-3.0-or-later
*/ */
defined('_JEXEC') or die; defined('_JEXEC') or die;
@@ -22,48 +23,206 @@ $wa = $app->getDocument()->getWebAssetManager();
$wa->getRegistry()->addExtensionRegistryFile('mod_mokojoomhero'); $wa->getRegistry()->addExtensionRegistryFile('mod_mokojoomhero');
$wa->usePreset('mod_mokojoomhero'); $wa->usePreset('mod_mokojoomhero');
// Schedule check — skip rendering if outside the configured date range
$scheduleEnabled = (bool) $params->get('scheduleEnabled', 0);
if ($scheduleEnabled) {
$now = new \DateTime('now', new \DateTimeZone($app->get('offset', 'UTC')));
$scheduleStart = $params->get('scheduleStart', '');
$scheduleEnd = $params->get('scheduleEnd', '');
if ($scheduleStart) {
$start = new \DateTime($scheduleStart, new \DateTimeZone($app->get('offset', 'UTC')));
if ($now < $start) {
return;
}
}
if ($scheduleEnd) {
$end = new \DateTime($scheduleEnd, new \DateTimeZone($app->get('offset', 'UTC')));
if ($now > $end) {
return;
}
}
}
// A/B testing — weighted random variation, session-sticky per module instance
$abEnabled = (bool) $params->get('abEnabled', 0);
$abVariationContent = '';
if ($abEnabled) {
$abVariations = $params->get('abVariations', '');
$abData = is_string($abVariations) ? json_decode($abVariations, true) : (array) $abVariations;
if (is_array($abData) && count($abData) > 0) {
$session = \Joomla\CMS\Factory::getSession();
$sessionKey = 'mokojoomhero.ab.' . $module->id;
$picked = $session->get($sessionKey, null);
if ($picked === null || !isset($abData[$picked])) {
// Weighted random selection
$totalWeight = 0;
foreach ($abData as $v) {
$totalWeight += (int) (((array) $v)['weight'] ?? 50);
}
$rand = mt_rand(1, max($totalWeight, 1));
$cumulative = 0;
$picked = 0;
foreach ($abData as $i => $v) {
$cumulative += (int) (((array) $v)['weight'] ?? 50);
if ($rand <= $cumulative) {
$picked = $i;
break;
}
}
$session->set($sessionKey, $picked);
}
$variation = (array) ($abData[$picked] ?? []);
$abVariationContent = $variation['content'] ?? '';
}
}
// Module parameters // Module parameters
$heroMode = $params->get('heroMode', 'images'); $heroMode = $params->get('heroMode', 'images');
$imageFolder = $params->get('imageFolder', 'images/heroes'); $imageFolder = $params->get('imageFolder', 'images/heroes');
$imageCount = (int) $params->get('imageCount', 5); $imageCount = (int) $params->get('imageCount', 5);
$slideInterval = (int) $params->get('slideInterval', 5000); $slideInterval = (int) $params->get('slideInterval', 5000);
$fadeType = $params->get('fadeType', 'crossfade');
$videoFile = $params->get('videoFile', ''); $videoFile = $params->get('videoFile', '');
$heroHeight = $params->get('heroHeight', '60vh'); $heroHeight = $params->get('heroHeight', '60vh');
$heroHeightMobile = $params->get('heroHeightMobile', '');
$overlayColor = $params->get('overlayColor', '#000000'); $overlayColor = $params->get('overlayColor', '#000000');
$overlayType = $params->get('overlayType', 'solid');
$overlayOpacity = (float) $params->get('overlayOpacity', 0.5); $overlayOpacity = (float) $params->get('overlayOpacity', 0.5);
$textAlign = $params->get('textAlign', 'center'); $textAlign = $params->get('textAlign', 'center');
$verticalAlign = $params->get('verticalAlign', 'center');
$textColor = $params->get('textColor', '#ffffff'); $textColor = $params->get('textColor', '#ffffff');
$heroContent = $params->get('heroContent', ''); $contentSource = $params->get('contentSource', 'manual');
$articleId = (int) $params->get('articleId', 0);
$useArticleTitle = (bool) $params->get('useArticleTitle', 0);
$heroContent = $params->get('heroContent', '');
$slideContent = $params->get('slideContent', '');
$showCard = (bool) $params->get('showCard', 1); $showCard = (bool) $params->get('showCard', 1);
$cardDelay = (int) $params->get('cardDelay', 0); $cardDelay = (int) $params->get('cardDelay', 0);
$showMuteToggle = (bool) $params->get('showMuteToggle', 0); $contentAnimation = $params->get('contentAnimation', 'none');
$localVideoFile = $params->get('localVideoFile', ''); $contentAnimationDelay = (int) $params->get('contentAnimationDelay', 0);
$parallaxEnabled = (bool) $params->get('parallaxEnabled', 0);
$parallaxSpeed = (float) $params->get('parallaxSpeed', 0.5);
$showMuteToggle = (bool) $params->get('showMuteToggle', 0);
$videoPoster = $params->get('videoPoster', '');
$showScrollIndicator = (bool) $params->get('showScrollIndicator', 0);
$localVideoFile = $params->get('localVideoFile', '');
$bgColor = $params->get('bgColor', '#003366');
$gradientStart = $params->get('gradientStart', '#003366');
$gradientEnd = $params->get('gradientEnd', '#006699');
$gradientAngle = (int) $params->get('gradientAngle', 135);
// Validate CSS height values to prevent injection
if (!preg_match('/^\d+(\.\d+)?(px|vh|vw|em|rem|%)$/', $heroHeight)) {
$heroHeight = '60vh';
}
if ($heroHeightMobile && !preg_match('/^\d+(\.\d+)?(px|vh|vw|em|rem|%)$/', $heroHeightMobile)) {
$heroHeightMobile = '';
}
// Validate hex colour values
$hexColorPattern = '/^#[0-9a-fA-F]{6}$/';
if (!preg_match($hexColorPattern, $overlayColor)) {
$overlayColor = '#000000';
}
if (!preg_match($hexColorPattern, $textColor)) {
$textColor = '#ffffff';
}
if (!preg_match($hexColorPattern, $bgColor)) {
$bgColor = '#003366';
}
if (!preg_match($hexColorPattern, $gradientStart)) {
$gradientStart = '#003366';
}
if (!preg_match($hexColorPattern, $gradientEnd)) {
$gradientEnd = '#006699';
}
// Validate allowlist values
$allowedTextAlign = ['left', 'center', 'right'];
if (!in_array($textAlign, $allowedTextAlign, true)) {
$textAlign = 'center';
}
$allowedFadeTypes = ['crossfade', 'slide', 'fade-black', 'zoom'];
if (!in_array($fadeType, $allowedFadeTypes, true)) {
$fadeType = 'crossfade';
}
$allowedOverlayTypes = ['solid', 'gradient-bottom', 'gradient-top', 'gradient-left', 'gradient-right'];
if (!in_array($overlayType, $allowedOverlayTypes, true)) {
$overlayType = 'solid';
}
$allowedContentAnimations = ['none', 'fade-in', 'slide-up', 'slide-left', 'slide-right'];
if (!in_array($contentAnimation, $allowedContentAnimations, true)) {
$contentAnimation = 'none';
}
$parallaxSpeed = max(0.1, min(0.9, $parallaxSpeed));
$gradientAngle = max(0, min(360, $gradientAngle));
// Apply A/B variation content if active
if ($abEnabled && $abVariationContent) {
$heroContent = $abVariationContent;
}
// Collect hero images // Collect hero images
$heroImages = []; $heroImages = [];
if ($heroMode === 'images') { if ($heroMode === 'images') {
$folderPath = JPATH_ROOT . '/' . ltrim($imageFolder, '/'); $folderPath = JPATH_ROOT . '/' . ltrim($imageFolder, '/');
if (is_dir($folderPath)) { if (is_dir($folderPath)) {
$allowed = ['jpg', 'jpeg', 'png', 'gif', 'webp', 'avif', 'svg']; try {
$all = []; $allowed = ['jpg', 'jpeg', 'png', 'gif', 'webp', 'avif', 'svg'];
$all = [];
foreach (new DirectoryIterator($folderPath) as $file) { foreach (new DirectoryIterator($folderPath) as $file) {
if ($file->isFile() && in_array(strtolower($file->getExtension()), $allowed, true)) { if ($file->isFile() && in_array(strtolower($file->getExtension()), $allowed, true)) {
$all[] = $file->getFilename(); $all[] = $file->getFilename();
} }
} }
if ($all) { if ($all) {
shuffle($all); shuffle($all);
$picked = array_slice($all, 0, min($imageCount, 5)); $picked = array_slice($all, 0, min($imageCount, 5));
foreach ($picked as $filename) { foreach ($picked as $filename) {
$heroImages[] = Uri::root() . $imageFolder . '/' . $filename; $heroImages[] = Uri::root() . $imageFolder . '/' . $filename;
} }
} }
} } catch (\UnexpectedValueException $e) {
\Joomla\CMS\Log\Log::add(
'MokoJoomHero: Cannot read image folder "' . $folderPath . '": ' . $e->getMessage(),
\Joomla\CMS\Log\Log::WARNING,
'mod_mokojoomhero'
);
}
}
} }
// Build video URL — smartly detect YouTube, Vimeo, or local/direct file // Build video URL — smartly detect YouTube, Vimeo, or local/direct file
@@ -72,23 +231,84 @@ $youtubeId = '';
$vimeoId = ''; $vimeoId = '';
if ($heroMode === 'localvideo' && $localVideoFile) { if ($heroMode === 'localvideo' && $localVideoFile) {
$videoUrl = Uri::root() . ltrim($localVideoFile, '/'); $videoUrl = Uri::root() . ltrim($localVideoFile, '/');
} elseif ($heroMode === 'video' && $videoFile) { } elseif ($heroMode === 'video' && $videoFile) {
// YouTube: watch, embed, shorts, youtu.be, with optional timestamps/params // YouTube: watch, embed, shorts, youtu.be, with optional timestamps/params
if (preg_match('/(?:youtube\.com\/(?:watch\?.*v=|embed\/|shorts\/|v\/)|youtu\.be\/)([\w-]{11})/', $videoFile, $m)) { if (preg_match('/(?:youtube\.com\/(?:watch\?.*v=|embed\/|shorts\/|v\/)|youtu\.be\/)([\w-]{11})/', $videoFile, $m)) {
$youtubeId = $m[1]; $youtubeId = $m[1];
// Vimeo: vimeo.com/123456 or player.vimeo.com/video/123456 // Vimeo: vimeo.com/123456 or player.vimeo.com/video/123456
} elseif (preg_match('/vimeo\.com\/(?:video\/)?(\d+)/', $videoFile, $m)) { } elseif (preg_match('/vimeo\.com\/(?:video\/)?(\d+)/', $videoFile, $m)) {
$vimeoId = $m[1]; $vimeoId = $m[1];
} else { } else {
// Direct URL or local file path // Direct URL or local file path
$videoUrl = (strpos($videoFile, '://') !== false) $videoUrl = (strpos($videoFile, '://') !== false)
? $videoFile ? $videoFile
: Uri::root() . ltrim($videoFile, '/'); : Uri::root() . ltrim($videoFile, '/');
} }
} }
// Module content from the editor (overlay text) // Load content from article if configured
$content = $module->content ?? ''; $articleTitle = '';
if ($contentSource === 'article' && $articleId > 0) {
try {
$db = \Joomla\CMS\Factory::getDbo();
$query = $db->getQuery(true)
->select($db->quoteName(['title', 'introtext', 'fulltext']))
->from($db->quoteName('#__content'))
->where($db->quoteName('id') . ' = ' . $articleId)
->where($db->quoteName('state') . ' = 1');
$db->setQuery($query);
$article = $db->loadObject();
if ($article) {
$rawContent = $article->introtext ?: $article->fulltext;
$heroContent = \Joomla\CMS\HTML\HTMLHelper::_('content.prepare', $rawContent);
$articleTitle = $article->title;
}
} catch (\RuntimeException $e) {
\Joomla\CMS\Log\Log::add(
'MokoJoomHero: Failed to load article ID ' . $articleId . ': ' . $e->getMessage(),
\Joomla\CMS\Log\Log::WARNING,
'mod_mokojoomhero'
);
}
}
// Process per-slide content — overrides folder-based images when populated
$slides = [];
if ($heroMode === 'images' && !empty($slideContent)) {
$slideData = is_string($slideContent) ? json_decode($slideContent, true) : (array) $slideContent;
if ($slideData === null && json_last_error() !== JSON_ERROR_NONE) {
\Joomla\CMS\Log\Log::add(
'MokoJoomHero: Failed to decode slideContent JSON: ' . json_last_error_msg(),
\Joomla\CMS\Log\Log::WARNING,
'mod_mokojoomhero'
);
}
if (is_array($slideData)) {
foreach ($slideData as $item) {
$item = (array) $item;
if (!empty($item['image'])) {
$slides[] = [
'image' => Uri::root() . ltrim($item['image'], '/'),
'heading' => $item['heading'] ?? '',
'body' => $item['body'] ?? '',
'link' => $item['link'] ?? '',
'linkText' => $item['linkText'] ?? 'Learn More',
];
}
}
}
// Per-slide content overrides folder-based random images
if ($slides) {
$heroImages = array_column($slides, 'image');
}
}
require ModuleHelper::getLayoutPath('mod_mokojoomhero', $params->get('layout', 'default')); require ModuleHelper::getLayoutPath('mod_mokojoomhero', $params->get('layout', 'default'));
+317 -8
View File
@@ -16,14 +16,14 @@
--> -->
<extension type="module" client="site" method="upgrade"> <extension type="module" client="site" method="upgrade">
<name>Module - MokoJoomHero</name> <name>Module - MokoJoomHero</name>
<creationDate>2026-05</creationDate> <creationDate>2026-06-04</creationDate>
<author>Moko Consulting</author> <author>Moko Consulting</author>
<authorEmail>hello@mokoconsulting.tech</authorEmail> <authorEmail>hello@mokoconsulting.tech</authorEmail>
<authorUrl>https://mokoconsulting.tech</authorUrl> <authorUrl>https://mokoconsulting.tech</authorUrl>
<copyright>Copyright (C) 2026 Moko Consulting. All rights reserved.</copyright> <copyright>Copyright (C) 2026 Moko Consulting. All rights reserved.</copyright>
<license>GPL-3.0-or-later</license> <license>GPL-3.0-or-later</license>
<version>01.07.00</version> <version>01.21.01</version>
<description>Displays a random hero image slideshow or background video with content overlaid. Designed for MokoOnyx template. By Moko Consulting.</description> <description>Random hero image slideshow, video backgrounds, solid colour/gradient, parallax, content animations, A/B testing, scheduling, and overlay with card support. Free and open source. By Moko Consulting.</description>
<scriptfile>script.php</scriptfile> <scriptfile>script.php</scriptfile>
@@ -48,6 +48,10 @@
<language tag="en-US">en-US/mod_mokojoomhero.sys.ini</language> <language tag="en-US">en-US/mod_mokojoomhero.sys.ini</language>
</languages> </languages>
<updateservers>
<server type="extension" name="Module - MokoJoomHero">https://git.mokoconsulting.tech/MokoConsulting/MokoJoomHero/updates.xml</server>
</updateservers>
<config> <config>
<fields name="params"> <fields name="params">
<fieldset name="basic"> <fieldset name="basic">
@@ -61,6 +65,56 @@
<option value="images">MOD_MOKOJOOMHERO_MODE_IMAGES</option> <option value="images">MOD_MOKOJOOMHERO_MODE_IMAGES</option>
<option value="video">MOD_MOKOJOOMHERO_MODE_VIDEO</option> <option value="video">MOD_MOKOJOOMHERO_MODE_VIDEO</option>
<option value="localvideo">MOD_MOKOJOOMHERO_MODE_LOCALVIDEO</option> <option value="localvideo">MOD_MOKOJOOMHERO_MODE_LOCALVIDEO</option>
<option value="color">MOD_MOKOJOOMHERO_MODE_COLOR</option>
<option value="gradient">MOD_MOKOJOOMHERO_MODE_GRADIENT</option>
</field>
<field
name="bgColor"
type="color"
label="MOD_MOKOJOOMHERO_BG_COLOR_LABEL"
description="MOD_MOKOJOOMHERO_BG_COLOR_DESC"
default="#003366"
showon="heroMode:color"
/>
<field
name="gradientStart"
type="color"
label="MOD_MOKOJOOMHERO_GRADIENT_START_LABEL"
description="MOD_MOKOJOOMHERO_GRADIENT_START_DESC"
default="#003366"
showon="heroMode:gradient"
/>
<field
name="gradientEnd"
type="color"
label="MOD_MOKOJOOMHERO_GRADIENT_END_LABEL"
description="MOD_MOKOJOOMHERO_GRADIENT_END_DESC"
default="#006699"
showon="heroMode:gradient"
/>
<field
name="gradientAngle"
type="number"
label="MOD_MOKOJOOMHERO_GRADIENT_ANGLE_LABEL"
description="MOD_MOKOJOOMHERO_GRADIENT_ANGLE_DESC"
default="135"
min="0"
max="360"
step="15"
showon="heroMode:gradient"
/>
<field
name="fadeType"
type="list"
label="MOD_MOKOJOOMHERO_FADE_TYPE_LABEL"
description="MOD_MOKOJOOMHERO_FADE_TYPE_DESC"
default="crossfade"
showon="heroMode:images"
>
<option value="crossfade">MOD_MOKOJOOMHERO_FADE_CROSSFADE</option>
<option value="slide">MOD_MOKOJOOMHERO_FADE_SLIDE</option>
<option value="fade-black">MOD_MOKOJOOMHERO_FADE_BLACK</option>
<option value="zoom">MOD_MOKOJOOMHERO_FADE_ZOOM</option>
</field> </field>
<field <field
name="imageFolder" name="imageFolder"
@@ -91,6 +145,51 @@
step="500" step="500"
showon="heroMode:images" showon="heroMode:images"
/> />
<field
name="slideContent"
type="subform"
label="MOD_MOKOJOOMHERO_SLIDE_CONTENT_LABEL"
description="MOD_MOKOJOOMHERO_SLIDE_CONTENT_DESC"
multiple="true"
layout="joomla.form.field.subform.repeatable-table"
showon="heroMode:images"
max="5"
>
<form>
<field
name="image"
type="media"
label="MOD_MOKOJOOMHERO_SLIDE_IMAGE_LABEL"
types="images"
/>
<field
name="heading"
type="text"
label="MOD_MOKOJOOMHERO_SLIDE_HEADING_LABEL"
filter="string"
/>
<field
name="body"
type="textarea"
label="MOD_MOKOJOOMHERO_SLIDE_BODY_LABEL"
filter="safehtml"
rows="3"
/>
<field
name="link"
type="url"
label="MOD_MOKOJOOMHERO_SLIDE_LINK_LABEL"
filter="url"
/>
<field
name="linkText"
type="text"
label="MOD_MOKOJOOMHERO_SLIDE_LINK_TEXT_LABEL"
filter="string"
default="Learn More"
/>
</form>
</field>
<field <field
name="videoFile" name="videoFile"
type="text" type="text"
@@ -116,6 +215,56 @@
default="60vh" default="60vh"
filter="string" filter="string"
/> />
<field
name="heroHeightMobile"
type="text"
label="MOD_MOKOJOOMHERO_HERO_HEIGHT_MOBILE_LABEL"
description="MOD_MOKOJOOMHERO_HERO_HEIGHT_MOBILE_DESC"
hint="MOD_MOKOJOOMHERO_HERO_HEIGHT_MOBILE_HINT"
default=""
filter="string"
/>
<field
name="videoPoster"
type="media"
label="MOD_MOKOJOOMHERO_VIDEO_POSTER_LABEL"
description="MOD_MOKOJOOMHERO_VIDEO_POSTER_DESC"
types="images"
showon="heroMode:video,localvideo"
/>
<field
name="showScrollIndicator"
type="radio"
layout="joomla.form.field.radio.switcher"
label="MOD_MOKOJOOMHERO_SCROLL_INDICATOR_LABEL"
description="MOD_MOKOJOOMHERO_SCROLL_INDICATOR_DESC"
default="0"
>
<option value="0">JNO</option>
<option value="1">JYES</option>
</field>
<field
name="parallaxEnabled"
type="radio"
layout="joomla.form.field.radio.switcher"
label="MOD_MOKOJOOMHERO_PARALLAX_LABEL"
description="MOD_MOKOJOOMHERO_PARALLAX_DESC"
default="0"
>
<option value="0">JNO</option>
<option value="1">JYES</option>
</field>
<field
name="parallaxSpeed"
type="range"
label="MOD_MOKOJOOMHERO_PARALLAX_SPEED_LABEL"
description="MOD_MOKOJOOMHERO_PARALLAX_SPEED_DESC"
default="0.5"
min="0.1"
max="0.9"
step="0.1"
showon="parallaxEnabled:1"
/>
<field <field
name="showMuteToggle" name="showMuteToggle"
type="radio" type="radio"
@@ -129,9 +278,102 @@
<option value="1">JYES</option> <option value="1">JYES</option>
</field> </field>
</fieldset> </fieldset>
<fieldset name="abtesting"
label="MOD_MOKOJOOMHERO_FIELDSET_AB"
>
<field
name="abEnabled"
type="radio"
layout="joomla.form.field.radio.switcher"
label="MOD_MOKOJOOMHERO_AB_ENABLED_LABEL"
description="MOD_MOKOJOOMHERO_AB_ENABLED_DESC"
default="0"
>
<option value="0">JNO</option>
<option value="1">JYES</option>
</field>
<field
name="abVariations"
type="subform"
label="MOD_MOKOJOOMHERO_AB_VARIATIONS_LABEL"
description="MOD_MOKOJOOMHERO_AB_VARIATIONS_DESC"
multiple="true"
layout="joomla.form.field.subform.repeatable-table"
showon="abEnabled:1"
max="4"
>
<form>
<field
name="label"
type="text"
label="MOD_MOKOJOOMHERO_AB_VAR_LABEL"
filter="string"
default="Variation"
/>
<field
name="content"
type="textarea"
label="MOD_MOKOJOOMHERO_AB_VAR_CONTENT"
filter="safehtml"
rows="3"
/>
<field
name="weight"
type="number"
label="MOD_MOKOJOOMHERO_AB_VAR_WEIGHT"
default="50"
min="1"
max="100"
/>
</form>
</field>
</fieldset>
<fieldset name="scheduling"
label="MOD_MOKOJOOMHERO_FIELDSET_SCHEDULING"
>
<field
name="scheduleEnabled"
type="radio"
layout="joomla.form.field.radio.switcher"
label="MOD_MOKOJOOMHERO_SCHEDULE_ENABLED_LABEL"
description="MOD_MOKOJOOMHERO_SCHEDULE_ENABLED_DESC"
default="0"
>
<option value="0">JNO</option>
<option value="1">JYES</option>
</field>
<field
name="scheduleStart"
type="calendar"
label="MOD_MOKOJOOMHERO_SCHEDULE_START_LABEL"
description="MOD_MOKOJOOMHERO_SCHEDULE_START_DESC"
format="%Y-%m-%d %H:%M"
showtime="true"
showon="scheduleEnabled:1"
/>
<field
name="scheduleEnd"
type="calendar"
label="MOD_MOKOJOOMHERO_SCHEDULE_END_LABEL"
description="MOD_MOKOJOOMHERO_SCHEDULE_END_DESC"
format="%Y-%m-%d %H:%M"
showtime="true"
showon="scheduleEnabled:1"
/>
</fieldset>
<fieldset name="content" <fieldset name="content"
label="MOD_MOKOJOOMHERO_FIELDSET_CONTENT" label="MOD_MOKOJOOMHERO_FIELDSET_CONTENT"
> >
<field
name="contentSource"
type="list"
label="MOD_MOKOJOOMHERO_CONTENT_SOURCE_LABEL"
description="MOD_MOKOJOOMHERO_CONTENT_SOURCE_DESC"
default="manual"
>
<option value="manual">MOD_MOKOJOOMHERO_SOURCE_MANUAL</option>
<option value="article">MOD_MOKOJOOMHERO_SOURCE_ARTICLE</option>
</field>
<field <field
name="heroContent" name="heroContent"
type="editor" type="editor"
@@ -140,7 +382,31 @@
filter="safehtml" filter="safehtml"
buttons="true" buttons="true"
hide="readmore,pagebreak" hide="readmore,pagebreak"
showon="contentSource:manual"
/> />
<field
name="articleId"
type="sql"
label="MOD_MOKOJOOMHERO_ARTICLE_LABEL"
description="MOD_MOKOJOOMHERO_ARTICLE_DESC"
query="SELECT id, title FROM #__content WHERE state = 1 ORDER BY title ASC"
key_field="id"
value_field="title"
header="MOD_MOKOJOOMHERO_ARTICLE_SELECT"
showon="contentSource:article"
/>
<field
name="useArticleTitle"
type="radio"
layout="joomla.form.field.radio.switcher"
label="MOD_MOKOJOOMHERO_USE_ARTICLE_TITLE_LABEL"
description="MOD_MOKOJOOMHERO_USE_ARTICLE_TITLE_DESC"
default="0"
showon="contentSource:article"
>
<option value="0">JNO</option>
<option value="1">JYES</option>
</field>
<field <field
name="showCard" name="showCard"
type="radio" type="radio"
@@ -152,6 +418,30 @@
<option value="0">JNO</option> <option value="0">JNO</option>
<option value="1">JYES</option> <option value="1">JYES</option>
</field> </field>
<field
name="contentAnimation"
type="list"
label="MOD_MOKOJOOMHERO_CONTENT_ANIM_LABEL"
description="MOD_MOKOJOOMHERO_CONTENT_ANIM_DESC"
default="none"
>
<option value="none">MOD_MOKOJOOMHERO_ANIM_NONE</option>
<option value="fade-in">MOD_MOKOJOOMHERO_ANIM_FADE_IN</option>
<option value="slide-up">MOD_MOKOJOOMHERO_ANIM_SLIDE_UP</option>
<option value="slide-left">MOD_MOKOJOOMHERO_ANIM_SLIDE_LEFT</option>
<option value="slide-right">MOD_MOKOJOOMHERO_ANIM_SLIDE_RIGHT</option>
</field>
<field
name="contentAnimationDelay"
type="number"
label="MOD_MOKOJOOMHERO_CONTENT_ANIM_DELAY_LABEL"
description="MOD_MOKOJOOMHERO_CONTENT_ANIM_DELAY_DESC"
default="0"
min="0"
max="3000"
step="100"
showon="contentAnimation!:none"
/>
<field <field
name="cardDelay" name="cardDelay"
type="number" type="number"
@@ -174,6 +464,19 @@
description="MOD_MOKOJOOMHERO_OVERLAY_COLOR_DESC" description="MOD_MOKOJOOMHERO_OVERLAY_COLOR_DESC"
default="#000000" default="#000000"
/> />
<field
name="overlayType"
type="list"
label="MOD_MOKOJOOMHERO_OVERLAY_TYPE_LABEL"
description="MOD_MOKOJOOMHERO_OVERLAY_TYPE_DESC"
default="solid"
>
<option value="solid">MOD_MOKOJOOMHERO_OVERLAY_SOLID</option>
<option value="gradient-bottom">MOD_MOKOJOOMHERO_OVERLAY_GRADIENT_BOTTOM</option>
<option value="gradient-top">MOD_MOKOJOOMHERO_OVERLAY_GRADIENT_TOP</option>
<option value="gradient-left">MOD_MOKOJOOMHERO_OVERLAY_GRADIENT_LEFT</option>
<option value="gradient-right">MOD_MOKOJOOMHERO_OVERLAY_GRADIENT_RIGHT</option>
</field>
<field <field
name="overlayOpacity" name="overlayOpacity"
type="range" type="range"
@@ -195,6 +498,17 @@
<option value="center">MOD_MOKOJOOMHERO_ALIGN_CENTER</option> <option value="center">MOD_MOKOJOOMHERO_ALIGN_CENTER</option>
<option value="right">MOD_MOKOJOOMHERO_ALIGN_RIGHT</option> <option value="right">MOD_MOKOJOOMHERO_ALIGN_RIGHT</option>
</field> </field>
<field
name="verticalAlign"
type="list"
label="MOD_MOKOJOOMHERO_VALIGN_LABEL"
description="MOD_MOKOJOOMHERO_VALIGN_DESC"
default="center"
>
<option value="top">MOD_MOKOJOOMHERO_VALIGN_TOP</option>
<option value="center">MOD_MOKOJOOMHERO_VALIGN_CENTER</option>
<option value="bottom">MOD_MOKOJOOMHERO_VALIGN_BOTTOM</option>
</field>
<field <field
name="textColor" name="textColor"
type="color" type="color"
@@ -206,10 +520,5 @@
</fields> </fields>
</config> </config>
<updateservers>
<server type="extension" priority="1" name="MokoJoomHero Updates">
https://git.mokoconsulting.tech/MokoConsulting/MokoJoomHero/raw/branch/main/updates.xml
</server>
</updateservers>
</extension> </extension>
+39 -7
View File
@@ -6,21 +6,53 @@
* *
* @copyright Copyright (C) 2026 Moko Consulting. All rights reserved. * @copyright Copyright (C) 2026 Moko Consulting. All rights reserved.
* @license GPL-3.0-or-later * @license GPL-3.0-or-later
* SPDX-License-Identifier: GPL-3.0-or-later
*/ */
defined('_JEXEC') or die; defined('_JEXEC') or die;
use Joomla\CMS\Factory;
use Joomla\CMS\Filesystem\Folder; use Joomla\CMS\Filesystem\Folder;
use Joomla\CMS\Installer\InstallerAdapter; use Joomla\CMS\Installer\InstallerAdapter;
class Mod_MokojoomheroInstallerScript class Mod_MokojoomheroInstallerScript
{ {
public function postflight(string $type, InstallerAdapter $adapter): void public function postflight(string $type, InstallerAdapter $adapter): void
{ {
$heroesPath = JPATH_ROOT . '/images/heroes'; // Create default image folder on fresh install
$heroesPath = JPATH_ROOT . '/images/heroes';
if (!is_dir($heroesPath)) { if (!is_dir($heroesPath)) {
Folder::create($heroesPath); Folder::create($heroesPath);
} }
}
// Remove deprecated system plugin (was part of the old package extension)
$this->removeDeprecatedPlugin();
}
/**
* Uninstall plg_system_mokojoomhero if it exists no longer needed.
*/
private function removeDeprecatedPlugin(): void
{
try {
$db = Factory::getDbo();
$query = $db->getQuery(true)
->select($db->quoteName('extension_id'))
->from($db->quoteName('#__extensions'))
->where($db->quoteName('type') . ' = ' . $db->quote('plugin'))
->where($db->quoteName('folder') . ' = ' . $db->quote('system'))
->where($db->quoteName('element') . ' = ' . $db->quote('mokojoomhero'));
$db->setQuery($query);
$extensionId = (int) $db->loadResult();
if ($extensionId) {
$installer = new \Joomla\CMS\Installer\Installer();
$installer->uninstall('plugin', $extensionId);
}
} catch (\Exception $e) {
// Non-critical — plugin may already be gone
}
}
} }
+89 -15
View File
@@ -6,52 +6,114 @@
* *
* @copyright Copyright (C) 2026 Moko Consulting. All rights reserved. * @copyright Copyright (C) 2026 Moko Consulting. All rights reserved.
* @license GPL-3.0-or-later * @license GPL-3.0-or-later
* SPDX-License-Identifier: GPL-3.0-or-later
*/ */
defined('_JEXEC') or die; defined('_JEXEC') or die;
use Joomla\CMS\Language\Text;
/** @var string $heroMode */ /** @var string $heroMode */
/** @var array $heroImages */ /** @var array $heroImages */
/** @var int $slideInterval */ /** @var int $slideInterval */
/** @var string $fadeType */
/** @var string $videoUrl */ /** @var string $videoUrl */
/** @var string $youtubeId */ /** @var string $youtubeId */
/** @var string $vimeoId */ /** @var string $vimeoId */
/** @var string $heroHeight */ /** @var string $heroHeight */
/** @var string $heroHeightMobile */
/** @var string $overlayColor */ /** @var string $overlayColor */
/** @var string $overlayType */
/** @var float $overlayOpacity */ /** @var float $overlayOpacity */
/** @var string $textAlign */ /** @var string $textAlign */
/** @var string $verticalAlign */
/** @var string $textColor */ /** @var string $textColor */
/** @var string $contentSource */
/** @var int $articleId */
/** @var bool $useArticleTitle */
/** @var string $heroContent */ /** @var string $heroContent */
/** @var string $articleTitle */
/** @var array $slides */
/** @var bool $showCard */ /** @var bool $showCard */
/** @var int $cardDelay */ /** @var int $cardDelay */
/** @var string $contentAnimation */
/** @var int $contentAnimationDelay */
/** @var bool $parallaxEnabled */
/** @var float $parallaxSpeed */
/** @var bool $showMuteToggle */ /** @var bool $showMuteToggle */
/** @var string $content */ /** @var string $videoPoster */
/** @var bool $showScrollIndicator */
/** @var string $bgColor */
/** @var string $gradientStart */
/** @var string $gradientEnd */
/** @var int $gradientAngle */
$moduleId = 'mod-mokojoomhero-' . $module->id; $moduleId = 'mod-mokojoomhero-' . $module->id;
// Convert hex overlay colour to rgba // Convert hex overlay colour to rgba
$r = hexdec(substr($overlayColor, 1, 2)); $r = hexdec(substr($overlayColor, 1, 2));
$g = hexdec(substr($overlayColor, 3, 2)); $g = hexdec(substr($overlayColor, 3, 2));
$b = hexdec(substr($overlayColor, 5, 2)); $b = hexdec(substr($overlayColor, 5, 2));
$rgba = "rgba($r, $g, $b, $overlayOpacity)"; $rgbaOpaque = "rgba($r, $g, $b, $overlayOpacity)";
$rgbaTransparent = "rgba($r, $g, $b, 0)";
// Build overlay background based on type
$overlayDirections = [
'gradient-bottom' => 'to bottom',
'gradient-top' => 'to top',
'gradient-left' => 'to left',
'gradient-right' => 'to right',
];
// Skip overlay on solid colour/gradient modes — background is already a controlled design choice
if ($heroMode === 'color' || $heroMode === 'gradient') {
$overlayBg = '';
} elseif ($overlayType !== 'solid' && isset($overlayDirections[$overlayType])) {
$dir = $overlayDirections[$overlayType];
$overlayBg = "background: linear-gradient($dir, $rgbaTransparent, $rgbaOpaque);";
} else {
$overlayBg = "background-color: $rgbaOpaque;";
}
// Map vertical alignment to CSS align-items
$valignMap = ['top' => 'flex-start', 'center' => 'center', 'bottom' => 'flex-end'];
$valignCss = $valignMap[$verticalAlign] ?? 'center';
$heightAttr = htmlspecialchars($heroHeight, ENT_QUOTES, 'UTF-8'); $heightAttr = htmlspecialchars($heroHeight, ENT_QUOTES, 'UTF-8');
?> ?>
<?php if ($heroHeightMobile) : ?>
<style>#<?php echo $moduleId; ?> { --mokojoomhero-mobile-height: <?php echo htmlspecialchars($heroHeightMobile, ENT_QUOTES, 'UTF-8'); ?>; }</style>
<?php endif; ?>
<div id="<?php echo $moduleId; ?>" class="mokojoomhero" style="height: <?php echo $heightAttr; ?>;" <div id="<?php echo $moduleId; ?>" class="mokojoomhero" style="height: <?php echo $heightAttr; ?>;"
<?php if ($parallaxEnabled) : ?>
data-parallax="<?php echo $parallaxSpeed; ?>"
<?php endif; ?>
<?php if ($heroMode === 'images' && count($heroImages) > 1) : ?> <?php if ($heroMode === 'images' && count($heroImages) > 1) : ?>
data-slides="<?php echo htmlspecialchars(json_encode($heroImages), ENT_QUOTES, 'UTF-8'); ?>" data-slides="<?php echo htmlspecialchars(json_encode($heroImages), ENT_QUOTES, 'UTF-8'); ?>"
data-interval="<?php echo $slideInterval; ?>" data-interval="<?php echo $slideInterval; ?>"
data-transition="<?php echo htmlspecialchars($fadeType, ENT_QUOTES, 'UTF-8'); ?>"
<?php if ($slides) : ?>
data-slide-content="<?php echo htmlspecialchars(json_encode($slides), ENT_QUOTES, 'UTF-8'); ?>"
<?php endif; ?>
<?php endif; ?> <?php endif; ?>
> >
<?php // Background layer — single image, slideshow, or video ?> <?php // Background layer — solid colour, single image, slideshow, or video ?>
<?php if ($heroMode === 'video' && $youtubeId) : ?> <?php if ($heroMode === 'color') : ?>
<div class="mokojoomhero__color" style="background-color: <?php echo htmlspecialchars($bgColor, ENT_QUOTES, 'UTF-8'); ?>;"></div>
<?php elseif ($heroMode === 'gradient') : ?>
<div class="mokojoomhero__color" style="background: linear-gradient(<?php echo $gradientAngle; ?>deg, <?php echo htmlspecialchars($gradientStart, ENT_QUOTES, 'UTF-8'); ?>, <?php echo htmlspecialchars($gradientEnd, ENT_QUOTES, 'UTF-8'); ?>);"></div>
<?php elseif ($heroMode === 'video' && $youtubeId) : ?>
<?php if ($videoPoster) : ?>
<div class="mokojoomhero__poster" style="background-image: url('<?php echo htmlspecialchars(\Joomla\CMS\Uri\Uri::root() . ltrim($videoPoster, '/'), ENT_QUOTES, 'UTF-8'); ?>');"></div>
<?php endif; ?>
<iframe class="mokojoomhero__video" src="https://www.youtube-nocookie.com/embed/<?php echo htmlspecialchars($youtubeId, ENT_QUOTES, 'UTF-8'); ?>?autoplay=1&mute=1&loop=1&playlist=<?php echo htmlspecialchars($youtubeId, ENT_QUOTES, 'UTF-8'); ?>&controls=0&showinfo=0&rel=0&modestbranding=1&playsinline=1&enablejsapi=1&origin=<?php echo htmlspecialchars(\Joomla\CMS\Uri\Uri::root(), ENT_QUOTES, 'UTF-8'); ?>" allow="autoplay; encrypted-media" allowfullscreen></iframe> <iframe class="mokojoomhero__video" src="https://www.youtube-nocookie.com/embed/<?php echo htmlspecialchars($youtubeId, ENT_QUOTES, 'UTF-8'); ?>?autoplay=1&mute=1&loop=1&playlist=<?php echo htmlspecialchars($youtubeId, ENT_QUOTES, 'UTF-8'); ?>&controls=0&showinfo=0&rel=0&modestbranding=1&playsinline=1&enablejsapi=1&origin=<?php echo htmlspecialchars(\Joomla\CMS\Uri\Uri::root(), ENT_QUOTES, 'UTF-8'); ?>" allow="autoplay; encrypted-media" allowfullscreen></iframe>
<?php elseif ($heroMode === 'video' && $vimeoId) : ?> <?php elseif ($heroMode === 'video' && $vimeoId) : ?>
<?php if ($videoPoster) : ?>
<div class="mokojoomhero__poster" style="background-image: url('<?php echo htmlspecialchars(\Joomla\CMS\Uri\Uri::root() . ltrim($videoPoster, '/'), ENT_QUOTES, 'UTF-8'); ?>');"></div>
<?php endif; ?>
<iframe class="mokojoomhero__video" src="https://player.vimeo.com/video/<?php echo htmlspecialchars($vimeoId, ENT_QUOTES, 'UTF-8'); ?>?autoplay=1&muted=1&loop=1&background=1" allow="autoplay" allowfullscreen></iframe> <iframe class="mokojoomhero__video" src="https://player.vimeo.com/video/<?php echo htmlspecialchars($vimeoId, ENT_QUOTES, 'UTF-8'); ?>?autoplay=1&muted=1&loop=1&background=1" allow="autoplay" allowfullscreen></iframe>
<?php elseif (($heroMode === 'video' || $heroMode === 'localvideo') && $videoUrl) : ?> <?php elseif (($heroMode === 'video' || $heroMode === 'localvideo') && $videoUrl) : ?>
<video class="mokojoomhero__video" autoplay muted loop playsinline> <?php if ($videoPoster) : ?>
<div class="mokojoomhero__poster" style="background-image: url('<?php echo htmlspecialchars(\Joomla\CMS\Uri\Uri::root() . ltrim($videoPoster, '/'), ENT_QUOTES, 'UTF-8'); ?>');"></div>
<?php endif; ?>
<video class="mokojoomhero__video" autoplay muted loop playsinline<?php if ($videoPoster) : ?> poster="<?php echo htmlspecialchars(\Joomla\CMS\Uri\Uri::root() . ltrim($videoPoster, '/'), ENT_QUOTES, 'UTF-8'); ?>"<?php endif; ?>>
<source src="<?php echo htmlspecialchars($videoUrl, ENT_QUOTES, 'UTF-8'); ?>"> <source src="<?php echo htmlspecialchars($videoUrl, ENT_QUOTES, 'UTF-8'); ?>">
</video> </video>
<?php elseif ($heroImages) : ?> <?php elseif ($heroImages) : ?>
@@ -69,20 +131,32 @@ $heightAttr = htmlspecialchars($heroHeight, ENT_QUOTES, 'UTF-8');
</button> </button>
<?php endif; ?> <?php endif; ?>
<?php if ($showScrollIndicator) : ?>
<button class="mokojoomhero__scroll-indicator" type="button" aria-label="Scroll down">
<svg class="mokojoomhero__scroll-chevron" viewBox="0 0 24 24" width="32" height="32" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="6 9 12 15 18 9"></polyline></svg>
</button>
<?php endif; ?>
<?php // Overlay + content ?> <?php // Overlay + content ?>
<div class="mokojoomhero__overlay" style="background-color: <?php echo $rgba; ?>;"> <div class="mokojoomhero__overlay" style="<?php echo $overlayBg; ?> align-items: <?php echo $valignCss; ?>;">
<div class="mokojoomhero__content" style="text-align: <?php echo htmlspecialchars($textAlign, ENT_QUOTES, 'UTF-8'); ?>; color: <?php echo htmlspecialchars($textColor, ENT_QUOTES, 'UTF-8'); ?>;"> <div class="mokojoomhero__content<?php if ($contentAnimation !== 'none') : ?> mokojoomhero__content--anim-<?php echo htmlspecialchars($contentAnimation, ENT_QUOTES, 'UTF-8'); ?><?php endif; ?>" style="text-align: <?php echo htmlspecialchars($textAlign, ENT_QUOTES, 'UTF-8'); ?>; color: <?php echo htmlspecialchars($textColor, ENT_QUOTES, 'UTF-8'); ?>;<?php if ($contentAnimationDelay) : ?> animation-delay: <?php echo $contentAnimationDelay; ?>ms;<?php endif; ?>">
<?php if ($heroContent || $module->showtitle) : ?> <?php
$displayTitle = ($contentSource === 'article' && $useArticleTitle && $articleTitle)
? $articleTitle
: $module->title;
$showTitle = ($contentSource === 'article' && $useArticleTitle && $articleTitle) || $module->showtitle;
?>
<?php if ($heroContent || $showTitle) : ?>
<?php if ($showCard) : ?> <?php if ($showCard) : ?>
<div class="mokojoomhero__card"<?php if ($cardDelay) : ?> style="animation-delay: <?php echo $cardDelay; ?>ms;" data-card-delay="<?php echo $cardDelay; ?>"<?php endif; ?>> <div class="mokojoomhero__card"<?php if ($cardDelay) : ?> style="animation-delay: <?php echo $cardDelay; ?>ms;" data-card-delay="<?php echo $cardDelay; ?>"<?php endif; ?>>
<?php if ($module->showtitle) : ?> <?php if ($showTitle) : ?>
<h2 class="mokojoomhero__title"><?php echo htmlspecialchars($module->title, ENT_QUOTES, 'UTF-8'); ?></h2> <h2 class="mokojoomhero__title"><?php echo htmlspecialchars($displayTitle, ENT_QUOTES, 'UTF-8'); ?></h2>
<?php endif; ?> <?php endif; ?>
<?php echo $heroContent; ?> <?php echo $heroContent; ?>
</div> </div>
<?php else : ?> <?php else : ?>
<?php if ($module->showtitle) : ?> <?php if ($showTitle) : ?>
<h2 class="mokojoomhero__title"><?php echo htmlspecialchars($module->title, ENT_QUOTES, 'UTF-8'); ?></h2> <h2 class="mokojoomhero__title"><?php echo htmlspecialchars($displayTitle, ENT_QUOTES, 'UTF-8'); ?></h2>
<?php endif; ?> <?php endif; ?>
<?php echo $heroContent; ?> <?php echo $heroContent; ?>
<?php endif; ?> <?php endif; ?>
-35
View File
@@ -1,35 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Joomla Extension Update Server XML
See: https://docs.joomla.org/Deploying_an_Update_Server
This file is the update server manifest for mod_mokojoomhero.
The Joomla installer polls this URL to check for new versions.
The manifest in this repository must reference this file:
<updateservers>
<server type="extension" priority="1" name="MokoJoomHero Updates">
https://git.mokoconsulting.tech/MokoConsulting/MokoJoomHero/raw/branch/main/updates.xml
</server>
</updateservers>
When a new release is made, run `make release` or the release workflow to
prepend a new <update> entry to this file automatically.
-->
<updates>
<update>
<name>Module - MokoJoomHero</name>
<description>MokoJoomHero — A Joomla hero image module by Moko Consulting</description>
<element>mod_mokojoomhero</element>
<type>module</type>
<client>site</client>
<version>{{VERSION}}</version>
<downloads>
<downloadurl type="full" format="zip">
https://git.mokoconsulting.tech/MokoConsulting/MokoJoomHero/releases/download/v{{VERSION}}/mod_mokojoomhero.zip
</downloadurl>
</downloads>
<targetplatform name="joomla" version="(5|6).*" />
<php_minimum>8.1</php_minimum>
</update>
</updates>
-103
View File
@@ -1,103 +0,0 @@
<?xml version='1.0' encoding='UTF-8'?>
<!-- Copyright (C) 2026 Moko Consulting <hello@mokoconsulting.tech>
SPDX-License-Identifier: GPL-3.0-or-later
VERSION: 01.07.00
-->
<updates>
<update>
<name>MokoJoomHero</name>
<description>MokoJoomHero stable build.</description>
<element>mod_mokojoomhero</element>
<type>module</type>
<client>site</client>
<version>01.06.00</version>
<creationDate>2026-05-30</creationDate>
<infourl title="MokoJoomHero">https://git.mokoconsulting.tech/MokoConsulting/MokoJoomHero/releases/tag/stable</infourl>
<downloads>
<downloadurl type="full" format="zip">https://git.mokoconsulting.tech/MokoConsulting/MokoJoomHero/releases/download/stable/mod_mokojoomhero-01.06.00.zip</downloadurl>
</downloads>
<sha256>de21e4010e19323746c9aeff12d6a240dc29a2a0c3ef1e091549a2331e710bc7</sha256>
<tags><tag>stable</tag></tags>
<changelogurl>https://git.mokoconsulting.tech/MokoConsulting/MokoJoomHero/raw/branch/main/CHANGELOG.md</changelogurl>
<maintainer>Moko Consulting</maintainer>
<maintainerurl>https://mokoconsulting.tech</maintainerurl>
<targetplatform name="joomla" version="(5|6)\..*"/>
</update>
<update>
<name>Module - MokoJoomHero</name>
<description>Module - MokoJoomHero dev build.</description>
<element>mod_mokojoomhero</element>
<type>module</type>
<client>site</client>
<version>01.07.00-dev</version>
<creationDate>2026-05-30</creationDate>
<infourl title="Module - MokoJoomHero">https://git.mokoconsulting.tech/MokoConsulting/MokoJoomHero/releases/tag/development</infourl>
<downloads>
<downloadurl type="full" format="zip">https://git.mokoconsulting.tech/MokoConsulting/MokoJoomHero/releases/download/development/mod_mokojoomhero-01.07.00-dev.zip</downloadurl>
</downloads>
<sha256>32301fad78e9ad31613d2d02a8f2dd0519f5118b7683335b36532a4e1e5fe969</sha256>
<tags><tag>dev</tag></tags>
<changelogurl>https://git.mokoconsulting.tech/MokoConsulting/MokoJoomHero/raw/branch/main/CHANGELOG.md</changelogurl>
<maintainer>Moko Consulting</maintainer>
<maintainerurl>https://mokoconsulting.tech</maintainerurl>
<targetplatform name="joomla" version="(5|6)\..*"/>
</update>
<update>
<name>Module - MokoJoomHero</name>
<description>Module - MokoJoomHero alpha build.</description>
<element>mod_mokojoomhero</element>
<type>module</type>
<client>site</client>
<version>01.07.00-alpha</version>
<creationDate>2026-05-30</creationDate>
<infourl title="Module - MokoJoomHero">https://git.mokoconsulting.tech/MokoConsulting/MokoJoomHero/releases/tag/alpha</infourl>
<downloads>
<downloadurl type="full" format="zip">https://git.mokoconsulting.tech/MokoConsulting/MokoJoomHero/releases/download/alpha/mod_mokojoomhero-01.07.00-alpha.zip</downloadurl>
</downloads>
<sha256>32301fad78e9ad31613d2d02a8f2dd0519f5118b7683335b36532a4e1e5fe969</sha256>
<tags><tag>alpha</tag></tags>
<changelogurl>https://git.mokoconsulting.tech/MokoConsulting/MokoJoomHero/raw/branch/main/CHANGELOG.md</changelogurl>
<maintainer>Moko Consulting</maintainer>
<maintainerurl>https://mokoconsulting.tech</maintainerurl>
<targetplatform name="joomla" version="(5|6)\..*"/>
</update>
<update>
<name>Module - MokoJoomHero</name>
<description>Module - MokoJoomHero beta build.</description>
<element>mod_mokojoomhero</element>
<type>module</type>
<client>site</client>
<version>01.07.00-beta</version>
<creationDate>2026-05-30</creationDate>
<infourl title="Module - MokoJoomHero">https://git.mokoconsulting.tech/MokoConsulting/MokoJoomHero/releases/tag/beta</infourl>
<downloads>
<downloadurl type="full" format="zip">https://git.mokoconsulting.tech/MokoConsulting/MokoJoomHero/releases/download/beta/mod_mokojoomhero-01.07.00-beta.zip</downloadurl>
</downloads>
<sha256>32301fad78e9ad31613d2d02a8f2dd0519f5118b7683335b36532a4e1e5fe969</sha256>
<tags><tag>beta</tag></tags>
<changelogurl>https://git.mokoconsulting.tech/MokoConsulting/MokoJoomHero/raw/branch/main/CHANGELOG.md</changelogurl>
<maintainer>Moko Consulting</maintainer>
<maintainerurl>https://mokoconsulting.tech</maintainerurl>
<targetplatform name="joomla" version="(5|6)\..*"/>
</update>
<update>
<name>Module - MokoJoomHero</name>
<description>Module - MokoJoomHero rc build.</description>
<element>mod_mokojoomhero</element>
<type>module</type>
<client>site</client>
<version>01.07.00-rc</version>
<creationDate>2026-05-30</creationDate>
<infourl title='Module - MokoJoomHero'>https://git.mokoconsulting.tech/MokoConsulting/MokoJoomHero/releases/tag/release-candidate</infourl>
<downloads>
<downloadurl type='full' format='zip'>https://git.mokoconsulting.tech/MokoConsulting/MokoJoomHero/releases/download/release-candidate/mod_mokojoomhero-01.07.00-rc.zip</downloadurl>
</downloads>
<sha256>32301fad78e9ad31613d2d02a8f2dd0519f5118b7683335b36532a4e1e5fe969</sha256>
<tags><tag>rc</tag></tags>
<changelogurl>https://git.mokoconsulting.tech/MokoConsulting/MokoJoomHero/raw/branch/main/CHANGELOG.md</changelogurl>
<maintainer>Moko Consulting</maintainer>
<maintainerurl>https://mokoconsulting.tech</maintainerurl>
<targetplatform name="joomla" version="(5|6)\..*" />
</update>
</updates>