]> git.mxchange.org Git - friendica.git/blob - mod/home.php
OStatus conversation are now checked every 30 minutes for new answers.
[friendica.git] / mod / home.php
1 <?php
2
3 if(! function_exists('home_init')) {
4 function home_init(&$a) {
5
6         $ret = array();
7         call_hooks('home_init',$ret);
8
9         if(local_user() && ($a->user['nickname']))
10                 goaway( $a->get_baseurl() . "/profile/" . $a->user['nickname'] );
11
12         if(strlen(get_config('system','singleuser')))
13                 goaway( $a->get_baseurl() . "/profile/" . get_config('system','singleuser'));
14
15 }}
16
17
18 if(! function_exists('home_content')) {
19 function home_content(&$a) {
20
21         $o = '';
22
23         if(x($_SESSION,'theme'))
24                 unset($_SESSION['theme']);
25         if(x($_SESSION,'mobile-theme'))
26                 unset($_SESSION['mobile-theme']);
27
28         if(file_exists('home.html')){
29                 if(file_exists('home.css')){
30                           $a->page['htmlhead'] .= '<link rel="stylesheet" type="text/css" href="' . $a->get_baseurl() . '/home.css' . '" media="all" />';}
31                                           
32                 $o .= file_get_contents('home.html');}
33                 
34         else    $o .= '<h1>' . ((x($a->config,'sitename')) ? sprintf( t("Welcome to %s") ,$a->config['sitename']) : "" ) . '</h1>';
35
36
37         $o .= login(($a->config['register_policy'] == REGISTER_CLOSED) ? 0 : 1);
38         
39         call_hooks("home_content",$o);
40         
41         return $o;
42
43         
44 }}