}
if(! function_exists('contact_photo_menu')){
-function contact_photo_menu($contact) {
+function contact_photo_menu($contact, $uid = 0) {
$a = get_app();
$contact_drop_link = "";
$poke_link="";
+ if ($uid == 0)
+ $uid = local_user();
+
+ if ($contact["uid"] != $uid) {
+ if ($uid == 0) {
+ $profile_link = zrl($contact['url']);
+ $menu = Array('profile' => array(t("View Profile"), $profile_link, true));
+
+ return $menu;
+ }
+
+ $r = q("SELECT * FROM `contact` WHERE `nurl` = '%s' AND `network` = '%s' AND `uid` = %d",
+ dbesc($contact["nurl"]), dbesc($contact["network"]), intval($uid));
+ if ($r)
+ return contact_photo_menu($r[0], $uid);
+ else {
+ $profile_link = zrl($contact['url']);
+ $connlnk = 'follow/?url='.$contact['url'];
+ $menu = Array(
+ 'profile' => array(t("View Profile"), $profile_link, true),
+ 'follow' => array(t("Connect/Follow"), $connlnk, true)
+ );
+
+ return $menu;
+ }
+ }
+
$sparkle = false;
if($contact['network'] === NETWORK_DFRN) {
$sparkle = true;
<?php
require_once("include/contact_selectors.php");
+require_once("include/contact_widgets.php");
require_once("include/features.php");
require_once("mod/proxy.php");
$group_count = 0;
}
+ $sql_extra2 .= " ".unavailable_networks();
+
if ($type=='' || $type=='c'){
$r = q("SELECT COUNT(*) AS c FROM `contact`
WHERE `uid` = %d AND `self` = 0
'return \'#\'. str_replace(\' \', \'_\', $match[2]);'
), $Text);
-
// Converting images with size parameters to simple images. Markdown doesn't know it.
$Text = preg_replace("/\[img\=([0-9]*)x([0-9]*)\](.*?)\[\/img\]/ism", '[img]$3[/img]', $Text);
// Add all tags that maybe were removed
if (preg_match_all("/#\[url\=([$URLSearchString]*)\](.*?)\[\/url\]/ism",$OriginalText, $tags)) {
$tagline = "";
- foreach($tags[2] as $tag)
- if (!strpos($Text, "#".$tag))
+ foreach($tags[2] as $tag) {
+ $tag = html_entity_decode($tag, ENT_QUOTES, 'UTF-8');
+ if (!strpos(html_entity_decode($Text, ENT_QUOTES, 'UTF-8'), "#".$tag))
$tagline .= "#".$tag." ";
-
- $Text = $Text."<br />".$tagline;
+ }
+ $Text = $Text." ".$tagline;
}
} else
$image = "";
}
- if ($simplehtml == 7)
- $text = sprintf('<a href="%s" title="%s" class="attachment thumbnail" rel="nofollow external">%s</a>',
- $url, $title, $title);
- elseif (($simplehtml != 4) AND ($simplehtml != 0))
+ if ($simplehtml == 7) {
+ $title2 = $title;
+
+ $test1 = trim(html_entity_decode($match[1],ENT_QUOTES,'UTF-8'));
+ $test2 = trim(html_entity_decode($title,ENT_QUOTES,'UTF-8'));
+
+ // If the link description is similar to the text above then don't add the link description
+ if (($title != "") AND ((strpos($test1,$test2) !== false) OR
+ (similar_text($test1,$test2) / strlen($title)) > 0.9))
+ $title2 = $url;
+ $text = sprintf('<a href="%s" title="%s" class="attachment thumbnail" rel="nofollow external">%s</a><br />',
+ $url, $title, $title2);
+ } elseif (($simplehtml != 4) AND ($simplehtml != 0))
$text = sprintf('<a href="%s" target="_blank">%s</a><br>', $url, $title);
else {
$text = sprintf('<span class="type-%s">', $type);
$Text = preg_replace_callback("&\[url=/posts/([^\[\]]*)\](.*)\[\/url\]&Usi", 'bb_DiasporaLinks', $Text);
// if the HTML is used to generate plain text, then don't do this search, but replace all URL of that kind to text
- if (!$forplaintext)
- $Text = preg_replace("/([^\]\='".'"'."]|^)(https?\:\/\/[a-zA-Z0-9\:\/\-\?\&\;\.\=\_\~\#\%\$\!\+\,]+)/ism", '$1<a href="$2" target="_blank">$2</a>', $Text);
- else {
- $Text = preg_replace("(\[url\]([$URLSearchString]*)\[\/url\])ism"," $1 ",$Text);
- $Text = preg_replace_callback("&\[url=([^\[\]]*)\]\[img\](.*)\[\/img\]\[\/url\]&Usi", 'bb_RemovePictureLinks', $Text);
+ if ($simplehtml != 7) {
+ if (!$forplaintext)
+ $Text = preg_replace("/([^\]\='".'"'."]|^)(https?\:\/\/[a-zA-Z0-9\:\/\-\?\&\;\.\=\_\~\#\%\$\!\+\,]+)/ism", '$1<a href="$2" target="_blank">$2</a>', $Text);
+ else {
+ $Text = preg_replace("(\[url\]([$URLSearchString]*)\[\/url\])ism"," $1 ",$Text);
+ $Text = preg_replace_callback("&\[url=([^\[\]]*)\]\[img\](.*)\[\/img\]\[\/url\]&Usi", 'bb_RemovePictureLinks', $Text);
+ }
}
if ($tryoembed)
if(get_config('system','invitation_only')) {
$x = get_pconfig(local_user(),'system','invites_remaining');
if($x || is_site_admin()) {
- $a->page['aside'] .= '<div class="side-link" id="side-invite-remain">'
- . sprintf( tt('%d invitation available','%d invitations available',$x), $x)
+ $a->page['aside'] .= '<div class="side-link" id="side-invite-remain">'
+ . sprintf( tt('%d invitation available','%d invitations available',$x), $x)
. '</div>' . $inv;
}
}
-
+
return replace_macros(get_markup_template('peoplefind.tpl'),array(
'$findpeople' => t('Find People'),
'$desc' => t('Enter name or interest'),
}
+function unavailable_networks() {
+ $network_filter = "";
+
+ $networks = array();
+
+ if (!plugin_enabled("appnet"))
+ $networks[] = NETWORK_APPNET;
+
+ if (!plugin_enabled("fbpost") AND !plugin_enabled("facebook"))
+ $networks[] = NETWORK_FACEBOOK;
+
+ if (!plugin_enabled("statusnet"))
+ $networks[] = NETWORK_STATUSNET;
+
+ if (!plugin_enabled("pumpio"))
+ $networks[] = NETWORK_PUMPIO;
+
+ if (!plugin_enabled("twitter"))
+ $networks[] = NETWORK_TWITTER;
+
+ if (get_config("system","ostatus_disabled"))
+ $networks[] = NETWORK_OSTATUS;
+
+ if (!get_config("system","diaspora_enabled"))
+ $networks[] = NETWORK_DIASPORA;
+
+ if (!sizeof($networks))
+ return "";
+
+ $network_filter = implode("','", $networks);
+
+ $network_filter = "AND `network` NOT IN ('$network_filter')";
+
+ return $network_filter;
+}
function networks_widget($baseurl,$selected = '') {
$a = get_app();
- if(! local_user())
+ if(!local_user())
return '';
- if(! feature_enabled(local_user(),'networks'))
+ if(!feature_enabled(local_user(),'networks'))
return '';
- $r = q("SELECT DISTINCT(`network`) FROM `contact` WHERE `uid` = %d AND `self` = 0 ORDER BY `network`",
+ $extra_sql = unavailable_networks();
+
+ $r = q("SELECT DISTINCT(`network`) FROM `contact` WHERE `uid` = %d AND NOT `self` $extra_sql ORDER BY `network`",
intval(local_user())
);
}
if($cid == 0 && $zcid == 0)
- return;
+ return;
require_once('include/socgraph.php');
'$linkmore' => (($t > 5) ? 'true' : ''),
'$more' => t('show more'),
'$items' => $r
- ));
+ ));
};
q('DELETE FROM `photo` WHERE `uid` = 0 AND `resource-id` LIKE "pic:%%" AND `created` < NOW() - INTERVAL %d SECOND', $cachetime);
}
+ // maximum table size in megabyte
+ $max_tablesize = intval(get_config('system','optimize_max_tablesize')) * 1000000;
+ if ($max_tablesize == 0)
+ $max_tablesize = 100 * 1000000; // Default are 100 MB
+
+ // Optimize some tables that need to be optimized
+ $r = q("SHOW TABLE STATUS");
+ foreach($r as $table) {
+
+ // Don't optimize tables that needn't to be optimized
+ if ($table["Data_free"] == 0)
+ continue;
+
+ // Don't optimize tables that are too large
+ if ($table["Data_length"] > $max_tablesize)
+ continue;
+
+ // So optimize it
+ q("OPTIMIZE TABLE `%s`", dbesc($table["Name"]));
+ }
+
set_config('system','cache_last_cleared', time());
}
* Sidebar widget to show subcribed friendica forums. If activated
* in the settings, it appears at the notwork page sidebar
*
- * @param App $a
+ * @param int $uid
+ * @param int $cid
+ * The contact id which is used to mark a forum as "selected"
* @return string
*/
-function widget_forumlist($a) {
+function widget_forumlist($uid,$cid = 0) {
if(! intval(feature_enabled(local_user(),'forumlist_widget')))
return;
//sort by last updated item
$lastitem = true;
- $contacts = get_forumlist($a->user['uid'],true,$lastitem, true);
+ $contacts = get_forumlist($uid,true,$lastitem, true);
$total = count($contacts);
$visible_forums = 10;
foreach($contacts as $contact) {
+ $selected = (($cid == $contact['id']) ? ' forum-selected' : '');
+
$entry = array(
- 'url' => $a->get_baseurl() . '/network?f=&cid=' . $contact['id'],
- 'external_url' => $a->get_baseurl() . '/redir/' . $contact['id'],
+ 'url' => z_root() . '/network?f=&cid=' . $contact['id'],
+ 'external_url' => z_root() . '/redir/' . $contact['id'],
'name' => $contact['name'],
'cid' => $contact['id'],
+ 'selected' => $selected,
'micro' => proxy_url($contact['micro'], false, PROXY_SIZE_MICRO),
'id' => ++$id,
);
}
if ($connect AND ($profile['network'] != NETWORK_DFRN) AND !isset($profile['remoteconnect']))
- $connect = false;
+ $connect = false;
if (isset($profile['remoteconnect']))
$remoteconnect = $profile['remoteconnect'];
- if( get_my_url() && $profile['unkmail'] && ($profile['uid'] != local_user()) )
+ if ($connect AND ($profile['network'] == NETWORK_DFRN) AND !isset($remoteconnect))
+ $subscribe_feed = t("Atom feed");
+ else
+ $subscribe_feed = false;
+
+ if(get_my_url() && $profile['unkmail'] && ($profile['uid'] != local_user()))
$wallmessage = t('Message');
else
$wallmessage = false;
'$profile' => $p,
'$connect' => $connect,
'$remoteconnect' => $remoteconnect,
+ '$subscribe_feed' => $subscribe_feed,
'$wallmessage' => $wallmessage,
'$location' => $location,
'$gender' => $gender,
);
}
// send email notification to owner?
- }
- else {
+ } else {
// create contact record
- $r = q("INSERT INTO `contact` ( `uid`, `created`, `url`, `nurl`, `name`, `nick`, `photo`, `network`, `rel`,
- `blocked`, `readonly`, `pending`, `writable` )
- VALUES ( %d, '%s', '%s', '%s', '%s', '%s', '%s', '%s', %d, 0, 0, 1, 1 ) ",
+ $r = q("INSERT INTO `contact` (`uid`, `created`, `url`, `nurl`, `name`, `nick`, `photo`, `network`, `rel`,
+ `blocked`, `readonly`, `pending`, `writable`)
+ VALUES (%d, '%s', '%s', '%s', '%s', '%s', '%s', '%s', %d, 0, 0, 1, 1)",
intval($importer['uid']),
dbesc(datetime_convert()),
dbesc($url),
intval($importer['uid']),
dbesc($url)
);
- if(count($r))
+ if(count($r)) {
$contact_record = $r[0];
- // create notification
- $hash = random_string();
+ $photos = import_profile_photo($photo,$importer["uid"],$contact_record["id"]);
- if(is_array($contact_record)) {
- $ret = q("INSERT INTO `intro` ( `uid`, `contact-id`, `blocked`, `knowyou`, `hash`, `datetime`)
- VALUES ( %d, %d, 0, 0, '%s', '%s' )",
- intval($importer['uid']),
- intval($contact_record['id']),
- dbesc($hash),
- dbesc(datetime_convert())
- );
+ q("UPDATE `contact` SET `photo` = '%s', `thumb` = '%s', `micro` = '%s' WHERE `id` = %d",
+ dbesc($photos[0]),
+ dbesc($photos[1]),
+ dbesc($photos[2]),
+ intval($contact_record["id"])
+ );
}
+
$r = q("SELECT * FROM `user` WHERE `uid` = %d LIMIT 1",
intval($importer['uid'])
);
$a = get_app();
- if(count($r)) {
+ if(count($r) AND !in_array($r[0]['page-flags'], array(PAGE_SOAPBOX, PAGE_FREELOVE))) {
+
+ // create notification
+ $hash = random_string();
+
+ if(is_array($contact_record)) {
+ $ret = q("INSERT INTO `intro` ( `uid`, `contact-id`, `blocked`, `knowyou`, `hash`, `datetime`)
+ VALUES ( %d, %d, 0, 0, '%s', '%s' )",
+ intval($importer['uid']),
+ intval($contact_record['id']),
+ dbesc($hash),
+ dbesc(datetime_convert())
+ );
+ }
if(intval($r[0]['def_gid'])) {
require_once('include/group.php');
}
if(($r[0]['notify-flags'] & NOTIFY_INTRO) &&
- in_array($r[0]['page-flags'], array(PAGE_NORMAL, PAGE_SOAPBOX, PAGE_FREELOVE))) {
+ in_array($r[0]['page-flags'], array(PAGE_NORMAL))) {
notification(array(
'type' => NOTIFY_INTRO,
));
}
+ } elseif (count($r) AND in_array($r[0]['page-flags'], array(PAGE_SOAPBOX, PAGE_FREELOVE))) {
+ $r = q("UPDATE `contact` SET `pending` = 0 WHERE `uid` = %d AND `url` = '%s' AND `pending` LIMIT 1",
+ intval($importer['uid']),
+ dbesc($url)
+ );
}
+
}
}
if($cnt) {
for($x = 0; $x < $cnt; $x ++) {
if($matches[1][$x])
- $ret[] = array('#',$matches[1][$x], $matches[2][$x]);
+ $ret[$matches[2][$x]] = array('#',$matches[1][$x], $matches[2][$x]);
}
}
$matches = false;
break;
}
+ if (($siteinfo["type"] != "photo") AND isset($siteinfo["image"])) {
+ $photodata = get_photo_info($siteinfo["image"]);
+
+ $attributes = array("rel" => "preview", "href" => $siteinfo["image"], "media:width" => $photodata[0], "media:height" => $photodata[1]);
+ xml_add_element($doc, $root, "link", "", $attributes);
+ }
+
+
$arr = explode('[/attach],',$item['attach']);
if(count($arr)) {
foreach($arr as $r) {
$author = $doc->createElement("author");
xml_add_element($doc, $author, "activity:object-type", ACTIVITY_OBJ_PERSON);
xml_add_element($doc, $author, "uri", $owner["url"]);
- xml_add_element($doc, $author, "name", $owner["nick"]);
+ xml_add_element($doc, $author, "name", $profile["name"]);
$attributes = array("rel" => "alternate", "type" => "text/html", "href" => $owner["url"]);
xml_add_element($doc, $author, "link", "", $attributes);
if ($item['title'] != "")
$body = "[b]".$item['title']."[/b]\n\n".$body;
+ //$body = bb_remove_share_information($body);
$body = bbcode($body, false, false, 7);
xml_add_element($doc, $entry, "content", $body, array("type" => "html"));
$root->appendChild($entry);
}
- return($doc->saveXML());
+ return(trim($doc->saveXML()));
}
function ostatus_salmon($item,$owner) {
$doc->appendChild($entry);
- return($doc->saveXML());
+ return(trim($doc->saveXML()));
}
?>
if($class)
$class = ' ' . $class;
+ if ($contact["addr"] == "")
+ $contact["addr"] = $contact["url"];
+
$url = $contact['url'];
$sparkle = '';
$redir = false;
. (($click) ? ' fakelink' : '') . '" '
. (($redir) ? ' target="redir" ' : '')
. (($url) ? ' href="' . $url . '"' : '') . $click
- . '" title="' . $contact['name'] . ' [' . $contact['url'] . ']" alt="' . $contact['name']
+ . '" title="' . $contact['name'] . ' [' . $contact['addr'] . ']" alt="' . $contact['name']
. '" >'. $contact['name'] . '</a></div>' . "\r\n";
}
else {
. (($click) ? ' fakelink' : '') . '" '
. (($redir) ? ' target="redir" ' : '')
. (($url) ? ' href="' . $url . '"' : '') . $click . ' ><img class="contact-block-img' . $class . $sparkle . '" src="'
- . proxy_url($contact['micro'], false, PROXY_SIZE_THUMB) . '" title="' . $contact['name'] . ' [' . $contact['url'] . ']" alt="' . $contact['name']
+ . proxy_url($contact['micro'], false, PROXY_SIZE_THUMB) . '" title="' . $contact['name'] . ' [' . $contact['addr'] . ']" alt="' . $contact['name']
. '" /></a></div>' . "\r\n";
}
}}
$poll_interval = ((x($_POST,'poll_interval')) ? intval(trim($_POST['poll_interval'])) : 0);
$maxloadavg = ((x($_POST,'maxloadavg')) ? intval(trim($_POST['maxloadavg'])) : 50);
$maxloadavg_frontend = ((x($_POST,'maxloadavg_frontend')) ? intval(trim($_POST['maxloadavg_frontend'])) : 50);
+ $optimize_max_tablesize = ((x($_POST,'optimize_max_tablesize')) ? intval(trim($_POST['optimize_max_tablesize'])): 100);
$poco_completion = ((x($_POST,'poco_completion')) ? intval(trim($_POST['poco_completion'])) : false);
$poco_requery_days = ((x($_POST,'poco_requery_days')) ? intval(trim($_POST['poco_requery_days'])) : 7);
$poco_discovery = ((x($_POST,'poco_discovery')) ? intval(trim($_POST['poco_discovery'])) : 0);
set_config('system','poll_interval',$poll_interval);
set_config('system','maxloadavg',$maxloadavg);
set_config('system','maxloadavg_frontend',$maxloadavg_frontend);
+ set_config('system','optimize_max_tablesize',$optimize_max_tablesize);
set_config('system','poco_completion',$poco_completion);
set_config('system','poco_requery_days',$poco_requery_days);
set_config('system','poco_discovery',$poco_discovery);
'$poll_interval' => array('poll_interval', t("Poll interval"), (x(get_config('system','poll_interval'))?get_config('system','poll_interval'):2), t("Delay background polling processes by this many seconds to reduce system load. If 0, use delivery interval.")),
'$maxloadavg' => array('maxloadavg', t("Maximum Load Average"), ((intval(get_config('system','maxloadavg')) > 0)?get_config('system','maxloadavg'):50), t("Maximum system load before delivery and poll processes are deferred - default 50.")),
'$maxloadavg_frontend' => array('maxloadavg_frontend', t("Maximum Load Average (Frontend)"), ((intval(get_config('system','maxloadavg_frontend')) > 0)?get_config('system','maxloadavg_frontend'):50), t("Maximum system load before the frontend quits service - default 50.")),
+ '$optimize_max_tablesize'=> array('optimize_max_tablesize', t("Maximum table size for optimization"), ((intval(get_config('system','optimize_max_tablesize')) > 0)?get_config('system','optimize_max_tablesize'):100), t("Maximum table size (in MB) for the automatic optimization - default 100 MB. Enter -1 to disable it.")),
'$poco_completion' => array('poco_completion', t("Periodical check of global contacts"), get_config('system','poco_completion'), t("If enabled, the global contacts are checked periodically for missing or outdated data and the vitality of the contacts and servers.")),
'$poco_requery_days' => array('poco_requery_days', t("Days between requery"), get_config('system','poco_requery_days'), t("Number of days after which a server is requeried for his contacts.")),
}
$groups_widget .= group_side('contacts','group','full',0,$contact_id);
-
+
$a->page['aside'] .= replace_macros(get_markup_template("contacts-widget-sidebar.tpl"),array(
'$vcard_widget' => $vcard_widget,
'$findpeople_widget' => $findpeople_widget,
$total = $r[0]['total'];
}
+ $sql_extra3 = unavailable_networks();
- $r = q("SELECT * FROM `contact` WHERE `uid` = %d AND `self` = 0 AND `pending` = 0 $sql_extra $sql_extra2 ORDER BY `name` ASC LIMIT %d , %d ",
+ $r = q("SELECT * FROM `contact` WHERE `uid` = %d AND `self` = 0 AND `pending` = 0 $sql_extra $sql_extra2 $sql_extra3 ORDER BY `name` ASC LIMIT %d , %d ",
intval($_SESSION['uid']),
intval($a->pager['start']),
intval($a->pager['itemspage'])
if((local_user()) && (local_user() == $profile_uid)) {
$self = true;
$r = q("SELECT * FROM `contact` WHERE `uid` = %d AND `self` = 1 LIMIT 1",
- intval($_SESSION['uid'])
- );
+ intval($_SESSION['uid']));
}
elseif(remote_user()) {
if(is_array($_SESSION['remote'])) {
}
$is_a_date_query = false;
+ if(x($_GET['cid']) && intval($_GET['cid']) != 0)
+ $cid = $_GET['cid'];
if($a->argc > 1) {
for($x = 1; $x < $a->argc; $x ++) {
}
$a->page['aside'] .= (feature_enabled(local_user(),'groups') ? group_side('network/0','network','standard',$group_id) : '');
- $a->page['aside'] .= (feature_enabled(local_user(),'forumlist_widget') ? widget_forumlist($a) : '');
+ $a->page['aside'] .= (feature_enabled(local_user(),'forumlist_widget') ? widget_forumlist(local_user(),$cid) : '');
$a->page['aside'] .= posted_date_widget($a->get_baseurl() . '/network',local_user(),false);
$a->page['aside'] .= networks_widget($a->get_baseurl(true) . '/network',(x($_GET, 'nets') ? $_GET['nets'] : ''));
$a->page['aside'] .= saved_searches($search);
$a->page['aside'] .= fileas_widget($a->get_baseurl(true) . '/network',(x($_GET, 'file') ? $_GET['file'] : ''));
- if(x($_GET['cid']) && intval($_GET['cid']) != 0) {
- $r = q("SELECT `url` FROM `contact` WHERE `id` = %d",
- intval($_GET['cid']));
- if ($r) {
- $a->page['aside'] = "";
- profile_load($a, "", 0, get_contact_details_by_url($r[0]["url"]));
- }
- }
}
function saved_searches($search) {
}
elseif($cid) {
- $r = q("SELECT `id`,`name`,`network`,`writable`,`nurl` FROM `contact` WHERE `id` = %d
+ $r = q("SELECT `id`,`name`,`network`,`writable`,`nurl`, `forum`, `prv`, `addr`, `thumb`, `location` FROM `contact` WHERE `id` = %d
AND `blocked` = 0 AND `pending` = 0 LIMIT 1",
intval($cid)
);
ON $sql_table.$sql_parent = `temp1`.`parent` ";
$sql_extra = "";
- $o = replace_macros(get_markup_template("section_title.tpl"),array(
- '$title' => sprintf( t('Contact: %s'), htmlentities($r[0]['name']))
+ $entries[0] = array(
+ 'id' => 'network',
+ 'name' => htmlentities($r[0]['name']),
+ 'itemurl' => (($r[0]['addr']) ? ($r[0]['addr']) : ($r[0]['nurl'])),
+ 'thumb' => proxy_url($r[0]['thumb'], false, PROXY_SIZE_THUMB),
+ 'account_type' => (($r[0]['forum']) || ($r[0]['prv']) ? t('Forum') : ''),
+ 'details' => $r[0]['location'],
+ );
+
+ $o = replace_macros(get_markup_template("viewcontact_template.tpl"),array(
+ 'contacts' => $entries,
+ 'id' => 'network',
)) . $o;
if($r[0]['network'] === NETWORK_OSTATUS && $r[0]['writable'] && (! get_pconfig(local_user(),'system','nowarn_insecure'))) {
if (isset($keywords)) {
$siteinfo["keywords"] = array();
foreach ($keywords as $keyword)
- $siteinfo["keywords"][] = trim($keyword);
+ if (!in_array(trim($keyword), $siteinfo["keywords"]))
+ $siteinfo["keywords"][] = trim($keyword);
}
//$list = $xpath->query("head/meta[@property]");
}
- $r = q("SELECT COUNT(*) AS `total` FROM `contact` WHERE `uid` = %d AND `blocked` = 0 AND `pending` = 0 AND `hidden` = 0 AND `archive` = 0 ",
- intval($a->profile['uid'])
+ $r = q("SELECT COUNT(*) AS `total` FROM `contact`
+ WHERE `uid` = %d AND `blocked` = 0 AND `pending` = 0 AND `hidden` = 0 AND `archive` = 0
+ AND `network` IN ('%s', '%s', '%s')",
+ intval($a->profile['uid']),
+ dbesc(NETWORK_DFRN),
+ dbesc(NETWORK_DIASPORA),
+ dbesc(NETWORK_OSTATUS)
);
if(count($r))
$a->set_pager_total($r[0]['total']);
- $r = q("SELECT * FROM `contact` WHERE `uid` = %d AND `blocked` = 0 AND `pending` = 0 AND `hidden` = 0 AND `archive` = 0 ORDER BY `name` ASC LIMIT %d , %d ",
+ $r = q("SELECT * FROM `contact`
+ WHERE `uid` = %d AND `blocked` = 0 AND `pending` = 0 AND `hidden` = 0 AND `archive` = 0
+ AND `network` IN ('%s', '%s', '%s')
+ ORDER BY `name` ASC LIMIT %d, %d",
intval($a->profile['uid']),
+ dbesc(NETWORK_DFRN),
+ dbesc(NETWORK_DIASPORA),
+ dbesc(NETWORK_OSTATUS),
intval($a->pager['start']),
intval($a->pager['itemspage'])
);
- if(! count($r)) {
- info( t('No contacts.') . EOL );
+ if(!count($r)) {
+ info(t('No contacts.').EOL);
return $o;
}
$contacts[] = array(
'id' => $rr['id'],
'img_hover' => sprintf( t('Visit %s\'s profile [%s]'), $rr['name'], $rr['url']),
+ 'photo_menu' => contact_photo_menu($rr),
'thumb' => proxy_url($rr['thumb'], false, PROXY_SIZE_THUMB),
'name' => htmlentities(substr($rr['name'],0,20)),
'username' => htmlentities($rr['name']),
{{include file="field_input.tpl" field=$poll_interval}}
{{include file="field_input.tpl" field=$maxloadavg}}
{{include file="field_input.tpl" field=$maxloadavg_frontend}}
+ {{include file="field_input.tpl" field=$optimize_max_tablesize}}
{{include file="field_input.tpl" field=$abandon_days}}
{{include file="field_input.tpl" field=$lockpath}}
{{include file="field_input.tpl" field=$temppath}}
{{if $wallmessage}}
<li><a id="wallmessage-link" href="wallmessage/{{$profile.nickname}}">{{$wallmessage}}</a></li>
{{/if}}
+ {{if $subscribe_feed}}
+ <li><a id="subscribe-feed-link" href="dfrn_poll/{{$profile.nickname}}">{{$subscribe_feed}}</a></li>
+ {{/if}}
</ul>
</div>
</div>
{{include file="section_title.tpl"}}
+<div id="viewcontact_wrapper-{{$id}}">
{{foreach $contacts as $contact}}
{{include file="contact_template.tpl"}}
{{/foreach}}
+</div>
<div id="view-contact-end"></div>
<a href="{{$forum.external_url}}" title="{{$forum.link_desc}}" class="label sparkle" target="_blank">
<img class="forumlist-img" src="{{$forum.micro}}" alt="{{$forum.link_desc}}" />
</a>
- <a class="forum-widget-link" id="forum-widget-link-{{$forum.id}}" href="{{$forum.url}}" >{{$forum.name}}</a>
+ <a class="forum-widget-link {{if $forum.selected}}forum-selected{{/if}}" id="forum-widget-link-{{$forum.id}}" href="{{$forum.url}}" >{{$forum.name}}</a>
</li>
{{/if}}
<a href="{{$forum.external_url}}" title="{{$forum.link_desc}}" class="label sparkle" target="_blank">
<img class="forumlist-img" src="{{$forum.micro}}" alt="{{$forum.link_desc}}" />
</a>
- <a class="forum-widget-link" id="forum-widget-link-{{$forum.id}}" href="{{$forum.url}}" >{{$forum.name}}</a>
+ <a class="forum-widget-link {{if $forum.selected}}forum-selected{{/if}}" id="forum-widget-link-{{$forum.id}}" href="{{$forum.url}}" >{{$forum.name}}</a>
</li>
{{/if}}
{{/foreach}}
nav #banner #logo-text a { color: #ffffff; }
+/* Contact-Header for the Network Stream */
+#viewcontact_wrapper-network {background-image: url('imgdarkzero/head.jpg');}
+
.wall-item-content-wrapper {
border: 1px solid #444444;
background: #444444;
a, a:visited { color: #0000FF; text-decoration: none; }
a:hover {text-decoration: underline; }
+/* Contact-Header for the Network Stream */
+#viewcontact_wrapper-network { background: #FFDDFF; }
-aside( background-image: url('imgeasterbunny/border.jpg'); }
+aside { background-image: url('imgeasterbunny/border.jpg'); }
.tabs { background-image: url('imgeasterbunny/head.jpg'); }
div.wall-item-content-wrapper.shiny { background-image: url('imgeasterbunny/shiny.png'); }
aside { background-image: url('imggreenzero/border.jpg'); }
section { background-image: url('imggreenzero/border.jpg'); }
.tabs { background-image: url('imggreenzero/head.jpg'); }
+#viewcontact_wrapper-network { background: #DBEAD7; }
div.wall-item-content-wrapper.shiny { background-image: url('imggreenzero/shiny.png'); }
.fakelink, .fakelink:visited, .fakelink:hover, .fakelink:link {
body { background-image: url('imgpurplezero/head.jpg'); }
-aside( background-image: url('imgpurplezero/border.jpg'); }
+aside { background-image: url('imgpurplezero/border.jpg'); }
section { background-image: url('imgpurplezero/border.jpg'); }
+#viewcontact_wrapper-network { background: #ECCAEB; }
.tabs { background-image: url('imgpurplezero/head.jpg'); }
div.wall-item-content-wrapper.shiny { background-image: url('imgpurplezero/shiny.png'); }
font-weight: bold;
background: #3465a4 url('friendica-16.png') no-repeat 95% center;
}
+#subscribe-feed-link,
#wallmessage-link {
display: block;
color: #FFFFFF;
margin: 15px 0 15px 150px;
}
+/* Contact-Header for the Network Stream */
+#viewcontact_wrapper-network {
+ width: 100%;
+ min-height: 100px;
+ background-color: #DBE6F1;
+ border-bottom: 1px solid #babdb6;
+}
+#contact-entry-wrapper-network {
+ float: none;
+ width: auto;
+ height: auto;
+ padding: 10px;
+ margin: 0px
+}
+#contact-entry-accounttype-network {
+ font-size: 20px;
+}
+#contact-entry-name-network {
+ font-size: 24.5px;
+}
+/*#contact-entry-name-network>.contact-entry-details, #contact-entry-url-network,
+#contact-entry-details-network, contact-entry-network-network {
+ color: #000;
+}*/
+
/* from default */
#jot-perms-icon,
#profile-location,
margin-bottom: 10px;
}
-.group-selected, .nets-selected, .fileas-selected, .categories-selected {
+.group-selected, .nets-selected, .fileas-selected, .categories-selected, .forum-selected {
padding: 3px;
-moz-border-radius: 3px;
border-radius: 3px;
{{if $wallmessage}}
<li><a id="wallmessage-link" href="wallmessage/{{$profile.nickname}}">{{$wallmessage}}</a></li>
{{/if}}
+ {{if $subscribe_feed}}
+ <li><a id="subscribe-feed-link" href="dfrn_poll/{{$profile.nickname}}">{{$subscribe_feed}}</a></li>
+ {{/if}}
</ul>
</div>
</div>
clear: both;\r
}\r
\r
+/* Contact-Header for the Network Stream */\r
+#viewcontact_wrapper-network {\r
+ width: 100%;\r
+ min-height: 100px;\r
+ background-color: #FAFAFA;\r
+ border: 1px solid #DDDDDD;\r
+ border-radius: 5px;\r
+}\r
+#contact-entry-wrapper-network {\r
+ float: none;\r
+ width: auto;\r
+ height: auto;\r
+ padding: 10px;\r
+ margin: 0;\r
+}\r
+#contact-entry-accounttype-network {\r
+ font-size: 0.9em;\r
+}\r
+#contact-entry-name-network {\r
+ font-size: 1.5em;\r
+}\r
\r
/* footer */\r
footer {\r
margin-bottom: 10px;\r
}\r
\r
-.group-selected, .nets-selected, .fileas-selected, .categories-selected {\r
+.group-selected, .nets-selected, .fileas-selected, .categories-selected, .forum-selected {\r
padding: 3px;\r
-moz-border-radius: 3px;\r
-webkit-border-radius: 3px;\r
/* float:left;*/
}
+#subscribe-feed-link,
#dfrn-request-link {
display: block;
color: #FFFFFF;
padding-top: 3em;
}
+/* Contact-Header for the Network Stream */
+#viewcontact_wrapper-network {
+ width: 100%;
+ min-height: 100px;
+ background-color: #FAFAFA;
+ border: 1px solid #DDDDDD;
+ border-radius: 5px;
+}
+#contact-entry-wrapper-network {
+ float: none;
+ width: auto;
+ height: auto;
+ padding: 10px;
+ margin: 0;
+}
+#contact-entry-accounttype-network {
+ font-size: 0.9em;
+}
+#contact-entry-name-network {
+ font-size: 1.5em;
+}
/* footer */
footer {
margin-bottom: 10px;
}
-.group-selected, .nets-selected, .fileas-selected, .categories-selected {
+.group-selected, .nets-selected, .fileas-selected, .categories-selected, .forum-selected {
padding: 3px;
-moz-border-radius: 3px;
-webkit-border-radius: 3px;
{{if $wallmessage}}
<li><a id="wallmessage-link" href="wallmessage/{{$profile.nickname}}">{{$wallmessage}}</a></li>
{{/if}}
+ {{if $subscribe_feed}}
+ <li><a id="subscribe-feed-link" href="dfrn_poll/{{$profile.nickname}}">{{$subscribe_feed}}</a></li>
+ {{/if}}
</ul>
</div>
</div>
{{$contact_block}}
-
-
color: #9eabb0;
display: block;
}
+/* Contact-Header for the Network Stream */
+#viewcontact_wrapper-network {
+ width: 100%;
+ min-height: 100px;
+ background-color: #eff0f1;
+ border-bottom: 1px solid #cccccc;
+}
+#viewcontact_wrapper-network #contact-entry-wrapper-network {
+ float: none;
+ width: auto;
+ height: auto;
+ padding: 10px;
+}
+#viewcontact_wrapper-network #contact-entry-wrapper-network #contact-entry-accounttype-network {
+ font-size: 22px;
+}
+#viewcontact_wrapper-network #contact-entry-wrapper-network #contact-entry-name-network {
+ font-size: 24.5px;
+ font-weight: normal;
+}
+#viewcontact_wrapper-network #contact-entry-wrapper-network .contact-details {
+ font-size: 12px;
+}
/* aside 230px*/
aside {
display: table-cell;
text-decoration: none;
background-color: #19aeff;
}
+aside #subscribe-feed-link {
+ display: block;
+ -moz-border-radius: 5px 5px 5px 5px;
+ -webkit-border-radius: 5px 5px 5px 5px;
+ border-radius: 5px 5px 5px 5px;
+ color: #ffffff;
+ background: #005c94 url('../../../images/connect-bg.png') no-repeat left center;
+ font-weight: bold;
+ text-transform: uppercase;
+ padding: 4px 2px 2px 35px;
+}
+aside #subscribe-feed-link:hover {
+ text-decoration: none;
+ background-color: #19aeff;
+}
aside #profiles-menu {
width: 20em;
}
color: #9eabb0;
display: block;
}
+/* Contact-Header for the Network Stream */
+#viewcontact_wrapper-network {
+ width: 100%;
+ min-height: 100px;
+ background-color: #eff0f1;
+ border-bottom: 1px solid #cccccc;
+}
+#viewcontact_wrapper-network #contact-entry-wrapper-network {
+ float: none;
+ width: auto;
+ height: auto;
+ padding: 10px;
+}
+#viewcontact_wrapper-network #contact-entry-wrapper-network #contact-entry-accounttype-network {
+ font-size: 22px;
+}
+#viewcontact_wrapper-network #contact-entry-wrapper-network #contact-entry-name-network {
+ font-size: 24.5px;
+ font-weight: normal;
+}
+#viewcontact_wrapper-network #contact-entry-wrapper-network .contact-details {
+ font-size: 12px;
+}
/* aside 230px*/
aside {
display: table-cell;
text-decoration: none;
background-color: #ccff42;
}
+aside #subscribe-feed-link {
+ display: block;
+ -moz-border-radius: 5px 5px 5px 5px;
+ -webkit-border-radius: 5px 5px 5px 5px;
+ border-radius: 5px 5px 5px 5px;
+ color: #ffffff;
+ background: #009100 url('../../../images/connect-bg.png') no-repeat left center;
+ font-weight: bold;
+ text-transform: uppercase;
+ padding: 4px 2px 2px 35px;
+}
+aside #subscribe-feed-link:hover {
+ text-decoration: none;
+ background-color: #ccff42;
+}
aside #profiles-menu {
width: 20em;
}
color: #9eabb0;
display: block;
}
+/* Contact-Header for the Network Stream */
+#viewcontact_wrapper-network {
+ width: 100%;
+ min-height: 100px;
+ background-color: #eff0f1;
+ border-bottom: 1px solid #cccccc;
+}
+#viewcontact_wrapper-network #contact-entry-wrapper-network {
+ float: none;
+ width: auto;
+ height: auto;
+ padding: 10px;
+}
+#viewcontact_wrapper-network #contact-entry-wrapper-network #contact-entry-accounttype-network {
+ font-size: 22px;
+}
+#viewcontact_wrapper-network #contact-entry-wrapper-network #contact-entry-name-network {
+ font-size: 24.5px;
+ font-weight: normal;
+}
+#viewcontact_wrapper-network #contact-entry-wrapper-network .contact-details {
+ font-size: 12px;
+}
/* aside 230px*/
aside {
display: table-cell;
text-decoration: none;
background-color: #86608e;
}
+aside #subscribe-feed-link {
+ display: block;
+ -moz-border-radius: 5px 5px 5px 5px;
+ -webkit-border-radius: 5px 5px 5px 5px;
+ border-radius: 5px 5px 5px 5px;
+ color: #ffffff;
+ background: #521f5c url('../../../images/connect-bg.png') no-repeat left center;
+ font-weight: bold;
+ text-transform: uppercase;
+ padding: 4px 2px 2px 35px;
+}
+aside #subscribe-feed-link:hover {
+ text-decoration: none;
+ background-color: #86608e;
+}
aside #profiles-menu {
width: 20em;
}
.notif-when { font-size: 10px; color: @MenuItemDetail; display: block; }
}
-
+/* Contact-Header for the Network Stream */
+#viewcontact_wrapper-network {
+ width: 100%;
+ min-height: 100px;
+ background-color: #eff0f1;
+ border-bottom: 1px solid #cccccc;
+ #contact-entry-wrapper-network {
+ float: none;
+ width: auto;
+ height: auto;
+ padding: 10px;
+ #contact-entry-accounttype-network { font-size: 22px; }
+ #contact-entry-name-network { font-size: 24.5px; font-weight: normal; }
+ .contact-details { font-size: 12px; }
+ }
+}
/* aside 230px*/
&:hover { text-decoration: none; background-color: @AsideConnectHoverBg; }
}
+ #subscribe-feed-link {
+ display: block;
+ .rounded();
+ color: @AsideConnect;
+ background: @AsideConnectBg url('../../../images/connect-bg.png') no-repeat left center;
+ font-weight: bold;
+ text-transform:uppercase;
+ padding: 4px 2px 2px 35px;
+
+ &:hover { text-decoration: none; background-color: @AsideConnectHoverBg; }
+ }
#profiles-menu { width: 20em; }
{{if $wallmessage}}
<li><a id="wallmessage-link" href="wallmessage/{{$profile.nickname}}">{{$wallmessage}}</a></li>
{{/if}}
+ {{if $subscribe_feed}}
+ <li><a id="subscribe-feed-link" href="dfrn_poll/{{$profile.nickname}}">{{$subscribe_feed}}</a></li>
+ {{/if}}
</ul>
</div>
</div>
--- /dev/null
+<script>
+
+function showHideForumlist() {
+ if( $("li[id^='forum-widget-entry-extended-']").is(':visible')) {
+ $("li[id^='forum-widget-entry-extended-']").hide();
+ $("li#forum-widget-collapse").html(window.showMore);
+
+ }
+ else {
+ $("li[id^='forum-widget-entry-extended-']").show();
+ $("li#forum-widget-collapse").html(window.showFewer);
+ }
+}
+</script>
+
+<div id="forumlist-sidebar" class="widget">
+ <h3 id="forumlist">{{$title}}</h3>
+
+ <ul id="forumlist-sidbar-ul" role="menu">
+ {{foreach $forums as $forum}}
+ {{if $forum.id <= $visible_forums}}
+ <li class="forum-widget-entry forum-{{$forum.cid}} tool {{if $forum.selected}}selected{{/if}}" id="forum-widget-entry-{{$forum.id}}" role="menuitem">
+ <span class="notify badge pull-right"></span>
+ <a href="{{$forum.external_url}}" title="{{$forum.link_desc}}" class="label sparkle" target="_blank">
+ <img class="forumlist-img" src="{{$forum.micro}}" alt="{{$forum.link_desc}}" />
+ </a>
+ <a class="forum-widget-link" id="forum-widget-link-{{$forum.id}}" href="{{$forum.url}}" >{{$forum.name}}</a>
+ </li>
+ {{/if}}
+
+ {{if $forum.id > $visible_forums}}
+ <li class="forum-widget-entry forum-{{$forum.cid}} tool {{if $forum.selected}}selected{{/if}}" id="forum-widget-entry-extended-{{$forum.id}}" role="menuitem" style="display: none;">
+ <span class="notify badge pull-right"></span>
+ <a href="{{$forum.external_url}}" title="{{$forum.link_desc}}" class="label sparkle" target="_blank">
+ <img class="forumlist-img" src="{{$forum.micro}}" alt="{{$forum.link_desc}}" />
+ </a>
+ <a class="forum-widget-link" id="forum-widget-link-{{$forum.id}}" href="{{$forum.url}}" >{{$forum.name}}</a>
+ </li>
+ {{/if}}
+ {{/foreach}}
+
+ {{if $total > $visible_forums }}
+ <li onclick="showHideForumlist(); return false;" id="forum-widget-collapse" class="forum-widget-link fakelink tool">{{$showmore}}</li>
+ {{/if}}
+ </ul>
+</div>
padding-bottom: 2em;
}
+/* Contact-Header for the Network Stream */
+#viewcontact_wrapper-network {
+ width: 100%;
+ min-height: 110px;
+ background-color: #FAFAFA;
+ box-shadow: 0 0 8px #BDBDBD;
+ border-bottom: 1px solid #dedede;
+ border: 1px solid #7C7D7B;
+ border-radius: 5px;
+}
+#contact-entry-wrapper-network {
+ float: none;
+ width: auto;
+ height: auto;
+ padding: 10px;
+ margin: 0;
+}
+#contact-entry-accounttype-network {
+ font-size: 20px;
+}
+#contact-entry-name-network {
+ font-size: 24.5px;
+}
+
.lframe {
border: 1px solid #7C7D7B;
box-shadow: 3px 3px 6px #959494;
list-style: none;
}
+#subscribe-feed-link,
#dfrn-request-link {
box-shadow: inset 0px 1px 0px 0px #a65151;
-moz-box-shadow: inset 0px 1px 0px 0px #a65151;
background-color: #3465a4;
}
+#subscribe-feed-link:hover,
#dfrn-request-link:hover {
background: -webkit-gradient( linear, left top, left bottom, color-stop(0.05, #1873a2), color-stop(1, #6da6c4) );
background: -moz-linear-gradient( center top, #1873a2 5%, #6da6c4 100% );
background-color: #1873a2;
}
+#subscribe-feed-link:active,
#dfrn-request-link:active {
position: relative;
top: 1px;
.mail-list-wrapper {
border-radius: 5px;
}
+
+#viewcontact_wrapper-network {
+ border-radius: 5px;
+}
}
li :hover {
- color: #767676 !important;
+ color: #767676 !important;
+}
+
+#viewcontact_wrapper-network {
+ background-color: #343434;
}
right_aside {
border-left: 1px solid #D2D2D2;
}
+
+#viewcontact_wrapper-network {
+ background-color: #FFF;
+ border-bottom: 1px solid #D2D2D2;
+}
\ No newline at end of file
/* color: #000; */
}
-.group-selected, .nets-selected, .fileas-selected {
+.group-selected, .nets-selected, .fileas-selected, .forum-selected {
font-weight: bold;
}
}
aside #profile-extra-links li {
padding: 0px;
+ padding-bottom: 4px;
margin: 0px;
list-style: none;
}
+aside #subscribe-feed-link,
aside #dfrn-request-link,
aside #wallmessage-link {
display: block;
text-transform: uppercase;
padding: 4px 2px 2px 35px;
}
+aside #subscribe-feed-link:hover,
aside #dfrn-request-link:hover,
aside #wallmessage-link:hover {
text-decoration: none;
height: 100%;
}
+/* Contact-Header for the Network Stream */
+#viewcontact_wrapper-network {
+ width: 100%;
+ min-height: 100px;
+ background-color: #FAFAFA;
+ box-shadow: 1px 2px 0px 0px #D8D8D8;
+ border-bottom: 1px solid #D2D2D2;
+}
+#contact-entry-wrapper-network {
+ float: none;
+ width: auto;
+ height: auto;
+ padding: 10px;
+ margin: 0;
+}
+#contact-entry-accounttype-network {
+ font-size: 20px;
+}
+#contact-entry-name-network {
+ font-size: 24.5px;
+}
+.contact-entry-photo img {
+ border-radius: 4px;
+}
+
/* wall item */
.tread-wrapper {
/* border-bottom: 1px solid #BDCDD4; */
{{if $wallmessage}}
<li><a id="wallmessage-link" href="wallmessage/{{$profile.nickname}}">{{$wallmessage}}</a></li>
{{/if}}
+ {{if $subscribe_feed}}
+ <li><a id="subscribe-feed-link" href="dfrn_poll/{{$profile.nickname}}">{{$subscribe_feed}}</a></li>
+ {{/if}}
</ul>
</div>
</div>
{{foreach $forums as $forum}}
{{if $forum.id <= $visible_forums}}
<li class="forum-widget-entry forum-{{$forum.cid}}" id="forum-widget-entry-{{$forum.id}}" role="menuitem">
+ <span class="notify badge pull-right"></span>
<a href="{{$forum.external_url}}" title="{{$forum.link_desc}}" class="label sparkle" target="_blank">
<img class="forumlist-img" src="{{$forum.micro}}" alt="{{$forum.link_desc}}" />
</a>
- <a class="forum-widget-link" id="forum-widget-link-{{$forum.id}}" href="{{$forum.url}}" >{{$forum.name}}</a>
- <span class="notify badge pull-right"></span>
+ <a class="forum-widget-link {{if $forum.selected}}forum-selected{{/if}}" id="forum-widget-link-{{$forum.id}}" href="{{$forum.url}}" >{{$forum.name}}</a>
</li>
{{/if}}
{{if $forum.id > $visible_forums}}
<li class="forum-widget-entry forum-{{$forum.cid}}" id="forum-widget-entry-extended-{{$forum.id}}" role="menuitem" style="display: none;">
+ <span class="notify padge pull-right"></span>
<a href="{{$forum.external_url}}" title="{{$forum.link_desc}}" class="label sparkle" target="_blank">
<img class="forumlist-img" src="{{$forum.micro}}" alt="{{$forum.link_desc}}" />
</a>
- <a class="forum-widget-link" id="forum-widget-link-{{$forum.id}}" href="{{$forum.url}}" >{{$forum.name}}</a>
- <span class="notify padge pull-right"></span>
+ <a class="forum-widget-link {{if $forum.selected}}forum-selected{{/if}}" id="forum-widget-link-{{$forum.id}}" href="{{$forum.url}}" >{{$forum.name}}</a>
</li>
{{/if}}
{{/foreach}}
require_once('include/forums.php');
+ if(x($_GET['cid']) && intval($_GET['cid']) != 0)
+ $cid = $_GET['cid'];
+
//sort by last updated item
$lastitem = true;
foreach($contacts as $contact) {
+ $selected = (($cid == $contact['id']) ? ' forum-selected' : '');
+
$entry = array(
- 'url' => $a->get_baseurl() . '/network?f=&cid=' . $contact['id'],
- 'external_url' => $a->get_baseurl() . '/redir/' . $contact['id'],
+ 'url' => z_root() . '/network?f=&cid=' . $contact['id'],
+ 'external_url' => z_root() . '/redir/' . $contact['id'],
'name' => $contact['name'],
'cid' => $contact['id'],
+ 'selected' => $selected,
'micro' => proxy_url($contact['micro'], false, PROXY_SIZE_MICRO),
'id' => ++$id,
);