periodical/_prepend.php

41 lines
1.2 KiB
PHP
Raw Normal View History

2021-08-23 11:24:19 +00:00
<?php
# -- BEGIN LICENSE BLOCK ----------------------------------
#
# This file is part of periodical, a plugin for Dotclear 2.
#
2021-08-23 21:27:03 +00:00
# Copyright (c) 2009-2021 Jean-Christian Denis and contributors
2021-08-23 11:24:19 +00:00
#
# Licensed under the GPL version 2.0 license.
# A copy of this license is available in LICENSE file or at
# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
#
# -- END LICENSE BLOCK ------------------------------------
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']
);