X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FContent%2FContactSelector.php;h=06972c36d9f3be9ab16e240482c1f4763f29b15d;hb=3e51a23bd50327b3a2a9fd5401ff504f6d2b1d08;hp=bd8bcc989beefa14c74f1abb02dcc361e19d0d2e;hpb=a3ef9e35ec8ef7a0c24f1f90038e5276f7c81612;p=friendica.git diff --git a/src/Content/ContactSelector.php b/src/Content/ContactSelector.php index bd8bcc989b..06972c36d9 100644 --- a/src/Content/ContactSelector.php +++ b/src/Content/ContactSelector.php @@ -4,6 +4,8 @@ */ namespace Friendica\Content; +use Friendica\Core\Addon; +use Friendica\Core\L10n; use Friendica\Database\DBM; use Friendica\Protocol\Diaspora; use dba; @@ -25,7 +27,7 @@ class ContactSelector $o .= "\r\n"; - - $rep = array( - 0 => t('Unknown | Not categorised'), - 1 => t('Block immediately'), - 2 => t('Shady, spammer, self-marketer'), - 3 => t('Known to me, but no opinion'), - 4 => t('OK, probably harmless'), - 5 => t('Reputable, has my trust') - ); - - foreach ($rep as $k => $v) { - $selected = (($k == $current) ? " selected=\"selected\" " : ""); - $o .= "\r\n"; - } - $o .= "\r\n"; - return $o; - } - + /** + * @param string $current current + * @param boolean $disabled optional, default false + * @return object + */ public static function pollInterval($current, $disabled = false) { $dis = (($disabled) ? ' disabled="disabled" ' : ''); $o = ''; $o .= ""; + foreach ($select as $selection) { + if ($selection !== 'NOTRANSLATION') { + $selected = (($selection == $current) ? ' selected="selected" ' : ''); + $o .= ""; + } + } + $o .= ''; + return $o; + } + + /** + * @param string $current optional, default empty + * @param string $suffix optionsl, default empty + */ + public static function sexualPreference($current = "", $suffix = "") + { + $o = ''; + $select = ['', L10n::t('Males'), L10n::t('Females'), L10n::t('Gay'), L10n::t('Lesbian'), L10n::t('No Preference'), L10n::t('Bisexual'), L10n::t('Autosexual'), L10n::t('Abstinent'), L10n::t('Virgin'), L10n::t('Deviant'), L10n::t('Fetish'), L10n::t('Oodles'), L10n::t('Nonsexual')]; + + + Addon::callHooks('sexpref_selector', $select); + + $o .= "'; + return $o; + } + + /** + * @param string $current optional, default empty + */ + public static function maritalStatus($current = "") + { + $o = ''; + $select = ['', L10n::t('Single'), L10n::t('Lonely'), L10n::t('Available'), L10n::t('Unavailable'), L10n::t('Has crush'), L10n::t('Infatuated'), L10n::t('Dating'), L10n::t('Unfaithful'), L10n::t('Sex Addict'), L10n::t('Friends'), L10n::t('Friends/Benefits'), L10n::t('Casual'), L10n::t('Engaged'), L10n::t('Married'), L10n::t('Imaginarily married'), L10n::t('Partners'), L10n::t('Cohabiting'), L10n::t('Common law'), L10n::t('Happy'), L10n::t('Not looking'), L10n::t('Swinger'), L10n::t('Betrayed'), L10n::t('Separated'), L10n::t('Unstable'), L10n::t('Divorced'), L10n::t('Imaginarily divorced'), L10n::t('Widowed'), L10n::t('Uncertain'), L10n::t('It\'s complicated'), L10n::t('Don\'t care'), L10n::t('Ask me')]; + + Addon::callHooks('marital_selector', $select); + + $o .= ''; + return $o; + } }