I’d like to know if any phpList developers here have insight on writing brand-new plugins.
The directory of plugins at https://resources.phplist.com/plugins/start has work that follows a few different styles. It appears there isn’t clear documentation, though, on an approach and which hooks are available where.
For example, listcleaner uses a listcleaner.php file and then a listcleaner folder with another PHP file in it. listcleaner calls the filetherein unbounce.php whereas conditionalPlaceholderPlugin calls it config.php. But fckphplist and CKEditorPlugin don’t follow this, so it doesn’t appear to be a requirement.
Then, in the plugin code itself, most start with this kind of base config, like this example in listcleaner:
class listcleaner extends phplistPlugin {
public $name = "List cleaner plugin for phpList";
public $coderoot = 'listcleaner/';
public $version = "0.2";
public $authors = 'Michiel Dethmers';
public $enabled = 1;
public $description = ""
Some include this same snippet, like here verbatim in conditionalPlaceholder:
// This plugin has no web pages. So make sure that nothing appears in the
// dashboard menu
function adminmenu() {
return array(
);
}
It would be great if the basics were all somewhere. I’d like to contribute a plugin for my first topic – Schema markup for one-click to confirm subscription? – but it looks like there’s a bit of R&D to just get up to speed here.
Any tips or documentation appreciated.
Cheers,
Aaron Proctor
FWD:labs