X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fcontacts.php;h=017b1d6435fd8456953d3fadcc312312fdc0b6e7;hb=fa4ac9515e6570b868c196a6854d9186f97bf7e5;hp=c562c9822da0f0664476ab42567e11b222666986;hpb=a58be379300229b72aae193b6d7cac7287922c27;p=friendica.git diff --git a/mod/contacts.php b/mod/contacts.php index c562c9822d..017b1d6435 100644 --- a/mod/contacts.php +++ b/mod/contacts.php @@ -27,6 +27,9 @@ function contacts_init(&$a) { require_once('include/group.php'); require_once('include/contact_widgets.php'); + if ($_GET['nets'] == "all") + $_GET['nets'] = ""; + if(! x($a->page,'aside')) $a->page['aside'] = ''; @@ -35,29 +38,30 @@ function contacts_init(&$a) { $vcard_widget = replace_macros(get_markup_template("vcard-widget.tpl"),array( '$name' => htmlentities($a->data['contact']['name']), '$photo' => $a->data['contact']['photo'], - '$url' => ($a->data['contact']['network'] == NETWORK_DFRN) ? $a->get_baseurl()."/redir/".$a->data['contact']['id'] : $a->data['contact']['url'] + '$url' => ($a->data['contact']['network'] == NETWORK_DFRN) ? $a->get_baseurl()."/redir/".$a->data['contact']['id'] : $a->data['contact']['url'] )); + $finpeople_widget = ''; $follow_widget = ''; + $networks_widget = ''; } else { $vcard_widget = ''; + $networks_widget .= networks_widget('contacts',$_GET['nets']); if (isset($_GET['add'])) $follow_widget = follow_widget($_GET['add']); else $follow_widget = follow_widget(); - } - if ($_GET['nets'] == "all") - $_GET['nets'] = ""; + $findpeople_widget .= findpeople_widget(); + } $groups_widget .= group_side('contacts','group',false,0,$contact_id); - $findpeople_widget .= findpeople_widget(); - $networks_widget .= networks_widget('contacts',$_GET['nets']); + $a->page['aside'] .= replace_macros(get_markup_template("contacts-widget-sidebar.tpl"),array( '$vcard_widget' => $vcard_widget, + '$findpeople_widget' => $findpeople_widget, '$follow_widget' => $follow_widget, '$groups_widget' => $groups_widget, - '$findpeople_widget' => $findpeople_widget, '$networks_widget' => $networks_widget )); @@ -550,6 +554,7 @@ function contacts_content(&$a) { 'url' => $a->get_baseurl(true) . '/contacts/' . $contact_id . '/block', 'sel' => '', 'title' => t('Toggle Blocked status'), + 'id' => 'toggle-block-tab', 'accesskey' => 'b', ), array( @@ -557,6 +562,7 @@ function contacts_content(&$a) { 'url' => $a->get_baseurl(true) . '/contacts/' . $contact_id . '/ignore', 'sel' => '', 'title' => t('Toggle Ignored status'), + 'id' => 'toggle-ignore-tab', 'accesskey' => 'i', ), @@ -565,6 +571,7 @@ function contacts_content(&$a) { 'url' => $a->get_baseurl(true) . '/contacts/' . $contact_id . '/archive', 'sel' => '', 'title' => t('Toggle Archive status'), + 'id' => 'toggle-archive-tab', 'accesskey' => 'v', ), array( @@ -572,6 +579,7 @@ function contacts_content(&$a) { 'url' => $a->get_baseurl(true) . '/crepair/' . $contact_id, 'sel' => '', 'title' => t('Advanced Contact Settings'), + 'id' => 'repair-tab', 'accesskey' => 'r', ) ); @@ -693,6 +701,7 @@ function contacts_content(&$a) { 'url' => $a->get_baseurl(true) . '/suggest', 'sel' => '', 'title' => t('Suggest potential friends'), + 'id' => 'suggestions-tab', 'accesskey' => 'g', ), array( @@ -700,6 +709,7 @@ function contacts_content(&$a) { 'url' => $a->get_baseurl(true) . '/contacts/all', 'sel' => ($all) ? 'active' : '', 'title' => t('Show all contacts'), + 'id' => 'showall-tab', 'accesskey' => 'l', ), array( @@ -707,6 +717,7 @@ function contacts_content(&$a) { 'url' => $a->get_baseurl(true) . '/contacts', 'sel' => ((! $all) && (! $blocked) && (! $hidden) && (! $search) && (! $nets) && (! $ignored) && (! $archived)) ? 'active' : '', 'title' => t('Only show unblocked contacts'), + 'id' => 'showunblocked-tab', 'accesskey' => 'o', ), @@ -715,6 +726,7 @@ function contacts_content(&$a) { 'url' => $a->get_baseurl(true) . '/contacts/blocked', 'sel' => ($blocked) ? 'active' : '', 'title' => t('Only show blocked contacts'), + 'id' => 'showblocked-tab', 'accesskey' => 'b', ), @@ -723,6 +735,7 @@ function contacts_content(&$a) { 'url' => $a->get_baseurl(true) . '/contacts/ignored', 'sel' => ($ignored) ? 'active' : '', 'title' => t('Only show ignored contacts'), + 'id' => 'showignored-tab', 'accesskey' => 'i', ), @@ -731,6 +744,7 @@ function contacts_content(&$a) { 'url' => $a->get_baseurl(true) . '/contacts/archived', 'sel' => ($archived) ? 'active' : '', 'title' => t('Only show archived contacts'), + 'id' => 'showarchived-tab', 'accesskey' => 'y', ), @@ -739,6 +753,7 @@ function contacts_content(&$a) { 'url' => $a->get_baseurl(true) . '/contacts/hidden', 'sel' => ($hidden) ? 'active' : '', 'title' => t('Only show hidden contacts'), + 'id' => 'showhidden-tab', 'accesskey' => 'h', ), @@ -799,6 +814,7 @@ function contacts_content(&$a) { '$cmd' => $a->cmd, '$contacts' => $contacts, '$contact_drop_confirm' => t('Do you really want to delete this contact?'), + 'multiselect' => 1, '$batch_actions' => array( 'contacts_batch_update' => t('Update'), 'contacts_batch_block' => t('Block')."/".t("Unblock"), @@ -851,7 +867,7 @@ function _contact_detail_for_template($rr){ 'name' => htmlentities($rr['name']), 'username' => htmlentities($rr['name']), 'sparkle' => $sparkle, - 'itemurl' => $rr['url'], + 'itemurl' => (($rr['addr'] != "") ? $rr['addr'] : $rr['url']), 'url' => $url, 'network' => network_to_name($rr['network'], $rr['url']), );