- $o = '';
- $select = ['', t('Male'), t('Female'), t('Currently Male'), t('Currently Female'), t('Mostly Male'), t('Mostly Female'), t('Transgender'), t('Intersex'), t('Transsexual'), t('Hermaphrodite'), t('Neuter'), t('Non-specific'), t('Other'), t('Undecided')];
-
- call_hooks('gender_selector', $select);
-
- $o .= "<select name=\"gender$suffix\" id=\"gender-select$suffix\" size=\"1\" >";
- foreach ($select as $selection) {
- if ($selection !== 'NOTRANSLATION') {
- $selected = (($selection == $current) ? ' selected="selected" ' : '');
- $o .= "<option value=\"$selection\" $selected >$selection</option>";
+ $nets = [
+ Protocol::DFRN => 'friendica',
+ Protocol::OSTATUS => 'gnu-social', // There is no generic OStatus icon
+ Protocol::FEED => 'rss',
+ Protocol::MAIL => 'inbox',
+ Protocol::DIASPORA => 'diaspora',
+ Protocol::ZOT => 'hubzilla',
+ Protocol::LINKEDIN => 'linkedin',
+ Protocol::XMPP => 'xmpp',
+ Protocol::MYSPACE => 'file-text-o', /// @todo
+ Protocol::GPLUS => 'google-plus',
+ Protocol::PUMPIO => 'file-text-o', /// @todo
+ Protocol::TWITTER => 'twitter',
+ Protocol::DISCOURSE => 'dot-circle-o', /// @todo
+ Protocol::DIASPORA2 => 'diaspora',
+ Protocol::STATUSNET => 'gnu-social',
+ Protocol::ACTIVITYPUB => 'activitypub',
+ Protocol::PNUT => 'file-text-o', /// @todo
+ ];
+
+ $platform_icons = ['diaspora' => 'diaspora', 'friendica' => 'friendica', 'friendika' => 'friendica',
+ 'GNU Social' => 'gnu-social', 'gnusocial' => 'gnu-social', 'hubzilla' => 'hubzilla',
+ 'mastodon' => 'mastodon', 'peertube' => 'peertube', 'pixelfed' => 'pixelfed',
+ 'pleroma' => 'pleroma', 'red' => 'hubzilla', 'redmatrix' => 'hubzilla',
+ 'socialhome' => 'social-home', 'wordpress' => 'wordpress'];
+
+ $search = array_keys($nets);
+ $replace = array_values($nets);
+
+ $network_icon = str_replace($search, $replace, $network);
+
+ if ((in_array($network, Protocol::FEDERATED)) && ($profile != "")) {
+ $server_url = self::getServerURLForProfile($profile);
+
+ // Now query the GServer for the platform name
+ $gserver = DBA::selectFirst('gserver', ['platform'], ['nurl' => $server_url]);
+
+ if (DBA::isResult($gserver) && !empty($gserver['platform'])) {
+ $network_icon = $platform_icons[strtolower($gserver['platform'])] ?? $network_icon;