From 5649e9e1930cf95b452ed0f45729d31022d2959c Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Sun, 29 Nov 2015 17:04:48 +0100 Subject: [PATCH] The contact page now contains more data --- mod/contacts.php | 25 ++++++++++++++++++++++++- view/templates/contact_edit.tpl | 12 +++++++----- 2 files changed, 31 insertions(+), 6 deletions(-) diff --git a/mod/contacts.php b/mod/contacts.php index 1dc886363a..8058cb5e8d 100644 --- a/mod/contacts.php +++ b/mod/contacts.php @@ -549,6 +549,14 @@ function contacts_content(&$a) { // tabs $tabs = array( + array( + 'label'=>t('Network Posts'), + 'url' => "network/0?nets=all&cid=".$contact["id"], + 'sel' => ((!isset($tab)&&$a->argv[0]=='profile')?'active':''), + 'title' => t('Status Messages and Posts'), + 'id' => 'status-tab', + 'accesskey' => 'm', + ), array( 'label' => (($contact['blocked']) ? t('Unblock') : t('Block') ), 'url' => $a->get_baseurl(true) . '/contacts/' . $contact_id . '/block', @@ -602,8 +610,17 @@ function contacts_content(&$a) { ($contact['rel'] == CONTACT_IS_FOLLOWER)) $follow = $a->get_baseurl(true)."/follow?url=".urlencode($contact["url"]); + + $header = $contact["name"]; + + if ($contact["addr"] != "") + $header .= " <".$contact["addr"].">"; + + $header .= " (".network_to_name($contact['network'], $contact['url']).")"; + $o .= replace_macros($tpl, array( - '$header' => t('Contact Editor'), + //'$header' => t('Contact Editor'), + '$header' => htmlentities($header), '$tab_str' => $tab_str, '$submit' => t('Submit'), '$lbl_vis1' => t('Profile Visibility'), @@ -653,6 +670,12 @@ function contacts_content(&$a) { '$url' => $url, '$profileurllabel' => t('Profile URL'), '$profileurl' => $contact['url'], + '$location' => bbcode($contact["location"]), + '$location_label' => t("Location:"), + '$about' => bbcode($contact["about"], false, false), + '$about_label' => t("About:"), + '$keywords' => $contact["keywords"], + '$keywords_label' => t("Tags:") )); diff --git a/view/templates/contact_edit.tpl b/view/templates/contact_edit.tpl index 95e8e5d29a..9d49780259 100644 --- a/view/templates/contact_edit.tpl +++ b/view/templates/contact_edit.tpl @@ -1,5 +1,3 @@ - -

{{$header}}

@@ -19,8 +17,6 @@ {{if $relation_text}}
  • {{$relation_text}}
  • {{/if}} -
  • {{$nettype}}
  • -
  • {{$profileurllabel}}: {{$profileurl}}
  • {{if $lost_contact}}
  • {{$lost_contact}}
  • {{/if}} @@ -37,6 +33,7 @@
  • {{$archived}}
  • {{/if}} + + +
    {{$profileurllabel}}
    {{$profileurl}}
    + {{if $location}}
    {{$location_label}}
    {{$location}}
    {{/if}} + {{if $keywords}}
    {{$keywords_label}}
    {{$keywords}}
    {{/if}} + {{if $about}}
    {{$about_label}}
    {{$about}}
    {{/if}}