periodical/_prepend.php

41 lines
1.0 KiB
PHP
Raw Normal View History

2021-08-23 11:24:19 +00:00
<?php
2021-09-02 12:56:02 +00:00
/**
* @brief periodical, a plugin for Dotclear 2
*
* @package Dotclear
* @subpackage Plugin
*
* @author Jean-Christian Denis and contributors
*
* @copyright Jean-Christian Denis
* @copyright GPL-2.0 https://www.gnu.org/licenses/gpl-2.0.html
*/
2021-08-23 11:24:19 +00:00
if (!defined('DC_RC_PATH')) {
2021-08-23 22:52:29 +00:00
return null;
2021-08-23 11:24:19 +00:00
}
# Check Dotclear version
if (!method_exists('dcUtils', 'versionsCompare')
2021-08-23 22:52:29 +00:00
|| dcUtils::versionsCompare(DC_VERSION, '2.18', '<', false)) {
return null;
2021-08-23 11:24:19 +00:00
}
2021-08-23 22:52:29 +00:00
$d = dirname(__FILE__) . '/inc/';
2021-08-23 11:24:19 +00:00
# DB class
2021-08-23 22:52:29 +00:00
$__autoload['periodical'] = $d . 'class.periodical.php';
2021-08-23 11:24:19 +00:00
# Admin list and pagers
2021-08-23 22:52:29 +00:00
$__autoload['adminPeriodicalList'] = $d . 'lib.index.pager.php';
2021-08-23 11:24:19 +00:00
# Add to plugn soCialMe (writer part)
2021-08-23 22:52:29 +00:00
$__autoload['periodicalSoCialMeWriter'] = $d . 'lib.periodical.socialmewriter.php';
2021-08-23 11:24:19 +00:00
$core->addBehavior(
2021-08-23 22:52:29 +00:00
'soCialMeWriterMarker',
['periodicalSoCialMeWriter', 'soCialMeWriterMarker']
2021-08-23 11:24:19 +00:00
);
$core->addBehavior(
2021-08-23 22:52:29 +00:00
'periodicalAfterPublishedPeriodicalEntry',
['periodicalSoCialMeWriter', 'periodicalAfterPublishedPeriodicalEntry']
);