]> git.mxchange.org Git - friendica.git/blobdiff - include/text.php
unify hcard and vcard
[friendica.git] / include / text.php
index 253489180552b4822ffc475f1b3fe38d476e1810..89a58cccc07f5b8e381f93f363907e8e17d61b75 100644 (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;
+       }
+
+}