This commit is contained in:
Xes
2025-08-14 22:39:38 +02:00
parent 3641e93527
commit 5403f346e3
3370 changed files with 327179 additions and 0 deletions

View File

@@ -0,0 +1,55 @@
<?php
/* For licensing terms, see /license.txt */
/**
* Class DictionaryPlugin.
*/
class DictionaryPlugin extends Plugin
{
/**
* DictionaryPlugin constructor.
*/
protected function __construct()
{
parent::__construct(
'1.0',
'Julio Montoya',
[
'enable_plugin_dictionary' => 'boolean',
]
);
}
/**
* @return DictionaryPlugin|null
*/
public static function create()
{
static $result = null;
return $result ? $result : $result = new self();
}
/**
* Installation process.
*/
public function install()
{
$sql = "CREATE TABLE IF NOT EXISTS plugin_dictionary (
id INT NOT NULL AUTO_INCREMENT,
term VARCHAR(255) NOT NULL,
definition LONGTEXT NOT NULL,
PRIMARY KEY (id));
";
Database::query($sql);
}
/**
* Uninstall process.
*/
public function uninstall()
{
$sql = "DROP TABLE IF EXISTS plugin_dictionary";
Database::query($sql);
}
}