Skip to content

Castopod Plugins

This content is not available in your language yet.

Plugins let you extend Castopod with new features and custom functionality.

Each plugin lives in the plugins/ directory under its vendor’s folder (the organization or person who created it):

  • Directoryplugins
    • Directoryacme
      • Directoryhello-world/ # “hello-world/” is a plugin authored by the vendor “acme”.
    • Directoryatlantis/

Castopod automatically detects valid plugins in the plugins/ directory.

🧩👉 Browse and download plugins from the official plugin repository: plugins.castopod.org.

This official open source repository includes plugins developed and maintained by the Castopod team and contributions from community developers, so you can easily add new features and enhancements to your podcasting setup!

  • Directoryhello-world
    • Directoryi18n
      • en.json
      • fr.json
    • icon.svg
    • manifest.json // required
    • LICENSE.md
    • Plugin.php // required
    • README.md

The plugin manifest is a JSON file containing the plugin’s metadata and technical declarations.

This file will determine whether a plugin is valid or not. The minimal required data being:

manifest.json
{
"name": "acme/hello-world",
"version": "1.0.0",
"minCastopodVersion": "2.0.0"
}

Checkout the manifest.json reference.

This is where the plugin’s logic lives.

The Plugin class extends Castopod’s BasePlugin class and implements one or more Hooks (methods) intended to be run throughout Castopod’s codebase.

Plugin.php
<?php
declare(strict_types=1);
use Modules\Plugins\Core\BasePlugin;
class AcmeHelloWorldPlugin extends BasePlugin
{
// this rssBeforeChannel method is a Hook
public function rssBeforeChannel(Podcast $podcast): void
{
// …
}
}

The README.md file should contain with any additional information to help guide the user in using the plugin.

It is loaded on Castopod’s admin area when the plugin is installed.

In addition to specifying the license in the manifest, you may add a LICENSE.md file.

Just like the README.md file, its contents will be loaded into Castopod’s admin area, in the plugin’s view page for the user to read.

Generally, the plugin icon is displayed next to its title, it is an SVG file intended to give a graphical representation of the plugin.

The icon should be squared, and be legible in a 64px by 64px circle.

Plugins can be translated. Translation strings live inside the i18n folder. Translation files are JSON files named as locale keys:

  • Directoryi18n
    • en.json // default locale
    • fr.json
    • de.json

Supported locales are: br,ca,de,en,es,fr,nn-no,pl,pt-br,sr-latn,zh-hans.

The translation strings allow you to translate the title, description and settings keys (ie. labels, hints, helpers, etc.).

i18n/en.json
{
"title": "Hello, World!",
"description": "A Castopod plugin to greet the world!",
"settings": {
"general": {
"field-key": {
"label": "Enter a text",
"hint": "You can enter any type of character."
}
},
"podcast": {},
"episode": {}
}
}