unify hcard and vcard

This commit is contained in:
rabuzarus 2015-12-01 18:31:08 +01:00
parent 0278e60664
commit 89c5989cfb
23 changed files with 234 additions and 124 deletions

View file

@ -2318,3 +2318,25 @@ function page_type_translate($page_type) {
return $trans_type;
}
/**
* @brief translate and format the networkname of a contact
*
* @param string $network
* Networkname of the contact (e.g. dfrn, rss and so on)
* @param sting $url
* The contact url
* @return string
*/
function format_network_name($network, $url = 0) {
if ($network != "") {
require_once('include/contact_selectors.php');
if ($url != "")
$network_name = '<a href="'.$url.'">'.network_to_name($network, $url)."</a>";
else
$network_name = network_to_name($network);
return $network_name;
}
}