This repository has been archived by the owner on Jul 4, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ossn_com.php
96 lines (92 loc) · 2.98 KB
/
ossn_com.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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
<?php
/**
* Open Source Social Network
*
* @packageOpen Source Social Network
* @author Open Social Website Core Team <info@informatikon.com>
* @copyright 2014 iNFORMATIKON TECHNOLOGIES
* @license General Public Licence http://www.opensource-socialnetwork.org/licence
* @link http://www.opensource-socialnetwork.org/licence
*/
define('PostBackground', ossn_route()->com . 'PostBackground/');
define('__PostBackground_List__', array(
array(
'name' => 'pbg1',
'url' => ossn_site_url('components/PostBackground/images/1.jpg'),
'color_hex' => '#fff',
),
array(
'name' => 'pbg2',
'url' => ossn_site_url('components/PostBackground/images/2.jpg'),
'color_hex' => '#fff',
),
array(
'name' => 'pbg3',
'url' => ossn_site_url('components/PostBackground/images/3.jpg'),
'color_hex' => '#fff',
),
array(
'name' => 'pbg4',
'url' => ossn_site_url('components/PostBackground/images/4.jpg'),
'color_hex' => '#fff',
),
array(
'name' => 'pbg5',
'url' => ossn_site_url('components/PostBackground/images/5.jpg'),
'color_hex' => '#fff',
),
array(
'name' => 'pbg6',
'url' => ossn_site_url('components/PostBackground/images/6.jpg'),
'color_hex' => '#fff',
),
array(
'name' => 'pbg7',
'url' => ossn_site_url('components/PostBackground/images/7.jpg'),
'color_hex' => '#333',
),
array(
'name' => 'pbg8',
'url' => ossn_site_url('components/PostBackground/images/8.jpg'),
'color_hex' => '#333',
),
array(
'name' => 'pbg9',
'url' => ossn_site_url('components/PostBackground/images/9.jpg'),
'color_hex' => '#333',
),
array(
'name' => 'pbg10',
'url' => ossn_site_url('components/PostBackground/images/10.jpg'),
'color_hex' => '#333',
),
array(
'name' => 'pbg11',
'url' => ossn_site_url('components/PostBackground/images/11.jpg'),
'color_hex' => '#333',
)
));
ossn_register_class(array(
'PostBackground' => PostBackground . 'classes/PostBackground.php'
));
function postbg_init() {
ossn_extend_view('js/opensource.socialnetwork', 'postbg/js');
ossn_extend_view('css/ossn.default', 'postbg/css');
$post_background = array(
'name' => 'postbg_selector',
'text' => '<i class="fa fa-paint-brush"></i>',
'href' => 'javascript:void(0);'
);
ossn_register_menu_item('wall/container/controls/home', $post_background);
ossn_register_menu_item('wall/container/controls/user', $post_background);
ossn_register_menu_item('wall/container/controls/group', $post_background);
ossn_extend_view('wall/templates/wall/user/item', 'postbg/item');
ossn_extend_view('wall/templates/wall/group/item', 'postbg/item');
ossn_extend_view('wall/templates/wall/businesspage/item', 'postbg/item');
ossn_register_callback('wall', 'post:created', 'postbg_wall_created');
}
function postbg_wall_created($callback, $type, $params) {
$PostBackground = new PostBackground;
$PostBackground->setBackground($params);
}
ossn_register_callback('ossn', 'init', 'postbg_init');