2026-03-17 18:41:07 -05:00
2026-03-17 18:41:07 -05:00
2026-03-17 18:41:07 -05:00
2026-03-17 18:41:07 -05:00
2026-03-17 18:41:07 -05:00
2026-03-17 18:41:07 -05:00
2026-03-17 18:41:07 -05:00
2026-03-17 18:41:07 -05:00
2026-03-17 18:41:07 -05:00
2026-03-17 18:41:07 -05:00
2026-03-17 18:41:07 -05:00
2026-03-17 18:41:07 -05:00

MokoStandards-Template-Joomla-Module

A repository template for Joomla Module development projects following MokoStandards.

License

Table of Contents

  1. Overview
  2. Features
  3. Prerequisites
  4. Installation
  5. Usage
  6. Project Structure
  7. Development
  8. Testing
  9. Building
  10. Contributing
  11. Versioning
  12. License
  13. Support

Overview

This is a standardized template repository for creating Joomla modules that conform to Moko Consulting's development standards and best practices. It provides a consistent starting point with pre-configured tooling, documentation structure, and development workflows.

Use this template when creating new Joomla modules to ensure:

  • Consistent code structure and organization
  • Pre-configured development tools (linters, formatters)
  • Standardized documentation and contribution guidelines
  • Built-in build and deployment workflows

Features

  • Standardized Structure: Pre-organized directories for source code, documentation, and scripts
  • Build Automation: Makefile with common tasks (lint, build, package, install)
  • Code Quality: Pre-configured PHP linting and CodeSniffer for Joomla standards
  • Development Tools: EditorConfig for consistent coding styles across IDEs
  • Documentation: Template structure following MokoStandards documentation practices
  • Git Configuration: Pre-configured git attributes, ignore patterns, and commit message templates

Prerequisites

Before using this template, ensure you have the following installed:

  • PHP: 7.4 or higher (8.0+ recommended for Joomla 4.x/5.x)
  • Composer: For PHP dependency management (optional but recommended)
  • Joomla: A working Joomla installation for testing (3.x, 4.x, or 5.x)
  • PHP CodeSniffer: For code quality checks (composer global require squizlabs/php_codesniffer)
  • Make: GNU Make for running build commands
  • Git: For version control

Installation

Using This Template

  1. Create a new repository from this template:

    • Click "Use this template" button on GitHub
    • Or clone and remove git history:
      git clone https://github.com/mokoconsulting-tech/MokoStandards-Template-Joomla-Module.git my-joomla-module
      cd my-joomla-module
      rm -rf .git
      git init
      
  2. Customize for your module:

    • Update Makefile with your module name, type, and version
    • Update this README with your module's specific information
    • Update LICENSE file with appropriate copyright holder
    • Create your module files in the src/ directory
  3. Initialize git:

    git add .
    git commit -m "feat: initial commit from template"
    

Usage

Quick Start

  1. Configure your module in the Makefile:

    MODULE_NAME := yourmodulename
    MODULE_TYPE := site    # or 'admin' for backend modules
    MODULE_VERSION := 1.0.0
    
  2. Run the help command to see available tasks:

    make help
    
  3. Develop your module in the src/ directory

  4. Validate your code:

    make validate
    
  5. Build the module package:

    make build
    

Common Tasks

See the Development Guide for detailed development workflows.

Project Structure

.
├── docs/               # Documentation files
├── scripts/            # Build and deployment scripts
├── src/                # Module source code
├── .editorconfig       # Editor configuration
├── .gitignore          # Git ignore patterns
├── .gitmessage         # Git commit message template
├── Makefile            # Build automation
└── README.md           # This file

Development

Setting Up Development Environment

  1. Install dependencies:

    # Install PHP CodeSniffer globally
    composer global require squizlabs/php_codesniffer
    composer global require dealerdirect/phpcodesniffer-composer-installer
    
  2. Configure your IDE to use the .editorconfig settings

  3. Set up pre-commit hooks (optional):

    git config commit.template .gitmessage
    

Development Workflow

See docs/DEVELOPMENT.md for detailed development guidelines.

Code Style

This project follows:

  • Joomla Coding Standards for PHP
  • Tab indentation (width: 2 spaces)
  • LF line endings
  • UTF-8 encoding

Testing

Manual Testing

  1. Create development symlink:

    # Update JOOMLA_ROOT in Makefile first
    make dev-install
    
  2. Test in Joomla:

    • Enable the module in Joomla admin
    • Assign to a module position
    • Test on frontend/backend

Automated Testing

make lint      # PHP syntax check
make phpcs     # Code standards check
make validate  # Run all checks

Building

Build Module Package

make build

This creates a ZIP package in the dist/ directory ready for installation in Joomla.

Installing to Joomla

Option 1: Upload via Joomla Admin

make install-local

Then upload the generated ZIP file via Extensions > Manage > Install

Option 2: Development Symlink

make dev-install

Creates a symlink for development (requires configured JOOMLA_ROOT)

Contributing

We welcome contributions! Please see CONTRIBUTING.md for guidelines.

Quick Contribution Guide

  1. Fork the repository
  2. Create a feature branch (git checkout -b feat/amazing-feature)
  3. Commit your changes using conventional commits
  4. Push to your branch
  5. Open a Pull Request

Versioning

This project uses Semantic Versioning:

  • MAJOR: Incompatible API changes
  • MINOR: New functionality (backward compatible)
  • PATCH: Bug fixes (backward compatible)

See CHANGELOG.md for version history.

License

Copyright (C) 2026 Moko Consulting hello@mokoconsulting.tech

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 along with this program. If not, see https://www.gnu.org/licenses/.

SPDX-License-Identifier: GPL-3.0-or-later

License Management

This repository includes a GitHub Actions workflow for syncing all GPL licenses (GPL-2.0, GPL-3.0, LGPL-2.1, LGPL-3.0) from www.gnu.org. The workflow must be triggered manually - automatic scheduling is disabled. The primary GPL-3.0 license is maintained in the LICENSE file, with additional licenses stored in the licenses/ directory. For enterprise environments with firewall restrictions, see Firewall Configuration Guide for required network access configuration.

Support

Acknowledgments

This template is maintained by Moko Consulting and follows MokoStandards for consistent, high-quality Joomla module development.

S
Description
Joomla hero module - image slideshow, video backgrounds, solid color/gradient, parallax, content animations, A/B testing, scheduling, and card overlay. Free and open source.
https://mokoconsulting.tech/support/products/mokojoomhero Readme GPL-3.0
3.4 MiB
2026-06-04 23:47:15 +00:00
Languages
Markdown 33.4%
INI 21.5%
PHP 11.8%
XML 9.8%
Makefile 6.5%
Other 17%