Merge pull request #1933 from annando/1510-follow-more-data
Show more information when following a new contact
This commit is contained in:
commit
e1f3f2bc6c
6 changed files with 46 additions and 24 deletions
51
mod/follow.php
Executable file → Normal file
51
mod/follow.php
Executable file → Normal file
|
@ -61,6 +61,12 @@ function follow_content(&$a) {
|
||||||
// Makes the connection request for friendica contacts easier
|
// Makes the connection request for friendica contacts easier
|
||||||
$_SESSION["fastlane"] = $ret["url"];
|
$_SESSION["fastlane"] = $ret["url"];
|
||||||
|
|
||||||
|
$r = q("SELECT `location`, `about`, `keywords` FROM `gcontact` WHERE `nurl` = '%s'",
|
||||||
|
normalise_link($ret["url"]));
|
||||||
|
|
||||||
|
if (!$r)
|
||||||
|
$r = array(array("location" => "", "about" => "", "keywords" => ""));
|
||||||
|
|
||||||
$header = $ret["name"];
|
$header = $ret["name"];
|
||||||
|
|
||||||
if ($ret["addr"] != "")
|
if ($ret["addr"] != "")
|
||||||
|
@ -71,25 +77,32 @@ function follow_content(&$a) {
|
||||||
$o = replace_macros($tpl,array(
|
$o = replace_macros($tpl,array(
|
||||||
'$header' => htmlentities($header),
|
'$header' => htmlentities($header),
|
||||||
'$photo' => $ret["photo"],
|
'$photo' => $ret["photo"],
|
||||||
'$desc' => "",
|
'$desc' => "",
|
||||||
'$pls_answer' => t('Please answer the following:'),
|
'$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'))),
|
'$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:'),
|
'$add_note' => t('Add a personal note:'),
|
||||||
'$page_desc' => "",
|
'$page_desc' => "",
|
||||||
'$friendica' => "",
|
'$friendica' => "",
|
||||||
'$statusnet' => "",
|
'$statusnet' => "",
|
||||||
'$diaspora' => "",
|
'$diaspora' => "",
|
||||||
'$diasnote' => "",
|
'$diasnote' => "",
|
||||||
'$your_address' => t('Your Identity Address:'),
|
'$your_address' => t('Your Identity Address:'),
|
||||||
'$invite_desc' => "",
|
'$invite_desc' => "",
|
||||||
'$emailnet' => "",
|
'$emailnet' => "",
|
||||||
'$submit' => t('Submit Request'),
|
'$submit' => t('Submit Request'),
|
||||||
'$cancel' => t('Cancel'),
|
'$cancel' => t('Cancel'),
|
||||||
'$nickname' => "",
|
'$nickname' => "",
|
||||||
'$name' => $ret["name"],
|
'$name' => $ret["name"],
|
||||||
'$url' => $ret["url"],
|
'$url' => $ret["url"],
|
||||||
'$myaddr' => $myaddr,
|
'$url_label' => t("Profile URL"),
|
||||||
'$request' => $request
|
'$myaddr' => $myaddr,
|
||||||
|
'$request' => $request,
|
||||||
|
'$location' => bbcode($r[0]["location"]),
|
||||||
|
'$location_label' => t("Location:"),
|
||||||
|
'$about' => proxy_parse_html(bbcode($r[0]["about"], false, false)),
|
||||||
|
'$about_label' => t("About:"),
|
||||||
|
'$keywords' => $r[0]["keywords"],
|
||||||
|
'$keywords_label' => t("Tags:")
|
||||||
));
|
));
|
||||||
return $o;
|
return $o;
|
||||||
}
|
}
|
||||||
|
|
|
@ -216,8 +216,7 @@ function notifications_content(&$a) {
|
||||||
'$contact_id' => $rr['contact-id'],
|
'$contact_id' => $rr['contact-id'],
|
||||||
'$photo' => ((x($rr,'photo')) ? proxy_url($rr['photo']) : "images/person-175.jpg"),
|
'$photo' => ((x($rr,'photo')) ? proxy_url($rr['photo']) : "images/person-175.jpg"),
|
||||||
'$fullname' => $rr['name'],
|
'$fullname' => $rr['name'],
|
||||||
'$location_label' => t('Location:'),
|
'$location' => bbcode($rr['glocation'], false, false),
|
||||||
'$location' => $rr['glocation'],
|
|
||||||
'$location_label' => t('Location:'),
|
'$location_label' => t('Location:'),
|
||||||
'$about' => proxy_parse_html(bbcode($rr['gabout'], false, false)),
|
'$about' => proxy_parse_html(bbcode($rr['gabout'], false, false)),
|
||||||
'$about_label' => t('About:'),
|
'$about_label' => t('About:'),
|
||||||
|
@ -228,6 +227,7 @@ function notifications_content(&$a) {
|
||||||
'$hidden' => array('hidden', t('Hide this contact from others'), ($rr['hidden'] == 1), ''),
|
'$hidden' => array('hidden', t('Hide this contact from others'), ($rr['hidden'] == 1), ''),
|
||||||
'$activity' => array('activity', t('Post a new friend activity'), (intval(get_pconfig(local_user(),'system','post_newfriend')) ? '1' : 0), t('if applicable')),
|
'$activity' => array('activity', t('Post a new friend activity'), (intval(get_pconfig(local_user(),'system','post_newfriend')) ? '1' : 0), t('if applicable')),
|
||||||
'$url' => zrl($rr['url']),
|
'$url' => zrl($rr['url']),
|
||||||
|
'$url_label' => t('Profile URL'),
|
||||||
'$knowyou' => $knowyou,
|
'$knowyou' => $knowyou,
|
||||||
'$approve' => t('Approve'),
|
'$approve' => t('Approve'),
|
||||||
'$note' => $rr['note'],
|
'$note' => $rr['note'],
|
||||||
|
|
|
@ -644,7 +644,7 @@ class Item extends BaseObject {
|
||||||
if(!$this->is_toplevel() && !(get_config('system','thread_allow') && $a->theme_thread_allow)) {
|
if(!$this->is_toplevel() && !(get_config('system','thread_allow') && $a->theme_thread_allow)) {
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
|
|
||||||
$comment_box = '';
|
$comment_box = '';
|
||||||
$conv = $this->get_conversation();
|
$conv = $this->get_conversation();
|
||||||
$template = get_markup_template($this->get_comment_box_template());
|
$template = get_markup_template($this->get_comment_box_template());
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
|
|
||||||
|
|
||||||
<h1>{{$header}}</h1>
|
<h1>{{$header}}</h1>
|
||||||
|
|
||||||
{{if $myaddr == ""}}
|
{{if $myaddr == ""}}
|
||||||
|
@ -30,6 +28,11 @@
|
||||||
<img src="{{$photo}}" alt="" id="dfrn-request-photo">
|
<img src="{{$photo}}" alt="" id="dfrn-request-photo">
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
|
{{if $url}}<dl><dt>{{$url_label}}</dt><dd><a target="blank" href="{{$url}}">{{$url}}</a></dd></dl>{{/if}}
|
||||||
|
{{if $location}}<dl><dt>{{$location_label}}</dt><dd>{{$location}}</dd></dl>{{/if}}
|
||||||
|
{{if $keywords}}<dl><dt>{{$keywords_label}}</dt><dd>{{$keywords}}</dd></dl>{{/if}}
|
||||||
|
{{if $about}}<dl><dt>{{$about_label}}</dt><dd>{{$about}}</dd></dl>{{/if}}
|
||||||
|
|
||||||
<div id="dfrn-request-url-wrapper" >
|
<div id="dfrn-request-url-wrapper" >
|
||||||
<label id="dfrn-url-label" for="dfrn-url" >{{$your_address}}</label>
|
<label id="dfrn-url-label" for="dfrn-url" >{{$your_address}}</label>
|
||||||
{{if $myaddr}}
|
{{if $myaddr}}
|
||||||
|
|
|
@ -27,6 +27,11 @@
|
||||||
<img src="{{$photo}}" alt="" id="dfrn-request-photo">
|
<img src="{{$photo}}" alt="" id="dfrn-request-photo">
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
|
{{if $url}}<dl><dt>{{$url_label}}</dt><dd><a target="blank" href="{{$url}}">{{$url}}</a></dd></dl>{{/if}}
|
||||||
|
{{if $location}}<dl><dt>{{$location_label}}</dt><dd>{{$location}}</dd></dl>{{/if}}
|
||||||
|
{{if $keywords}}<dl><dt>{{$keywords_label}}</dt><dd>{{$keywords}}</dd></dl>{{/if}}
|
||||||
|
{{if $about}}<dl><dt>{{$about_label}}</dt><dd>{{$about}}</dd></dl>{{/if}}
|
||||||
|
|
||||||
<div id="dfrn-request-url-wrapper" >
|
<div id="dfrn-request-url-wrapper" >
|
||||||
<label id="dfrn-url-label" for="dfrn-url" >{{$your_address}}</label>
|
<label id="dfrn-url-label" for="dfrn-url" >{{$your_address}}</label>
|
||||||
{{if $myaddr}}
|
{{if $myaddr}}
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
<p class="intro-desc">{{$str_notifytype}} {{$notify_type}}</p>
|
<p class="intro-desc">{{$str_notifytype}} {{$notify_type}}</p>
|
||||||
<a class="intro-url-link" id="intro-url-link-{{$contact_id}}" href="{{$url}}" ><div class="intro-fullname" id="intro-fullname-{{$contact_id}}" >{{$fullname}}</div></a>
|
<a class="intro-url-link" id="intro-url-link-{{$contact_id}}" href="{{$url}}" ><div class="intro-fullname" id="intro-fullname-{{$contact_id}}" >{{$fullname}}</div></a>
|
||||||
<img id="photo-{{$contact_id}}" class="intro-photo" src="{{$photo}}" width="175" height=175" title="{{$fullname|escape:'html'}}" alt="{{$fullname|escape:'html'}}" />
|
<img id="photo-{{$contact_id}}" class="intro-photo" src="{{$photo}}" width="175" height=175" title="{{$fullname|escape:'html'}}" alt="{{$fullname|escape:'html'}}" />
|
||||||
|
<dl><dt>{{$url_label}}</dt><dd><a target="blank" href="{{$url}}">{{$url}}</a></dd></dl>
|
||||||
{{if $location}}<dl><dt>{{$location_label}}</dt><dd>{{$location}}</dd></dl>{{/if}}
|
{{if $location}}<dl><dt>{{$location_label}}</dt><dd>{{$location}}</dd></dl>{{/if}}
|
||||||
{{if $gender}}<dl><dt>{{$gender_label}}</dt><dd>{{$gender}}</dd></dl>{{/if}}
|
{{if $gender}}<dl><dt>{{$gender_label}}</dt><dd>{{$gender}}</dd></dl>{{/if}}
|
||||||
{{if $keywords}}<dl><dt>{{$keywords_label}}</dt><dd>{{$keywords}}</dd></dl>{{/if}}
|
{{if $keywords}}<dl><dt>{{$keywords_label}}</dt><dd>{{$keywords}}</dd></dl>{{/if}}
|
||||||
|
|
Loading…
Reference in a new issue