"morechoice" addon

pull/56/head^2
friendica 2012-05-28 17:35:24 -07:00
parent d6b3ddcd3d
commit 5d45beab08
2 changed files with 54 additions and 0 deletions

BIN
morechoice.tgz Normal file

Binary file not shown.

54
morechoice/morechoice.php Normal file
View File

@ -0,0 +1,54 @@
<?php
/**
* Name: More Choice
* Description: Additional gender/sexual preference/marital status options
* Version: 1.0
* Author: Mike Macgirvin <http://macgirvin.com/profile/mike>
*
*/
function morechoice_install() {
register_hook('gender_selector', 'addon/morechoice/morechoice.php', 'morechoice_gender_selector');
register_hook('sexpref_selector', 'addon/morechoice/morechoice.php', 'morechoice_sexpref_selector');
register_hook('marital_selector', 'addon/morechoice/morechoice.php', 'morechoice_marital_selector');
}
function morechoice_uninstall() {
unregister_hook('gender_selector', 'addon/morechoice/morechoice.php', 'morechoice_gender_selector');
unregister_hook('sexpref_selector', 'addon/morechoice/morechoice.php', 'morechoice_sexpref_selector');
unregister_hook('marital_selector', 'addon/morechoice/morechoice.php', 'morechoice_marital_selector');
}
// We aren't going to bother translating these to other languages.
function morechoice_gender_selector($a,&$b) {
if($a->config['system']['language'] == 'en') {
$b[] = 'Trigender';
}
}
function morechoice_sexpref_selector($a,&$b) {
if($a->config['system']['language'] == 'en') {
$b[] = 'Girls with big tits';
$b[] = 'Millionaires';
$b[] = 'Guys with big schlongs';
$b[] = 'Easy women';
}
}
function morechoice_marital_selector($a,&$b) {
if($a->config['system']['language'] == 'en') {
$b[] = 'Married to my job';
}
}