From: <fr...@us...> - 2007-01-21 12:48:58
|
Update of /cvsroot/tikiwiki/tiki In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv398 Modified Files: tiki-setup.php tiki-admin_include_community.php tiki-list_users.php Log Message: [MOD] Selection of columns in user list Index: tiki-setup.php =================================================================== RCS file: /cvsroot/tikiwiki/tiki/tiki-setup.php,v retrieving revision 1.390 retrieving revision 1.391 diff -u -d -r1.390 -r1.391 --- tiki-setup.php 21 Jan 2007 00:42:03 -0000 1.390 +++ tiki-setup.php 21 Jan 2007 12:48:56 -0000 1.391 @@ -635,6 +635,10 @@ $pref['feature_community_mouseover_email'] = 'y'; $pref['feature_community_mouseover_lastlogin'] = 'y'; $pref['feature_community_mouseover_distance'] = 'y'; +$pref['feature_community_list_name'] = 'y'; +$pref['feature_community_list_score'] = 'y'; +$pref['feature_community_list_country'] = 'y'; +$pref['feature_community_list_distance'] = 'y'; $pref['feature_community_friends_permission'] = 'n'; $pref['feature_community_friends_permission_dep'] = '2'; $pref['change_language'] = 'y'; Index: tiki-admin_include_community.php =================================================================== RCS file: /cvsroot/tikiwiki/tiki/tiki-admin_include_community.php,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- tiki-admin_include_community.php 18 May 2005 10:58:53 -0000 1.3 +++ tiki-admin_include_community.php 21 Jan 2007 12:48:56 -0000 1.4 @@ -25,6 +25,15 @@ simple_set_toggle("feature_community_mouseover_distance"); } +if (isset($_REQUEST["listfeatures"])) { + check_ticket('admin-inc-community'); + simple_set_toggle("feature_community_list_name"); + simple_set_toggle("feature_community_list_score"); + simple_set_toggle("feature_community_list_country"); + simple_set_toggle("feature_community_list_distance"); + simple_set_value("user_list_order"); +} + /* This is desired future feature if (isset($_REQUEST["friendshipfeatures"])) { check_ticket('admin-inc-community'); Index: tiki-list_users.php =================================================================== RCS file: /cvsroot/tikiwiki/tiki/tiki-list_users.php,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- tiki-list_users.php 14 Jul 2005 13:59:50 -0000 1.8 +++ tiki-list_users.php 21 Jan 2007 12:48:56 -0000 1.9 @@ -72,19 +72,23 @@ $listdistance = array(); $listuserscountry = array(); for ($i=0;$i<count($listusers["data"]);$i++) { - $userlogin=$listusers["data"][$i]["login"]; - $distance=$userprefslib->get_userdistance($userlogin,$user); - if (is_null($distance)) { - $listdistance[]=NULL; - } else { - $listdistance[]=round($distance,0); + if ($feature_community_list_distance == "y") { + $userlogin=$listusers["data"][$i]["login"]; + $distance=$userprefslib->get_userdistance($userlogin,$user); + if (is_null($distance)) { + $listdistance[]=NULL; + } else { + $listdistance[]=round($distance,0); + } } - $userprefs=$listusers["data"][$i]["preferences"]; - $country="None"; - for ($j=0;$j<count($userprefs);$j++) { - if ($userprefs[$j]["prefName"]=="country") $country=$userprefs[$j]["value"]; - if ($userprefs[$j]["prefName"]=="realName") $listusers["data"][$i]["realName"]=$userprefs[$j]["value"]; + if ($feature_community_list_country == "y") { + $userprefs=$listusers["data"][$i]["preferences"]; + $country="None"; + for ($j=0;$j<count($userprefs);$j++) { + if ($userprefs[$j]["prefName"]=="country") $country=$userprefs[$j]["value"]; + if ($userprefs[$j]["prefName"]=="realName") $listusers["data"][$i]["realName"]=$userprefs[$j]["value"]; + } } $listuserscountry[]=$country; } |