<?php
include_once("include/bbcode.php");
+include_once("include/contact_selectors.php");
function notifications_post(&$a) {
$r = q("SELECT `intro`.`id` AS `intro_id`, `intro`.*, `contact`.*, `fcontact`.`name` AS `fname`,`fcontact`.`url` AS `furl`,`fcontact`.`photo` AS `fphoto`,`fcontact`.`request` AS `frequest`,
`gcontact`.`location` AS `glocation`, `gcontact`.`about` AS `gabout`,
- `gcontact`.`keywords` AS `gkeywords`, `gcontact`.`gender` AS `ggender`
+ `gcontact`.`keywords` AS `gkeywords`, `gcontact`.`gender` AS `ggender`,
+ `gcontact`.`network` AS `gnetwork`
FROM `intro`
LEFT JOIN `contact` ON `contact`.`id` = `intro`.`contact-id`
LEFT JOIN `gcontact` ON `gcontact`.`nurl` = `contact`.`nurl`
$tpl = get_markup_template("intros.tpl");
foreach($r as $rr) {
+
if($rr['fid']) {
$return_addr = bin2hex($a->user['nickname'] . '@' . $a->get_hostname() . (($a->path) ? '/' . $a->path : ''));
));
}
+ $header = $rr["name"];
+
+ $ret = probe_url($rr["url"]);
+
+ if ($rr['gnetwork'] == "")
+ $rr['gnetwork'] = $ret["network"];
+
+ if ($ret["addr"] != "")
+ $header .= " <".$ret["addr"].">";
+
+ $header .= " (".network_to_name($rr['gnetwork']).")";
+
$notif_content .= replace_macros($tpl, array(
+ '$header' => htmlentities($header),
'$str_notifytype' => t('Notification type: '),
'$notify_type' => (($rr['network'] !== NETWORK_OSTATUS) ? t('Friend/Connect Request') : t('New Follower')),
'$dfrn_text' => $dfrn_text,
-
+<h2>{{$header}}</h2>
<div class="intro-wrapper" id="intro-{{$contact_id}}" >
<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>
<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}}