X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=communityhome%2Fcommunityhome.php;h=8a2f3d291f10c5204555cc85ed0f5052b5be2e77;hb=2ca92ed594ba3909fdcc063b2b63e27620841336;hp=ba2af6de62bf36340a92ec9b8dd49bae2fdfd2cb;hpb=52a2a800cf77382f9ed1a8c843b77ababf614545;p=friendica-addons.git diff --git a/communityhome/communityhome.php b/communityhome/communityhome.php index ba2af6de..8a2f3d29 100755 --- a/communityhome/communityhome.php +++ b/communityhome/communityhome.php @@ -23,17 +23,24 @@ function communityhome_uninstall() { function communityhome_home(&$a, &$o){ // custom css $a->page['htmlhead'] .= ''; - - $aside = array( - '$tab_1' => t('Login'), - '$tab_2' => t('OpenID'), - '$noOid' => get_config('system','no_openid'), - ); - - // login form - $aside['$login_title'] = t('Login'); - $aside['$login_form'] = login(($a->config['register_policy'] == REGISTER_CLOSED) ? false : true); - + + if (!get_config('communityhome','hidelogin')){ + $aside = array( + '$tab_1' => t('Login'), + '$tab_2' => t('OpenID'), + '$noOid' => get_config('system','no_openid'), + ); + + // login form + $aside['$login_title'] = t('Login'); + $aside['$login_form'] = login(($a->config['register_policy'] == REGISTER_CLOSED) ? false : true); + } else + $aside = array( + //'$tab_1' => t('Login'), + //'$tab_2' => t('OpenID'), + //'$noOid' => get_config('system','no_openid'), + ); + // last 12 users if (get_config('communityhome','showlastusers')===true){ $aside['$lastusers_title'] = t('Latest users'); @@ -68,8 +75,8 @@ function communityhome_home(&$a, &$o){ // this query don't work on some mysql versions if (get_config('communityhome','showactiveusers')===true){ $r = q("SELECT `uni`.`contacts`,`uni`.`items`, `profile`.*, `profile`.`uid` AS `profile_uid`, `user`.`nickname` FROM - (SELECT COUNT(`id`) as `contacts`, `uid` FROM `contact` WHERE `self`=0 GROUP BY `uid`) AS `con`, - (SELECT COUNT(`id`) as `items`, `uid` FROM `item` WHERE `item`.`changed` > DATE(NOW() - INTERVAL 1 MONTH) AND `item`.`wall` = 1 GROUP BY `uid`) AS `ite`, + (SELECT COUNT(*) as `contacts`, `uid` FROM `contact` WHERE `self`=0 GROUP BY `uid`) AS `con`, + (SELECT COUNT(*) as `items`, `uid` FROM `item` WHERE `item`.`changed` > DATE(NOW() - INTERVAL 1 MONTH) AND `item`.`wall` = 1 GROUP BY `uid`) AS `ite`, ( SELECT `contacts`,`items`,`ite`.`uid` FROM `con` RIGHT OUTER JOIN `ite` ON `con`.`uid`=`ite`.`uid` UNION ALL