From d0ae5ce3263ec96250ecc1da0031f420891a370f Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Sun, 4 Oct 2015 14:41:39 +0200 Subject: [PATCH] Show more information when following a new contact --- mod/follow.php | 48 ++++++++++++++++++++------------- mod/notifications.php | 1 - object/Item.php | 2 +- view/templates/auto_request.tpl | 7 +++-- view/templates/dfrn_request.tpl | 5 ++++ 5 files changed, 40 insertions(+), 23 deletions(-) mode change 100755 => 100644 mod/follow.php diff --git a/mod/follow.php b/mod/follow.php old mode 100755 new mode 100644 index dd717aacd9..603707809b --- a/mod/follow.php +++ b/mod/follow.php @@ -61,6 +61,9 @@ function follow_content(&$a) { // Makes the connection request for friendica contacts easier $_SESSION["fastlane"] = $ret["url"]; + $r = q("SELECT `location`, `about`, `keywords` FROM `gcontact` WHERE `nurl` = '%s'", + normalise_link($ret["url"])); + $header = $ret["name"]; if ($ret["addr"] != "") @@ -71,25 +74,32 @@ function follow_content(&$a) { $o = replace_macros($tpl,array( '$header' => htmlentities($header), '$photo' => $ret["photo"], - '$desc' => "", - '$pls_answer' => t('Please answer the following:'), - '$does_know_you' => array('knowyou', sprintf(t('Does %s know you?'),$ret["name"]), false, '', array(t('No'),t('Yes'))), - '$add_note' => t('Add a personal note:'), - '$page_desc' => "", - '$friendica' => "", - '$statusnet' => "", - '$diaspora' => "", - '$diasnote' => "", - '$your_address' => t('Your Identity Address:'), - '$invite_desc' => "", - '$emailnet' => "", - '$submit' => t('Submit Request'), - '$cancel' => t('Cancel'), - '$nickname' => "", - '$name' => $ret["name"], - '$url' => $ret["url"], - '$myaddr' => $myaddr, - '$request' => $request + '$desc' => "", + '$pls_answer' => t('Please answer the following:'), + '$does_know_you' => array('knowyou', sprintf(t('Does %s know you?'),$ret["name"]), false, '', array(t('No'),t('Yes'))), + '$add_note' => t('Add a personal note:'), + '$page_desc' => "", + '$friendica' => "", + '$statusnet' => "", + '$diaspora' => "", + '$diasnote' => "", + '$your_address' => t('Your Identity Address:'), + '$invite_desc' => "", + '$emailnet' => "", + '$submit' => t('Submit Request'), + '$cancel' => t('Cancel'), + '$nickname' => "", + '$name' => $ret["name"], + '$url' => $ret["url"], + '$url_label' => t("Profile URL"), + '$myaddr' => $myaddr, + '$request' => $request, + '$location' => bbcode($r[0]["location"]), + '$location_label' => t("Location:"), + '$about' => bbcode($r[0]["about"]), + '$about_label' => t("About:"), + '$keywords' => bbcode($r[0]["keywords"]), + '$keywords_label' => t("Tags:") )); return $o; } diff --git a/mod/notifications.php b/mod/notifications.php index 44f6dd5675..1fc31c3eb9 100644 --- a/mod/notifications.php +++ b/mod/notifications.php @@ -216,7 +216,6 @@ function notifications_content(&$a) { '$contact_id' => $rr['contact-id'], '$photo' => ((x($rr,'photo')) ? proxy_url($rr['photo']) : "images/person-175.jpg"), '$fullname' => $rr['name'], - '$location_label' => t('Location:'), '$location' => $rr['glocation'], '$location_label' => t('Location:'), '$about' => proxy_parse_html(bbcode($rr['gabout'], false, false)), diff --git a/object/Item.php b/object/Item.php index 8d364e6023..c7a025861f 100644 --- a/object/Item.php +++ b/object/Item.php @@ -644,7 +644,7 @@ class Item extends BaseObject { if(!$this->is_toplevel() && !(get_config('system','thread_allow') && $a->theme_thread_allow)) { return ''; } - + $comment_box = ''; $conv = $this->get_conversation(); $template = get_markup_template($this->get_comment_box_template()); diff --git a/view/templates/auto_request.tpl b/view/templates/auto_request.tpl index 56653c6550..09e6163325 100644 --- a/view/templates/auto_request.tpl +++ b/view/templates/auto_request.tpl @@ -1,5 +1,3 @@ - -

{{$header}}

{{if $myaddr == ""}} @@ -30,6 +28,11 @@ {{/if}} +{{if $url}}
{{$url_label}}
{{$url}}
{{/if}} +{{if $location}}
{{$location_label}}
{{$location}}
{{/if}} +{{if $keywords}}
{{$keywords_label}}
{{$keywords}}
{{/if}} +{{if $about}}
{{$about_label}}
{{$about}}
{{/if}} +
{{if $myaddr}} diff --git a/view/templates/dfrn_request.tpl b/view/templates/dfrn_request.tpl index 6c63c53315..d376b3a5d5 100644 --- a/view/templates/dfrn_request.tpl +++ b/view/templates/dfrn_request.tpl @@ -27,6 +27,11 @@ {{/if}} +{{if $url}}
{{$url_label}}
{{$url}}
{{/if}} +{{if $location}}
{{$location_label}}
{{$location}}
{{/if}} +{{if $keywords}}
{{$keywords_label}}
{{$keywords}}
{{/if}} +{{if $about}}
{{$about_label}}
{{$about}}
{{/if}} +
{{if $myaddr}} -- 2.39.5