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( $a->get_baseurl() . "/profile/" . $a->user['nickname'] );
12 if(strlen(get_config('system','singleuser')))
13 goaway( $a->get_baseurl() . "/profile/" . get_config('system','singleuser'));
18 if(! function_exists('home_content')) {
19 function home_content(&$a) {
23 if(x($_SESSION,'theme'))
24 unset($_SESSION['theme']);
25 if(x($_SESSION,'mobile-theme'))
26 unset($_SESSION['mobile-theme']);
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" />';}
32 $o .= file_get_contents('home.html');}
34 else $o .= '<h1>' . ((x($a->config,'sitename')) ? sprintf( t("Welcome to %s") ,$a->config['sitename']) : "" ) . '</h1>';
37 $o .= login(($a->config['register_policy'] == REGISTER_CLOSED) ? 0 : 1);
39 call_hooks("home_content",$o);