Files
CodePress/plugins

CodePress CMS Plugins

Deze map bevat alle plugins voor de CodePress CMS. Elke plugin heeft zijn eigen submap.

Plugin overzicht

Plugin Type Essentieel Beschrijving
Dashboard system ja Site informatie, content statistieken en plugin overzicht op het dashboard
GeoIPInfo system nee GeoIP-informatie (IP adres en land) in admin
HTMLBlock content nee Custom HTML-blok in de sidebar van content-pagina's
Logs system nee Admin activiteitlogs en front-end request logs met filter tabs
Navigation content ja Navigatie voor handleidingen en content (beschermd)
Statistics system nee Bezoekersstatistieken: views, unieke bezoekers, landen, top pagina's

Elke plugin heeft een eigen README.md met specifieke documentatie.

Plugin structuur (uniform)

Elke plugin-map heeft de volgende structuur:

PluginName/
├── PluginName.php          # Hoofd plugin class (naam = mapnaam)
├── plugin.json              # Plugin metadata + instellingen-schema
├── README.md                # Plugin documentatie
├── config.json              # Optionele runtime configuratie (overschrijft defaults)
├── assets/                  # Optionele CSS/JS/SCSS (.gitkeep als leeg)
│   ├── css/
│   └── scss/
└── language/                # Vertalingen
    ├── nl/
    │   ├── admin.php        # Admin labels (systeem plugins)
    │   └── site.php         # Front-end labels (content plugins)
    └── en/
        ├── admin.php
        └── site.php

plugin.json velden

Veld Waarde Beschrijving
name string Weergavenaam in admin
version string Versienummer
author string Auteur
description string Korte beschrijving
type "system" of "content" Systeem (blauwe badge) of content (groene badge)
essential boolean Essentiële plugins kunnen niet worden bewerkt/verwijderd
hasConfig boolean Toont een Config-knop in admin
default_language string Fallback taal voor plugin-vertalingen (bijv. nl)
settings array Instellingen-schema (zie hieronder)

Instellingen-schema

Elke instelling in settings ondersteunt:

Veld Beschrijving
key Instelling-sleutel (opgeslagen in config.json)
type text, checkbox, number, select, multi-select
default Standaardwaarde
label Hardcoded label (fallback als geen label_key)
help Hardcoded help-tekst (fallback als geen help_key)
label_key Sleutel in plugin language/<lang>/admin.php voor vertaald label
help_key Sleutel in plugin language/<lang>/admin.php voor vertaalde help-tekst
option_label_key Sleutel naar een array met optie-labels voor select/multi-select
options Opties voor select/multi-select ({waarde: label})

Taal support

  • Systeem plugins volgen de geselecteerde admin taal (uit config.admin_language).
  • Content plugins volgen de geselecteerde content taal (uit de URL of config.language.default).

Fallback chain voor plugin-vertalingen:

  1. Geselecteerde taal (language/<lang>/admin.php of site.php)
  2. Plugin default_language (plugin.json)
  3. CMS language.default
  4. Lege array (sleutel wordt ongewijzigd getoond)

Plugins halen hun vertalingen op via de API:

  • Systeem plugins: $this->api->getPluginTranslations('PluginName') (AdminPluginAPI)
  • Content plugins: $this->api->getPluginTranslations('PluginName') (CMSAPI)

Uitgebreide documentatie

Zie de handleiding voor uitgebreide plugin development documentatie:

  • guide/nl/codepress-developer/plugin-development.md
  • guide/en/codepress-developer/plugin-development.md

Installatie

  1. Maak een nieuwe map in plugins/ (mapnaam = plugin class naam)
  2. Voeg de hoofd plugin class toe als <Naam>.php
  3. Maak een plugin.json met metadata en (optioneel) instellingen-schema
  4. Voeg een README.md toe met plugin documentatie
  5. Voeg language/<lang>/admin.php of site.php toe voor vertalingen
  6. Schakel de plugin in via enabled_plugins in config.json (of via de admin Plugins-pagina)