diff --git a/.mokogitea/manifest.xml b/.mokogitea/manifest.xml index db7c555..2736fbc 100644 --- a/.mokogitea/manifest.xml +++ b/.mokogitea/manifest.xml @@ -7,10 +7,9 @@ MokoJoomHero - Module - MokoJoomHero MokoConsulting A Joomla Module designed to provide a random image from a folder with content on top as a Hero. - 01.03.00 + 01.03.02 GNU General Public License v3 diff --git a/.mokogitea/workflows/issue-branch.yml b/.mokogitea/workflows/issue-branch.yml index 797d94c..130a094 100644 --- a/.mokogitea/workflows/issue-branch.yml +++ b/.mokogitea/workflows/issue-branch.yml @@ -5,7 +5,7 @@ # FILE INFORMATION # DEFGROUP: Gitea.Workflow # INGROUP: moko-platform.Automation -# VERSION: 01.03.00 +# VERSION: 01.03.02 # BRIEF: Auto-create feature branch when an issue is opened name: "Universal: Issue Branch" diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md index ccb80bb..3918660 100644 --- a/CODE_OF_CONDUCT.md +++ b/CODE_OF_CONDUCT.md @@ -14,7 +14,7 @@ DEFGROUP: INGROUP: Project.Documentation REPO: - VERSION: 01.03.00 + VERSION: 01.03.02 PATH: ./CODE_OF_CONDUCT.md BRIEF: Reference + packaging repo for Moko Consulting Developer GPT Other Default --> diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index c0b4858..b4db98e 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,161 +1,128 @@ -# Contributing to Moko Consulting Projects + + +# 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 ``` -feature/* ──PR──> dev ──draft PR──> (renamed to rc) ──merge──> main +1. Create branch: git checkout -b dev/XX.YY.ZZ/my-feature +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) ``` -### Step by step +### Branch Naming -1. **Create a feature branch** from `dev`: - ```bash - git checkout dev && git pull - git checkout -b feature/my-change - ``` +| Prefix | Use | +|--------|-----| +| `dev/XX.YY.ZZ` | Feature development (e.g., `dev/02.00.00/add-extrafields`) | +| `version/XX.YY` | Stable release (auto-created, never manually pushed) | +| `chore/` | Automated sync branches (managed by MokoStandards) | -2. **Work and commit** on your feature branch. Push to origin. +> **Never use** `feature/`, `hotfix/`, or `release/` prefixes — they are not part of the MokoStandards branch strategy. -3. **Open a PR**: `feature/my-change` → `dev`. After review and checks, merge it. +## Commit Conventions -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 (`` 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: +Use [conventional commits](https://www.conventionalcommits.org/): ``` -type(scope): short description - -Optional body with context. - -Authored-by: Moko Consulting +feat(scope): add new extrafield for invoice tracking +fix(sql): correct column type in llx_mytable +docs(readme): update installation instructions +chore(deps): bump enterprise library to 04.02.30 ``` -Types: `feat`, `fix`, `chore`, `docs`, `style`, `refactor`, `test`, `ci` +**Valid types:** `feat` | `fix` | `docs` | `chore` | `ci` | `refactor` | `style` | `test` | `perf` | `revert` | `build` -Special flags in commit messages: -- `[skip ci]` — skip all CI workflows -- `[skip bump]` — skip auto version bump only +## Pull Request Workflow -## Reporting Issues +1. **Branch** from `main` using `dev/XX.YY.ZZ/description` format +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 -Use the repository's issue tracker with the appropriate template. +### What Happens on Merge + +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. --- -*Moko Consulting * +*This file is synced from [MokoStandards](https://github.com/mokoconsulting-tech/MokoStandards). Do not edit directly — changes will be overwritten on the next sync.* diff --git a/README.md b/README.md index 8babebd..a5ce6e1 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ # FILE INFORMATION REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoJoomHero FILE: ./README.md - VERSION: 01.03.00 + VERSION: 01.03.02 BRIEF: MokoJoomHero - Joomla Module --> diff --git a/SECURITY.md b/SECURITY.md index fb9a4e2..448fe4b 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -23,7 +23,7 @@ DEFGROUP: [PROJECT_NAME] INGROUP: [PROJECT_NAME].Documentation REPO: [REPOSITORY_URL] PATH: /SECURITY.md -VERSION: 01.03.00 +VERSION: 01.03.02 BRIEF: Security vulnerability reporting and handling policy --> diff --git a/src/language/en-GB/mod_mokojoomhero.ini b/src/language/en-GB/mod_mokojoomhero.ini index 86fa4ad..2f50a8d 100644 --- a/src/language/en-GB/mod_mokojoomhero.ini +++ b/src/language/en-GB/mod_mokojoomhero.ini @@ -6,7 +6,7 @@ ; INGROUP: MokoJoomHero.Module ; REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoJoomHero ; PATH: /src/language/en-GB/mod_mokojoomhero.ini -; VERSION: 01.03.00 +; VERSION: 01.03.02 ; 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." @@ -20,9 +20,10 @@ MOD_MOKOJOOMHERO_SHOW_CARD_DESC="Wrap the content in a card with a white backgro ; Hero mode MOD_MOKOJOOMHERO_MODE_LABEL="Hero Mode" -MOD_MOKOJOOMHERO_MODE_DESC="Choose between a slideshow of images or a background video." +MOD_MOKOJOOMHERO_MODE_DESC="Choose between a slideshow of images, an embedded video (YouTube/Vimeo), or a local video file." MOD_MOKOJOOMHERO_MODE_IMAGES="Images" -MOD_MOKOJOOMHERO_MODE_VIDEO="Video" +MOD_MOKOJOOMHERO_MODE_VIDEO="Video (YouTube/Vimeo)" +MOD_MOKOJOOMHERO_MODE_LOCALVIDEO="Local Video" ; Image settings MOD_MOKOJOOMHERO_IMAGE_FOLDER_LABEL="Image Folder" @@ -32,9 +33,13 @@ 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_DESC="Time between slides in milliseconds (e.g. 5000 = 5 seconds)." -; Video settings +; Video settings (embedded) MOD_MOKOJOOMHERO_VIDEO_FILE_LABEL="Video URL" -MOD_MOKOJOOMHERO_VIDEO_FILE_DESC="Local file path, YouTube URL, or Vimeo URL. Any format works — the module auto-detects the source." +MOD_MOKOJOOMHERO_VIDEO_FILE_DESC="YouTube or Vimeo URL. The module auto-detects the source." + +; Local video settings +MOD_MOKOJOOMHERO_LOCAL_VIDEO_LABEL="Video File" +MOD_MOKOJOOMHERO_LOCAL_VIDEO_DESC="Select a video file from the Media Manager (mp4, webm, ogg)." ; Card delay MOD_MOKOJOOMHERO_CARD_DELAY_LABEL="Card Fade-in Delay (ms)" diff --git a/src/language/en-GB/mod_mokojoomhero.sys.ini b/src/language/en-GB/mod_mokojoomhero.sys.ini index 62cbc07..6dea201 100644 --- a/src/language/en-GB/mod_mokojoomhero.sys.ini +++ b/src/language/en-GB/mod_mokojoomhero.sys.ini @@ -6,7 +6,7 @@ ; INGROUP: MokoJoomHero.Module ; REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoJoomHero ; PATH: /src/language/en-GB/mod_mokojoomhero.sys.ini -; VERSION: 01.03.00 +; VERSION: 01.03.02 ; BRIEF: System language strings — used in admin Extension Manager and Module Manager MOD_MOKOJOOMHERO="Module - MokoJoomHero" @@ -21,9 +21,10 @@ MOD_MOKOJOOMHERO_SHOW_CARD_DESC="Wrap the content in a card with a white backgro ; Hero mode MOD_MOKOJOOMHERO_MODE_LABEL="Hero Mode" -MOD_MOKOJOOMHERO_MODE_DESC="Choose between a slideshow of images or a background video." +MOD_MOKOJOOMHERO_MODE_DESC="Choose between a slideshow of images, an embedded video (YouTube/Vimeo), or a local video file." MOD_MOKOJOOMHERO_MODE_IMAGES="Images" -MOD_MOKOJOOMHERO_MODE_VIDEO="Video" +MOD_MOKOJOOMHERO_MODE_VIDEO="Video (YouTube/Vimeo)" +MOD_MOKOJOOMHERO_MODE_LOCALVIDEO="Local Video" ; Image settings MOD_MOKOJOOMHERO_IMAGE_FOLDER_LABEL="Image Folder" @@ -33,9 +34,21 @@ 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_DESC="Time between slides in milliseconds (e.g. 5000 = 5 seconds)." -; Video settings +; Video settings (embedded) MOD_MOKOJOOMHERO_VIDEO_FILE_LABEL="Video URL" -MOD_MOKOJOOMHERO_VIDEO_FILE_DESC="Local file path, YouTube URL, or Vimeo URL. Any format works — the module auto-detects the source." +MOD_MOKOJOOMHERO_VIDEO_FILE_DESC="YouTube or Vimeo URL. The module auto-detects the source." + +; Local video settings +MOD_MOKOJOOMHERO_LOCAL_VIDEO_LABEL="Video File" +MOD_MOKOJOOMHERO_LOCAL_VIDEO_DESC="Select a video file from the Media Manager (mp4, webm, ogg)." + +; Card delay +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." + +; 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)." ; Hero height MOD_MOKOJOOMHERO_HERO_HEIGHT_LABEL="Hero Height" diff --git a/src/language/en-US/mod_mokojoomhero.ini b/src/language/en-US/mod_mokojoomhero.ini index 9439f8b..8d43021 100644 --- a/src/language/en-US/mod_mokojoomhero.ini +++ b/src/language/en-US/mod_mokojoomhero.ini @@ -6,7 +6,7 @@ ; INGROUP: MokoJoomHero.Module ; REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoJoomHero ; PATH: /src/language/en-US/mod_mokojoomhero.ini -; VERSION: 01.03.00 +; VERSION: 01.03.02 ; 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." @@ -20,9 +20,10 @@ MOD_MOKOJOOMHERO_SHOW_CARD_DESC="Wrap the content in a card with a white backgro ; Hero mode MOD_MOKOJOOMHERO_MODE_LABEL="Hero Mode" -MOD_MOKOJOOMHERO_MODE_DESC="Choose between a slideshow of images or a background video." +MOD_MOKOJOOMHERO_MODE_DESC="Choose between a slideshow of images, an embedded video (YouTube/Vimeo), or a local video file." MOD_MOKOJOOMHERO_MODE_IMAGES="Images" -MOD_MOKOJOOMHERO_MODE_VIDEO="Video" +MOD_MOKOJOOMHERO_MODE_VIDEO="Video (YouTube/Vimeo)" +MOD_MOKOJOOMHERO_MODE_LOCALVIDEO="Local Video" ; Image settings MOD_MOKOJOOMHERO_IMAGE_FOLDER_LABEL="Image Folder" @@ -32,9 +33,13 @@ 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_DESC="Time between slides in milliseconds (e.g. 5000 = 5 seconds)." -; Video settings +; Video settings (embedded) MOD_MOKOJOOMHERO_VIDEO_FILE_LABEL="Video URL" -MOD_MOKOJOOMHERO_VIDEO_FILE_DESC="Local file path, YouTube URL, or Vimeo URL. Any format works - the module auto-detects the source." +MOD_MOKOJOOMHERO_VIDEO_FILE_DESC="YouTube or Vimeo URL. The module auto-detects the source." + +; Local video settings +MOD_MOKOJOOMHERO_LOCAL_VIDEO_LABEL="Video File" +MOD_MOKOJOOMHERO_LOCAL_VIDEO_DESC="Select a video file from the Media Manager (mp4, webm, ogg)." ; Hero height MOD_MOKOJOOMHERO_HERO_HEIGHT_LABEL="Hero Height" diff --git a/src/language/en-US/mod_mokojoomhero.sys.ini b/src/language/en-US/mod_mokojoomhero.sys.ini index 26a4cad..b1972b5 100644 --- a/src/language/en-US/mod_mokojoomhero.sys.ini +++ b/src/language/en-US/mod_mokojoomhero.sys.ini @@ -6,7 +6,7 @@ ; INGROUP: MokoJoomHero.Module ; REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoJoomHero ; PATH: /src/language/en-US/mod_mokojoomhero.sys.ini -; VERSION: 01.03.00 +; VERSION: 01.03.02 ; BRIEF: System language strings — used in admin Extension Manager and Module Manager (en-US) MOD_MOKOJOOMHERO="Module - MokoJoomHero" @@ -21,9 +21,10 @@ MOD_MOKOJOOMHERO_SHOW_CARD_DESC="Wrap the content in a card with a white backgro ; Hero mode MOD_MOKOJOOMHERO_MODE_LABEL="Hero Mode" -MOD_MOKOJOOMHERO_MODE_DESC="Choose between a slideshow of images or a background video." +MOD_MOKOJOOMHERO_MODE_DESC="Choose between a slideshow of images, an embedded video (YouTube/Vimeo), or a local video file." MOD_MOKOJOOMHERO_MODE_IMAGES="Images" -MOD_MOKOJOOMHERO_MODE_VIDEO="Video" +MOD_MOKOJOOMHERO_MODE_VIDEO="Video (YouTube/Vimeo)" +MOD_MOKOJOOMHERO_MODE_LOCALVIDEO="Local Video" ; Image settings MOD_MOKOJOOMHERO_IMAGE_FOLDER_LABEL="Image Folder" @@ -33,9 +34,21 @@ 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_DESC="Time between slides in milliseconds (e.g. 5000 = 5 seconds)." -; Video settings +; Video settings (embedded) MOD_MOKOJOOMHERO_VIDEO_FILE_LABEL="Video URL" -MOD_MOKOJOOMHERO_VIDEO_FILE_DESC="Local file path, YouTube URL, or Vimeo URL. Any format works - the module auto-detects the source." +MOD_MOKOJOOMHERO_VIDEO_FILE_DESC="YouTube or Vimeo URL. The module auto-detects the source." + +; Local video settings +MOD_MOKOJOOMHERO_LOCAL_VIDEO_LABEL="Video File" +MOD_MOKOJOOMHERO_LOCAL_VIDEO_DESC="Select a video file from the Media Manager (mp4, webm, ogg)." + +; Card delay +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." + +; 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)." ; Hero height MOD_MOKOJOOMHERO_HERO_HEIGHT_LABEL="Hero Height" diff --git a/src/media/css/mod_mokojoomhero.css b/src/media/css/mod_mokojoomhero.css index 47b4c35..0bbb386 100644 --- a/src/media/css/mod_mokojoomhero.css +++ b/src/media/css/mod_mokojoomhero.css @@ -7,7 +7,7 @@ * INGROUP: MokoJoomHero.Module * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoJoomHero * PATH: /src/css/template.css - * VERSION: 01.03.00 + * VERSION: 01.03.02 * BRIEF: Hero module stylesheet — slideshow, video background, overlay */ diff --git a/src/media/js/mod_mokojoomhero.js b/src/media/js/mod_mokojoomhero.js index 2886606..364a16a 100644 --- a/src/media/js/mod_mokojoomhero.js +++ b/src/media/js/mod_mokojoomhero.js @@ -8,7 +8,7 @@ * INGROUP: MokoJoomHero.Module * REPO: https://git.mokoconsulting.tech/MokoConsulting/MokoJoomHero * PATH: /src/js/template.js - * VERSION: 01.03.00 + * VERSION: 01.03.02 * BRIEF: Hero module JavaScript — image slideshow crossfade */ diff --git a/src/mod_mokojoomhero.php b/src/mod_mokojoomhero.php index 58a6c2a..a57ed9a 100644 --- a/src/mod_mokojoomhero.php +++ b/src/mod_mokojoomhero.php @@ -37,6 +37,7 @@ $heroContent = $params->get('heroContent', ''); $showCard = (bool) $params->get('showCard', 1); $cardDelay = (int) $params->get('cardDelay', 0); $showMuteToggle = (bool) $params->get('showMuteToggle', 0); +$localVideoFile = $params->get('localVideoFile', ''); // Collect hero images $heroImages = []; @@ -70,7 +71,9 @@ $videoUrl = ''; $youtubeId = ''; $vimeoId = ''; -if ($heroMode === 'video' && $videoFile) { +if ($heroMode === 'localvideo' && $localVideoFile) { + $videoUrl = Uri::root() . ltrim($localVideoFile, '/'); +} elseif ($heroMode === 'video' && $videoFile) { // 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)) { $youtubeId = $m[1]; diff --git a/src/mod_mokojoomhero.xml b/src/mod_mokojoomhero.xml index 8063846..5fd6a19 100644 --- a/src/mod_mokojoomhero.xml +++ b/src/mod_mokojoomhero.xml @@ -22,12 +22,15 @@ https://mokoconsulting.tech Copyright (C) 2026 Moko Consulting. All rights reserved. GPL-3.0-or-later - 01.03.00 + 01.03.02-dev Displays a random hero image slideshow or background video with content overlaid. Designed for MokoOnyx template. By Moko Consulting. + script.php + mod_mokojoomhero.php mod_mokojoomhero.xml + script.php tmpl language @@ -57,6 +60,7 @@ > + + diff --git a/src/script.php b/src/script.php new file mode 100644 index 0000000..b5edcd1 --- /dev/null +++ b/src/script.php @@ -0,0 +1,26 @@ +?autoplay=1&mute=1&loop=1&playlist=&controls=0&showinfo=0&rel=0&modestbranding=1&playsinline=1&enablejsapi=1&origin=" allow="autoplay; encrypted-media" allowfullscreen> - + @@ -63,7 +63,7 @@ $heightAttr = htmlspecialchars($heroHeight, ENT_QUOTES, 'UTF-8'); - + diff --git a/updates.xml b/updates.xml index 3b3ec9b..074f79f 100644 --- a/updates.xml +++ b/updates.xml @@ -1,7 +1,7 @@ @@ -87,13 +87,13 @@ mod_mokojoomhero module site - 01.03.01-dev + 01.03.02-dev 2026-05-30 https://git.mokoconsulting.tech/MokoConsulting/MokoJoomHero/releases/tag/development - https://git.mokoconsulting.tech/MokoConsulting/MokoJoomHero/releases/download/development/mod_mokojoomhero-01.03.01-dev.zip + https://git.mokoconsulting.tech/MokoConsulting/MokoJoomHero/releases/download/development/mod_mokojoomhero-01.03.02-dev.zip - 0a9abb217f20ded4d261789fb6d573c167de45c4a39a057b9db0be0a85157398 + f6842ab176d55cc8b1f767de2b08b6ab69bdc06510bc5bb19bd54292e6dafbe5 dev https://git.mokoconsulting.tech/MokoConsulting/MokoJoomHero/raw/branch/main/CHANGELOG.md Moko Consulting