Tactical Game Organizer
Plugin for organizing airsoft events and managing teams
by NaGora · github.com/pavloborysenko/tactical_game_organizer · website
Install
No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:
wp plugin install https://github.com/pavloborysenko/tactical_game_organizer/archive/refs/heads/master.zipWordPress plugin for organizing airsoft events with participant registration and Telegram integration.
Description
Tactical Game Organizer is a WordPress plugin designed to help airsoft communities manage their game events. It provides a comprehensive solution for event organization, field management, and player registration with role-based participation.
Features
- Custom post types for Events and Fields
- Event management with:
- Date and time scheduling
- Maximum participants limit
- Field location assignment
- Event details and rules
- Role restrictions per event
- Participant progress tracking
- Field management with:
- Location information
- Field description
- Photo gallery
- Geolocation
- Player registration system:
- Custom Player role
- Registration/unregistration for events
- Player profile with callsign, role, and team
- Telegram integration:
- Event registration via Telegram bot
- Event notifications
- Player management
Requirements
- WordPress 5.8 or higher
- PHP 7.4 or higher
- Composer (for development)
Installation
- Download the plugin
- Upload to your WordPress plugins directory
- Activate the plugin through WordPress admin interface
Development Installation
# Clone the repository
git clone [repository-url]
# Install dependencies
composer install
Usage
Creating an Event
- Go to WordPress admin panel
- Navigate to "Events" → "Add New"
- Fill in the event details:
- Title
- Description
- Date and time
- Maximum participants
- Select game field
- Configure allowed roles
- Publish the event
Managing Fields
- Go to "Fields" → "Add New"
- Add field information:
- Name
- Description
- Location
- Photos
- Publish the field
Player Registration
- Players must be logged in and have the 'Player' role
- On the event page, players can:
- View current participants
- See available roles
- Register with their preferred role
- View event capacity
- The system will:
- Remember their last used role
- Default to 'Assault' if preferred role is unavailable
- Show registration status
- Prevent registration if event is full
Development
Project Structure
tactical-game-organizer/
├── src/
│ ├── PostTypes/
│ │ ├── Event.php
│ │ └── Field.php
│ ├── Users/
│ │ ├── EventRegistration.php
│ │ ├── UserFields.php
│ │ └── Roles.php
│ ├── Roles/
│ │ └── PlayerRoles.php
│ └── Meta/
│ └── EventMeta.php
├── assets/
│ ├── css/
│ │ └── event-registration.css
│ └── js/
│ └── event-registration.js
├── tests/
│ ├── Unit/
│ │ └── PostTypes/
│ │ └── EventTest.php
│ └── bootstrap.php
├── languages/
├── vendor/
├── composer.json
├── composer.lock
├── phpunit.xml
├── README.md
└── tactical_game_organizer.php
Coding Standards
This project follows WordPress Coding Standards and PSR-12. To check your code:
# Run PHP CodeSniffer
composer run-script phpcs
# Fix coding standards automatically
composer run-script phpcbf
Testing
The plugin uses PHPUnit for unit testing and WP_Mock for mocking WordPress functions.
# Run all tests
composer run-script test
# Run tests with coverage report
composer run-script test:coverage
Writing Tests
- Create a new test class in
tests/Unitdirectory - Extend
PHPUnit\Framework\TestCase - Use WP_Mock for WordPress functions
- Follow the naming convention:
*Test.php
Example test:
class EventTest extends TestCase {
public function setUp(): void {
parent::setUp();
WP_Mock::setUp();
}
public function tearDown(): void {
WP_Mock::tearDown();
parent::tearDown();
}
public function testSomething(): void {
// Arrange
WP_Mock::userFunction('wp_function', [
'times' => 1,
'return' => 'expected value',
]);
// Act
$result = do_something();
// Assert
$this->assertEquals('expected value', $result);
}
}
Contributing
- Fork the repository
- Create your feature branch
- Write tests for your changes
- Ensure all tests pass
- Commit your changes
- Push to the branch
- Create a Pull Request
License
GPL-2.0-or-later - see LICENSE for details.