-
Notifications
You must be signed in to change notification settings - Fork 3
/
start.php
40 lines (35 loc) · 1.34 KB
/
start.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
<?php
/* ***********************************************************************
* related-items - elgg plugin
*
*******************************************/
function related_items_init()
{
$lib = elgg_get_plugins_path() . 'related-items/lib/related-items-lib.php';
elgg_register_library('related-items-lib', $lib);
elgg_load_library('related-items-lib');
$comment_position = elgg_get_plugin_setting('comment_position','related-items');
switch($comment_position)
{
case 'bottom':
{
$comment_position = 501;
break;
}
default:
case 'top':
{
$comment_position = 0;
break;
}
}
elgg_register_page_handler('related', 'related_items_page_handler');
if ((!elgg_in_context('katalists'))&&(!elgg_in_context('pinboards')))
{
elgg_extend_view('page/elements/comments', 'related-items/related-items', $comment_position);
elgg_extend_view('discussion/replies', 'related-items/related-items', 0);
}
elgg_extend_view('admin.css', 'related-items/admin', 1);
elgg_extend_view('elgg.css', 'related-items/css');
}
elgg_register_event_handler('init', 'system', 'related_items_init');