3 if(! function_exists('home_init')) {
4 function home_init(&$a) {
7 call_hooks('home_init',$ret);
9 if(local_user() && ($a->user['nickname']))
10 goaway(App::get_baseurl()."/network");
11 //goaway(App::get_baseurl()."/profile/".$a->user['nickname']);
13 if(strlen(get_config('system','singleuser')))
14 goaway(App::get_baseurl()."/profile/" . get_config('system','singleuser'));
19 if(! function_exists('home_content')) {
20 function home_content(&$a) {
24 if(x($_SESSION,'theme'))
25 unset($_SESSION['theme']);
26 if(x($_SESSION,'mobile-theme'))
27 unset($_SESSION['mobile-theme']);
29 if(file_exists('home.html')){
30 if(file_exists('home.css')){
31 $a->page['htmlhead'] .= '<link rel="stylesheet" type="text/css" href="'.App::get_baseurl().'/home.css'.'" media="all" />';}
33 $o .= file_get_contents('home.html');}
35 else $o .= '<h1>'.((x($a->config,'sitename')) ? sprintf(t("Welcome to %s"), $a->config['sitename']) : "").'</h1>';
38 $o .= login(($a->config['register_policy'] == REGISTER_CLOSED) ? 0 : 1);
40 call_hooks("home_content",$o);