Plugins extend Vvveb CMS by adding new features, modifying existing behavior, or integrating external services.
Each plugin lives in its own directory under plugins/my-plugin-name. When distributing a plugin as a ZIP file, the archive must contain a single top‑level folder matching the plugin’s slug (e.g., my-plugin-name/).
A valid plugin must include at least one file:
plugins/my-plugin-name/plugin.php
This file contains the plugin metadata header and the main plugin class.
Plugin Folder Structure
Plugins follow a structure similar to the CMS itself, allowing them to provide controllers, templates, SQL files, components, public assets, and optional installation scripts.
Not all folders are required; a plugin may include only what it needs.
A full plugin structure looks like this:
my-plugin-name/
├── plugin.php # Main plugin file (required)
├── plugin.svg # Plugin thumbnail (optional)
│
├── app/ # Frontend functionality
│ ├── controller/
│ │ └── index.php # Optional frontend controller
│ ├── template/
│ │ ├── common.tpl # Shared template
│ │ └── index.tpl # Frontend page template
│ └── validate/
│ └── plugin-form.php # Optional validation rules
│
├── admin/ # Admin-side functionality
│ ├── controller/
│ │ └── index.php # Admin controller (settings, tools)
│ ├── template/
│ │ └── settings.tpl # Admin settings page template
│ └── validate/
│ └── plugin-form.php # Optional validation rules
│
├── public/ # Public assets
│ ├── admin/
│ │ └── settings.html # HTML for admin settings UI
│ ├── app/
│ │ └── index.html # HTML for frontend UI
│ ├── js/
│ │ └── plugin.js # Optional JavaScript
│ └── css/
│ └── plugin.css # Optional CSS
│
├── install/ # Optional installation scripts
│ └── sql/
│ ├── mysql/plugin.sql # MySQL schema
│ ├── pgsql/plugin.sql # PostgreSQL schema
│ └── sqlite/plugin.sql # SQLite schema
│
├── sql/ # Runtime SQL queries
│ ├── mysql/plugin.sql
│ ├── pgsql/plugin.sql
│ └── sqlite/plugin.sql
│
├── component/
│ └── mycomponent.php # Custom component provided by plugin
│
├── system/
│ ├── plugin.php # Custom libraries or helpers
│ └── library.php # Additional system utilities
│
└── vendor/ # Third‑party libraries (optional)
Plugins are one of the most powerful parts of Vvveb’s architecture.