-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbootstrap.php
executable file
·41 lines (41 loc) · 1.72 KB
/
bootstrap.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<?
//The default launcher of the comment app is removed
Event::register_function('config|noviusos_comments::metadata', function(&$config)
{
unset($config['launchers']);
});
Event::register_function('config|noviusos_comments::orm/behaviour/commentable', function(&$config)
{
$config['actions']['comments']['visible'] = function($item) { return false; };
unset($config['data_mapping']['comments_count']);
});
\View::redirect('noviusos_comments::front/list', false, function(&$datas){
$config = \Lib\Disqus\Controller_Admin_Config::getOptions();
$config = \Arr::get($config, \Nos\Nos::main_controller()->getContext());
if (isset($config['disqus_shortname']) && $config['disqus_shortname'] != '') {
$datas['config'] = $config;
return 'lib_disqus::front/main';
} else {
return 'lib_disqus::front/no_disqus';
}
});
\View::redirect('noviusos_comments::front/form', false, function(&$datas){
$config = \Lib\Disqus\Controller_Admin_Config::getOptions();
$config = \Arr::get($config, \Nos\Nos::main_controller()->getContext());
if (isset($config['disqus_shortname']) && $config['disqus_shortname'] != '') {
$datas['config'] = $config;
return 'lib_disqus::front/main';
} else {
return 'lib_disqus::front/no_disqus';
}
});
\View::redirect('noviusos_blognews::front/comment/nb', false, function(&$datas){
$config = \Lib\Disqus\Controller_Admin_Config::getOptions();
$config = \Arr::get($config, \Nos\Nos::main_controller()->getContext());
if (isset($config['disqus_shortname']) && $config['disqus_shortname'] != '') {
$datas['config'] = $config;
return 'lib_disqus::front/nb';
} else {
return 'lib_disqus::front/no_disqus';
}
});