noodles/_prepend.php

48 lines
1,000 B
PHP
Raw Normal View History

2021-09-08 22:53:13 +00:00
<?php
/**
2021-09-08 23:05:05 +00:00
* @brief noodles, a plugin for Dotclear 2
2022-11-17 20:00:42 +00:00
*
* @package Dotclear
2021-09-08 23:05:05 +00:00
* @subpackage Plugin
2022-11-17 20:00:42 +00:00
*
2021-09-08 23:05:05 +00:00
* @author Jean-Christian Denis and contributors
2022-11-17 20:00:42 +00:00
*
* @copyright Jean-Christian Denis
* @copyright GPL-2.0 https://www.gnu.org/licenses/gpl-2.0.html
*/
2021-09-09 07:12:31 +00:00
if (!defined('DC_RC_PATH')) {
return null;
2021-09-09 07:12:31 +00:00
}
2021-09-08 22:53:13 +00:00
2022-12-02 00:07:48 +00:00
Clearbricks::lib()->autoload([
'noodlesImg' => __DIR__ . '/inc/lib.noodles.img.php',
'noodlesLibImagePath' => __DIR__ . '/inc/lib.image.path.php',
]);
2021-09-08 22:53:13 +00:00
2022-11-17 20:00:42 +00:00
dcCore::app()->blog->settings->addNamespace('noodles');
2021-09-08 22:53:13 +00:00
2022-11-17 20:00:42 +00:00
dcCore::app()->url->register(
'noodlesmodule',
'noodles',
'^noodles/(.+)$',
2021-09-09 07:12:31 +00:00
['urlNoodles', 'noodles']
);
2022-11-17 20:00:42 +00:00
dcCore::app()->url->register(
'noodlesservice',
'noodle',
'^noodle/$',
2021-09-09 07:12:31 +00:00
['urlNoodles', 'service']
2021-10-30 19:53:30 +00:00
);
2022-11-17 20:00:42 +00:00
dcCore::app()->url->register(
2021-10-30 19:53:30 +00:00
'noodlescss',
2021-10-30 20:03:16 +00:00
'noodles.css',
'^noodles\.css',
2021-10-30 19:53:30 +00:00
['urlNoodles', 'css']
);
2022-11-17 20:00:42 +00:00
dcCore::app()->url->register(
2021-10-30 19:53:30 +00:00
'noodlesjs',
2021-10-30 20:03:16 +00:00
'noodles.js',
'^noodles\.js',
2021-10-30 19:53:30 +00:00
['urlNoodles', 'js']
2022-11-17 20:00:42 +00:00
);