forked from opensource-socialnetwork/Greetings
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathossn_com.php
44 lines (43 loc) · 1.07 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
<?php
/**
* Open Source Social Network
*
* @package Open Source Social Network
* @author Open Social Website Core Team <info@openteknik.com>
* @copyright (C) OpenTeknik LLC
* @license Open Source Social Network License (OSSN LICENSE) http://www.opensource-socialnetwork.org/licence
* @link https://www.opensource-socialnetwork.org/
*/
define('Greetings', ossn_route()->com . 'Greetings/');
/**
* Greetings Init
*
* @return void
*/
function greetings_init(){
ossn_extend_view('css/ossn.default', 'greetings/css');
ossn_extend_view('ossn/site/head','greetings/js');
}
/**
* Return time of day in sense or morning day...
*
* @type m morning
* @type a afternoon
* @type e evening
* @type n night
*
* @return string
*/
function greetings_time_now(){
$time = date("H");
if($time < "12"){
return 'm';
} elseif($time >= "12" && $time < "17"){
return 'a';
} elseif($time >= "17" && $time < "19"){
return'e';
} elseif($time >= "19"){
return 'n';
}
}
ossn_register_callback('ossn', 'init', 'greetings_init');