-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.php
More file actions
50 lines (41 loc) · 1.25 KB
/
config.php
File metadata and controls
50 lines (41 loc) · 1.25 KB
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
42
43
44
45
46
47
48
49
50
<?php
$t = $this->getTranslator();
$t->addTranslation(__DIR__.'/lang');
try {
$od = null;
$od = \Cetera\ObjectDefinition::findByAlias( 'comments' );
}
catch (\Exception $e) {}
if ($od) {
$od->registerClass( $od->id , '\Comments\Comment' );
\Cetera\Material::addPlugin( '\Comments\Plugin' );
$this->registerWidget(array(
'name' => 'Comments.Add',
'class' => '\\Comments\\WidgetAdd',
'not_placeable' => true
));
$this->registerWidget(array(
'name' => 'Comments.List',
'class' => '\\Comments\\WidgetList',
'describ' => $t->_('Комментарии'),
'icon' => '/cms/plugins/comments/images/icon.png',
'ui' => 'Plugin.comments.Widget',
));
define('GROUP_COMMENTS', -103);
$this->addUserGroup(array(
'id' => GROUP_COMMENTS,
'name' => $t->_('Модераторы комментариев'),
'describ' => '',
));
if ($this->getBo() && $this->getUser() && $this->getUser()->hasRight(GROUP_COMMENTS) )
{
$this->getBo()->addModule(array(
'id' => 'comments',
'position' => MENU_SITE,
'name' => $t->_('Комментарии'),
'icon' => '/cms/plugins/comments/images/icon.png',
'iconCls' => 'x-fa fa-comments',
'class' => 'Plugin.comments.Panel'
));
}
}