2021-08-23 23:55:52 +00:00
|
|
|
<?php
|
2021-09-02 18:35:25 +00:00
|
|
|
/**
|
|
|
|
* @brief enhancePostContent, a plugin for Dotclear 2
|
2021-11-01 09:33:43 +00:00
|
|
|
*
|
2021-09-02 18:35:25 +00:00
|
|
|
* @package Dotclear
|
|
|
|
* @subpackage Plugin
|
2021-11-01 09:33:43 +00:00
|
|
|
*
|
2021-09-02 18:35:25 +00:00
|
|
|
* @author Jean-Christian Denis and Contributors
|
2021-11-01 09:33:43 +00:00
|
|
|
*
|
2021-09-02 18:35:25 +00:00
|
|
|
* @copyright Jean-Christian Denis
|
|
|
|
* @copyright GPL-2.0 https://www.gnu.org/licenses/gpl-2.0.html
|
|
|
|
*/
|
2021-08-23 23:55:52 +00:00
|
|
|
if (!defined('DC_RC_PATH')) {
|
2021-08-24 20:05:23 +00:00
|
|
|
return null;
|
2021-08-23 23:55:52 +00:00
|
|
|
}
|
|
|
|
|
2021-10-31 22:22:34 +00:00
|
|
|
$filters = [
|
|
|
|
'Tag',
|
|
|
|
'Search',
|
|
|
|
'Acronym',
|
|
|
|
'Abbreviation',
|
|
|
|
'Definition',
|
|
|
|
'Citation',
|
|
|
|
'Link',
|
|
|
|
'Replace',
|
|
|
|
'Update',
|
2022-11-13 20:30:48 +00:00
|
|
|
'Twitter',
|
2021-10-31 22:22:34 +00:00
|
|
|
];
|
|
|
|
|
2022-11-13 20:30:48 +00:00
|
|
|
$d = __DIR__ . '/inc/';
|
2021-08-23 23:55:52 +00:00
|
|
|
|
2022-11-13 20:30:48 +00:00
|
|
|
Clearbricks::lib()->autoload(['libEPC' => $d . 'lib.epc.php']);
|
|
|
|
Clearbricks::lib()->autoload(['epcFilter' => $d . 'lib.epc.filter.php']);
|
|
|
|
Clearbricks::lib()->autoload(['epcRecords' => $d . 'lib.epc.records.php']);
|
|
|
|
Clearbricks::lib()->autoload(['adminEpcList' => $d . 'lib.epc.pager.php']);
|
2021-10-30 20:05:31 +00:00
|
|
|
|
2021-11-01 09:33:43 +00:00
|
|
|
foreach ($filters as $f) {
|
2022-11-13 20:30:48 +00:00
|
|
|
Clearbricks::lib()->autoload(['epcFilter' . $f => $d . 'lib.epc.filters.php']);
|
|
|
|
dcCore::app()->addBehavior('enhancePostContentFilters', ['epcFilter' . $f, 'create']);
|
2021-10-31 22:22:34 +00:00
|
|
|
}
|
|
|
|
|
2022-11-13 20:30:48 +00:00
|
|
|
dcCore::app()->url->register(
|
2021-10-30 20:05:31 +00:00
|
|
|
'epccss',
|
|
|
|
'epc.css',
|
|
|
|
'^epc\.css',
|
|
|
|
['publicEnhancePostContent', 'css']
|
2021-11-01 09:33:43 +00:00
|
|
|
);
|