aboutsummaryrefslogtreecommitdiffstats
path: root/include/channel.php
diff options
context:
space:
mode:
Diffstat (limited to 'include/channel.php')
-rw-r--r--include/channel.php25
1 files changed, 25 insertions, 0 deletions
diff --git a/include/channel.php b/include/channel.php
index 25e54003a..a6b510600 100644
--- a/include/channel.php
+++ b/include/channel.php
@@ -1162,6 +1162,10 @@ function profile_sidebar($profile, $block = 0, $show_connect = true, $zcard = fa
$location = $reddress = $pdesc = $gender = $marital = $homepage = False;
}
+ if($profile['gender']) {
+ $profile['gender_icon'] = gender_icon($profile['gender']);
+ }
+
$firstname = ((strpos($profile['channel_name'],' '))
? trim(substr($profile['channel_name'],0,strpos($profile['channel_name'],' '))) : $profile['channel_name']);
$lastname = (($firstname === $profile['channel_name']) ? '' : trim(substr($profile['channel_name'],strlen($firstname))));
@@ -1214,6 +1218,27 @@ function profile_sidebar($profile, $block = 0, $show_connect = true, $zcard = fa
}
+function gender_icon($gender) {
+
+ logger('gender: ' . $gender);
+
+ // This can easily get throw off if the observer language is different
+ // than the channel owner language.
+
+ if(strpos(strtolower($gender),strtolower(t('Female'))) !== false)
+ return 'venus';
+ if(strpos(strtolower($gender),strtolower(t('Male'))) !== false)
+ return 'mars';
+ if(strpos(strtolower($gender),strtolower(t('Trans'))) !== false)
+ return 'transgender';
+ if(strpos(strtolower($gender),strtolower(t('Neuter'))) !== false)
+ return 'neuter';
+ if(strpos(strtolower($gender),strtolower(t('Non-specific'))) !== false)
+ return 'genderless';
+
+ return '';
+}
+
function advanced_profile(&$a) {
require_once('include/text.php');