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'][] = '' . ':pollito' . ''; + + $b['texts'][] = ':abeja'; + $b['icons'][] = '' . ':abeja' . ''; + + $b['texts'][] = ':mariquita'; + $b['icons'][] = '' . ':mariquita' . ''; + + $b['texts'][] = ':araña'; + $b['icons'][] = '' . ':araña' . ''; + + $b['texts'][] = ':gato'; + $b['icons'][] = '' . ':gato' . ''; + + $b['texts'][] = ':conejito'; + $b['icons'][] = '' . ':conejito' . ''; + + $b['texts'][] = ':vaca'; + $b['icons'][] = '' . ':vaca' . ''; + + $b['texts'][] = ':cangrejo'; + $b['icons'][] = '' . ':cangrejo' . ''; + + $b['texts'][] = ':delfín'; + $b['icons'][] = '' . ':delfín' . ''; + + $b['texts'][] = ':libélula'; + $b['icons'][] = '' . ':libélula' . ''; + + $b['texts'][] = ':rana'; + $b['icons'][] = '' . ':rana' . ''; + + $b['texts'][] = ':hamster'; + $b['icons'][] = '' . ':hamster' . ''; + + $b['texts'][] = ':mono'; + $b['icons'][] = '' . ':mono' . ''; + + $b['texts'][] = ':caballo'; + $b['icons'][] = '' . ':caballo' . ''; + + $b['texts'][] = ':loro'; + $b['icons'][] = '' . ':loro' . ''; + + $b['texts'][] = ':tux'; + $b['icons'][] = '' . ':tux' . ''; + + $b['texts'][] = ':caracol'; + $b['icons'][] = '' . ':caracol' . ''; + + $b['texts'][] = ':oveja'; + $b['icons'][] = '' . ':oveja' . ''; + + $b['texts'][] = ':perro'; + $b['icons'][] = '' . ':perro' . ''; + + $b['texts'][] = ':elefante'; + $b['icons'][] = '' . ':elefante' . ''; + + $b['texts'][] = ':pez'; + $b['icons'][] = '' . ':pez' . ''; + + $b['texts'][] = ':jirafa'; + $b['icons'][] = '' . ':jirafa' . ''; + + $b['texts'][] = ':cerdo'; + $b['icons'][] = '' . ':cerdo' . ''; + + + +#Baby Smileys + + $b['texts'][] = ':bebé'; + $b['icons'][] = '' . ':bebé' . ''; + + $b['texts'][] = ':cuna'; + $b['icons'][] = '' . ':cuna' . ''; + + + $b['texts'][] = ':embarazada'; + $b['icons'][] = '' . ':embarazada' . ''; + + $b['texts'][] = ':cigüeña'; + $b['icons'][] = '' . ':cigüeña' . ''; + + +#Confused Smileys + $b['texts'][] = ':confundido'; + $b['icons'][] = '' . ':confundido' . ''; + + $b['texts'][] = ':encogehombros'; + $b['icons'][] = '' . ':encogehombros' . ''; + + $b['texts'][] = ':estúpido'; + $b['icons'][] = '' . ':estúpido' . ''; + + $b['texts'][] = ':aturdidp'; + $b['icons'][] = '' . ':aturdid' . ''; + + +#Cool Smileys + + $b['texts'][] = ':afro'; + $b['icons'][] = '' . ':afro' . ''; + + $b['texts'][] = ':guay'; + $b['icons'][] = '' . ':guay' . ''; + +#Devil/Angel Smileys + + $b['texts'][] = ':ángel'; + $b['icons'][] = '' . ':ángel' . ''; + + $b['texts'][] = ':querubín'; + $b['icons'][] = '' . ':querubín' . ''; + + $b['texts'][] = ':ángeldemonio'; + $b['icons'][] = '' . ':ángeldemonio' . ''; + + $b['texts'][] = ':gatodemonio'; + $b['icons'][] = '' . ':gatodemonio' . ''; + + $b['texts'][] = ':diabólico'; + $b['icons'][] = '' . ':diabólico' . ''; + + $b['texts'][] = ':adbalancín'; + $b['icons'][] = '' . ':adbalancín' . ''; + + $b['texts'][] = ':vuelvedemonio'; + $b['icons'][] = '' . ':vuelvedemonio' . ''; + + $b['texts'][] = ':santo'; + $b['icons'][] = '' . ':santo' . ''; + + $b['texts'][] = ':tumba'; + $b['icons'][] = '' . ':tumba' . ''; + +#Unpleasent smileys. + + $b['texts'][] = ':retrete'; + $b['icons'][] = '' . ':retrete' . ''; + + $b['texts'][] = ':pedoencama'; + $b['icons'][] = '' . ':pedoencama' . ''; + + $b['texts'][] = ':vómito'; + $b['icons'][] = '' . ':vómito' . ''; + + $b['texts'][] = ':pedosonrojo'; + $b['icons'][] = '' . ':pedosonrojo' . ''; + +#Drinks + + $b['texts'][] = ':té'; + $b['icons'][] = '' . ':té' . ''; + + $b['texts'][] = ':baba'; + $b['icons'][] = '' . ':baba' . ''; + +#Sad smileys + + $b['texts'][] = ':llorar'; + $b['icons'][] = '' . ':llorar' . ''; + + $b['texts'][] = ':prisonero'; + $b['icons'][] = '' . ':prisonero' . ''; + + $b['texts'][] = ':suspiro'; + $b['icons'][] = '' . ':suspiro' . ''; + +#Smoking - only one smiley in here, maybe it needs moving elsewhere? + + $b['texts'][] = ':fumar'; + $b['icons'][] = '' . ':fumar' . ''; + +#Sport smileys + + $b['texts'][] = ':baloncesto'; + $b['icons'][] = '' . ':baloncesto' . ''; + + $b['texts'][] = ':bolos'; + $b['icons'][] = '' . ':bolos' . ''; + + $b['texts'][] = ':enbici'; + $b['icons'][] = '' . ':enbici' . ''; + + $b['texts'][] = ':dardos'; + $b['icons'][] = '' . ':dardos' . ''; + + $b['texts'][] = ':esgrima'; + $b['icons'][] = '' . ':esgrima' . ''; + + $b['texts'][] = ':golf'; + $b['icons'][] = '' . ':golf' . ''; + + $b['texts'][] = ':malabares'; + $b['icons'][] = '' . ':malabares' . ''; + + $b['texts'][] = ':comba'; + $b['icons'][] = '' . ':comba' . ''; + + $b['texts'][] = ':tiroconarco'; + $b['icons'][] = '' . ':tiroconarco' . ''; + + $b['texts'][] = ':fútbol'; + $b['icons'][] = '' . ':fútbol' . ''; + + $b['texts'][] = ':surf'; + $b['icons'][] = '' . ':surf' . ''; + + $b['texts'][] = ':billar'; + $b['icons'][] = '' . ':billar' . ''; + + $b['texts'][] = ':tenis'; + $b['icons'][] = '' . ':tenis' . ''; + + $b['texts'][] = ':acaballo'; + $b['icons'][] = '' . ':acaballo' . ''; + +#Love smileys + + $b['texts'][] = ':tequiero'; + $b['icons'][] = '' . ':tequiero' . ''; + + $b['texts'][] = ':enamorada'; + $b['icons'][] = '' . ':enamorada' . ''; + + $b['texts'][] = ':amor'; + $b['icons'][] = '' . ':amor' . ''; + + $b['texts'][] = ':osoamoroso'; + $b['icons'][] = '' . ':osoamoroso' . ''; + + $b['texts'][] = ':camaamor'; + $b['icons'][] = '' . ':camaamor' . ''; + + $b['texts'][] = ':corazónamor'; + $b['icons'][] = '' . ':corazónamor' . ''; + +#Tired/Sleep smileys + + $b['texts'][] = ':contandoovejas'; + $b['icons'][] = '' . ':contandoovejas' . ''; + + $b['texts'][] = ':hamaca'; + $b['icons'][] = '' . ':hamaca' . ''; + + $b['texts'][] = ':almohada'; + $b['icons'][] = '' . ':almohada' . ''; + + $b['texts'][] = ':bostezo'; + $b['icons'][] = '' . ':bostezo' . ''; + +#Fight/Flame/Violent smileys + + $b['texts'][] = ':pistolas'; + $b['icons'][] = '' . ':pistolas' . ''; + + $b['texts'][] = ':peleamarciano'; + $b['icons'][] = '' . ':peleamarciano' . ''; + + $b['texts'][] = ':alfa'; + $b['icons'][] = '' . ':alfa' . ''; + + $b['texts'][] = ':ejército'; + $b['icons'][] = '' . ':ejército' . ''; + + $b['texts'][] = ':cabezaflecha'; + $b['icons'][] = '' . ':cabezaflecha' . ''; + + $b['texts'][] = ':bfg'; + $b['icons'][] = '' . ':bfg' . ''; + + $b['texts'][] = ':arquero'; + $b['icons'][] = '' . ':arquero' . ''; + + $b['texts'][] = ':motosierra'; + $b['icons'][] = '' . ':motosierra' . ''; + + $b['texts'][] = ':ballesta'; + $b['icons'][] = '' . ':ballesta' . ''; + + $b['texts'][] = ':cruzado'; + $b['icons'][] = '' . ':cruzado' . ''; + + $b['texts'][] = ':muerto'; + $b['icons'][] = '' . ':muerto' . ''; + + $b['texts'][] = ':martillazo'; + $b['icons'][] = '' . ':martillazo' . ''; + + $b['texts'][] = ':pistolalaser'; + $b['icons'][] = '' . ':pistolalaser' . ''; + + $b['texts'][] = ':metralleta'; + $b['icons'][] = '' . ':metralleta' . ''; + + $b['texts'][] = ':marine'; + $b['icons'][] = '' . ':marine' . ''; + + $b['texts'][] = ':sable'; + $b['icons'][] = '' . ':sable' . ''; + + $b['texts'][] = ':tanque'; + $b['icons'][] = '' . ':tanque' . ''; + + $b['texts'][] = ':vikingo'; + $b['icons'][] = '' . ':vikingo' . ''; + + $b['texts'][] = ':bandas'; + $b['icons'][] = '' . ':bandas' . ''; + + $b['texts'][] = ':ácido'; + $b['icons'][] = '' . ':ácido' . ''; + +#Fantasy smileys - monsters and dragons fantasy. The other type of fantasy belongs in adult smileys + + $b['texts'][] = ':alien'; + $b['icons'][] = '' . ':alien' . ''; + + $b['texts'][] = ':bárbaro'; + $b['icons'][] = '' . ':bárbaro' . ''; + + $b['texts'][] = ':dinosaurio'; + $b['icons'][] = '' . ':dinosaurio' . ''; + + $b['texts'][] = ':dragón'; + $b['icons'][] = '' . ':dragón' . ''; + + $b['texts'][] = ':draco'; + $b['icons'][] = '' . ':draco' . ''; + + $b['texts'][] = ':fantasma'; + $b['icons'][] = '' . ':fantasma' . ''; + + $b['texts'][] = ':momia'; + $b['icons'][] = '' . ':momia' . ''; + +#Food smileys + + $b['texts'][] = ':mazana'; + $b['icons'][] = '' . ':mazana' . ''; + + $b['texts'][] = ':brócoli'; + $b['icons'][] = '' . ':brócoli' . ''; + + $b['texts'][] = ':pastel'; + $b['icons'][] = '' . ':pastel' . ''; + + $b['texts'][] = ':zanahoria'; + $b['icons'][] = '' . ':zanahoria' . ''; + + $b['texts'][] = ':palomitas'; + $b['icons'][] = '' . ':palomitas' . ''; + + $b['texts'][] = ':tomate'; + $b['icons'][] = '' . ':tomate' . ''; + + $b['texts'][] = ':plátano'; + $b['icons'][] = '' . ':plátano' . ''; + + $b['texts'][] = ':cocinar'; + $b['icons'][] = '' . ':cocinar' . ''; + + $b['texts'][] = ':huevofrito'; + $b['icons'][] = '' . ':huevofrito' . ''; + +#Happy smileys + + $b['texts'][] = ':cloud9'; + $b['icons'][] = '' . ':cloud9' . ''; + + $b['texts'][] = ':tearsofjoy'; + $b['icons'][] = '' . ':tearsofjoy' . ''; + +#Repsect smileys + + $b['texts'][] = ':reverencia'; + $b['icons'][] = '' . ':reverencia' . ''; + + $b['texts'][] = ':bravo'; + $b['icons'][] = '' . ':bravo' . ''; + + $b['texts'][] = ':vivaelrey'; + $b['icons'][] = '' . ':vivaelrey' . ''; + + $b['texts'][] = ':número1'; + $b['icons'][] = '' . ':número1' . ''; + +#Laugh smileys + + $b['texts'][] = ':jajaja'; + $b['icons'][] = '' . ':jajaja' . ''; + + $b['texts'][] = ':jajatv'; + $b['icons'][] = '' . ':jajatv' . ''; + + $b['texts'][] = ':meparto'; + $b['icons'][] = '' . ':meparto' . ''; + +#Music smileys + + $b['texts'][] = ':dj'; + $b['icons'][] = '' . ':dj' . ''; + + $b['texts'][] = ':batería'; + $b['icons'][] = '' . ':batería' . ''; + + $b['texts'][] = ':elvis'; + $b['icons'][] = '' . ':elivs' . ''; + + $b['texts'][] = ':guitarra'; + $b['icons'][] = '' . ':guitarra' . ''; + + $b['texts'][] = ':trompeta'; + $b['icons'][] = '' . ':trompeta' . ''; + + $b['texts'][] = ':violín'; + $b['icons'][] = '' . ':violín' . ''; + +#Smileys that used to be in core + + $b['texts'][] = ':cabezagolpe'; + $b['icons'][] = '' . ':cabezagolpe' . ''; + + $b['texts'][] = ':barba'; + $b['icons'][] = '' . ':barba' . ''; + + $b['texts'][] = ':barbablanca'; + $b['icons'][] = '' . ':barbablanca' . ''; + + $b['texts'][] = ':saludosurf'; + $b['icons'][] = '' . ':saludosurf' . ''; + + $b['texts'][] = ':\\.../'; + $b['icons'][] = '' . ':\\.../' . ''; + + $b['texts'][] = ':\\ooo/'; + $b['icons'][] = '' . ':\\ooo/' . ''; + + $b['texts'][] = ':cabezamesa'; + $b['icons'][] = '' . ':cabezamesa' . ''; + +#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'][] = '' . ':-d' . ''; + + $b['texts'][] = ':-o'; + $b['icons'][] = '' . ':-o' . ''; + + + + +} 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'][] = '' . ':poussin' . ''; + + $b['texts'][] = ':bourdon'; + $b['icons'][] = '' . ':bourdon' . ''; + + $b['texts'][] = ':coccinelle'; + $b['icons'][] = '' . ':coccinelle' . ''; + + $b['texts'][] = ':araignée'; + $b['icons'][] = '' . ':araignée' . ''; + + $b['texts'][] = ':chat'; + $b['icons'][] = '' . ':chat' . ''; + + $b['texts'][] = ':lapin'; + $b['icons'][] = '' . ':lapin' . ''; + + $b['texts'][] = ':poussin'; + $b['icons'][] = '' . ':poussin' . ''; + + $b['texts'][] = ':vache'; + $b['icons'][] = '' . ':vache' . ''; + + $b['texts'][] = ':crabe'; + $b['icons'][] = '' . ':crabe' . ''; + + $b['texts'][] = ':dauphin'; + $b['icons'][] = '' . ':dauphin' . ''; + + $b['texts'][] = ':libellule'; + $b['icons'][] = '' . ':libellule' . ''; + + $b['texts'][] = ':grenouille'; + $b['icons'][] = '' . ':grenouille' . ''; + + $b['texts'][] = ':hamster'; + $b['icons'][] = '' . ':hamster' . ''; + + $b['texts'][] = ':singe'; + $b['icons'][] = '' . ':singe' . ''; + + $b['texts'][] = ':cheval'; + $b['icons'][] = '' . ':cheval' . ''; + + $b['texts'][] = ':perroquet'; + $b['icons'][] = '' . ':perroquet' . ''; + + $b['texts'][] = ':tux'; + $b['icons'][] = '' . ':tux' . ''; + + $b['texts'][] = ':escargot'; + $b['icons'][] = '' . ':escargot' . ''; + + $b['texts'][] = ':mouton'; + $b['icons'][] = '' . ':mouton' . ''; + + $b['texts'][] = ':chien'; + $b['icons'][] = '' . ':chien' . ''; + + $b['texts'][] = ':éléphant'; + $b['icons'][] = '' . ':éléphant' . ''; + + $b['texts'][] = ':poisson'; + $b['icons'][] = '' . ':poisson' . ''; + + $b['texts'][] = ':girafe'; + $b['icons'][] = '' . ':girafe' . ''; + + $b['texts'][] = ':cochon'; + $b['icons'][] = '' . ':cochon' . ''; + + + +#Baby Smileys + + $b['texts'][] = ':bébé'; + $b['icons'][] = '' . ':bébé' . ''; + + $b['texts'][] = ':litbébé'; + $b['icons'][] = '' . ':litbébé' . ''; + + + $b['texts'][] = ':enceinte'; + $b['icons'][] = '' . ':enceinte' . ''; + + $b['texts'][] = ':cigogne'; + $b['icons'][] = '' . ':cigogne' . ''; + + +#Confused Smileys + $b['texts'][] = ':paumé'; + $b['icons'][] = '' . ':paumé' . ''; + + $b['texts'][] = ':hausseépaules'; + $b['icons'][] = '' . ':hausseépaules' . ''; + + $b['texts'][] = ':stupide'; + $b['icons'][] = '' . ':stupide' . ''; + + $b['texts'][] = ':hébété'; + $b['icons'][] = '' . ':hébété' . ''; + + +#Cool Smileys + + $b['texts'][] = ':afro'; + $b['icons'][] = '' . ':afro' . ''; + + $b['texts'][] = ':cool'; + $b['icons'][] = '' . ':cool' . ''; + +#Devil/Angel Smileys + + $b['texts'][] = ':ange'; + $b['icons'][] = '' . ':ange' . ''; + + $b['texts'][] = ':chérubin'; + $b['icons'][] = '' . ':chérubin' . ''; + + $b['texts'][] = ':démonange'; + $b['icons'][] = '' . ':démonange' . ''; + + $b['texts'][] = ':diablechat'; + $b['icons'][] = '' . ':diablechat' . ''; + + $b['texts'][] = ':démoniaque'; + $b['icons'][] = '' . ':démoniaque' . ''; + + $b['texts'][] = ':bascule'; + $b['icons'][] = '' . ':bascule' . ''; + + $b['texts'][] = ':possédé'; + $b['icons'][] = '' . ':possédé' . ''; + + $b['texts'][] = ':saint'; + $b['icons'][] = '' . ':saint' . ''; + + $b['texts'][] = ':tombe'; + $b['icons'][] = '' . ':tombe' . ''; + +#Unpleasent smileys. + + $b['texts'][] = ':toilettes'; + $b['icons'][] = '' . ':toilettes' . ''; + + $b['texts'][] = ':pèteaulit'; + $b['icons'][] = '' . ':pèteaulit' . ''; + + $b['texts'][] = ':vomit'; + $b['icons'][] = '' . ':vomit' . ''; + + $b['texts'][] = ':pet'; + $b['icons'][] = '' . ':pet' . ''; + +#Drinks + + $b['texts'][] = ':thé'; + $b['icons'][] = '' . ':thé' . ''; + + $b['texts'][] = ':salive'; + $b['icons'][] = '' . ':salive' . ''; + +#Sad smileys + + $b['texts'][] = ':pleure'; + $b['icons'][] = '' . ':pleure' . ''; + + $b['texts'][] = ':prisonnier'; + $b['icons'][] = '' . ':prisonnier' . ''; + + $b['texts'][] = ':soupir'; + $b['icons'][] = '' . ':soupir' . ''; + +#Smoking - only one smiley in here, maybe it needs moving elsewhere? + + $b['texts'][] = ':fume'; + $b['icons'][] = '' . ':fume' . ''; + +#Sport smileys + + $b['texts'][] = ':basket'; + $b['icons'][] = '' . ':basket' . ''; + + $b['texts'][] = ':bowling'; + $b['icons'][] = '' . ':bowling' . ''; + + $b['texts'][] = ':vélo'; + $b['icons'][] = '' . ':vélo' . ''; + + $b['texts'][] = ':fléchettes'; + $b['icons'][] = '' . ':fléchettes' . ''; + + $b['texts'][] = ':escrime'; + $b['icons'][] = '' . ':escrime' . ''; + + $b['texts'][] = ':golf'; + $b['icons'][] = '' . ':golf' . ''; + + $b['texts'][] = ':jonglage'; + $b['icons'][] = '' . ':jonglage' . ''; + + $b['texts'][] = ':sautàlacorde'; + $b['icons'][] = '' . ':sautàlacorde' . ''; + + $b['texts'][] = ':arc'; + $b['icons'][] = '' . ':arc' . ''; + + $b['texts'][] = ':football'; + $b['icons'][] = '' . ':football' . ''; + + $b['texts'][] = ':surf'; + $b['icons'][] = '' . ':surf' . ''; + + $b['texts'][] = ':billard'; + $b['icons'][] = '' . ':billard' . ''; + + $b['texts'][] = ':tennis'; + $b['icons'][] = '' . ':tennis' . ''; + + $b['texts'][] = ':équitation'; + $b['icons'][] = '' . ':équitation' . ''; + +#Love smileys + + $b['texts'][] = ':jetaime'; + $b['icons'][] = '' . ':jetaime' . ''; + + $b['texts'][] = ':amoureux'; + $b['icons'][] = '' . ':amoureux' . ''; + + $b['texts'][] = ':love'; + $b['icons'][] = '' . ':love' . ''; + + $b['texts'][] = ':oursamour'; + $b['icons'][] = '' . ':oursamour' . ''; + + $b['texts'][] = ':amourlit'; + $b['icons'][] = '' . ':amourlit' . ''; + + $b['texts'][] = ':coeur'; + $b['icons'][] = '' . ':coeur' . ''; + +#Tired/Sleep smileys + + $b['texts'][] = ':comptemoutons'; + $b['icons'][] = '' . ':comptemoutons' . ''; + + $b['texts'][] = ':hamac'; + $b['icons'][] = '' . ':hamac' . ''; + + $b['texts'][] = ':oreiller'; + $b['icons'][] = '' . ':oreiller' . ''; + + $b['texts'][] = ':bâille'; + $b['icons'][] = '' . ':bâille' . ''; + +#Fight/Flame/Violent smileys + + $b['texts'][] = ':2pistolets'; + $b['icons'][] = '' . ':2pistolets' . ''; + + $b['texts'][] = ':combatalien'; + $b['icons'][] = '' . ':combatalien' . ''; + + $b['texts'][] = ':alpha'; + $b['icons'][] = '' . ':alpha' . ''; + + $b['texts'][] = ':armée'; + $b['icons'][] = '' . ':armée' . ''; + + $b['texts'][] = ':flèche'; + $b['icons'][] = '' . ':flèche' . ''; + + $b['texts'][] = ':bfg'; + $b['icons'][] = '' . ':bfg' . ''; + + $b['texts'][] = ':archer'; + $b['icons'][] = '' . ':archer' . ''; + + $b['texts'][] = ':tronçonneuse'; + $b['icons'][] = '' . ':tronçonneuse' . ''; + + $b['texts'][] = ':arbalète'; + $b['icons'][] = '' . ':arbalète' . ''; + + $b['texts'][] = ':croisé'; + $b['icons'][] = '' . ':croisé' . ''; + + $b['texts'][] = ':mort'; + $b['icons'][] = '' . ':mort' . ''; + + $b['texts'][] = ':marteau'; + $b['icons'][] = '' . ':marteau' . ''; + + $b['texts'][] = ':pistoletlaser'; + $b['icons'][] = '' . ':pistoletlaser' . ''; + + $b['texts'][] = ':mitrailleuse'; + $b['icons'][] = '' . ':mitrailleuse' . ''; + + $b['texts'][] = ':marine'; + $b['icons'][] = '' . ':marine' . ''; + + $b['texts'][] = ':sabre'; + $b['icons'][] = '' . ':sabre' . ''; + + $b['texts'][] = ':tank'; + $b['icons'][] = '' . ':tank' . ''; + + $b['texts'][] = ':viking'; + $b['icons'][] = '' . ':viking' . ''; + + $b['texts'][] = ':gangs'; + $b['icons'][] = '' . ':gangs' . ''; + + $b['texts'][] = ':acide'; + $b['icons'][] = '' . ':acide' . ''; + +#Fantasy smileys - monsters and dragons fantasy. The other type of fantasy belongs in adult smileys + + $b['texts'][] = ':monstrealien'; + $b['icons'][] = '' . ':monstrealien' . ''; + + $b['texts'][] = ':barbare'; + $b['icons'][] = '' . ':barbare' . ''; + + $b['texts'][] = ':dinosaure'; + $b['icons'][] = '' . ':dinosaure' . ''; + + $b['texts'][] = ':dragon'; + $b['icons'][] = '' . ':dragon' . ''; + + $b['texts'][] = ':petitdragon'; + $b['icons'][] = '' . ':petitdragon' . ''; + + $b['texts'][] = ':fantôme'; + $b['icons'][] = '' . ':fantôme' . ''; + + $b['texts'][] = ':momie'; + $b['icons'][] = '' . ':momie' . ''; + +#Food smileys + + $b['texts'][] = ':pomme'; + $b['icons'][] = '' . ':pomme' . ''; + + $b['texts'][] = ':brocoli'; + $b['icons'][] = '' . ':brocoli' . ''; + + $b['texts'][] = ':gâteau'; + $b['icons'][] = '' . ':gâteau' . ''; + + $b['texts'][] = ':carotte'; + $b['icons'][] = '' . ':carotte' . ''; + + $b['texts'][] = ':popcorn'; + $b['icons'][] = '' . ':popcorn' . ''; + + $b['texts'][] = ':tomate'; + $b['icons'][] = '' . ':tomate' . ''; + + $b['texts'][] = ':banane'; + $b['icons'][] = '' . ':banane' . ''; + + $b['texts'][] = ':cuisine'; + $b['icons'][] = '' . ':cuisine' . ''; + + $b['texts'][] = ':oeufauplat'; + $b['icons'][] = '' . ':oeufauplat' . ''; + +#Happy smileys + + $b['texts'][] = ':nuage'; + $b['icons'][] = '' . ':nuage' . ''; + + $b['texts'][] = ':larmesdejoie'; + $b['icons'][] = '' . ':larmesdejoie' . ''; + +#Repsect smileys + + $b['texts'][] = ':courbette'; + $b['icons'][] = '' . ':courbette' . ''; + + $b['texts'][] = ':bravo'; + $b['icons'][] = '' . ':bravo' . ''; + + $b['texts'][] = ':viveleroi'; + $b['icons'][] = '' . ':viveleroi' . ''; + + $b['texts'][] = ':numéro1'; + $b['icons'][] = '' . ':numéro1' . ''; + +#Laugh smileys + + $b['texts'][] = ':hahaha'; + $b['icons'][] = '' . ':hahaha' . ''; + + $b['texts'][] = ':loltv'; + $b['icons'][] = '' . ':loltv' . ''; + + $b['texts'][] = ':rofl'; + $b['icons'][] = '' . ':rofl' . ''; + +#Music smileys + + $b['texts'][] = ':dj'; + $b['icons'][] = '' . ':dj' . ''; + + $b['texts'][] = ':batterie'; + $b['icons'][] = '' . ':batterie' . ''; + + $b['texts'][] = ':elvis'; + $b['icons'][] = '' . ':elivs' . ''; + + $b['texts'][] = ':guitare'; + $b['icons'][] = '' . ':guitare' . ''; + + $b['texts'][] = ':trompette'; + $b['icons'][] = '' . ':trompette' . ''; + + $b['texts'][] = ':violon'; + $b['icons'][] = '' . ':violon' . ''; + +#Smileys that used to be in core + + $b['texts'][] = ':cognetête'; + $b['icons'][] = '' . ':cognetête' . ''; + + $b['texts'][] = ':barbu'; + $b['icons'][] = '' . ':barbu' . ''; + + $b['texts'][] = ':barbeblanche'; + $b['icons'][] = '' . ':barbeblanche' . ''; + + $b['texts'][] = ':shaka'; + $b['icons'][] = '' . ':shaka' . ''; + + $b['texts'][] = ':\\.../'; + $b['icons'][] = '' . ':\\.../' . ''; + + $b['texts'][] = ':\\ooo/'; + $b['icons'][] = '' . ':\\ooo/' . ''; + + $b['texts'][] = ':tête'; + $b['icons'][] = '' . ':tête' . ''; + +#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'][] = '' . ':-d' . ''; + + $b['texts'][] = ':-o'; + $b['icons'][] = '' . ':-o' . ''; + +} 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'][] = '' . ':bunny' . ''; - $b['texts'][] = ':chick'; - $b['icons'][] = '' . ':chick' . ''; - $b['texts'][] = ':cow'; $b['icons'][] = '' . ':cow' . ''; @@ -204,6 +203,9 @@ function smiley_pack_smilies(&$a,&$b) { $b['texts'][] = ':prisoner'; $b['icons'][] = '' . ':prisoner' . ''; + $b['texts'][] = ':sigh'; + $b['icons'][] = '' . ':sigh' . ''; + #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'][] = '' . ':alienfight' . ''; + $b['texts'][] = ':alpha'; + $b['icons'][] = '' . ':alpha' . ''; + $b['texts'][] = ':army'; $b['icons'][] = '' . ':army' . ''; @@ -472,7 +477,7 @@ function smiley_pack_smilies(&$a,&$b) { $b['icons'][] = '' . ':\\ooo/' . ''; $b['texts'][] = ':headdesk'; - $b['icons'][] = '' . ':headdesk' . ''; + $b['icons'][] = '' . ':headdesk' . ''; #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 .= '
'; + $s .= '

' . t('Startpage Settings') . '

'; + $s .= '
'; + $s .= ''; + $s .= ''; + $s .= '
'; + $s .= '
' . t('Examples: "network" or "notifications/system"') . '
'; + + /* provide a submit button */ + + $s .= '
'; + +} diff --git a/testdrive.tgz b/testdrive.tgz old mode 100644 new mode 100755 index 7d314ea2..dac0ff78 Binary files a/testdrive.tgz and b/testdrive.tgz differ diff --git a/testdrive/testdrive.php b/testdrive/testdrive.php index b7c021a1..968aa834 100644 --- a/testdrive/testdrive.php +++ b/testdrive/testdrive.php @@ -14,6 +14,9 @@ function testdrive_install() { register_hook('register_account', 'addon/testdrive/testdrive.php', 'testdrive_register_account'); register_hook('cron', 'addon/testdrive/testdrive.php', 'testdrive_cron'); + register_hook('enotify','addon/testdrive/testdrive.php', 'testdrive_enotify'); + register_hook('globaldir_update','addon/testdrive/testdrive.php', 'testdrive_globaldir_update'); + } @@ -21,9 +24,15 @@ function testdrive_uninstall() { unregister_hook('register_account', 'addon/testdrive/testdrive.php', 'testdrive_register_account'); unregister_hook('cron', 'addon/testdrive/testdrive.php', 'testdrive_cron'); + unregister_hook('enotify','addon/testdrive/testdrive.php', 'testdrive_enotify'); + unregister_hook('globaldir_update','addon/testdrive/testdrive.php', 'testdrive_globaldir_update'); } +function testdrive_globaldir_update($a,&$b) { + $b['url'] = ''; +} + function testdrive_register_account($a,$b) { $uid = $b;