diff --git a/facebook.tgz b/facebook.tgz index ca4a858c..edddbb64 100644 Binary files a/facebook.tgz and b/facebook.tgz differ diff --git a/facebook/facebook.php b/facebook/facebook.php index 2c48c7aa..f70524a6 100644 --- a/facebook/facebook.php +++ b/facebook/facebook.php @@ -332,6 +332,14 @@ function fb_get_friends_sync_parsecontact($uid, $contact) { $contact_id = $r[0]['id']; + $g = q("select def_gid from user where uid = %d limit 1", + intval($uid) + ); + if($g && intval($g[0]['def_gid'])) { + require_once('include/group.php'); + group_add_member($uid,'',$contact_id,$g[0]['def_gid']); + } + require_once("Photo.php"); $photos = import_profile_photo($r[0]['photo'],$uid,$contact_id); diff --git a/morechoice.tgz b/morechoice.tgz new file mode 100644 index 00000000..3dfce2cc Binary files /dev/null and b/morechoice.tgz differ diff --git a/morechoice/morechoice.php b/morechoice/morechoice.php new file mode 100644 index 00000000..da5f386d --- /dev/null +++ b/morechoice/morechoice.php @@ -0,0 +1,120 @@ + + * - who takes no responsibility for any additional content which may appear herein + * + */ + + +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[] = 'Androgyne'; + $b[] = 'Bear'; + $b[] = 'Bigender'; + $b[] = 'Cross dresser'; + $b[] = 'Drag queen'; + $b[] = 'Eunuch'; + $b[] = 'Faux queen'; + $b[] = 'Gender fluid'; + $b[] = 'Kathoey'; + $b[] = 'Lady'; + $b[] = 'Lipstick lesbian'; + $b[] = 'Metrosexual'; + $b[] = 'Monk'; + $b[] = 'Nun'; + $b[] = 'Soft butch'; + $b[] = 'Stone femme'; + $b[] = 'Tomboy'; + $b[] = 'Transman'; + $b[] = 'Transwoman'; + $b[] = 'Transvesti'; + $b[] = 'Trigender'; + $b[] = 'Can\'t remember'; + $b[] = 'Hard to tell these days'; + } +} + +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'; + $b[] = 'People with impaired mobility'; + $b[] = 'Amputees'; + $b[] = 'Statues, mannequins and immobility'; + $b[] = 'Pain'; + $b[] = 'Trans men'; + $b[] = 'Older women'; + $b[] = 'Asphyxiation'; + $b[] = 'In public'; + $b[] = 'In danger'; + $b[] = 'Pretending to be male'; + $b[] = 'Pretending to be female'; + $b[] = 'Breats'; + $b[] = 'Scat'; + $b[] = 'Crying'; + $b[] = 'Nappies/Diapers'; + $b[] = 'Trees'; + $b[] = 'Vomit'; + $b[] = 'Murder'; + $b[] = 'Fat people'; + $b[] = 'Feet'; + $b[] = 'Covered in insects'; + $b[] = 'Turning a human being into furniture'; + $b[] = 'Elderly people'; + $b[] = 'Transgender people'; + $b[] = 'Criminals'; + $b[] = 'Stealing'; + $b[] = 'Breast milk'; + $b[] = 'Immersing genitals in liquids'; + $b[] = 'Giants'; + $b[] = 'Masochism'; + $b[] = 'Cars'; + $b[] = 'Menstruation'; + $b[] = 'Mucus'; + $b[] = 'Obscene language'; + $b[] = 'Noses'; + $b[] = 'Navels'; + $b[] = 'Corpses'; + $b[] = 'Smells'; + $b[] = 'Buttocks'; + $b[] = 'Nonliving objects'; + $b[] = 'Sleeping people'; + $b[] = 'Urination'; + $b[] = 'Eating people'; + $b[] = 'Being eaten'; + $b[] = 'Animals'; + } +} + +function morechoice_marital_selector($a,&$b) { + if($a->config['system']['language'] == 'en') { + $b[] = 'Married to my job'; + $b[] = 'Polygamist'; + $b[] = 'Half married'; + + } +} diff --git a/privacy_image_cache.tgz b/privacy_image_cache.tgz new file mode 100644 index 00000000..38a25ff7 Binary files /dev/null and b/privacy_image_cache.tgz differ diff --git a/privacy_image_cache/privacy_image_cache.php b/privacy_image_cache/privacy_image_cache.php index 45aeb080..4e836219 100644 --- a/privacy_image_cache/privacy_image_cache.php +++ b/privacy_image_cache/privacy_image_cache.php @@ -62,7 +62,9 @@ function privacy_image_cache_init() { */ function privacy_image_cache_is_local_image($url) { if ($url[0] == '/') return true; - $baseurl = get_app()->get_baseurl(); + // links normalised - bug #431 + $baseurl = normalise_link(get_app()->get_baseurl()); + $url = normalise_link($url); return (substr($url, 0, strlen($baseurl)) == $baseurl); } @@ -71,7 +73,8 @@ function privacy_image_cache_is_local_image($url) { * @return string */ function privacy_image_cache_img_cb($matches) { - if (privacy_image_cache_is_local_image($matches[2])) return $matches[2]; + // following line changed per bug #431 + if (privacy_image_cache_is_local_image($matches[2])) return $matches[1] . $matches[2] . $matches[3]; return $matches[1] . "/privacy_image_cache/?url=" . escape_tags(addslashes($matches[2])) . $matches[3]; } @@ -112,7 +115,7 @@ function privacy_image_cache_ping_xmlize_hook(&$a, &$o) { * @param App $a * @param null|object $b */ -function privacy_image_cache_cron(&$a, &$b) { +function privacy_image_cache_cron(&$a = null, &$b = null) { $cachetime = get_config('privacy_image_cache','cache_time'); if (!$cachetime) $cachetime = PRIVACY_IMAGE_CACHE_DEFAULT_TIME; @@ -161,7 +164,7 @@ function privacy_image_cache_plugin_admin(&$a, &$o){ * @param App $a * @param null|object $o */ -function privacy_image_cache_plugin_admin_post(&$a, &$o){ +function privacy_image_cache_plugin_admin_post(&$a = null, &$o = null){ check_form_security_token_redirectOnErr('/admin/plugins/privacy_image_cache', 'picsave'); if (isset($_REQUEST['save'])) { diff --git a/public_server.tgz b/public_server.tgz new file mode 100755 index 00000000..d970d486 Binary files /dev/null and b/public_server.tgz differ diff --git a/public_server/README.md b/public_server/README.md new file mode 100644 index 00000000..44b29f8e --- /dev/null +++ b/public_server/README.md @@ -0,0 +1,29 @@ +Public Server +============= + + +Public Server is a Friendica plugin which implements automatic account & post expiration so that a site may be used as a public +test bed with reduced data retention. + +This is a modified version of the testdrive plugin, DO NOT ACTIVATE AT THE SAME TIME AS THE TESTDRIVE PLUGIN. + +//When an account is created on the site, it is given a hard expiration date of +$a->config['public_server']['expiredays'] = 30; +//Set the default days for posts to expire here +$a->config['public_server']['expireposts'] = 30; +//Remove users who have never logged in after nologin days +$a->config['public_server']['nologin'] = 30; +//Remove users who last logged in over flagusers days ago +$a->config['public_server']['flagusers'] = 146; +//For users who last logged in over flagposts days ago set post expiry days to flagpostsexpire +$a->config['public_server']['flagposts'] = 90; +$a->config['public_server']['flagpostsexpire'] = 146; + +Set these in your .htconfig.php file. By default nothing is defined in case the plugin is activated accidentally. +They can be ommitted or set to 0 to disable each option. +The default values are those used by friendica.eu, change these as desired. + +The expiration date is updated when the user logs in. + +An email warning will be sent out approximately five days before the expiration occurs. Five days later the account is removed completely. + diff --git a/public_server/public_server.php b/public_server/public_server.php new file mode 100644 index 00000000..3711854f --- /dev/null +++ b/public_server/public_server.php @@ -0,0 +1,140 @@ + + */ + + + + +function public_server_install() { + + register_hook('register_account', 'addon/public_server/public_server.php', 'public_server_register_account'); + register_hook('cron', 'addon/public_server/public_server.php', 'public_server_cron'); + register_hook('enotify','addon/public_server/public_server.php', 'public_server_enotify'); + register_hook('logged_in', 'addon/public_server/public_server.php', 'public_server_login'); +} + + +function public_server_uninstall() { + + unregister_hook('register_account', 'addon/public_server/public_server.php', 'public_server_register_account'); + unregister_hook('cron', 'addon/public_server/public_server.php', 'public_server_cron'); + unregister_hook('enotify','addon/public_server/public_server.php', 'public_server_enotify'); + unregister_hook('logged_in', 'addon/public_server/public_server.php', 'public_server_login'); +} + +function public_server_register_account($a,$b) { + + $uid = $b; + + $days = get_config('public_server','expiredays'); + $days_posts = get_config('public_server','expireposts'); + if(! $days) + return; + + $r = q("UPDATE user set account_expires_on = '%s', expire = %d where uid = %d limit 1", + dbesc(datetime_convert('UTC','UTC','now +' . $days . ' days')), + intval($days_posts), + intval($uid) + ); + +}; + + +function public_server_cron($a,$b) { + require_once('include/enotify.php'); + $r = q("select * from user where account_expires_on < UTC_TIMESTAMP() + INTERVAL 5 DAY and account_expires_on > '0000-00-00 00:00:00' and + expire_notification_sent = '0000-00-00 00:00:00' "); + + if(count($r)) { + foreach($r as $rr) { + notification(array( + 'uid' => $rr['uid'], + 'type' => NOTIFY_SYSTEM, + 'system_type' => 'public_server_expire', + 'language' => $rr['language'], + 'to_name' => $rr['username'], + 'to_email' => $rr['email'], + 'source_name' => t('Administrator'), + 'source_link' => $a->get_baseurl(), + 'source_photo' => $a->get_baseurl() . '/images/person-80.jpg', + )); + + q("update user set expire_notification_sent = '%s' where uid = %d limit 1", + dbesc(datetime_convert()), + intval($rr['uid']) + ); + } + } + + $r = q("select * from user where account_expired = 1 and account_expires_on < UTC_TIMESTAMP() - INTERVAL 5 DAY and account_expires_on > '0000-00-00 00:00:00'"); + if(count($r)) { + require_once('include/Contact.php'); + foreach($r as $rr) + user_remove($rr['uid']); + + } + $nologin = get_config('public_server','nologin'); + if($nologin) { + $r = q("select uid from user where account_expired = 0 and login_date = '0000-00-00 00:00:00' and register_date < UTC_TIMESTAMP() - INTERVAL %d DAY and account_expires_on = '0000-00-00 00:00:00'",intval($nologin)); + if(count($r)) { + foreach($r as $rr) + q("update user set account_expires_on = '%s' where uid = %d limit 1", + dbesc(datetime_convert('UTC','UTC','now +' . '6 days')), + intval($rr['uid']) + ); + } + } + + + $flagusers = get_config('public_server','flagusers'); + if($flagusers) { + $r = q("select uid from user where account_expired = 0 and login_date < UTC_TIMESTAMP() - INTERVAL %d DAY and account_expires_on = '0000-00-00 00:00:00' and `page-flags` = 0",intval($flagusers)); + if(count($r)) { + foreach($r as $rr) + q("update user set account_expires_on = '%s' where uid = %d limit 1", + dbesc(datetime_convert('UTC','UTC','now +' . '6 days')), + intval($rr['uid']) + ); + } + } + + $flagposts = get_config('public_server','flagposts'); + $flagpostsexpire = get_config('public_server','flagpostsexpire'); + if ($flagposts && $flagpostsexpire) { + $r = q("select uid from user where account_expired = 0 and login_date < UTC_TIMESTAMP() - INTERVAL %d DAY and account_expires_on = '0000-00-00 00:00:00' and expire = 0 and `page-flags` = 0",intval($flagposts)); + if(count($r)) { + foreach($r as $rr) + q("update user set expire = %d where uid = %d limit 1", + intval($flagpostsexpire), + intval($rr['uid']) + ); + } + } + + +} + +function public_server_enotify(&$a, &$b) { + if (x($b, 'params') && $b['params']['type'] == NOTIFY_SYSTEM + && x($b['params'], 'system_type') && $b['params']['system_type'] === 'public_server_expire') { + $b['itemlink'] = $a->get_baseurl(); + $b['epreamble'] = $b['preamble'] = sprintf( t('Your account on %s will expire in a few days.'), get_config('system','sitename')); + $b['subject'] = t('Your Friendica account is about to expire.'); + $b['body'] = sprintf( t("Hi %1\$s,\n\nYour account on %2\$s will expire in less than five days. You may keep your account by logging in at least once every 30 days"), $b['params']['to_name'], "[url=" . $app->config["system"]["url"] . "]" . $app->config["sitename"] . "[/url]"); + } +} + +function public_server_login($a,$b) { + $days = get_config('public_server','expiredays'); + if(! $days) + return; + $r = q("UPDATE user set account_expires_on = '%s' where uid = %d and account_expires_on > '0000-00-00 00:00:00' limit 1", + dbesc(datetime_convert('UTC','UTC','now +' . $days . ' days')), + local_user() + ); +} diff --git a/smiley_pack.tgz b/smiley_pack.tgz index 790bc064..2b1296d5 100644 Binary files a/smiley_pack.tgz and b/smiley_pack.tgz differ diff --git a/smiley_pack/README.md b/smiley_pack/README.md new file mode 100644 index 00000000..b3b155cc --- /dev/null +++ b/smiley_pack/README.md @@ -0,0 +1,3 @@ +By default, smiley_pack will use smiley code based on the English language. However, we have a couple of translations now. In the "lang" folder, you will find French (fr) and spanish (es) translations. Simply copy the directories to addon/ (so smiley_pack_xx ends up in the same place as smiley_pack) then enable each language you require in your admin panel. + +The English version is **required** for the other languages to work. This is to a) save space by keeping all the smileys in one place, and b) for compatibility with other servers who will overwhelmingly be using the English version. \ No newline at end of file diff --git a/smiley_pack/icons/fight/alpha.png b/smiley_pack/icons/fight/alpha.png new file mode 100644 index 00000000..09e3f233 Binary files /dev/null and b/smiley_pack/icons/fight/alpha.png differ diff --git a/smiley_pack/icons/sad/sigh.gif b/smiley_pack/icons/sad/sigh.gif new file mode 100644 index 00000000..68602266 Binary files /dev/null and b/smiley_pack/icons/sad/sigh.gif differ diff --git a/smiley_pack/lang/smiley_pack_es/smiley_pack_es.php b/smiley_pack/lang/smiley_pack_es/smiley_pack_es.php new file mode 100644 index 00000000..fb4bce13 --- /dev/null +++ b/smiley_pack/lang/smiley_pack_es/smiley_pack_es.php @@ -0,0 +1,493 @@ +get_baseurl() . '/addon/smiley_pack/icons/animals/bunnyflowers.gif' . '" alt="' . ':conejitoflores' . '" />'; + + $b['texts'][] = ':pollito'; + $b['icons'][] = ''; + + $b['texts'][] = ':abeja'; + $b['icons'][] = ''; + + $b['texts'][] = ':mariquita'; + $b['icons'][] = ''; + + $b['texts'][] = ':araña'; + $b['icons'][] = ''; + + $b['texts'][] = ':gato'; + $b['icons'][] = ''; + + $b['texts'][] = ':conejito'; + $b['icons'][] = ''; + + $b['texts'][] = ':vaca'; + $b['icons'][] = ''; + + $b['texts'][] = ':cangrejo'; + $b['icons'][] = ''; + + $b['texts'][] = ':delfín'; + $b['icons'][] = ''; + + $b['texts'][] = ':libélula'; + $b['icons'][] = ''; + + $b['texts'][] = ':rana'; + $b['icons'][] = ''; + + $b['texts'][] = ':hamster'; + $b['icons'][] = ''; + + $b['texts'][] = ':mono'; + $b['icons'][] = ''; + + $b['texts'][] = ':caballo'; + $b['icons'][] = ''; + + $b['texts'][] = ':loro'; + $b['icons'][] = ''; + + $b['texts'][] = ':tux'; + $b['icons'][] = ''; + + $b['texts'][] = ':caracol'; + $b['icons'][] = ''; + + $b['texts'][] = ':oveja'; + $b['icons'][] = ''; + + $b['texts'][] = ':perro'; + $b['icons'][] = ''; + + $b['texts'][] = ':elefante'; + $b['icons'][] = ''; + + $b['texts'][] = ':pez'; + $b['icons'][] = ''; + + $b['texts'][] = ':jirafa'; + $b['icons'][] = ''; + + $b['texts'][] = ':cerdo'; + $b['icons'][] = ''; + + + +#Baby Smileys + + $b['texts'][] = ':bebé'; + $b['icons'][] = ''; + + $b['texts'][] = ':cuna'; + $b['icons'][] = ''; + + + $b['texts'][] = ':embarazada'; + $b['icons'][] = ''; + + $b['texts'][] = ':cigüeña'; + $b['icons'][] = ''; + + +#Confused Smileys + $b['texts'][] = ':confundido'; + $b['icons'][] = ''; + + $b['texts'][] = ':encogehombros'; + $b['icons'][] = ''; + + $b['texts'][] = ':estúpido'; + $b['icons'][] = ''; + + $b['texts'][] = ':aturdidp'; + $b['icons'][] = ''; + + +#Cool Smileys + + $b['texts'][] = ':afro'; + $b['icons'][] = ''; + + $b['texts'][] = ':guay'; + $b['icons'][] = ''; + +#Devil/Angel Smileys + + $b['texts'][] = ':ángel'; + $b['icons'][] = ''; + + $b['texts'][] = ':querubín'; + $b['icons'][] = ''; + + $b['texts'][] = ':ángeldemonio'; + $b['icons'][] = ''; + + $b['texts'][] = ':gatodemonio'; + $b['icons'][] = ''; + + $b['texts'][] = ':diabólico'; + $b['icons'][] = ''; + + $b['texts'][] = ':adbalancín'; + $b['icons'][] = ''; + + $b['texts'][] = ':vuelvedemonio'; + $b['icons'][] = ''; + + $b['texts'][] = ':santo'; + $b['icons'][] = ''; + + $b['texts'][] = ':tumba'; + $b['icons'][] = ''; + +#Unpleasent smileys. + + $b['texts'][] = ':retrete'; + $b['icons'][] = ''; + + $b['texts'][] = ':pedoencama'; + $b['icons'][] = ''; + + $b['texts'][] = ':vómito'; + $b['icons'][] = ''; + + $b['texts'][] = ':pedosonrojo'; + $b['icons'][] = ''; + +#Drinks + + $b['texts'][] = ':té'; + $b['icons'][] = ''; + + $b['texts'][] = ':baba'; + $b['icons'][] = ''; + +#Sad smileys + + $b['texts'][] = ':llorar'; + $b['icons'][] = ''; + + $b['texts'][] = ':prisonero'; + $b['icons'][] = ''; + + $b['texts'][] = ':suspiro'; + $b['icons'][] = ''; + +#Smoking - only one smiley in here, maybe it needs moving elsewhere? + + $b['texts'][] = ':fumar'; + $b['icons'][] = ''; + +#Sport smileys + + $b['texts'][] = ':baloncesto'; + $b['icons'][] = ''; + + $b['texts'][] = ':bolos'; + $b['icons'][] = ''; + + $b['texts'][] = ':enbici'; + $b['icons'][] = ''; + + $b['texts'][] = ':dardos'; + $b['icons'][] = ''; + + $b['texts'][] = ':esgrima'; + $b['icons'][] = ''; + + $b['texts'][] = ':golf'; + $b['icons'][] = ''; + + $b['texts'][] = ':malabares'; + $b['icons'][] = ''; + + $b['texts'][] = ':comba'; + $b['icons'][] = ''; + + $b['texts'][] = ':tiroconarco'; + $b['icons'][] = ''; + + $b['texts'][] = ':fútbol'; + $b['icons'][] = ''; + + $b['texts'][] = ':surf'; + $b['icons'][] = ''; + + $b['texts'][] = ':billar'; + $b['icons'][] = ''; + + $b['texts'][] = ':tenis'; + $b['icons'][] = ''; + + $b['texts'][] = ':acaballo'; + $b['icons'][] = ''; + +#Love smileys + + $b['texts'][] = ':tequiero'; + $b['icons'][] = ''; + + $b['texts'][] = ':enamorada'; + $b['icons'][] = ''; + + $b['texts'][] = ':amor'; + $b['icons'][] = ''; + + $b['texts'][] = ':osoamoroso'; + $b['icons'][] = ''; + + $b['texts'][] = ':camaamor'; + $b['icons'][] = ''; + + $b['texts'][] = ':corazónamor'; + $b['icons'][] = ''; + +#Tired/Sleep smileys + + $b['texts'][] = ':contandoovejas'; + $b['icons'][] = ''; + + $b['texts'][] = ':hamaca'; + $b['icons'][] = ''; + + $b['texts'][] = ':almohada'; + $b['icons'][] = ''; + + $b['texts'][] = ':bostezo'; + $b['icons'][] = ''; + +#Fight/Flame/Violent smileys + + $b['texts'][] = ':pistolas'; + $b['icons'][] = ''; + + $b['texts'][] = ':peleamarciano'; + $b['icons'][] = ''; + + $b['texts'][] = ':alfa'; + $b['icons'][] = ''; + + $b['texts'][] = ':ejército'; + $b['icons'][] = ''; + + $b['texts'][] = ':cabezaflecha'; + $b['icons'][] = ''; + + $b['texts'][] = ':bfg'; + $b['icons'][] = ''; + + $b['texts'][] = ':arquero'; + $b['icons'][] = ''; + + $b['texts'][] = ':motosierra'; + $b['icons'][] = ''; + + $b['texts'][] = ':ballesta'; + $b['icons'][] = ''; + + $b['texts'][] = ':cruzado'; + $b['icons'][] = ''; + + $b['texts'][] = ':muerto'; + $b['icons'][] = ''; + + $b['texts'][] = ':martillazo'; + $b['icons'][] = ''; + + $b['texts'][] = ':pistolalaser'; + $b['icons'][] = ''; + + $b['texts'][] = ':metralleta'; + $b['icons'][] = ''; + + $b['texts'][] = ':marine'; + $b['icons'][] = ''; + + $b['texts'][] = ':sable'; + $b['icons'][] = ''; + + $b['texts'][] = ':tanque'; + $b['icons'][] = ''; + + $b['texts'][] = ':vikingo'; + $b['icons'][] = ''; + + $b['texts'][] = ':bandas'; + $b['icons'][] = ''; + + $b['texts'][] = ':ácido'; + $b['icons'][] = ''; + +#Fantasy smileys - monsters and dragons fantasy. The other type of fantasy belongs in adult smileys + + $b['texts'][] = ':alien'; + $b['icons'][] = ''; + + $b['texts'][] = ':bárbaro'; + $b['icons'][] = ''; + + $b['texts'][] = ':dinosaurio'; + $b['icons'][] = ''; + + $b['texts'][] = ':dragón'; + $b['icons'][] = ''; + + $b['texts'][] = ':draco'; + $b['icons'][] = ''; + + $b['texts'][] = ':fantasma'; + $b['icons'][] = ''; + + $b['texts'][] = ':momia'; + $b['icons'][] = ''; + +#Food smileys + + $b['texts'][] = ':mazana'; + $b['icons'][] = ''; + + $b['texts'][] = ':brócoli'; + $b['icons'][] = ''; + + $b['texts'][] = ':pastel'; + $b['icons'][] = ''; + + $b['texts'][] = ':zanahoria'; + $b['icons'][] = ''; + + $b['texts'][] = ':palomitas'; + $b['icons'][] = ''; + + $b['texts'][] = ':tomate'; + $b['icons'][] = ''; + + $b['texts'][] = ':plátano'; + $b['icons'][] = ''; + + $b['texts'][] = ':cocinar'; + $b['icons'][] = ''; + + $b['texts'][] = ':huevofrito'; + $b['icons'][] = ''; + +#Happy smileys + + $b['texts'][] = ':cloud9'; + $b['icons'][] = ''; + + $b['texts'][] = ':tearsofjoy'; + $b['icons'][] = ''; + +#Repsect smileys + + $b['texts'][] = ':reverencia'; + $b['icons'][] = ''; + + $b['texts'][] = ':bravo'; + $b['icons'][] = ''; + + $b['texts'][] = ':vivaelrey'; + $b['icons'][] = ''; + + $b['texts'][] = ':número1'; + $b['icons'][] = ''; + +#Laugh smileys + + $b['texts'][] = ':jajaja'; + $b['icons'][] = ''; + + $b['texts'][] = ':jajatv'; + $b['icons'][] = ''; + + $b['texts'][] = ':meparto'; + $b['icons'][] = ''; + +#Music smileys + + $b['texts'][] = ':dj'; + $b['icons'][] = ''; + + $b['texts'][] = ':batería'; + $b['icons'][] = ''; + + $b['texts'][] = ':elvis'; + $b['icons'][] = ''; + + $b['texts'][] = ':guitarra'; + $b['icons'][] = ''; + + $b['texts'][] = ':trompeta'; + $b['icons'][] = ''; + + $b['texts'][] = ':violín'; + $b['icons'][] = ''; + +#Smileys that used to be in core + + $b['texts'][] = ':cabezagolpe'; + $b['icons'][] = ''; + + $b['texts'][] = ':barba'; + $b['icons'][] = ''; + + $b['texts'][] = ':barbablanca'; + $b['icons'][] = ''; + + $b['texts'][] = ':saludosurf'; + $b['icons'][] = ''; + + $b['texts'][] = ':\\.../'; + $b['icons'][] = ''; + + $b['texts'][] = ':\\ooo/'; + $b['icons'][] = ''; + + $b['texts'][] = ':cabezamesa'; + $b['icons'][] = ''; + +#These two are still in core, so oldcore isn't strictly right, but we don't want too many directories + + $b['texts'][] = ':-d'; + $b['icons'][] = ''; + + $b['texts'][] = ':-o'; + $b['icons'][] = ''; + + + + +} diff --git a/smiley_pack/lang/smiley_pack_fr/smiley_pack_fr.php b/smiley_pack/lang/smiley_pack_fr/smiley_pack_fr.php new file mode 100644 index 00000000..8623157c --- /dev/null +++ b/smiley_pack/lang/smiley_pack_fr/smiley_pack_fr.php @@ -0,0 +1,491 @@ +get_baseurl() . '/addon/smiley_pack/icons/animals/bunnyflowers.gif' . '" alt="' . ':fleurslapin' . '" />'; + + $b['texts'][] = ':poussin'; + $b['icons'][] = ''; + + $b['texts'][] = ':bourdon'; + $b['icons'][] = ''; + + $b['texts'][] = ':coccinelle'; + $b['icons'][] = ''; + + $b['texts'][] = ':araignée'; + $b['icons'][] = ''; + + $b['texts'][] = ':chat'; + $b['icons'][] = ''; + + $b['texts'][] = ':lapin'; + $b['icons'][] = ''; + + $b['texts'][] = ':poussin'; + $b['icons'][] = ''; + + $b['texts'][] = ':vache'; + $b['icons'][] = ''; + + $b['texts'][] = ':crabe'; + $b['icons'][] = ''; + + $b['texts'][] = ':dauphin'; + $b['icons'][] = ''; + + $b['texts'][] = ':libellule'; + $b['icons'][] = ''; + + $b['texts'][] = ':grenouille'; + $b['icons'][] = ''; + + $b['texts'][] = ':hamster'; + $b['icons'][] = ''; + + $b['texts'][] = ':singe'; + $b['icons'][] = ''; + + $b['texts'][] = ':cheval'; + $b['icons'][] = ''; + + $b['texts'][] = ':perroquet'; + $b['icons'][] = ''; + + $b['texts'][] = ':tux'; + $b['icons'][] = ''; + + $b['texts'][] = ':escargot'; + $b['icons'][] = ''; + + $b['texts'][] = ':mouton'; + $b['icons'][] = ''; + + $b['texts'][] = ':chien'; + $b['icons'][] = ''; + + $b['texts'][] = ':éléphant'; + $b['icons'][] = ''; + + $b['texts'][] = ':poisson'; + $b['icons'][] = ''; + + $b['texts'][] = ':girafe'; + $b['icons'][] = ''; + + $b['texts'][] = ':cochon'; + $b['icons'][] = ''; + + + +#Baby Smileys + + $b['texts'][] = ':bébé'; + $b['icons'][] = ''; + + $b['texts'][] = ':litbébé'; + $b['icons'][] = ''; + + + $b['texts'][] = ':enceinte'; + $b['icons'][] = ''; + + $b['texts'][] = ':cigogne'; + $b['icons'][] = ''; + + +#Confused Smileys + $b['texts'][] = ':paumé'; + $b['icons'][] = ''; + + $b['texts'][] = ':hausseépaules'; + $b['icons'][] = ''; + + $b['texts'][] = ':stupide'; + $b['icons'][] = ''; + + $b['texts'][] = ':hébété'; + $b['icons'][] = ''; + + +#Cool Smileys + + $b['texts'][] = ':afro'; + $b['icons'][] = ''; + + $b['texts'][] = ':cool'; + $b['icons'][] = ''; + +#Devil/Angel Smileys + + $b['texts'][] = ':ange'; + $b['icons'][] = ''; + + $b['texts'][] = ':chérubin'; + $b['icons'][] = ''; + + $b['texts'][] = ':démonange'; + $b['icons'][] = ''; + + $b['texts'][] = ':diablechat'; + $b['icons'][] = ''; + + $b['texts'][] = ':démoniaque'; + $b['icons'][] = ''; + + $b['texts'][] = ':bascule'; + $b['icons'][] = ''; + + $b['texts'][] = ':possédé'; + $b['icons'][] = ''; + + $b['texts'][] = ':saint'; + $b['icons'][] = ''; + + $b['texts'][] = ':tombe'; + $b['icons'][] = ''; + +#Unpleasent smileys. + + $b['texts'][] = ':toilettes'; + $b['icons'][] = ''; + + $b['texts'][] = ':pèteaulit'; + $b['icons'][] = ''; + + $b['texts'][] = ':vomit'; + $b['icons'][] = ''; + + $b['texts'][] = ':pet'; + $b['icons'][] = ''; + +#Drinks + + $b['texts'][] = ':thé'; + $b['icons'][] = ''; + + $b['texts'][] = ':salive'; + $b['icons'][] = ''; + +#Sad smileys + + $b['texts'][] = ':pleure'; + $b['icons'][] = ''; + + $b['texts'][] = ':prisonnier'; + $b['icons'][] = ''; + + $b['texts'][] = ':soupir'; + $b['icons'][] = ''; + +#Smoking - only one smiley in here, maybe it needs moving elsewhere? + + $b['texts'][] = ':fume'; + $b['icons'][] = ''; + +#Sport smileys + + $b['texts'][] = ':basket'; + $b['icons'][] = ''; + + $b['texts'][] = ':bowling'; + $b['icons'][] = ''; + + $b['texts'][] = ':vélo'; + $b['icons'][] = ''; + + $b['texts'][] = ':fléchettes'; + $b['icons'][] = ''; + + $b['texts'][] = ':escrime'; + $b['icons'][] = ''; + + $b['texts'][] = ':golf'; + $b['icons'][] = ''; + + $b['texts'][] = ':jonglage'; + $b['icons'][] = ''; + + $b['texts'][] = ':sautàlacorde'; + $b['icons'][] = ''; + + $b['texts'][] = ':arc'; + $b['icons'][] = ''; + + $b['texts'][] = ':football'; + $b['icons'][] = ''; + + $b['texts'][] = ':surf'; + $b['icons'][] = ''; + + $b['texts'][] = ':billard'; + $b['icons'][] = ''; + + $b['texts'][] = ':tennis'; + $b['icons'][] = ''; + + $b['texts'][] = ':équitation'; + $b['icons'][] = ''; + +#Love smileys + + $b['texts'][] = ':jetaime'; + $b['icons'][] = ''; + + $b['texts'][] = ':amoureux'; + $b['icons'][] = ''; + + $b['texts'][] = ':love'; + $b['icons'][] = ''; + + $b['texts'][] = ':oursamour'; + $b['icons'][] = ''; + + $b['texts'][] = ':amourlit'; + $b['icons'][] = ''; + + $b['texts'][] = ':coeur'; + $b['icons'][] = ''; + +#Tired/Sleep smileys + + $b['texts'][] = ':comptemoutons'; + $b['icons'][] = ''; + + $b['texts'][] = ':hamac'; + $b['icons'][] = ''; + + $b['texts'][] = ':oreiller'; + $b['icons'][] = ''; + + $b['texts'][] = ':bâille'; + $b['icons'][] = ''; + +#Fight/Flame/Violent smileys + + $b['texts'][] = ':2pistolets'; + $b['icons'][] = ''; + + $b['texts'][] = ':combatalien'; + $b['icons'][] = ''; + + $b['texts'][] = ':alpha'; + $b['icons'][] = ''; + + $b['texts'][] = ':armée'; + $b['icons'][] = ''; + + $b['texts'][] = ':flèche'; + $b['icons'][] = ''; + + $b['texts'][] = ':bfg'; + $b['icons'][] = ''; + + $b['texts'][] = ':archer'; + $b['icons'][] = ''; + + $b['texts'][] = ':tronçonneuse'; + $b['icons'][] = ''; + + $b['texts'][] = ':arbalète'; + $b['icons'][] = ''; + + $b['texts'][] = ':croisé'; + $b['icons'][] = ''; + + $b['texts'][] = ':mort'; + $b['icons'][] = ''; + + $b['texts'][] = ':marteau'; + $b['icons'][] = ''; + + $b['texts'][] = ':pistoletlaser'; + $b['icons'][] = ''; + + $b['texts'][] = ':mitrailleuse'; + $b['icons'][] = ''; + + $b['texts'][] = ':marine'; + $b['icons'][] = ''; + + $b['texts'][] = ':sabre'; + $b['icons'][] = ''; + + $b['texts'][] = ':tank'; + $b['icons'][] = ''; + + $b['texts'][] = ':viking'; + $b['icons'][] = ''; + + $b['texts'][] = ':gangs'; + $b['icons'][] = ''; + + $b['texts'][] = ':acide'; + $b['icons'][] = ''; + +#Fantasy smileys - monsters and dragons fantasy. The other type of fantasy belongs in adult smileys + + $b['texts'][] = ':monstrealien'; + $b['icons'][] = ''; + + $b['texts'][] = ':barbare'; + $b['icons'][] = ''; + + $b['texts'][] = ':dinosaure'; + $b['icons'][] = ''; + + $b['texts'][] = ':dragon'; + $b['icons'][] = ''; + + $b['texts'][] = ':petitdragon'; + $b['icons'][] = ''; + + $b['texts'][] = ':fantôme'; + $b['icons'][] = ''; + + $b['texts'][] = ':momie'; + $b['icons'][] = ''; + +#Food smileys + + $b['texts'][] = ':pomme'; + $b['icons'][] = ''; + + $b['texts'][] = ':brocoli'; + $b['icons'][] = ''; + + $b['texts'][] = ':gâteau'; + $b['icons'][] = ''; + + $b['texts'][] = ':carotte'; + $b['icons'][] = ''; + + $b['texts'][] = ':popcorn'; + $b['icons'][] = ''; + + $b['texts'][] = ':tomate'; + $b['icons'][] = ''; + + $b['texts'][] = ':banane'; + $b['icons'][] = ''; + + $b['texts'][] = ':cuisine'; + $b['icons'][] = ''; + + $b['texts'][] = ':oeufauplat'; + $b['icons'][] = ''; + +#Happy smileys + + $b['texts'][] = ':nuage'; + $b['icons'][] = ''; + + $b['texts'][] = ':larmesdejoie'; + $b['icons'][] = ''; + +#Repsect smileys + + $b['texts'][] = ':courbette'; + $b['icons'][] = ''; + + $b['texts'][] = ':bravo'; + $b['icons'][] = ''; + + $b['texts'][] = ':viveleroi'; + $b['icons'][] = ''; + + $b['texts'][] = ':numéro1'; + $b['icons'][] = ''; + +#Laugh smileys + + $b['texts'][] = ':hahaha'; + $b['icons'][] = ''; + + $b['texts'][] = ':loltv'; + $b['icons'][] = ''; + + $b['texts'][] = ':rofl'; + $b['icons'][] = ''; + +#Music smileys + + $b['texts'][] = ':dj'; + $b['icons'][] = ''; + + $b['texts'][] = ':batterie'; + $b['icons'][] = ''; + + $b['texts'][] = ':elvis'; + $b['icons'][] = ''; + + $b['texts'][] = ':guitare'; + $b['icons'][] = ''; + + $b['texts'][] = ':trompette'; + $b['icons'][] = ''; + + $b['texts'][] = ':violon'; + $b['icons'][] = ''; + +#Smileys that used to be in core + + $b['texts'][] = ':cognetête'; + $b['icons'][] = ''; + + $b['texts'][] = ':barbu'; + $b['icons'][] = ''; + + $b['texts'][] = ':barbeblanche'; + $b['icons'][] = ''; + + $b['texts'][] = ':shaka'; + $b['icons'][] = ''; + + $b['texts'][] = ':\\.../'; + $b['icons'][] = ''; + + $b['texts'][] = ':\\ooo/'; + $b['icons'][] = ''; + + $b['texts'][] = ':tête'; + $b['icons'][] = ''; + +#These two are still in core, so oldcore isn't strictly right, but we don't want too many directories + + $b['texts'][] = ':-d'; + $b['icons'][] = ''; + + $b['texts'][] = ':-o'; + $b['icons'][] = ''; + +} diff --git a/smiley_pack/smiley_pack.php b/smiley_pack/smiley_pack.php index ed4d0e65..74d1da06 100644 --- a/smiley_pack/smiley_pack.php +++ b/smiley_pack/smiley_pack.php @@ -2,13 +2,15 @@ /* * Name: Smiley Pack * Description: Pack of smileys that make master too AOLish. - * Version: 1.0 + * Version: 1.02 * Author: Thomas Willingham (based on Mike Macgirvin's Adult Smile template) * All smileys from sites offering them as Public Domain - * - * */ +/** + +*/ + function smiley_pack_install() { register_hook('smilie', 'addon/smiley_pack/smiley_pack.php', 'smiley_pack_smilies'); } @@ -51,9 +53,6 @@ function smiley_pack_smilies(&$a,&$b) { $b['texts'][] = ':bunny'; $b['icons'][] = ''; - $b['texts'][] = ':chick'; - $b['icons'][] = ''; - $b['texts'][] = ':cow'; $b['icons'][] = ''; @@ -204,6 +203,9 @@ function smiley_pack_smilies(&$a,&$b) { $b['texts'][] = ':prisoner'; $b['icons'][] = ''; + $b['texts'][] = ':sigh'; + $b['icons'][] = ''; + #Smoking - only one smiley in here, maybe it needs moving elsewhere? $b['texts'][] = ':smoking'; @@ -295,6 +297,9 @@ function smiley_pack_smilies(&$a,&$b) { $b['texts'][] = ':alienfight'; $b['icons'][] = ''; + $b['texts'][] = ':alpha'; + $b['icons'][] = ''; + $b['texts'][] = ':army'; $b['icons'][] = ''; @@ -472,7 +477,7 @@ function smiley_pack_smilies(&$a,&$b) { $b['icons'][] = ''; $b['texts'][] = ':headdesk'; - $b['icons'][] = ''; + $b['icons'][] = ''; #These two are still in core, so oldcore isn't strictly right, but we don't want too many directories diff --git a/startpage.tgz b/startpage.tgz new file mode 100644 index 00000000..67a4ebd0 Binary files /dev/null and b/startpage.tgz differ diff --git a/startpage/startpage.css b/startpage/startpage.css new file mode 100644 index 00000000..e78be7ec --- /dev/null +++ b/startpage/startpage.css @@ -0,0 +1,16 @@ + + + +#startpage-page-label { + float: left; + width: 200px; + margin-bottom: 25px; +} + +#startpage-page { + float: left; +} + +#startpage-desc { + margin-bottom: 10px; +} diff --git a/startpage/startpage.php b/startpage/startpage.php new file mode 100644 index 00000000..85988298 --- /dev/null +++ b/startpage/startpage.php @@ -0,0 +1,94 @@ + + * + */ + + +function startpage_install() { + register_hook('home_init', 'addon/startpage/startpage.php', 'startpage_home_init'); + register_hook('plugin_settings', 'addon/startpage/startpage.php', 'startpage_settings'); + register_hook('plugin_settings_post', 'addon/startpage/startpage.php', 'startpage_settings_post'); +} + + +function startpage_uninstall() { + unregister_hook('home_init', 'addon/startpage/startpage.php', 'startpage_home_init'); + unregister_hook('plugin_settings', 'addon/startpage/startpage.php', 'startpage_settings'); + unregister_hook('plugin_settings_post', 'addon/startpage/startpage.php', 'startpage_settings_post'); +} + + + +function startpage_home_init($a, $b) { + if(! local_user()) + return; + + $page = get_pconfig(local_user(),'startpage','startpage'); + if(strlen($page)) { + $slash = ((strpos($page,'/') === 0) ? true : false); + if(stristr($page,'://')) + goaway($page); + goaway($a->get_baseurl() . (($slash) ? '' : '/') . $page); + } + return; +} + +/** + * + * Callback from the settings post function. + * $post contains the $_POST array. + * We will make sure we've got a valid user account + * and if so set our configuration setting for this person. + * + */ + +function startpage_settings_post($a,$post) { + if(! local_user()) + return; + if($_POST['startpage-submit']) + set_pconfig(local_user(),'startpage','startpage',strip_tags(trim($_POST['startpage']))); +} + + +/** + * + * Called from the Plugin Setting form. + * Add our own settings info to the page. + * + */ + + + +function startpage_settings(&$a,&$s) { + + if(! local_user()) + return; + + /* Add our stylesheet to the page so we can make our settings look nice */ + + $a->page['htmlhead'] .= '' . "\r\n"; + + /* Get the current state of our config variable */ + + $page = get_pconfig(local_user(),'startpage','startpage'); + + + /* Add some HTML to the existing form */ + + $s .= '