From d54042dd3898c5f4f0bc67df576484c6d25c86b2 Mon Sep 17 00:00:00 2001 From: friendica Date: Sat, 28 Jan 2012 12:09:17 -0800 Subject: [PATCH 001/119] mime_content_type requires access to the file, not just the name --- boot.php | 2 +- include/attach.php | 14 ++++++++------ mod/wall_attach.php | 2 -- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/boot.php b/boot.php index c2c99a55ec..74e46599ff 100755 --- a/boot.php +++ b/boot.php @@ -9,7 +9,7 @@ require_once('include/nav.php'); require_once('include/cache.php'); define ( 'FRIENDICA_PLATFORM', 'Friendica'); -define ( 'FRIENDICA_VERSION', '2.3.1237' ); +define ( 'FRIENDICA_VERSION', '2.3.1238' ); define ( 'DFRN_PROTOCOL_VERSION', '2.22' ); define ( 'DB_UPDATE_VERSION', 1118 ); diff --git a/include/attach.php b/include/attach.php index 4001d2af13..6d611cec04 100755 --- a/include/attach.php +++ b/include/attach.php @@ -38,6 +38,7 @@ function z_mime_content_type($filename) { // audio/video 'mp3' => 'audio/mpeg', + 'wav' => 'audio/wav', 'qt' => 'video/quicktime', 'mov' => 'video/quicktime', 'ogg' => 'application/ogg', @@ -68,12 +69,13 @@ function z_mime_content_type($filename) { return $mime_types[$ext]; } } - elseif (function_exists('finfo_open')) { - $finfo = finfo_open(FILEINFO_MIME); - $mimetype = finfo_file($finfo, $filename); - finfo_close($finfo); - return $mimetype; - } +// can't use this because we're just passing a name, e.g. not a file that can be opened +// elseif (function_exists('finfo_open')) { +// $finfo = @finfo_open(FILEINFO_MIME); +// $mimetype = @finfo_file($finfo, $filename); +// @finfo_close($finfo); +// return $mimetype; +// } else { return 'application/octet-stream'; } diff --git a/mod/wall_attach.php b/mod/wall_attach.php index a66ed0d059..ecf4752915 100755 --- a/mod/wall_attach.php +++ b/mod/wall_attach.php @@ -61,8 +61,6 @@ function wall_attach_post(&$a) { $filedata = @file_get_contents($src); $mimetype = z_mime_content_type($filename); - if(((! strlen($mimetype)) || ($mimetype === 'application/octet-stream')) && function_exists('mime_content_type')) - $mimetype = mime_content_type($filename); $hash = random_string(); $created = datetime_convert(); $r = q("INSERT INTO `attach` ( `uid`, `hash`, `filename`, `filetype`, `filesize`, `data`, `created`, `edited`, `allow_cid`, `allow_gid`,`deny_cid`, `deny_gid` ) From e43a3a412c39ae9b98cc534d7f6e579e87601688 Mon Sep 17 00:00:00 2001 From: friendica Date: Sun, 29 Jan 2012 02:09:39 -0800 Subject: [PATCH 002/119] store moderated flag if set --- mod/item.php | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/mod/item.php b/mod/item.php index ed3d7749c6..99c01c54fd 100755 --- a/mod/item.php +++ b/mod/item.php @@ -4,7 +4,7 @@ * * This is the POST destination for most all locally posted * text stuff. This function handles status, wall-to-wall status, - * local comments, and remote coments - that are posted on this site + * local comments, and remote coments that are posted on this site * (as opposed to being delivered in a feed). * Also processed here are posts and comments coming through the * statusnet/twitter API. @@ -42,6 +42,7 @@ function item_post(&$a) { $api_source = ((x($_REQUEST,'api_source') && $_REQUEST['api_source']) ? true : false); $return_path = ((x($_REQUEST,'return')) ? $_REQUEST['return'] : ''); + $preview = ((x($_REQUEST,'preview')) ? intval($_REQUEST['preview']) : 0); /** * Is this a reply to something? @@ -56,8 +57,6 @@ function item_post(&$a) { $parid = 0; $r = false; - $preview = ((x($_REQUEST,'preview')) ? intval($_REQUEST['preview']) : 0); - if($parent || $parent_uri) { if(! x($_REQUEST,'type')) @@ -110,8 +109,6 @@ function item_post(&$a) { if($parent) logger('mod_post: parent=' . $parent); - - $profile_uid = ((x($_REQUEST,'profile_uid')) ? intval($_REQUEST['profile_uid']) : 0); $post_id = ((x($_REQUEST,'post_id')) ? intval($_REQUEST['post_id']) : 0); $app = ((x($_REQUEST,'source')) ? strip_tags($_REQUEST['source']) : ''); @@ -606,6 +603,7 @@ function item_post(&$a) { $datarray['thr-parent'] = $thr_parent; $datarray['postopts'] = ''; $datarray['origin'] = $origin; + $datarray['moderated'] = $allow_moderated; /** * These fields are for the convenience of plugins... @@ -657,8 +655,8 @@ function item_post(&$a) { $r = q("INSERT INTO `item` (`guid`, `uid`,`type`,`wall`,`gravity`,`contact-id`,`owner-name`,`owner-link`,`owner-avatar`, `author-name`, `author-link`, `author-avatar`, `created`, `edited`, `commented`, `received`, `changed`, `uri`, `thr-parent`, `title`, `body`, `app`, `location`, `coord`, - `tag`, `inform`, `verb`, `postopts`, `allow_cid`, `allow_gid`, `deny_cid`, `deny_gid`, `private`, `pubmail`, `attach`, `bookmark`,`origin` ) - VALUES( '%s', %d, '%s', %d, %d, %d, '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', %d, %d, '%s', %d, %d )", + `tag`, `inform`, `verb`, `postopts`, `allow_cid`, `allow_gid`, `deny_cid`, `deny_gid`, `private`, `pubmail`, `attach`, `bookmark`,`origin`, `moderated` ) + VALUES( '%s', %d, '%s', %d, %d, %d, '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', %d, %d, '%s', %d, %d, %d )", dbesc($datarray['guid']), intval($datarray['uid']), dbesc($datarray['type']), @@ -695,7 +693,8 @@ function item_post(&$a) { intval($datarray['pubmail']), dbesc($datarray['attach']), intval($datarray['bookmark']), - intval($datarray['origin']) + intval($datarray['origin']), + intval($datarry['moderated']) ); $r = q("SELECT `id` FROM `item` WHERE `uri` = '%s' LIMIT 1", From 61246cbd1c5abe15bf3a0c4f52d3063966293ec2 Mon Sep 17 00:00:00 2001 From: friendica Date: Sun, 29 Jan 2012 15:47:25 -0800 Subject: [PATCH 003/119] some zot-id infrastructure --- boot.php | 2 +- mod/dfrn_poll.php | 1 + mod/redir.php | 77 ++++++++++++++++++++++++++++------------------- 3 files changed, 48 insertions(+), 32 deletions(-) diff --git a/boot.php b/boot.php index 74e46599ff..9b4d14645b 100755 --- a/boot.php +++ b/boot.php @@ -9,7 +9,7 @@ require_once('include/nav.php'); require_once('include/cache.php'); define ( 'FRIENDICA_PLATFORM', 'Friendica'); -define ( 'FRIENDICA_VERSION', '2.3.1238' ); +define ( 'FRIENDICA_VERSION', '2.3.1239' ); define ( 'DFRN_PROTOCOL_VERSION', '2.22' ); define ( 'DB_UPDATE_VERSION', 1118 ); diff --git a/mod/dfrn_poll.php b/mod/dfrn_poll.php index 09f198b814..b12e071328 100755 --- a/mod/dfrn_poll.php +++ b/mod/dfrn_poll.php @@ -86,6 +86,7 @@ function dfrn_poll_init(&$a) { $_SESSION['authenticated'] = 1; $_SESSION['visitor_id'] = $r[0]['id']; $_SESSION['visitor_home'] = $r[0]['url']; + $_SESSION['visitor_handle'] = $r[0]['addr']; $_SESSION['visitor_visiting'] = $r[0]['uid']; info( sprintf(t('%s welcomes %s'), $r[0]['username'] , $r[0]['name']) . EOL); // Visitors get 1 day session. diff --git a/mod/redir.php b/mod/redir.php index eb9702b041..9223e5483c 100755 --- a/mod/redir.php +++ b/mod/redir.php @@ -2,44 +2,59 @@ function redir_init(&$a) { - if((! local_user()) || (! ($a->argc == 2)) || (! intval($a->argv[1]))) - goaway(z_root()); - $cid = $a->argv[1]; $url = ((x($_GET,'url')) ? $_GET['url'] : ''); - $r = q("SELECT * FROM `contact` WHERE `id` = %d AND `uid` = %d LIMIT 1", - intval($cid), - intval(local_user()) - ); + // traditional DFRN - if((! count($r)) || ($r[0]['network'] !== 'dfrn')) - goaway(z_root()); + if(local_user() && $a->argc == 2 && intval($a->argv[1])) { - $dfrn_id = $orig_id = (($r[0]['issued-id']) ? $r[0]['issued-id'] : $r[0]['dfrn-id']); + $cid = $a->argv[1]; - if($r[0]['duplex'] && $r[0]['issued-id']) { - $orig_id = $r[0]['issued-id']; - $dfrn_id = '1:' . $orig_id; - } - if($r[0]['duplex'] && $r[0]['dfrn-id']) { - $orig_id = $r[0]['dfrn-id']; - $dfrn_id = '0:' . $orig_id; + $r = q("SELECT * FROM `contact` WHERE `id` = %d AND `uid` = %d LIMIT 1", + intval($cid), + intval(local_user()) + ); + + if((! count($r)) || ($r[0]['network'] !== NETWORK_DFRN)) + goaway(z_root()); + + $dfrn_id = $orig_id = (($r[0]['issued-id']) ? $r[0]['issued-id'] : $r[0]['dfrn-id']); + + if($r[0]['duplex'] && $r[0]['issued-id']) { + $orig_id = $r[0]['issued-id']; + $dfrn_id = '1:' . $orig_id; + } + if($r[0]['duplex'] && $r[0]['dfrn-id']) { + $orig_id = $r[0]['dfrn-id']; + $dfrn_id = '0:' . $orig_id; + } + + $sec = random_string(); + + q("INSERT INTO `profile_check` ( `uid`, `cid`, `dfrn_id`, `sec`, `expire`) + VALUES( %d, %s, '%s', '%s', %d )", + intval(local_user()), + intval($cid), + dbesc($dfrn_id), + dbesc($sec), + intval(time() + 45) + ); + + logger('mod_redir: ' . $r[0]['name'] . ' ' . $sec, LOGGER_DEBUG); + $dest = (($url) ? '&destination_url=' . $url : ''); + goaway ($r[0]['poll'] . '?dfrn_id=' . $dfrn_id + . '&dfrn_version=' . DFRN_PROTOCOL_VERSION . '&type=profile&sec=' . $sec . $dest ); } - $sec = random_string(); + if(local_user()) + $handle = $a->user['nickname'] . '@' . substr($a->get_baseurl(),strpos($a->get_baseurl(),'://')+3); + if(remote_user()) + $handle = $_SESSION['handle']; - q("INSERT INTO `profile_check` ( `uid`, `cid`, `dfrn_id`, `sec`, `expire`) - VALUES( %d, %s, '%s', '%s', %d )", - intval(local_user()), - intval($cid), - dbesc($dfrn_id), - dbesc($sec), - intval(time() + 45) - ); + if($url) { + $url = str_replace('{zid}','&zid=' . $handle,$url); + goaway($url); + } - logger('mod_redir: ' . $r[0]['name'] . ' ' . $sec, LOGGER_DEBUG); - $dest = (($url) ? '&destination_url=' . $url : ''); - goaway ($r[0]['poll'] . '?dfrn_id=' . $dfrn_id - . '&dfrn_version=' . DFRN_PROTOCOL_VERSION . '&type=profile&sec=' . $sec . $dest ); - + goaway(z_root()); } From 43df068d2e005d8f19ba202160f507eba4adaa04 Mon Sep 17 00:00:00 2001 From: Tobias Diekershoff Date: Mon, 30 Jan 2012 13:22:16 +0100 Subject: [PATCH 004/119] quattro: styling of the edit profile page --- view/theme/quattro/quattro.less | 49 +++++++++++++++++++++++++++++++++ view/theme/quattro/style.css | 48 ++++++++++++++++++++++++++++++++ 2 files changed, 97 insertions(+) diff --git a/view/theme/quattro/quattro.less b/view/theme/quattro/quattro.less index 8fcf7f8171..8b63686fd6 100755 --- a/view/theme/quattro/quattro.less +++ b/view/theme/quattro/quattro.less @@ -852,6 +852,55 @@ ul.tabs { #profile-edit-links li { list-style: none; + margin-top: 10px; +} + +#profile-edit-default-desc { + color: #FF0000; + border: 1px solid #FF8888; + background-color: #FFEEEE; + padding: 7px; +} +#profile-edit-profile-name-label, +#profile-edit-name-label, +#profile-edit-pdesc-label, +#profile-edit-gender-label, +#profile-edit-dob-label, +#profile-edit-address-label, +#profile-edit-locality-label, +#profile-edit-region-label, +#profile-edit-postal-code-label, +#profile-edit-country-name-label, +#profile-edit-marital-label, +#profile-edit-with-label, +#profile-edit-sexual-label, +#profile-edit-politic-label, +#profile-edit-religion-label, +#profile-edit-pubkeywords-label, +#profile-edit-prvkeywords-label, +#profile-edit-homepage-label { + float: left; + width: 175px; +} +#profile-edit-profile-name, +#profile-edit-name, +#profile-edit-pdesc, +#profile-edit-gender, +#profile-edit-dob, +#profile-edit-address, +#profile-edit-locality, +#profile-edit-region, +#profile-edit-postal-code, +#profile-edit-country-name, +#profile-edit-marital, +#profile-edit-with, +#profile-edit-sexual, +#profile-edit-politic, +#profile-edit-religion, +#profile-edit-pubkeywords, +#profile-edit-prvkeywords, +#profile-edit-homepage { + margin-top: 5px; } /* oauth */ diff --git a/view/theme/quattro/style.css b/view/theme/quattro/style.css index 3f90f89157..7a524fcb7a 100755 --- a/view/theme/quattro/style.css +++ b/view/theme/quattro/style.css @@ -1208,6 +1208,54 @@ ul.tabs li .active { } #profile-edit-links li { list-style: none; + margin-top: 10px; +} +#profile-edit-default-desc { + color: #FF0000; + border: 1px solid #FF8888; + background-color: #FFEEEE; + padding: 7px; +} +#profile-edit-profile-name-label, +#profile-edit-name-label, +#profile-edit-pdesc-label, +#profile-edit-gender-label, +#profile-edit-dob-label, +#profile-edit-address-label, +#profile-edit-locality-label, +#profile-edit-region-label, +#profile-edit-postal-code-label, +#profile-edit-country-name-label, +#profile-edit-marital-label, +#profile-edit-with-label, +#profile-edit-sexual-label, +#profile-edit-politic-label, +#profile-edit-religion-label, +#profile-edit-pubkeywords-label, +#profile-edit-prvkeywords-label, +#profile-edit-homepage-label { + float: left; + width: 175px; +} +#profile-edit-profile-name, +#profile-edit-name, +#profile-edit-pdesc, +#profile-edit-gender, +#profile-edit-dob, +#profile-edit-address, +#profile-edit-locality, +#profile-edit-region, +#profile-edit-postal-code, +#profile-edit-country-name, +#profile-edit-marital, +#profile-edit-with, +#profile-edit-sexual, +#profile-edit-politic, +#profile-edit-religion, +#profile-edit-pubkeywords, +#profile-edit-prvkeywords, +#profile-edit-homepage { + margin-top: 5px; } /* oauth */ .oauthapp { From d658cdaa84cb4e0c5c8bf7b9fb902da9efe3c919 Mon Sep 17 00:00:00 2001 From: Tobias Diekershoff Date: Mon, 30 Jan 2012 14:25:24 +0100 Subject: [PATCH 005/119] quattro: small adjustments to the profile edit style --- view/theme/quattro/quattro.less | 3 +++ view/theme/quattro/style.css | 3 +++ 2 files changed, 6 insertions(+) diff --git a/view/theme/quattro/quattro.less b/view/theme/quattro/quattro.less index 8b63686fd6..c9fda0e1d7 100755 --- a/view/theme/quattro/quattro.less +++ b/view/theme/quattro/quattro.less @@ -878,12 +878,15 @@ ul.tabs { #profile-edit-religion-label, #profile-edit-pubkeywords-label, #profile-edit-prvkeywords-label, +#profile-edit-gender-select, #profile-edit-homepage-label { float: left; width: 175px; + padding-top: 7px; } #profile-edit-profile-name, #profile-edit-name, +#gender-select, #profile-edit-pdesc, #profile-edit-gender, #profile-edit-dob, diff --git a/view/theme/quattro/style.css b/view/theme/quattro/style.css index 7a524fcb7a..41adcd8d2c 100755 --- a/view/theme/quattro/style.css +++ b/view/theme/quattro/style.css @@ -1233,12 +1233,15 @@ ul.tabs li .active { #profile-edit-religion-label, #profile-edit-pubkeywords-label, #profile-edit-prvkeywords-label, +#profile-edit-gender-select, #profile-edit-homepage-label { float: left; width: 175px; + padding-top: 7px; } #profile-edit-profile-name, #profile-edit-name, +#gender-select, #profile-edit-pdesc, #profile-edit-gender, #profile-edit-dob, From 3149e3cd3efc62bda255a49324c9292b7a4dd993 Mon Sep 17 00:00:00 2001 From: zottel Date: Mon, 30 Jan 2012 13:33:25 -0800 Subject: [PATCH 006/119] testbubble fix: tools for wall-to-wall items now appear at the bottom where they should be --- view/theme/testbubble/wallwall_item.tpl | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/view/theme/testbubble/wallwall_item.tpl b/view/theme/testbubble/wallwall_item.tpl index 015e62f3e8..e29b66c578 100755 --- a/view/theme/testbubble/wallwall_item.tpl +++ b/view/theme/testbubble/wallwall_item.tpl @@ -26,6 +26,17 @@ {{ if $lock }}
$lock
{{ else }}
{{ endif }} +
+
$title
+
+
$body +
+ {{ for $tags as $tag }} + $tag + {{ endfor }} +
+
+
{{ if $vote }} -
-
$title
-
-
$body -
- {{ for $tags as $tag }} - $tag - {{ endfor }} -
-
-
$name
$ago
From c76b224d8ac79d10ee68134d5585e0832e49a3c8 Mon Sep 17 00:00:00 2001 From: friendica Date: Mon, 30 Jan 2012 15:13:24 -0800 Subject: [PATCH 007/119] prune old expired and deleted items --- boot.php | 2 +- include/expire.php | 5 +++++ mod/settings.php | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/boot.php b/boot.php index 9b4d14645b..4fb433fea2 100755 --- a/boot.php +++ b/boot.php @@ -9,7 +9,7 @@ require_once('include/nav.php'); require_once('include/cache.php'); define ( 'FRIENDICA_PLATFORM', 'Friendica'); -define ( 'FRIENDICA_VERSION', '2.3.1239' ); +define ( 'FRIENDICA_VERSION', '2.3.1240' ); define ( 'DFRN_PROTOCOL_VERSION', '2.22' ); define ( 'DB_UPDATE_VERSION', 1118 ); diff --git a/include/expire.php b/include/expire.php index 64dbe2536d..7608b90546 100755 --- a/include/expire.php +++ b/include/expire.php @@ -29,6 +29,11 @@ function expire_run($argv, $argc){ $a->set_baseurl(get_config('system','url')); + // physically remove anything that has been deleted from more than two months + + $r = q("delete from item where deleted = 1 and changed < UTC_TIMESTAMP() - INTERVAL 60 DAY"); + + logger('expire: start'); $r = q("SELECT `uid`,`username`,`expire` FROM `user` WHERE `expire` != 0"); diff --git a/mod/settings.php b/mod/settings.php index c61d5c227a..e75272539d 100755 --- a/mod/settings.php +++ b/mod/settings.php @@ -757,7 +757,7 @@ function settings_content(&$a) { $celeb = ((($a->user['page-flags'] == PAGE_SOAPBOX) || ($a->user['page-flags'] == PAGE_COMMUNITY)) ? true : false); $expire_arr = array( - 'days' => array('expire', t("Automatically expire posts after days:"), $expire, t('If empty, posts will not expire. Expired posts will be deleted')), + 'days' => array('expire', t("Automatically expire posts after this many days:"), $expire, t('If empty, posts will not expire. Expired posts will be deleted')), 'advanced' => t('Advanced expiration settings'), 'label' => t('Advanced Expiration'), 'items' => array('expire_items', t("Expire posts:"), $expire_items, '', array(t('No'),t('Yes'))), From 4993f4f1d63bd82a6964d6a55bb364d2c7514df4 Mon Sep 17 00:00:00 2001 From: friendica Date: Mon, 30 Jan 2012 20:49:54 -0800 Subject: [PATCH 008/119] allow plugin to abort message posting, fix half-duplex D* relationship --- include/items.php | 5 +++++ mod/dfrn_confirm.php | 3 +++ mod/item.php | 14 ++++++++++++++ 3 files changed, 22 insertions(+) diff --git a/include/items.php b/include/items.php index 62f1f2ce5b..ba95919a6b 100755 --- a/include/items.php +++ b/include/items.php @@ -814,6 +814,11 @@ function item_store($arr,$force_parent = false) { call_hooks('post_remote',$arr); + if(x($arr,'cancel')) { + logger('item_store: post cancelled by plugin.'); + return 0; + } + dbesc_array($arr); logger('item_store: ' . print_r($arr,true), LOGGER_DATA); diff --git a/mod/dfrn_confirm.php b/mod/dfrn_confirm.php index 89b09ef77e..26314f39be 100755 --- a/mod/dfrn_confirm.php +++ b/mod/dfrn_confirm.php @@ -370,6 +370,9 @@ function dfrn_confirm_post(&$a,$handsfree = null) { if($network === NETWORK_DIASPORA) { if($duplex) $new_relation = CONTACT_IS_FRIEND; + else + $new_relation = CONTACT_IS_SHARING; + if($new_relation != CONTACT_IS_FOLLOWER) $writable = 1; } diff --git a/mod/item.php b/mod/item.php index 99c01c54fd..217f13c498 100755 --- a/mod/item.php +++ b/mod/item.php @@ -633,6 +633,20 @@ function item_post(&$a) { call_hooks('post_local',$datarray); + if(x($datarray,'cancel')) { + logger('mod_item: post cancelled by plugin.'); + if($return_path) { + goaway($a->get_baseurl() . "/" . $return_path); + } + + $json = array('cancel' => 1); + if(x($_REQUEST,'jsreload') && strlen($_REQUEST['jsreload'])) + $json['reload'] = $a->get_baseurl() . '/' . $_REQUEST['jsreload']; + + echo json_encode($json); + killme(); + } + if($orig_post) { $r = q("UPDATE `item` SET `body` = '%s', `edited` = '%s' WHERE `id` = %d AND `uid` = %d LIMIT 1", From 4fc455d195fef9f1bfbc9f125788650fb3153237 Mon Sep 17 00:00:00 2001 From: friendica Date: Tue, 31 Jan 2012 15:50:49 -0800 Subject: [PATCH 009/119] revup --- boot.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/boot.php b/boot.php index 4fb433fea2..0a21e78f86 100755 --- a/boot.php +++ b/boot.php @@ -9,7 +9,7 @@ require_once('include/nav.php'); require_once('include/cache.php'); define ( 'FRIENDICA_PLATFORM', 'Friendica'); -define ( 'FRIENDICA_VERSION', '2.3.1240' ); +define ( 'FRIENDICA_VERSION', '2.3.1241' ); define ( 'DFRN_PROTOCOL_VERSION', '2.22' ); define ( 'DB_UPDATE_VERSION', 1118 ); From c8c062d96024a23e67e73f1ebffcf7009b18eed1 Mon Sep 17 00:00:00 2001 From: friendica Date: Tue, 31 Jan 2012 15:54:41 -0800 Subject: [PATCH 010/119] add spam engine --- library/spam/b8/b8.php | 503 +++++++++++++ .../b8/degenerator/degenerator_default.php | 127 ++++ library/spam/b8/lexer/lexer_default.php | 205 +++++ library/spam/b8/storage/storage_base.php | 395 ++++++++++ library/spam/b8/storage/storage_dba.php | 198 +++++ library/spam/b8/storage/storage_mysql.php | 351 +++++++++ library/spam/doc/COPYING | 504 +++++++++++++ library/spam/doc/ChangeLog | 179 +++++ library/spam/doc/readme.htm | 707 ++++++++++++++++++ library/spam/doc/readme.rst | 371 +++++++++ library/spam/example/index.php | 241 ++++++ library/spam/install/setup_berkeleydb.php | 240 ++++++ library/spam/install/setup_mysql.sql | 27 + 13 files changed, 4048 insertions(+) create mode 100644 library/spam/b8/b8.php create mode 100644 library/spam/b8/degenerator/degenerator_default.php create mode 100644 library/spam/b8/lexer/lexer_default.php create mode 100644 library/spam/b8/storage/storage_base.php create mode 100644 library/spam/b8/storage/storage_dba.php create mode 100644 library/spam/b8/storage/storage_mysql.php create mode 100644 library/spam/doc/COPYING create mode 100644 library/spam/doc/ChangeLog create mode 100644 library/spam/doc/readme.htm create mode 100644 library/spam/doc/readme.rst create mode 100644 library/spam/example/index.php create mode 100644 library/spam/install/setup_berkeleydb.php create mode 100644 library/spam/install/setup_mysql.sql diff --git a/library/spam/b8/b8.php b/library/spam/b8/b8.php new file mode 100644 index 0000000000..ea1e15ffad --- /dev/null +++ b/library/spam/b8/b8.php @@ -0,0 +1,503 @@ + +# +# b8 - A Bayesian spam filter written in PHP 5 +# +# This program is free software; you can redistribute it and/or modify it +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation in version 2.1 of the License. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY +# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public +# License for more details. +# +# You should have received a copy of the GNU Lesser General Public License +# along with this program; if not, write to the Free Software Foundation, +# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + +/** + * Copyright (C) 2006-2010 Tobias Leupold + * + * @license LGPL + * @access public + * @package b8 + * @author Tobias Leupold + * @author Oliver Lillie (aka buggedcom) (original PHP 5 port) + */ + +class b8 +{ + + public $config = array( + 'min_size' => 3, + 'max_size' => 30, + 'allow_numbers' => FALSE, + 'lexer' => 'default', + 'degenerator' => 'default', + 'storage' => 'dba', + 'use_relevant' => 15, + 'min_dev' => 0.2, + 'rob_s' => 0.3, + 'rob_x' => 0.5 + ); + + private $_lexer = NULL; + private $_database = NULL; + private $_token_data = NULL; + + const SPAM = 'spam'; + const HAM = 'ham'; + const LEARN = 'learn'; + const UNLEARN = 'unlearn'; + + const STARTUP_FAIL_DATABASE = 'STARTUP_FAIL_DATABASE'; + const STARTUP_FAIL_LEXER = 'STARTUP_FAIL_LEXER'; + const TRAINER_CATEGORY_FAIL = 'TRAINER_CATEGORY_FAIL'; + + /** + * Constructs b8 + * + * @access public + * @return void + */ + + function __construct($config = array(), $database_config) + { + + # Validate config data + + if(count($config) > 0) { + + foreach ($config as $name=>$value) { + + switch($name) { + + case 'min_dev': + case 'rob_s': + case 'rob_x': + $this->config[$name] = (float) $value; + break; + + case 'min_size': + case 'max_size': + case 'use_relevant': + $this->config[$name] = (int) $value; + break; + + case 'allow_numbers': + $this->config[$name] = (bool) $value; + break; + + case 'lexer': + $value = (string) strtolower($value); + $this->config[$name] = is_file(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'lexer' . DIRECTORY_SEPARATOR . "lexer_" . $value . '.php') === TRUE ? $value : 'default'; + break; + + case 'storage': + $this->config[$name] = (string) $value; + break; + + } + + } + + } + + # Setup the database backend + + # Get the basic storage class used by all backends + if($this->load_class('b8_storage_base', dirname(__FILE__) . DIRECTORY_SEPARATOR . 'storage' . DIRECTORY_SEPARATOR . 'storage_base.php') === FALSE) + return; + + # Get the degenerator we need + if($this->load_class('b8_degenerator_' . $this->config['degenerator'], dirname(__FILE__) . DIRECTORY_SEPARATOR . 'degenerator' . DIRECTORY_SEPARATOR . 'degenerator_' . $this->config['degenerator'] . '.php') === FALSE) + return; + + # Get the actual storage backend we need + if($this->load_class('b8_storage_' . $this->config['storage'], dirname(__FILE__) . DIRECTORY_SEPARATOR . 'storage' . DIRECTORY_SEPARATOR . 'storage_' . $this->config['storage'] . '.php') === FALSE) + return; + + # Setup the backend + $class = 'b8_storage_' . $this->config['storage']; + $this->_database = new $class( + $database_config, + $this->config['degenerator'], date('ymd') + ); + + # Setup the lexer class + + if($this->load_class('b8_lexer_' . $this->config['lexer'], dirname(__FILE__) . DIRECTORY_SEPARATOR . 'lexer' . DIRECTORY_SEPARATOR . 'lexer_' . $this->config['lexer'] . '.php') === FALSE) + return; + + $class = 'b8_lexer_' . $this->config['lexer']; + $this->_lexer = new $class( + array( + 'min_size' => $this->config['min_size'], + 'max_size' => $this->config['max_size'], + 'allow_numbers' => $this->config['allow_numbers'] + ) + ); + + } + + /** + * Load a class file if a class has not been defined yet. + * + * @access public + * @return boolean Returns TRUE if everything is okay, otherwise FALSE. + */ + + public function load_class($class_name, $class_file) + { + + if(class_exists($class_name, FALSE) === FALSE) { + + $included = require_once $class_file; + + if($included === FALSE or class_exists($class_name, FALSE) === FALSE) + return FALSE; + + } + + return TRUE; + + } + + /** + * Validates the class has all it needs to work. + * + * @access public + * @return mixed Returns TRUE if everything is okay, otherwise an error code. + */ + + public function validate() + { + + if($this->_database === NULL) + return self::STARTUP_FAIL_DATABASE; + + # Connect the database backend if we aren't connected yet + + elseif($this->_database->connected === FALSE) { + + $connection = $this->_database->connect(); + + if($connection !== TRUE) + return $connection; + + } + + if($this->_lexer === NULL) + return self::STARTUP_FAIL_LEXER; + + return TRUE; + + } + + /** + * Classifies a text + * + * @access public + * @package default + * @param string $text + * @return float The rating between 0 (ham) and 1 (spam) + */ + + public function classify($text) + { + + # Validate the startup + + $started_up = $this->validate(); + + if($started_up !== TRUE) + return $started_up; + + # Get the internal database variables, containing the number of ham and + # spam texts so the spam probability can be calculated in relation to them + $internals = $this->_database->get_internals(); + + # Calculate the spamminess of all tokens + + # Get all tokens we want to rate + + $tokens = $this->_lexer->get_tokens($text); + + # Check if the lexer failed + # (if so, $tokens will be a lexer error code, if not, $tokens will be an array) + if(!is_array($tokens)) + return $tokens; + + # Fetch all availible data for the token set from the database + $this->_token_data = $this->_database->get(array_keys($tokens)); + + # Calculate the spamminess and importance for each token (or a degenerated form of it) + + $word_count = array(); + $rating = array(); + $importance = array(); + + foreach($tokens as $word => $count) { + + $word_count[$word] = $count; + + # Although we only call this function only here ... let's do the + # calculation stuff in a function to make this a bit less confusing ;-) + $rating[$word] = $this->_get_probability($word, $internals['texts_ham'], $internals['texts_spam']); + + $importance[$word] = abs(0.5 - $rating[$word]); + + } + + # Order by importance + arsort($importance); + reset($importance); + + # Get the most interesting tokens (use all if we have less than the given number) + + $relevant = array(); + + for($i = 0; $i < $this->config['use_relevant']; $i++) { + + if($tmp = each($importance)) { + + # Important tokens remain + + # If the token's rating is relevant enough, use it + + if(abs(0.5 - $rating[$tmp['key']]) > $this->config['min_dev']) { + + # Tokens that appear more than once also count more than once + + for($x = 0, $l = $word_count[$tmp['key']]; $x < $l; $x++) + array_push($relevant, $rating[$tmp['key']]); + + } + + } + + else { + # We have less than words to use, so we already + # use what we have and can break here + break; + } + + } + + # Calculate the spamminess of the text (thanks to Mr. Robinson ;-) + # We set both hamminess and Spamminess to 1 for the first multiplying + $hamminess = 1; + $spamminess = 1; + + # Consider all relevant ratings + foreach($relevant as $value) { + $hamminess *= (1.0 - $value); + $spamminess *= $value; + } + + # If no token was good for calculation, we really don't know how + # to rate this text; so we assume a spam and ham probability of 0.5 + + if($hamminess === 1 and $spamminess === 1) { + $hamminess = 0.5; + $spamminess = 0.5; + $n = 1; + } + else { + # Get the number of relevant ratings + $n = count($relevant); + } + + # Calculate the combined rating + + # The actual hamminess and spamminess + $hamminess = 1 - pow($hamminess, (1 / $n)); + $spamminess = 1 - pow($spamminess, (1 / $n)); + + # Calculate the combined indicator + $probability = ($hamminess - $spamminess) / ($hamminess + $spamminess); + + # We want a value between 0 and 1, not between -1 and +1, so ... + $probability = (1 + $probability) / 2; + + # Alea iacta est + return $probability; + + } + + /** + * Calculate the spamminess of a single token also considering "degenerated" versions + * + * @access private + * @param string $word + * @param string $texts_ham + * @param string $texts_spam + * @return void + */ + + private function _get_probability($word, $texts_ham, $texts_spam) + { + + # Let's see what we have! + + if(isset($this->_token_data['tokens'][$word]) === TRUE) { + # The token was in the database, so we can use it's data as-is + # and calculate the spamminess of this token directly + return $this->_calc_probability($this->_token_data['tokens'][$word], $texts_ham, $texts_spam); + } + + # Damn. The token was not found, so do we have at least similar words? + + if(isset($this->_token_data['degenerates'][$word]) === TRUE) { + + # We found similar words, so calculate the spamminess for each one + # and choose the most important one for the further calculation + + # The default rating is 0.5 simply saying nothing + $rating = 0.5; + + foreach($this->_token_data['degenerates'][$word] as $degenerate => $count) { + + # Calculate the rating of the current degenerated token + $rating_tmp = $this->_calc_probability($count, $texts_ham, $texts_spam); + + # Is it more important than the rating of another degenerated version? + if(abs(0.5 - $rating_tmp) > abs(0.5 - $rating)) + $rating = $rating_tmp; + + } + + return $rating; + + } + + else { + # The token is really unknown, so choose the default rating + # for completely unknown tokens. This strips down to the + # robX parameter so we can cheap out the freaky math ;-) + return $this->config['rob_x']; + } + + } + + /** + * Do the actual spamminess calculation of a single token + * + * @access private + * @param array $data + * @param string $texts_ham + * @param string $texts_spam + * @return void + */ + + private function _calc_probability($data, $texts_ham, $texts_spam) + { + + # Calculate the basic probability by Mr. Graham + + # But: consider the number of ham and spam texts saved instead of the + # number of entries where the token appeared to calculate a relative + # spamminess because we count tokens appearing multiple times not just + # once but as often as they appear in the learned texts + + $rel_ham = $data['count_ham']; + $rel_spam = $data['count_spam']; + + if($texts_ham > 0) + $rel_ham = $data['count_ham'] / $texts_ham; + + if($texts_spam > 0) + $rel_spam = $data['count_spam'] / $texts_spam; + + $rating = $rel_spam / ($rel_ham + $rel_spam); + + # Calculate the better probability proposed by Mr. Robinson + $all = $data['count_ham'] + $data['count_spam']; + return (($this->config['rob_s'] * $this->config['rob_x']) + ($all * $rating)) / ($this->config['rob_s'] + $all); + + } + + /** + * Check the validity of the category of a request + * + * @access private + * @param string $category + * @return void + */ + + private function _check_category($category) + { + return $category === self::HAM or $category === self::SPAM; + } + + /** + * Learn a reference text + * + * @access public + * @param string $text + * @param const $category Either b8::SPAM or b8::HAM + * @return void + */ + + public function learn($text, $category) + { + return $this->_process_text($text, $category, self::LEARN); + } + + /** + * Unlearn a reference text + * + * @access public + * @param string $text + * @param const $category Either b8::SPAM or b8::HAM + * @return void + */ + + public function unlearn($text, $category) + { + return $this->_process_text($text, $category, self::UNLEARN); + } + + /** + * Does the actual interaction with the storage backend for learning or unlearning texts + * + * @access private + * @param string $text + * @param const $category Either b8::SPAM or b8::HAM + * @param const $action Either b8::LEARN or b8::UNLEARN + * @return void + */ + + private function _process_text($text, $category, $action) + { + + # Validate the startup + + $started_up = $this->validate(); + + if($started_up !== TRUE) + return $started_up; + + # Look if the request is okay + if($this->_check_category($category) === FALSE) + return self::TRAINER_CATEGORY_FAIL; + + # Get all tokens from $text + + $tokens = $this->_lexer->get_tokens($text); + + # Check if the lexer failed + # (if so, $tokens will be a lexer error code, if not, $tokens will be an array) + if(!is_array($tokens)) + return $tokens; + + # Pass the tokens and what to do with it to the storage backend + return $this->_database->process_text($tokens, $category, $action); + + } + +} + +?> \ No newline at end of file diff --git a/library/spam/b8/degenerator/degenerator_default.php b/library/spam/b8/degenerator/degenerator_default.php new file mode 100644 index 0000000000..4ff6d882b7 --- /dev/null +++ b/library/spam/b8/degenerator/degenerator_default.php @@ -0,0 +1,127 @@ + +# +# This file is part of the b8 package +# +# This program is free software; you can redistribute it and/or modify it +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation in version 2.1 of the License. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY +# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public +# License for more details. +# +# You should have received a copy of the GNU Lesser General Public License +# along with this program; if not, write to the Free Software Foundation, +# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + +/** + * Copyright (C) 2006-2010 Tobias Leupold + * + * @license LGPL + * @access public + * @package b8 + * @author Tobias Leupold + */ + +class b8_degenerator_default +{ + + public $degenerates = array(); + + /** + * Generates a list of "degenerated" words for a list of words. + * + * @access public + * @param array $tokens + * @return array An array containing an array of degenerated tokens for each token + */ + + public function degenerate(array $words) + { + + $degenerates = array(); + + foreach($words as $word) + $degenerates[$word] = $this->_degenerate_word($word); + + return $degenerates; + + } + + /** + * If the original word is not found in the database then + * we build "degenerated" versions of the word to lookup. + * + * @access private + * @param string $word + * @return array An array of degenerated words + */ + + protected function _degenerate_word($word) + { + + # Check for any stored words so the process doesn't have to repeat + if(isset($this->degenerates[$word]) === TRUE) + return $this->degenerates[$word]; + + $degenerate = array(); + + # Add different version of upper and lower case and ucfirst + array_push($degenerate, strtolower($word)); + array_push($degenerate, strtoupper($word)); + array_push($degenerate, ucfirst($word)); + + # Degenerate all versions + + foreach($degenerate as $alt_word) { + + # Look for stuff like !!! and ??? + + if(preg_match('/[!?]$/', $alt_word) > 0) { + + # Add versions with different !s and ?s + + if(preg_match('/[!?]{2,}$/', $alt_word) > 0) { + $tmp = preg_replace('/([!?])+$/', '$1', $alt_word); + array_push($degenerate, $tmp); + } + + $tmp = preg_replace('/([!?])+$/', '', $alt_word); + array_push($degenerate, $tmp); + + } + + # Look for ... at the end of the word + + $alt_word_int = $alt_word; + + while(preg_match('/[\.]$/', $alt_word_int) > 0) { + $alt_word_int = substr($alt_word_int, 0, strlen($alt_word_int) - 1); + array_push($degenerate, $alt_word_int); + } + + } + + # Some degenerates are the same as the original word. These don't have + # to be fetched, so we create a new array with only new tokens + + $real_degenerate = array(); + + foreach($degenerate as $deg_word) { + if($word != $deg_word) + array_push($real_degenerate, $deg_word); + } + + # Store the list of degenerates for the token + $this->degenerates[$word] = $real_degenerate; + + return $real_degenerate; + + } + +} + +?> \ No newline at end of file diff --git a/library/spam/b8/lexer/lexer_default.php b/library/spam/b8/lexer/lexer_default.php new file mode 100644 index 0000000000..7b5ca22bfb --- /dev/null +++ b/library/spam/b8/lexer/lexer_default.php @@ -0,0 +1,205 @@ + +# +# This file is part of the b8 package +# +# This program is free software; you can redistribute it and/or modify it +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation in version 2.1 of the License. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY +# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public +# License for more details. +# +# You should have received a copy of the GNU Lesser General Public License +# along with this program; if not, write to the Free Software Foundation, +# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + +/** + * Copyright (C) 2006-2010 Tobias Leupold + * + * @license LGPL + * @access public + * @package b8 + * @author Tobias Leupold + * @author Oliver Lillie (aka buggedcom) (original PHP 5 port) + */ + +class b8_lexer_default +{ + + const LEXER_TEXT_NOT_STRING = 'LEXER_TEXT_NOT_STRING'; + const LEXER_TEXT_EMPTY = 'LEXER_TEXT_EMPTY'; + + public $config = NULL; + + # The regular expressions we use to split the text to tokens + + public $regexp = array( + 'ip' => '/([A-Za-z0-9\_\-\.]+)/', + 'raw_split' => '/[\s,\.\/"\:;\|<>\-_\[\]{}\+=\)\(\*\&\^%]+/', + 'html' => '/(<.+?>)/', + 'tagname' => '/(.+?)\s/', + 'numbers' => '/^[0-9]+$/' + ); + + /** + * Constructs the lexer. + * + * @access public + * @return void + */ + + function __construct($config) + { + $this->config = $config; + } + + /** + * Generates the tokens required for the bayesian filter. + * + * @access public + * @param string $text + * @return array Returns the list of tokens + */ + + public function get_tokens($text) + { + + # Check that we actually have a string ... + if(is_string($text) === FALSE) + return self::LEXER_TEXT_NOT_STRING; + + # ... and that it's not empty + if(empty($text) === TRUE) + return self::LEXER_TEXT_EMPTY; + + # Re-convert the text to the original characters coded in UTF-8, as + # they have been coded in html entities during the post process + $text = html_entity_decode($text, ENT_QUOTES, 'UTF-8'); + + $tokens = array(); + + # Find URLs and IP addresses + + preg_match_all($this->regexp['ip'], $text, $raw_tokens); + + foreach($raw_tokens[1] as $word) { + + # Check for a dot + if(strpos($word, '.') === FALSE) + continue; + + # Check that the word is valid, min and max sizes, etc. + if($this->_is_valid($word) === FALSE) + continue; + + if(isset($tokens[$word]) === FALSE) + $tokens[$word] = 1; + else + $tokens[$word] += 1; + + # Delete the word from the text so it doesn't get re-added. + $text = str_replace($word, '', $text); + + # Also process the parts of the URLs + $url_parts = preg_split($this->regexp['raw_split'], $word); + + foreach($url_parts as $word) { + + # Again validate the part + + if($this->_is_valid($word) === FALSE) + continue; + + if(isset($tokens[$word]) === FALSE) + $tokens[$word] = 1; + else + $tokens[$word] += 1; + + } + + } + + # Split the remaining text + + $raw_tokens = preg_split($this->regexp['raw_split'], $text); + + foreach($raw_tokens as $word) { + + # Again validate the part + + if($this->_is_valid($word) === FALSE) + continue; + + if(isset($tokens[$word]) === FALSE) + $tokens[$word] = 1; + else + $tokens[$word] += 1; + + } + + # Process the HTML + + preg_match_all($this->regexp['html'], $text, $raw_tokens); + + foreach($raw_tokens[1] as $word) { + + # Again validate the part + + if($this->_is_valid($word) === FALSE) + continue; + + # If the tag has parameters, just use the tag itself + + if(strpos($word, ' ') !== FALSE) { + preg_match($this->regexp['tagname'], $word, $tmp); + $word = "{$tmp[1]}...>"; + } + + if(isset($tokens[$word]) === FALSE) + $tokens[$word] = 1; + else + $tokens[$word] += 1; + + } + + # Return a list of all found tokens + return $tokens; + + } + + /** + * Validates a token. + * + * @access private + * @param string $token The token string. + * @return boolean Returns TRUE if the token is valid, otherwise returns FALSE + */ + + private function _is_valid($token) + { + + # Validate the size of the token + + $len = strlen($token); + + if($len < $this->config['min_size'] or $len > $this->config['max_size']) + return FALSE; + + # We may want to exclude pure numbers + if($this->config['allow_numbers'] === FALSE) { + if(preg_match($this->regexp['numbers'], $token) > 0) + return FALSE; + } + + # Token is okay + return TRUE; + + } + +} + +?> \ No newline at end of file diff --git a/library/spam/b8/storage/storage_base.php b/library/spam/b8/storage/storage_base.php new file mode 100644 index 0000000000..01f5a69d72 --- /dev/null +++ b/library/spam/b8/storage/storage_base.php @@ -0,0 +1,395 @@ + +# +# This file is part of the b8 package +# +# This program is free software; you can redistribute it and/or modify it +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation in version 2.1 of the License. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY +# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public +# License for more details. +# +# You should have received a copy of the GNU Lesser General Public License +# along with this program; if not, write to the Free Software Foundation, +# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + +/** + * Functions used by all storage backends + * Copyright (C) 2010 Tobias Leupold + * + * @license LGPL + * @access public + * @package b8 + * @author Tobias Leupold + */ + +abstract class b8_storage_base +{ + + public $connected = FALSE; + + protected $_degenerator = NULL; + + const INTERNALS_TEXTS_HAM = 'bayes*texts.ham'; + const INTERNALS_TEXTS_SPAM = 'bayes*texts.spam'; + const INTERNALS_DBVERSION = 'bayes*dbversion'; + + const BACKEND_NOT_CONNECTED = 'BACKEND_NOT_CONNECTED'; + const DATABASE_WRONG_VERSION = 'DATABASE_WRONG_VERSION'; + const DATABASE_NOT_B8 = 'DATABASE_NOT_B8'; + + /** + * Validates the class has all it needs to work. + * + * @access protected + * @return mixed Returns TRUE if everything is okay, otherwise an error code. + */ + + protected function validate() + { + + # We set up the degenerator here, as we would have to duplicate code if it + # was done in the constructor of the respective storage backend. + $class = 'b8_degenerator_' . $this->b8_config['degenerator']; + $this->_degenerator = new $class(); + + if($this->connected !== TRUE) + return self::BACKEND_NOT_CONNECTED; + + return TRUE; + + } + + /** + * Checks if a b8 database is used and if it's version is okay + * + * @access protected + * @return mixed Returns TRUE if everything is okay, otherwise an error code. + */ + + protected function check_database() + { + + $internals = $this->get_internals(); + + if(isset($internals['dbversion'])) { + if($internals['dbversion'] == "2") { + return TRUE; + } + else { + $this->connected = FALSE; + return self::DATABASE_WRONG_VERSION; + } + } + else { + $this->connected = FALSE; + return self::DATABASE_NOT_B8; + } + + } + + /** + * Parses the "count" data of a token. + * + * @access private + * @param string $data + * @return array Returns an array of the parsed data: array(count_ham, count_spam, lastseen). + */ + + private function _parse_count($data) + { + + list($count_ham, $count_spam, $lastseen) = explode(' ', $data); + + $count_ham = (int) $count_ham; + $count_spam = (int) $count_spam; + + return array( + 'count_ham' => $count_ham, + 'count_spam' => $count_spam + ); + + } + + /** + * Get the database's internal variables. + * + * @access public + * @return array Returns an array of all internals. + */ + + public function get_internals() + { + + $internals = $this->_get_query( + array( + self::INTERNALS_TEXTS_HAM, + self::INTERNALS_TEXTS_SPAM, + self::INTERNALS_DBVERSION + ) + ); + + return array( + 'texts_ham' => (int) $internals[self::INTERNALS_TEXTS_HAM], + 'texts_spam' => (int) $internals[self::INTERNALS_TEXTS_SPAM], + 'dbversion' => (int) $internals[self::INTERNALS_DBVERSION] + ); + + } + + /** + * Get all data about a list of tags from the database. + * + * @access public + * @param array $tokens + * @return mixed Returns FALSE on failure, otherwise returns array of returned data in the format array('tokens' => array(token => count), 'degenerates' => array(token => array(degenerate => count))). + */ + + public function get($tokens) + { + + # Validate the startup + + $started_up = $this->validate(); + + if($started_up !== TRUE) + return $started_up; + + # First we see what we have in the database. + $token_data = $this->_get_query($tokens); + + # Check if we have to degenerate some tokens + + $missing_tokens = array(); + + foreach($tokens as $token) { + if(!isset($token_data[$token])) + $missing_tokens[] = $token; + } + + if(count($missing_tokens) > 0) { + + # We have to degenerate some tokens + $degenerates_list = array(); + + # Generate a list of degenerated tokens for the missing tokens ... + $degenerates = $this->_degenerator->degenerate($missing_tokens); + + # ... and look them up + + foreach($degenerates as $token => $token_degenerates) + $degenerates_list = array_merge($degenerates_list, $token_degenerates); + + $token_data = array_merge($token_data, $this->_get_query($degenerates_list)); + + } + + # Here, we have all availible data in $token_data. + + $return_data_tokens = array(); + $return_data_degenerates = array(); + + foreach($tokens as $token) { + + if(isset($token_data[$token]) === TRUE) { + + # The token was found in the database + + # Add the data ... + $return_data_tokens[$token] = $this->_parse_count($token_data[$token]); + + # ... and update it's lastseen parameter + $this->_update($token, "{$return_data_tokens[$token]['count_ham']} {$return_data_tokens[$token]['count_spam']} " . $this->b8_config['today']); + + } + + else { + + # The token was not found, so we look if we + # can return data for degenerated tokens + + # Check all degenerated forms of the token + + foreach($this->_degenerator->degenerates[$token] as $degenerate) { + + if(isset($token_data[$degenerate]) === TRUE) { + + # A degeneration of the token way found in the database + + # Add the data ... + $return_data_degenerates[$token][$degenerate] = $this->_parse_count($token_data[$degenerate]); + + # ... and update it's lastseen parameter + $this->_update($degenerate, "{$return_data_degenerates[$token][$degenerate]['count_ham']} {$return_data_degenerates[$token][$degenerate]['count_spam']} " . $this->b8_config['today']); + + } + + } + + } + + } + + # Now, all token data directly found in the database is in $return_data_tokens + # and all data for degenerated versions is in $return_data_degenerates + + # First, we commit the changes to the lastseen parameters + $this->_commit(); + + # Then, we return what we have + return array( + 'tokens' => $return_data_tokens, + 'degenerates' => $return_data_degenerates + ); + + } + + /** + * Stores or deletes a list of tokens from the given category. + * + * @access public + * @param array $tokens + * @param const $category Either b8::HAM or b8::SPAM + * @param const $action Either b8::LEARN or b8::UNLEARN + * @return void + */ + + public function process_text($tokens, $category, $action) + { + + # Validate the startup + + $started_up = $this->validate(); + + if($started_up !== TRUE) + return $started_up; + + # No matter what we do, we first have to check what data we have. + + # First get the internals, including the ham texts and spam texts counter + $internals = $this->get_internals(); + + # Then, fetch all data for all tokens we have (and update their lastseen parameters) + $token_data = $this->_get_query(array_keys($tokens)); + + # Process all tokens to learn/unlearn + + foreach($tokens as $token => $count) { + + if(isset($token_data[$token])) { + + # We already have this token, so update it's data + + # Get the existing data + list($count_ham, $count_spam, $lastseen) = explode(' ', $token_data[$token]); + $count_ham = (int) $count_ham; + $count_spam = (int) $count_spam; + + # Increase or decrease the right counter + + if($action === b8::LEARN) { + if($category === b8::HAM) + $count_ham += $count; + elseif($category === b8::SPAM) + $count_spam += $count; + } + + elseif($action == b8::UNLEARN) { + if($category === b8::HAM) + $count_ham -= $count; + elseif($category === b8::SPAM) + $count_spam -= $count; + } + + # We don't want to have negative values + + if($count_ham < 0) + $count_ham = 0; + + if($count_spam < 0) + $count_spam = 0; + + # Now let's see if we have to update or delete the token + if($count_ham !== 0 or $count_spam !== 0) + $this->_update($token, "$count_ham $count_spam " . $this->b8_config['today']); + else + $this->_del($token); + + } + + else { + + # We don't have the token. If we unlearn a text, we can't delete it + # as we don't have it anyway, so just do something if we learn a text + + if($action === b8::LEARN) { + + if($category === b8::HAM) + $data = '1 0 '; + elseif($category === b8::SPAM) + $data = '0 1 '; + + $data .= $this->b8_config['today']; + + $this->_put($token, $data); + + } + + } + + } + + # Now, all token have been processed, so let's update the right text + + if($action === b8::LEARN) { + + if($category === b8::HAM) { + $internals['texts_ham']++; + $this->_update(self::INTERNALS_TEXTS_HAM, $internals['texts_ham']); + } + + elseif($category === b8::SPAM) { + $internals['texts_spam']++; + $this->_update(self::INTERNALS_TEXTS_SPAM, $internals['texts_spam']); + } + + } + + elseif($action == b8::UNLEARN) { + + if($category === b8::HAM) { + + $internals['texts_ham']--; + + if($internals['texts_ham'] < 0) + $internals['texts_ham'] = 0; + + $this->_update(self::INTERNALS_TEXTS_HAM, $internals['texts_ham']); + + } + + elseif($category === b8::SPAM) { + + $internals['texts_spam']--; + + if($internals['texts_spam'] < 0) + $internals['texts_spam'] = 0; + + $this->_update(self::INTERNALS_TEXTS_SPAM, $internals['texts_spam']); + + } + + } + + # We're done and can commit all changes to the database now + $this->_commit(); + + } + +} + +?> \ No newline at end of file diff --git a/library/spam/b8/storage/storage_dba.php b/library/spam/b8/storage/storage_dba.php new file mode 100644 index 0000000000..04618b23ef --- /dev/null +++ b/library/spam/b8/storage/storage_dba.php @@ -0,0 +1,198 @@ + +# +# This file is part of the b8 package +# +# This program is free software; you can redistribute it and/or modify it +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation in version 2.1 of the License. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY +# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public +# License for more details. +# +# You should have received a copy of the GNU Lesser General Public License +# along with this program; if not, write to the Free Software Foundation, +# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + +/** + * The DBA (Berkeley DB) abstraction layer for communicating with the database. + * Copyright (C) 2006-2010 Tobias Leupold + * + * @license LGPL + * @access public + * @package b8 + * @author Tobias Leupold + */ + +class b8_storage_dba extends b8_storage_base +{ + + public $config = array( + 'database' => 'wordlist.db', + 'handler' => 'db4', + ); + + public $b8_config = array( + 'degenerator' => NULL, + 'today' => NULL + ); + + private $_db = NULL; + + const DATABASE_CONNECTION_FAIL = 'DATABASE_CONNECTION_FAIL'; + + /** + * Constructs the database layer. + * + * @access public + * @param string $config + */ + + function __construct($config, $degenerator, $today) + { + + # Pass some variables of the main b8 config to this class + $this->b8_config['degenerator'] = $degenerator; + $this->b8_config['today'] = $today; + + # Validate the config items + if(count($config) > 0) { + foreach ($config as $name => $value) { + $this->config[$name] = (string) $value; + } + } + + } + + /** + * Closes the database connection. + * + * @access public + * @return void + */ + + function __destruct() + { + if($this->_db !== NULL) { + dba_close($this->_db); + $this->connected = FALSE; + } + } + + /** + * Connect to the database and do some checks. + * + * @access public + * @return mixed Returns TRUE on a successful database connection, otherwise returns a constant from b8. + */ + + public function connect() + { + + # Have we already connected? + if($this->_db !== NULL) + return TRUE; + + # Open the database connection + $this->_db = dba_open(dirname(__FILE__) . DIRECTORY_SEPARATOR . ".." . DIRECTORY_SEPARATOR . $this->config['database'], "w", $this->config['handler']); + + if($this->_db === FALSE) { + $this->connected = FALSE; + $this->_db = NULL; + return self::DATABASE_CONNECTION_FAIL; + } + + # Everything is okay and connected + + $this->connected = TRUE; + + # Let's see if this is a b8 database and the version is okay + return $this->check_database(); + + } + + /** + * Does the actual interaction with the database when fetching data. + * + * @access protected + * @param array $tokens + * @return mixed Returns an array of the returned data in the format array(token => data) or an empty array if there was no data. + */ + + protected function _get_query($tokens) + { + + $data = array(); + + foreach ($tokens as $token) { + + $count = dba_fetch($token, $this->_db); + + if($count !== FALSE) + $data[$token] = $count; + + } + + return $data; + + } + + /** + * Store a token to the database. + * + * @access protected + * @param string $token + * @param string $count + * @return bool TRUE on success or FALSE on failure + */ + + protected function _put($token, $count) { + return dba_insert($token, $count, $this->_db); + } + + /** + * Update an existing token. + * + * @access protected + * @param string $token + * @param string $count + * @return bool TRUE on success or FALSE on failure + */ + + protected function _update($token, $count) + { + return dba_replace($token, $count, $this->_db); + } + + /** + * Remove a token from the database. + * + * @access protected + * @param string $token + * @return bool TRUE on success or FALSE on failure + */ + + protected function _del($token) + { + return dba_delete($token, $this->_db); + } + + /** + * Does nothing :-D + * + * @access protected + * @return void + */ + + protected function _commit() + { + # We just need this function because the (My)SQL backend(s) need it. + return; + } + +} + +?> \ No newline at end of file diff --git a/library/spam/b8/storage/storage_mysql.php b/library/spam/b8/storage/storage_mysql.php new file mode 100644 index 0000000000..0225363509 --- /dev/null +++ b/library/spam/b8/storage/storage_mysql.php @@ -0,0 +1,351 @@ + +# +# This file is part of the b8 package +# +# This program is free software; you can redistribute it and/or modify it +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation in version 2.1 of the License. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY +# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public +# License for more details. +# +# You should have received a copy of the GNU Lesser General Public License +# along with this program; if not, write to the Free Software Foundation, +# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + +/** + * The MySQL abstraction layer for communicating with the database. + * Copyright (C) 2009 Oliver Lillie (aka buggedcom) + * Copyright (C) 2010-2011 Tobias Leupold + * + * @license LGPL + * @access public + * @package b8 + * @author Oliver Lillie (aka buggedcom) (original PHP 5 port and optimizations) + * @author Tobias Leupold + */ + +class b8_storage_mysql extends b8_storage_base +{ + + public $config = array( + 'database' => 'b8_wordlist', + 'table_name' => 'b8_wordlist', + 'host' => 'localhost', + 'user' => FALSE, + 'pass' => FALSE, + 'connection' => NULL + ); + + public $b8_config = array( + 'degenerator' => NULL, + 'today' => NULL + ); + + private $_connection = NULL; + private $_deletes = array(); + private $_puts = array(); + private $_updates = array(); + + const DATABASE_CONNECTION_FAIL = 'DATABASE_CONNECTION_FAIL'; + const DATABASE_CONNECTION_ERROR = 'DATABASE_CONNECTION_ERROR'; + const DATABASE_CONNECTION_BAD_RESOURCE = 'DATABASE_CONNECTION_BAD_RESOURCE'; + const DATABASE_SELECT_ERROR = 'DATABASE_SELECT_ERROR'; + const DATABASE_TABLE_ACCESS_FAIL = 'DATABASE_TABLE_ACCESS_FAIL'; + const DATABASE_WRONG_VERSION = 'DATABASE_WRONG_VERSION'; + + /** + * Constructs the database layer. + * + * @access public + * @param string $config + */ + + function __construct($config, $degenerator, $today) + { + + # Pass some variables of the main b8 config to this class + $this->b8_config['degenerator'] = $degenerator; + $this->b8_config['today'] = $today; + + # Validate the config items + + if(count($config) > 0) { + + foreach ($config as $name => $value) { + + switch($name) { + + case 'table_name': + case 'host': + case 'user': + case 'pass': + case 'database': + $this->config[$name] = (string) $value; + break; + + case 'connection': + + if($value !== NULL) { + + if(is_resource($value) === TRUE) { + $resource_type = get_resource_type($value); + $this->config['connection'] = $resource_type !== 'mysql link' && $resource_type !== 'mysql link persistent' ? FALSE : $value; + } + + else + $this->config['connection'] = FALSE; + + } + + break; + + } + + } + + } + + } + + /** + * Closes the database connection. + * + * @access public + * @return void + */ + + function __destruct() + { + + if($this->_connection === NULL) + return; + + # Commit any changes before closing + $this->_commit(); + + # Just close the connection if no link-resource was passed and b8 created it's own connection + if($this->config['connection'] === NULL) + mysql_close($this->_connection); + + $this->connected = FALSE; + + } + + /** + * Connect to the database and do some checks. + * + * @access public + * @return mixed Returns TRUE on a successful database connection, otherwise returns a constant from b8. + */ + + public function connect() + { + + # Are we already connected? + if($this->connected === TRUE) + return TRUE; + + # Are we using an existing passed resource? + if($this->config['connection'] === FALSE) { + # ... yes we are, but the connection is not a resource, so return an error + $this->connected = FALSE; + return self::DATABASE_CONNECTION_BAD_RESOURCE; + } + + elseif($this->config['connection'] === NULL) { + + # ... no we aren't so we have to connect. + + if($this->_connection = mysql_connect($this->config['host'], $this->config['user'], $this->config['pass'])) { + if(mysql_select_db($this->config['database'], $this->_connection) === FALSE) { + $this->connected = FALSE; + return self::DATABASE_SELECT_ERROR . ": " . mysql_error(); + } + } + else { + $this->connected = FALSE; + return self::DATABASE_CONNECTION_ERROR; + } + + } + + else { + # ... yes we are + $this->_connection = $this->config['connection']; + } + + # Just in case ... + if($this->_connection === NULL) { + $this->connected = FALSE; + return self::DATABASE_CONNECTION_FAIL; + } + + # Check to see if the wordlist table exists + if(mysql_query('DESCRIBE ' . $this->config['table_name'], $this->_connection) === FALSE) { + $this->connected = FALSE; + return self::DATABASE_TABLE_ACCESS_FAIL . ": " . mysql_error(); + } + + # Everything is okay and connected + $this->connected = TRUE; + + # Let's see if this is a b8 database and the version is okay + return $this->check_database(); + + } + + /** + * Does the actual interaction with the database when fetching data. + * + * @access protected + * @param array $tokens + * @return mixed Returns an array of the returned data in the format array(token => data) or an empty array if there was no data. + */ + + protected function _get_query($tokens) + { + + # Construct the query ... + + if(count($tokens) > 0) { + + $where = array(); + + foreach ($tokens as $token) { + $token = mysql_real_escape_string($token, $this->_connection); + array_push($where, $token); + } + + $where = 'token IN ("' . implode('", "', $where) . '")'; + } + + else { + $token = mysql_real_escape_string($token, $this->_connection); + $where = 'token = "' . $token . '"'; + } + + # ... and fetch the data + + $result = mysql_query(' + SELECT token, count + FROM ' . $this->config['table_name'] . ' + WHERE ' . $where . '; + ', $this->_connection); + + $data = array(); + + while ($row = mysql_fetch_array($result, MYSQL_ASSOC)) + $data[$row['token']] = $row['count']; + + mysql_free_result($result); + + return $data; + + } + + /** + * Store a token to the database. + * + * @access protected + * @param string $token + * @param string $count + * @return void + */ + + protected function _put($token, $count) { + $token = mysql_real_escape_string($token, $this->_connection); + $count = mysql_real_escape_string($count, $this->_connection);; + array_push($this->_puts, '("' . $token . '", "' . $count . '")'); + } + + /** + * Update an existing token. + * + * @access protected + * @param string $token + * @param string $count + * @return void + */ + + protected function _update($token, $count) + { + $token = mysql_real_escape_string($token, $this->_connection); + $count = mysql_real_escape_string($count, $this->_connection); + array_push($this->_updates, '("' . $token . '", "' . $count . '")'); + } + + /** + * Remove a token from the database. + * + * @access protected + * @param string $token + * @return void + */ + + protected function _del($token) + { + $token = mysql_real_escape_string($token, $this->_connection); + array_push($this->_deletes, $token); + } + + /** + * Commits any modification queries. + * + * @access protected + * @return void + */ + + protected function _commit() + { + + if(count($this->_deletes) > 0) { + + $result = mysql_query(' + DELETE FROM ' . $this->config['table_name'] . ' + WHERE token IN ("' . implode('", "', $this->_deletes) . '"); + ', $this->_connection); + + if(is_resource($result) === TRUE) + mysql_free_result($result); + + $this->_deletes = array(); + + } + + if(count($this->_puts) > 0) { + + $result = mysql_query(' + INSERT INTO ' . $this->config['table_name'] . '(token, count) + VALUES ' . implode(', ', $this->_puts) . ';', $this->_connection); + + if(is_resource($result) === TRUE) + mysql_free_result($result); + + $this->_puts = array(); + + } + + if(count($this->_updates) > 0) { + + $result = mysql_query(' + INSERT INTO ' . $this->config['table_name'] . '(token, count) + VALUES ' . implode(', ', $this->_updates) . ' + ON DUPLICATE KEY UPDATE ' . $this->config['table_name'] . '.count = VALUES(count);', $this->_connection); + + if(is_resource($result) === TRUE) + mysql_free_result($result); + + $this->_updates = array(); + + } + + } + +} + +?> \ No newline at end of file diff --git a/library/spam/doc/COPYING b/library/spam/doc/COPYING new file mode 100644 index 0000000000..8add30ad59 --- /dev/null +++ b/library/spam/doc/COPYING @@ -0,0 +1,504 @@ + GNU LESSER GENERAL PUBLIC LICENSE + Version 2.1, February 1999 + + Copyright (C) 1991, 1999 Free Software Foundation, Inc. + 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + +[This is the first released version of the Lesser GPL. It also counts + as the successor of the GNU Library Public License, version 2, hence + the version number 2.1.] + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +Licenses are intended to guarantee your freedom to share and change +free software--to make sure the software is free for all its users. + + This license, the Lesser General Public License, applies to some +specially designated software packages--typically libraries--of the +Free Software Foundation and other authors who decide to use it. You +can use it too, but we suggest you first think carefully about whether +this license or the ordinary General Public License is the better +strategy to use in any particular case, based on the explanations below. + + When we speak of free software, we are referring to freedom of use, +not price. Our General Public Licenses are designed to make sure that +you have the freedom to distribute copies of free software (and charge +for this service if you wish); that you receive source code or can get +it if you want it; that you can change the software and use pieces of +it in new free programs; and that you are informed that you can do +these things. + + To protect your rights, we need to make restrictions that forbid +distributors to deny you these rights or to ask you to surrender these +rights. These restrictions translate to certain responsibilities for +you if you distribute copies of the library or if you modify it. + + For example, if you distribute copies of the library, whether gratis +or for a fee, you must give the recipients all the rights that we gave +you. You must make sure that they, too, receive or can get the source +code. If you link other code with the library, you must provide +complete object files to the recipients, so that they can relink them +with the library after making changes to the library and recompiling +it. And you must show them these terms so they know their rights. + + We protect your rights with a two-step method: (1) we copyright the +library, and (2) we offer you this license, which gives you legal +permission to copy, distribute and/or modify the library. + + To protect each distributor, we want to make it very clear that +there is no warranty for the free library. Also, if the library is +modified by someone else and passed on, the recipients should know +that what they have is not the original version, so that the original +author's reputation will not be affected by problems that might be +introduced by others. + + Finally, software patents pose a constant threat to the existence of +any free program. We wish to make sure that a company cannot +effectively restrict the users of a free program by obtaining a +restrictive license from a patent holder. Therefore, we insist that +any patent license obtained for a version of the library must be +consistent with the full freedom of use specified in this license. + + Most GNU software, including some libraries, is covered by the +ordinary GNU General Public License. This license, the GNU Lesser +General Public License, applies to certain designated libraries, and +is quite different from the ordinary General Public License. We use +this license for certain libraries in order to permit linking those +libraries into non-free programs. + + When a program is linked with a library, whether statically or using +a shared library, the combination of the two is legally speaking a +combined work, a derivative of the original library. The ordinary +General Public License therefore permits such linking only if the +entire combination fits its criteria of freedom. The Lesser General +Public License permits more lax criteria for linking other code with +the library. + + We call this license the "Lesser" General Public License because it +does Less to protect the user's freedom than the ordinary General +Public License. It also provides other free software developers Less +of an advantage over competing non-free programs. These disadvantages +are the reason we use the ordinary General Public License for many +libraries. However, the Lesser license provides advantages in certain +special circumstances. + + For example, on rare occasions, there may be a special need to +encourage the widest possible use of a certain library, so that it becomes +a de-facto standard. To achieve this, non-free programs must be +allowed to use the library. A more frequent case is that a free +library does the same job as widely used non-free libraries. In this +case, there is little to gain by limiting the free library to free +software only, so we use the Lesser General Public License. + + In other cases, permission to use a particular library in non-free +programs enables a greater number of people to use a large body of +free software. For example, permission to use the GNU C Library in +non-free programs enables many more people to use the whole GNU +operating system, as well as its variant, the GNU/Linux operating +system. + + Although the Lesser General Public License is Less protective of the +users' freedom, it does ensure that the user of a program that is +linked with the Library has the freedom and the wherewithal to run +that program using a modified version of the Library. + + The precise terms and conditions for copying, distribution and +modification follow. Pay close attention to the difference between a +"work based on the library" and a "work that uses the library". The +former contains code derived from the library, whereas the latter must +be combined with the library in order to run. + + GNU LESSER GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License Agreement applies to any software library or other +program which contains a notice placed by the copyright holder or +other authorized party saying it may be distributed under the terms of +this Lesser General Public License (also called "this License"). +Each licensee is addressed as "you". + + A "library" means a collection of software functions and/or data +prepared so as to be conveniently linked with application programs +(which use some of those functions and data) to form executables. + + The "Library", below, refers to any such software library or work +which has been distributed under these terms. A "work based on the +Library" means either the Library or any derivative work under +copyright law: that is to say, a work containing the Library or a +portion of it, either verbatim or with modifications and/or translated +straightforwardly into another language. (Hereinafter, translation is +included without limitation in the term "modification".) + + "Source code" for a work means the preferred form of the work for +making modifications to it. For a library, complete source code means +all the source code for all modules it contains, plus any associated +interface definition files, plus the scripts used to control compilation +and installation of the library. + + Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running a program using the Library is not restricted, and output from +such a program is covered only if its contents constitute a work based +on the Library (independent of the use of the Library in a tool for +writing it). Whether that is true depends on what the Library does +and what the program that uses the Library does. + + 1. You may copy and distribute verbatim copies of the Library's +complete source code as you receive it, in any medium, provided that +you conspicuously and appropriately publish on each copy an +appropriate copyright notice and disclaimer of warranty; keep intact +all the notices that refer to this License and to the absence of any +warranty; and distribute a copy of this License along with the +Library. + + You may charge a fee for the physical act of transferring a copy, +and you may at your option offer warranty protection in exchange for a +fee. + + 2. You may modify your copy or copies of the Library or any portion +of it, thus forming a work based on the Library, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) The modified work must itself be a software library. + + b) You must cause the files modified to carry prominent notices + stating that you changed the files and the date of any change. + + c) You must cause the whole of the work to be licensed at no + charge to all third parties under the terms of this License. + + d) If a facility in the modified Library refers to a function or a + table of data to be supplied by an application program that uses + the facility, other than as an argument passed when the facility + is invoked, then you must make a good faith effort to ensure that, + in the event an application does not supply such function or + table, the facility still operates, and performs whatever part of + its purpose remains meaningful. + + (For example, a function in a library to compute square roots has + a purpose that is entirely well-defined independent of the + application. Therefore, Subsection 2d requires that any + application-supplied function or table used by this function must + be optional: if the application does not supply it, the square + root function must still compute square roots.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Library, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Library, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote +it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Library. + +In addition, mere aggregation of another work not based on the Library +with the Library (or with a work based on the Library) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may opt to apply the terms of the ordinary GNU General Public +License instead of this License to a given copy of the Library. To do +this, you must alter all the notices that refer to this License, so +that they refer to the ordinary GNU General Public License, version 2, +instead of to this License. (If a newer version than version 2 of the +ordinary GNU General Public License has appeared, then you can specify +that version instead if you wish.) Do not make any other change in +these notices. + + Once this change is made in a given copy, it is irreversible for +that copy, so the ordinary GNU General Public License applies to all +subsequent copies and derivative works made from that copy. + + This option is useful when you wish to copy part of the code of +the Library into a program that is not a library. + + 4. You may copy and distribute the Library (or a portion or +derivative of it, under Section 2) in object code or executable form +under the terms of Sections 1 and 2 above provided that you accompany +it with the complete corresponding machine-readable source code, which +must be distributed under the terms of Sections 1 and 2 above on a +medium customarily used for software interchange. + + If distribution of object code is made by offering access to copy +from a designated place, then offering equivalent access to copy the +source code from the same place satisfies the requirement to +distribute the source code, even though third parties are not +compelled to copy the source along with the object code. + + 5. A program that contains no derivative of any portion of the +Library, but is designed to work with the Library by being compiled or +linked with it, is called a "work that uses the Library". Such a +work, in isolation, is not a derivative work of the Library, and +therefore falls outside the scope of this License. + + However, linking a "work that uses the Library" with the Library +creates an executable that is a derivative of the Library (because it +contains portions of the Library), rather than a "work that uses the +library". The executable is therefore covered by this License. +Section 6 states terms for distribution of such executables. + + When a "work that uses the Library" uses material from a header file +that is part of the Library, the object code for the work may be a +derivative work of the Library even though the source code is not. +Whether this is true is especially significant if the work can be +linked without the Library, or if the work is itself a library. The +threshold for this to be true is not precisely defined by law. + + If such an object file uses only numerical parameters, data +structure layouts and accessors, and small macros and small inline +functions (ten lines or less in length), then the use of the object +file is unrestricted, regardless of whether it is legally a derivative +work. (Executables containing this object code plus portions of the +Library will still fall under Section 6.) + + Otherwise, if the work is a derivative of the Library, you may +distribute the object code for the work under the terms of Section 6. +Any executables containing that work also fall under Section 6, +whether or not they are linked directly with the Library itself. + + 6. As an exception to the Sections above, you may also combine or +link a "work that uses the Library" with the Library to produce a +work containing portions of the Library, and distribute that work +under terms of your choice, provided that the terms permit +modification of the work for the customer's own use and reverse +engineering for debugging such modifications. + + You must give prominent notice with each copy of the work that the +Library is used in it and that the Library and its use are covered by +this License. You must supply a copy of this License. If the work +during execution displays copyright notices, you must include the +copyright notice for the Library among them, as well as a reference +directing the user to the copy of this License. Also, you must do one +of these things: + + a) Accompany the work with the complete corresponding + machine-readable source code for the Library including whatever + changes were used in the work (which must be distributed under + Sections 1 and 2 above); and, if the work is an executable linked + with the Library, with the complete machine-readable "work that + uses the Library", as object code and/or source code, so that the + user can modify the Library and then relink to produce a modified + executable containing the modified Library. (It is understood + that the user who changes the contents of definitions files in the + Library will not necessarily be able to recompile the application + to use the modified definitions.) + + b) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (1) uses at run time a + copy of the library already present on the user's computer system, + rather than copying library functions into the executable, and (2) + will operate properly with a modified version of the library, if + the user installs one, as long as the modified version is + interface-compatible with the version that the work was made with. + + c) Accompany the work with a written offer, valid for at + least three years, to give the same user the materials + specified in Subsection 6a, above, for a charge no more + than the cost of performing this distribution. + + d) If distribution of the work is made by offering access to copy + from a designated place, offer equivalent access to copy the above + specified materials from the same place. + + e) Verify that the user has already received a copy of these + materials or that you have already sent this user a copy. + + For an executable, the required form of the "work that uses the +Library" must include any data and utility programs needed for +reproducing the executable from it. However, as a special exception, +the materials to be distributed need not include anything that is +normally distributed (in either source or binary form) with the major +components (compiler, kernel, and so on) of the operating system on +which the executable runs, unless that component itself accompanies +the executable. + + It may happen that this requirement contradicts the license +restrictions of other proprietary libraries that do not normally +accompany the operating system. Such a contradiction means you cannot +use both them and the Library together in an executable that you +distribute. + + 7. You may place library facilities that are a work based on the +Library side-by-side in a single library together with other library +facilities not covered by this License, and distribute such a combined +library, provided that the separate distribution of the work based on +the Library and of the other library facilities is otherwise +permitted, and provided that you do these two things: + + a) Accompany the combined library with a copy of the same work + based on the Library, uncombined with any other library + facilities. This must be distributed under the terms of the + Sections above. + + b) Give prominent notice with the combined library of the fact + that part of it is a work based on the Library, and explaining + where to find the accompanying uncombined form of the same work. + + 8. You may not copy, modify, sublicense, link with, or distribute +the Library except as expressly provided under this License. Any +attempt otherwise to copy, modify, sublicense, link with, or +distribute the Library is void, and will automatically terminate your +rights under this License. However, parties who have received copies, +or rights, from you under this License will not have their licenses +terminated so long as such parties remain in full compliance. + + 9. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Library or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Library (or any work based on the +Library), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Library or works based on it. + + 10. Each time you redistribute the Library (or any work based on the +Library), the recipient automatically receives a license from the +original licensor to copy, distribute, link with or modify the Library +subject to these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties with +this License. + + 11. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Library at all. For example, if a patent +license would not permit royalty-free redistribution of the Library by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Library. + +If any portion of this section is held invalid or unenforceable under any +particular circumstance, the balance of the section is intended to apply, +and the section as a whole is intended to apply in other circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 12. If the distribution and/or use of the Library is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Library under this License may add +an explicit geographical distribution limitation excluding those countries, +so that distribution is permitted only in or among countries not thus +excluded. In such case, this License incorporates the limitation as if +written in the body of this License. + + 13. The Free Software Foundation may publish revised and/or new +versions of the Lesser General Public License from time to time. +Such new versions will be similar in spirit to the present version, +but may differ in detail to address new problems or concerns. + +Each version is given a distinguishing version number. If the Library +specifies a version number of this License which applies to it and +"any later version", you have the option of following the terms and +conditions either of that version or of any later version published by +the Free Software Foundation. If the Library does not specify a +license version number, you may choose any version ever published by +the Free Software Foundation. + + 14. If you wish to incorporate parts of the Library into other free +programs whose distribution conditions are incompatible with these, +write to the author to ask for permission. For software which is +copyrighted by the Free Software Foundation, write to the Free +Software Foundation; we sometimes make exceptions for this. Our +decision will be guided by the two goals of preserving the free status +of all derivatives of our free software and of promoting the sharing +and reuse of software generally. + + NO WARRANTY + + 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO +WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. +EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR +OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY +KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE +LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME +THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN +WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY +AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU +FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR +CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE +LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING +RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A +FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF +SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH +DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Libraries + + If you develop a new library, and you want it to be of the greatest +possible use to the public, we recommend making it free software that +everyone can redistribute and change. You can do so by permitting +redistribution under these terms (or, alternatively, under the terms of the +ordinary General Public License). + + To apply these terms, attach the following notices to the library. It is +safest to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least the +"copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +Also add information on how to contact you by electronic and paper mail. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the library, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the + library `Frob' (a library for tweaking knobs) written by James Random Hacker. + + , 1 April 1990 + Ty Coon, President of Vice + +That's all there is to it! + + diff --git a/library/spam/doc/ChangeLog b/library/spam/doc/ChangeLog new file mode 100644 index 0000000000..78a4fc77fc --- /dev/null +++ b/library/spam/doc/ChangeLog @@ -0,0 +1,179 @@ +2010-12-30 Tobias Leupold + + * Release: Version 0.5.1 + + * Bigger changes: + - Fixed some issues with the scope of variables leading to problems when multiple instances of b8 are created. Thanks to Mike Creuzer for the bug report :-) + - Centralized the loading of class definition files in the b8 constructor and created a function to handle the inclusion. + + * b8.php: Return a lexer error code instead of a rating if the lexer failed. The lexer never returned FALSE but b8 checked only for this value to validate the lexer didn't fail. Thanks to Matt Friedman for the bug report :-) + + * lexer/lexer_default.php: A bit of code cleanup: less useless nesting. + + * doc/readme.*: Updated the documentation, added a FAQ. + +2010-06-27 Tobias Leupold + + * Release: Version 0.5-r1 + + * doc/readme.*: Updated the documentation; forgot the newly introduced b8::HAM and b8::SPAM variables. Added some additional information about the storage model. + +2010-06-02 Tobias Leupold + + * Release: Version 0.5 + + * 100.000 Changes (new major release!), at a glance: + - No PHP 4 compatibility anymore. Much cleaner code base with less hacks. + - Completely reworked storage model. The SQL performance increased dramatically, the Berkeley DB performance remains as fast as it always has been. + - Better lexer which can also handle non-latin1 texts in a nice way, so that e. g. Cyrillic or Chinese texts can be classified more performant. + - No config files anymore, multiple instances of b8 can be now created in the same script with different configuration, databases and no problems. + - No spooky administration interface anymore that needs an SQL database, even if Berkeley DB is used (anybody who actually used this?! I never did ;-). + - No "install" scripts and routines and a less end-user compatible documentation. Anybody integrating b8 in his homepage won't be an end-user, will he? + +2009-02-03 Oliver Lillie (aka buggedcom) + + * Revision: 221 (the original PHP 5 port) + + * Rewrote Tobias' original class for optimisation and PHP 5 functionality. + + * Improved database mysql query useage by over ~820% + + * Class is faster, ~20%. + + * Slight increase in memory usage, but it's small and given the advantages of the speed increase and query reduction it's worth it. + + * Removed install code from mysql class and added a sql file. Anyone who wants to use this is generally going to be more advanced anyway and see the sql to install. + +2009-02-03 Tobias Leupold + + * Release: Version 0.4.4 -- changed the license type from GPL to LGPL + +2008-06-27 Tobias Leupold + + * Release: Version 0.4.3 -- no bugs found ... so let's make a release with only small changes ;-) + + * b8.php: Removed debugging messages that were commented out anyway + + * storage/storage_mysql.php: Made it possible to pass both a MySQL-link resource and a table name to b8. This makes b8 useable in the Redaxo CMS (and probably others) + + * doc/readme.htm: Updated documentation accordingly + +2008-02-17 Tobias Leupold + + * Release: Version 0.4.2 + + * interface/backup.php: the bayes*dbversion tag is now written to a database emptied by drop(), so that it will be useable without an error message even if no backup is recovered afterwards. + + * doc/readme.htm: added a security note to the configuration section (htaccess should be used to avoid everybody to be able to see the configuration) + +2007-09-17 Tobias Leupold + + * Release: Version 0.4.1 + + * storage/storage_mysql.php: fixed b8 crashing when getting passed a persistent MySQL resource link. Thanks to Paul Chapman for the bug report :-) + +2007-06-08 Tobias Leupold + + * Release: Version 0.4 + + * Let's go the whole hog. b8's class is now "b8" and no more "bayes", and all internal variables have now according names. + + * Reworked the whole (surprisingly crappy) implementation of b8. No more global() calls, everything happens inside the classes now. Made that whole stuff really object oriented (as good as possible with PHP's poor OOP model ;-). + + * No more PHP code in the configuration files. + + * Created an extra lexer class. This is now also configurable. + + * Storage classes now can create their own databases when this is requested by the configuration. + + * MySQL calls are no random shots anymore: either, a MySQL-link resource is passed to b8 on startup which will be used for the queries, or the class sets up it's own link. Same for SQLite. + + * The interface now uses a separate storage backend capable of SQL. In this way, we _really_ can query the database for e. g. an ordered list of tokens. After doing what we wanted with this work database, the b8 database can be synced with it. + + * Added a lot of verbose error handling. + + * Fixed a dumb error: all tokens from a text were used for the spamminess calculation, because two for() loops both used $i as their counter. D'oh!!! Now, the filter's performance is way better. + + * Catched on the way how that whole math stuff works a little more ;-) Now, the calculation of the single probabilities proposed by Mr. Robinson does a little more the stuff it was intended to do, because ... + + * Made some calculation constants parameters: the number of tokens to use, the default rating for unknown tokens and Gary Robinson's s constant. + + * Introduced an optional minimum deviation that a token's rating must have to be considered in the spamminess calculation. + + * The default extreme ratings for tokens only in ham or spam are now optional. One can also choose to calculate all ratings by Mr. Robinson's method. + + * Noticed that text primary keys are not case sensitive by default in MySQL, which has a noticeable impact on the filter's performance. Informed the MySQL users about that. + + * The whole code sucks much less ;-) b8 should be way more user friendly now. + + * Re-wrote the whole documentation. + + * Fixed the ChangeLog :-) + +2007-02-08 Tobias Leupold + + * Release: Version 0.3.3 again ;-) + + * bayes-php is now b8. See http://www.nasauber.de/blog/text.php?text=58 for details :-) Thanks to Tobias Lang (http://langt.net/) for this cool new name! + +2007-01-05 Tobias Leupold + + * Release: Version 0.3.3 + + * Renamed the internal BerkeleyDB handle from "$db" to the less general name "$bayes_php_db" due to an collision with phpwcms's (http://www.phpwcms.de/) global $db variable and potentially other php programs. + + * Commented out Laurent Goussard's SQLite storage class by default, as it's try { } catch { } calls break PHP 4 + +2006-09-03 Tobias Leupold + + * Release: Version 0.3.2 + + * Laurent Goussard (loranger@free.fr) contributed an SQLite storage class(which needs PHP 5). + + * I finally added my eMail address to the sources ;-) + +2006-07-24 Tobias Leupold + + * Release: Version 0.3.1 + + * Fixed a problem in the unlearn() function: If a text was unlearned that wasn't learned before (accidentaly), it could happen that the count parameter for this text was smaller than 0, breaking the spamminess calulation + +2006-07-02 Tobias Leupold + + * Release: Version 0.3 + + * Improved the get_tokens() function; the filter should now be a lot more performant, especially with short texts + + * Added the "lastseen" parameter for each token to make the database maintainable (outdated tokens can be deleted) + + * Added a real database maintainance interface + +2006-06-12 Tobias Leupold + + * Release: Version 0.2.1 + + * Fixed a problem in get_tokens() (if it was called more than once, tokens were counted more often than they appeared in the text) + + * Slightly enhanced the default index.php interface: after learning a text as Ham or Spam, the rating before and after it is displayed to inform the user about it + +2006-05-21 Tobias Leupold + + * Release: Version 0.2 + + * Comments now in English (to pretend international success of bayes-php ;-) + + * Recommendations of Paul Graham's article "Better Bayesian Filtering" ( http://www.paulgraham.com/better.html ) are now considered: Tokens that only appear in Ham or Spam and not in the other category are rated with 0.9998 or 0.0002 if they were less than 10 times in Ham or Spam and with 0.9999 or 0.0001 if they appeared more that 10 times. This should allow the filter to differentiate spam texts more sharp from ham texts. Also, token "degeneration" as described in the article is performed for unknown tokens to estimate their spamminess. + + * The database connect is now swapped in a separate configuration file, so only this file has to be preserved if bayes-php is updated and only this file has to be changed to configure the script. + +2006-03-29 Tobias Leupold + + * Release: Version 0.1.1 + + * get_tokens() beachtet jetzt auch HTML-Tags und Wörter mit Akzenten und Apostrophen + + * Verschiedene Kleinigkeiten "sauber" gemacht :-) + +2006-03-05 Tobias Leupold + + * Added 2007-06-08: Initial release (Version 0.1) diff --git a/library/spam/doc/readme.htm b/library/spam/doc/readme.htm new file mode 100644 index 0000000000..727d5ae5fe --- /dev/null +++ b/library/spam/doc/readme.htm @@ -0,0 +1,707 @@ + + + + + + +b8: readme + + + + + +
+

b8: readme

+ +++ + + + + + + + + + +
Author:Tobias Leupold
Homepage:http://nasauber.de/
Contact:tobias.leupold@web.de
Date:2010-12-23
+ +
+

1   Description of b8

+
+

1.1   What is b8?

+

b8 is a spam filter implemented in PHP. It is intended to keep your weblog or guestbook spam-free. The filter can be used anywhere in your PHP code and tells you whether a text is spam or not, using statistical text analysis. See How does it work? for details about this. To be able to do this, b8 first has to learn some spam and some ham example texts to decide what's good and what's not. If it makes mistakes classifying unknown texts, they can be corrected and b8 learns from the corrections, getting better with each learned text.

+

At the moment of this writing, b8 has classified 14411 guestbook entries and weblog comments on my homepage since december 2006. 131 were ham. 39 spam texts (0.27 %) have been rated as ham (false negatives), with not even one false positive (ham message classified as spam). This results in a sensitivity of 99.73 % (the probability that a spam text will actually be rated as spam) and a specifity of 100 % (the probability that a ham text will actually be rated as ham) for me. I hope, you'll get the same good results :-)

+

Basically, b8 is a statistical ("Bayesian"[1]) spam filter like Bogofilter or SpamBayes, but it is not intended to classify e-mails. When I started to write b8, I didn't find a good PHP spam filter (or any spam filter that wasn't just some example code how one could implement a Bayesian spam filter in PHP) that was intended to filter weblog or guestbook entries. That's why I had to write my own ;-)
+Caused by it's purpose, the way b8 works is slightly different from most of the Bayesian email spam filters out there. See What's different? if you're interested in the details.

+ + + + + +
[1]A mathematician told me that the math in b8 actually does not use Bayes' theorem but some derived algorithms that are just related to it. So … let's simply believe that and stop claiming b8 was a Bayesian spam filter ;-)
+
+
+

1.2   How does it work?

+

b8 basically uses the math and technique described in Paul Graham's article "A Plan For Spam" [2] to distinguish ham and spam. The improvements proposed in Graham's article "Better Bayesian Filtering" [3] and Gary Robinson's article "Spam Detection" [4] have also been considered. See also the article "A Statistical Approach to the Spam Problem" [5].

+

b8 cuts the text to classify to pieces, extracting stuff like e-mail addresses, links and HTML tags. For each such token, it calculates a single probability for a text containing it being spam, based on what the filter has learned so far. When the token was not seen before, b8 tries to find similar ones using the "degeneration" described in [3] and uses the most relevant value found. If really nothing is found, b8 assumes a default rating for this token for the further calculations.
+Then, b8 takes the most relevant values (which have a rating far from 0.5, which would mean we don't know what it is) and calculates the probability that the whole text is spam by the inverse chi-square function described in [4]. +There are some parameters that can be set which influence the filter's behaviour (see below).

+

In short words: you give b8 a text and it returns a value between 0 and 1, saying it's ham when it's near 0 and saying it's spam when it's near 1.

+
+
+

1.3   What do I need for it?

+

Not much! You just need PHP 5 on the server where b8 will be used (b8 version 0.5 finally dropped PHP 4 compatibility – thankfully ;-) and a proper storage possibility for the wordlists. I strongly recommend using Berkeley DB. See below how you can check if you can use it and why you should use it. If the server's PHP wasn't compiled with Berkeley DB support, a MySQL table can be used alternatively.

+
+
+

1.4   What's different?

+

b8 is designed to classify weblog or guestbook entries, not e-mails. For this reason, it uses a slightly different technique than most of the other statistical spam filters out there use.

+

My experience was that spam entries on my weblog or guestbook were often quite short, sometimes just something like "123abc" as text and a link to a suspect homepage. Some spam bots don't even made a difference between e. g. the "name" and "text" fields and posted their text as email address, for example. Considering this, b8 just takes one string to classify, making no difference between "headers" and "text".
+The other thing is that most statistical spam filters count one token one time, no matter how often it appears in the text (as Graham describes it in [2]). b8 does count how often a token was seen and learns or considers this. Additionally, the number of learned ham and spam texts are saved and used as the calculation base for the single probabilities. Why this? Because a text containing one link (no matter where it points to, just indicated by a "http://" or a "www.") might not be spam, but a text containing 20 links might be.

+

This means that b8 might be good for classifying weblog or guestbook entries (I really think it is ;-) – but very likely, it will work quite poor when being used for something else (like classifying e-mails). But as said above, for this task, there are a lot of very good filters out there to choose from.

+
+
+
+

2   Update from prior versions

+

If this is a new b8 installation, read on at the Installation section!

+
+

2.1   Update from bayes-php version 0.2.1 or earlier

+

Please first follow the database update instructions of the bayes-php-0.3 release if you update from a version prior to bayes-php-0.3 and then read the following paragraph about updating from a version <0.3.3.

+
+
+

2.2   Update from bayes-php version 0.3 or later

+
+
You use Berkeley DB?
+
Everything's fine, you can simply continue using your database.
+
You use MySQL?
+
The CREATE statement of b8's wordlist has changed. The best is probably to create a dump via your favorite administration tool or script, create the new table and re-insert all data. The layout is still the same: there's one "token" column and one "data" column. Having done that, you can keep using your data.
+
You use SQLite?
+
Sorry, at the moment, there's no SQLite backend for b8. But we're working on it :-)
+
+

The configuration model of b8 has changed. Please read through the Configuration section and update your configuration accordingly.

+

b8's lexer has been partially re-written. It should now be able to handle all kind of non-latin-1 input, like cyrillic, chinese or japanese texts. Caused by this fact, much more tokens will be recognized when classifying such texts. Therefore, you could get different results in b8's ratings, even if the same database is used and although the math is still the same.

+

b8 0.5 introduced two constants that can be used in the learn() and unlearn() functions: b8::HAM and b8::SPAM. The literal values "ham" and "spam" can still be used anyway.

+
+
+
+

3   Installation

+

Installing b8 on your server is quite easy. You just have to provide the needed files. To do this, you could just upload the whole b8 subdirectory to the base directory of your homepage. It contains the filter itself and all needed backend classes. The other directories (doc, example and install) are not used by b8.

+

That's it ;-)

+
+
+

4   Configuration

+

The configuration is passed as arrays when instantiating a new b8 object. Two arrays can be passed to b8, one containing b8's base configuration and some settings for the lexer (which should be common for all lexer classes, in case some other lexer than the default one will be written one day) and one for the storage backend.
+You can have a look at example/index.php to see how this can be done. Using b8 in your scripts also shows example code showing how b8 can be included in a PHP script.

+

Not all values have to be set. When some values are missing, the default ones will be used. If you do use the default settings, you don't have to pass them to b8.

+
+

4.1   b8's base configuration

+

All these values can be set in the "config_b8" array (the first parameter) passed to b8. The name of the array doesn't matter (of course), it just has to be the first argument.

+

These are some basic settings telling b8 which backend classes to use:

+
+
+
storage
+

This defines which storage backend will be used to save b8's wordlist. Currently, two backends are available: Berkeley DB (dba) and MySQL (mysql). At the moment, b8 does not support SQLite (as the previous version did), but it will be (hopefully) re-added in one of the next releases. The default is dba (string).

+
+
Berkeley DB
+
This is the preferred storage backend. It was the original backend for the filter and remains the most performant. b8's storage model is optimized for this database, as it is really fast and fits perfectly to what the filter needs to do the job. All content is saved in a single file, you don't need special user rights or a database server.
+If you don't know whether your server's PHP can use a Berkeley DB, simply run the script install/setup_berkeleydb.php. If it shows a Berkeley DB handler, please use this backend.
+
MySQL
+
As some webspace hosters don't allow using a Berkeley DB (but please be sure to check if you can use it!), but most do provide a MySQL server, using a MySQL table for the wordlist is provided as an alternative storage method. As said above, b8 was always intended to use a Berkeley DB. It doesn't use or need SQL to query the database. So, very likely, this will work less performant, produce a lot of unnecessary overhead and waste computing power. But it will do fine anyway!
+
+

See Configuration of the storage backend for the settings of the chosen backend.

+
+
degenerator
+
The degenerator class to be used. See How does it work? and [3] if you're interested in what "degeneration" is. Defaults to default (string). At the moment, only one degenerator exists, so you probably don't want to change this unless you have written your own degenerator.
+
lexer
+

The lexer class to be used. Defaults to default (string). At the moment, only one lexer exists, so you probably don't want to change this unless you have written your own lexer.

+

The behaviour of the lexer can be additionally configured with the following variables:

+
+
+
min_size
+
The minimal length for a token to be considered when calculating the rating of a text. Defaults to 3 (integer).
+
max_size
+
The maximal length for a token to be considered when calculating the rating of a text. Defaults to 30 (integer).
+
allow_numbers
+
Should pure numbers also be considered? Defaults to FALSE (boolean).
+
+
+
+
+
+

The following settings influence the mathematical internals of b8. If you want to experiment, feel free to play around with them; but be warned: wrong settings of these values will result in poor performance or could even "short-circuit" the filter.
+Leave these values as they are unless you know what you are doing!

+

The "Statistical discussion about b8" [6] shows why the default values are the default ones.

+
+
+
use_relevant
+
This tells b8 how many tokens should be used when calculating the spamminess of a text. The default setting is 15 (integer). This seems to be a quite reasonable value. When using to many tokens, the filter will fail on texts filled with useless stuff or with passages from a newspaper, etc. not being very spammish.
+The tokens counted multiple times (see above) are added in addition to this value. They don't replace other ratings.
+
min_dev
+
This defines a minimum deviation from 0.5 that a token's rating must have to be considered when calculating the spamminess. Tokens with a rating closer to 0.5 than this value will simply be skipped.
+If you don't want to use this feature, set this to 0. Defaults to 0.2 (float). Read [6] before increasing this.
+
rob_x
+
This is Gary Robinson's x constant (cf. [4]). A completely unknown token will be rated with the value of rob_x. The default 0.5 (float) seems to be quite reasonable, as we can't say if a token that also can't be rated by degeneration is good or bad.
+If you receive much more spam than ham or vice versa, you could change this setting accordingly.
+
rob_s
+
This is Gary Robinson's s constant. This is essentially the probability that the rob_x value is correct for a completely unknown token. It will also shift the probability of rarely seen tokens towards this value. The default is 0.3 (float)
+See [4] for a closer description of the s constant and read [6] for specific information about this constant in b8's algorithms.
+
+
+
+
+

4.2   Configuration of the storage backend

+

All the following values can be set in the "config_database" array (the second parameter) passed to b8. The name of the array doesn't matter (of course), it just has to be the second argument.

+
+

4.2.1   Settings for the Berkeley DB (DBA) backend

+
+
database
+
The filename of the database file, relative to the location of b8.php. Defaults to wordlist.db (string).
+
handler
+
The DBA handler to use (cf. the PHP documentation and Setting up a new Berkeley DB). Defaults to db4 (string).
+
+
+
+

4.2.2   Settings for the MySQL backend

+
+
database
+
The database containing b8's wordlist table. Defaults to b8_wordlist (string).
+
table_name
+
The table containing b8's wordlist. Defaults to b8_wordlist (string).
+
host
+
The host of the MySQL server. Defaults to localhost (string).
+
user
+
The user name used to open the database connection. Defaults to FALSE (boolean).
+
pass
+
The password required to open the database connection. Defaults to FALSE (boolean).
+
connection
+
An existing MySQL link-resource that can be used by b8. Defaults to NULL (NULL).
+
+
+
+
+
+

5   Using b8

+

Now, that everything is configured, you can start to use b8. A sample script that shows what can be done with the filter exists in example/index.php. The best thing for testing how all this works is to use this script before using b8 in your own scripts.

+

Before you can start, you have to setup a database so that b8 can store a wordlist.

+
+

5.1   Setting up a new database

+
+

5.1.1   Setting up a new Berkeley DB

+

I wrote a script to setup a new Berkeley DB for b8. It is located in install/setup_berkeleydb.php. Just run this script on your server and be sure that the directory containing it has the proper access rights set so that the server's HTTP server user or PHP user can create a new file in it (probably 0777). The script is quite self-explaining, just run it.

+

Of course, you can also create a Berkeley DB by hand. In this case, you just have to insert three keys:

+
+bayes*dbversion  => 2
+bayes*texts.ham  => 0
+bayes*texts.spam => 0
+
+

Be sure to set the right DBA handler in the storage backend configuration if it's not db4.

+
+
+

5.1.2   Setting up a new MySQL table

+

The SQL file install/setup_mysql.sql contains both the create statement for the wordlist table of b8 and the INSERT statements for adding the necessary internal variables.

+

Simply change the table name according to your needs (or leave it as it is ;-) and run the SQL to setup a b8 wordlist MySQL table.

+
+
+
+

5.2   Using b8 in your scripts

+

Just have a look at the example script located in example/index.php to see how you can include b8 in your scripts. Essentially, this strips down to:

+
+# Include the b8 code
+require "{$_SERVER['DOCUMENT_ROOT']}/b8/b8.php";
+
+# Do some configuration
+
+$config_b8 = array(
+        'some_key' => 'some_value',
+        'foo' => 'bar'
+);
+
+$config_database = array(
+        'some_key' => 'some_value',
+        'foo' => 'bar'
+);
+
+# Create a new b8 instance
+$b8 = new b8($config_b8, $config_database);
+
+

b8 provides three functions in an object oriented way (called e. g. via $b8->classify($text)):

+
+
learn($text, $category)
+
This saves the reference text $text (string) in the category $category (b8 constant).
+b8 0.5 introduced two constants that can be used as $category: b8::HAM and b8::SPAM. To be downward compatible with older versions of b8, the literal values "ham" and "spam" (case-sensitive strings) can still be used here.
+
unlearn($text, $category)
+
This function just exists to delete a text from a category in which is has been stored accidentally before. It deletes the reference text $text (string) from the category $category (either the constants b8::HAM or b8::SPAM or the literal case-sensitive strings "ham" or "spam" – cf. above).
+Don't delete a spam text from ham after saving it in spam or vice versa, as long you don't have stored it accidentally in the wrong category before! This will not improve performance, quite the opposite: it will actually break the filter after a time, as the counter for saved ham or spam texts will reach 0, although you have ham or spam tokens stored: the filter will try to remove texts from the ham or spam data which have never been stored there, decrease the counter for tokens which are found just skip the non-existing words.
+
classify($text)
+
This function takes the text $text (string), calculates it's probability for being spam it and returns a value between 0 and 1 (float).
+A value close to 0 says the text is more likely ham and a value close to 1 says the text is more likely spam. What to do with this value is your business ;-) See also Tips on operation below.
+
+
+
+
+

6   Tips on operation

+

Before b8 can decide whether a text is spam or ham, you have to tell it what you consider as spam or ham. At least one learned spam or one learned ham text is needed to calculate anything. To get good ratings, you need both learned ham and learned spam texts, the more the better.
+What's considered as "ham" or "spam" can be very different, depending on the operation site. On my homepage, practically each and every text posted in English or using cyrillic letters is spam. On an English or Russian homepage, this will be not the case. So I think it's not really meaningful to provide some "spam data" to start. Just train b8 with "your" spam and ham.

+

For the practical use, I advise to give the filter all data availible. E. g. name, email address, homepage, IP address und of course the text itself should be stored in a variable (e. g. separated with an \n or just a space or tab after each block) and then be classified. The learning should also be done with all data availible.
+Saving the IP address is probably only meaningful for spam entries, because spammers often use the same IP address multiple times. In principle, you can leave out the IP of ham entries.

+

You can use b8 e. g. in a guestbook script and let it classify the text before saving it. Everyone has to decide which rating is necessary to classify a text as "spam", but a rating of >= 0.8 seems to be reasonable for me. If one expects the spam to be in another language that the ham entries or the spams are very short normally, one could also think about a limit of 0.7.
+The email filters out there mostly use > 0.9 or even > 0.99; but keep in mind that they have way more data to analyze in most of the cases. A guestbook entry may be quite short, especially when it's spam.

+

In my opinion, a autolearn function is very handy. I save spam messages with a rating higher than 0.7 but less than 0.9 automatically as spam. I don't do this with ham messages in an automated way to prevent the filter from saving a false negative as ham and then classifying and learning all the spam as ham when I'm on holidays ;-)

+
+
+

7   Closing

+

So … that's it. Thanks for using b8! If you find a bug or have an idea how to make b8 better, let me know. I'm also always looking forward to get e-mails from people using b8 on their homepages :-)

+
+
+

8   References

+ + + + + +
[2](1, 2) Paul Graham, A Plan For Spam (http://paulgraham.com/spam.html)
+ + + + + +
[3](1, 2, 3) Paul Graham, Better Bayesian Filtering (http://paulgraham.com/better.html)
+ + + + + +
[4](1, 2, 3, 4) Gary Robinson, Spam Detection (http://radio.weblogs.com/0101454/stories/2002/09/16/spamDetection.html)
+ + + + + +
[5]A Statistical Approach to the Spam Problem (http://linuxjournal.com/article/6467)
+ + + + + +
[6](1, 2, 3) Tobias Leupold, Statistical discussion about b8 (http://nasauber.de/opensource/b8/discussion/)
+
+
+

9   Appendix

+
+

9.1   FAQ

+
+

9.1.1   What about more than two categories?

+

I wrote b8 with the KISS principle in mind. For the "end-user", we have a class with almost no setup to do that can do three things: classify a text, learn a text and un-learn a text. Normally, there's no need to un-learn a text, so essentially, there are only two functions we need.
+This simplicity is only possible because b8 only knows two categories (normally "Ham" and "Spam" or some other category pair) and tells you, in one float number between 0 and 1, if a given texts rather fits in the first or the second category. If we would support multiple categories, more work would have to be done and things would become more complicated. One would have to setup the categories, have another database layout (perhaps making it mandatory to have SQL) and one float number would not be sufficient to describe b8's output, so more code would be needed – even outside of b8.

+

All the code, the database layout and particularly the math is intended to do exactly one thing: distinguish between two categories. I think it would be a lot of work to change b8 so that it would support more than two categories. Probably, this is possible to do, but don't ask me in which way we would have to change the math to get multiple-category support – I'm a dentist, not a mathematician ;-)
+Apart from this I do believe that most people using b8 don't want or need multiple categories. They just want to know if a text is spam or not, don't they? I do, at least ;-)

+

But let's think about the multiple-category thing. How would we calculate a rating for more than two categories? If we had a third one, let's call it "Treet", how would we calculate a rating? We could calculate three different ratings. One for "Ham", one for "Spam" and one for "Treet" and choose the highest one to tell the user what category fits best for the text. This could be done by using a small wrapper script using three instances of b8 as-is and three different databases, each containing texts being "Ham", "Spam", "Treet" and the respective counterparts.
+But here's the problem: if we have "Ham" and "Spam", "Spam" is the counterpart of "Ham". But what's the counterpart of "Spam" if we have more than one additional category? Where do the "Non-Ham", "Non-Spam" and "Non-Treet" texts come from?

+

Another approach, a direct calculation of more than two probabilities (the "Ham" probability is simply 1 minus the "Spam" probability, so we actually get two probabilities with the return value of b8) out of one database would require big changes in b8's structure and math.

+

There's a project called PHPNaiveBayesianFilter which supports multiple categories by default. The author calls his software "Version 1.0", but I think this is the very first release, not a stable or mature one. The most recent change of that release dates back to 2003 according to the "changed" date of the files inside the zip archive, so probably, this project is dead or has never been alive and under active development at all.
+Actually, I played around with that code but the results weren't really good, so I decided to write my own spam filter from scratch back in early 2006 ;-)

+

All in all, there seems to be no easy way to implement multiple (meaning more than two) categories using b8's current code base and probably, b8 will never support more than two categories. Perhaps, a fork or a complete re-write would be better than implementing such a feature. Anyway, I don't close my mind to multiple categories in b8. Feel free to tell me how multiple categories could be implementented in b8 or how a multiple-category version using the same code base (sharing a common abstract class?) could be written.

+
+
+

9.1.2   What about a list with words to ignore?

+

Some people suggested to introduce a list with words that b8 will simply ignore. Like "and", "or", "the", and so on. I don't think this is very meaningful.

+

First, it would just work for the particular language that has been stored in the list. Speaking of my homepage, most of my spam is English, almost all my ham is German. So I would have to maintain a list with the probably less interesting words for at least two languages. Additionally, I get spam in Chinese, Japanese and Cyrillic writing or something else I can't read as well. What word should be ignored in those texts?
+Second, why should we ever exclude words? Who tells us those words are actually meaningless? If a word appears both in ham and spam, it's rating will be near 0.5 and so, it won't be used for the final calculation if a appropriate minimum deviation was set. So b8 will exclude it anyway without any blacklist. And think of this: if we excluded a word of which we only think it doesn't mean anything but it actually does appear more often in ham or spam, the results will get even worse.

+

So why should we care about things we do not have to care about? ;-)

+
+
+

9.1.3   Why is it called "b8"?

+

The initial name for the filter was (damn creative!) "bayes-php". There were two main reasons for searching another name: 1. "bayes-php" sucks. 2. the PHP License says the PHP guys do not like when the name of a script written in PHP contains the word "PHP". Read the License FAQ for a reasonable argumentation about this.

+

Luckily, Tobias Lang proposed the new name "b8". And these are the reasons why I chose this name:

+
    +
  • "bayes-php" is a "b" followed by 8 letters.
  • +
  • "b8" is short and handy. Additionally, there was no program with the name "b8" or "bate"
  • +
  • The English verb "to bate" means "to decrease" – and that's what b8 does: it decreases the number of spam entries in your weblog or guestbook!
  • +
  • "b8" just sounds way cooler than "bayes-php" ;-)
  • +
+
+
+
+

9.2   About the database

+
+

9.2.1   The database layout

+

The database layout is quite simple. It's just key:value for everything stored. There are three "internal" variables stored as normal tokens (but all containing a * which is always used as a split character by the lexer, so we can't get collisions):

+
+
bayes*dbversion
+
This indicates the database's "version". The first versions of b8 did not set this. Version "2" indicates that we have a database created by a b8 version already storing the "lastseen" parameter.
+
bayes*texts.ham
+
The number of ham texts learned.
+
bayes*texts.spam
+
The number of spam texts learned.
+
+

Each "normal" token is stored with it's literal name as the key and it's data as the value. The data consists of the count of the token in all ham and spam texts and the date when the token was used the last time, all in one string and separated by spaces. So we have the following scheme:

+
+"token" => "count_ham count_spam lastseen"
+
+
+
+

9.2.2   The "lastseen" parameter

+

Somebody looking at the code might be wondering why b8 stores this "lastseen" parameter. This value is not used for any calculation at the moment. Initially, it was intended to keep the database maintainable in a way that "old" data could be removed. When e. g. a token only appeared once in ham or spam and has not been seen for a year, one could simply delete it from the database.
+I actually never used this feature (does anybody?). So probably, some changes will be done to this one day. Perhaps, I find a way to include this data in the spamminess calculation in a meaningful way, or at least for some statistics. One could also make this optional to keep the calculation effort small if this is needed.

+

Feel free to send me any suggestions about this!

+
+
+
+
+ + diff --git a/library/spam/doc/readme.rst b/library/spam/doc/readme.rst new file mode 100644 index 0000000000..451b28326b --- /dev/null +++ b/library/spam/doc/readme.rst @@ -0,0 +1,371 @@ +========== +b8: readme +========== + +:Author: Tobias Leupold +:Homepage: http://nasauber.de/ +:Contact: tobias.leupold@web.de +:Date: |date| + +.. contents:: Table of Contents + +Description of b8 +================= + +What is b8? +----------- + +b8 is a spam filter implemented in `PHP `__. It is intended to keep your weblog or guestbook spam-free. The filter can be used anywhere in your PHP code and tells you whether a text is spam or not, using statistical text analysis. See `How does it work?`_ for details about this. To be able to do this, b8 first has to learn some spam and some ham example texts to decide what's good and what's not. If it makes mistakes classifying unknown texts, they can be corrected and b8 learns from the corrections, getting better with each learned text. + +At the moment of this writing, b8 has classified 14411 guestbook entries and weblog comments on my homepage since december 2006. 131 were ham. 39 spam texts (0.27 %) have been rated as ham (false negatives), with not even one false positive (ham message classified as spam). This results in a sensitivity of 99.73 % (the probability that a spam text will actually be rated as spam) and a specifity of 100 % (the probability that a ham text will actually be rated as ham) for me. I hope, you'll get the same good results :-) + +Basically, b8 is a statistical ("Bayesian"[#]_) spam filter like `Bogofilter `__ or `SpamBayes `__, but it is not intended to classify e-mails. When I started to write b8, I didn't find a good PHP spam filter (or any spam filter that wasn't just some example code how one *could* implement a Bayesian spam filter in PHP) that was intended to filter weblog or guestbook entries. That's why I had to write my own ;-) |br| +Caused by it's purpose, the way b8 works is slightly different from most of the Bayesian email spam filters out there. See `What's different?`_ if you're interested in the details. + +.. [#] A mathematician told me that the math in b8 actually does not use Bayes' theorem but some derived algorithms that are just related to it. So … let's simply believe that and stop claiming b8 was a *Bayesian* spam filter ;-) + +How does it work? +----------------- + +b8 basically uses the math and technique described in Paul Graham's article "A Plan For Spam" [#planforspam]_ to distinguish ham and spam. The improvements proposed in Graham's article "Better Bayesian Filtering" [#betterbayesian]_ and Gary Robinson's article "Spam Detection" [#spamdetection]_ have also been considered. See also the article "A Statistical Approach to the Spam Problem" [#statisticalapproach]_. + +b8 cuts the text to classify to pieces, extracting stuff like e-mail addresses, links and HTML tags. For each such token, it calculates a single probability for a text containing it being spam, based on what the filter has learned so far. When the token was not seen before, b8 tries to find similar ones using the "degeneration" described in [#betterbayesian]_ and uses the most relevant value found. If really nothing is found, b8 assumes a default rating for this token for the further calculations. |br| +Then, b8 takes the most relevant values (which have a rating far from 0.5, which would mean we don't know what it is) and calculates the probability that the whole text is spam by the inverse chi-square function described in [#spamdetection]_. +There are some parameters that can be set which influence the filter's behaviour (see below). + +In short words: you give b8 a text and it returns a value between 0 and 1, saying it's ham when it's near 0 and saying it's spam when it's near 1. + +What do I need for it? +---------------------- + +Not much! You just need PHP 5 on the server where b8 will be used (b8 version 0.5 finally dropped PHP 4 compatibility – thankfully ;-) and a proper storage possibility for the wordlists. I strongly recommend using `Berkeley DB `_. See below how you can check if you can use it and why you should use it. If the server's PHP wasn't compiled with Berkeley DB support, a `MySQL `_ table can be used alternatively. + +What's different? +----------------- + +b8 is designed to classify weblog or guestbook entries, not e-mails. For this reason, it uses a slightly different technique than most of the other statistical spam filters out there use. + +My experience was that spam entries on my weblog or guestbook were often quite short, sometimes just something like "123abc" as text and a link to a suspect homepage. Some spam bots don't even made a difference between e. g. the "name" and "text" fields and posted their text as email address, for example. Considering this, b8 just takes one string to classify, making no difference between "headers" and "text". |br| +The other thing is that most statistical spam filters count one token one time, no matter how often it appears in the text (as Graham describes it in [#planforspam]_). b8 does count how often a token was seen and learns or considers this. Additionally, the number of learned ham and spam texts are saved and used as the calculation base for the single probabilities. Why this? Because a text containing one link (no matter where it points to, just indicated by a "\h\t\t\p\:\/\/" or a "www.") might not be spam, but a text containing 20 links might be. + +This means that b8 might be good for classifying weblog or guestbook entries (I really think it is ;-) – but very likely, it will work quite poor when being used for something else (like classifying e-mails). But as said above, for this task, there are a lot of very good filters out there to choose from. + +Update from prior versions +========================== + +If this is a new b8 installation, read on at the `Installation`_ section! + +Update from bayes-php version 0.2.1 or earlier +---------------------------------------------- + +Please first follow the database update instructions of the bayes-php-0.3 release if you update from a version prior to bayes-php-0.3 and then read the following paragraph about updating from a version <0.3.3. + +Update from bayes-php version 0.3 or later +------------------------------------------ + +**You use Berkeley DB?** + Everything's fine, you can simply continue using your database. + +**You use MySQL?** + The ``CREATE`` statement of b8's wordlist has changed. The best is probably to create a dump via your favorite administration tool or script, create the new table and re-insert all data. The layout is still the same: there's one "token" column and one "data" column. Having done that, you can keep using your data. + +**You use SQLite?** + Sorry, at the moment, there's no SQLite backend for b8. But we're working on it :-) + +The configuration model of b8 has changed. Please read through the `Configuration`_ section and update your configuration accordingly. + +b8's lexer has been partially re-written. It should now be able to handle all kind of non-latin-1 input, like cyrillic, chinese or japanese texts. Caused by this fact, much more tokens will be recognized when classifying such texts. Therefore, you could get different results in b8's ratings, even if the same database is used and although the math is still the same. + +b8 0.5 introduced two constants that can be used in the ``learn()`` and ``unlearn()`` functions: ``b8::HAM`` and ``b8::SPAM``. The literal values "ham" and "spam" can still be used anyway. + +Installation +============ + +Installing b8 on your server is quite easy. You just have to provide the needed files. To do this, you could just upload the whole ``b8`` subdirectory to the base directory of your homepage. It contains the filter itself and all needed backend classes. The other directories (``doc``, ``example`` and ``install``) are not used by b8. + +That's it ;-) + +Configuration +============= + +The configuration is passed as arrays when instantiating a new b8 object. Two arrays can be passed to b8, one containing b8's base configuration and some settings for the lexer (which should be common for all lexer classes, in case some other lexer than the default one will be written one day) and one for the storage backend. |br| +You can have a look at ``example/index.php`` to see how this can be done. `Using b8 in your scripts`_ also shows example code showing how b8 can be included in a PHP script. + +Not all values have to be set. When some values are missing, the default ones will be used. If you do use the default settings, you don't have to pass them to b8. + +b8's base configuration +----------------------- + +All these values can be set in the "config_b8" array (the first parameter) passed to b8. The name of the array doesn't matter (of course), it just has to be the first argument. + +These are some basic settings telling b8 which backend classes to use: + + **storage** + This defines which storage backend will be used to save b8's wordlist. Currently, two backends are available: `Berkeley DB `_ (``dba``) and `MySQL `_ (``mysql``). At the moment, b8 does not support `SQLite `_ (as the previous version did), but it will be (hopefully) re-added in one of the next releases. The default is ``dba`` (string). + + *Berkeley DB* + This is the preferred storage backend. It was the original backend for the filter and remains the most performant. b8's storage model is optimized for this database, as it is really fast and fits perfectly to what the filter needs to do the job. All content is saved in a single file, you don't need special user rights or a database server. |br| + If you don't know whether your server's PHP can use a Berkeley DB, simply run the script ``install/setup_berkeleydb.php``. If it shows a Berkeley DB handler, please use this backend. + + *MySQL* + As some webspace hosters don't allow using a Berkeley DB (but please be sure to check if you can use it!), but most do provide a MySQL server, using a MySQL table for the wordlist is provided as an alternative storage method. As said above, b8 was always intended to use a Berkeley DB. It doesn't use or need SQL to query the database. So, very likely, this will work less performant, produce a lot of unnecessary overhead and waste computing power. But it will do fine anyway! + + See `Configuration of the storage backend`_ for the settings of the chosen backend. + + **degenerator** + The degenerator class to be used. See `How does it work?`_ and [#betterbayesian]_ if you're interested in what "degeneration" is. Defaults to ``default`` (string). At the moment, only one degenerator exists, so you probably don't want to change this unless you have written your own degenerator. + + **lexer** + The lexer class to be used. Defaults to ``default`` (string). At the moment, only one lexer exists, so you probably don't want to change this unless you have written your own lexer. + + The behaviour of the lexer can be additionally configured with the following variables: + + **min_size** + The minimal length for a token to be considered when calculating the rating of a text. Defaults to ``3`` (integer). + + **max_size** + The maximal length for a token to be considered when calculating the rating of a text. Defaults to ``30`` (integer). + + **allow_numbers** + Should pure numbers also be considered? Defaults to ``FALSE`` (boolean). + +The following settings influence the mathematical internals of b8. If you want to experiment, feel free to play around with them; but be warned: wrong settings of these values will result in poor performance or could even "short-circuit" the filter. |br| +Leave these values as they are unless you know what you are doing! + +The "Statistical discussion about b8" [#b8statistic]_ shows why the default values are the default ones. + + **use_relevant** + This tells b8 how many tokens should be used when calculating the spamminess of a text. The default setting is ``15`` (integer). This seems to be a quite reasonable value. When using to many tokens, the filter will fail on texts filled with useless stuff or with passages from a newspaper, etc. not being very spammish. |br| + The tokens counted multiple times (see above) are added in addition to this value. They don't replace other ratings. + + **min_dev** + This defines a minimum deviation from 0.5 that a token's rating must have to be considered when calculating the spamminess. Tokens with a rating closer to 0.5 than this value will simply be skipped. |br| + If you don't want to use this feature, set this to ``0``. Defaults to ``0.2`` (float). Read [#b8statistic]_ before increasing this. + + **rob_x** + This is Gary Robinson's *x* constant (cf. [#spamdetection]_). A completely unknown token will be rated with the value of ``rob_x``. The default ``0.5`` (float) seems to be quite reasonable, as we can't say if a token that also can't be rated by degeneration is good or bad. |br| + If you receive much more spam than ham or vice versa, you could change this setting accordingly. + + **rob_s** + This is Gary Robinson's *s* constant. This is essentially the probability that the *rob_x* value is correct for a completely unknown token. It will also shift the probability of rarely seen tokens towards this value. The default is ``0.3`` (float) |br| + See [#spamdetection]_ for a closer description of the *s* constant and read [#b8statistic]_ for specific information about this constant in b8's algorithms. + +Configuration of the storage backend +------------------------------------ + +All the following values can be set in the "config_database" array (the second parameter) passed to b8. The name of the array doesn't matter (of course), it just has to be the second argument. + +Settings for the Berkeley DB (DBA) backend +`````````````````````````````````````````` +**database** + The filename of the database file, relative to the location of ``b8.php``. Defaults to ``wordlist.db`` (string). + +**handler** + The DBA handler to use (cf. `the PHP documentation `_ and `Setting up a new Berkeley DB`_). Defaults to ``db4`` (string). + +Settings for the MySQL backend +`````````````````````````````` + +**database** + The database containing b8's wordlist table. Defaults to ``b8_wordlist`` (string). + +**table_name** + The table containing b8's wordlist. Defaults to ``b8_wordlist`` (string). + +**host** + The host of the MySQL server. Defaults to ``localhost`` (string). + +**user** + The user name used to open the database connection. Defaults to ``FALSE`` (boolean). + +**pass** + The password required to open the database connection. Defaults to ``FALSE`` (boolean). + +**connection** + An existing MySQL link-resource that can be used by b8. Defaults to ``NULL`` (NULL). + +Using b8 +======== + +Now, that everything is configured, you can start to use b8. A sample script that shows what can be done with the filter exists in ``example/index.php``. The best thing for testing how all this works is to use this script before using b8 in your own scripts. + +Before you can start, you have to setup a database so that b8 can store a wordlist. + +Setting up a new database +------------------------- + +Setting up a new Berkeley DB +```````````````````````````` + +I wrote a script to setup a new Berkeley DB for b8. It is located in ``install/setup_berkeleydb.php``. Just run this script on your server and be sure that the directory containing it has the proper access rights set so that the server's HTTP server user or PHP user can create a new file in it (probably ``0777``). The script is quite self-explaining, just run it. + +Of course, you can also create a Berkeley DB by hand. In this case, you just have to insert three keys: + +:: + + bayes*dbversion => 2 + bayes*texts.ham => 0 + bayes*texts.spam => 0 + +Be sure to set the right DBA handler in the storage backend configuration if it's not ``db4``. + +Setting up a new MySQL table +```````````````````````````` + +The SQL file ``install/setup_mysql.sql`` contains both the create statement for the wordlist table of b8 and the ``INSERT`` statements for adding the necessary internal variables. + +Simply change the table name according to your needs (or leave it as it is ;-) and run the SQL to setup a b8 wordlist MySQL table. + +Using b8 in your scripts +------------------------ + +Just have a look at the example script located in ``example/index.php`` to see how you can include b8 in your scripts. Essentially, this strips down to: + +:: + + # Include the b8 code + require "{$_SERVER['DOCUMENT_ROOT']}/b8/b8.php"; + + # Do some configuration + + $config_b8 = array( + 'some_key' => 'some_value', + 'foo' => 'bar' + ); + + $config_database = array( + 'some_key' => 'some_value', + 'foo' => 'bar' + ); + + # Create a new b8 instance + $b8 = new b8($config_b8, $config_database); + +b8 provides three functions in an object oriented way (called e. g. via ``$b8->classify($text)``): + +**learn($text, $category)** + This saves the reference text ``$text`` (string) in the category ``$category`` (b8 constant). |br| + b8 0.5 introduced two constants that can be used as ``$category``: ``b8::HAM`` and ``b8::SPAM``. To be downward compatible with older versions of b8, the literal values "ham" and "spam" (case-sensitive strings) can still be used here. + +**unlearn($text, $category)** + This function just exists to delete a text from a category in which is has been stored accidentally before. It deletes the reference text ``$text`` (string) from the category ``$category`` (either the constants ``b8::HAM`` or ``b8::SPAM`` or the literal case-sensitive strings "ham" or "spam" – cf. above). |br| + **Don't delete a spam text from ham after saving it in spam or vice versa, as long you don't have stored it accidentally in the wrong category before!** This will not improve performance, quite the opposite: it will actually break the filter after a time, as the counter for saved ham or spam texts will reach 0, although you have ham or spam tokens stored: the filter will try to remove texts from the ham or spam data which have never been stored there, decrease the counter for tokens which are found just skip the non-existing words. + +**classify($text)** + This function takes the text ``$text`` (string), calculates it's probability for being spam it and returns a value between 0 and 1 (float). |br| + A value close to 0 says the text is more likely ham and a value close to 1 says the text is more likely spam. What to do with this value is *your* business ;-) See also `Tips on operation`_ below. + +Tips on operation +================= + +Before b8 can decide whether a text is spam or ham, you have to tell it what you consider as spam or ham. At least one learned spam or one learned ham text is needed to calculate anything. To get good ratings, you need both learned ham and learned spam texts, the more the better. |br| +What's considered as "ham" or "spam" can be very different, depending on the operation site. On my homepage, practically each and every text posted in English or using cyrillic letters is spam. On an English or Russian homepage, this will be not the case. So I think it's not really meaningful to provide some "spam data" to start. Just train b8 with "your" spam and ham. + +For the practical use, I advise to give the filter all data availible. E. g. name, email address, homepage, IP address und of course the text itself should be stored in a variable (e. g. separated with an ``\n`` or just a space or tab after each block) and then be classified. The learning should also be done with all data availible. |br| +Saving the IP address is probably only meaningful for spam entries, because spammers often use the same IP address multiple times. In principle, you can leave out the IP of ham entries. + +You can use b8 e. g. in a guestbook script and let it classify the text before saving it. Everyone has to decide which rating is necessary to classify a text as "spam", but a rating of >= 0.8 seems to be reasonable for me. If one expects the spam to be in another language that the ham entries or the spams are very short normally, one could also think about a limit of 0.7. |br| +The email filters out there mostly use > 0.9 or even > 0.99; but keep in mind that they have way more data to analyze in most of the cases. A guestbook entry may be quite short, especially when it's spam. + +In my opinion, a autolearn function is very handy. I save spam messages with a rating higher than 0.7 but less than 0.9 automatically as spam. I don't do this with ham messages in an automated way to prevent the filter from saving a false negative as ham and then classifying and learning all the spam as ham when I'm on holidays ;-) + +Closing +======= + +So … that's it. Thanks for using b8! If you find a bug or have an idea how to make b8 better, let me know. I'm also always looking forward to get e-mails from people using b8 on their homepages :-) + +References +========== + +.. [#planforspam] Paul Graham, *A Plan For Spam* (http://paulgraham.com/spam.html) +.. [#betterbayesian] Paul Graham, *Better Bayesian Filtering* (http://paulgraham.com/better.html) +.. [#spamdetection] Gary Robinson, *Spam Detection* (http://radio.weblogs.com/0101454/stories/2002/09/16/spamDetection.html) +.. [#statisticalapproach] *A Statistical Approach to the Spam Problem* (http://linuxjournal.com/article/6467) +.. [#b8statistic] Tobias Leupold, *Statistical discussion about b8* (http://nasauber.de/opensource/b8/discussion/) + +Appendix +======== + +FAQ +--- + +What about more than two categories? +```````````````````````````````````` + +I wrote b8 with the `KISS principle `__ in mind. For the "end-user", we have a class with almost no setup to do that can do three things: classify a text, learn a text and un-learn a text. Normally, there's no need to un-learn a text, so essentially, there are only two functions we need. |br| +This simplicity is only possible because b8 only knows two categories (normally "Ham" and "Spam" or some other category pair) and tells you, in one float number between 0 and 1, if a given texts rather fits in the first or the second category. If we would support multiple categories, more work would have to be done and things would become more complicated. One would have to setup the categories, have another database layout (perhaps making it mandatory to have SQL) and one float number would not be sufficient to describe b8's output, so more code would be needed – even outside of b8. + +All the code, the database layout and particularly the math is intended to do exactly one thing: distinguish between two categories. I think it would be a lot of work to change b8 so that it would support more than two categories. Probably, this is possible to do, but don't ask me in which way we would have to change the math to get multiple-category support – I'm a dentist, not a mathematician ;-) |br| +Apart from this I do believe that most people using b8 don't want or need multiple categories. They just want to know if a text is spam or not, don't they? I do, at least ;-) + +But let's think about the multiple-category thing. How would we calculate a rating for more than two categories? If we had a third one, let's call it "`Treet `__", how would we calculate a rating? We could calculate three different ratings. One for "Ham", one for "Spam" and one for "Treet" and choose the highest one to tell the user what category fits best for the text. This could be done by using a small wrapper script using three instances of b8 as-is and three different databases, each containing texts being "Ham", "Spam", "Treet" and the respective counterparts. |br| +But here's the problem: if we have "Ham" and "Spam", "Spam" is the counterpart of "Ham". But what's the counterpart of "Spam" if we have more than one additional category? Where do the "Non-Ham", "Non-Spam" and "Non-Treet" texts come from? + +Another approach, a direct calculation of more than two probabilities (the "Ham" probability is simply 1 minus the "Spam" probability, so we actually get two probabilities with the return value of b8) out of one database would require big changes in b8's structure and math. + +There's a project called `PHPNaiveBayesianFilter `__ which supports multiple categories by default. The author calls his software "Version 1.0", but I think this is the very first release, not a stable or mature one. The most recent change of that release dates back to 2003 according to the "changed" date of the files inside the zip archive, so probably, this project is dead or has never been alive and under active development at all. |br| +Actually, I played around with that code but the results weren't really good, so I decided to write my own spam filter from scratch back in early 2006 ;-) + +All in all, there seems to be no easy way to implement multiple (meaning more than two) categories using b8's current code base and probably, b8 will never support more than two categories. Perhaps, a fork or a complete re-write would be better than implementing such a feature. Anyway, I don't close my mind to multiple categories in b8. Feel free to tell me how multiple categories could be implementented in b8 or how a multiple-category version using the same code base (sharing a common abstract class?) could be written. + +What about a list with words to ignore? +``````````````````````````````````````` + +Some people suggested to introduce a list with words that b8 will simply ignore. Like "and", "or", "the", and so on. I don't think this is very meaningful. + +First, it would just work for the particular language that has been stored in the list. Speaking of my homepage, most of my spam is English, almost all my ham is German. So I would have to maintain a list with the probably less interesting words for at least two languages. Additionally, I get spam in Chinese, Japanese and Cyrillic writing or something else I can't read as well. What word should be ignored in those texts? |br| +Second, why should we ever exclude words? Who tells us those words are *actually* meaningless? If a word appears both in ham and spam, it's rating will be near 0.5 and so, it won't be used for the final calculation if a appropriate minimum deviation was set. So b8 will exclude it anyway without any blacklist. And think of this: if we excluded a word of which we only *think* it doesn't mean anything but it actually does appear more often in ham or spam, the results will get even worse. + +So why should we care about things we do not have to care about? ;-) + + +Why is it called "b8"? +`````````````````````` + +The initial name for the filter was (damn creative!) "bayes-php". There were two main reasons for searching another name: 1. "bayes-php" sucks. 2. the `PHP License `_ says the PHP guys do not like when the name of a script written in PHP contains the word "PHP". Read the `License FAQ `_ for a reasonable argumentation about this. + +Luckily, `Tobias Lang `_ proposed the new name "b8". And these are the reasons why I chose this name: + +- "bayes-php" is a "b" followed by 8 letters. +- "b8" is short and handy. Additionally, there was no program with the name "b8" or "bate" +- The English verb "to bate" means "to decrease" – and that's what b8 does: it decreases the number of spam entries in your weblog or guestbook! +- "b8" just sounds way cooler than "bayes-php" ;-) + +About the database +------------------ + +The database layout +``````````````````` + +The database layout is quite simple. It's just key:value for everything stored. There are three "internal" variables stored as normal tokens (but all containing a ``*`` which is always used as a split character by the lexer, so we can't get collisions): + +**bayes*dbversion** + This indicates the database's "version". The first versions of b8 did not set this. Version "2" indicates that we have a database created by a b8 version already storing `the "lastseen" parameter`_. + +**bayes*texts.ham** + The number of ham texts learned. + +**bayes*texts.spam** + The number of spam texts learned. + +Each "normal" token is stored with it's literal name as the key and it's data as the value. The data consists of the count of the token in all ham and spam texts and the date when the token was used the last time, all in one string and separated by spaces. So we have the following scheme: + +:: + + "token" => "count_ham count_spam lastseen" + +The "lastseen" parameter +```````````````````````` + +Somebody looking at the code might be wondering why b8 stores this "lastseen" parameter. This value is not used for any calculation at the moment. Initially, it was intended to keep the database maintainable in a way that "old" data could be removed. When e. g. a token only appeared once in ham or spam and has not been seen for a year, one could simply delete it from the database. |br| +I actually never used this feature (does anybody?). So probably, some changes will be done to this one day. Perhaps, I find a way to include this data in the spamminess calculation in a meaningful way, or at least for some statistics. One could also make this optional to keep the calculation effort small if this is needed. + +Feel free to send me any suggestions about this! + +.. |br| raw:: html + +
+ +.. section-numbering:: + +.. |date| date:: diff --git a/library/spam/example/index.php b/library/spam/example/index.php new file mode 100644 index 0000000000..6d3c142602 --- /dev/null +++ b/library/spam/example/index.php @@ -0,0 +1,241 @@ + +# +# This file is part of the b8 package +# +# This program is free software; you can redistribute it and/or modify it +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation in version 2.1 of the License. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY +# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public +# License for more details. +# +# You should have received a copy of the GNU Lesser General Public License +# along with this program; if not, write to the Free Software Foundation, +# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + + +### This is an example script demonstrating how b8 can be used. ### + +#/* + +# Use this code block if you want to use Berkeley DB. + +# The database filename is interpreted relative to the b8.php script location. + +$config_b8 = array( + 'storage' => 'dba' +); + +$config_database = array( + 'database' => 'wordlist.db', + 'handler' => 'db4' +); + +#*/ + +/* + +# Use this code block if you want to use MySQL. + +# An existing link resource can be passed to b8 by setting +# $config_database['connection'] to this link resource. +# Be sure to set your database access data otherwise! + +$config_b8 = array( + 'storage' => 'mysql' +); + +$config_database = array( + 'database' => 'test', + 'table_name' => 'b8_wordlist', + 'host' => 'localhost', + 'user' => '', + 'pass' => '' +); + +*/ + +# To be able to calculate the time the classification took + +$time_start = NULL; + +function microtimeFloat() +{ + list($usec, $sec) = explode(" ", microtime()); + return ((float) $usec + (float) $sec); +} + +# Output a nicely colored rating + +function formatRating($rating) +{ + + if($rating === FALSE) + return "could not calculate spaminess"; + + $red = floor(255 * $rating); + $green = floor(255 * (1 - $rating)); + + return "" . sprintf("%5f", $rating) . ""; + +} + +echo << + + + + + + + +example b8 interface + + + + + + + + + + +
+ +

example b8 interface

+ + +END; + +$postedText = ""; + +if(isset($_POST['action']) and $_POST['text'] == "") + echo "

Please type in a text!

\n\n"; + +elseif(isset($_POST['action']) and $_POST['text'] != "") { + + $time_start = microtimeFloat(); + + # Include the b8 code + require dirname(__FILE__) . "/../b8/b8.php"; + + # Create a new b8 instance + $b8 = new b8($config_b8, $config_database); + + # Check if everything worked smoothly + + $started_up = $b8->validate(); + + if($started_up !== TRUE) { + echo "example: Could not initialize b8. error code: $started_up"; + exit; + } + + $text = stripslashes($_POST['text']); + $postedText = htmlentities($text, ENT_QUOTES, 'UTF-8'); + + switch($_POST['action']) { + + case "Classify": + echo "

Spaminess: " . formatRating($b8->classify($text)) . "

\n"; + break; + + case "Save as Spam": + + $ratingBefore = $b8->classify($text); + $b8->learn($text, b8::SPAM); + $ratingAfter = $b8->classify($text); + + echo "

Saved the text as Spam

\n\n"; + + echo "
\n"; + echo "\n"; + echo "\n"; + echo "
Classification before learning:" . formatRating($ratingBefore) . "
Classification after learning:" . formatRating($ratingAfter) . "
\n\n"; + + break; + + case "Save as Ham": + + $ratingBefore = $b8->classify($text); + $b8->learn($text, b8::HAM); + $ratingAfter = $b8->classify($text); + + echo "

Saved the text as Ham

\n\n"; + + echo "
\n"; + echo "\n"; + echo "\n"; + echo "
Classification before learning:" . formatRating($ratingBefore) . "
Classification after learning:" . formatRating($ratingAfter) . "
\n\n"; + + break; + + case "Delete from Spam": + $b8->unlearn($text, b8::SPAM); + echo "

Deleted the text from Spam

\n\n"; + break; + + case "Delete from Ham": + $b8->unlearn($text, b8::HAM); + echo "

Deleted the text from Ham

\n\n"; + break; + + } + + $mem_used = round(memory_get_usage() / 1048576, 5); + $peak_mem_used = round(memory_get_peak_usage() / 1048576, 5); + $time_taken = round(microtimeFloat() - $time_start, 5); + +} + +echo << +
+
+ +
+ + + + + + + + + + + + +
+
+
+ +
+ +END; + +if($time_start !== NULL) { + +echo << + + + + +
Memory used: $mem_used MB
Peak memory used:$peak_mem_used MB
Time taken: $time_taken sec
+
+ +END; + +} + +?> + + + + diff --git a/library/spam/install/setup_berkeleydb.php b/library/spam/install/setup_berkeleydb.php new file mode 100644 index 0000000000..81e1d5afac --- /dev/null +++ b/library/spam/install/setup_berkeleydb.php @@ -0,0 +1,240 @@ + +# +# This file is part of the b8 package +# +# This program is free software; you can redistribute it and/or modify it +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation in version 2.1 of the License. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY +# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public +# License for more details. +# +# You should have received a copy of the GNU Lesser General Public License +# along with this program; if not, write to the Free Software Foundation, +# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + +echo << + + + + + + + +b8 Berkeley DB setup + + + + + + + + + + +
+ +

b8 Berkeley DB setup

+ + +END; + +$failed = FALSE; + +if(isset($_POST['handler'])) { + + $dbfile = $_POST['dbfile']; + $dbfile_directory = $_SERVER['DOCUMENT_ROOT'] . dirname($_SERVER['PHP_SELF']); + + echo "

Creating database

\n\n"; + + echo "

\n"; + + echo "Checking database file name … "; + + if($dbfile == "") { + echo "Please provide the name of the database file!
\n"; + $failed = TRUE; + } + else + echo "$dbfile
\n"; + + if(!$failed) { + + echo "Touching/Creating " . htmlentities($dbfile) . " … "; + + if(touch($dbfile) === FALSE) { + echo "Failed to touch the database file. Please check the given filename and/or fix the permissions of $dbfile_directory.
\n"; + $failed = TRUE; + } + else + echo "done
\n"; + + } + + if(!$failed) { + + echo "Setting file permissions to 0666 &hellip "; + + if(chmod($dbfile, 0666) === FALSE) { + echo "Failed to change the permissions of $dbfile_directory/$dbfile. Please adjust them manually.
\n"; + $failed = TRUE; + } + else + echo "done
\n"; + + } + + if(!$failed) { + + echo "Checking if the given file is empty &hellip "; + + if(filesize($dbfile) > 0) { + echo "$dbfile_directory/$dbfile is not empty. Can't create a new database. Please delete/empty this file or give another filename.
\n"; + $failed = TRUE; + } + else + echo "it is
\n"; + + } + + if(!$failed) { + + echo "Connecting to $dbfile … "; + + $db = dba_open($dbfile, "c", $_POST['handler']); + + if($db === FALSE) { + echo "Could not connect to the database!
\n"; + $failed = TRUE; + } + else + echo "done
\n"; + + } + + if(!$failed) { + + echo "Storing necessary internal variables &hellip "; + + $internals = array( + "bayes*dbversion" => "2", + "bayes*texts.ham" => "0", + "bayes*texts.spam" => "0" + ); + + foreach($internals as $key => $value) { + if(dba_insert($key, $value, $db) === FALSE) { + echo "Failed to insert data!
\n"; + $failed = TRUE; + break; + } + } + + if(!$failed) + echo "done
\n"; + + } + + if(!$failed) { + + echo "Trying to read data from the database &hellip "; + + $dbversion = dba_fetch("bayes*dbversion", $db); + + if($dbversion != "2") { + echo "Failed to read data!
\n"; + $failed = TRUE; + } + else + echo "success
\n"; + } + + if(!$failed) { + + dba_close($db); + + echo "

\n\n"; + echo "

Successfully created a new b8 database!

\n\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "
Filename:$dbfile_directory/$dbfile
DBA handler:{$_POST['handler']}
\n\n"; + echo "

Move this file to it's destination directory (default: the base directory of b8) to use it with b8. Be sure to use the right DBA handler in b8's configuration."; + + } + + echo "

\n\n"; + +} + +if($failed === TRUE or !isset($_POST['handler'])) { + +echo << + +

DBA Handler

+ +

+The following table shows all available DBA handlers. Please choose the "Berkeley DB" one. +

+ + + + +END; + +foreach(dba_handlers(TRUE) as $name => $version) { + + $checked = ""; + + if(!isset($_POST['handler'])) { + if(strpos($version, "Berkeley") !== FALSE ) + $checked = " checked=\"checked\""; + } + else { + if($_POST['handler'] == $name) + $checked = " checked=\"checked\""; + } + + echo "\n"; + +} + +echo << + +

Database file

+ +

+Please the name of the desired database file. It will be created in the directory where this script is located. +

+ +

+ +

+ +

+ +

+ + + + +END; + +} + +?> + + + + + + diff --git a/library/spam/install/setup_mysql.sql b/library/spam/install/setup_mysql.sql new file mode 100644 index 0000000000..ac43274e91 --- /dev/null +++ b/library/spam/install/setup_mysql.sql @@ -0,0 +1,27 @@ + +-- Copyright (C) 2010 Tobias Leupold +-- +-- This file is part of the b8 package +-- +-- This program is free software; you can redistribute it and/or modify it +-- under the terms of the GNU Lesser General Public License as published by +-- the Free Software Foundation in version 2.1 of the License. +-- +-- This program is distributed in the hope that it will be useful, but +-- WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY +-- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public +-- License for more details. +-- +-- You should have received a copy of the GNU Lesser General Public License +-- along with this program; if not, write to the Free Software Foundation, +-- Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + +CREATE TABLE `b8_wordlist` ( + `token` varchar(255) character set utf8 collate utf8_bin NOT NULL, + `count` varchar(255) default NULL, + PRIMARY KEY (`token`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +INSERT INTO `b8_wordlist` VALUES ('bayes*dbversion', '2'); +INSERT INTO `b8_wordlist` VALUES ('bayes*texts.ham', '0'); +INSERT INTO `b8_wordlist` VALUES ('bayes*texts.spam', '0'); From 86c0eac27d4ed2a454f752615a1b446cf2acd2b2 Mon Sep 17 00:00:00 2001 From: friendica Date: Tue, 31 Jan 2012 20:03:46 -0800 Subject: [PATCH 011/119] transport for email contacts phase II --- boot.php | 2 ++ include/delivery.php | 12 ++++++++++-- include/notifier.php | 6 ++++-- include/poller.php | 4 ++-- 4 files changed, 18 insertions(+), 6 deletions(-) diff --git a/boot.php b/boot.php index 0a21e78f86..05df15b9c8 100755 --- a/boot.php +++ b/boot.php @@ -101,10 +101,12 @@ define ( 'NETWORK_OSTATUS', 'stat'); // status.net, identi.ca, GNU-s define ( 'NETWORK_FEED', 'feed'); // RSS/Atom feeds with no known "post/notify" protocol define ( 'NETWORK_DIASPORA', 'dspr'); // Diaspora define ( 'NETWORK_MAIL', 'mail'); // IMAP/POP +define ( 'NETWORK_MAIL2', 'mai2'); // extended IMAP/POP define ( 'NETWORK_FACEBOOK', 'face'); // Facebook API define ( 'NETWORK_LINKEDIN', 'lnkd'); // LinkedIn define ( 'NETWORK_XMPP', 'xmpp'); // XMPP define ( 'NETWORK_MYSPACE', 'mysp'); // MySpace +define ( 'NETWORK_GPLUS', 'goog'); // Google+ /** * Maximum number of "people who like (or don't like) this" that we will list by name diff --git a/include/delivery.php b/include/delivery.php index c05358868a..71ce300235 100755 --- a/include/delivery.php +++ b/include/delivery.php @@ -373,7 +373,8 @@ function delivery_run($argv, $argc){ break; case NETWORK_MAIL : - + case NETWORK_MAIL2: + if(get_config('system','dfrn_only')) break; // WARNING: does not currently convert to RFC2047 header encodings, etc. @@ -413,7 +414,14 @@ function delivery_run($argv, $argc){ $reply_to = $r1[0]['reply_to']; $subject = (($it['title']) ? $it['title'] : t("\x28no subject\x29")) ; - $headers = 'From: ' . $local_user[0]['username'] . ' <' . $local_user[0]['email'] . '>' . "\n"; + + // only expose our real email address to true friends + + if(($contact['rel'] == CONTACT_IS_FRIEND) && (! $contact['blocked'])) + $headers = 'From: ' . $local_user[0]['username'] . ' <' . $local_user[0]['email'] . '>' . "\n"; + else + $headers = 'From: ' . $local_user[0]['username'] . ' <' . t('noreply') . '@' . $a->get_hostname() . '>' . "\n"; + if($reply_to) $headers .= 'Reply-to: ' . $reply_to . "\n"; $headers .= 'Message-id: <' . $it['uri'] . '>' . "\n"; diff --git a/include/notifier.php b/include/notifier.php index ead7aebad4..53178ce53a 100755 --- a/include/notifier.php +++ b/include/notifier.php @@ -584,6 +584,7 @@ function notifier_run($argv, $argc){ break; case NETWORK_MAIL: + case NETWORK_MAIL2: if(get_config('system','dfrn_only')) break; @@ -629,7 +630,7 @@ function notifier_run($argv, $argc){ // only expose our real email address to true friends - if($contact['rel'] == CONTACT_IS_FRIEND) + if(($contact['rel'] == CONTACT_IS_FRIEND) && (! $contact['blocked'])) $headers = 'From: ' . $local_user[0]['username'] . ' <' . $local_user[0]['email'] . '>' . "\n"; else $headers = 'From: ' . $local_user[0]['username'] . ' <' . t('noreply') . '@' . $a->get_hostname() . '>' . "\n"; @@ -754,9 +755,10 @@ function notifier_run($argv, $argc){ ); $r2 = q("SELECT `id`, `name`,`network` FROM `contact` - WHERE `network` = '%s' AND `uid` = %d AND `blocked` = 0 AND `pending` = 0 + WHERE `network` in ( '%s', '%s') AND `uid` = %d AND `blocked` = 0 AND `pending` = 0 AND `rel` != %d order by rand() ", dbesc(NETWORK_DFRN), + dbesc(NETWORK_MAIL2), intval($owner['uid']), intval(CONTACT_IS_SHARING) ); diff --git a/include/poller.php b/include/poller.php index 89e4488b92..7d42c63b5f 100755 --- a/include/poller.php +++ b/include/poller.php @@ -369,7 +369,7 @@ function poller_run($argv, $argc){ $xml = fetch_url($contact['poll']); } - elseif($contact['network'] === NETWORK_MAIL) { + elseif($contact['network'] === NETWORK_MAIL || $contact['network'] === NETWORK_MAIL2) { $mail_disabled = ((function_exists('imap_open') && (! get_config('system','imap_disabled'))) ? 0 : 1); if($mail_disabled) @@ -462,7 +462,7 @@ function poller_run($argv, $argc){ $datarray['contact-id'] = $contact['id']; if($datarray['parent-uri'] === $datarray['uri']) $datarray['private'] = 1; - if(! get_pconfig($importer_uid,'system','allow_public_email_replies')) { + if(($contact['network'] === NETWORK_MAIL) && (! get_pconfig($importer_uid,'system','allow_public_email_replies'))) { $datarray['private'] = 1; $datarray['allow_cid'] = '<' . $contact['id'] . '>'; } From c0c0f2dc151300f7578cf77a059403369edba07d Mon Sep 17 00:00:00 2001 From: friendica Date: Tue, 31 Jan 2012 23:54:53 -0800 Subject: [PATCH 012/119] add closeness attribute --- boot.php | 2 +- database.sql | 4 +++- mod/register.php | 4 ++-- update.php | 6 +++++- 4 files changed, 11 insertions(+), 5 deletions(-) diff --git a/boot.php b/boot.php index 05df15b9c8..696c9add23 100755 --- a/boot.php +++ b/boot.php @@ -11,7 +11,7 @@ require_once('include/cache.php'); define ( 'FRIENDICA_PLATFORM', 'Friendica'); define ( 'FRIENDICA_VERSION', '2.3.1241' ); define ( 'DFRN_PROTOCOL_VERSION', '2.22' ); -define ( 'DB_UPDATE_VERSION', 1118 ); +define ( 'DB_UPDATE_VERSION', 1119 ); define ( 'EOL', "
\r\n" ); define ( 'ATOM_TIME', 'Y-m-d\TH:i:s\Z' ); diff --git a/database.sql b/database.sql index 9a2e5c8ddd..8abaa5a93b 100755 --- a/database.sql +++ b/database.sql @@ -96,6 +96,7 @@ CREATE TABLE IF NOT EXISTS `contact` ( `pending` tinyint(1) NOT NULL DEFAULT '1', `rating` tinyint(1) NOT NULL DEFAULT '0', `reason` text NOT NULL, + `closeness` tinyint(2) NOT NULL DEFAULT '99', `info` mediumtext NOT NULL, `profile-id` int(11) NOT NULL DEFAULT '0', `bdyear` CHAR( 4 ) NOT NULL COMMENT 'birthday notify flag', @@ -116,7 +117,8 @@ CREATE TABLE IF NOT EXISTS `contact` ( KEY `blocked` (`blocked`), KEY `readonly` (`readonly`), KEY `hidden` (`hidden`), - KEY `pending` (`pending`) + KEY `pending` (`pending`), + KEY `closeness` (`closeness`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; -- -------------------------------------------------------- diff --git a/mod/register.php b/mod/register.php index 89f561642a..388b3e2507 100755 --- a/mod/register.php +++ b/mod/register.php @@ -278,8 +278,8 @@ function register_post(&$a) { return; } $r = q("INSERT INTO `contact` ( `uid`, `created`, `self`, `name`, `nick`, `photo`, `thumb`, `micro`, `blocked`, `pending`, `url`, `nurl`, - `request`, `notify`, `poll`, `confirm`, `poco`, `name-date`, `uri-date`, `avatar-date` ) - VALUES ( %d, '%s', 1, '%s', '%s', '%s', '%s', '%s', 0, 0, '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s' ) ", + `request`, `notify`, `poll`, `confirm`, `poco`, `name-date`, `uri-date`, `avatar-date`, `closeness` ) + VALUES ( %d, '%s', 1, '%s', '%s', '%s', '%s', '%s', 0, 0, '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', 0 ) ", intval($newuid), datetime_convert(), dbesc($username), diff --git a/update.php b/update.php index d961f29327..e0591a3b37 100755 --- a/update.php +++ b/update.php @@ -1,6 +1,6 @@ Date: Wed, 1 Feb 2012 00:20:54 -0800 Subject: [PATCH 013/119] placeholder - spam tab on network page --- mod/network.php | 36 +++++++++++++++++++++++++----------- 1 file changed, 25 insertions(+), 11 deletions(-) diff --git a/mod/network.php b/mod/network.php index 271a1236d9..497e8a115f 100755 --- a/mod/network.php +++ b/mod/network.php @@ -113,6 +113,7 @@ function network_content(&$a, $update = 0) { $all_active = ''; $search_active = ''; $conv_active = ''; + $spam_active = ''; if(($a->argc > 1 && $a->argv[1] === 'new') || ($a->argc > 2 && $a->argv[2] === 'new')) { @@ -135,12 +136,17 @@ function network_content(&$a, $update = 0) { $conv_active = 'active'; } + if($_GET['spam']) { + $spam_active = 'active'; + } + if (($new_active == '') && ($starred_active == '') && ($bookmarked_active == '') && ($conv_active == '') - && ($search_active == '')) { + && ($search_active == '') + && ($spam_active == '')) { $all_active = 'active'; } @@ -151,9 +157,7 @@ function network_content(&$a, $update = 0) { $all_active = ''; $postord_active = 'active'; } - - - + // tabs $tabs = array( array( @@ -187,6 +191,13 @@ function network_content(&$a, $update = 0) { 'url'=>$a->get_baseurl() . '/' . str_replace('/new', '', $a->cmd) . ((x($_GET,'cid')) ? '/?cid=' . $_GET['cid'] : '') . '&bmark=1', 'sel'=>$bookmarked_active, ), +// array( +// 'label' => t('Spam'), +// 'url'=>$a->get_baseurl() . '/network?f=&spam=1' +// 'sel'=> $spam_active, +// ), + + ); $tpl = get_markup_template('common_tabs.tpl'); $o .= replace_macros($tpl, array('$tabs'=>$tabs)); @@ -209,6 +220,7 @@ function network_content(&$a, $update = 0) { $order = ((x($_GET,'order')) ? notags($_GET['order']) : 'comment'); $liked = ((x($_GET,'liked')) ? intval($_GET['liked']) : 0); $conv = ((x($_GET,'conv')) ? intval($_GET['conv']) : 0); + $spam = ((x($_GET,'spam')) ? intval($_GET['spam']) : 0); $nets = ((x($_GET,'nets')) ? $_GET['nets'] : ''); if(($a->argc > 2) && $a->argv[2] === 'new') @@ -337,14 +349,16 @@ function network_content(&$a, $update = 0) { $o .= "\r\n"; } From 9fc36d3da4e85b4b25b7abe1917cb2188eea77ea Mon Sep 17 00:00:00 2001 From: friendica Date: Wed, 1 Feb 2012 17:09:53 -0800 Subject: [PATCH 014/119] improvements in d* markdown conversion --- boot.php | 2 +- include/bb2diaspora.php | 13 ++++++++----- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/boot.php b/boot.php index 696c9add23..9b192853c5 100755 --- a/boot.php +++ b/boot.php @@ -9,7 +9,7 @@ require_once('include/nav.php'); require_once('include/cache.php'); define ( 'FRIENDICA_PLATFORM', 'Friendica'); -define ( 'FRIENDICA_VERSION', '2.3.1241' ); +define ( 'FRIENDICA_VERSION', '2.3.1242' ); define ( 'DFRN_PROTOCOL_VERSION', '2.22' ); define ( 'DB_UPDATE_VERSION', 1119 ); diff --git a/include/bb2diaspora.php b/include/bb2diaspora.php index d367b67166..9a29b05a2a 100755 --- a/include/bb2diaspora.php +++ b/include/bb2diaspora.php @@ -14,9 +14,17 @@ require_once('include/html2bbcode.php'); function diaspora2bb($s) { $s = html_entity_decode($s,ENT_COMPAT,'UTF-8'); + $s = str_replace("\r","\n",$s); $s = preg_replace('/\@\{(.+?)\; (.+?)\@(.+?)\}/','@[url=https://$3/u/$2]$1[/url]',$s); + + $s = preg_replace('/\#([^\s\#])/','\\#$1',$s); + $s = Markdown($s); + + $s = str_replace('#','#',$s); + $s = str_replace("\n",'
',$s); + $s = html2bbcode($s); // $s = str_replace('*','*',$s); @@ -30,11 +38,6 @@ function diaspora2bb($s) { $s = preg_replace("/(\[code\])+(.*?)(\[\/code\])+/ism","[code]$2[/code]", $s); $s = scale_diaspora_images($s); - // we seem to get a lot of text smushed together with links from Diaspora. - - $s = preg_replace('/[^ ]\[url\=(.*?)\]/',' [url=$1]' ,$s); - $s = preg_replace('/\[\/url\][^ ]/','[/url] ',$s); - return $s; } From 840f69e2c8ba014b89314191859ad0b8b35631d5 Mon Sep 17 00:00:00 2001 From: friendica Date: Wed, 1 Feb 2012 18:50:11 -0800 Subject: [PATCH 015/119] add spam flag to item table, DB version not incremented yet, give large sites a heads up to do it manually --- update.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/update.php b/update.php index e0591a3b37..d0fe1645b1 100755 --- a/update.php +++ b/update.php @@ -1016,3 +1016,7 @@ function update_1118() { q("ALTER TABLE `contact` ADD `closeness` TINYINT( 2 ) NOT NULL DEFAULT '99' AFTER `reason` , ADD INDEX (`closensss`) "); q("update contact set closeness = 0 where self = 1"); } + +function update_1119() { +q("ALTER TABLE `item` ADD `spam` TINYINT( 1 ) NOT NULL DEFAULT '0' AFTER `visible` , ADD INDEX (`spam`) "); +} From 64d0616762efcff413a335f2fdde4d8219d44895 Mon Sep 17 00:00:00 2001 From: friendica Date: Wed, 1 Feb 2012 19:23:05 -0800 Subject: [PATCH 016/119] add uid variable to b8 classes --- library/spam/b8/b8.php | 18 +- library/spam/b8/b8.php.ORIG | 503 ++++++++++++++++++ library/spam/b8/storage/storage_base.php | 35 +- library/spam/b8/storage/storage_base.php.ORIG | 395 ++++++++++++++ library/spam/b8/storage/storage_frndc.php | 351 ++++++++++++ 5 files changed, 1276 insertions(+), 26 deletions(-) create mode 100644 library/spam/b8/b8.php.ORIG create mode 100644 library/spam/b8/storage/storage_base.php.ORIG create mode 100644 library/spam/b8/storage/storage_frndc.php diff --git a/library/spam/b8/b8.php b/library/spam/b8/b8.php index ea1e15ffad..28a3dd29f9 100644 --- a/library/spam/b8/b8.php +++ b/library/spam/b8/b8.php @@ -205,7 +205,7 @@ class b8 * @return float The rating between 0 (ham) and 1 (spam) */ - public function classify($text) + public function classify($uid,$text) { # Validate the startup @@ -217,7 +217,7 @@ class b8 # Get the internal database variables, containing the number of ham and # spam texts so the spam probability can be calculated in relation to them - $internals = $this->_database->get_internals(); + $internals = $this->_database->get_internals($uid); # Calculate the spamminess of all tokens @@ -231,7 +231,7 @@ class b8 return $tokens; # Fetch all availible data for the token set from the database - $this->_token_data = $this->_database->get(array_keys($tokens)); + $this->_token_data = $this->_database->get(array_keys($tokens),$uid); # Calculate the spamminess and importance for each token (or a degenerated form of it) @@ -441,9 +441,9 @@ class b8 * @return void */ - public function learn($text, $category) + public function learn($text, $category, $uid) { - return $this->_process_text($text, $category, self::LEARN); + return $this->_process_text($text, $category, self::LEARN, $uid); } /** @@ -455,9 +455,9 @@ class b8 * @return void */ - public function unlearn($text, $category) + public function unlearn($text, $category, $uid) { - return $this->_process_text($text, $category, self::UNLEARN); + return $this->_process_text($text, $category, self::UNLEARN, $uid); } /** @@ -470,7 +470,7 @@ class b8 * @return void */ - private function _process_text($text, $category, $action) + private function _process_text($text, $category, $action, $uid = 0) { # Validate the startup @@ -494,7 +494,7 @@ class b8 return $tokens; # Pass the tokens and what to do with it to the storage backend - return $this->_database->process_text($tokens, $category, $action); + return $this->_database->process_text($tokens, $category, $action, $uid); } diff --git a/library/spam/b8/b8.php.ORIG b/library/spam/b8/b8.php.ORIG new file mode 100644 index 0000000000..ea1e15ffad --- /dev/null +++ b/library/spam/b8/b8.php.ORIG @@ -0,0 +1,503 @@ + +# +# b8 - A Bayesian spam filter written in PHP 5 +# +# This program is free software; you can redistribute it and/or modify it +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation in version 2.1 of the License. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY +# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public +# License for more details. +# +# You should have received a copy of the GNU Lesser General Public License +# along with this program; if not, write to the Free Software Foundation, +# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + +/** + * Copyright (C) 2006-2010 Tobias Leupold + * + * @license LGPL + * @access public + * @package b8 + * @author Tobias Leupold + * @author Oliver Lillie (aka buggedcom) (original PHP 5 port) + */ + +class b8 +{ + + public $config = array( + 'min_size' => 3, + 'max_size' => 30, + 'allow_numbers' => FALSE, + 'lexer' => 'default', + 'degenerator' => 'default', + 'storage' => 'dba', + 'use_relevant' => 15, + 'min_dev' => 0.2, + 'rob_s' => 0.3, + 'rob_x' => 0.5 + ); + + private $_lexer = NULL; + private $_database = NULL; + private $_token_data = NULL; + + const SPAM = 'spam'; + const HAM = 'ham'; + const LEARN = 'learn'; + const UNLEARN = 'unlearn'; + + const STARTUP_FAIL_DATABASE = 'STARTUP_FAIL_DATABASE'; + const STARTUP_FAIL_LEXER = 'STARTUP_FAIL_LEXER'; + const TRAINER_CATEGORY_FAIL = 'TRAINER_CATEGORY_FAIL'; + + /** + * Constructs b8 + * + * @access public + * @return void + */ + + function __construct($config = array(), $database_config) + { + + # Validate config data + + if(count($config) > 0) { + + foreach ($config as $name=>$value) { + + switch($name) { + + case 'min_dev': + case 'rob_s': + case 'rob_x': + $this->config[$name] = (float) $value; + break; + + case 'min_size': + case 'max_size': + case 'use_relevant': + $this->config[$name] = (int) $value; + break; + + case 'allow_numbers': + $this->config[$name] = (bool) $value; + break; + + case 'lexer': + $value = (string) strtolower($value); + $this->config[$name] = is_file(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'lexer' . DIRECTORY_SEPARATOR . "lexer_" . $value . '.php') === TRUE ? $value : 'default'; + break; + + case 'storage': + $this->config[$name] = (string) $value; + break; + + } + + } + + } + + # Setup the database backend + + # Get the basic storage class used by all backends + if($this->load_class('b8_storage_base', dirname(__FILE__) . DIRECTORY_SEPARATOR . 'storage' . DIRECTORY_SEPARATOR . 'storage_base.php') === FALSE) + return; + + # Get the degenerator we need + if($this->load_class('b8_degenerator_' . $this->config['degenerator'], dirname(__FILE__) . DIRECTORY_SEPARATOR . 'degenerator' . DIRECTORY_SEPARATOR . 'degenerator_' . $this->config['degenerator'] . '.php') === FALSE) + return; + + # Get the actual storage backend we need + if($this->load_class('b8_storage_' . $this->config['storage'], dirname(__FILE__) . DIRECTORY_SEPARATOR . 'storage' . DIRECTORY_SEPARATOR . 'storage_' . $this->config['storage'] . '.php') === FALSE) + return; + + # Setup the backend + $class = 'b8_storage_' . $this->config['storage']; + $this->_database = new $class( + $database_config, + $this->config['degenerator'], date('ymd') + ); + + # Setup the lexer class + + if($this->load_class('b8_lexer_' . $this->config['lexer'], dirname(__FILE__) . DIRECTORY_SEPARATOR . 'lexer' . DIRECTORY_SEPARATOR . 'lexer_' . $this->config['lexer'] . '.php') === FALSE) + return; + + $class = 'b8_lexer_' . $this->config['lexer']; + $this->_lexer = new $class( + array( + 'min_size' => $this->config['min_size'], + 'max_size' => $this->config['max_size'], + 'allow_numbers' => $this->config['allow_numbers'] + ) + ); + + } + + /** + * Load a class file if a class has not been defined yet. + * + * @access public + * @return boolean Returns TRUE if everything is okay, otherwise FALSE. + */ + + public function load_class($class_name, $class_file) + { + + if(class_exists($class_name, FALSE) === FALSE) { + + $included = require_once $class_file; + + if($included === FALSE or class_exists($class_name, FALSE) === FALSE) + return FALSE; + + } + + return TRUE; + + } + + /** + * Validates the class has all it needs to work. + * + * @access public + * @return mixed Returns TRUE if everything is okay, otherwise an error code. + */ + + public function validate() + { + + if($this->_database === NULL) + return self::STARTUP_FAIL_DATABASE; + + # Connect the database backend if we aren't connected yet + + elseif($this->_database->connected === FALSE) { + + $connection = $this->_database->connect(); + + if($connection !== TRUE) + return $connection; + + } + + if($this->_lexer === NULL) + return self::STARTUP_FAIL_LEXER; + + return TRUE; + + } + + /** + * Classifies a text + * + * @access public + * @package default + * @param string $text + * @return float The rating between 0 (ham) and 1 (spam) + */ + + public function classify($text) + { + + # Validate the startup + + $started_up = $this->validate(); + + if($started_up !== TRUE) + return $started_up; + + # Get the internal database variables, containing the number of ham and + # spam texts so the spam probability can be calculated in relation to them + $internals = $this->_database->get_internals(); + + # Calculate the spamminess of all tokens + + # Get all tokens we want to rate + + $tokens = $this->_lexer->get_tokens($text); + + # Check if the lexer failed + # (if so, $tokens will be a lexer error code, if not, $tokens will be an array) + if(!is_array($tokens)) + return $tokens; + + # Fetch all availible data for the token set from the database + $this->_token_data = $this->_database->get(array_keys($tokens)); + + # Calculate the spamminess and importance for each token (or a degenerated form of it) + + $word_count = array(); + $rating = array(); + $importance = array(); + + foreach($tokens as $word => $count) { + + $word_count[$word] = $count; + + # Although we only call this function only here ... let's do the + # calculation stuff in a function to make this a bit less confusing ;-) + $rating[$word] = $this->_get_probability($word, $internals['texts_ham'], $internals['texts_spam']); + + $importance[$word] = abs(0.5 - $rating[$word]); + + } + + # Order by importance + arsort($importance); + reset($importance); + + # Get the most interesting tokens (use all if we have less than the given number) + + $relevant = array(); + + for($i = 0; $i < $this->config['use_relevant']; $i++) { + + if($tmp = each($importance)) { + + # Important tokens remain + + # If the token's rating is relevant enough, use it + + if(abs(0.5 - $rating[$tmp['key']]) > $this->config['min_dev']) { + + # Tokens that appear more than once also count more than once + + for($x = 0, $l = $word_count[$tmp['key']]; $x < $l; $x++) + array_push($relevant, $rating[$tmp['key']]); + + } + + } + + else { + # We have less than words to use, so we already + # use what we have and can break here + break; + } + + } + + # Calculate the spamminess of the text (thanks to Mr. Robinson ;-) + # We set both hamminess and Spamminess to 1 for the first multiplying + $hamminess = 1; + $spamminess = 1; + + # Consider all relevant ratings + foreach($relevant as $value) { + $hamminess *= (1.0 - $value); + $spamminess *= $value; + } + + # If no token was good for calculation, we really don't know how + # to rate this text; so we assume a spam and ham probability of 0.5 + + if($hamminess === 1 and $spamminess === 1) { + $hamminess = 0.5; + $spamminess = 0.5; + $n = 1; + } + else { + # Get the number of relevant ratings + $n = count($relevant); + } + + # Calculate the combined rating + + # The actual hamminess and spamminess + $hamminess = 1 - pow($hamminess, (1 / $n)); + $spamminess = 1 - pow($spamminess, (1 / $n)); + + # Calculate the combined indicator + $probability = ($hamminess - $spamminess) / ($hamminess + $spamminess); + + # We want a value between 0 and 1, not between -1 and +1, so ... + $probability = (1 + $probability) / 2; + + # Alea iacta est + return $probability; + + } + + /** + * Calculate the spamminess of a single token also considering "degenerated" versions + * + * @access private + * @param string $word + * @param string $texts_ham + * @param string $texts_spam + * @return void + */ + + private function _get_probability($word, $texts_ham, $texts_spam) + { + + # Let's see what we have! + + if(isset($this->_token_data['tokens'][$word]) === TRUE) { + # The token was in the database, so we can use it's data as-is + # and calculate the spamminess of this token directly + return $this->_calc_probability($this->_token_data['tokens'][$word], $texts_ham, $texts_spam); + } + + # Damn. The token was not found, so do we have at least similar words? + + if(isset($this->_token_data['degenerates'][$word]) === TRUE) { + + # We found similar words, so calculate the spamminess for each one + # and choose the most important one for the further calculation + + # The default rating is 0.5 simply saying nothing + $rating = 0.5; + + foreach($this->_token_data['degenerates'][$word] as $degenerate => $count) { + + # Calculate the rating of the current degenerated token + $rating_tmp = $this->_calc_probability($count, $texts_ham, $texts_spam); + + # Is it more important than the rating of another degenerated version? + if(abs(0.5 - $rating_tmp) > abs(0.5 - $rating)) + $rating = $rating_tmp; + + } + + return $rating; + + } + + else { + # The token is really unknown, so choose the default rating + # for completely unknown tokens. This strips down to the + # robX parameter so we can cheap out the freaky math ;-) + return $this->config['rob_x']; + } + + } + + /** + * Do the actual spamminess calculation of a single token + * + * @access private + * @param array $data + * @param string $texts_ham + * @param string $texts_spam + * @return void + */ + + private function _calc_probability($data, $texts_ham, $texts_spam) + { + + # Calculate the basic probability by Mr. Graham + + # But: consider the number of ham and spam texts saved instead of the + # number of entries where the token appeared to calculate a relative + # spamminess because we count tokens appearing multiple times not just + # once but as often as they appear in the learned texts + + $rel_ham = $data['count_ham']; + $rel_spam = $data['count_spam']; + + if($texts_ham > 0) + $rel_ham = $data['count_ham'] / $texts_ham; + + if($texts_spam > 0) + $rel_spam = $data['count_spam'] / $texts_spam; + + $rating = $rel_spam / ($rel_ham + $rel_spam); + + # Calculate the better probability proposed by Mr. Robinson + $all = $data['count_ham'] + $data['count_spam']; + return (($this->config['rob_s'] * $this->config['rob_x']) + ($all * $rating)) / ($this->config['rob_s'] + $all); + + } + + /** + * Check the validity of the category of a request + * + * @access private + * @param string $category + * @return void + */ + + private function _check_category($category) + { + return $category === self::HAM or $category === self::SPAM; + } + + /** + * Learn a reference text + * + * @access public + * @param string $text + * @param const $category Either b8::SPAM or b8::HAM + * @return void + */ + + public function learn($text, $category) + { + return $this->_process_text($text, $category, self::LEARN); + } + + /** + * Unlearn a reference text + * + * @access public + * @param string $text + * @param const $category Either b8::SPAM or b8::HAM + * @return void + */ + + public function unlearn($text, $category) + { + return $this->_process_text($text, $category, self::UNLEARN); + } + + /** + * Does the actual interaction with the storage backend for learning or unlearning texts + * + * @access private + * @param string $text + * @param const $category Either b8::SPAM or b8::HAM + * @param const $action Either b8::LEARN or b8::UNLEARN + * @return void + */ + + private function _process_text($text, $category, $action) + { + + # Validate the startup + + $started_up = $this->validate(); + + if($started_up !== TRUE) + return $started_up; + + # Look if the request is okay + if($this->_check_category($category) === FALSE) + return self::TRAINER_CATEGORY_FAIL; + + # Get all tokens from $text + + $tokens = $this->_lexer->get_tokens($text); + + # Check if the lexer failed + # (if so, $tokens will be a lexer error code, if not, $tokens will be an array) + if(!is_array($tokens)) + return $tokens; + + # Pass the tokens and what to do with it to the storage backend + return $this->_database->process_text($tokens, $category, $action); + + } + +} + +?> \ No newline at end of file diff --git a/library/spam/b8/storage/storage_base.php b/library/spam/b8/storage/storage_base.php index 01f5a69d72..49132751b6 100644 --- a/library/spam/b8/storage/storage_base.php +++ b/library/spam/b8/storage/storage_base.php @@ -71,10 +71,10 @@ abstract class b8_storage_base * @return mixed Returns TRUE if everything is okay, otherwise an error code. */ - protected function check_database() + protected function check_database($uid) { - $internals = $this->get_internals(); + $internals = $this->get_internals($uid); if(isset($internals['dbversion'])) { if($internals['dbversion'] == "2") { @@ -122,7 +122,7 @@ abstract class b8_storage_base * @return array Returns an array of all internals. */ - public function get_internals() + public function get_internals($uid) { $internals = $this->_get_query( @@ -130,7 +130,8 @@ abstract class b8_storage_base self::INTERNALS_TEXTS_HAM, self::INTERNALS_TEXTS_SPAM, self::INTERNALS_DBVERSION - ) + ), + $uid ); return array( @@ -149,7 +150,7 @@ abstract class b8_storage_base * @return mixed Returns FALSE on failure, otherwise returns array of returned data in the format array('tokens' => array(token => count), 'degenerates' => array(token => array(degenerate => count))). */ - public function get($tokens) + public function get($tokens, $uid) { # Validate the startup @@ -160,7 +161,7 @@ abstract class b8_storage_base return $started_up; # First we see what we have in the database. - $token_data = $this->_get_query($tokens); + $token_data = $this->_get_query($tokens, $uid); # Check if we have to degenerate some tokens @@ -203,7 +204,7 @@ abstract class b8_storage_base $return_data_tokens[$token] = $this->_parse_count($token_data[$token]); # ... and update it's lastseen parameter - $this->_update($token, "{$return_data_tokens[$token]['count_ham']} {$return_data_tokens[$token]['count_spam']} " . $this->b8_config['today']); + $this->_update($token, "{$return_data_tokens[$token]['count_ham']} {$return_data_tokens[$token]['count_spam']} " . $this->b8_config['today'], $uid ); } @@ -224,7 +225,7 @@ abstract class b8_storage_base $return_data_degenerates[$token][$degenerate] = $this->_parse_count($token_data[$degenerate]); # ... and update it's lastseen parameter - $this->_update($degenerate, "{$return_data_degenerates[$token][$degenerate]['count_ham']} {$return_data_degenerates[$token][$degenerate]['count_spam']} " . $this->b8_config['today']); + $this->_update($degenerate, "{$return_data_degenerates[$token][$degenerate]['count_ham']} {$return_data_degenerates[$token][$degenerate]['count_spam']} " . $this->b8_config['today'], $uid); } @@ -258,7 +259,7 @@ abstract class b8_storage_base * @return void */ - public function process_text($tokens, $category, $action) + public function process_text($tokens, $category, $action, $uid) { # Validate the startup @@ -271,10 +272,10 @@ abstract class b8_storage_base # No matter what we do, we first have to check what data we have. # First get the internals, including the ham texts and spam texts counter - $internals = $this->get_internals(); + $internals = $this->get_internals($uid); # Then, fetch all data for all tokens we have (and update their lastseen parameters) - $token_data = $this->_get_query(array_keys($tokens)); + $token_data = $this->_get_query(array_keys($tokens), $uid); # Process all tokens to learn/unlearn @@ -315,7 +316,7 @@ abstract class b8_storage_base # Now let's see if we have to update or delete the token if($count_ham !== 0 or $count_spam !== 0) - $this->_update($token, "$count_ham $count_spam " . $this->b8_config['today']); + $this->_update($token, "$count_ham $count_spam " . $this->b8_config['today'], $uid); else $this->_del($token); @@ -335,7 +336,7 @@ abstract class b8_storage_base $data .= $this->b8_config['today']; - $this->_put($token, $data); + $this->_put($token, $data, $uid); } @@ -349,12 +350,12 @@ abstract class b8_storage_base if($category === b8::HAM) { $internals['texts_ham']++; - $this->_update(self::INTERNALS_TEXTS_HAM, $internals['texts_ham']); + $this->_update(self::INTERNALS_TEXTS_HAM, $internals['texts_ham'], $uid); } elseif($category === b8::SPAM) { $internals['texts_spam']++; - $this->_update(self::INTERNALS_TEXTS_SPAM, $internals['texts_spam']); + $this->_update(self::INTERNALS_TEXTS_SPAM, $internals['texts_spam'], $uid); } } @@ -368,7 +369,7 @@ abstract class b8_storage_base if($internals['texts_ham'] < 0) $internals['texts_ham'] = 0; - $this->_update(self::INTERNALS_TEXTS_HAM, $internals['texts_ham']); + $this->_update(self::INTERNALS_TEXTS_HAM, $internals['texts_ham'], $uid); } @@ -379,7 +380,7 @@ abstract class b8_storage_base if($internals['texts_spam'] < 0) $internals['texts_spam'] = 0; - $this->_update(self::INTERNALS_TEXTS_SPAM, $internals['texts_spam']); + $this->_update(self::INTERNALS_TEXTS_SPAM, $internals['texts_spam'], $uid); } diff --git a/library/spam/b8/storage/storage_base.php.ORIG b/library/spam/b8/storage/storage_base.php.ORIG new file mode 100644 index 0000000000..01f5a69d72 --- /dev/null +++ b/library/spam/b8/storage/storage_base.php.ORIG @@ -0,0 +1,395 @@ + +# +# This file is part of the b8 package +# +# This program is free software; you can redistribute it and/or modify it +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation in version 2.1 of the License. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY +# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public +# License for more details. +# +# You should have received a copy of the GNU Lesser General Public License +# along with this program; if not, write to the Free Software Foundation, +# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + +/** + * Functions used by all storage backends + * Copyright (C) 2010 Tobias Leupold + * + * @license LGPL + * @access public + * @package b8 + * @author Tobias Leupold + */ + +abstract class b8_storage_base +{ + + public $connected = FALSE; + + protected $_degenerator = NULL; + + const INTERNALS_TEXTS_HAM = 'bayes*texts.ham'; + const INTERNALS_TEXTS_SPAM = 'bayes*texts.spam'; + const INTERNALS_DBVERSION = 'bayes*dbversion'; + + const BACKEND_NOT_CONNECTED = 'BACKEND_NOT_CONNECTED'; + const DATABASE_WRONG_VERSION = 'DATABASE_WRONG_VERSION'; + const DATABASE_NOT_B8 = 'DATABASE_NOT_B8'; + + /** + * Validates the class has all it needs to work. + * + * @access protected + * @return mixed Returns TRUE if everything is okay, otherwise an error code. + */ + + protected function validate() + { + + # We set up the degenerator here, as we would have to duplicate code if it + # was done in the constructor of the respective storage backend. + $class = 'b8_degenerator_' . $this->b8_config['degenerator']; + $this->_degenerator = new $class(); + + if($this->connected !== TRUE) + return self::BACKEND_NOT_CONNECTED; + + return TRUE; + + } + + /** + * Checks if a b8 database is used and if it's version is okay + * + * @access protected + * @return mixed Returns TRUE if everything is okay, otherwise an error code. + */ + + protected function check_database() + { + + $internals = $this->get_internals(); + + if(isset($internals['dbversion'])) { + if($internals['dbversion'] == "2") { + return TRUE; + } + else { + $this->connected = FALSE; + return self::DATABASE_WRONG_VERSION; + } + } + else { + $this->connected = FALSE; + return self::DATABASE_NOT_B8; + } + + } + + /** + * Parses the "count" data of a token. + * + * @access private + * @param string $data + * @return array Returns an array of the parsed data: array(count_ham, count_spam, lastseen). + */ + + private function _parse_count($data) + { + + list($count_ham, $count_spam, $lastseen) = explode(' ', $data); + + $count_ham = (int) $count_ham; + $count_spam = (int) $count_spam; + + return array( + 'count_ham' => $count_ham, + 'count_spam' => $count_spam + ); + + } + + /** + * Get the database's internal variables. + * + * @access public + * @return array Returns an array of all internals. + */ + + public function get_internals() + { + + $internals = $this->_get_query( + array( + self::INTERNALS_TEXTS_HAM, + self::INTERNALS_TEXTS_SPAM, + self::INTERNALS_DBVERSION + ) + ); + + return array( + 'texts_ham' => (int) $internals[self::INTERNALS_TEXTS_HAM], + 'texts_spam' => (int) $internals[self::INTERNALS_TEXTS_SPAM], + 'dbversion' => (int) $internals[self::INTERNALS_DBVERSION] + ); + + } + + /** + * Get all data about a list of tags from the database. + * + * @access public + * @param array $tokens + * @return mixed Returns FALSE on failure, otherwise returns array of returned data in the format array('tokens' => array(token => count), 'degenerates' => array(token => array(degenerate => count))). + */ + + public function get($tokens) + { + + # Validate the startup + + $started_up = $this->validate(); + + if($started_up !== TRUE) + return $started_up; + + # First we see what we have in the database. + $token_data = $this->_get_query($tokens); + + # Check if we have to degenerate some tokens + + $missing_tokens = array(); + + foreach($tokens as $token) { + if(!isset($token_data[$token])) + $missing_tokens[] = $token; + } + + if(count($missing_tokens) > 0) { + + # We have to degenerate some tokens + $degenerates_list = array(); + + # Generate a list of degenerated tokens for the missing tokens ... + $degenerates = $this->_degenerator->degenerate($missing_tokens); + + # ... and look them up + + foreach($degenerates as $token => $token_degenerates) + $degenerates_list = array_merge($degenerates_list, $token_degenerates); + + $token_data = array_merge($token_data, $this->_get_query($degenerates_list)); + + } + + # Here, we have all availible data in $token_data. + + $return_data_tokens = array(); + $return_data_degenerates = array(); + + foreach($tokens as $token) { + + if(isset($token_data[$token]) === TRUE) { + + # The token was found in the database + + # Add the data ... + $return_data_tokens[$token] = $this->_parse_count($token_data[$token]); + + # ... and update it's lastseen parameter + $this->_update($token, "{$return_data_tokens[$token]['count_ham']} {$return_data_tokens[$token]['count_spam']} " . $this->b8_config['today']); + + } + + else { + + # The token was not found, so we look if we + # can return data for degenerated tokens + + # Check all degenerated forms of the token + + foreach($this->_degenerator->degenerates[$token] as $degenerate) { + + if(isset($token_data[$degenerate]) === TRUE) { + + # A degeneration of the token way found in the database + + # Add the data ... + $return_data_degenerates[$token][$degenerate] = $this->_parse_count($token_data[$degenerate]); + + # ... and update it's lastseen parameter + $this->_update($degenerate, "{$return_data_degenerates[$token][$degenerate]['count_ham']} {$return_data_degenerates[$token][$degenerate]['count_spam']} " . $this->b8_config['today']); + + } + + } + + } + + } + + # Now, all token data directly found in the database is in $return_data_tokens + # and all data for degenerated versions is in $return_data_degenerates + + # First, we commit the changes to the lastseen parameters + $this->_commit(); + + # Then, we return what we have + return array( + 'tokens' => $return_data_tokens, + 'degenerates' => $return_data_degenerates + ); + + } + + /** + * Stores or deletes a list of tokens from the given category. + * + * @access public + * @param array $tokens + * @param const $category Either b8::HAM or b8::SPAM + * @param const $action Either b8::LEARN or b8::UNLEARN + * @return void + */ + + public function process_text($tokens, $category, $action) + { + + # Validate the startup + + $started_up = $this->validate(); + + if($started_up !== TRUE) + return $started_up; + + # No matter what we do, we first have to check what data we have. + + # First get the internals, including the ham texts and spam texts counter + $internals = $this->get_internals(); + + # Then, fetch all data for all tokens we have (and update their lastseen parameters) + $token_data = $this->_get_query(array_keys($tokens)); + + # Process all tokens to learn/unlearn + + foreach($tokens as $token => $count) { + + if(isset($token_data[$token])) { + + # We already have this token, so update it's data + + # Get the existing data + list($count_ham, $count_spam, $lastseen) = explode(' ', $token_data[$token]); + $count_ham = (int) $count_ham; + $count_spam = (int) $count_spam; + + # Increase or decrease the right counter + + if($action === b8::LEARN) { + if($category === b8::HAM) + $count_ham += $count; + elseif($category === b8::SPAM) + $count_spam += $count; + } + + elseif($action == b8::UNLEARN) { + if($category === b8::HAM) + $count_ham -= $count; + elseif($category === b8::SPAM) + $count_spam -= $count; + } + + # We don't want to have negative values + + if($count_ham < 0) + $count_ham = 0; + + if($count_spam < 0) + $count_spam = 0; + + # Now let's see if we have to update or delete the token + if($count_ham !== 0 or $count_spam !== 0) + $this->_update($token, "$count_ham $count_spam " . $this->b8_config['today']); + else + $this->_del($token); + + } + + else { + + # We don't have the token. If we unlearn a text, we can't delete it + # as we don't have it anyway, so just do something if we learn a text + + if($action === b8::LEARN) { + + if($category === b8::HAM) + $data = '1 0 '; + elseif($category === b8::SPAM) + $data = '0 1 '; + + $data .= $this->b8_config['today']; + + $this->_put($token, $data); + + } + + } + + } + + # Now, all token have been processed, so let's update the right text + + if($action === b8::LEARN) { + + if($category === b8::HAM) { + $internals['texts_ham']++; + $this->_update(self::INTERNALS_TEXTS_HAM, $internals['texts_ham']); + } + + elseif($category === b8::SPAM) { + $internals['texts_spam']++; + $this->_update(self::INTERNALS_TEXTS_SPAM, $internals['texts_spam']); + } + + } + + elseif($action == b8::UNLEARN) { + + if($category === b8::HAM) { + + $internals['texts_ham']--; + + if($internals['texts_ham'] < 0) + $internals['texts_ham'] = 0; + + $this->_update(self::INTERNALS_TEXTS_HAM, $internals['texts_ham']); + + } + + elseif($category === b8::SPAM) { + + $internals['texts_spam']--; + + if($internals['texts_spam'] < 0) + $internals['texts_spam'] = 0; + + $this->_update(self::INTERNALS_TEXTS_SPAM, $internals['texts_spam']); + + } + + } + + # We're done and can commit all changes to the database now + $this->_commit(); + + } + +} + +?> \ No newline at end of file diff --git a/library/spam/b8/storage/storage_frndc.php b/library/spam/b8/storage/storage_frndc.php new file mode 100644 index 0000000000..0225363509 --- /dev/null +++ b/library/spam/b8/storage/storage_frndc.php @@ -0,0 +1,351 @@ + +# +# This file is part of the b8 package +# +# This program is free software; you can redistribute it and/or modify it +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation in version 2.1 of the License. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY +# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public +# License for more details. +# +# You should have received a copy of the GNU Lesser General Public License +# along with this program; if not, write to the Free Software Foundation, +# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + +/** + * The MySQL abstraction layer for communicating with the database. + * Copyright (C) 2009 Oliver Lillie (aka buggedcom) + * Copyright (C) 2010-2011 Tobias Leupold + * + * @license LGPL + * @access public + * @package b8 + * @author Oliver Lillie (aka buggedcom) (original PHP 5 port and optimizations) + * @author Tobias Leupold + */ + +class b8_storage_mysql extends b8_storage_base +{ + + public $config = array( + 'database' => 'b8_wordlist', + 'table_name' => 'b8_wordlist', + 'host' => 'localhost', + 'user' => FALSE, + 'pass' => FALSE, + 'connection' => NULL + ); + + public $b8_config = array( + 'degenerator' => NULL, + 'today' => NULL + ); + + private $_connection = NULL; + private $_deletes = array(); + private $_puts = array(); + private $_updates = array(); + + const DATABASE_CONNECTION_FAIL = 'DATABASE_CONNECTION_FAIL'; + const DATABASE_CONNECTION_ERROR = 'DATABASE_CONNECTION_ERROR'; + const DATABASE_CONNECTION_BAD_RESOURCE = 'DATABASE_CONNECTION_BAD_RESOURCE'; + const DATABASE_SELECT_ERROR = 'DATABASE_SELECT_ERROR'; + const DATABASE_TABLE_ACCESS_FAIL = 'DATABASE_TABLE_ACCESS_FAIL'; + const DATABASE_WRONG_VERSION = 'DATABASE_WRONG_VERSION'; + + /** + * Constructs the database layer. + * + * @access public + * @param string $config + */ + + function __construct($config, $degenerator, $today) + { + + # Pass some variables of the main b8 config to this class + $this->b8_config['degenerator'] = $degenerator; + $this->b8_config['today'] = $today; + + # Validate the config items + + if(count($config) > 0) { + + foreach ($config as $name => $value) { + + switch($name) { + + case 'table_name': + case 'host': + case 'user': + case 'pass': + case 'database': + $this->config[$name] = (string) $value; + break; + + case 'connection': + + if($value !== NULL) { + + if(is_resource($value) === TRUE) { + $resource_type = get_resource_type($value); + $this->config['connection'] = $resource_type !== 'mysql link' && $resource_type !== 'mysql link persistent' ? FALSE : $value; + } + + else + $this->config['connection'] = FALSE; + + } + + break; + + } + + } + + } + + } + + /** + * Closes the database connection. + * + * @access public + * @return void + */ + + function __destruct() + { + + if($this->_connection === NULL) + return; + + # Commit any changes before closing + $this->_commit(); + + # Just close the connection if no link-resource was passed and b8 created it's own connection + if($this->config['connection'] === NULL) + mysql_close($this->_connection); + + $this->connected = FALSE; + + } + + /** + * Connect to the database and do some checks. + * + * @access public + * @return mixed Returns TRUE on a successful database connection, otherwise returns a constant from b8. + */ + + public function connect() + { + + # Are we already connected? + if($this->connected === TRUE) + return TRUE; + + # Are we using an existing passed resource? + if($this->config['connection'] === FALSE) { + # ... yes we are, but the connection is not a resource, so return an error + $this->connected = FALSE; + return self::DATABASE_CONNECTION_BAD_RESOURCE; + } + + elseif($this->config['connection'] === NULL) { + + # ... no we aren't so we have to connect. + + if($this->_connection = mysql_connect($this->config['host'], $this->config['user'], $this->config['pass'])) { + if(mysql_select_db($this->config['database'], $this->_connection) === FALSE) { + $this->connected = FALSE; + return self::DATABASE_SELECT_ERROR . ": " . mysql_error(); + } + } + else { + $this->connected = FALSE; + return self::DATABASE_CONNECTION_ERROR; + } + + } + + else { + # ... yes we are + $this->_connection = $this->config['connection']; + } + + # Just in case ... + if($this->_connection === NULL) { + $this->connected = FALSE; + return self::DATABASE_CONNECTION_FAIL; + } + + # Check to see if the wordlist table exists + if(mysql_query('DESCRIBE ' . $this->config['table_name'], $this->_connection) === FALSE) { + $this->connected = FALSE; + return self::DATABASE_TABLE_ACCESS_FAIL . ": " . mysql_error(); + } + + # Everything is okay and connected + $this->connected = TRUE; + + # Let's see if this is a b8 database and the version is okay + return $this->check_database(); + + } + + /** + * Does the actual interaction with the database when fetching data. + * + * @access protected + * @param array $tokens + * @return mixed Returns an array of the returned data in the format array(token => data) or an empty array if there was no data. + */ + + protected function _get_query($tokens) + { + + # Construct the query ... + + if(count($tokens) > 0) { + + $where = array(); + + foreach ($tokens as $token) { + $token = mysql_real_escape_string($token, $this->_connection); + array_push($where, $token); + } + + $where = 'token IN ("' . implode('", "', $where) . '")'; + } + + else { + $token = mysql_real_escape_string($token, $this->_connection); + $where = 'token = "' . $token . '"'; + } + + # ... and fetch the data + + $result = mysql_query(' + SELECT token, count + FROM ' . $this->config['table_name'] . ' + WHERE ' . $where . '; + ', $this->_connection); + + $data = array(); + + while ($row = mysql_fetch_array($result, MYSQL_ASSOC)) + $data[$row['token']] = $row['count']; + + mysql_free_result($result); + + return $data; + + } + + /** + * Store a token to the database. + * + * @access protected + * @param string $token + * @param string $count + * @return void + */ + + protected function _put($token, $count) { + $token = mysql_real_escape_string($token, $this->_connection); + $count = mysql_real_escape_string($count, $this->_connection);; + array_push($this->_puts, '("' . $token . '", "' . $count . '")'); + } + + /** + * Update an existing token. + * + * @access protected + * @param string $token + * @param string $count + * @return void + */ + + protected function _update($token, $count) + { + $token = mysql_real_escape_string($token, $this->_connection); + $count = mysql_real_escape_string($count, $this->_connection); + array_push($this->_updates, '("' . $token . '", "' . $count . '")'); + } + + /** + * Remove a token from the database. + * + * @access protected + * @param string $token + * @return void + */ + + protected function _del($token) + { + $token = mysql_real_escape_string($token, $this->_connection); + array_push($this->_deletes, $token); + } + + /** + * Commits any modification queries. + * + * @access protected + * @return void + */ + + protected function _commit() + { + + if(count($this->_deletes) > 0) { + + $result = mysql_query(' + DELETE FROM ' . $this->config['table_name'] . ' + WHERE token IN ("' . implode('", "', $this->_deletes) . '"); + ', $this->_connection); + + if(is_resource($result) === TRUE) + mysql_free_result($result); + + $this->_deletes = array(); + + } + + if(count($this->_puts) > 0) { + + $result = mysql_query(' + INSERT INTO ' . $this->config['table_name'] . '(token, count) + VALUES ' . implode(', ', $this->_puts) . ';', $this->_connection); + + if(is_resource($result) === TRUE) + mysql_free_result($result); + + $this->_puts = array(); + + } + + if(count($this->_updates) > 0) { + + $result = mysql_query(' + INSERT INTO ' . $this->config['table_name'] . '(token, count) + VALUES ' . implode(', ', $this->_updates) . ' + ON DUPLICATE KEY UPDATE ' . $this->config['table_name'] . '.count = VALUES(count);', $this->_connection); + + if(is_resource($result) === TRUE) + mysql_free_result($result); + + $this->_updates = array(); + + } + + } + +} + +?> \ No newline at end of file From f57fa90228f3861946c107982e50c8dd18314e96 Mon Sep 17 00:00:00 2001 From: friendica Date: Wed, 1 Feb 2012 20:37:05 -0800 Subject: [PATCH 017/119] more work on Friendica db driver for b8 --- library/spam/b8/storage/storage_base.php | 4 +- library/spam/b8/storage/storage_frndc.php | 81 +++++++++++------------ 2 files changed, 39 insertions(+), 46 deletions(-) diff --git a/library/spam/b8/storage/storage_base.php b/library/spam/b8/storage/storage_base.php index 49132751b6..6b181ee96e 100644 --- a/library/spam/b8/storage/storage_base.php +++ b/library/spam/b8/storage/storage_base.php @@ -318,7 +318,7 @@ abstract class b8_storage_base if($count_ham !== 0 or $count_spam !== 0) $this->_update($token, "$count_ham $count_spam " . $this->b8_config['today'], $uid); else - $this->_del($token); + $this->_del($token, $uid); } @@ -387,7 +387,7 @@ abstract class b8_storage_base } # We're done and can commit all changes to the database now - $this->_commit(); + $this->_commit($uid); } diff --git a/library/spam/b8/storage/storage_frndc.php b/library/spam/b8/storage/storage_frndc.php index 0225363509..2b9374f678 100644 --- a/library/spam/b8/storage/storage_frndc.php +++ b/library/spam/b8/storage/storage_frndc.php @@ -29,7 +29,7 @@ * @author Tobias Leupold */ -class b8_storage_mysql extends b8_storage_base +class b8_storage_frndc extends b8_storage_base { public $config = array( @@ -50,6 +50,7 @@ class b8_storage_mysql extends b8_storage_base private $_deletes = array(); private $_puts = array(); private $_updates = array(); + private $uid = 0; const DATABASE_CONNECTION_FAIL = 'DATABASE_CONNECTION_FAIL'; const DATABASE_CONNECTION_ERROR = 'DATABASE_CONNECTION_ERROR'; @@ -146,6 +147,8 @@ class b8_storage_mysql extends b8_storage_base public function connect() { + return TRUE; + # Are we already connected? if($this->connected === TRUE) return TRUE; @@ -207,7 +210,7 @@ class b8_storage_mysql extends b8_storage_base * @return mixed Returns an array of the returned data in the format array(token => data) or an empty array if there was no data. */ - protected function _get_query($tokens) + protected function _get_query($tokens, $uid) { # Construct the query ... @@ -217,7 +220,7 @@ class b8_storage_mysql extends b8_storage_base $where = array(); foreach ($tokens as $token) { - $token = mysql_real_escape_string($token, $this->_connection); + $token = dbesc($token); array_push($where, $token); } @@ -225,26 +228,18 @@ class b8_storage_mysql extends b8_storage_base } else { - $token = mysql_real_escape_string($token, $this->_connection); + $token = dbesc($token); $where = 'token = "' . $token . '"'; } # ... and fetch the data - $result = mysql_query(' + $result = q(' SELECT token, count FROM ' . $this->config['table_name'] . ' - WHERE ' . $where . '; - ', $this->_connection); + WHERE ' . $where . ' AND uid = ' . $uid ); - $data = array(); - - while ($row = mysql_fetch_array($result, MYSQL_ASSOC)) - $data[$row['token']] = $row['count']; - - mysql_free_result($result); - - return $data; + return $result; } @@ -257,10 +252,11 @@ class b8_storage_mysql extends b8_storage_base * @return void */ - protected function _put($token, $count) { - $token = mysql_real_escape_string($token, $this->_connection); - $count = mysql_real_escape_string($count, $this->_connection);; - array_push($this->_puts, '("' . $token . '", "' . $count . '")'); + protected function _put($token, $count, $uid) { + $token = dbesc($token); + $count = dbesc($count); + $uid = dbesc($uid); + array_push($this->_puts, '("' . $token . '", "' . $count . '", '"' . $uid .'")'); } /** @@ -272,11 +268,12 @@ class b8_storage_mysql extends b8_storage_base * @return void */ - protected function _update($token, $count) + protected function _update($token, $count, $uid) { - $token = mysql_real_escape_string($token, $this->_connection); - $count = mysql_real_escape_string($count, $this->_connection); - array_push($this->_updates, '("' . $token . '", "' . $count . '")'); + $token = dbesc($token); + $count = dbesc($count); + $uid = dbesc($uid); + array_push($this->_puts, '("' . $token . '", "' . $count . '", '"' . $uid .'")'); } /** @@ -287,9 +284,11 @@ class b8_storage_mysql extends b8_storage_base * @return void */ - protected function _del($token) + protected function _del($token, $uid) { - $token = mysql_real_escape_string($token, $this->_connection); + $token = dbesc($token); + $uid = dbesc($uid); + $this->uid = $uid; array_push($this->_deletes, $token); } @@ -300,18 +299,14 @@ class b8_storage_mysql extends b8_storage_base * @return void */ - protected function _commit() + protected function _commit($uid) { if(count($this->_deletes) > 0) { - $result = mysql_query(' + $result = q(' DELETE FROM ' . $this->config['table_name'] . ' - WHERE token IN ("' . implode('", "', $this->_deletes) . '"); - ', $this->_connection); - - if(is_resource($result) === TRUE) - mysql_free_result($result); + WHERE token IN ("' . implode('", "', $this->_deletes) . '") AND uid = ' . $this->uid); $this->_deletes = array(); @@ -319,12 +314,9 @@ class b8_storage_mysql extends b8_storage_base if(count($this->_puts) > 0) { - $result = mysql_query(' - INSERT INTO ' . $this->config['table_name'] . '(token, count) - VALUES ' . implode(', ', $this->_puts) . ';', $this->_connection); - - if(is_resource($result) === TRUE) - mysql_free_result($result); + $result = q(' + INSERT INTO ' . $this->config['table_name'] . '(token, count, uid) + VALUES ' . implode(', ', $this->_puts)); $this->_puts = array(); @@ -332,13 +324,14 @@ class b8_storage_mysql extends b8_storage_base if(count($this->_updates) > 0) { - $result = mysql_query(' - INSERT INTO ' . $this->config['table_name'] . '(token, count) - VALUES ' . implode(', ', $this->_updates) . ' - ON DUPLICATE KEY UPDATE ' . $this->config['table_name'] . '.count = VALUES(count);', $this->_connection); + // this still needs work + $result = q("select * from " . $this->config['table_name'] . ' where token = '; - if(is_resource($result) === TRUE) - mysql_free_result($result); + + $result = q(' + INSERT INTO ' . $this->config['table_name'] . '(token, count, uid) + VALUES ' . implode(', ', $this->_updates) . ', ' . $uid . ' + ON DUPLICATE KEY UPDATE ' . $this->config['table_name'] . '.count = VALUES(count);', $this->_connection); $this->_updates = array(); From 4cf6bd54693b460f3ac28d2760ff33b740493e39 Mon Sep 17 00:00:00 2001 From: friendica Date: Thu, 2 Feb 2012 18:02:08 -0800 Subject: [PATCH 018/119] do an optimise after an expunge --- boot.php | 2 +- include/expire.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/boot.php b/boot.php index 9b192853c5..fc53a026db 100755 --- a/boot.php +++ b/boot.php @@ -9,7 +9,7 @@ require_once('include/nav.php'); require_once('include/cache.php'); define ( 'FRIENDICA_PLATFORM', 'Friendica'); -define ( 'FRIENDICA_VERSION', '2.3.1242' ); +define ( 'FRIENDICA_VERSION', '2.3.1243' ); define ( 'DFRN_PROTOCOL_VERSION', '2.22' ); define ( 'DB_UPDATE_VERSION', 1119 ); diff --git a/include/expire.php b/include/expire.php index 7608b90546..5fa0ec758b 100755 --- a/include/expire.php +++ b/include/expire.php @@ -29,10 +29,10 @@ function expire_run($argv, $argc){ $a->set_baseurl(get_config('system','url')); - // physically remove anything that has been deleted from more than two months + // physically remove anything that has been deleted for more than two months $r = q("delete from item where deleted = 1 and changed < UTC_TIMESTAMP() - INTERVAL 60 DAY"); - + q("optimize table item"); logger('expire: start'); From b12e598dba54c81a8d91d7fbd5f68922099585e1 Mon Sep 17 00:00:00 2001 From: friendica Date: Sun, 5 Feb 2012 14:30:24 -0800 Subject: [PATCH 019/119] roll update 1118 forward, enable update 1119 --- boot.php | 2 +- update.php | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/boot.php b/boot.php index fc53a026db..a861dff678 100755 --- a/boot.php +++ b/boot.php @@ -11,7 +11,7 @@ require_once('include/cache.php'); define ( 'FRIENDICA_PLATFORM', 'Friendica'); define ( 'FRIENDICA_VERSION', '2.3.1243' ); define ( 'DFRN_PROTOCOL_VERSION', '2.22' ); -define ( 'DB_UPDATE_VERSION', 1119 ); +define ( 'DB_UPDATE_VERSION', 1120 ); define ( 'EOL', "
\r\n" ); define ( 'ATOM_TIME', 'Y-m-d\TH:i:s\Z' ); diff --git a/update.php b/update.php index d0fe1645b1..dc3cc0e562 100755 --- a/update.php +++ b/update.php @@ -1,6 +1,6 @@ Date: Sun, 5 Feb 2012 17:38:32 -0800 Subject: [PATCH 020/119] style missing on crepair-name --- view/theme/duepuntozero/style.css | 2 ++ 1 file changed, 2 insertions(+) diff --git a/view/theme/duepuntozero/style.css b/view/theme/duepuntozero/style.css index 1a96e7f17f..66809a8d81 100755 --- a/view/theme/duepuntozero/style.css +++ b/view/theme/duepuntozero/style.css @@ -2535,6 +2535,7 @@ aside input[type='text'] { margin-top: 15px; } +#crepair-name-label, #crepair-nick-label, #crepair-attag-label, #crepair-url-label, @@ -2548,6 +2549,7 @@ aside input[type='text'] { margin-bottom: 15px; } +#crepair-name, #crepair-nick, #crepair-attag, #crepair-url, From 3d099bd99abe6431103112bfe1eafd96a61c6767 Mon Sep 17 00:00:00 2001 From: friendica Date: Mon, 6 Feb 2012 01:08:00 -0800 Subject: [PATCH 021/119] beer --- images/beer_mug.gif | Bin 0 -> 1032 bytes include/text.php | 4 ++++ 2 files changed, 4 insertions(+) create mode 100644 images/beer_mug.gif diff --git a/images/beer_mug.gif b/images/beer_mug.gif new file mode 100644 index 0000000000000000000000000000000000000000..a047d19873064afb3370f96d1a9a04ab5cec4c87 GIT binary patch literal 1032 zcmW+#Z)g`(6unH#1-TZRK~O!3LU{BgBg%f!(+LxaOlY@YSue3d`Vd4>LB##dz|n_@ zniGQR{R(UAG;~N2SmTYz0vo9C`eMP8{(v7UR(;SYI=$_{6?9imceQlet-FH79~M76wd@0YppW9C`UoHCO}wc$c%x6^lllao=(G5&KEr4F zD!!_(@Rgq8sh;qpim0dxRH#nWsXC~m2GO7zpn)1iqiTdks)?GaL5-S3lWKw{Y8K6^ z8Jek8w5nEUrBaltgpwv=O)W5?IWec^V2&2Vf?9wDS`>?F5f*7CW@-jAS`tfY36^MC zEURT$rd6@3R$-M!X+s%dBt#$z0fcY@r*MEHf*>dY5Qr#5+qTwNLI;^OsOJO zr9vuOj+*6O#EW`qgx-mF>K(kJ58{LJpXFZfNQ*RE&YNPjwAxt1E$y-Wgdvgs--K8E zJ9+-yjjvq1a^d(L^Y3lle)iFwhxVTy?3-M3b^pj?$M)@b3coLWdFk|-(W%QXyLR() z=WiU{UjADc>2}YZd}!U;H^y%6KezSu0|WiH|2(*@w-3K=d-mi5-%d=g8yy%fGv)Xb zAB_C+$4_J5;qdzP`pENh!?U|ye%r6@?4HxPcmBL?`LA-r!xIPkrtdnqVR+Ng`=2@S zRp*-Vk9M6Mn7!}rOLYNf=1-iOdho);ORrsZ;nT?tT@M?;Pw+ z{W#NqWZ;Vzj*UJ3{n5|goO^N0z0>|y?0I_6p_z@-{?*PWpUwaM@&23E^hxJ`*5Lx1 literal 0 HcmV?d00001 diff --git a/include/text.php b/include/text.php index 5f4adb27c3..70733bac5a 100755 --- a/include/text.php +++ b/include/text.php @@ -679,6 +679,7 @@ function smilies($s) { $s = str_replace( array( '<3', '</3', '<\\3', ':-)', ':)', ';-)', ':-(', ':(', ':-P', ':P', ':-"', ':-x', ':-X', ':-D', '8-|', '8-O', '\\o/', 'o.O', 'O.o', '\\.../', '\\ooo/', +// ':beer', ':homebrew', '~friendika', '~friendica', 'Diaspora*' ), array( '<3', @@ -702,6 +703,9 @@ function smilies($s) { 'O.o', '\\.../', '\\ooo/', +// ':beer', +// ':homebrew', + '~friendika ~friendika', '~friendica ~friendica', 'DiasporaDiaspora*', From 76308eca675505aa899ad647794b22b583bc698b Mon Sep 17 00:00:00 2001 From: friendica Date: Mon, 6 Feb 2012 16:41:05 -0800 Subject: [PATCH 022/119] add toggle to choose sending "friends with" activity even if contact is not hidden --- boot.php | 2 +- mod/dfrn_confirm.php | 87 ++++++++++++++++++++++--------------------- mod/notifications.php | 3 ++ view/intros.tpl | 1 + 4 files changed, 50 insertions(+), 43 deletions(-) diff --git a/boot.php b/boot.php index a861dff678..647290756b 100755 --- a/boot.php +++ b/boot.php @@ -9,7 +9,7 @@ require_once('include/nav.php'); require_once('include/cache.php'); define ( 'FRIENDICA_PLATFORM', 'Friendica'); -define ( 'FRIENDICA_VERSION', '2.3.1243' ); +define ( 'FRIENDICA_VERSION', '2.3.1244' ); define ( 'DFRN_PROTOCOL_VERSION', '2.22' ); define ( 'DB_UPDATE_VERSION', 1120 ); diff --git a/mod/dfrn_confirm.php b/mod/dfrn_confirm.php index 26314f39be..abacd9906c 100755 --- a/mod/dfrn_confirm.php +++ b/mod/dfrn_confirm.php @@ -72,6 +72,7 @@ function dfrn_confirm_post(&$a,$handsfree = null) { $intro_id = $handsfree['intro_id']; $duplex = $handsfree['duplex']; $hidden = ((array_key_exists('hidden',$handsfree)) ? intval($handsfree['hidden']) : 0 ); + $activity = ((array_key_exists('activity',$handsfree)) ? intval($handsfree['activity']) : 0 ); } else { $dfrn_id = ((x($_POST,'dfrn_id')) ? notags(trim($_POST['dfrn_id'])) : ""); @@ -79,6 +80,7 @@ function dfrn_confirm_post(&$a,$handsfree = null) { $duplex = ((x($_POST,'duplex')) ? intval($_POST['duplex']) : 0 ); $cid = ((x($_POST,'contact_id')) ? intval($_POST['contact_id']) : 0 ); $hidden = ((x($_POST,'hidden')) ? intval($_POST['hidden']) : 0 ); + $activity = ((x($_POST,'activity')) ? intval($_POST['activity']) : 0 ); } /** @@ -428,64 +430,65 @@ function dfrn_confirm_post(&$a,$handsfree = null) { else $contact = null; - // Send a new friend post if we are allowed to... + if(isset($new_relation) && $new_relation == CONTACT_IS_FRIEND) { - $r = q("SELECT `hide-friends` FROM `profile` WHERE `uid` = %d AND `is-default` = 1 LIMIT 1", - intval($uid) - ); - if((count($r)) && (! $hidden) && ($r[0]['hide-friends'] == 0) && (is_array($contact)) && isset($new_relation) && ($new_relation == CONTACT_IS_FRIEND)) { - - if($r[0]['network'] === NETWORK_DIASPORA) { + if(($contact) && ($contact['network'] === NETWORK_DIASPORA)) { require_once('include/diaspora.php'); $ret = diaspora_share($user[0],$r[0]); logger('mod_follow: diaspora_share returns: ' . $ret); } - require_once('include/items.php'); + // Send a new friend post if we are allowed to... - $self = q("SELECT * FROM `contact` WHERE `self` = 1 AND `uid` = %d LIMIT 1", + $r = q("SELECT `hide-friends` FROM `profile` WHERE `uid` = %d AND `is-default` = 1 LIMIT 1", intval($uid) ); + if((count($r)) && ($activity) && (! $hidden)) { - if(count($self)) { + require_once('include/items.php'); - $arr = array(); - $arr['uri'] = $arr['parent-uri'] = item_new_uri($a->get_hostname(), $uid); - $arr['uid'] = $uid; - $arr['contact-id'] = $self[0]['id']; - $arr['wall'] = 1; - $arr['type'] = 'wall'; - $arr['gravity'] = 0; - $arr['origin'] = 1; - $arr['author-name'] = $arr['owner-name'] = $self[0]['name']; - $arr['author-link'] = $arr['owner-link'] = $self[0]['url']; - $arr['author-avatar'] = $arr['owner-avatar'] = $self[0]['thumb']; - $arr['verb'] = ACTIVITY_FRIEND; - $arr['object-type'] = ACTIVITY_OBJ_PERSON; + $self = q("SELECT * FROM `contact` WHERE `self` = 1 AND `uid` = %d LIMIT 1", + intval($uid) + ); + + if(count($self)) { + + $arr = array(); + $arr['uri'] = $arr['parent-uri'] = item_new_uri($a->get_hostname(), $uid); + $arr['uid'] = $uid; + $arr['contact-id'] = $self[0]['id']; + $arr['wall'] = 1; + $arr['type'] = 'wall'; + $arr['gravity'] = 0; + $arr['origin'] = 1; + $arr['author-name'] = $arr['owner-name'] = $self[0]['name']; + $arr['author-link'] = $arr['owner-link'] = $self[0]['url']; + $arr['author-avatar'] = $arr['owner-avatar'] = $self[0]['thumb']; + $arr['verb'] = ACTIVITY_FRIEND; + $arr['object-type'] = ACTIVITY_OBJ_PERSON; - $A = '[url=' . $self[0]['url'] . ']' . $self[0]['name'] . '[/url]'; - $B = '[url=' . $contact['url'] . ']' . $contact['name'] . '[/url]'; - $BPhoto = '[url=' . $contact['url'] . ']' . '[img]' . $contact['thumb'] . '[/img][/url]'; - $arr['body'] = sprintf( t('%1$s is now friends with %2$s'), $A, $B)."\n\n\n".$BPhoto; + $A = '[url=' . $self[0]['url'] . ']' . $self[0]['name'] . '[/url]'; + $B = '[url=' . $contact['url'] . ']' . $contact['name'] . '[/url]'; + $BPhoto = '[url=' . $contact['url'] . ']' . '[img]' . $contact['thumb'] . '[/img][/url]'; + $arr['body'] = sprintf( t('%1$s is now friends with %2$s'), $A, $B)."\n\n\n".$BPhoto; - $arr['object'] = '' . ACTIVITY_OBJ_PERSON . '' . $contact['name'] . '' - . '' . $contact['url'] . '/' . $contact['name'] . ''; - $arr['object'] .= '' . xmlify('' . "\n"); - $arr['object'] .= xmlify('' . "\n"); - $arr['object'] .= '' . "\n"; - $arr['last-child'] = 1; + $arr['object'] = '' . ACTIVITY_OBJ_PERSON . '' . $contact['name'] . '' + . '' . $contact['url'] . '/' . $contact['name'] . ''; + $arr['object'] .= '' . xmlify('' . "\n"); + $arr['object'] .= xmlify('' . "\n"); + $arr['object'] .= '' . "\n"; + $arr['last-child'] = 1; - $arr['allow_cid'] = $user[0]['allow_cid']; - $arr['allow_gid'] = $user[0]['allow_gid']; - $arr['deny_cid'] = $user[0]['deny_cid']; - $arr['deny_gid'] = $user[0]['deny_gid']; - - $i = item_store($arr); - if($i) - proc_run('php',"include/notifier.php","activity","$i"); + $arr['allow_cid'] = $user[0]['allow_cid']; + $arr['allow_gid'] = $user[0]['allow_gid']; + $arr['deny_cid'] = $user[0]['deny_cid']; + $arr['deny_gid'] = $user[0]['deny_gid']; + $i = item_store($arr); + if($i) + proc_run('php',"include/notifier.php","activity","$i"); + } } - } // Let's send our user to the contact editor in case they want to // do anything special with this new friend. diff --git a/mod/notifications.php b/mod/notifications.php index 82d450a880..635639d892 100755 --- a/mod/notifications.php +++ b/mod/notifications.php @@ -142,6 +142,8 @@ function notifications_content(&$a) { '$fullname' => $rr['fname'], '$url' => $rr['furl'], '$hidden' => array('hidden', t('Hide this contact from others'), ($rr['hidden'] == 1), ''), + '$activity' => array('activity', t('Post a new friend activity'), 1, t('if applicable')), + '$knowyou' => $knowyou, '$approve' => t('Approve'), '$note' => $rr['note'], @@ -187,6 +189,7 @@ function notifications_content(&$a) { '$photo' => ((x($rr,'photo')) ? $rr['photo'] : "images/default-profile.jpg"), '$fullname' => $rr['name'], '$hidden' => array('hidden', t('Hide this contact from others'), ($rr['hidden'] == 1), ''), + '$activity' => array('activity', t('Post a new friend activity'), 1, t('if applicable')), '$url' => $rr['url'], '$knowyou' => $knowyou, '$approve' => t('Approve'), diff --git a/view/intros.tpl b/view/intros.tpl index d02fd57e6d..e7fd53ca4f 100755 --- a/view/intros.tpl +++ b/view/intros.tpl @@ -15,6 +15,7 @@
{{inc field_checkbox.tpl with $field=$hidden }}{{endinc}} +{{inc field_checkbox.tpl with $field=$activity }}{{endinc}} From 2b77002471fc9b2e1ad3e8dd69d373cc910e8834 Mon Sep 17 00:00:00 2001 From: friendica Date: Mon, 6 Feb 2012 20:28:50 -0800 Subject: [PATCH 023/119] basic support for plaintext editor configuration (disable tinymce), currently only zero themes - and not all the post tools currently work (as some of them emit html). --- include/conversation.php | 162 ++++++++++++++++++++------------------- view/jot-header.tpl | 40 +++++++--- 2 files changed, 114 insertions(+), 88 deletions(-) diff --git a/include/conversation.php b/include/conversation.php index 20c7b2a511..6defefc731 100755 --- a/include/conversation.php +++ b/include/conversation.php @@ -838,98 +838,102 @@ function status_editor($a,$x, $notes_cid = 0) { $geotag = (($x['allow_location']) ? get_markup_template('jot_geotag.tpl') : ''); - $tpl = get_markup_template('jot-header.tpl'); + $plaintext = false; + if(local_user() && intval(get_pconfig(local_user(),'system','plaintext'))) + $plaintext = true; + + $tpl = get_markup_template('jot-header.tpl'); - $a->page['htmlhead'] .= replace_macros($tpl, array( - '$newpost' => 'true', - '$baseurl' => $a->get_baseurl(), - '$geotag' => $geotag, - '$nickname' => $x['nickname'], - '$ispublic' => t('Visible to everybody'), - '$linkurl' => t('Please enter a link URL:'), - '$vidurl' => t("Please enter a video link/URL:"), - '$audurl' => t("Please enter an audio link/URL:"), - '$term' => t('Tag term:'), - '$whereareu' => t('Where are you right now?'), - '$title' => t('Enter a title for this item') - )); + $a->page['htmlhead'] .= replace_macros($tpl, array( + '$newpost' => 'true', + '$baseurl' => $a->get_baseurl(), + '$editselect' => (($plaintext) ? 'none' : '/(profile-jot-text|prvmail-text)/'), + '$geotag' => $geotag, + '$nickname' => $x['nickname'], + '$ispublic' => t('Visible to everybody'), + '$linkurl' => t('Please enter a link URL:'), + '$vidurl' => t("Please enter a video link/URL:"), + '$audurl' => t("Please enter an audio link/URL:"), + '$term' => t('Tag term:'), + '$whereareu' => t('Where are you right now?'), + '$title' => t('Enter a title for this item') + )); - $tpl = get_markup_template("jot.tpl"); + $tpl = get_markup_template("jot.tpl"); - $jotplugins = ''; - $jotnets = ''; + $jotplugins = ''; + $jotnets = ''; - $mail_disabled = ((function_exists('imap_open') && (! get_config('system','imap_disabled'))) ? 0 : 1); + $mail_disabled = ((function_exists('imap_open') && (! get_config('system','imap_disabled'))) ? 0 : 1); - $mail_enabled = false; - $pubmail_enabled = false; + $mail_enabled = false; + $pubmail_enabled = false; - if(($x['is_owner']) && (! $mail_disabled)) { - $r = q("SELECT * FROM `mailacct` WHERE `uid` = %d AND `server` != '' LIMIT 1", - intval(local_user()) - ); - if(count($r)) { - $mail_enabled = true; - if(intval($r[0]['pubmail'])) - $pubmail_enabled = true; - } + if(($x['is_owner']) && (! $mail_disabled)) { + $r = q("SELECT * FROM `mailacct` WHERE `uid` = %d AND `server` != '' LIMIT 1", + intval(local_user()) + ); + if(count($r)) { + $mail_enabled = true; + if(intval($r[0]['pubmail'])) + $pubmail_enabled = true; } + } - if($mail_enabled) { - $selected = (($pubmail_enabled) ? ' checked="checked" ' : ''); - $jotnets .= '
' - . t("Post to Email") . '
'; - } + if($mail_enabled) { + $selected = (($pubmail_enabled) ? ' checked="checked" ' : ''); + $jotnets .= '
' . t("Post to Email") . '
'; + } - call_hooks('jot_tool', $jotplugins); - call_hooks('jot_networks', $jotnets); + call_hooks('jot_tool', $jotplugins); + call_hooks('jot_networks', $jotnets); - if($notes_cid) - $jotnets .= ''; + if($notes_cid) + $jotnets .= ''; - $tpl = replace_macros($tpl,array('$jotplugins' => $jotplugins)); + $tpl = replace_macros($tpl,array('$jotplugins' => $jotplugins)); - $o .= replace_macros($tpl,array( - '$return_path' => $a->cmd, - '$action' => 'item', - '$share' => (($x['button']) ? $x['button'] : t('Share')), - '$upload' => t('Upload photo'), - '$shortupload' => t('upload photo'), - '$attach' => t('Attach file'), - '$shortattach' => t('attach file'), - '$weblink' => t('Insert web link'), - '$shortweblink' => t('web link'), - '$video' => t('Insert video link'), - '$shortvideo' => t('video link'), - '$audio' => t('Insert audio link'), - '$shortaudio' => t('audio link'), - '$setloc' => t('Set your location'), - '$shortsetloc' => t('set location'), - '$noloc' => t('Clear browser location'), - '$shortnoloc' => t('clear location'), - '$title' => "", - '$placeholdertitle' => t('Set title'), - '$wait' => t('Please wait'), - '$permset' => t('Permission settings'), - '$shortpermset' => t('permissions'), - '$ptyp' => (($notes_cid) ? 'note' : 'wall'), - '$content' => '', - '$post_id' => '', - '$baseurl' => $a->get_baseurl(), - '$defloc' => $x['default_location'], - '$visitor' => $x['visitor'], - '$pvisit' => (($notes_cid) ? 'none' : $x['visitor']), - '$emailcc' => t('CC: email addresses'), - '$public' => t('Public post'), - '$jotnets' => $jotnets, - '$emtitle' => t('Example: bob@example.com, mary@example.com'), - '$lockstate' => $x['lockstate'], - '$acl' => $x['acl'], - '$bang' => $x['bang'], - '$profile_uid' => $x['profile_uid'], - '$preview' => t('Preview'), - )); + $o .= replace_macros($tpl,array( + '$return_path' => $a->cmd, + '$action' => 'item', + '$share' => (($x['button']) ? $x['button'] : t('Share')), + '$upload' => t('Upload photo'), + '$shortupload' => t('upload photo'), + '$attach' => t('Attach file'), + '$shortattach' => t('attach file'), + '$weblink' => t('Insert web link'), + '$shortweblink' => t('web link'), + '$video' => t('Insert video link'), + '$shortvideo' => t('video link'), + '$audio' => t('Insert audio link'), + '$shortaudio' => t('audio link'), + '$setloc' => t('Set your location'), + '$shortsetloc' => t('set location'), + '$noloc' => t('Clear browser location'), + '$shortnoloc' => t('clear location'), + '$title' => "", + '$placeholdertitle' => t('Set title'), + '$wait' => t('Please wait'), + '$permset' => t('Permission settings'), + '$shortpermset' => t('permissions'), + '$ptyp' => (($notes_cid) ? 'note' : 'wall'), + '$content' => '', + '$post_id' => '', + '$baseurl' => $a->get_baseurl(), + '$defloc' => $x['default_location'], + '$visitor' => $x['visitor'], + '$pvisit' => (($notes_cid) ? 'none' : $x['visitor']), + '$emailcc' => t('CC: email addresses'), + '$public' => t('Public post'), + '$jotnets' => $jotnets, + '$emtitle' => t('Example: bob@example.com, mary@example.com'), + '$lockstate' => $x['lockstate'], + '$acl' => $x['acl'], + '$bang' => $x['bang'], + '$profile_uid' => $x['profile_uid'], + '$preview' => t('Preview'), + )); return $o; } diff --git a/view/jot-header.tpl b/view/jot-header.tpl index d998e977a4..22b4349166 100755 --- a/view/jot-header.tpl +++ b/view/jot-header.tpl @@ -3,14 +3,27 @@ var editor=false; var textlen = 0; +var plaintext = '$editselect'; function initEditor(cb){ if (editor==false){ - $("#profile-jot-text-loading").show(); + $("#profile-jot-text-loading").show(); + if(plaintext == 'none') { + $("#profile-jot-text-loading").hide(); + $("#profile-jot-text").css({ 'height': 200, 'color': '#000' }); + $(".jothidden").show(); + editor = true; + $("a#jot-perms-icon").fancybox({ + 'transitionIn' : 'elastic', + 'transitionOut' : 'elastic' + }); + if (typeof cb!="undefined") cb(); + return; + } tinyMCE.init({ theme : "advanced", mode : "specific_textareas", - editor_selector: /(profile-jot-text|prvmail-text)/, + editor_selector: $editselect, auto_focus: "profile-jot-text", plugins : "bbcode,paste,autoresize", theme_advanced_buttons1 : "bold,italic,underline,undo,redo,link,unlink,image,forecolor,formatselect,code", @@ -123,7 +136,7 @@ function enableOnUser(){ name: 'userfile', onSubmit: function(file,ext) { $('#profile-rotator').show(); }, onComplete: function(file,response) { - tinyMCE.execCommand('mceInsertRawHTML',false,response); + addeditortext(response); $('#profile-rotator').hide(); } } @@ -134,7 +147,7 @@ function enableOnUser(){ name: 'userfile', onSubmit: function(file,ext) { $('#profile-rotator').show(); }, onComplete: function(file,response) { - tinyMCE.execCommand('mceInsertRawHTML',false,response); + addeditortext(response); $('#profile-rotator').hide(); } } @@ -167,7 +180,7 @@ function enableOnUser(){ reply = bin2hex(reply); $('#profile-rotator').show(); $.get('parse_url?binurl=' + reply, function(data) { - tinyMCE.execCommand('mceInsertRawHTML',false,data); + addeditortext(data); $('#profile-rotator').hide(); }); } @@ -176,14 +189,14 @@ function enableOnUser(){ function jotVideoURL() { reply = prompt("$vidurl"); if(reply && reply.length) { - tinyMCE.execCommand('mceInsertRawHTML',false,'[video]' + reply + '[/video]'); + addeditortext('[video]' + reply + '[/video]'); } } function jotAudioURL() { reply = prompt("$audurl"); if(reply && reply.length) { - tinyMCE.execCommand('mceInsertRawHTML',false,'[audio]' + reply + '[/audio]'); + addeditortext('[audio]' + reply + '[/audio]'); } } @@ -200,7 +213,7 @@ function enableOnUser(){ $.get('share/' + id, function(data) { if (!editor) $("#profile-jot-text").val(""); initEditor(function(){ - tinyMCE.execCommand('mceInsertRawHTML',false,data); + addeditortext(data); $('#like-rotator-' + id).hide(); $(window).scrollTop(0); }); @@ -224,7 +237,7 @@ function enableOnUser(){ $.get('parse_url?binurl=' + reply, function(data) { if (!editor) $("#profile-jot-text").val(""); initEditor(function(){ - tinyMCE.execCommand('mceInsertRawHTML',false,data); + addeditortext(data); $('#profile-rotator').hide(); }); }); @@ -253,6 +266,15 @@ function enableOnUser(){ $('#profile-nolocation-wrapper').hide(); } + function addeditortext(data) { + if(plaintext == 'none') { + var currentText = $("#profile-jot-text").val(); + $("#profile-jot-text").val(currentText + data); + } + else + tinyMCE.execCommand('mceInsertRawHTML',false,data); + } + $geotag From c6cdad946eac99ced15cd8fa294ab0fdaa05f3a5 Mon Sep 17 00:00:00 2001 From: friendica Date: Tue, 7 Feb 2012 00:13:16 -0800 Subject: [PATCH 024/119] more fixes for textmode --- mod/parse_url.php | 40 ++++++++++++++++----- mod/wall_upload.php | 6 +++- view/theme/dispy/jot-header.tpl | 52 +++++++++++++++++++++++----- view/theme/testbubble/jot-header.tpl | 52 ++++++++++++++++++++++++---- 4 files changed, 126 insertions(+), 24 deletions(-) diff --git a/mod/parse_url.php b/mod/parse_url.php index 2df9de4763..e0b378f685 100755 --- a/mod/parse_url.php +++ b/mod/parse_url.php @@ -12,6 +12,13 @@ function parse_url_content(&$a) { $text = null; $str_tags = ''; + $textmode = false; + if(local_user() && intval(get_pconfig(local_user(),'system','plaintext'))) + $textmode = true; + + if($textmode) + $br = (($textmode) ? "\n" : '
'; + $str_tags = $br . implode(' ',$arr_tags) . $br; } } logger('parse_url: ' . $url); - $template = "
%s%s
"; + if($textmode) + $template = $br . '[bookmark=%s]%s[/bookmark]%s' . $br; + else + $template = "
%s%s
"; $arr = array('url' => $url, 'text' => ''); @@ -49,7 +59,11 @@ function parse_url_content(&$a) { if($url && $title && $text) { - $text = '

' . $text . '

'; + if($textmode) + $text = $br . $br . '[quote]' . $text . '[/quote]' . $br; + else + $text = '

' . $text . '

'; + $title = str_replace(array("\r","\n"),array('',''),$title); $result = sprintf($template,$url,($title) ? $title : $url,$text) . $str_tags; @@ -208,10 +222,17 @@ function parse_url_content(&$a) { $ph->scaleImage(300); $new_width = $ph->getWidth(); $new_height = $ph->getHeight(); - $image = '

photo'; + if($textmode) + $image = $br . $br . '[img=' . $new_width . 'x' . $new_height . ']' . $image . '[/img]'; + else + $image = '

photo'; + } + else { + if($textmode) + $image = $br . $br . '[img]' . $image . '[/img]'; + else + $image = '

photo'; } - else - $image = '

photo'; } else $image = ''; @@ -223,11 +244,14 @@ function parse_url_content(&$a) { } if(strlen($text)) { - $text = '

' . $text . '

'; + if($textmode) + $text = $br .$br . '[quote]' . $text . '[/quote]' . $br ; + else + $text = '

' . $text . '

'; } if($image) { - $text = $image . '
' . $text; + $text = $image . $br . $text; } $title = str_replace(array("\r","\n"),array('',''),$title); diff --git a/mod/wall_upload.php b/mod/wall_upload.php index b34f2cf6b0..278c213547 100755 --- a/mod/wall_upload.php +++ b/mod/wall_upload.php @@ -100,7 +100,11 @@ function wall_upload_post(&$a) { } $basename = basename($filename); - echo '

\"$basename\"

"; + + if(local_user() && intval(get_pconfig(local_user(),'system','plaintext'))) + echo "\n\n" . '[url=' . $a->get_baseurl() . '/photos/' . $page_owner_nick . '/image/' . $hash . '][img]' . $a->get_baseurl() . "/photo/{$hash}-{$smallest}.jpg[/img][/url]\n\n"; + else + echo '

\"$basename\"

"; killme(); // NOTREACHED diff --git a/view/theme/dispy/jot-header.tpl b/view/theme/dispy/jot-header.tpl index 79db0ec5ae..8dccf71ed0 100755 --- a/view/theme/dispy/jot-header.tpl +++ b/view/theme/dispy/jot-header.tpl @@ -9,6 +9,33 @@ function initEditor(cb) { if (editor==false) { $("#profile-jot-text-loading").show(); $("#jot-title-desc").show(); + if(plaintext == 'none') { + $("#profile-jot-text-loading").hide(); + $("#profile-jot-text").css({ 'height': 200, 'color': '#000' }); + $(".jothidden").show(); + editor = true; + $("a#jot-perms-icon").fancybox({ + 'transitionIn' : 'elastic', + 'transitionOut' : 'elastic' + }); + $("#profile-jot-submit-wrapper").show(); + {{ if $newpost }} + $("#profile-upload-wrapper").show(); + $("#profile-attach-wrapper").show(); + $("#profile-link-wrapper").show(); + $("#profile-video-wrapper").show(); + $("#profile-audio-wrapper").show(); + $("#profile-location-wrapper").show(); + $("#profile-nolocation-wrapper").show(); + $("#profile-title-wrapper").show(); + $("#profile-jot-plugin-wrapper").show(); + $("#jot-preview-link").show(); + {{ endif }} + + + if (typeof cb!="undefined") cb(); + return; + } tinyMCE.init({ theme : "advanced", mode : "specific_textareas", @@ -132,7 +159,7 @@ function initEditor(cb) { name: 'userfile', onSubmit: function(file,ext) { $('#profile-rotator').show(); }, onComplete: function(file,response) { - tinyMCE.execCommand('mceInsertRawHTML',false,response); + addeditortext(response); $('#profile-rotator').hide(); } } @@ -143,7 +170,7 @@ function initEditor(cb) { name: 'userfile', onSubmit: function(file,ext) { $('#profile-rotator').show(); }, onComplete: function(file,response) { - tinyMCE.execCommand('mceInsertRawHTML',false,response); + addeditortext(response); $('#profile-rotator').hide(); } } @@ -190,7 +217,7 @@ function initEditor(cb) { reply = bin2hex(reply); $('#profile-rotator').show(); $.get('parse_url?binurl=' + reply, function(data) { - tinyMCE.execCommand('mceInsertRawHTML',false,data); + addeditortext(data); $('#profile-rotator').hide(); }); } @@ -199,21 +226,21 @@ function initEditor(cb) { function jotGetVideo() { reply = prompt("$utubeurl"); if(reply && reply.length) { - tinyMCE.execCommand('mceInsertRawHTML',false,'[youtube]' + reply + '[/youtube]'); + addeditortext('[youtube]' + reply + '[/youtube]'); } } function jotVideoURL() { reply = prompt("$vidurl"); if(reply && reply.length) { - tinyMCE.execCommand('mceInsertRawHTML',false,'[video]' + reply + '[/video]'); + addeditortext('[video]' + reply + '[/video]'); } } function jotAudioURL() { reply = prompt("$audurl"); if(reply && reply.length) { - tinyMCE.execCommand('mceInsertRawHTML',false,'[audio]' + reply + '[/audio]'); + addeditortext('[audio]' + reply + '[/audio]'); } } @@ -237,7 +264,7 @@ function initEditor(cb) { $.get('share/' + id, function(data) { if (!editor) $("#profile-jot-text").val(""); initEditor(function(){ - tinyMCE.execCommand('mceInsertRawHTML',false,data); + addeditortext(data); $('#like-rotator-' + id).hide(); $(window).scrollTop(0); }); @@ -260,7 +287,7 @@ function initEditor(cb) { $.get('parse_url?binurl=' + reply, function(data) { if (!editor) $("#profile-jot-text").val(""); initEditor(function(){ - tinyMCE.execCommand('mceInsertRawHTML',false,data); + addeditortext(data); $('#profile-rotator').hide(); }); }); @@ -272,6 +299,15 @@ function initEditor(cb) { $('#profile-nolocation-wrapper').hide(); } + function addeditortext(data) { + if(plaintext == 'none') { + var currentText = $("#profile-jot-text").val(); + $("#profile-jot-text").val(currentText + data); + } + else + tinyMCE.execCommand('mceInsertRawHTML',false,data); + } + $geotag diff --git a/view/theme/testbubble/jot-header.tpl b/view/theme/testbubble/jot-header.tpl index 0d9a824f75..b44ea78fdd 100755 --- a/view/theme/testbubble/jot-header.tpl +++ b/view/theme/testbubble/jot-header.tpl @@ -4,10 +4,38 @@ var editor=false; var textlen = 0; +var plaintext = '$editselect'; function initEditor(cb) { if (editor==false) { $("#profile-jot-text-loading").show(); + if(plaintext == 'none') { + $("#profile-jot-text-loading").hide(); + $("#profile-jot-text").css({ 'height': 200, 'color': '#000' }); + $(".jothidden").show(); + editor = true; + $("a#jot-perms-icon").fancybox({ + 'transitionIn' : 'elastic', + 'transitionOut' : 'elastic' + }); + $("#profile-jot-submit-wrapper").show(); + {{ if $newpost }} + $("#profile-upload-wrapper").show(); + $("#profile-attach-wrapper").show(); + $("#profile-link-wrapper").show(); + $("#profile-video-wrapper").show(); + $("#profile-audio-wrapper").show(); + $("#profile-location-wrapper").show(); + $("#profile-nolocation-wrapper").show(); + $("#profile-title-wrapper").show(); + $("#profile-jot-plugin-wrapper").show(); + $("#jot-preview-link").show(); + {{ endif }} + + + if (typeof cb!="undefined") cb(); + return; + } tinyMCE.init({ theme : "advanced", mode : "specific_textareas", @@ -132,7 +160,7 @@ function initEditor(cb) { name: 'userfile', onSubmit: function(file,ext) { $('#profile-rotator').show(); }, onComplete: function(file,response) { - tinyMCE.execCommand('mceInsertRawHTML',false,response); + addeditortext(response); $('#profile-rotator').hide(); } } @@ -143,7 +171,7 @@ function initEditor(cb) { name: 'userfile', onSubmit: function(file,ext) { $('#profile-rotator').show(); }, onComplete: function(file,response) { - tinyMCE.execCommand('mceInsertRawHTML',false,response); + addeditortext(response); $('#profile-rotator').hide(); } } @@ -190,7 +218,7 @@ function initEditor(cb) { reply = bin2hex(reply); $('#profile-rotator').show(); $.get('parse_url?binurl=' + reply, function(data) { - tinyMCE.execCommand('mceInsertRawHTML',false,data); + addeditortext(data); $('#profile-rotator').hide(); }); } @@ -199,14 +227,14 @@ function initEditor(cb) { function jotVideoURL() { reply = prompt("$vidurl"); if(reply && reply.length) { - tinyMCE.execCommand('mceInsertRawHTML',false,'[video]' + reply + '[/video]'); + addeditortext('[video]' + reply + '[/video]'); } } function jotAudioURL() { reply = prompt("$audurl"); if(reply && reply.length) { - tinyMCE.execCommand('mceInsertRawHTML',false,'[audio]' + reply + '[/audio]'); + addeditortext('[audio]' + reply + '[/audio]'); } } @@ -230,7 +258,7 @@ function initEditor(cb) { $.get('share/' + id, function(data) { if (!editor) $("#profile-jot-text").val(""); initEditor(function(){ - tinyMCE.execCommand('mceInsertRawHTML',false,data); + addeditortext(data); $('#like-rotator-' + id).hide(); $(window).scrollTop(0); }); @@ -253,7 +281,7 @@ function initEditor(cb) { $.get('parse_url?binurl=' + reply, function(data) { if (!editor) $("#profile-jot-text").val(""); initEditor(function(){ - tinyMCE.execCommand('mceInsertRawHTML',false,data); + addeditortext(data); $('#profile-rotator').hide(); }); }); @@ -282,6 +310,16 @@ function initEditor(cb) { $('#profile-nolocation-wrapper').hide(); } + function addeditortext(data) { + if(plaintext == 'none') { + var currentText = $("#profile-jot-text").val(); + $("#profile-jot-text").val(currentText + data); + } + else + tinyMCE.execCommand('mceInsertRawHTML',false,data); + } + + $geotag From a869bd2fe56d1795ab1d8744796a6e908e5adc29 Mon Sep 17 00:00:00 2001 From: friendica Date: Tue, 7 Feb 2012 02:16:28 -0800 Subject: [PATCH 025/119] don't link tags enclosed inside Diaspora links --- include/diaspora.php | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/include/diaspora.php b/include/diaspora.php index cded389c38..2a4c8b9da4 100755 --- a/include/diaspora.php +++ b/include/diaspora.php @@ -673,6 +673,14 @@ function diaspora_post($importer,$xml) { if(strpos($tag,'#') === 0) { if(strpos($tag,'[url=')) continue; + + // don't link tags that are already embedded in links + + if(preg_match('/\[(.*?)' . preg_quote($tag) . '(.*?)\]/',$body)) + continue; + if(preg_match('/\[(.*?)\]\((.*?)' . preg_quote($tag) . '(.*?)\)/',$body)) + continue; + $basetag = str_replace('_',' ',substr($tag,1)); $body = str_replace($tag,'#[url=' . $a->get_baseurl() . '/search?search=' . rawurlencode($basetag) . ']' . $basetag . '[/url]',$body); if(strlen($str_tags)) @@ -830,6 +838,15 @@ function diaspora_reshare($importer,$xml) { if(strpos($tag,'#') === 0) { if(strpos($tag,'[url=')) continue; + + // don't link tags that are already embedded in links + + if(preg_match('/\[(.*?)' . preg_quote($tag) . '(.*?)\]/',$body)) + continue; + if(preg_match('/\[(.*?)\]\((.*?)' . preg_quote($tag) . '(.*?)\)/',$body)) + continue; + + $basetag = str_replace('_',' ',substr($tag,1)); $body = str_replace($tag,'#[url=' . $a->get_baseurl() . '/search?search=' . rawurlencode($basetag) . ']' . $basetag . '[/url]',$body); if(strlen($str_tags)) @@ -1062,6 +1079,15 @@ function diaspora_comment($importer,$xml,$msg) { if(strpos($tag,'#') === 0) { if(strpos($tag,'[url=')) continue; + + // don't link tags that are already embedded in links + + if(preg_match('/\[(.*?)' . preg_quote($tag) . '(.*?)\]/',$body)) + continue; + if(preg_match('/\[(.*?)\]\((.*?)' . preg_quote($tag) . '(.*?)\)/',$body)) + continue; + + $basetag = str_replace('_',' ',substr($tag,1)); $body = str_replace($tag,'#[url=' . $a->get_baseurl() . '/search?search=' . rawurlencode($basetag) . ']' . $basetag . '[/url]',$body); if(strlen($str_tags)) From 8a3c1f79300152d9b65b419ee33d129829043126 Mon Sep 17 00:00:00 2001 From: friendica Date: Tue, 7 Feb 2012 15:41:06 -0800 Subject: [PATCH 026/119] beer smilie --- boot.php | 2 +- include/text.php | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/boot.php b/boot.php index 647290756b..99108a0a35 100755 --- a/boot.php +++ b/boot.php @@ -9,7 +9,7 @@ require_once('include/nav.php'); require_once('include/cache.php'); define ( 'FRIENDICA_PLATFORM', 'Friendica'); -define ( 'FRIENDICA_VERSION', '2.3.1244' ); +define ( 'FRIENDICA_VERSION', '2.3.1245' ); define ( 'DFRN_PROTOCOL_VERSION', '2.22' ); define ( 'DB_UPDATE_VERSION', 1120 ); diff --git a/include/text.php b/include/text.php index 70733bac5a..8206ba7e92 100755 --- a/include/text.php +++ b/include/text.php @@ -679,7 +679,7 @@ function smilies($s) { $s = str_replace( array( '<3', '</3', '<\\3', ':-)', ':)', ';-)', ':-(', ':(', ':-P', ':P', ':-"', ':-x', ':-X', ':-D', '8-|', '8-O', '\\o/', 'o.O', 'O.o', '\\.../', '\\ooo/', -// ':beer', ':homebrew', + ':beer', ':homebrew', '~friendika', '~friendica', 'Diaspora*' ), array( '<3', @@ -703,8 +703,8 @@ function smilies($s) { 'O.o', '\\.../', '\\ooo/', -// ':beer', -// ':homebrew', + ':beer', + ':homebrew', '~friendika ~friendika', '~friendica ~friendica', From c506bb42a93be7bfe3d2066e60d08b87ba3275af Mon Sep 17 00:00:00 2001 From: friendica Date: Tue, 7 Feb 2012 17:03:09 -0800 Subject: [PATCH 027/119] :coffee extended smilie --- images/coffee.gif | Bin 0 -> 231 bytes include/text.php | 3 ++- 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 images/coffee.gif diff --git a/images/coffee.gif b/images/coffee.gif new file mode 100644 index 0000000000000000000000000000000000000000..7e20371741a6047a1e2bbe2548eee785de40d318 GIT binary patch literal 231 zcmZ?wbhEHb6krfwIKlt||NsB*NoJ^y5_tCP*{xf*wrtrlYt}4ZUtcpbGhJO>Sy@>r zDJe-wNpW#;0RaI(tABKuZEu<2AUW3WE6 zx%-&Yy4MG#r*FA=N=#WqLd~J^g3^>3txbtiyaEDx3?W{+5nF8wO0rg1%{+f#N49Os q_7vmOn$M=~)n({p=#4(CoK$C~!R1xRz$c)o%+1TmU)7_?U=0BKd_GJ7 literal 0 HcmV?d00001 diff --git a/include/text.php b/include/text.php index 8206ba7e92..9aca145988 100755 --- a/include/text.php +++ b/include/text.php @@ -679,7 +679,7 @@ function smilies($s) { $s = str_replace( array( '<3', '</3', '<\\3', ':-)', ':)', ';-)', ':-(', ':(', ':-P', ':P', ':-"', ':-x', ':-X', ':-D', '8-|', '8-O', '\\o/', 'o.O', 'O.o', '\\.../', '\\ooo/', - ':beer', ':homebrew', + ':beer', ':homebrew', ':coffee', '~friendika', '~friendica', 'Diaspora*' ), array( '<3', @@ -705,6 +705,7 @@ function smilies($s) { '\\ooo/', ':beer', ':homebrew', + ':coffee', '~friendika ~friendika', '~friendica ~friendica', From e92e3658b2bbb94a4b5f135f12f3772db1401428 Mon Sep 17 00:00:00 2001 From: friendica Date: Tue, 7 Feb 2012 20:34:40 -0800 Subject: [PATCH 028/119] make individual advanced profile items addressable via script or plugin --- view/profile_advanced.tpl | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/view/profile_advanced.tpl b/view/profile_advanced.tpl index 136edf8d7b..5cef25a2e9 100755 --- a/view/profile_advanced.tpl +++ b/view/profile_advanced.tpl @@ -1,75 +1,75 @@

$title

-
+
$profile.fullname.0
$profile.fullname.1
{{ if $profile.gender }} -
+
$profile.gender.0
$profile.gender.1
{{ endif }} {{ if $profile.birthday }} -
+
$profile.birthday.0
$profile.birthday.1
{{ endif }} {{ if $profile.age }} -
+
$profile.age.0
$profile.age.1
{{ endif }} {{ if $profile.marital }} -
+
$profile.marital.0
$profile.marital.1 {{ if $profile.marital.with }}($profile.marital.with){{ endif }}
{{ endif }} {{ if $profile.sexual }} -
+
$profile.sexual.0
$profile.sexual.1
{{ endif }} {{ if $profile.homepage }} -
+
$profile.homepage.0
$profile.homepage.1
{{ endif }} {{ if $profile.politic }} -
+
$profile.politic.0
$profile.politic.1
{{ endif }} {{ if $profile.religion }} -
+
$profile.religion.0
$profile.religion.1
{{ endif }} {{ if $profile.about }} -
+
$profile.about.0
$profile.about.1
{{ endif }} {{ if $profile.interest }} -
+
$profile.interest.0
$profile.interest.1
@@ -77,7 +77,7 @@ {{ if $profile.contact }} -
+
$profile.contact.0
$profile.contact.1
@@ -85,7 +85,7 @@ {{ if $profile.music }} -
+
$profile.music.0
$profile.music.1
@@ -93,7 +93,7 @@ {{ if $profile.book }} -
+
$profile.book.0
$profile.book.1
@@ -101,7 +101,7 @@ {{ if $profile.tv }} -
+
$profile.tv.0
$profile.tv.1
@@ -109,7 +109,7 @@ {{ if $profile.film }} -
+
$profile.film.0
$profile.film.1
@@ -117,7 +117,7 @@ {{ if $profile.romance }} -
+
$profile.romance.0
$profile.romance.1
@@ -125,14 +125,14 @@ {{ if $profile.work }} -
+
$profile.work.0
$profile.work.1
{{ endif }} {{ if $profile.education }} -
+
$profile.education.0
$profile.education.1
From bb22464165daed42826d7e11c47006a9cf4094d5 Mon Sep 17 00:00:00 2001 From: friendica Date: Wed, 8 Feb 2012 03:40:49 -0800 Subject: [PATCH 029/119] browser being sent to update_community --- mod/community.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/mod/community.php b/mod/community.php index d578b469f8..a989999420 100755 --- a/mod/community.php +++ b/mod/community.php @@ -80,12 +80,10 @@ function community_content(&$a, $update = 0) { // we behave the same in message lists as the search module - $o .= conversation($a,$r,'community',false); + $o .= conversation($a,$r,'community',$update); $o .= paginate($a); -// $o .= '
' . t('Shared content is covered by the Creative Commons Attribution 3.0 license.') . '
'; - return $o; } From 1eb32a0bb58bc61afcb82e8d40bfb862e5a23472 Mon Sep 17 00:00:00 2001 From: Tobias Diekershoff Date: Wed, 8 Feb 2012 19:09:25 +0100 Subject: [PATCH 030/119] added theme "vier" by Michael Vogel --- view/theme/vier/colors.less | 94 ++ view/theme/vier/contact_template.tpl | 21 + view/theme/vier/icons.less | 54 + view/theme/vier/icons.png | Bin 0 -> 20316 bytes view/theme/vier/icons.svg | 1463 ++++++++++++++++++++++++++ view/theme/vier/quattro.less | 833 +++++++++++++++ view/theme/vier/search_item.tpl | 87 ++ view/theme/vier/style.css | 1451 +++++++++++++++++++++++++ view/theme/vier/style.less | 14 + view/theme/vier/wall_item.tpl | 90 ++ view/theme/vier/wallwall_item.tpl | 97 ++ 11 files changed, 4204 insertions(+) create mode 100644 view/theme/vier/colors.less create mode 100644 view/theme/vier/contact_template.tpl create mode 100644 view/theme/vier/icons.less create mode 100644 view/theme/vier/icons.png create mode 100644 view/theme/vier/icons.svg create mode 100644 view/theme/vier/quattro.less create mode 100755 view/theme/vier/search_item.tpl create mode 100644 view/theme/vier/style.css create mode 100644 view/theme/vier/style.less create mode 100644 view/theme/vier/wall_item.tpl create mode 100644 view/theme/vier/wallwall_item.tpl diff --git a/view/theme/vier/colors.less b/view/theme/vier/colors.less new file mode 100644 index 0000000000..5314b52843 --- /dev/null +++ b/view/theme/vier/colors.less @@ -0,0 +1,94 @@ +// Quattro Theme LESS file + +// "Echo" palette from Inkscape +@Blue1:rgb(25,174,255); +@Blue2:rgb(0,132,200); +@Blue3:rgb(0,92,148); +@Red1:rgb(255,65,65); +@Red2:rgb(220,0,0); +@Red3:rgb(181,0,0); +@Orange1:rgb(255,255,62); +@Orange2:rgb(255,153,0); +@Orange3:rgb(255,102,0); +@Brown1:rgb(255,192,34); +@Brown2:rgb(184,129,0); +@Brown3:rgb(128,77,0); +@Green1:rgb(204,255,66); +@Green2:rgb(154,222,0); +@Green3:rgb(0,145,0); +@Purple1:rgb(241,202,255); +@Purple2:rgb(215,108,255); +@Purple3:rgb(186,0,255); +@Metalic1:rgb(189,205,212); +@Metalic2:rgb(158,171,176); +@Metalic3:rgb(54,78,89); +@Metalic4:rgb(14,35,46); +@Grey1:rgb(255,255,255); +@Grey2:rgb(204,204,204); +@Grey3:rgb(153,153,153); +@Grey4:rgb(102,102,102); +@Grey5:rgb(45,45,45); + + +// Theme colors +@BodyBackground: @Grey1; +@BodyColor: @Grey5; + +@Link: @Blue3; +@LinkHover: @Blue3; +@LinkVisited: @Blue3; + + +@ButtonColor: @Grey1; +@ButtonBackgroundColor: @Grey5; + +@Banner: @Grey1; + +@NavbarBackground:@Metalic4; +@NavbarSelectedBg:@Metalic3; +@NavbarSelectedBorder: @Metalic2; +@NavbarNotifBg: @Blue1; + +@Menu: @Grey5; +@MenuBg: @Grey1; +@MenuBorder: @Metalic3; +@MenuItem: @Grey5; +@MenuItemHoverBg: @Metalic1; +@MenuItemSeparator: @Metalic2; +@MenuEmpty: @Metalic2; +@MenuItemDetail: @Metalic2; + +@AsideBorder: @Metalic1; +@AsideConnect: @Grey1; +@AsideConnectBg: @Blue3; +@AsideConnectHoverBg: @Blue1; +@VCardLabelColor: @Grey3; + +@InfoColor: @Grey1; +@InfoBackgroundColor: @Metalic3; + +@NoticeColor: @Grey1; +@NoticeBackgroundColor: #511919; + +@ThreadBackgroundColor: #f6f7f8; + +@CommentBoxEmptyColor: @Grey3; +@CommentBoxEmptyBorderColor: @Grey3; +@CommentBoxFullColor: @Grey5; +@CommentBoxFullBorderColor: @Grey5; + +@TagColor: @Grey1; + +@JotToolsBackgroundColor: @Metalic4; +@JotToolsBorderColor: @Metalic2; +@JotToolsOverBackgroundColor: @Metalic3; +@JotToolsOverBorderColor: @Metalic1; +@JotToolsText: @Grey2; +@JotSubmitBackgroundColor: @Grey2; +@JotSubmitText: @Grey4; +@JotSubmitOverBackgroundColor: @Metalic1; +@JotSubmitOverText: @Grey4; +@JotPermissionUnlockBackgroundColor: @Grey2; +@JotPermissionLockBackgroundColor: @Grey4; +@JotLoadingBackgroundColor: @Grey1; + diff --git a/view/theme/vier/contact_template.tpl b/view/theme/vier/contact_template.tpl new file mode 100644 index 0000000000..f2749656a2 --- /dev/null +++ b/view/theme/vier/contact_template.tpl @@ -0,0 +1,21 @@ + +
+
+
+ + $name + + menu + + +
+ +
+
$name
+ + +
+ diff --git a/view/theme/vier/icons.less b/view/theme/vier/icons.less new file mode 100644 index 0000000000..f87327703f --- /dev/null +++ b/view/theme/vier/icons.less @@ -0,0 +1,54 @@ +// Quattro Theme LESS file +/* icons */ + +.icons(@size: 22) { + &.notify { background-image: url("../../../images/icons/@{size}/notify_off.png"); } + &.gear { background-image: url("../../../images/icons/@{size}/gear.png"); } + + &.add { background-image: url("../../../images/icons/@{size}/add.png"); } + &.delete { background-image: url("../../../images/icons/@{size}/delete.png"); } + &.edit { background-image: url("../../../images/icons/@{size}/edit.png"); } + &.star { background-image: url("../../../images/icons/@{size}/star.png"); } + &.menu { background-image: url("../../../images/icons/@{size}/menu.png"); } + &.link { background-image: url("../../../images/icons/@{size}/link.png"); } + &.lock { background-image: url("../../../images/icons/@{size}/lock.png"); } + &.unlock { background-image: url("../../../images/icons/@{size}/unlock.png"); } + +} + + +.icon { + background-color: transparent ; + background-repeat: no-repeat; + background-position: left center; + display: block; + overflow: hidden; + text-indent: -9999px; + padding: 1px; + + &.text { + text-indent: 0px; + } + + &.s10 { + min-width:10px; height: 10px; + .icons(10); + &.text { padding: 2px 0px 0px 15px; } + } + &.s16 { + min-width:16px; height: 16px; + .icons(16); + &.text { padding: 4px 0px 0px 20px; } + } + &.s22 { + min-width:22px; height: 22px; + .icons(22); + &.text { padding: 10px 0px 0px 25px; } + } + &.s48 { + width:48px; height: 48px; + .icons(48); + } + + +} diff --git a/view/theme/vier/icons.png b/view/theme/vier/icons.png new file mode 100644 index 0000000000000000000000000000000000000000..0e1e7662d6ba1cd9454faddc4f30eb9492a58da6 GIT binary patch literal 20316 zcmXtA1ytNxv<)`6yGxNmad(G8u|jcocXy|_Q{26{yK7s#SaFvYcZZ+%*Z)}z30cFM z<|8Ss6(caQ^_lLJ=U~ZkK^F5vqY|9e4+zt8dnPZGLHX}W%KFn9GZayA1zJUp1K>}_03j2z9F9h@z)P6deo zfC7+}6jSxgKGyT{{i3$)zwVOkS|W;!1G|)_l7B3~fNO^PIdip?B8HVAuCe@{t<7e1 zhA>BYlyK3hU##G-g0|==E~Y8Aq?R0g7GuL%iuelkUDpP=?59jxE0urj9D>i6@7nKH z57x8R=?=2*x(@hKW*mS)WUAm9OVK7nh%U3nj~8kLr+TNEt6*jS`mW`ciK9j3IY|vi zxVJ%8Ah16_-zH7baM9mLo3uYgdC+xVt?CJ ze4B5x_??~;(mCx^8V9_>Mvt7UGLvt{#>clD-2eXOJA5S-a33&kUNvi7GKdeI$~GZ8 z{NYlCtU=4eqapZuzr&8zv%Sp(Gds&Ma0!J0P;E!UCetc>VoM*=MR@oX{{Zt*vL5&i z)dVvQ1jc53`1e2}1Z4{S2Wk`hcK)jfYq`Z+kf8r@#28i^`p=)S)14MPjCw6Z)Cf~= zdq4j>d9vI*lJXPp`QrP5zx#w+^gMeQ0Z+(ZF@;(8k4~#6JgW&0Bhy9_1F1UQ)~Kn> zFUF;*2lp1`?AUaQwiv_~zR^&~f#|D>eBE_*=ceu)PV~w%p#fz|c~Zu{ z&;SK9H`*TVw=^b4;7{irkjZU@rL3i<2LJJwO|GqC7Q5M}9ex9XK;#m9k|@V@3Go2c ziJy;V)T8Bm`vQK@X)4<(dt4s;CZEd_W!+ZX|oa+iBu{v_xXf^uw zW1=~SIzR}NJf?JePn)L;YL84oh4mM#M{MeEPonoIeZn&JGHUa2ZhJA%Q^0%EeX?=E z#EemBPuxBTmA0fLa^&GVD(z2_9{M9*M1bb_I1E%VhH~0t+x;>I=daYH-vkh;{`wud zL9*3SH@R#i8AvH>iFl_!2H=q<aatOIN04cBwM{}@ZHk>c%%l;(>vG-{r z=Wv0E$u#4rhB)dcA6~lrNQ75qkXiikaa94Z4RBJAFykFVJ1VkjVC)F!85X7B{sbr@ zV*uChKO(|$?YnOlsKJ!`-q64<9hjO}{Og!x>@A0-n>8zPUp`lmjq8uozg^iP4vyMt ztTw$52n>$o?kUHjLEUu~(&WOv_gP@jO%2<3MinO^b?kQ^5Uw*6G`c>xkf zjl(;5fwS-LEG)2{P=y1pT2KExN9|(xe#1#&AyEZ0j+#84jpmt5e9~AfuWqx5(Tcjb zO-S=uRBgVeV*Z&2co&L6T~cM5qdzv)D6;itoTG2E%DSf|^^s@Z+Fwd-euyG%8o7_p zTpyz?BmwVW={o_F?m&Q}aJf&#jpAuV>5uYm?0 zYo9e6Xt)20h{O+u$1iNT13v!!gX^u7HeW=JRn_KEH*Gr27vBkm&+1(WLiNT(@~lcS zdi?!tkCBAVWr-n@UDEb3d`k=HMG%a0oms#)^$D1P|D&w(6n}qvLUVryPi{OgbaD8* zgrnzqdyFXY-fS$jT}@3*%ozrO>Dir-;9d=5Sp|yEerq7iA|%J<{(S3nd;5j~c?Xiu zPtFFvm&`bF^Y0sG3JVSxT_j5KXpZ5j@2=mbl0ucV&Xu=HwT6saO0D{z62vnpAN*vg zW^yeI1f8~rAoUm9VgNc+U}mx#a=N|IKz-wZVvAvrnaVUW(ijQg09%&>kD;6$o$u z=c|^~zQ`6-I9Z$TBOkE%`aR#vGMS#Z9cwxkEUIk^+pef%sUF@?o_C1OHq{o=*DB_^ zzRO>g3|$)cWEbhJJ1f?q%fVM9f+{5LEb-7$QElLI9|%RfIO~1$|KUG=v6BeD8&CHA z7SLol`gO)oS%7>ndxq;BqXC64bUfFv z$Y*`8En&RtjOk&_y6iAkXbrVyO6}+o(XWPcz zZF9HcTMfv$FT6zU;$gM%BbX5e7Qbii#t=mdETa+%jPOS_WC#=!7Ik+p6?{Nd4_%I!dZr5k7mbGe|yWK)Noq&fUgQ;=ubYtQ*c3Hp1n|V9= z&fXQb5sgx@5J;&aslWzTK)+9Fox+@G0o~B3L292L0*-ewE&UDE`Rb~!vTm1I9meHn zZS7i^nVyXvKbMXPyvMCPUMJ&_bl#mTlvUImJc)A_H7*;K*Uq@$V_Oc*UuG*UcEr$P za>m;x_ONwrlRRJGdGUB#(p|=jU`=oX(+$lCu0K2l56~o@yPf^Ekei8%E$YKbiYMs( zx6rI1=_~B{xcO}PAay`uo;w_zil9dll+Z{qd?vB53E&LRYlidgkrH}RIQCBda+P_k z4B*Jq^a=~}RmXrszD()IhK)Abulq@|E}DVaheGAezlxFGdhF?0_!o8)VlIpZjCW;4 zU~LlC96@hVQe{H-{rkY-e*7o>FNgh6gXhJ-ghB1oK3?)qR}?@cvt-rx-|qLcOdf|s z_T$X0=m>zG&wp^lLFsJ0@!;$u8mZTeOWb8D47^@vx!ci#UdZjwmo4naW(kPb*HPv# zo5J^@!bj_!i6%L!EL@(lKfmtFUl;2jH8Y>l422Z5RWDS%vN?@}!Rni|E+KO%%!)m~ z$9_%7%KDH#e2^4Dx$7pq^$ZN{Fdv!!1E{FNy!gctu;dR=cc0%AeF_x6f;vDAF50@f z=_jY})qD`O?fNT>*EEE1XN2WzU#+>n_vi_LM zJ3*sZNKNGp({})51E=CA3eN{X49q!iV8OUZ>~abzeIXhUe$=~fXownR6* zG{neACq%@0zh7f=KHt*PZkrt_=XISYYlai7oRYD*U(b2I^0v}eMeht%d z{#(o!3(@?3M50_rPbo~6h0pSIyJQyzmwH?UAKik#_lN7rmy50vN=~L#V4oU?(2wlQ zi~@w07N4gJxB##}G()SEAtF2jewqzVcygK8k$rA!@3kB)gV_9j1k(-7RzU#GYArwNIw^pj zE6N8;pB7_=2{?tHCKE-bQpxb5#6q}G1-?H4c&k~CpLerY6%{%!k)PUw*6K( z6n#L68nmYos%Jzd*<9zp@z(gof4E*MAHf z$iZdjbeFUEL!o+wH{o<`Y1%(;K9L!=R$EaaE*_92HXD3we!s{sKbTp<{lF3UhCFN$ zuJ>2__g_1p`3mzZm(@BiBl)J4S$bpRIxW3FDYiw|M|c*qF!Xl4uUbQih$H}~fPKUEuuQq`g%!SD3Hb$#<~lb>+iaO=HIw1O5Pie>gxs zowdMbW?|wT&hR0=j-i&exA#lunRVx2lpyO5b!~59+c_Z>SjZAM0*JW(klSH{5oXA6z|H;+x2@@0EhD zw(bD7dw(uEo90xFI@UjYvvU0117fg>ebDrL@vv$;F!!&8Cs`UEXUiP#$pOu(h)od2J z*9(SZrcwGZsfd70Mc}0nhc|smN)jHb2^J&rhaLh3AHbO2nGY-aCwz!_^MzvWHGv8p zR|*~1Egq+!@UWopbOyvssTh}}fE?v;=S&Y>fk?8$hqn2=FFK#wB%3pPO{99-?4A}V zVGoBq)3vgxf17A+5wK=xGK>Lz<{wtkfQ*a`C5V3Bn)#dj#Lo^riYqk3rVr)7}ln4d}6*1t<2p9H>rej`Tu-}9B}dRS!6+sjm(QzQISbu z8N6nmS6cCpAK@XhpGnaXhs%>o=7Iso&)Ge0&-|==ArKlG;UMB$LB)Lb&tjHY&X3hU z6(v&;L@oBCCFk(^7|d&IL@wV47OYd~2nzn>%u0Vq2%x0;2caPDi**xJ(uBqJ%35F= zl%9DBd)=#WKDc_V^SWmHC~@IwtT0KT2vEHUx-eo5f&u6+NmJYCSF9fdVADPsDmV}B^5_S= z+)Q635B5C`o-69b#R7^zQbZD<8~BE`vQ^S(OkU{8kw+)9rHsp%QNEL>fPp)eefr}g8lR}61MHf#djI`mk$SH zr*$jG4qq8enic=iQ z*d11i?=S4v9_)yU8vs!T-A{L9Lf&(mpmGsom%6-59r6K6TTAOSyTkKh`!RC$Rg|L8 z7s!D+hT1eYw-IutgYhKKB~LipB9uNt+e9;uYZAc3MH$b1*nExP#22cA&`|{niitub zKD!A?XGW80hWL2CIE>Zs?LII&xU;~?wm}@dH95So0i&qldl4D zR`Y@8=6hu|H;h2{E4zM>|F7}it=onRO+d?O_K@W~rQ+b@qdR{%bte>qMFYNnS2#_G zv4aeA8ubUmiF_im5b8rRq!vte;GUyn%mT4>H(H z*BS0V!m`&nYv#3X2>VDi6eRD9Hh|OL?Lykc+=HohG`xQN71t){h?pu_++wx4YjsvO zY;j~a*DN1nJII85Ttm7I*=|o`{k54fDZ6d(qNgDN&3TSoJ)kTKcX5^ zi62$gijSh%Rqls;939|wX~7ZjIIG6u-Mnxo=FDdSRSV|rhs}AfpqD3fNk)VcP}oPIjI&#%uEwk}AFSVpCw)Jhpnu*H6DS(CtxgX0FO z4IMj1vMGq#fx;cPwCpZEibY_>7Y5rNei~l%qo;U`50tIxv@fU=5TtJQqU_sVd5Wc@ z=jZDzlJ%m{x`He^2^R79O>~F&C@C_Dn^N-i;GcRE6RhNI5tt%u1RX#Ze(FyPdZohG zKlNwbcluU-*=Np)ZZ_&4q&}7g84IJ`!AKImK+Xe_bZj`OS~ZzWA|CR9YMOo<>O*4V zrNlt>q;d|nwI6*i?pc2R)V?|%_9PNXuRr^=`%xp<*uTx||9j-e1>A`9ipk2a?TkTEU! zg}Puh)mR(3s}IUyGQSq^8yY8eXq?2quOM$U)jJLM}(P{ra(+bN~X3!tkGmLE2M%?%>J809q;5%0+jkXq^;OTyEehM zqJmcZhr{Og_BR!E?~BO3uKWKbS1O!Y8F|p5h}Y9rn8G7CFw+(*A|KB^*5-`_EBCUoO#%-+}sZ4{>@x z{=TUKK)*MBtfDEhKgL{z4#L(K8cU{UxQTQIIBCqmHwSts!OA5PN()9vNJRxws4sb+ zrYDw(F3<^VT|cAa2Xf1E4&+*(yY3-QT5*xXPvi7i$;`+jvxPE5Ae=0>bT9_NtfU|8ff11%WW_3H@UN$cWYuvsfEzyhtJQNpj#@Bp}s&)m`QgB*}k z@e|>=q?L6XU$L0MMO-YlXq%MG7xI807|}cCZvAnYDb2rL8y0eVaCe4*zgtpm(d_Q& zb{heH(J0K!i3`L0J}5(wT|&&skVF9zhjLZ@=zHXHa)Jmp35&r=+seIKP)e>~3#sf$ z$gv|s&o2>cL+WmvJEi+f3A?d{-8Szn2Y>j9Pt!qxpR`s9{M5m(3fxehD1lR7+j)h$ zN1^HOF+HExeA^J{^EW;weXR?WgJw#SMxCuU?CaXII0Z&SfT^+rB^sP~Jp-b1+# z@~#|#vqQFMG>#N8IyTPE?_8D6g1@4MWSMi?riWH)7kgu=bwvzSH|upSwC(LXS=!p37N!W*)kJD{RB- zaNQ~Twl}#kN=wj4JtM_boBzv0AxRUUgcsFF1;LkY-Xh?c3j;pWPoigNr8Fqs*B7JY zY1H2{6|gx(u5Uf^naZ<8O4G3UFK-5yTYa82g1NN69#-EWV{9M1)!kuGnY8cg&x zn0>f-dV6AeeLmixaGOG(o-v_gb>6)p@IS#I;d92>8HpL14e%HK{nQOBl_wg5`=H%l zVb~cdV%w(R>4|hug)-2*xF?UaAokphdekgd8FZylQSSzS+6Q zJ^YlGrGKlkIc-P(FFhHj2V^Ft?5%u@8&)5l+IVNFAp$4dK0N_iUta^l4M* z)UcCZb*LVzJ!bo{M<>w?T5PqxY3&cY;PaG}ma3Of_gqa1e5+u$;w-*rDo)3!f!u`C zj5?#%|F9@r>Ngf0VCn!!)O?M=q@c%Wo^nKHxKwA#GC7zO`qS>i0xn#Tn=@1?jP#)2 zS7w%f>Y&uCUWxFTb%zd#YbA`u1%ENml8yv5!13@PwmN%pLfmBph0*khM7!c__`KsUkv)*8VS?r<_f|Q6OXi>kr9pg8xv# z1HU_orgeC?oX2%VOHQ8+6lP4VNP17MfQNnTJRc~x2eo1JX=0o<94x&ddhS>2IFDB% zWRw2m_ZM_z;LzuHIh|wVqB~OVtY)ochI;RS-QB+O9>3qpw`sf3MN!^&oXOA~#K_u) zUOxISNF?X-uJxKsK2W#KZOfbr3hgjy<9J&e-+py)ReqD=>IMFKDMpy01>X5SG4Z8R z4n4DYG8R53iUtxhR^2{tR`alSuu54>F@_4LiO*#+kj%aQ-P|fVT>Vb^o8Lop^tM_| z^4{}j+Wqbo3no5!G$?Ajo~%OIX}5;{v>XZxG^+Xhr_P8&dOba|-o(D|CSy_beP}qj zA5y&VD<=^R&j?s8U~?ZwB@iqZ+1}Z9szCc&N8Q$IXp5#nE3hJHa{Q-$o-r2ZFl+1L zPtD}$A-b5+Lr1EsZW}0CSWjqjpPT1DA`$*qm;&;VB^G{!lL@%nqC_Bz3F3uzLTkuV zp7Q`iI@PVN2p&u#RLdb&Jv0I~A@iB@Ww+aDo7in1q?x(-zkOt2=06ysC2)Xjj!${a zVcer5LW^M4{k@~C$|`94i#uHs6^IyLUZHI^B|pvpPXC&xK0%I1qA@r>Q09fkz=afA zCS*6C>P{qF#5Mj+ta`hW(pgG*y5tKy0+x)dEF|KyT~C+k(CBcHLYDfE!&FEC0;g<^ zA0}4OOvFr)!+(WLiSS#B!U|>ps7sMi1an^kGLX$h7Bv$XN4h-!O9w_CTC(-)r7%2z z=&GQgK+`w-5yUIW#iCyv6Uc>v6I9lN%06cKWW_1GEe?uP{ z&Y*>MT()z6LieoZ0*hXEFw;-J@%T~bA$=xkx-ihsu!57k!mgO&=+8l&mQyaP=HLr5 zEns*Zj1wY`dZSg9Y6Suey@^d>3T27iig`hNas8&<^hyPl2GcA9s)##4{)Es4yj~%zaU(+nC`VSTuRFUy7*ZX zBQocl{ax8@{CTBT2db4`JYuRs1o}ZNu&kM49@Y>2Who8C{*t_DdA*KlCuRS>84Mso zMEnYxp63nU!4w!ya>wHbXC*S@as2#maFRzvb10bhGc(opT}bFVvg!(YIN2Bvwy7Cj z?&F=iWSWaWZAuz~Mb9i7?S6<{+>&$*$=N;^w@&}#=VuU=U4k_xj;ce4iVA-5*(U4e z8fz{Q={{9xZgxXT*?GYep=$0uZh&G0W!~C;IJ9xd5xXB>kX!us$@#ds5Smf8GT|v$;F`2KFzkHT5f>VIUlE$dVKHU2mw9uzSZUEL(<$QZ zdWHm@kay+;Pemo)V%~qU;B3kzYqw>J!Gd(Pt=hKQj zJirK32N^nGT#$S7eTRrwISfr{QOT#(ifKYDcv^FW+0O||4W0z@K4O9*py&$Z{)x8c z!iOesz$opHB`TGNI@bcX=DAgq(aF=%64$kpgqjU{#=JnB0LtkSLtG~VklN7Caj91R zob7P!Td)(T6h=Q>#0JZf;d#EwG}crDn^4_s`36e9FR^9c+;4U1e=(;NNL_7y4KW#A zjQ~e}&7+{nBTl+J?YP%D;$cVG&zkqp9_voT=JI*Lt?Rc#>^*O<7@#Z{7ZdY-VP^K* zo!0r6iV8Ht{o1Xx*{VIh*Y6e9EVR$!V~f&HEm>vh0*L3FP<-zbCe4PPqA zy$^B?JkI`jpaZTa%XbKYi&4>wJZS^>%??#0K#Rl1Tx4Xa*o@6N+o2G&lKF2JY+~wb zXiuDov$_L5@kzqFxUD<$OJ1i}*mCOWO2)rdou%{TdsIQQdQNG|kq_VGYP&)RKA2#~ z>||_#)ADnZRi{c90;N!pS}Eo3B9TY?WGkqFO9j87D4`6z$+W6|K1!hFXsoE1rQ9u( z8rCsryIIg74@*GaazgYUPy5O1_jnzdIiY;=(PgQ@>=eX@H&u>ls8wD0wRcmY977|9Sy7VAenVi#iijjo?2*xu_rCccGCsELOq#|hO6)UY;NfHlwE1dl$21eBksQ5 zOGEQ2tyZYmq@;wT)pF~nf_J0SLuZX5+Pd>3op;A@K$F7;UbVJf*rI-(4#?Z4-6FxG zX!YtE@uyq6$`*&^E?m+V;YEnTtRlwM8O82u-)5%ATdBRCPt1+qB)GPSkLpr+|2Egr zG)a;;i|bYjJoHexTwUw*Sls;I0vpJmL>}z0_>Gt&@~&Sf?g#A~15oz8Bst-CF+De_ zzP{FJ)49R#cmd=qcDL<`zVJ5)IejjaQU|_SFT&Mv(0Qggb2&2Q_N^-zCNVyQNNdod zZ+yFZJ`)sI5+`(0>rn9uE?lfeH6}gpr~=p(X0vNPz2H%;Zn~ayV1G))#*FKe;ClUupT8i_k~Qy< zVjwWTXZZ_s7AFb*)bd2NoS_I>;DS5J-gQFD`35-cX4|0qHePDl1(Z)j3ew;LYW%EF z#A@_xxq317U9;)_9juKTI|m-qD?)F&xm0gY_jIiTOK~yvyJoK+=^CFs-!)Z&YQUma zb#g_l5eRG#Kp1EP=lLl3-@=5n*<}9V{^R?eQ$25M*s2Q0wCa@>7Za|YLeebrv-NIf zL?FsNV5OkkbXFx$$>Z#|0JVXw{D7?|dnL7869TT##3c6y4dnuqZcW06>^DB3&yura z%j#1NOr4?(Kk~LjT8k5BWs5%ph0pE^lDTE3yOxbBu_hzXhA-o<{+FS5O0-5xL=9Vr zfMHC}V>1cPh3hc%+j()rW054${e|UZz2nwEW5OMtyXsZ&25Z zPVi_8uBL?Kv@`yXs5|2Bw04QzAvs0Rjqrb+hZ_+#2^ zSnI()B_$ggtawN<>;sY5hmXM9Q*?4 z=Lq|Gm(S}mliLqssq8Y+^U+h*^hb+|<~{e_aph^h%1{1~^jqm-(y6#Bhh+VTX{TDd{ty)pkgEE!xsI>0JE?Mb!V z$B#O`*wp>t)vN*qbhw?^ePGt_)nyp@4$BwSht6sUTh0VSOdT0SXhrDrZtIfUuaQYz zPB_TnU1TD~BOC$6xoq7%L|nLR54Q{ZCFjkzPthJSedF$9n#}Ca;2F}04!2T9{GeQ- z@;8B;6`cwe3xpZUOlH=4xm7ji=9}G{y-b!PI^yDj+r}o-tr~ZAp-%N|G7+pRsGvtm zL2O4_Hr>0Ds6`h%uw3S(`Dfc|c)m~gw$~8Zbv}t-%OmX2+k^pD-)Z$rj@Z7A*^#|v z8@8^9yne6Ua#lXK@5cl_T7RHJe8Y+<0G6diJEcY6lrN!!JDSNvoRG3w?Q6MZsR{C*Xkv3xw{a=f=^u|t*UM04ExY$Z2RQ=2& zf~1YXiGjMYaI3ocNKnX(h{Jb~R*h@LTS-3*J1cSPescb%Q<;Kw)DyS91sVhJk2eBX z|LxRlmW5SROi=E!K*az~t_rHOh*Q6~9Ujd6=6MYKb`HG#-e&EqL2WE?lBy&4aMN$| zj`F%;G_ertw~dxwyssPX@9_+dSjDn0V9B=QjZyIJiKZ~W=%dKU4O|Em;C{Ls9ToNI z`gG}}VO9GDl%VsNw7&j!DM@Eva@Ml177kj(@2bpuO@&>CMj)rSM-Q#2_*r~TI$n@= zkGnZ#+Y;=p$D99%xXa@75DXhgz=HoT@6%O!M+WzMFSvOkB^=q7HEs za&?jr7Z+EfogcouiYB=K8u_&#R|6ig58(}+jg9RvV+I>CSfY8B!C_I~O`R&A<2@BtB8|Y2SlB%bJ!)(hSmRpcJV_XpOvL+M;oZtp zU=9m3*({<-LYtW#)Y~rMw`uAJU0z08ZuF3zb{uJFwqMFsX=)vbN(?RHBUVT)zG1Iw zv*1T5a)>r9>TUVk>#ui3_POSO?XHv#rJqUADVRc^mj@AD-X`)=-rjES{y9ifV* zuoYR82?WVD+k}#bl|_fw!#NFFKekJqc#PH-4F>l*c17nv&qfRp7ZOYFrOKa!vWfuW4kH!R zFAh0TQBg?8D+fH8vY|TmJ#ZU-t?&kn21LpMd;+7Fp%ktuzw034J)18Abb zYv+FFO-*vY4OqtL9i9DI--Y*ft4k}u>D#KyK3`TBsi z);Ej1{-GT61&q%pJV7ini>Wbb#mNZ`IrgFDt78w?rJOSDiLr?HRh#Kj@31aW_Q;2Z7*rPRm_*Hb*2_VG8iG*iWWD=Xxr=v53&n$ zRcz~&y$l4vf4<-UWa=_Gb=52HFF0@=WLmnv4i>bPm9^%N$$8wViMZ?|M#EAR47b57}H-$c) zpZDO9BlUaa=Snh{7}Wv7=*@YEGuW44Hw$^8Cg z0I)`9oY5A-1A@q#m_W&S@vmFx&y_#0v9N+c18EDMT|d`g&3B%}R)-C;6_3zcPeJ$V z_nBNacr6a(6z2!H&TA=UUSD}Y1A?@~w8^v+c5xT6WLoodUQH(@RTBaz`iCPL1L=%G zM;$iENFvH~O2OM$dAqyvBs(G`Hs|flkFbi8hrhoI@i#fZNFg9lI&SY;+5XWDy}Zol zy9Susn{Q8-P@m9ADx7U@5VIp#&94zm(Rv|}5a^IX!_i5h^gN5v432`6Za@3#FSI($ za$sySWzG%YR;PMjACH*lt-pf#eTQVE^`9`DxOtF{K|I$Q!)tmat*rZv|HI6klej1r zqN)dcwLg7FIx@v^$Z!lK$txOK@Ne(h(T%VM^aM6GmbJnu;7E{`B>HPpYp)S5FyuT2 z{^PF7jtC|_hJCBP&AKEf25j4)Dn(_lcI@xpzY_wcD4@yDuw(eWep|8%LG;=q!-Qis zuLYfsO%>nQJcfc7g&BNEF8`mQs77vwj*k!f<5SHF#^HkZ#55EIfQ$Q0MqWN}_HVFh zWa7J;etZM}u&aX*W;IlbE}f&Qr&9=!E#!greIm2)ctEPnjWk|_8$Q5)Uy4MCh+j#V zsCB{cJoB9}olL+ae%o)`xH45Wg}KP^JYk=IvIxaV%w))d+(!#l>PY22hpJMT@PX_c z9H@y^qg*cg@;e#7lV|%}v4e~6F{ZKdO~7l@fR&58fOv_oS+FCwAQ(na=)!%a6j)iE zYZaj#NkE{0jF*0H%=O)W16ci^J*)J)`2!xW|JH-UuNqzCxz6F!r%(3bXr#Xus&y85 zgoT9{MbHHZEOw-0XD%x$&nr7m(Yz;Ui!db%=KB2PUTyRlhk9t#Xrcp^*X^Gg_MD_o2*Pwlokf>Mc(Luh*%z@q1cSJ&;Dc>eQg&e6;W%P z{Tw=X;$F>!30$fki+a7{pwd6nWHsBTH_vK%j!~tn_SEP$QD>82Qr&&obu=j{c$H>h z&2%7<-{%GszqqdF3tNtLk8NK@QkH%{itDMU&Mo?`&(*{Z`tCm>B=q>!-`|ecDhY}zp6ry5StkDyorhzlypum7qxbFQ2 zAv;6XSHtI3h?U$N*R@Oeq>S_a(^}PoD_kWMXK=qz)xv znW1V)!6QY<&{E@pAuG`g1tk=I5y`^k6937n+L}cFp1a9gP)J04v{a+Hg5$qyvtiZ> zBTxWlLrvPw#V>vvHrU*!-&YjhL`&W7Uv5|{7URY$=uDm$)9uVMD zh-@&SDQ1jT2+*|Cb;WEH>y>gssSzmS1tus!o%aL-CkW*8d>;{OdLFG^|NX&~l|^;h z-bFOM{vn#RU{|+$HO1!G2Vh_>_;sUMOfA?FjgAg~^sE&14VBeQOnpc7pN`wa`Mey8 zSGng7?Gdc{ib(l}L_dPxb)-;qbKUQt_t&4xK3b;E8iT4t7Yq z$SVOcw=_q|28U{zo6Q36Fq5z7#^aOEeMx96EQbe%In+q$dR=?J{u$8Li_J;JLT4mqK{a@ zt8IQCZjO0FG2ffr-zr!yT$v`y&Ccg%Ib>XOg$e5dQCB?C0<@m589SoJHpN|#5Gd&{ zD8?o`6rrNBKha3|uZ6s?593mqbhi6~U@UW&1Ww|KJES z9AomuYzP`Y@XG9f?QAVz>#$yK%3D{LgwdSC`{rMmlJE0+Qs7N zw2l;p`bYgC;al!U1k<&2@*{Gu=YOqoKI`iT-QV;6;Ez$OHRy#>EJOaUr^ffW#NZBb z=i|=tl8cO@>{kJKSZ<#Q!O&KLHruu~r2x?ggb$EOnOU*s5MGeN@PgvM7;C&Db6xTzI(36u}Wo7;m zmdQu6!fRhbtnD4g`Y!0F+kp6YALC7i&M7tPy-6o?E8X1Y8GL(O;U4dfU|PpwMMPfS z$B_xe?WTl!`y9$;TsIzZ7d2kbAx&#HD}CQ7W7MoXwVVkDHUF0 z(f9tbU%zf?Xou4V8YMs5{UJc43*zA@|JrYYksW4{a~aVWBQ4H0&c@E&=U`O|Rt@jVA-57jxc@w+T*?pxk%2X>K;>Q^yhb%)_W2;$$o=kQ|Q2(^m z+b<3Ib3HzR3kTWX-fXv};VY$(wy%9bftlGE^}c)j+5CQZDAKyND4~UYd+wA)J{lza z&L}nue$h7JXyTtf73;~NpBd!(Aa?d%2{xh<)An0(7Iqbq>{mtpX>&r>_p)O)U-R); z!&5ysez@F&#+nSI(7{J^@@RsF7fkIQe-?a3xeE?1dMV9`jPd`dFL#oSxiQ`@1{wfF70zS0gKnaman`Btee=^9Ar>FUdgo03qfyF<r;Z={qGXA*1?ONinoaX5dVA1b<@ZEhEpF%2eVX zlCW?Ke@vUxINnl2TOni8m%4thrE11wy+=nA%Pdg ze;s(((ep`I#Q2Tng*MCUAA)rxW`(^ch6xHa~0)X zDV}b-hitw#&B%*r#DViRy~7Q-21fVIA@xpI+$4fHvX^r-*;hw{cIyqOwcQtJuMP{f z7r)0GwljKPNqc+WS~U$n4DoD8&q3Efz*_}NgK%KsCmecvXH;pjW7WXeL0q!Cy~Xp5 zf)Zc33K?hXH3Y4w%nSGa7+aXGwH&1-6V#Q<)87k7`L#ip2WY#~kgK>P>iFZ?})y4stU*uc|#R=JN7JvzP8Dm={97RTeD< zPpH=gMR30kRmMJ-Yt|WFumR0Ajt@m*QLPlaMdjql@bN5uepg;btxE@$6&;YiApZCc z&$GMpEeSTTQ*Y#<;fINOv);xY)xYc`4vR_Shp1Y|wK}msZDz#61}#K`wZtf8V__2E zN3Ss_D*?dN>mGT!-Bcnh^M>yY>eNF1q;wHtVvPAPYUJkJ}g`^hxlB>eV%cc=j__Q0#m3CyLTC%I9~z^|YqCodz|9quOX&AL^6 z-kJ<%YP_x)SOD%Jf!Mk2(=br02%G*B`|0F}2FgD{=+;qo6BWTS?p6t00?&Gle5cWu ze|mv?CZN*XWzPB#gNe-Nxc&eNRwvC4CQ#&M3q9bzsb|UyE-m~``@awH$LpH_oH?^h zzIhNs1)955!JH>qb6EhMI?b7*mfWM&TlZ0)xYaJ)l#XzD;gp*lgv^m`T zn-A%Iz8n(mIs^2`OP6ZE__ zH}pMHp9ojhJ4=wU|14$bIkoB@h~oka))m`FxeFf(8F_n;6ydwRAO~r1X6-D_kerQP zK?nM5IVBJlE|CcQ8`v242xHsxFaNgU)AU~OiX!NlR1{64bxOZ3bBaz`1nU$jqvuP^`7HOpwtKM6-DsX zCIlFQiGZ6X?h^oO)>A77Igm~IdFvXshxT&QFSuae2z(%Ty%qmOQi?lc*=0=w>Yjis zh$Xn}r=G?tdLI-8VIN(^Jjq4ZwdktPS$7d=Y(3AksUckL^lI9soviL{9)qTU=k5F&F8IiE0##kDnMrrz;~Xt zx;2Gg97%??HtUTG#tdm#0|s6E@Zgew z4oYDl_n@Yu3wi!3Q#-dSVt|mRa|HSj2ayEnzeBOtl43cpIp^uvfc{sg{9n~-V+I83 zn@qLVL41v8{hMO_da1tl)&H66{tDf|Z(iNS4t+SZp0|#>Aj2MC`H{y$6uON(n7d6WPqY@JH4$r-=1;nI<~U*nt{Ev<@!19wK`GQ*W=+7S6YBb7Bn!QH~5mHk`w#PRroc~bLj zPxFHbgHx&dm?@Tp1zlREVwqcmQB3qI6$664s9jxmejvU*QaQzRYhwVX7{9B8$KV3( zz3;2?`L#<26S?4l(Akp@DH;hHd_@HoDXGxEDbU{w&SPa=U90-w7})!t06GoD@^Cob z`1s?GrNO_(yqa9E*Ry%!1~xsip7hid!ou|Q4-8O!td>icTX4BtR2;6RsPrIFkrBkj z#nRd~erQB^csM)$_9wjd>MN{Tk%z$$PEXG*-rM~?6^AOZ+a0{Ma~FUAk8cnkKZEqN zR8F0)5A`#B20WHuU|eH1Sw06o!gr(h0td||%RBi6#!Nhqy-fbJth8Z=GgXiY6n=jb2)PNxf(%ZW%Tfuj3gc>%lX#?%xA_tq*VF8QH%HJZUyrI>tGESYct| zPn=HY_Sav3{a|TnseR6zIi#njla`i7Mn(purKR?wqN1NUoz6ciEG(1;{|4}C@~*BP znwqY#@zM444-AZoWgh9;^)}kuJ85pYirwKLU90Ne2Fh4ylOf$^1KYvdOg{{+u$w|+d2 zmBMJ|`?jROY`RF##L*<)j4iHnP)tgOs_;J|?@r_=dg`}gm^7;Ihf|6|m8 z@~hX|K=JHEIUa}8$+Da*+-^4~YRA63K6&yK3L1%t(}m3@OGSQx@kQW6U~UK{mg2cudERWYRE6>$07^n@jT zJwRDmS(TzFZ!-j!n@tw~Tg3*byu7^V;fEilxVU)5(6>$=I&?@b z(Z6B5nmjc%nU*WpaBCXrsk3M}H}((g*7gn_*|3`Pmzrs6@}Ks*JZ~vSj~>V6cC&It zF2CP*V9dIw&NT2>KYEFhvO^p>ax{pKGuqI4@t=)*V1S0!i%(iTf6OLJNL$L7O%^9G z;RgTGP*Y1|e}j45lb@+Shr{W_?Q#=0J(l>H)BV0M$G{490 z-Mf#0!9ko3C+X>_%%3;c@39YUSj+6RRQ_YvZXVydiJ0gRmc9xhhIuvl-Mjrm8 zzLc1#D5`2spwsDSYrnyjtAS5f-m-Ngmfsb!X7vg(=FK5YAI8pKyu*us^c+b^iM;*G z|72QN7}f?G$BqY|xh{kl&F6%RTeo{zx!kk1qvCK4imDJE?ztSdoo{4G_Ci|QI)d6N z3Eot{c}cMsQE+lY)bkdmClr6%v(w(-(htE!H1^yu+>bro2Q3tC7UI64j!bJEY2@An7cO2VDl&pgLnG)H8k?x7tf9Yu!0R>1i3vW_ zTK&~6Ev+Cveg+2*R}Fu?^A~T^-R(U%yf}MN$Z4%Y-0xKIB)Y6#xr~{9M$=oaUgt!e z)$i_H;d8G*s%uX0!H1vVu=~z2P!xqFi?ewC zyWgR>B;YNzg%Bes%T}$?6h&dq>{J%apF5$n*7FxHd!@B1s=~T8E7`pH(Fvus7MGL{ zr?mzX$t;AJqG_!{hEd2h=xx7&^RlTZ1(9e>S?8U7P$gb-sJzVV$qJB`c*8K^oHRZ&6l z%w$8;aBFVdnnqM)BsQDx+_%>DPM>j653XCymd7>{7N$q1epy$;?RMjGxp2DOB*f43 znfs<`8rFIn^X3J-&9@NZD~6lgt!e1=dT!miO>0{_dcB^G&Kumm(~BY8fWZ(!RAeMN zz0PMLy-vmDYa<4ii)rEET)A?MQ>W_*HyE&;yFlypHsWGqnGqL9LP7$DaNikmVR}9G z!HGZK6XJd~e7W9o^*Ta1iU!o!J*ilp<#P44#hGcY(nZcY}}$Gvy* zRaKRgSxG+AU2Be=#O`qL?6XgC_Uw7`@^Y9S8$)7Z0_Vx9;4*Xncm8>iYb==_g?K=R>os-VO1sOE8 zT*Gd+6Bedt?W#O3UT(qeXI*&HEcScsG>?*RNsgmW@3VW=vT?Xv^p2Rd zR&k_;xpUHZWW#F0^m^QyhRxPU^VMs9PjdTCFE?&>v0#1%rjPfMZ`{Vf;2<3xH-?XS z>*u@Juzoc^{?QLH7!0`FZa&|4fTJ~m?EWi+@W-pkHBIB_v3n`02anW@dV#~?;6h^) z7aE&TRTZ~;+V)##A`Aw$J@X{Fxl4(OiKe}ygR=6&R903`sICxVG{5s%6-8mw zBkNeSa6VlPER2rA)flP=c%r#rSVcTC0`t-t-X`%MGFWI4-e^tt5+{);lc%c`q}5a z``&N(;@}bf_21saT7Q;5eClyxVq-%7FhYpY#{8eWwXK5-Bc`bWTyDPN$y|>PZLYgc zRXKgSo|2M-Uf(}__$Z2^ken#@-a-NGGhUI!0yH zu~Fa8%ge!GchJ&uC8WAS2;YKQW4b(d3A58vsXktZYZBLzKmT1LYuBve-Cw~p(u8&7>}3m^S<50#aplW2qx6BAIA$3#c5Bs&vp z!#Ql{8Yk`Kvyu~e=IJN+-KYE5zrT3W>Ixz538=~A<7c2K3g;V}CiUd==4YU)DkY@{ z$3IvI5t4wKytlWHGxatGLs(=omX3~2_UtVjj(ZkDOum4c{BHjMt!*8XzMXJ)*DX$; zsYkC5etD}9A}|4U?ZO2aY~B0_vC+|!dh#t>9_63@;WbibB~5BwA;dlUK+;;<+Br}-(BC^5w*2<($?NNZZUsptv7CV z`8?iQe->-~*>USiTB{JDleAVLrZ`D!6=I5$v{oUexc>!B$Cvz)qB;ct0000 + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + YouTube + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Lorem Ip + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ? + ? + + + diff --git a/view/theme/vier/quattro.less b/view/theme/vier/quattro.less new file mode 100644 index 0000000000..6715773037 --- /dev/null +++ b/view/theme/vier/quattro.less @@ -0,0 +1,833 @@ +// Quattro Theme LESS file + +/* global */ +body { + font-family: Liberation Sans,helvetica,arial,clean,sans-serif; + font-size: 10px; + background-color: @BodyBackground; + color: @BodyColor; + margin: 50px 0px 0px 0px; + display:table; +} +h4 { font-size: 1.1em } + +.shadow(@x: 0px, @y: 5px){ + -webkit-box-shadow:@x @y 10px rgba(0, 0, 0, 0.7); + -moz-box-shadow:@x @y 10px rgba(0, 0, 0, 0.7); + box-shadow:@x @y 10px rgba(0, 0, 0, 0.7); +} + +.rounded(@tr: 5px, @tl: 5px, @bl: 5px, @br: 5px){ + -moz-border-radius: @arguments; + -webkit-border-radius: @arguments; + border-radius: @arguments; +} +.roundbottom (@radius: 5px){ .rounded(0, 0, @radius, @radius); } +.roundtop (@radius: 5px){ .rounded(@radius, @radius, 0, 0); } + +.opaque(@v: 0.5){ + opacity: @v; + -webkit-transition: all 0.2s ease-in-out; + -moz-transition: all 0.2s ease-in-out; + -o-transition: all 0.2s ease-in-out; + -ms-transition: all 0.2s ease-in-out; + transition: all 0.2s ease-in-out; +} + + +a, a:link { color: @Link; text-decoration: none; } +a:visited { color: @LinkVisited; text-decoration: none; } +a:hover {color: @LinkHover; text-decoration: underline; } + +.left { float: left; } +.right { float: right; } +.hidden { display: none; } +.clear { clear: both; } + +code { + font-family: Courier, monospace; + white-space: pre; + display: block; + overflow: auto; + border: 1px solid #444; + background: #EEE; + color: #444; + padding: 10px; + margin-top: 20px; +} +/* tool */ + +.tool { + height: auto; overflow: auto; + .label { float: left;} + .action { float: right; } +} + + + + +/* popup notifications */ +div.jGrowl div.notice { + background: @NoticeBackgroundColor url("../../../images/icons/48/notice.png") no-repeat 5px center; + color: @NoticeColor; + padding-left: 58px; +} +div.jGrowl div.info { + background: @InfoBackgroundColor url("../../../images/icons/48/info.png") no-repeat 5px center; + color: @InfoColor; + padding-left: 58px; +} + + + +/* header */ +header { + position: fixed; left: 43%; right: 43%; top: 0px; + margin: 0px; padding: 0px; + /*width: 100%; height: 12px; */ + z-index: 110; + color: @Grey1; + #site-location { + display: none; + } + + #banner { + overflow: hidden; + text-align: center; + width: 100%; + a, a:active, a:visited, a:link, a:hover { color: @Grey1; text-decoration: none; outline: none; vertical-align: bottom; } + #logo-img { height: 22px; margin-top:5px;} + #logo-text { font-size: 22px } + } +} +/* nav */ +nav { + width: 100%; height: 32px; + position: fixed; left: 0px; top: 0px; + padding: 0px; + background-color: @NavbarBackground; + color: @Grey1; + z-index: 100; + .shadow(0px, 0px); + + a, a:active, a:visited, a:link, a:hover { color: @Banner; text-decoration: none; outline: none; } + + ul { + margin: 0px; + padding: 0px 20px; + li { + list-style: none; + margin: 0px; padding: 0px; + float: left; + .menu-popup{ left: 0px; right: auto; } + } + + } + + .nav-menu-icon { + position: relative; + height: 22px; + padding: 5px; + margin: 0px 10px; + .roundtop(); + + &.selected { + background-color: @NavbarSelectedBg; + } + + img { width: 22px; height: 22px; } + .nav-notify { top: 3px; } + } + + .nav-menu { + position: relative; + height: 16px; + padding: 5px; + margin: 3px 15px 0px; + font-size: 14px; + border-bottom: 3px solid @NavbarBackground; + &.selected { + border-bottom: 3px solid @NavbarSelectedBorder; + } + + } + + .nav-notify { + display: none; + position: absolute; + background-color: @NavbarNotifBg; + .rounded(); + font-size: 10px; + padding: 1px 3px; + top: 0px; + right: -10px; + min-width: 15px; + text-align: right; + + &.show{ display: block; } + } + + + #nav-help-link, + #nav-search-link, + #nav-directory-link, + #nav-apps-link, + #nav-site-linkmenu { + float: right; + .menu-popup{ right: 0px; left: auto; } + } + + #nav-notifications-linkmenu.on .icon.s22.notify, + #nav-notifications-linkmenu.selected .icon.s22.notify { background-image: url("../../../images/icons/22/notify_on.png") } + #nav-apps-link.selected { background-color: @NavbarSelectedBg; } +} + + +ul.menu-popup { + position: absolute; + display: none; + width: 10em; + background: @MenuBg; + color: @Menu; + margin: 0px; + padding: 0px; + list-style: none; + border: 3px solid @MenuBorder; + z-index: 100000; + + .shadow(); + + a { display: block; color: @MenuItem; padding: 5px 10px; text-decoration: none;} + a:hover { background-color: @MenuItemHoverBg; } + .menu-sep { border-top: 1px solid @MenuItemSeparator; } + li { float: none; overflow: auto; height: auto; display: block; } + li img { float: left; width: 16px; height: 16px; padding-right: 5px;} + .empty { + padding: 5px; + text-align: center; + color: @MenuEmpty; + } + +} + +/* autocomplete popup */ +.acpopup { + max-height:150px; + background-color:@MenuBg; + color: @Menu; + border:1px solid #MenuBorder; + overflow:auto; + z-index:100000; + .shadow(); +} +.acpopupitem { + color: @MenuItem; padding: 4px; + clear:left; + img { + float: left; + margin-right: 4px; + } + &.selected{ + background-color: @MenuItemHoverBg; + } +} + + +#nav-notifications-menu { + width: 400px; + img { float: left; margin-right: 5px; } + .contactname { font-weight: bold; } + .notif-when { font-size: 10px; color: @MenuItemDetail; display: block; } +} + + + + +/* aside */ +aside { + display: table-cell; + vertical-align: top; + width: 200px; + padding:0px 10px 0px 20px; + border-right: 1px solid @AsideBorder; + + .vcard { + .fn { font-size: 16px; font-weight: bold; margin-bottom: 5px; } + .title { margin-bottom: 5px; } + dl { height: auto; overflow: auto; } + dt {float: left; margin-left: 0px; width: 35%; text-align: right; color: @VCardLabelColor; } + dd {float: left; margin-left: 4px; width: 60%;} + + } + + #profile-extra-links { + ul { padding: 0px; margin: 0px; } + li { padding: 0px; margin: 0px; list-style: none; } + } + + #dfrn-request-link { + display: block; + .rounded(); + color: @AsideConnect; + background: @AsideConnectBg url('../../../images/connect-bg.png') no-repeat left center; + font-weight: bold; + text-transform:uppercase; + padding: 4px 2px 2px 35px; + + &:hover { text-decoration: none; background-color: @AsideConnectHoverBg; } + } + + #profiles-menu { width: 20em; } + + +} + +#contact-block { + overflow: auto; height: auto; + .contact-block-h4 { float: left; margin: 5px 0px; } + .allcontact-link { float: right; margin: 5px 0px; } + .contact-block-content { + clear: both; + overflow: auto; height: auto; + } + .contact-block-link { + float: left; + margin: 0px 2px 2px 0px; + img { widht: 48px; height: 58px; } + } +} + + +/* widget */ +.widget { + margin-bottom: 2em; + + h3 { padding: 0px; margin: 2px;} + .action { .opaque(0.1); } + input.action { .opaque(0.5); } + &:hover .title .action { .opaque(1); } + .tool:hover .action { .opaque(1); } + .tool:hover .action.ticked { .opaque(1); } + + ul { padding: 0px;} + ul li {padding-left: 16px; min-height: 16px; list-style: none; } + + .tool.selected { + background: url('../../../images/selected.png') no-repeat left center; + } + + /*.action .s10 { width: 10px; overflow: hidden; padding: 0px;} + .action .s16 { width: 16px; overflow: hidden; padding: 0px;}*/ + +} + +/* widget: search */ +#add-search-popup { + width: 200px; + top: 18px; +} + + +/* section */ +section { + display: table-cell; + vertical-align: top; + width: 800px; + padding:0px 20px 0px 10px; +} + +/* wall item */ +.tread-wrapper { + background-color: @ThreadBackgroundColor; + position: relative; + padding: 10px; + margin-bottom: 20px; + width: 780px; +} +.wall-item-decor { position: absolute; left: 790px; top: -10px; width: 16px;} +.unstarred { display: none; } + +.wall-item-container { + display: table; + width: 780px; + + .wall-item-item, + .wall-item-bottom { display: table-row; } + + .wall-item-bottom { .opaque(0.5); } + &:hover .wall-item-bottom { .opaque(1); } + .wall-item-info { + display: table-cell; + vertical-align: top; + text-align: left; + width: 60px; + + } + .wall-item-location { + word-wrap: break-word; + width: 50px; + } + .wall-item-content { + display: table-cell; + font-size: 12px; + max-width: 720px; + word-wrap: break-word; + } + .wall-item-content img { max-width: 710px; } + .wall-item-links, + .wall-item-actions { + display: table-cell; + vertical-align: middle; + + .icon { + .opaque(0.5); + } + .icon:hover { + .opaque(1.0); + } + } + + .wall-item-ago { padding-right: 40px; } + .wall-item-name { font-weight: bold; } + + .wall-item-actions-author { float: left; width: 20em; margin-top: 0.5em; } + .wall-item-actions-social { float: left; margin-top: 0.5em; + a { margin-right: 3em; } + } + .wall-item-actions-tools { float: right; width: 15%; + a { float: right; } + input { float: right; } + } + +} + + +.wall-item-container.comment { + /*margin-top: 50px;*/ + .contact-photo { width: 32px; height: 32px; margin-left: 16px; + /*background: url(../../../images/icons/22/user.png) no-repeat center center;*/ + } + .contact-photo-menu-button { + top: 15px !important; + left: 15px !important; + } + .wall-item-links { padding-left: 12px; } +} + +.wall-item-comment-wrapper { + margin: 30px 2em 2em 60px; + .comment-edit-photo { display: none; } + textarea { + height: 1em; width: 100%; font-size: 10px; + color: @CommentBoxEmptyColor; + border: 1px solid @CommentBoxEmptyBorderColor; + padding:0.3em; + } + .comment-edit-text-full { + font-size: 14px; + height: 4em; + color: @CommentBoxFullColor; + border: 1px solid @CommentBoxFullBorderColor; + } +} + + + +.wall-item-tags { padding-top: 5px; } +.tag { + background: url("../../../images/tag_b.png") no-repeat center left; + color: @TagColor; + padding-left: 3px; + a { + padding-right: 8px; + background: url("../../../images/tag.png") no-repeat center right; + color: @TagColor; + } +} + +/* contacts menu */ +.contact-photo-wrapper { position: relative; } +.contact-photo { + width: 48px; height: 48px; + img { width: 48px; height: 48px; } + overflow: hidden; + display: block; + } +.contact-photo-menu-button { + display: none; + position: absolute; + left: -2px; + top: 31px; +} + +.contact-wrapper { + float: left; + width: 90px; + height: 90px; + .contact-photo { + width: 80px; height: 80px; + img { width: 80px; height: 80px; } + } + .contact-photo-menu-button { + left: 0px; + top: 63px; + } +} +.directory-item { + float: left; + width: 200px; + height: 200px; + .contact-photo { + width: 175px; height: 175px; + img { width: 175px; height: 175px; } + } +} +.contact-name { text-align: center; font-weight: bold; } +.contact-details { color: @Grey3;} + +/* editor */ +.jothidden { display: none; } +#jot { + + width: 100%; + margin: 0px 2em 20px 0px; + + + .profile-jot-text { + height: 1em; width: 99%; font-size: 10px; + color: @CommentBoxEmptyColor; + border: 1px solid @CommentBoxEmptyBorderColor; + padding:0.3em; + } + + #jot-tools { + margin: 0px; padding: 0px; + height: 40px; overflow: none; + width: 800px; + background-color: @JotToolsBackgroundColor; + border-bottom: 2px solid @JotToolsBorderColor; + li { + list-style: none; + float: left; + width: 80px; + height: 40px; + border-bottom: 2px solid @JotToolsBorderColor; + a { + display: block; + color: @JotToolsText; + width: 100%; + height:40px; + text-align: center; + line-height: 40px; + overflow: hidden; + } + } + li:hover { + background-color: @JotToolsOverBackgroundColor; + border-bottom: 2px solid @JotToolsOverBorderColor; + } + li.perms { + float: right; + width: 40px; + a.unlock { + width: 30px; + border-left: 10px solid @JotPermissionUnlockBackgroundColor; + background-color: @JotPermissionUnlockBackgroundColor; + } + a.lock { + width: 30px; + border-left: 10px solid @JotPermissionLockBackgroundColor; + background-color: @JotPermissionLockBackgroundColor; + } + + } + li.submit { + float: right; + background-color: @JotSubmitBackgroundColor; + border-bottom: 2px solid @JotSubmitBackgroundColor; + border-right: 1px solid @Grey4; + border-left: 1px solid @Grey4; + input { + border: 0px; margin: 0px; padding: 0px; + background-color: @JotSubmitBackgroundColor; + color: @JotSubmitText; + width: 80px; height: 40px; + line-height: 40px; + } + input:hover { + background-color: @JotSubmitOverBackgroundColor; + color: @JotSubmitOverText; + } + } + li.loading { + float: right; + background-color: @JotLoadingBackgroundColor; + width: 20px; + vertical-align: center; + text-align: center; + img { margin-top: 10px; } + border-top: 2px solid @JotToolsBorderColor; + height: 38px; + } + } + + #jot-title { + border: 0px; + margin: 0px; + height: 20px; + width: 700px; + font-weight: bold; + border: 1px solid @BodyBackground; + + &:-webkit-input-placeholder { + font-weight: normal; + } + + &:-moz-placeholder { + font-weight: normal; + } + + &:hover { border: 1px solid @CommentBoxEmptyBorderColor } + &:focus { border: 1px solid @CommentBoxEmptyBorderColor } + } + + #character-counter { + width: 80px; + float: right; + text-align: right; + height: 20px; + line-height: 20px; + padding-right: 20px; + } + +} + + +/** buttons **/ +/*input[type="submit"] { + border: 0px; + background-color: @ButtonBackgroundColor; + color: @ButtonColor; + padding: 0px 10px; + .rounded(5px); + height: 18px; +}*/ + + +/** acl **/ +#photo-edit-perms-select, +#photos-upload-permissions-wrapper, +#profile-jot-acl-wrapper{ + display:block!important; +} + + + +#acl-wrapper { + width: 690px; + float:left; +} +#acl-search { + float:right; + background: #ffffff url("../../../images/search_18.png") no-repeat right center; + padding-right:20px; +} +#acl-showall { + float: left; + display: block; + width: auto; + height: 18px; + background-color: #cccccc; + background-image: url("../../../images/show_all_off.png"); + background-position: 7px 7px; + background-repeat: no-repeat; + padding: 7px 5px 0px 30px; + color: #999999; + .rounded(5px); +} +#acl-showall.selected { + color: #000000; + background-color: #ff9900; + background-image: url("../../../images/show_all_on.png"); +} + +#acl-list { + height: 210px; + border: 1px solid #cccccc; + clear: both; + margin-top: 30px; + overflow: auto; +} +#acl-list-content { + +} +.acl-list-item { + display: block; + width: 150px; + height: 30px; + border: 1px solid #cccccc; + margin: 5px; + float: left; +} +.acl-list-item img{ + width:22px; + height: 22px; + float: left; + margin: 4px; +} +.acl-list-item p { height: 12px; font-size: 10px; margin: 0px; padding: 2px 0px 1px; overflow: hidden;} +.acl-list-item a { + font-size: 8px; + display: block; + width: 40px; + height: 10px; + float: left; + color: #999999; + background-color: #cccccc; + background-position: 3px 3px; + background-repeat: no-repeat; + margin-right: 5px; + -webkit-border-radius: 2px ; + -moz-border-radius: 2px; + border-radius: 2px; + padding-left: 15px; +} +#acl-wrapper a:hover { + text-decoration: none; + color:#000000; +} +.acl-button-show { background-image: url("../../../images/show_off.png"); } +.acl-button-hide { background-image: url("../../../images/hide_off.png"); } + +.acl-button-show.selected { + color: #000000; + background-color: #9ade00; + background-image: url("../../../images/show_on.png"); +} +.acl-button-hide.selected { + color: #000000; + background-color: #ff4141; + background-image: url("../../../images/hide_on.png"); +} +.acl-list-item.groupshow { border-color: #9ade00; } +.acl-list-item.grouphide { border-color: #ff4141; } +/** /acl **/ + +/** tab buttons **/ +ul.tabs { + list-style-type: none; + padding-bottom: 10px; + + li { + float: left; + margin-left: 20px; + + .active { + border-bottom: 1px solid @LinkVisited; + } + } + +} + + +/** + * Form fields + */ +.field { + margin-bottom: 10px; + padding-bottom: 10px; + overflow: auto; + width: 100%; + + + label { + float: left; + width: 200px; + } + + input, + textarea { + width: 400px; + } + textarea { height: 100px; } + .field_help { + display: block; + margin-left: 200px; + color: #666666; + + } + + + .onoff { + float: left; + width: 80px; + } + .onoff a { + display: block; + border:1px solid #666666; + background-image:url("../../../images/onoff.jpg"); + background-repeat: no-repeat; + padding: 4px 2px 2px 2px; + height: 16px; + text-decoration: none; + } + .onoff .off { + border-color:#666666; + padding-left: 40px; + background-position: left center; + background-color: #cccccc; + color: #666666; + text-align: right; + } + .onoff .on { + border-color:#204A87; + padding-right: 40px; + background-position: right center; + background-color: #D7E3F1; + color: #204A87; + text-align: left; + } + .hidden { display: none!important; } + + &.radio .field_help { margin-left: 0px; } +} + +#profile-edit-links li { + list-style: none; +} + +/* oauth */ +.oauthapp { + height: auto; overflow: auto; + border-bottom: 2px solid #cccccc; + padding-bottom: 1em; + margin-bottom: 1em; +} +.oauthapp img { + float: left; + width: 48px; height: 48px; + margin: 10px; +} +.oauthapp img.noicon { + background-image: url("../../../images/icons/48/plugin.png"); + background-position: center center; + background-repeat: no-repeat; +} +.oauthapp a { + float: left; +} + +/* contacts */ +.contact-entry-wrapper { + width: 50px; float: left; +} + +/* photo */ +.lframe { + float: left; + margin: 0px 10px 10px 0px; +} + + +/* page footer */ +footer { height: 100px; display: table-row; } diff --git a/view/theme/vier/search_item.tpl b/view/theme/vier/search_item.tpl new file mode 100755 index 0000000000..9cd3c8e2ef --- /dev/null +++ b/view/theme/vier/search_item.tpl @@ -0,0 +1,87 @@ + +
+ $star.starred + {{ if $lock }}$lock{{ endif }} + +
+ +
+
+
+
+ + $name + + menu + + +
+
+
+ $name + -   + {{ if $plink }}$ago{{ else }} $ago {{ endif }} + +
+
+ {{ if $title }}

$title

{{ endif }} + $body +
+
+
+ +
+ {{ for $tags as $tag }} + $tag + {{ endfor }} +
+
+
+
+ {{ if $plink }}$plink.title{{ endif }} +
+
+ +
$location 
+ +
+ {{ if $star }} + $star.do + $star.undo + $star.tagger + {{ endif }} + + {{ if $vote }} + $vote.like.1 + $vote.dislike.1 + {{ endif }} + + {{ if $vote.share }} + $vote.share.1 + {{ endif }} +
+ +
+ + {{ if $drop.dropping }} + + $drop.delete + {{ endif }} + {{ if $edpost }} + + {{ endif }} +
+ +
+
+
+ + +
$dislike
+
+
diff --git a/view/theme/vier/style.css b/view/theme/vier/style.css new file mode 100644 index 0000000000..96233c1daa --- /dev/null +++ b/view/theme/vier/style.css @@ -0,0 +1,1451 @@ +/** + * Fabio Comuni + * Additional Changes: Michael Vogel + **/ + +/* ========= */ +/* = Admin = */ +/* ========= */ + +#adminpage { +/* width: 80%;*/ +} + +#pending-update { + float:right; + color: #ffffff; + font-weight: bold; + background-color: #FF0000; + padding: 0em 0.3em; +} + +.admin.linklist { + border: 0px; padding: 0px; +} + +.admin.link { + list-style-position: inside; + font-size: 1em; + padding: 5px; + width: 100px; + margin: 5px; +} + +#adminpage dl { + clear: left; + margin-bottom: 2px; + padding-bottom: 2px; + border-bottom: 1px solid black; +} + +#adminpage dt { + width: 200px; + float: left; + font-weight: bold; +} + +#adminpage dd { + margin-left: 200px; +} +#adminpage h3 { + border-bottom: 1px solid #898989; + margin-bottom: 5px; + margin-top: 10px; +} + +#adminpage .submit { + clear:left; +} + +#adminpage #pluginslist { + margin: 0px; padding: 0px; +} + +#adminpage .plugin { + list-style: none; + display: block; + /* border: 1px solid #888888; */ + padding: 1em; + margin-bottom: 5px; + clear: left; +} + +#adminpage .toggleplugin { + float:left; + margin-right: 1em; +} + +#adminpage table {width:100%; border-bottom: 1p solid #000000; margin: 5px 0px;} +#adminpage table th { text-align: left;} +#adminpage td .icon { float: left;} +#adminpage table#users img { width: 16px; height: 16px; } +#adminpage table tr:hover { background-color: #eeeeee; } +#adminpage .selectall { text-align: right; } +/* icons */ + + +.article { background-position: -50px 0px;} +.audio { background-position: -70px 0px;} +.block { background-position: -90px 0px;} +.drop { background-position: -110px 0px;} +.drophide { background-position: -130px 0px;} +.edit { background-position: -150px 0px;} +.camera { background-position: -170px 0px;} +.dislike { background-position: -190px 0px;} +.like { background-position: -210px 0px;} +.link { background-position: -230px 0px;} + +.globe { background-position: -50px -20px;} +.noglobe { background-position: -70px -20px;} +.no { background-position: -90px -20px;} +.pause { background-position: -110px -20px;} +.play { background-position: -130px -20px;} +.pencil { background-position: -150px -20px;} +.small-pencil { background-position: -170px -20px;} +.recycle { background-position: -190px -20px;} +.remote-link { background-position: -210px -20px;} +.share { background-position: -230px -20px;} + +.tools { background-position: -50px -40px;} +.lock { background-position: -70px -40px;} + +.video { background-position: -110px -40px;} +.youtube { background-position: -130px -40px;} + +.attach { background-position: -190px -40px;} +.language { background-position: -210px -40px;} + + +.on { background-position: -50px -60px;} +.off { background-position: -70px -60px;} +.prev { background-position: -90px -60px;} +.next { background-position: -110px -60px;} +.tagged { background-position: -130px -60px;} + +.icon.drop, .icon.drophide { + float: left; +} + +.icon { + display: block; + width: 20px; + height: 20px; + background-image: url('icons.png'); +} + +.icon { + background-color: transparent ; + background-repeat: no-repeat; + /* background-position: left center; */ + display: block; + overflow: hidden; + text-indent: -9999px; + padding: 1px; +} + +.icon.text { + text-indent: 0px; +} +.icon.s10 { + min-width: 10px; + height: 10px; +} +.icon.s10.notify { + background-image: url("../../../images/icons/10/notify_off.png"); +} +.icon.s10.gear { + background-image: url("../../../images/icons/10/gear.png"); +} +.icon.s10.add { + background-image: url("../../../images/icons/10/add.png"); +} +.icon.s10.delete { + background-image: url("../../../images/icons/10/delete.png"); +} +.icon.s10.edit { + background-image: url("../../../images/icons/10/edit.png"); +} +.icon.s10.star { + background-image: url("../../../images/icons/10/star.png"); +} +.icon.s10.menu { + background-image: url("../../../images/icons/10/menu.png"); +} +.icon.s10.link { + background-image: url("../../../images/icons/10/link.png"); +} +.icon.s10.lock { + background-image: url("../../../images/icons/10/lock.png"); +} +.icon.s10.unlock { + background-image: url("../../../images/icons/10/unlock.png"); +} +.icon.s10.text { + padding: 2px 0px 0px 15px; + font-size: 10px; +} +.icon.s16 { + min-width: 16px; + height: 16px; +} +.icon.s16.notify { + background-image: url("../../../images/icons/16/notify_off.png"); +} +.icon.s16.gear { + background-image: url("../../../images/icons/16/gear.png"); +} +.icon.s16.add { + background-image: url("../../../images/icons/16/add.png"); +} +.icon.s16.delete { + background-image: url("../../../images/icons/16/delete.png"); +} +.icon.s16.edit { + background-image: url("../../../images/icons/16/edit.png"); +} +.icon.s16.star { + background-image: url("../../../images/icons/16/star.png"); +} +.icon.s16.menu { + background-image: url("../../../images/icons/16/menu.png"); +} +/*.icon.s16.link { + background-image: url("../../../images/icons/16/link.png"); +}*/ +.icon.s16.lock { + background-image: url("../../../images/icons/16/lock.png"); +} +.icon.s16.unlock { + background-image: url("../../../images/icons/16/unlock.png"); +} +.icon.s16.text { + padding: 4px 0px 0px 20px; + font-size: 10px; +} +.icon.s22 { + min-width: 22px; + height: 22px; +} +.icon.s22.notify { + background-image: url("../../../images/icons/22/notify_off.png"); +} +.icon.s22.gear { + background-image: url("../../../images/icons/22/gear.png"); +} +.icon.s22.add { + background-image: url("../../../images/icons/22/add.png"); +} +.icon.s22.delete { + background-image: url("../../../images/icons/22/delete.png"); +} +.icon.s22.edit { + background-image: url("../../../images/icons/22/edit.png"); +} +.icon.s22.star { + background-image: url("../../../images/icons/22/star.png"); +} +.icon.s22.menu { + background-image: url("../../../images/icons/22/menu.png"); +} +.icon.s22.link { + background-image: url("../../../images/icons/22/link.png"); +} +.icon.s22.lock { + background-image: url("../../../images/icons/22/lock.png"); +} +.icon.s22.unlock { + background-image: url("../../../images/icons/22/unlock.png"); +} +.icon.s22.text { + padding: 10px 0px 0px 25px; + width: 200px; +} +.icon.s48 { + width: 48px; + height: 48px; +} +.icon.s48.notify { + background-image: url("../../../images/icons/48/notify_off.png"); +} +.icon.s48.gear { + background-image: url("../../../images/icons/48/gear.png"); +} +.icon.s48.add { + background-image: url("../../../images/icons/48/add.png"); +} +.icon.s48.delete { + background-image: url("../../../images/icons/48/delete.png"); +} +.icon.s48.edit { + background-image: url("../../../images/icons/48/edit.png"); +} +.icon.s48.star { + background-image: url("../../../images/icons/48/star.png"); +} +.icon.s48.menu { + background-image: url("../../../images/icons/48/menu.png"); +} +.icon.s48.link { + background-image: url("../../../images/icons/48/link.png"); +} +.icon.s48.lock { + background-image: url("../../../images/icons/48/lock.png"); +} +.icon.s48.unlock { + background-image: url("../../../images/icons/48/unlock.png"); +} + +#contact-edit-links ul { + list-style: none; + list-style-type: none; +} + +.hide-comments-outer { + margin-left: 80px; + margin-bottom: 5px; + width: 684px; + border-bottom: 1px solid #BDCDD4; + border-top: 1px solid #BDCDD4; + + padding: 8px; +} + +/* global */ +body { + font-family: 'Lato', "Helvetica Neue", Helvetica, Arial, sans-serif; + font-size: 13px; + background-color: #ffffff; + color: #2d2d2d; + margin: 50px 0px 0px 0px; + display: table; +} +h4 { + font-size: 1.1em; +} + +a {color: #3e3e8c; +text-decoration: none; +} +a:hover {color: blue; +text-decoration: underline} + +.wall-item-name-link { +/* float: left;*/ +} + +.wall-item-photo { + width: 48px; + height: 48px; + overflow: hidden; + display: block; +} + +.left { + float: left; +} +.right { + float: right; +} +.hidden { + display: none; +} +.clear { + clear: both; +} +.fakelink { + color: #3e3e8c; + text-decoration: none; + cursor: pointer; +} +.fakelink:hover { + color: blue; + /*color: #005c94; */ + text-decoration: underline; +} +code { + font-family: Courier, monospace; + white-space: pre; + display: block; + overflow: auto; + border: 1px solid #444; + background: #EEE; + color: #444; + padding: 10px; + margin-top: 20px; +} +#panel { + position: absolute; + width: 10em; + background: #ffffff; + color: #2d2d2d; + margin: 0px; + padding: 1em; + list-style: none; + border: 3px solid #364e59; + z-index: 100000; + -webkit-box-shadow: 0px 5px 10px rgba(0, 0, 0, 0.7); + -moz-box-shadow: 0px 5px 10px rgba(0, 0, 0, 0.7); + box-shadow: 0px 5px 10px rgba(0, 0, 0, 0.7); +} +/* tool */ +.tool { + height: auto; + overflow: auto; +} +.tool .label { + float: left; +} +.tool .action { + float: right; +} +/* popup notifications */ +div.jGrowl div.notice { + background: #511919 url("../../../images/icons/48/notice.png") no-repeat 5px center; + color: #ffffff; + padding-left: 58px; +} +div.jGrowl div.info { + background: #364e59 url("../../../images/icons/48/info.png") no-repeat 5px center; + color: #ffffff; + padding-left: 58px; +} +/* header */ +header { + position: fixed; + left: 43%; + right: 43%; + top: 0px; + margin: 0px; + padding: 0px; + /*width: 100%; height: 12px; */ + + z-index: 110; + color: #ffffff; +} +header #site-location { + display: none; +} +header #banner { + overflow: hidden; + text-align: center; + width: 100%; +} +header #banner a, +header #banner a:active, +header #banner a:visited, +header #banner a:link, +header #banner a:hover { + color: #ffffff; + text-decoration: none; + outline: none; + vertical-align: bottom; +} +header #banner #logo-img { + height: 22px; + margin-top: 5px; +} +header #banner #logo-text { + font-size: 22px; +} +/* nav */ +nav { + width: 100%; + height: 32px; + position: fixed; + left: 0px; + top: 0px; + padding: 0px; + background: #364A84; + background: -moz-linear-gradient(top, #516499 0%, #364a84 100%); + background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#516499), color-stop(100%,#364a84)); + background: -webkit-linear-gradient(top, #516499 0%,#364a84 100%); + background: -o-linear-gradient(top, #516499 0%,#364a84 100%); + background: -ms-linear-gradient(top, #516499 0%,#364a84 100%); + filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#516499', endColorstr='#364a84',GradientType=0 ); + background: linear-gradient(top, #516499 0%,#364a84 100%); + color: #ffffff; + z-index: 100; + -webkit-box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.7); + -moz-box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.7); + box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.7); +} +nav a, +nav a:active, +nav a:visited, +nav a:link, +nav a:hover { + color: #ffffff; + text-decoration: none; + outline: none; +} +nav ul { + margin: 0px; + padding: 0px 20px; +} +nav ul li { + list-style: none; + margin: 0px; + padding: 0px; + float: left; +} +nav ul li .menu-popup { + left: 0px; + right: auto; +} +nav .nav-menu-icon { + position: relative; + height: 22px; + padding: 5px; + margin: 0px 10px; + -moz-border-radius: 5px 5px 0 0; + -webkit-border-radius: 5px 5px 0 0; + border-radius: 5px 5px 0 0; +} +nav .nav-menu-icon.selected { + background-color: #364e59; +} +nav .nav-menu-icon img { + width: 22px; + height: 22px; +} +nav .nav-menu-icon .nav-notify { + top: 3px; +} +nav .nav-menu { + position: relative; + height: 16px; + padding: 5px; + margin: 3px 15px 0px; + font-size: 13px; + border-bottom: 3px solid #364A84; +} +nav .nav-menu.selected { + border-bottom: 3px solid #9eabb0; +} +nav .nav-notify { + display: none; + position: absolute; + background-color: #19aeff; + -moz-border-radius: 5px 5px 5px 5px; + -webkit-border-radius: 5px 5px 5px 5px; + border-radius: 5px 5px 5px 5px; + font-size: 10px; + padding: 1px 3px; + top: 0px; + right: -10px; + min-width: 15px; + text-align: right; +} +nav .nav-notify.show { + display: block; +} +nav #nav-help-link, +nav #nav-search-link, +nav #nav-directory-link, +nav #nav-apps-link, +nav #nav-site-linkmenu { + float: right; +} +nav #nav-help-link .menu-popup, +nav #nav-search-link .menu-popup, +nav #nav-directory-link .menu-popup, +nav #nav-apps-link .menu-popup, +nav #nav-site-linkmenu .menu-popup { + right: 0px; + left: auto; +} +nav #nav-notifications-linkmenu.on .icon.s22.notify, nav #nav-notifications-linkmenu.selected .icon.s22.notify { + background-image: url("../../../images/icons/22/notify_on.png"); +} +nav #nav-apps-link.selected { + background-color: #364e59; +} +ul.menu-popup { + position: absolute; + display: none; + width: 10em; + background: #ffffff; + color: #2d2d2d; + margin: 0px; + padding: 0px; + list-style: none; + border: 3px solid #364e59; + z-index: 100000; + -webkit-box-shadow: 0px 5px 10px rgba(0, 0, 0, 0.7); + -moz-box-shadow: 0px 5px 10px rgba(0, 0, 0, 0.7); + box-shadow: 0px 5px 10px rgba(0, 0, 0, 0.7); +} +ul.menu-popup a { + display: block; + color: #2d2d2d; + padding: 5px 10px; + text-decoration: none; +} +ul.menu-popup a:hover { + background-color: #bdcdd4; +} +ul.menu-popup .menu-sep { + border-top: 1px solid #9eabb0; +} +ul.menu-popup li { + float: none; + overflow: auto; + height: auto; + display: block; +} +ul.menu-popup li img { + float: left; + width: 16px; + height: 16px; + padding-right: 5px; +} +ul.menu-popup .empty { + padding: 5px; + text-align: center; + color: #9eabb0; +} +/* autocomplete popup */ +.acpopup { + max-height: 150px; + background-color: #ffffff; + color: #2d2d2d; + border: 1px solid #MenuBorder; + overflow: auto; + z-index: 100000; + -webkit-box-shadow: 0px 5px 10px rgba(0, 0, 0, 0.7); + -moz-box-shadow: 0px 5px 10px rgba(0, 0, 0, 0.7); + box-shadow: 0px 5px 10px rgba(0, 0, 0, 0.7); +} +.acpopupitem { + color: #2d2d2d; + padding: 4px; + clear: left; +} +.acpopupitem img { + float: left; + margin-right: 4px; +} +.acpopupitem.selected { + background-color: #bdcdd4; +} +#nav-notifications-menu { + width: 400px; + max-height: 550px; + overflow: auto; +} +#nav-notifications-menu img { + float: left; + margin-right: 5px; +} +#nav-notifications-menu .contactname { + font-weight: bold; +} +#nav-notifications-menu .notif-when { + font-size: 10px; + color: #9eabb0; + display: block; +} +/* aside */ +aside { + display: table-cell; + vertical-align: top; + width: 200px; + padding: 0px 10px 0px 20px; + border-right: 1px solid #D2D2D2; + /* background: #F1F1F1; */ +} +aside .vcard .fn { + font-size: 16px; + font-weight: bold; + margin-bottom: 5px; +} +aside .vcard .title { + margin-bottom: 5px; +} +aside .vcard dl { + height: auto; + overflow: auto; +} +aside .vcard dt { + float: left; + margin-left: 0px; + width: 35%; + text-align: right; + color: #999999; +} +aside .vcard dd { + float: left; + margin-left: 4px; + width: 60%; +} +aside #profile-extra-links ul { + padding: 0px; + margin: 0px; +} +aside #profile-extra-links li { + padding: 0px; + margin: 0px; + list-style: none; +} +aside #dfrn-request-link { + display: block; + -moz-border-radius: 5px 5px 5px 5px; + -webkit-border-radius: 5px 5px 5px 5px; + border-radius: 5px 5px 5px 5px; + color: #ffffff; + background: #005c94 url('../../../images/connect-bg.png') no-repeat left center; + font-weight: bold; + text-transform: uppercase; + padding: 4px 2px 2px 35px; +} +aside #dfrn-request-link:hover { + text-decoration: none; + background-color: #19aeff; +} +aside #profiles-menu { + width: 20em; +} +#contact-block { + overflow: auto; + height: auto; +} +#contact-block .contact-block-h4 { + float: left; + margin: 5px 0px; +} +#contact-block .allcontact-link { + float: right; + margin: 5px 0px; +} +#contact-block .contact-block-content { + clear: both; + overflow: auto; + height: auto; +} +#contact-block .contact-block-link { + float: left; + margin: 0px 2px 2px 0px; +} +#contact-block .contact-block-link img { + widht: 48px; + height: 58px; +} +/* widget */ +.widget { + margin-bottom: 2em; + /*.action .s10 { width: 10px; overflow: hidden; padding: 0px;} + .action .s16 { width: 16px; overflow: hidden; padding: 0px;}*/ +/* font-size: 12px; */ +} +.widget h3 { + padding: 0px; + margin: 2px; +} +.widget .action { + opacity: 0.1; + -webkit-transition: all 0.2s ease-in-out; + -moz-transition: all 0.2s ease-in-out; + -o-transition: all 0.2s ease-in-out; + -ms-transition: all 0.2s ease-in-out; + transition: all 0.2s ease-in-out; +} +.widget input.action { + opacity: 0.5; + -webkit-transition: all 0.2s ease-in-out; + -moz-transition: all 0.2s ease-in-out; + -o-transition: all 0.2s ease-in-out; + -ms-transition: all 0.2s ease-in-out; + transition: all 0.2s ease-in-out; +} +.widget:hover .title .action { + opacity: 1; + -webkit-transition: all 0.2s ease-in-out; + -moz-transition: all 0.2s ease-in-out; + -o-transition: all 0.2s ease-in-out; + -ms-transition: all 0.2s ease-in-out; + transition: all 0.2s ease-in-out; +} +.widget .tool:hover .action { + opacity: 1; + -webkit-transition: all 0.2s ease-in-out; + -moz-transition: all 0.2s ease-in-out; + -o-transition: all 0.2s ease-in-out; + -ms-transition: all 0.2s ease-in-out; + transition: all 0.2s ease-in-out; +} +.widget .tool:hover .action.ticked { + opacity: 1; + -webkit-transition: all 0.2s ease-in-out; + -moz-transition: all 0.2s ease-in-out; + -o-transition: all 0.2s ease-in-out; + -ms-transition: all 0.2s ease-in-out; + transition: all 0.2s ease-in-out; +} +.widget ul { + padding: 0px; +} +.widget ul li { + padding-left: 16px; + min-height: 16px; + list-style: none; +} +.widget .tool.selected { + background: url('../../../images/selected.png') no-repeat left center; +} +/* widget: search */ +#add-search-popup { + width: 200px; + top: 18px; +} +/* section */ +section { + display: table-cell; + vertical-align: top; + width: 800px; + padding: 0px 20px 0px 10px; +} +/* wall item */ +.tread-wrapper { + border-bottom: 1px solid #D2D2D2; + position: relative; + padding: 5px; + margin-bottom: 0px; + width: 775px; +} +.wall-item-decor { + position: absolute; + left: 790px; + top: -10px; + width: 16px; +} +.unstarred { + display: none; +} +.wall-item-container { + display: table; + width: 780px; +} +.wall-item-container .wall-item-item, .wall-item-container .wall-item-bottom { + display: table-row; +} +.wall-item-bottom { + font-size: 13px; +} +.wall-item-container .wall-item-bottom { + opacity: 0.5; + -webkit-transition: all 0.2s ease-in-out; + -moz-transition: all 0.2s ease-in-out; + -o-transition: all 0.2s ease-in-out; + -ms-transition: all 0.2s ease-in-out; + transition: all 0.2s ease-in-out; +} +.wall-item-container:hover .wall-item-bottom { + opacity: 1; + -webkit-transition: all 0.2s ease-in-out; + -moz-transition: all 0.2s ease-in-out; + -o-transition: all 0.2s ease-in-out; + -ms-transition: all 0.2s ease-in-out; + transition: all 0.2s ease-in-out; +} +.wall-item-container .wall-item-info { + display: table-cell; + vertical-align: top; + text-align: left; + width: 80px; +} +.wall-item-container .wall-item-location { + padding-right: 40px; +} +.wall-item-container .wall-item-ago { + word-wrap: break-word; + width: 50px; + margin-left: 10px; + color: #999; +} +.wall-item-location { + width: 180px; + float: left; +} + +.wall-item-container .wall-item-content { + font-size: 13px; + max-width: 720px; + word-wrap: break-word; + line-height: 1.4; +} + +.wall-item-container .wall-item-content img { + max-width: 710px; +} +.wall-item-container .wall-item-links, .wall-item-container .wall-item-actions { + display: table-cell; + vertical-align: middle; +} +.wall-item-container .wall-item-links .icon, .wall-item-container .wall-item-actions .icon { + opacity: 0.5; + -webkit-transition: all 0.2s ease-in-out; + -moz-transition: all 0.2s ease-in-out; + -o-transition: all 0.2s ease-in-out; + -ms-transition: all 0.2s ease-in-out; + transition: all 0.2s ease-in-out; +} +.wall-item-container .wall-item-links .icon:hover, .wall-item-container .wall-item-actions .icon:hover { + opacity: 1; + -webkit-transition: all 0.2s ease-in-out; + -moz-transition: all 0.2s ease-in-out; + -o-transition: all 0.2s ease-in-out; + -ms-transition: all 0.2s ease-in-out; + transition: all 0.2s ease-in-out; +} +.wall-item-container .wall-item-name { + font-weight: bold; +} +.wall-item-container .wall-item-actions-author { + width: 100%; + margin-bottom: 0.3em; +} +.wall-item-container .wall-item-actions-social { + float: left; + margin-bottom: 1px; +} +.wall-item-container .wall-item-actions-social a { + margin-right: 1em; +} +.wall-item-container .wall-item-actions-tools { + float: right; + width: 60px; +} +.wall-item-container .wall-item-actions-tools a { + float: right; +} +.wall-item-container .wall-item-actions-tools input { + float: right; +} +.wall-item-container.comment { + margin-top: 5px; + margin-bottom: 5px; + margin-left: 80px; + width: 700px; + border-bottom: 1px solid hsl(198, 21%, 79%); +} +.wall-item-container.comment .contact-photo { + width: 32px; + height: 32px; + margin-left: 16px; + /*background: url(../../../images/icons/22/user.png) no-repeat center center;*/ + +} +.wall-item-container.comment .contact-photo-menu-button { + top: 15px !important; + left: 15px !important; +} +.wall-item-container.comment .wall-item-links { + padding-left: 12px; +} +.wall-item-comment-wrapper { + margin: 1px 5px 1px 80px; +} +.wall-item-comment-wrapper .comment-edit-photo { + display: none; +} +.wall-item-comment-wrapper textarea { + height: 1.2em; + width: 100%; + font-size: 10px; + color: #999999; + border: 1px solid #DDD; + padding: 0.3em; +} +.wall-item-comment-wrapper .comment-edit-text-full { + font-size: 14px; + height: 4em; + color: #2d2d2d; + border: 1px solid #2d2d2d; +} +.comment-edit-preview { + width: 710px; + border: 1px solid #2d2d2d; + margin-top: 10px; +} +.comment-edit-preview .contact-photo { + width: 32px; + height: 32px; + margin-left: 16px; + /*background: url(../../../images/icons/22/user.png) no-repeat center center;*/ + +} +.comment-edit-preview .contact-photo-menu-button { + top: 15px !important; + left: 15px !important; +} +.comment-edit-preview .wall-item-links { + padding-left: 12px; +} +.comment-edit-preview .wall-item-container { + width: 700px; +} +.comment-edit-preview .tread-wrapper { + width: 700px; + padding: 0; + margin: 10px 0; +} +.wall-item-tags { + padding-top: 1px; + padding-bottom: 2px; +} +.tag { + background: url("../../../images/tag_b.png") repeat-x center left; + color: #ffffff; + padding-left: 3px; + font-size: 10px; +} +.tag a { + padding-right: 8px; + background: url("../../../images/tag.png") no-repeat center right; + color: #ffffff; +} +.wwto { + position: absolute !important; + width: 25px; + height: 25px; + background: #FFFFFF; + border: 2px solid #364e59; + height: 25px; + width: 25px; + overflow: hidden; + padding: 1px; + position: absolute !important; + top: 40px; + left: 30px; + -webkit-box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.7); + -moz-box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.7); + box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.7); +} +.wwto .contact-photo { + width: auto; + height: 25px; +} +/* contacts menu */ +.contact-photo-wrapper { + position: relative; +} +.contact-photo { + width: 48px; + height: 48px; + overflow: hidden; + display: block; +} +.contact-photo img { + width: 48px; + height: 48px; +} +.contact-photo-menu-button { + display: none; + position: absolute; + left: -2px; + top: 31px; +} +.contact-wrapper { + float: left; + width: 90px; + height: 90px; + margin-bottom: 15px; +} +.contact-wrapper .contact-photo { + width: 80px; + height: 80px; +} +.contact-wrapper .contact-photo img { + width: 80px; + height: 80px; +} +.contact-wrapper .contact-photo-menu-button { + left: 0px; + top: 63px; +} +.directory-item { + float: left; + width: 200px; + height: 200px; +} +.directory-item .contact-photo { + width: 175px; + height: 175px; +} +.directory-item .contact-photo img { + width: 175px; + height: 175px; +} +.contact-name { + text-align: center; + font-weight: bold; + font-size: 12px; +} +.contact-details { + color: #999999; +} +/* editor */ +.jothidden { + display: none; +} +#jot { + width: 785px; + margin: 0px 2em 20px 0px; +} +#jot .profile-jot-text { + height: 1.2em; + width: 99%; + font-size: 10px; + color: #999999; + border: 1px solid #DDD; + padding: 0.3em; +} +#jot #jot-tools { + margin: 0px; + padding: 0px; + height: 40px; + overflow: none; + width: 783px; + background-color: #0e232e; + border-bottom: 2px solid #9eabb0; +} +#jot #jot-tools li { + list-style: none; + float: left; + width: 80px; + height: 40px; + border-bottom: 2px solid #9eabb0; +} +#jot #jot-tools li a { + display: block; + color: #cccccc; + width: 100%; + height: 40px; + text-align: center; + line-height: 40px; + overflow: hidden; +} +#jot #jot-tools li:hover { + background-color: #364e59; + border-bottom: 2px solid #bdcdd4; +} +#jot #jot-tools li.perms { + float: right; + width: 40px; +} +#jot #jot-tools li.perms a.unlock { + width: 30px; + border-left: 10px solid #cccccc; + background-color: #cccccc; + background-position: left center; +} +#jot #jot-tools li.perms a.lock { + width: 30px; + border-left: 10px solid #666666; + background-color: #666666; +} +#jot #jot-tools li.submit { + float: right; + background-color: #cccccc; + border-bottom: 2px solid #cccccc; + border-right: 1px solid #666666; + border-left: 1px solid #666666; +} +#jot #jot-tools li.submit input { + border: 0px; + margin: 0px; + padding: 0px; + background-color: #cccccc; + color: #666666; + width: 80px; + height: 40px; + line-height: 40px; +} +#jot #jot-tools li.submit input:hover { + background-color: #bdcdd4; + color: #666666; +} +#jot #jot-tools li.loading { + float: right; + background-color: #ffffff; + width: 20px; + vertical-align: center; + text-align: center; + border-top: 2px solid #9eabb0; + height: 38px; +} +#jot #jot-tools li.loading img { + margin-top: 10px; +} +#jot #jot-title { + border: 0px; + margin: 0px; + height: 20px; + width: 700px; + font-weight: bold; + border: 1px solid #ffffff; +} +#jot #jot-title:-webkit-input-placeholder { + font-weight: normal; +} +#jot #jot-title:-moz-placeholder { + font-weight: normal; +} +#jot #jot-title:hover { + border: 1px solid #999999; +} +#jot #jot-title:focus { + border: 1px solid #999999; +} +#jot #character-counter { + width: 80px; + float: right; + text-align: right; + height: 20px; + line-height: 20px; + padding-right: 20px; +} +/** buttons **/ +/*input[type="submit"] { + border: 0px; + background-color: @ButtonBackgroundColor; + color: @ButtonColor; + padding: 0px 10px; + .rounded(5px); + height: 18px; +}*/ +/** acl **/ +#photo-edit-perms-select, #photos-upload-permissions-wrapper, #profile-jot-acl-wrapper { + display: block!important; +} +#acl-wrapper { + width: 690px; + float: left; +} +#acl-search { + float: right; + background: #ffffff url("../../../images/search_18.png") no-repeat right center; + padding-right: 20px; +} +#acl-showall { + float: left; + display: block; + width: auto; + height: 18px; + background-color: #cccccc; + background-image: url("../../../images/show_all_off.png"); + background-position: 7px 7px; + background-repeat: no-repeat; + padding: 7px 5px 0px 30px; + color: #999999; + -moz-border-radius: 5px 5px 5px 5px; + -webkit-border-radius: 5px 5px 5px 5px; + border-radius: 5px 5px 5px 5px; +} +#acl-showall.selected { + color: #000000; + background-color: #ff9900; + background-image: url("../../../images/show_all_on.png"); +} +#acl-list { + height: 210px; + border: 1px solid #cccccc; + clear: both; + margin-top: 30px; + overflow: auto; +} +.acl-list-item { + display: block; + width: 150px; + height: 30px; + border: 1px solid #cccccc; + margin: 5px; + float: left; +} +.acl-list-item img { + width: 22px; + height: 22px; + float: left; + margin: 4px; +} +.acl-list-item p { + height: 12px; + font-size: 10px; + margin: 0px; + padding: 2px 0px 1px; + overflow: hidden; +} +.acl-list-item a { + font-size: 8px; + display: block; + width: 40px; + height: 10px; + float: left; + color: #999999; + background-color: #cccccc; + background-position: 3px 3px; + background-repeat: no-repeat; + margin-right: 5px; + -webkit-border-radius: 2px ; + -moz-border-radius: 2px; + border-radius: 2px; + padding-left: 15px; +} +#acl-wrapper a:hover { + text-decoration: none; + color: #000000; +} +.acl-button-show { + background-image: url("../../../images/show_off.png"); +} +.acl-button-hide { + background-image: url("../../../images/hide_off.png"); +} +.acl-button-show.selected { + color: #000000; + background-color: #9ade00; + background-image: url("../../../images/show_on.png"); +} +.acl-button-hide.selected { + color: #000000; + background-color: #ff4141; + background-image: url("../../../images/hide_on.png"); +} +.acl-list-item.groupshow { + border-color: #9ade00; +} +.acl-list-item.grouphide { + border-color: #ff4141; +} +/** /acl **/ +/** tab buttons **/ +ul.tabs { + list-style-type: none; + padding-bottom: 10px; + font-size: 13px; +} +ul.tabs li { + float: left; + margin-left: 7px; +} +ul.tabs li .active { + border-bottom: 1px solid #005c94; +} +/** + * Form fields + */ +.field { + margin-bottom: 10px; + padding-bottom: 10px; + overflow: auto; + width: 100%; +} +.field label { + float: left; + width: 200px; +} +.field input, .field textarea { + width: 400px; +} +.field textarea { + height: 100px; +} +.field .field_help { + display: block; + margin-left: 200px; + color: #666666; +} +.field .onoff { + float: left; + width: 80px; +} +.field .onoff a { + display: block; + border: 1px solid #666666; + background-image: url("../../../images/onoff.jpg"); + background-repeat: no-repeat; + padding: 4px 2px 2px 2px; + height: 16px; + text-decoration: none; +} +.field .onoff .off { + border-color: #666666; + padding-left: 40px; + background-position: left center; + background-color: #cccccc; + color: #666666; + text-align: right; +} +.field .onoff .on { + border-color: #204A87; + padding-right: 40px; + background-position: right center; + background-color: #D7E3F1; + color: #204A87; + text-align: left; +} +.field .hidden { + display: none!important; +} +.field.radio .field_help { + margin-left: 0px; +} +#profile-edit-links li { + list-style: none; +} +/* oauth */ +.oauthapp { + height: auto; + overflow: auto; + border-bottom: 2px solid #cccccc; + padding-bottom: 1em; + margin-bottom: 1em; +} +.oauthapp img { + float: left; + width: 48px; + height: 48px; + margin: 10px; +} +.oauthapp img.noicon { + background-image: url("../../../images/icons/48/plugin.png"); + background-position: center center; + background-repeat: no-repeat; +} +.oauthapp a { + float: left; +} +/* contacts */ +.contact-entry-wrapper { + width: 50px; + float: left; +} +/* photo */ +.lframe { + float: left; + margin: 0px 10px 10px 0px; +} +/* profile match wrapper */ +.profile-match-wrapper { + float: left; + width: 90px; + height: 90px; + margin-bottom: 20px; +} +.profile-match-wrapper .contact-photo { + width: 80px; + height: 80px; +} +.profile-match-wrapper .contact-photo img { + width: 80px; + height: 80px; +} +.profile-match-wrapper .contact-photo-menu-button { + left: 0px; + top: 63px; +} +/* page footer */ +footer { + height: 100px; + display: table-row; +} diff --git a/view/theme/vier/style.less b/view/theme/vier/style.less new file mode 100644 index 0000000000..c3dbae7778 --- /dev/null +++ b/view/theme/vier/style.less @@ -0,0 +1,14 @@ +/** + * Fabio Comuni + **/ +// Less file http://lesscss.org/ +// compile with lessc +// $ lessc style.less > style.css + +@import "colors"; +@import "icons"; +@import "quattro"; + + + + diff --git a/view/theme/vier/wall_item.tpl b/view/theme/vier/wall_item.tpl new file mode 100644 index 0000000000..03cbd4c0b7 --- /dev/null +++ b/view/theme/vier/wall_item.tpl @@ -0,0 +1,90 @@ +{{ if $indent }}{{ else }} +
+ $star.starred + {{ if $lock }}$lock{{ endif }} + +
+{{ endif }} +
+
+
+
+ + $name + + menu + + +
+
+
+ $name + -   + {{ if $plink }}$ago{{ else }} $ago {{ endif }} + +
+
+ + {{ if $title }}

$title

{{ endif }} + $body +
+
+
+ +
+ {{ for $tags as $tag }} + $tag + {{ endfor }} +
+
+
+
+ {{ if $plink }}$plink.title{{ endif }} +
+
+
$location 
+
+ {{ if $star }} + $star.do + $star.undo + $star.tagger + {{ endif }} + + {{ if $vote }} + $vote.like.1 + $vote.dislike.1 + {{ endif }} + + {{ if $vote.share }} + $vote.share.1 + {{ endif }} +
+ +
+ + {{ if $drop.dropping }} + + $drop.delete + {{ endif }} + {{ if $edpost }} + + {{ endif }} +
+ +
+
+
+ + +
$dislike
+
+
+ +
+ $comment +
diff --git a/view/theme/vier/wallwall_item.tpl b/view/theme/vier/wallwall_item.tpl new file mode 100644 index 0000000000..3357bd8e02 --- /dev/null +++ b/view/theme/vier/wallwall_item.tpl @@ -0,0 +1,97 @@ +{{ if $indent }}{{ else }} +
+ $star.starred + {{ if $lock }}$lock{{ endif }} + +
+{{ endif }} +
+
+
+
+ + $owner_name + +
+
+ + $name + + menu + + +
+
+ +
+ $name + $to $owner_name + $vwall -   + {{ if $plink }}$ago{{ else }} $ago {{ endif }} + +
+ +
+ {{ if $title }}

$title

{{ endif }} + $body +
+
+
+ +
+ {{ for $tags as $tag }} + $tag + {{ endfor }} +
+
+
+ +
+ +
$location 
+ +
+ {{ if $star }} + $star.do + $star.undo + {{ endif }} + + {{ if $vote }} + $vote.like.1 + $vote.dislike.1 + {{ endif }} + + {{ if $vote.share }} + $vote.share.1 + {{ endif }} +
+ +
+ + {{ if $drop.dropping }} + + $drop.delete + {{ endif }} + {{ if $edpost }} + + {{ endif }} +
+ +
+
+
+ + +
$dislike
+
+
+
+ $comment +
From 72c30deb645abaa12d03b49aeb157486501dc3ce Mon Sep 17 00:00:00 2001 From: Tobias Diekershoff Date: Wed, 8 Feb 2012 20:47:52 +0100 Subject: [PATCH 031/119] quattro: group member selection styling --- view/theme/quattro/quattro.less | 35 +++++++++++++++++++++++++++++++++ view/theme/quattro/style.css | 34 ++++++++++++++++++++++++++++++++ 2 files changed, 69 insertions(+) diff --git a/view/theme/quattro/quattro.less b/view/theme/quattro/quattro.less index c9fda0e1d7..475e16997c 100755 --- a/view/theme/quattro/quattro.less +++ b/view/theme/quattro/quattro.less @@ -318,7 +318,41 @@ aside { } } +#contact-edit-drop-link { + float: right; + margin-right: 20px; +} +/* group member */ +.group-delete-wrapper { + float: right; + margin-right: 50px; +} +#group-members { + margin-top: 20px; + padding: 10px; + height: 250px; + overflow: auto; + border: 1px solid #ddd; +} +#group-members-end { + clear: both; +} +#group-all-contacts { + padding: 10px; + height: 450px; + overflow: auto; + border: 1px solid #ddd; +} +#group-all-contacts-end { + clear: both; + margin-bottom: 10px; +} +.contact-block-div { + float: left; + width: 52px; + height: 52px; +} /* widget */ .widget { margin-bottom: 2em; @@ -962,3 +996,4 @@ footer { height: 100px; display: table-row; } margin-top: 25px; clear: both; } + diff --git a/view/theme/quattro/style.css b/view/theme/quattro/style.css index 41adcd8d2c..deb2cd62f0 100755 --- a/view/theme/quattro/style.css +++ b/view/theme/quattro/style.css @@ -564,6 +564,40 @@ aside #profiles-menu { widht: 48px; height: 58px; } +#contact-edit-drop-link { + float: right; + margin-right: 20px; +} +/* group member */ +.group-delete-wrapper { + float: right; + margin-right: 50px; +} +#group-members { + margin-top: 20px; + padding: 10px; + height: 250px; + overflow: auto; + border: 1px solid #ddd; +} +#group-members-end { + clear: both; +} +#group-all-contacts { + padding: 10px; + height: 450px; + overflow: auto; + border: 1px solid #ddd; +} +#group-all-contacts-end { + clear: both; + margin-bottom: 10px; +} +.contact-block-div { + float: left; + width: 52px; + height: 52px; +} /* widget */ .widget { margin-bottom: 2em; From ca8a25172e1b209b2c70230a9701ea3606e0030d Mon Sep 17 00:00:00 2001 From: Tobias Diekershoff Date: Wed, 8 Feb 2012 22:13:36 +0100 Subject: [PATCH 032/119] quattro: added delete buttons to groups and contacts --- view/theme/quattro/quattro.less | 18 ++++++++++++++++++ view/theme/quattro/style.css | 26 ++++++++++++++++++++++++++ 2 files changed, 44 insertions(+) diff --git a/view/theme/quattro/quattro.less b/view/theme/quattro/quattro.less index 475e16997c..3bc01a8390 100755 --- a/view/theme/quattro/quattro.less +++ b/view/theme/quattro/quattro.less @@ -321,12 +321,30 @@ aside { #contact-edit-drop-link { float: right; margin-right: 20px; + .drophide { + background-image: url('../../../images/icons/22/delete.png'); + display: block; width: 22px; height: 22px; + opacity: 0.3; + } + .drop { + background-image: url('../../../images/icons/22/delete.png'); + display: block; width: 22px; height: 22px; + } } /* group member */ .group-delete-wrapper { float: right; margin-right: 50px; + .drophide { + background-image: url('../../../images/icons/22/delete.png'); + display: block; width: 22px; height: 22px; + opacity: 0.3; + } + .drop { + background-image: url('../../../images/icons/22/delete.png'); + display: block; width: 22px; height: 22px; + } } #group-members { margin-top: 20px; diff --git a/view/theme/quattro/style.css b/view/theme/quattro/style.css index deb2cd62f0..f05dbefa8c 100755 --- a/view/theme/quattro/style.css +++ b/view/theme/quattro/style.css @@ -568,11 +568,37 @@ aside #profiles-menu { float: right; margin-right: 20px; } +#contact-edit-drop-link .drophide { + background-image: url('../../../images/icons/22/delete.png'); + display: block; + width: 22px; + height: 22px; + opacity: 0.3; +} +#contact-edit-drop-link .drop { + background-image: url('../../../images/icons/22/delete.png'); + display: block; + width: 22px; + height: 22px; +} /* group member */ .group-delete-wrapper { float: right; margin-right: 50px; } +.group-delete-wrapper .drophide { + background-image: url('../../../images/icons/22/delete.png'); + display: block; + width: 22px; + height: 22px; + opacity: 0.3; +} +.group-delete-wrapper .drop { + background-image: url('../../../images/icons/22/delete.png'); + display: block; + width: 22px; + height: 22px; +} #group-members { margin-top: 20px; padding: 10px; From d8157f73ef3e5807c05213efb33e9cc546b759cb Mon Sep 17 00:00:00 2001 From: Tobias Diekershoff Date: Wed, 8 Feb 2012 22:29:38 +0100 Subject: [PATCH 033/119] quattro: added delete button to mail list overview --- view/theme/quattro/quattro.less | 20 ++++++-------------- view/theme/quattro/style.css | 27 +++++++-------------------- 2 files changed, 13 insertions(+), 34 deletions(-) diff --git a/view/theme/quattro/quattro.less b/view/theme/quattro/quattro.less index 3bc01a8390..0d58000e6b 100755 --- a/view/theme/quattro/quattro.less +++ b/view/theme/quattro/quattro.less @@ -318,21 +318,9 @@ aside { } } -#contact-edit-drop-link { - float: right; - margin-right: 20px; - .drophide { - background-image: url('../../../images/icons/22/delete.png'); - display: block; width: 22px; height: 22px; - opacity: 0.3; - } - .drop { - background-image: url('../../../images/icons/22/delete.png'); - display: block; width: 22px; height: 22px; - } -} - /* group member */ +#contact-edit-drop-link, +.mail-list-delete-wrapper, .group-delete-wrapper { float: right; margin-right: 50px; @@ -340,10 +328,14 @@ aside { background-image: url('../../../images/icons/22/delete.png'); display: block; width: 22px; height: 22px; opacity: 0.3; + position: relative; + top: -50px; } .drop { background-image: url('../../../images/icons/22/delete.png'); display: block; width: 22px; height: 22px; + position: relative; + top: -50px; } } #group-members { diff --git a/view/theme/quattro/style.css b/view/theme/quattro/style.css index f05dbefa8c..49d57eb379 100755 --- a/view/theme/quattro/style.css +++ b/view/theme/quattro/style.css @@ -564,40 +564,27 @@ aside #profiles-menu { widht: 48px; height: 58px; } -#contact-edit-drop-link { - float: right; - margin-right: 20px; -} -#contact-edit-drop-link .drophide { - background-image: url('../../../images/icons/22/delete.png'); - display: block; - width: 22px; - height: 22px; - opacity: 0.3; -} -#contact-edit-drop-link .drop { - background-image: url('../../../images/icons/22/delete.png'); - display: block; - width: 22px; - height: 22px; -} /* group member */ -.group-delete-wrapper { +#contact-edit-drop-link, .mail-list-delete-wrapper, .group-delete-wrapper { float: right; margin-right: 50px; } -.group-delete-wrapper .drophide { +#contact-edit-drop-link .drophide, .mail-list-delete-wrapper .drophide, .group-delete-wrapper .drophide { background-image: url('../../../images/icons/22/delete.png'); display: block; width: 22px; height: 22px; opacity: 0.3; + position: relative; + top: -50px; } -.group-delete-wrapper .drop { +#contact-edit-drop-link .drop, .mail-list-delete-wrapper .drop, .group-delete-wrapper .drop { background-image: url('../../../images/icons/22/delete.png'); display: block; width: 22px; height: 22px; + position: relative; + top: -50px; } #group-members { margin-top: 20px; From b0ee8dd409f28f19ac0f9d0c4e2aa28afeab561d Mon Sep 17 00:00:00 2001 From: friendica Date: Wed, 8 Feb 2012 17:56:23 -0800 Subject: [PATCH 034/119] begin cmin, cmax --- boot.php | 2 +- mod/network.php | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/boot.php b/boot.php index 99108a0a35..b346154433 100755 --- a/boot.php +++ b/boot.php @@ -9,7 +9,7 @@ require_once('include/nav.php'); require_once('include/cache.php'); define ( 'FRIENDICA_PLATFORM', 'Friendica'); -define ( 'FRIENDICA_VERSION', '2.3.1245' ); +define ( 'FRIENDICA_VERSION', '2.3.1246' ); define ( 'DFRN_PROTOCOL_VERSION', '2.22' ); define ( 'DB_UPDATE_VERSION', 1120 ); diff --git a/mod/network.php b/mod/network.php index 497e8a115f..8f10ace775 100755 --- a/mod/network.php +++ b/mod/network.php @@ -56,7 +56,9 @@ function saved_searches($search) { . ((x($_GET,'star')) ? '?star=' . $_GET['star'] : '') . ((x($_GET,'bmark')) ? '?bmark=' . $_GET['bmark'] : '') . ((x($_GET,'conv')) ? '?conv=' . $_GET['conv'] : '') - . ((x($_GET,'nets')) ? '?nets=' . $_GET['nets'] : ''); + . ((x($_GET,'nets')) ? '?nets=' . $_GET['nets'] : '') + . ((x($_GET,'cmin')) ? '?cmin=' . $_GET['cmin'] : '') + . ((x($_GET,'cmax')) ? '?cmax=' . $_GET['cmax'] : ''); $o = ''; @@ -222,6 +224,8 @@ function network_content(&$a, $update = 0) { $conv = ((x($_GET,'conv')) ? intval($_GET['conv']) : 0); $spam = ((x($_GET,'spam')) ? intval($_GET['spam']) : 0); $nets = ((x($_GET,'nets')) ? $_GET['nets'] : ''); + $cmin = ((x($_GET,'cmin')) ? intval($_GET['cmin']) : 0); + $cmax = ((x($_GET,'cmax')) ? intval($_GET['cmax']) : 99); if(($a->argc > 2) && $a->argv[2] === 'new') $nouveau = true; @@ -358,6 +362,8 @@ function network_content(&$a, $update = 0) { . ((x($_GET,'conv')) ? '&conv=' . $_GET['conv'] : '') . ((x($_GET,'spam')) ? '&spam=' . $_GET['spam'] : '') . ((x($_GET,'nets')) ? '&nets=' . $_GET['nets'] : '') + . ((x($_GET,'cmin')) ? '&cmin=' . $_GET['cmin'] : '') + . ((x($_GET,'cmax')) ? '&cmax=' . $_GET['cmax'] : '') . "'; var profile_page = " . $a->pager['page'] . "; \r\n"; } From 03435853b369227f914026c85c6bb1240386e3ba Mon Sep 17 00:00:00 2001 From: friendica Date: Wed, 8 Feb 2012 18:12:26 -0800 Subject: [PATCH 035/119] fix apps sub-menu on quattro and vier --- view/nav.tpl | 2 +- view/theme/darkbubble/experimental | 0 2 files changed, 1 insertion(+), 1 deletion(-) delete mode 100755 view/theme/darkbubble/experimental diff --git a/view/nav.tpl b/view/nav.tpl index a5d8459874..dffa6e5201 100755 --- a/view/nav.tpl +++ b/view/nav.tpl @@ -79,7 +79,7 @@ $nav.apps.1 diff --git a/view/theme/darkbubble/experimental b/view/theme/darkbubble/experimental deleted file mode 100755 index e69de29bb2..0000000000 From 11517a027b3778c56aabb4df20af46dcb24a93d0 Mon Sep 17 00:00:00 2001 From: friendica Date: Wed, 8 Feb 2012 21:15:26 -0800 Subject: [PATCH 036/119] if removing a contact after viewing the third page of contacts, go back to page 3 --- mod/contacts.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/mod/contacts.php b/mod/contacts.php index 51c6920d34..206128f9d0 100755 --- a/mod/contacts.php +++ b/mod/contacts.php @@ -111,7 +111,6 @@ function contacts_content(&$a) { $o = ''; nav_set_selected('contacts'); - $_SESSION['return_url'] = $a->get_baseurl() . '/' . $a->cmd; if(! local_user()) { notice( t('Permission denied.') . EOL); @@ -211,7 +210,10 @@ function contacts_content(&$a) { contact_remove($orig_record[0]['id']); info( t('Contact has been removed.') . EOL ); - goaway($a->get_baseurl() . '/contacts'); + if(x($_SESSION,'return_url')) + goaway($a->get_baseurl() . '/' . $_SESSION['return_url']); + else + goaway($a->get_baseurl() . '/contacts'); return; // NOTREACHED } } @@ -354,6 +356,7 @@ function contacts_content(&$a) { } + $_SESSION['return_url'] = $a->query_string; if(($a->argc == 2) && ($a->argv[1] === 'all')) $sql_extra = ''; From 1c8680d9f90629bdaebff38ff436aca42e0ebcd4 Mon Sep 17 00:00:00 2001 From: "Abinoam P. Marques Jr" Date: Wed, 8 Feb 2012 22:01:42 -0800 Subject: [PATCH 037/119] Install note about PHP path. --- INSTALL.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/INSTALL.txt b/INSTALL.txt index 70027dc4c6..fdd54b765f 100755 --- a/INSTALL.txt +++ b/INSTALL.txt @@ -107,6 +107,11 @@ one shown, substituting for your unique paths and settings: You can generally find the location of PHP by executing "which php". If you have troubles with this section please contact your hosting provider for assistance. Friendika will not work correctly if you cannot perform this step. + +You should also be sure that $a->config['php_path'] is set correctly, it should +look like (changing it to the correct PHP location) + +$a->config['php_path'] = '/usr/local/php53/bin/php' Alternative: You may be able to use the 'poormancron' plugin to perform this step if you are using a recent Friendika release. 'poormancron' may result in From 955022e7dc6bb8f581177ddbad84b4f59c349763 Mon Sep 17 00:00:00 2001 From: Keith Fernie Date: Thu, 9 Feb 2012 20:45:38 +0000 Subject: [PATCH 038/119] modified: library/slinky.php Added a custom YourLS shortener to the available shorteners --- library/slinky.php | 32 +++++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/library/slinky.php b/library/slinky.php index 51432c3f53..56734c9fb0 100755 --- a/library/slinky.php +++ b/library/slinky.php @@ -153,7 +153,7 @@ class Slinky { public function set_service_from_url( $url = false ) { if ( !$url ) $url = $this->url; - + $host = parse_url( $url, PHP_URL_HOST ); switch ( str_replace( 'www.', '', $host ) ) { case 'bit.ly': @@ -181,6 +181,11 @@ class Slinky { $this->service = new Slinky_Fongs(); break; } + case $this->get( 'yourls-url' ): + if ( class_exists( 'Slinky_YourLS' ) ) { + $this->service = new Slinky_YourLS(); + break; + } case 'micurl.com': if ( class_exists( 'Slinky_Micurl' ) ) { $this->service = new Slinky_Micurl(); @@ -574,6 +579,31 @@ class Slinky_Fongs extends Slinky_Service { } } +// yourls +class Slinky_YourLS extends Slinky_Service { + function url_is_short( $url ) { + return stristr( $url, 'shit.li/' ); + } + + function url_is_long( $url ) { + return !stristr( $url, 'shit.li/' ); + } + + function make_short( $url ) { + echo $this->get( 'username' ); + $use_ssl = $this->get( 'ssl' ); + if ( $use_ssl ) + $use_ssl = 's'; + else + $use_ssl = ''; + $result = $this->url_get( 'http'. $use_ssl . '://' . $this->get( 'yourls-url' ) . '/yourls-api.php?username=' . $this->get( 'username' ) . '&password=' . $this->get( 'password' ) . '&action=shorturl&format=simple&url=' . urlencode( $url ) ); + if ( 1 != $result && 2 != $result ) + return $result; + else + return $url; + } +} + // Micu.rl class Slinky_Micurl extends Slinky_Service { function url_is_short( $url ) { From 2c9cfb1fe9fe331cb386025643b2c23a32b25787 Mon Sep 17 00:00:00 2001 From: Keith Fernie Date: Thu, 9 Feb 2012 21:44:52 +0000 Subject: [PATCH 039/119] modified: library/slinky.php Set up tabs in code correctly. --- library/slinky.php | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/library/slinky.php b/library/slinky.php index 56734c9fb0..cae1f755ff 100755 --- a/library/slinky.php +++ b/library/slinky.php @@ -181,11 +181,11 @@ class Slinky { $this->service = new Slinky_Fongs(); break; } - case $this->get( 'yourls-url' ): - if ( class_exists( 'Slinky_YourLS' ) ) { - $this->service = new Slinky_YourLS(); - break; - } + case $this->get( 'yourls-url' ): + if ( class_exists( 'Slinky_YourLS' ) ) { + $this->service = new Slinky_YourLS(); + break; + } case 'micurl.com': if ( class_exists( 'Slinky_Micurl' ) ) { $this->service = new Slinky_Micurl(); @@ -581,27 +581,27 @@ class Slinky_Fongs extends Slinky_Service { // yourls class Slinky_YourLS extends Slinky_Service { - function url_is_short( $url ) { - return stristr( $url, 'shit.li/' ); + function url_is_short( $url ) { + return stristr( $url, 'shit.li/' ); } - function url_is_long( $url ) { - return !stristr( $url, 'shit.li/' ); + function url_is_long( $url ) { + return !stristr( $url, 'shit.li/' ); } - function make_short( $url ) { + function make_short( $url ) { echo $this->get( 'username' ); $use_ssl = $this->get( 'ssl' ); if ( $use_ssl ) $use_ssl = 's'; else $use_ssl = ''; - $result = $this->url_get( 'http'. $use_ssl . '://' . $this->get( 'yourls-url' ) . '/yourls-api.php?username=' . $this->get( 'username' ) . '&password=' . $this->get( 'password' ) . '&action=shorturl&format=simple&url=' . urlencode( $url ) ); - if ( 1 != $result && 2 != $result ) - return $result; - else - return $url; - } + $result = $this->url_get( 'http'. $use_ssl . '://' . $this->get( 'yourls-url' ) . '/yourls-api.php?username=' . $this->get( 'username' ) . '&password=' . $this->get( 'password' ) . '&action=shorturl&format=simple&url=' . urlencode( $url ) ); + if ( 1 != $result && 2 != $result ) + return $result; + else + return $url; + } } // Micu.rl From 171249966e68d12a4e2e485d26007de8372e8235 Mon Sep 17 00:00:00 2001 From: friendica Date: Thu, 9 Feb 2012 14:06:17 -0800 Subject: [PATCH 040/119] add tag notifications to enotify --- boot.php | 19 ++++++++++--------- include/enotify.php | 18 ++++++++++++++++++ 2 files changed, 28 insertions(+), 9 deletions(-) diff --git a/boot.php b/boot.php index b346154433..9573408f03 100755 --- a/boot.php +++ b/boot.php @@ -9,7 +9,7 @@ require_once('include/nav.php'); require_once('include/cache.php'); define ( 'FRIENDICA_PLATFORM', 'Friendica'); -define ( 'FRIENDICA_VERSION', '2.3.1246' ); +define ( 'FRIENDICA_VERSION', '2.3.1247' ); define ( 'DFRN_PROTOCOL_VERSION', '2.22' ); define ( 'DB_UPDATE_VERSION', 1120 ); @@ -125,14 +125,15 @@ define ( 'ZCURL_TIMEOUT' , (-1)); * email notification options */ -define ( 'NOTIFY_INTRO', 0x0001 ); -define ( 'NOTIFY_CONFIRM', 0x0002 ); -define ( 'NOTIFY_WALL', 0x0004 ); -define ( 'NOTIFY_COMMENT', 0x0008 ); -define ( 'NOTIFY_MAIL', 0x0010 ); -define ( 'NOTIFY_SUGGEST', 0x0020 ); -define ( 'NOTIFY_PROFILE', 0x0040 ); - +define ( 'NOTIFY_INTRO', 0x0001 ); +define ( 'NOTIFY_CONFIRM', 0x0002 ); +define ( 'NOTIFY_WALL', 0x0004 ); +define ( 'NOTIFY_COMMENT', 0x0008 ); +define ( 'NOTIFY_MAIL', 0x0010 ); +define ( 'NOTIFY_SUGGEST', 0x0020 ); +define ( 'NOTIFY_PROFILE', 0x0040 ); +define ( 'NOTIFY_TAGSELF', 0x0080 ); +define ( 'NOTIFY_TAGSHARE', 0x0100 ); /** * various namespaces we may need to parse diff --git a/include/enotify.php b/include/enotify.php index 9df9b57e5d..6e7130bc88 100755 --- a/include/enotify.php +++ b/include/enotify.php @@ -54,6 +54,24 @@ function notification($params) { $itemlink = $params['link']; } + if($params['type'] == NOTIFY_TAGSELF) { + $preamble = $subject = sprintf( t('%s tagged you at %s') , $params['source_name'], $sitename); + + $sitelink = t('Please visit %s to view and/or reply to the conversation.'); + $tsitelink = sprintf( $sitelink, $siteurl ); + $hsitelink = sprintf( $sitelink, '' . $sitename . ''); + $itemlink = $params['link']; + } + + if($params['type'] == NOTIFY_TAGSHARE) { + $preamble = $subject = sprintf( t('%s tagged your post at %s') , $params['source_name'], $sitename); + + $sitelink = t('Please visit %s to view and/or reply to the conversation.'); + $tsitelink = sprintf( $sitelink, $siteurl ); + $hsitelink = sprintf( $sitelink, '' . $sitename . ''); + $itemlink = $params['link']; + } + if($params['type'] == NOTIFY_INTRO) { $subject = sprintf( t('Introduction received at %s'), $sitename); $preamble = sprintf( t('You\'ve received an introduction from \'%s\' at %s'), $params['source_name'], $sitename); From ec26f88be9876b75044c37219018bf1337f8d61e Mon Sep 17 00:00:00 2001 From: friendica Date: Thu, 9 Feb 2012 15:02:59 -0800 Subject: [PATCH 041/119] render_location hook --- include/conversation.php | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/include/conversation.php b/include/conversation.php index 6defefc731..9df7b20e93 100755 --- a/include/conversation.php +++ b/include/conversation.php @@ -262,15 +262,10 @@ function conversation(&$a, $items, $mode, $update, $preview = false) { else $profile_avatar = ((strlen($item['author-avatar'])) ? $item['author-avatar'] : $item['thumb']); - $location = (($item['location']) ? '' . $item['location'] . '' : ''); - $coord = (($item['coord']) ? '' . $item['coord'] . '' : ''); - if($coord) { - if($location) - $location .= '
(' . $coord . ')'; - else - $location = '' . $coord . ''; - } + $locate = array('location' => $item_location, 'coord' => $item['coord'], 'html' => ''); + call_hooks('render_location',$locate); + $location = ((strlen($locate['html'])) ? $locate['html'] : render_location_google($locate)); localize_item($item); if($mode === 'network-new') @@ -1008,3 +1003,17 @@ function find_thread_parent_index($arr,$x) { return $k; return false; } + +function render_location_google($item) { + $location = ''; + $location = (($item['location']) ? '' . $item['location'] . '' : ''); + $coord = (($item['coord']) ? '' . $item['coord'] . '' : ''); + if($coord) { + if($location) + $location .= '
(' . $coord . ')'; + else + $location = '' . $coord . ''; + } + return $location; +} + From 795e02aa1490f6238e6ed719a0bf3604931eec3d Mon Sep 17 00:00:00 2001 From: friendica Date: Thu, 9 Feb 2012 15:13:34 -0800 Subject: [PATCH 042/119] bug #273 - no $baseurl variable expansion in install template --- mod/install.php | 1 + 1 file changed, 1 insertion(+) diff --git a/mod/install.php b/mod/install.php index f7820fc804..33502938a9 100755 --- a/mod/install.php +++ b/mod/install.php @@ -210,6 +210,7 @@ function install_content(&$a) { '$next' => t('Next'), '$reload' => t('Check again'), '$phpath' => $phpath, + '$baseurl' => $a->get_baseurl(), )); return $o; }; break; From 7b0a005441a6abc3d4c327965e86ac82d2ec4db3 Mon Sep 17 00:00:00 2001 From: friendica Date: Thu, 9 Feb 2012 15:58:26 -0800 Subject: [PATCH 043/119] edit post not working after plaintext editor fixes, missing some recent editor template changes --- include/items.php | 16 ++++++++++------ mod/editpost.php | 4 ++++ mod/item.php | 3 ++- 3 files changed, 16 insertions(+), 7 deletions(-) diff --git a/include/items.php b/include/items.php index ba95919a6b..9f2cc491b6 100755 --- a/include/items.php +++ b/include/items.php @@ -1486,7 +1486,8 @@ function consume_feed($xml,$importer,&$contact, &$hub, $datedir = 0, $pass = 0) if(count($r)) { if((x($datarray,'edited') !== false) && (datetime_convert('UTC','UTC',$datarray['edited']) !== $r[0]['edited'])) { - $r = q("UPDATE `item` SET `body` = '%s', `edited` = '%s' WHERE `uri` = '%s' AND `uid` = %d LIMIT 1", + $r = q("UPDATE `item` SET `title` = '%s', `body` = '%s', `edited` = '%s' WHERE `uri` = '%s' AND `uid` = %d LIMIT 1", + dbesc($datarray['title']), dbesc($datarray['body']), dbesc(datetime_convert('UTC','UTC',$datarray['edited'])), dbesc($item_id), @@ -1616,7 +1617,8 @@ function consume_feed($xml,$importer,&$contact, &$hub, $datedir = 0, $pass = 0) if(count($r)) { if((x($datarray,'edited') !== false) && (datetime_convert('UTC','UTC',$datarray['edited']) !== $r[0]['edited'])) { - $r = q("UPDATE `item` SET `body` = '%s', `edited` = '%s' WHERE `uri` = '%s' AND `uid` = %d LIMIT 1", + $r = q("UPDATE `item` SET `title` = '%s', `body` = '%s', `edited` = '%s' WHERE `uri` = '%s' AND `uid` = %d LIMIT 1", + dbesc($datarray['title']), dbesc($datarray['body']), dbesc(datetime_convert('UTC','UTC',$datarray['edited'])), dbesc($item_id), @@ -2167,7 +2169,8 @@ function local_delivery($importer,$data) { if(count($r)) { if((x($datarray,'edited') !== false) && (datetime_convert('UTC','UTC',$datarray['edited']) !== $r[0]['edited'])) { - $r = q("UPDATE `item` SET `body` = '%s', `edited` = '%s' WHERE `uri` = '%s' AND `uid` = %d LIMIT 1", + $r = q("UPDATE `item` SET `title` = '%s', `body` = '%s', `edited` = '%s' WHERE `uri` = '%s' AND `uid` = %d LIMIT 1", + dbesc($datarray['title']), dbesc($datarray['body']), dbesc(datetime_convert('UTC','UTC',$datarray['edited'])), dbesc($item_id), @@ -2309,7 +2312,8 @@ function local_delivery($importer,$data) { if(count($r)) { if((x($datarray,'edited') !== false) && (datetime_convert('UTC','UTC',$datarray['edited']) !== $r[0]['edited'])) { - $r = q("UPDATE `item` SET `body` = '%s', `edited` = '%s' WHERE `uri` = '%s' AND `uid` = %d LIMIT 1", + $r = q("UPDATE `item` SET `title` = '%s', `body` = '%s', `edited` = '%s' WHERE `uri` = '%s' AND `uid` = %d LIMIT 1", + dbesc($datarray['title']), dbesc($datarray['body']), dbesc(datetime_convert('UTC','UTC',$datarray['edited'])), dbesc($item_id), @@ -2805,7 +2809,7 @@ function drop_item($id,$interactive = true) { // delete the item - $r = q("UPDATE `item` SET `deleted` = 1, `body` = '', `edited` = '%s', `changed` = '%s' WHERE `id` = %d LIMIT 1", + $r = q("UPDATE `item` SET `deleted` = 1, `title` = '', `body` = '', `edited` = '%s', `changed` = '%s' WHERE `id` = %d LIMIT 1", dbesc(datetime_convert()), dbesc(datetime_convert()), intval($item['id']) @@ -2838,7 +2842,7 @@ function drop_item($id,$interactive = true) { // If it's the parent of a comment thread, kill all the kids if($item['uri'] == $item['parent-uri']) { - $r = q("UPDATE `item` SET `deleted` = 1, `edited` = '%s', `changed` = '%s', `body` = '' + $r = q("UPDATE `item` SET `deleted` = 1, `edited` = '%s', `changed` = '%s', `body` = '' , `title` = '' WHERE `parent-uri` = '%s' AND `uid` = %d ", dbesc(datetime_convert()), dbesc(datetime_convert()), diff --git a/mod/editpost.php b/mod/editpost.php index bceb9250a2..f23b305f0e 100755 --- a/mod/editpost.php +++ b/mod/editpost.php @@ -35,6 +35,7 @@ function editpost_content(&$a) { $a->page['htmlhead'] .= replace_macros($tpl, array( '$baseurl' => $a->get_baseurl(), + '$editselect' => (($plaintext) ? 'none' : '/(profile-jot-text|prvmail-text)/'), '$ispublic' => ' ', // t('Visible to everybody'), '$geotag' => $geotag, '$nickname' => $a->user['nickname'] @@ -108,11 +109,14 @@ function editpost_content(&$a) { '$emailcc' => t('CC: email addresses'), '$public' => t('Public post'), '$jotnets' => $jotnets, + '$title' => $itm[0]['title'], + '$placeholdertitle' => t('Set title'), '$emtitle' => t('Example: bob@example.com, mary@example.com'), '$lockstate' => $lockstate, '$acl' => '', // populate_acl((($group) ? $group_acl : $a->user), $celeb), '$bang' => (($group) ? '!' : ''), '$profile_uid' => $_SESSION['uid'], + '$preview' => t('Preview'), '$jotplugins' => $jotplugins, )); diff --git a/mod/item.php b/mod/item.php index 217f13c498..d5dcfccbd5 100755 --- a/mod/item.php +++ b/mod/item.php @@ -649,7 +649,8 @@ function item_post(&$a) { if($orig_post) { - $r = q("UPDATE `item` SET `body` = '%s', `edited` = '%s' WHERE `id` = %d AND `uid` = %d LIMIT 1", + $r = q("UPDATE `item` SET `title` = '%s', `body` = '%s', `edited` = '%s' WHERE `id` = %d AND `uid` = %d LIMIT 1", + dbesc($title), dbesc($body), dbesc(datetime_convert()), intval($post_id), From 5859f9dcf68c2ca6ad355c16e7fbf5080eea9e75 Mon Sep 17 00:00:00 2001 From: friendica Date: Thu, 9 Feb 2012 18:09:28 -0800 Subject: [PATCH 044/119] add render_location hook to both sets of conversations --- include/conversation.php | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/include/conversation.php b/include/conversation.php index 9df7b20e93..35abb29ca5 100755 --- a/include/conversation.php +++ b/include/conversation.php @@ -262,7 +262,7 @@ function conversation(&$a, $items, $mode, $update, $preview = false) { else $profile_avatar = ((strlen($item['author-avatar'])) ? $item['author-avatar'] : $item['thumb']); - $locate = array('location' => $item_location, 'coord' => $item['coord'], 'html' => ''); + $locate = array('location' => $item['location'], 'coord' => $item['coord'], 'html' => ''); call_hooks('render_location',$locate); $location = ((strlen($locate['html'])) ? $locate['html'] : render_location_google($locate)); @@ -589,16 +589,10 @@ function conversation(&$a, $items, $mode, $update, $preview = false) { $like = ((x($alike,$item['id'])) ? format_like($alike[$item['id']],$alike[$item['id'] . '-l'],'like',$item['id']) : ''); $dislike = ((x($dlike,$item['id'])) ? format_like($dlike[$item['id']],$dlike[$item['id'] . '-l'],'dislike',$item['id']) : ''); - $location = (($item['location']) ? '' . $item['location'] . '' : ''); - $coord = (($item['coord']) ? '' . $item['coord'] . '' : ''); - if($coord) { - if($location) - $location .= '
(' . $coord . ')'; - else - $location = '' . $coord . ''; - } + $locate = array('location' => $item['location'], 'coord' => $item['coord'], 'html' => ''); + call_hooks('render_location',$locate); + + $location = ((strlen($locate['html'])) ? $locate['html'] : render_location_google($locate)); $indent = (($toplevelpost) ? '' : ' comment'); From ffe7d8b1e9964e28b50ccce49d74836067c099c1 Mon Sep 17 00:00:00 2001 From: friendica Date: Thu, 9 Feb 2012 21:18:50 -0800 Subject: [PATCH 045/119] item tag notifications --- include/items.php | 66 ++++++++++++++++++++++++++++++----------------- mod/settings.php | 1 + view/settings.tpl | 1 + 3 files changed, 44 insertions(+), 24 deletions(-) diff --git a/include/items.php b/include/items.php index 9f2cc491b6..fd90494b16 100755 --- a/include/items.php +++ b/include/items.php @@ -905,7 +905,7 @@ function item_store($arr,$force_parent = false) { ); } - tgroup_deliver($arr['uid'],$current_post); + tag_deliver($arr['uid'],$current_post); return $current_post; } @@ -923,22 +923,22 @@ function get_item_contact($item,$contacts) { } -function tgroup_deliver($uid,$item_id) { +function tag_deliver($uid,$item_id) { - - // setup a second delivery chain for forum/community posts if appropriate + // look for mention tags and setup a second delivery chain for forum/community posts if appropriate $a = get_app(); - $deliver_to_tgroup = false; + $mention = false; - $u = q("select * from user where uid = %d and `page-flags` = %d limit 1", - intval($uid), - intval(PAGE_COMMUNITY) + $u = q("select uid, nickname, language, username, email, `page-flags`, `notify-flags` from user where uid = %d limit 1", + intval($uid) ); if(! count($u)) return; + $community_page = (($u[0]['page-flags'] == PAGE_COMMUNITY) ? true : false); + $i = q("select * from item where id = %d and uid = %d limit 1", intval($item_id), intval($uid) @@ -948,13 +948,6 @@ function tgroup_deliver($uid,$item_id) { $item = $i[0]; - // prevent delivery looping - only proceed - // if the message originated elsewhere and is a top-level post - - if(($item['wall']) || ($item['origin']) || ($item['id'] != $item['parent'])) - return; - - $link = normalise_link($a->get_baseurl() . '/profile/' . $u[0]['nickname']); // Diaspora uses their own hardwired link URL in @-tags @@ -966,24 +959,49 @@ function tgroup_deliver($uid,$item_id) { if($cnt) { foreach($matches as $mtch) { if(link_compare($link,$mtch[1]) || link_compare($dlink,$mtch[1])) { - $deliver_to_tgroup = true; - logger('tgroup_deliver: local group mention found: ' . $mtch[2]); + $mention = true; + logger('tag_deliver: mention found: ' . $mtch[2]); } } } - if(! $deliver_to_tgroup) + if(! $mention) return; - // now change this copy of the post to a forum head message and deliver to all the tgroup members + if(! $community_page) { + require_once('include/enotify.php'); + notification(array( + 'type' => NOTIFY_TAGSELF, + 'notify_flags' => $u[0]['notify-flags'], + 'language' => $u[0]['language'], + 'to_name' => $u[0]['username'], + 'to_email' => $u[0]['email'], + 'item' => $item, + 'link' => $a->get_baseurl() . '/display/' . $u[0]['nickname'] . '/' . $item['id'], + 'source_name' => $item['author-name'], + 'source_link' => $item['author-link'], + 'source_photo' => $item['author-avatar'], + 'verb' => ACTIVITY_TAG, + 'otype' => 'item' + )); + return; + } + else { + // prevent delivery looping - only proceed + // if the message originated elsewhere and is a top-level post + + if(($item['wall']) || ($item['origin']) || ($item['id'] != $item['parent'])) + return; + + // now change this copy of the post to a forum head message and deliver to all the tgroup members - q("update item set wall = 1, origin = 1, forum_mode = 1 where id = %d limit 1", - intval($item_id) - ); - - proc_run('php','include/notifier.php','tgroup',$item_id); + q("update item set wall = 1, origin = 1, forum_mode = 1 where id = %d limit 1", + intval($item_id) + ); + proc_run('php','include/notifier.php','tgroup',$item_id); + } } diff --git a/mod/settings.php b/mod/settings.php index e75272539d..b4cd2e608a 100755 --- a/mod/settings.php +++ b/mod/settings.php @@ -818,6 +818,7 @@ function settings_content(&$a) { '$notify4' => array('notify4', t('Someone writes a followup comment'), ($notify & NOTIFY_COMMENT), NOTIFY_COMMENT, ''), '$notify5' => array('notify5', t('You receive a private message'), ($notify & NOTIFY_MAIL), NOTIFY_MAIL, ''), '$notify6' => array('notify6', t('You receive a friend suggestion'), ($notify & NOTIFY_SUGGEST), NOTIFY_SUGGEST, ''), + '$notify7' => array('notify7', t('You are tagged in a post'), ($notify & NOTIFY_TAGSELF), NOTIFY_TAGSELF, ''), '$h_advn' => t('Advanced Page Settings'), diff --git a/view/settings.tpl b/view/settings.tpl index 6310ff47e8..1172df8b91 100755 --- a/view/settings.tpl +++ b/view/settings.tpl @@ -108,6 +108,7 @@ $suggestme {{inc field_intcheckbox.tpl with $field=$notify4 }}{{endinc}} {{inc field_intcheckbox.tpl with $field=$notify5 }}{{endinc}} {{inc field_intcheckbox.tpl with $field=$notify6 }}{{endinc}} +{{inc field_intcheckbox.tpl with $field=$notify7 }}{{endinc}} From 2f2e331c33535d8ae1a8c9d95d03a39b5c8a5885 Mon Sep 17 00:00:00 2001 From: friendica Date: Thu, 9 Feb 2012 22:44:59 -0800 Subject: [PATCH 046/119] bug #274 --- include/plugin.php | 38 +++++++++++++++++++++----------------- 1 file changed, 21 insertions(+), 17 deletions(-) diff --git a/include/plugin.php b/include/plugin.php index fe325ac3b0..85b51edff5 100755 --- a/include/plugin.php +++ b/include/plugin.php @@ -56,25 +56,29 @@ function reload_plugins() { if(count($parr)) { foreach($parr as $pl) { $pl = trim($pl); - - $t = filemtime('addon/' . $pl . '/' . $pl . '.php'); - foreach($installed as $i) { - if(($i['name'] == $pl) && ($i['timestamp'] != $t)) { - logger('Reloading plugin: ' . $i['name']); - @include_once('addon/' . $pl . '/' . $pl . '.php'); - if(function_exists($pl . '_uninstall')) { - $func = $pl . '_uninstall'; - $func(); + $fname = 'addon/' . $pl . '/' . $pl . '.php'; + + if(file_exists($fname)) { + $t = @filemtime($fname); + foreach($installed as $i) { + if(($i['name'] == $pl) && ($i['timestamp'] != $t)) { + logger('Reloading plugin: ' . $i['name']); + @include_once($fname); + + if(function_exists($pl . '_uninstall')) { + $func = $pl . '_uninstall'; + $func(); + } + if(function_exists($pl . '_install')) { + $func = $pl . '_install'; + $func(); + } + q("UPDATE `addon` SET `timestamp` = %d WHERE `id` = %d LIMIT 1", + intval($t), + intval($i['id']) + ); } - if(function_exists($pl . '_install')) { - $func = $pl . '_install'; - $func(); - } - q("UPDATE `addon` SET `timestamp` = %d WHERE `id` = %d LIMIT 1", - intval($t), - intval($i['id']) - ); } } } From b346f4464c230af4636c61397decd03eadb18e9a Mon Sep 17 00:00:00 2001 From: friendica Date: Fri, 10 Feb 2012 00:08:23 -0800 Subject: [PATCH 047/119] send notify emails to community pages as well as people --- include/items.php | 62 ++++++++++++++++++++++++----------------------- 1 file changed, 32 insertions(+), 30 deletions(-) diff --git a/include/items.php b/include/items.php index fd90494b16..3c30e99aad 100755 --- a/include/items.php +++ b/include/items.php @@ -968,40 +968,42 @@ function tag_deliver($uid,$item_id) { if(! $mention) return; - if(! $community_page) { - require_once('include/enotify.php'); - notification(array( - 'type' => NOTIFY_TAGSELF, - 'notify_flags' => $u[0]['notify-flags'], - 'language' => $u[0]['language'], - 'to_name' => $u[0]['username'], - 'to_email' => $u[0]['email'], - 'item' => $item, - 'link' => $a->get_baseurl() . '/display/' . $u[0]['nickname'] . '/' . $item['id'], - 'source_name' => $item['author-name'], - 'source_link' => $item['author-link'], - 'source_photo' => $item['author-avatar'], - 'verb' => ACTIVITY_TAG, - 'otype' => 'item' - )); + // send a notification + + require_once('include/enotify.php'); + notification(array( + 'type' => NOTIFY_TAGSELF, + 'notify_flags' => $u[0]['notify-flags'], + 'language' => $u[0]['language'], + 'to_name' => $u[0]['username'], + 'to_email' => $u[0]['email'], + 'item' => $item, + 'link' => $a->get_baseurl() . '/display/' . $u[0]['nickname'] . '/' . $item['id'], + 'source_name' => $item['author-name'], + 'source_link' => $item['author-link'], + 'source_photo' => $item['author-avatar'], + 'verb' => ACTIVITY_TAG, + 'otype' => 'item' + )); + if(! $community_page) return; - } - else { - // prevent delivery looping - only proceed - // if the message originated elsewhere and is a top-level post - if(($item['wall']) || ($item['origin']) || ($item['id'] != $item['parent'])) - return; + // tgroup delivery - setup a second delivery chain + // prevent delivery looping - only proceed + // if the message originated elsewhere and is a top-level post - // now change this copy of the post to a forum head message and deliver to all the tgroup members + if(($item['wall']) || ($item['origin']) || ($item['id'] != $item['parent'])) + return; + + // now change this copy of the post to a forum head message and deliver to all the tgroup members - q("update item set wall = 1, origin = 1, forum_mode = 1 where id = %d limit 1", - intval($item_id) - ); + q("update item set wall = 1, origin = 1, forum_mode = 1 where id = %d limit 1", + intval($item_id) + ); + + proc_run('php','include/notifier.php','tgroup',$item_id); - proc_run('php','include/notifier.php','tgroup',$item_id); - } } @@ -1065,7 +1067,7 @@ function dfrn_deliver($owner,$contact,$atom, $dissolve = false) { $final_dfrn_id = ''; - if(($contact['duplex'] && strlen($contact['pubkey'])) || ($owner['page-flags'] == PAGE_COMMUNITY)) { + if(($contact['duplex'] && strlen($contact['pubkey'])) || ($owner['page-flags'] == PAGE_COMMUNITY && strlen($contact['pubkey']))) { openssl_public_decrypt($sent_dfrn_id,$final_dfrn_id,$contact['pubkey']); openssl_public_decrypt($challenge,$postvars['challenge'],$contact['pubkey']); } @@ -1108,7 +1110,7 @@ function dfrn_deliver($owner,$contact,$atom, $dissolve = false) { if($dfrn_version >= 2.1) { - if(($contact['duplex'] && strlen($contact['pubkey'])) || ($owner['page-flags'] == PAGE_COMMUNITY)) { + if(($contact['duplex'] && strlen($contact['pubkey'])) || ($owner['page-flags'] == PAGE_COMMUNITY && strlen($contact['pubkey']))) { openssl_public_encrypt($key,$postvars['key'],$contact['pubkey']); } else { From 84805501449aa03e86d985f3e2d9734184cea0db Mon Sep 17 00:00:00 2001 From: Fabio Comuni Date: Fri, 10 Feb 2012 17:29:37 +0100 Subject: [PATCH 048/119] quattro: add "view in context" link in search results --- view/search_item.tpl | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/view/search_item.tpl b/view/search_item.tpl index c4f3ccac7b..de8bd23961 100755 --- a/view/search_item.tpl +++ b/view/search_item.tpl @@ -78,6 +78,14 @@
-
$dislike
+
$dislike
+ {{ if $conv }} +
+ $conv.title + {{ endif }} +
+ + + From ed38808aae6585bb6c31a18788f0290812bae2f8 Mon Sep 17 00:00:00 2001 From: Fabio Comuni Date: Fri, 10 Feb 2012 17:30:22 +0100 Subject: [PATCH 049/119] hidden jot in "display" to allow reshare --- include/conversation.php | 12 +++++++++--- mod/display.php | 4 ++++ view/jot-header.tpl | 3 +++ 3 files changed, 16 insertions(+), 3 deletions(-) diff --git a/include/conversation.php b/include/conversation.php index 6defefc731..947a9b040a 100755 --- a/include/conversation.php +++ b/include/conversation.php @@ -494,7 +494,7 @@ function conversation(&$a, $items, $mode, $update, $preview = false) { } $likebuttons = ''; - $shareable = ((($profile_owner == local_user()) && ($mode != 'display') && (! $item['private'])) ? true : false); + $shareable = ((($profile_owner == local_user()) && (! $item['private'])) ? true : false); //($mode != 'display') && if($page_writeable) { if($toplevelpost) { @@ -832,7 +832,7 @@ function format_like($cnt,$arr,$type,$id) { }} -function status_editor($a,$x, $notes_cid = 0) { +function status_editor($a,$x, $notes_cid = 0, $popup=false) { $o = ''; @@ -896,7 +896,7 @@ function status_editor($a,$x, $notes_cid = 0) { $o .= replace_macros($tpl,array( '$return_path' => $a->cmd, - '$action' => 'item', + '$action' => $a->get_baseurl().'/item', '$share' => (($x['button']) ? $x['button'] : t('Share')), '$upload' => t('Upload photo'), '$shortupload' => t('upload photo'), @@ -935,6 +935,12 @@ function status_editor($a,$x, $notes_cid = 0) { '$preview' => t('Preview'), )); + + if ($popup==true){ + $o = ''; + + } + return $o; } diff --git a/mod/display.php b/mod/display.php index 02f080a790..79eaf37178 100755 --- a/mod/display.php +++ b/mod/display.php @@ -66,6 +66,10 @@ function display_content(&$a) { notice( t('Access to this profile has been restricted.') . EOL); return; } + + if ($is_owner) + $o .= status_editor($a,$x,0,true); + $sql_extra = permissions_sql($a->profile['uid'],$remote_contact,$groups); diff --git a/view/jot-header.tpl b/view/jot-header.tpl index 22b4349166..482fb0e0dc 100755 --- a/view/jot-header.tpl +++ b/view/jot-header.tpl @@ -215,6 +215,9 @@ function enableOnUser(){ initEditor(function(){ addeditortext(data); $('#like-rotator-' + id).hide(); + if ($('#jot-popup').length != 0){ + $('#jot-popup').show(); + } $(window).scrollTop(0); }); From d79c3351ea6692478a490f4225ea1009863dd65f Mon Sep 17 00:00:00 2001 From: friendica Date: Fri, 10 Feb 2012 13:43:35 -0800 Subject: [PATCH 050/119] db installation sync --- boot.php | 4 ++-- database.sql | 2 ++ include/items.php | 1 + update.php | 18 +++++++++++++++++- 4 files changed, 22 insertions(+), 3 deletions(-) diff --git a/boot.php b/boot.php index 9573408f03..1909abbed4 100755 --- a/boot.php +++ b/boot.php @@ -9,9 +9,9 @@ require_once('include/nav.php'); require_once('include/cache.php'); define ( 'FRIENDICA_PLATFORM', 'Friendica'); -define ( 'FRIENDICA_VERSION', '2.3.1247' ); +define ( 'FRIENDICA_VERSION', '2.3.1248' ); define ( 'DFRN_PROTOCOL_VERSION', '2.22' ); -define ( 'DB_UPDATE_VERSION', 1120 ); +define ( 'DB_UPDATE_VERSION', 1121 ); define ( 'EOL', "
\r\n" ); define ( 'ATOM_TIME', 'Y-m-d\TH:i:s\Z' ); diff --git a/database.sql b/database.sql index 8abaa5a93b..0b03149e9e 100755 --- a/database.sql +++ b/database.sql @@ -226,6 +226,7 @@ CREATE TABLE IF NOT EXISTS `item` ( `pubmail` tinyint(1) NOT NULL DEFAULT '0', `moderated` tinyint(1) NOT NULL DEFAULT '0', `visible` tinyint(1) NOT NULL DEFAULT '0', + `spam` tinyint(1) NOT NULL DEFAULT '0', `starred` tinyint(1) NOT NULL DEFAULT '0', `bookmark` tinyint(1) NOT NULL DEFAULT '0', `unseen` tinyint(1) NOT NULL DEFAULT '1', @@ -247,6 +248,7 @@ CREATE TABLE IF NOT EXISTS `item` ( KEY `received` (`received`), KEY `moderated` (`moderated`), KEY `visible` (`visible`), + KEY `spam` (`spam`), KEY `starred` (`starred`), KEY `bookmark` (`bookmark`), KEY `deleted` (`deleted`), diff --git a/include/items.php b/include/items.php index 3c30e99aad..5e3f9a60a2 100755 --- a/include/items.php +++ b/include/items.php @@ -985,6 +985,7 @@ function tag_deliver($uid,$item_id) { 'verb' => ACTIVITY_TAG, 'otype' => 'item' )); + if(! $community_page) return; diff --git a/update.php b/update.php index dc3cc0e562..9e3f22ef1a 100755 --- a/update.php +++ b/update.php @@ -1,6 +1,6 @@ Date: Fri, 10 Feb 2012 14:03:43 -0800 Subject: [PATCH 051/119] bug #270 - solved --- mod/install.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/mod/install.php b/mod/install.php index 33502938a9..003d81c6ab 100755 --- a/mod/install.php +++ b/mod/install.php @@ -186,8 +186,8 @@ function install_content(&$a) { check_keys($checks); - if(x($_POST,'phppath')) - $phpath = notags(trim($_POST['phppath'])); + if(x($_POST,'phpath')) + $phpath = notags(trim($_POST['phpath'])); check_php($phpath, $checks); @@ -221,7 +221,7 @@ function install_content(&$a) { $dbuser = notags(trim($_POST['dbuser'])); $dbpass = notags(trim($_POST['dbpass'])); $dbdata = notags(trim($_POST['dbdata'])); - $phpath = notags(trim($_POST['phppath'])); + $phpath = notags(trim($_POST['phpath'])); $tpl = get_markup_template('install_db.tpl'); @@ -259,7 +259,7 @@ function install_content(&$a) { $dbuser = notags(trim($_POST['dbuser'])); $dbpass = notags(trim($_POST['dbpass'])); $dbdata = notags(trim($_POST['dbdata'])); - $phpath = notags(trim($_POST['phppath'])); + $phpath = notags(trim($_POST['phpath'])); $adminmail = notags(trim($_POST['adminmail'])); $timezone = ((x($_POST,'timezone')) ? ($_POST['timezone']) : 'America/Los_Angeles'); @@ -323,7 +323,7 @@ function check_php(&$phpath, &$checks) { $help .= t('Could not find a command line version of PHP in the web server PATH.'). EOL; $tpl = get_markup_template('field_input.tpl'); $help .= replace_macros($tpl, array( - '$field' => array('phppath', t('PHP executable path'), $phpath, t('Enter full path to php executable')), + '$field' => array('phpath', t('PHP executable path'), $phpath, t('Enter full path to php executable')), )); $phpath=""; } From 857f21eb327828391b747f0f08f04956860b6743 Mon Sep 17 00:00:00 2001 From: Tobias Diekershoff Date: Sat, 11 Feb 2012 10:03:14 +0100 Subject: [PATCH 052/119] fpostit by Devlon Duthied added to utils --- util/fpostit/README | 8 +++ util/fpostit/fpostit.js | 11 +++ util/fpostit/fpostit.php | 129 ++++++++++++++++++++++++++++++++++ util/fpostit/friendika-32.png | Bin 0 -> 1593 bytes 4 files changed, 148 insertions(+) create mode 100644 util/fpostit/README create mode 100644 util/fpostit/fpostit.js create mode 100644 util/fpostit/fpostit.php create mode 100644 util/fpostit/friendika-32.png diff --git a/util/fpostit/README b/util/fpostit/README new file mode 100644 index 0000000000..39b7c57613 --- /dev/null +++ b/util/fpostit/README @@ -0,0 +1,8 @@ +fpostit + +original author: Devlon Duthied + +see his blog posting: +http://blog.duthied.com/2011/09/13/node-agnostic-friendika-bookmarklet/ + +original published at github https://github.com/duthied/Friendika-Bookmarklet diff --git a/util/fpostit/fpostit.js b/util/fpostit/fpostit.js new file mode 100644 index 0000000000..a6c75aba8f --- /dev/null +++ b/util/fpostit/fpostit.js @@ -0,0 +1,11 @@ +javascript: (function() { + the_url = 'http://testbubble.com/fpostit.php?url=' + encodeURIComponent(window.location.href) + '&title=' + encodeURIComponent(document.title) + '&text=' + encodeURIComponent('' (window.getSelection ? window.getSelection() : document.getSelection ? document.getSelection() : document.selection.createRange().text)); + a_funct = function() { + if (!window.open(the_url, 'fpostit', 'location=yes,links=no,scrollbars=no,toolbar=no,width=600,height=300')) location.href = the_url; + }; + if (/Firefox/.test(navigator.userAgent)) { + setTimeout(a_funct, 0) + } else { + a_funct() + } +})() \ No newline at end of file diff --git a/util/fpostit/fpostit.php b/util/fpostit/fpostit.php new file mode 100644 index 0000000000..491d81f6d6 --- /dev/null +++ b/util/fpostit/fpostit.php @@ -0,0 +1,129 @@ + + + + + + + + $content); + + // echo "posting to: $url
"; + + $c = curl_init(); + curl_setopt($c, CURLOPT_URL, $url); + curl_setopt($c, CURLOPT_USERPWD, "$username:$password"); + curl_setopt($c, CURLOPT_POSTFIELDS, $data); + curl_setopt($c, CURLOPT_RETURNTRANSFER, true); + curl_setopt($c, CURLOPT_FOLLOWLOCATION, true); + $c_result = curl_exec($c); + if(curl_errno($c)){ + $error = curl_error($c); + showForm($error, $content); + } + + curl_close($c); + if (!isset($error)) { + echo ''; + } + + } else { + $error = "Missing account name and/or password...try again please"; + showForm($error, $content); + } + +} else { + showForm(null, $content); +} + +function showForm($error, $content) { + $username_cookie = $_COOKIE['username']; + $password_cookie = $_COOKIE['password']; + + echo << +

+ Friendika Bookmarklet

+ + +
+ + Enter the email address of the Friendika Account that you want to cross-post to:(example: user@friendika.org)

+ Account ID:
+ Password:
+
+   $error + +

+
+EOF; + +} +?> + + + \ No newline at end of file diff --git a/util/fpostit/friendika-32.png b/util/fpostit/friendika-32.png new file mode 100644 index 0000000000000000000000000000000000000000..61764bf20a35fb21995b667e9a5e25436685a8a7 GIT binary patch literal 1593 zcmV-92FCe`P)Px#24YJ`L;(K){{a7>y{D4^000SaNLh0L03itg03ithOzq;@000HdNkli(P8=f+Y^Mqc1WDr}2vQk{QV2|+A}XxHfQrbj zRH(85xk;}eX_zVqV1$KI$q_6^imXtyL@uc%ce#(b_xvgD%Ji=M&inl5|IcfT zk+rnW~cVMU8ZZk781Awt_EiW&B7^A=0&%>nLiE=zTF-F`Y z?jnYe_L%k%19FkaK*b=2KJJkieXtuAdLjSn+z01=1918BWloebmi#Ot+6 zd};o$s8PJixiZ(PPAQm8s^ZmeF?Cdnz=xsAO(@FBVaF<-N=#qcy`!ug#n_pR3xd8mK3UKSz ze-_?6Il*+Li$cWY2shJyLy_ci0i--vac-j3Y_i#FQ=jYM?zlvBSqVZ}McY#^X#4s< zPrZ8T)J*laOG{I$YhS_Wkj&ZH*u~ zg0LtdDzsyb^#^N5deLU8S3bR>qYE$d)9;;xa7ct;qgt!*(277b#xPPckcsy828~XO z&Tf|&97!b$DHg11?OtGGYg+=U?e;FW|9wMW-EKqoxLKS?X(0y*BOpOH1|D_`U<2JX z0>Y_Jik*j>GN#EOR>D9xAf0TBc#I-GEMjkO5htwFbpvR{@;Ctz7((s+?@NK{Z7L&Gx6%|Jz&slFc^QS+?n-4e$MGa9s z@)DT|VVGq|!YpH4>8tMZq1g3}E2WE5-+6=B`0s%%2t$Q@gDYkQ2pf7d9>A#28t&yA8iJ_tc2^D0F%dsYBRj$WQp zbG7>-v^y!}_aha|%vLyTO)2D=B?j!700?0+-hHjc-#=O4=)(Ji5XT~&teehX+0-9f zzp_KGypG1fd|Ch|LnaPSWxVrUz}F7;X%Y_mmXUV`Vf@T7AWIAk6QlA7vSdy+jQl46 zkUc&El5rLO=peuJ|E1028PG@xrObbgPZm8P?~eyilu?aTv6^6^`ec*hx_BnWmC&u29haG4LlI rGxj`Ruw!GZjr6p}i@z8)_TTs)qHGuE{mw-x00000NkvXXu0mjfEd=xj literal 0 HcmV?d00001 From 75a62db9c5e59adbd1d8dc2d5e0ba3544df3a15e Mon Sep 17 00:00:00 2001 From: friendica Date: Sat, 11 Feb 2012 01:24:29 -0800 Subject: [PATCH 053/119] show tags (pub_keywords) in advanced profile --- boot.php | 14 ++++++++++++-- include/profile_advanced.php | 2 ++ view/profile_advanced.tpl | 7 +++++++ 3 files changed, 21 insertions(+), 2 deletions(-) diff --git a/boot.php b/boot.php index 1909abbed4..d04563d530 100755 --- a/boot.php +++ b/boot.php @@ -819,7 +819,7 @@ function profile_load(&$a, $nickname, $profile = 0) { } $r = null; - + if($profile) { $profile_int = intval($profile); $r = q("SELECT `profile`.`uid` AS `profile_uid`, `profile`.* , `contact`.`avatar-date` AS picdate, `user`.* FROM `profile` @@ -829,7 +829,7 @@ function profile_load(&$a, $nickname, $profile = 0) { intval($profile_int) ); } - if(! count($r)) { + if((! $r) && (! count($r))) { $r = q("SELECT `profile`.`uid` AS `profile_uid`, `profile`.* , `contact`.`avatar-date` AS picdate, `user`.* FROM `profile` left join `contact` on `contact`.`uid` = `profile`.`uid` LEFT JOIN `user` ON `profile`.`uid` = `user`.`uid` WHERE `user`.`nickname` = '%s' AND `profile`.`is-default` = 1 and `contact`.`self` = 1 LIMIT 1", @@ -842,6 +842,16 @@ function profile_load(&$a, $nickname, $profile = 0) { $a->error = 404; return; } + + // fetch user tags if this isn't the default profile + + if(! $r[0]['is-default']) { + $x = q("select `pub_keywords` from `profile` where uid = %d and `is-default` = 1 limit 1", + intval($profile_uid) + ); + if($x && count($x)) + $r[0]['pub_keywords'] = $x[0]['pub_keywords']; + } $a->profile = $r[0]; diff --git a/include/profile_advanced.php b/include/profile_advanced.php index ccecb95dee..004a58524b 100755 --- a/include/profile_advanced.php +++ b/include/profile_advanced.php @@ -44,6 +44,8 @@ function advanced_profile(&$a) { if($a->profile['homepage']) $profile['homepage'] = array( t('Homepage:'), linkify($a->profile['homepage']) ); + if($a->profile['pub_keywords']) $profile['pub_keywords'] = array( t('Tags:'), $a->profile['pub_keywords']); + if($a->profile['politic']) $profile['politic'] = array( t('Political Views:'), $a->profile['politic']); if($a->profile['religion']) $profile['religion'] = array( t('Religion:'), $a->profile['religion']); diff --git a/view/profile_advanced.tpl b/view/profile_advanced.tpl index 5cef25a2e9..470404fc33 100755 --- a/view/profile_advanced.tpl +++ b/view/profile_advanced.tpl @@ -40,6 +40,13 @@
{{ endif }} +{{ if $profile.pub_keywords }} +
+
$profile.pub_keywords.0
+
$profile.pub_keywords.1
+
+{{ endif }} + {{ if $profile.homepage }}
$profile.homepage.0
From da946bb9b0905a2126e7234c6c85157bd7978102 Mon Sep 17 00:00:00 2001 From: friendica Date: Sat, 11 Feb 2012 03:07:15 -0800 Subject: [PATCH 054/119] bug #278 show only blocked contacts --- mod/contacts.php | 19 ++++++++++++++----- view/contacts-top.tpl | 3 ++- 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/mod/contacts.php b/mod/contacts.php index 206128f9d0..aaa2ff9613 100755 --- a/mod/contacts.php +++ b/mod/contacts.php @@ -356,20 +356,29 @@ function contacts_content(&$a) { } + $blocked = false; + $_SESSION['return_url'] = $a->query_string; if(($a->argc == 2) && ($a->argv[1] === 'all')) $sql_extra = ''; - else - $sql_extra = " AND `blocked` = 0 "; - + else { + if(($a->argc == 2) && ($a->argv[1] === 'blocked')) { + $sql_extra = " AND `blocked` = 1 "; + $blocked = true; + } + else + $sql_extra = " AND `blocked` = 0 "; + } $search = ((x($_GET,'search')) ? notags(trim($_GET['search'])) : ''); $tpl = get_markup_template("contacts-top.tpl"); $o .= replace_macros($tpl,array( '$header' => t('Contacts'), - '$hide_url' => ((strlen($sql_extra)) ? 'contacts/all' : 'contacts' ), - '$hide_text' => ((strlen($sql_extra)) ? t('Show Blocked Connections') : t('Hide Blocked Connections')), + '$hide_url' => (($blocked) ? 'contacts' : 'contacts/blocked'), + '$hide_text' => (($blocked) ? t('Show Unblocked Contacts') : t('Show Blocked Contacts')), + '$all_url' => 'contacts/all', + '$all_text' => t('Show All Contacts'), '$search' => $search, '$desc' => t('Search your contacts'), '$finding' => (strlen($search) ? '

' . t('Finding: ') . "'" . $search . "'" . '

' : ""), diff --git a/view/contacts-top.tpl b/view/contacts-top.tpl index 4dffda1ce4..b8972834c7 100755 --- a/view/contacts-top.tpl +++ b/view/contacts-top.tpl @@ -14,5 +14,6 @@ $finding From 0c4606682ff0463c7d07e5215bb3d0881f94701c Mon Sep 17 00:00:00 2001 From: friendica Date: Sat, 11 Feb 2012 19:21:41 -0800 Subject: [PATCH 055/119] fix link/bookmark reshares --- boot.php | 2 +- mod/oembed.php | 15 +++++++++++++++ view/theme/duepuntozero/style.css | 1 + 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/boot.php b/boot.php index d04563d530..7a26dd9a24 100755 --- a/boot.php +++ b/boot.php @@ -9,7 +9,7 @@ require_once('include/nav.php'); require_once('include/cache.php'); define ( 'FRIENDICA_PLATFORM', 'Friendica'); -define ( 'FRIENDICA_VERSION', '2.3.1248' ); +define ( 'FRIENDICA_VERSION', '2.3.1249' ); define ( 'DFRN_PROTOCOL_VERSION', '2.22' ); define ( 'DB_UPDATE_VERSION', 1121 ); diff --git a/mod/oembed.php b/mod/oembed.php index 25995813a3..236625f68a 100755 --- a/mod/oembed.php +++ b/mod/oembed.php @@ -2,11 +2,26 @@ require_once("include/oembed.php"); function oembed_content(&$a){ + // logger('mod_oembed ' . $a->query_string, LOGGER_ALL); + + if ($a->argv[1]=='b2h'){ + $url = array( "", trim(hex2bin($_REQUEST['url']))); + echo oembed_replacecb($url); + killme(); + } + + if ($a->argv[1]=='h2b'){ + $text = trim(hex2bin($_REQUEST['text'])); + echo oembed_html2bbcode($text); + killme(); + } + if ($a->argc == 2){ echo ""; $url = base64url_decode($a->argv[1]); $j = oembed_fetch_url($url); echo $j->html; +// logger('mod-oembed ' . $j->html, LOGGER_ALL); echo ""; } killme(); diff --git a/view/theme/duepuntozero/style.css b/view/theme/duepuntozero/style.css index 66809a8d81..60fe4fb283 100755 --- a/view/theme/duepuntozero/style.css +++ b/view/theme/duepuntozero/style.css @@ -824,6 +824,7 @@ input#dfrn-url { .contact-entry-name { float: left; margin-left: 0px; + margin-right: 10px; width: 120px; overflow: hidden; } From d856ae1fa527772ebc9194f25a1e55df614b8f3e Mon Sep 17 00:00:00 2001 From: friendica Date: Sat, 11 Feb 2012 21:39:51 -0800 Subject: [PATCH 056/119] bug #279, add network selector widget to contacts page --- mod/contacts.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/mod/contacts.php b/mod/contacts.php index aaa2ff9613..32af29c15c 100755 --- a/mod/contacts.php +++ b/mod/contacts.php @@ -42,6 +42,7 @@ function contacts_init(&$a) { $a->page['aside'] .= findpeople_widget(); + $a->page['aside'] .= networks_widget('contacts',$_GET['nets']); } function contacts_post(&$a) { @@ -371,10 +372,11 @@ function contacts_content(&$a) { $sql_extra = " AND `blocked` = 0 "; } $search = ((x($_GET,'search')) ? notags(trim($_GET['search'])) : ''); + $nets = ((x($_GET,'nets')) ? notags(trim($_GET['nets'])) : ''); $tpl = get_markup_template("contacts-top.tpl"); $o .= replace_macros($tpl,array( - '$header' => t('Contacts'), + '$header' => t('Contacts') . (($nets) ? ' - ' . network_to_name($nets) : ''), '$hide_url' => (($blocked) ? 'contacts' : 'contacts/blocked'), '$hide_text' => (($blocked) ? t('Show Unblocked Contacts') : t('Show Blocked Contacts')), '$all_url' => 'contacts/all', @@ -392,6 +394,9 @@ function contacts_content(&$a) { $search = dbesc($search.'*'); $sql_extra .= ((strlen($search)) ? " AND MATCH `name` AGAINST ('$search' IN BOOLEAN MODE) " : ""); + if($nets) + $sql_extra .= sprintf(" AND network = '%s' ", dbesc($nets)); + $sql_extra2 = ((($sort_type > 0) && ($sort_type <= CONTACT_IS_FRIEND)) ? sprintf(" AND `rel` = %d ",intval($sort_type)) : ''); From bb19c8ba4ea279265ad146f69949a62b4024c2ab Mon Sep 17 00:00:00 2001 From: friendica Date: Sat, 11 Feb 2012 21:46:48 -0800 Subject: [PATCH 057/119] kissing smilie may need escaping (thanks - Abinoam) --- include/text.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/text.php b/include/text.php index 9aca145988..9e67d36a98 100755 --- a/include/text.php +++ b/include/text.php @@ -678,7 +678,7 @@ function smilies($s) { $a = get_app(); $s = str_replace( - array( '<3', '</3', '<\\3', ':-)', ':)', ';-)', ':-(', ':(', ':-P', ':P', ':-"', ':-x', ':-X', ':-D', '8-|', '8-O', '\\o/', 'o.O', 'O.o', '\\.../', '\\ooo/', + array( '<3', '</3', '<\\3', ':-)', ':)', ';-)', ':-(', ':(', ':-P', ':P', ':-"', ':-"', ':-x', ':-X', ':-D', '8-|', '8-O', '\\o/', 'o.O', 'O.o', '\\.../', '\\ooo/', ':beer', ':homebrew', ':coffee', '~friendika', '~friendica', 'Diaspora*' ), array( @@ -693,6 +693,7 @@ function smilies($s) { ':-P', ':P', ':-\', + ':-\', ':-x', ':-X', ':-D', From 4cfb1fe0cfb0520f4d6be88c1bf09cd9a03bc88a Mon Sep 17 00:00:00 2001 From: friendica Date: Sat, 11 Feb 2012 23:17:55 -0800 Subject: [PATCH 058/119] refresh contact record after setting change --- mod/contacts.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/mod/contacts.php b/mod/contacts.php index 32af29c15c..ef77366da7 100755 --- a/mod/contacts.php +++ b/mod/contacts.php @@ -100,6 +100,14 @@ function contacts_post(&$a) { info( t('Contact updated.') . EOL); else notice( t('Failed to update contact record.') . EOL); + + $r = q("select * from contact where id = %d and uid = %d limit 1", + intval($contact_id), + intval(local_user()) + ); + if($r && count($r)) + $a->data['contact'] = $r[0]; + return; } From 8b101c6cb865c24cefd610e01ad628abd1152217 Mon Sep 17 00:00:00 2001 From: friendica Date: Sat, 11 Feb 2012 23:49:05 -0800 Subject: [PATCH 059/119] do not display contact_block if config for num shown is 0 --- include/text.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/include/text.php b/include/text.php index 9e67d36a98..63846fb10b 100755 --- a/include/text.php +++ b/include/text.php @@ -538,8 +538,10 @@ function contact_block() { $a = get_app(); $shown = get_pconfig($a->profile['uid'],'system','display_friend_count'); - if(! $shown) + if($shown === false) $shown = 24; + if($shown == 0) + return; if((! is_array($a->profile)) || ($a->profile['hide-friends'])) return $o; From cbf53beec12bf835177695fef9cd6a33ce9d1629 Mon Sep 17 00:00:00 2001 From: Vasudev Kamath Date: Sun, 12 Feb 2012 15:06:12 +0530 Subject: [PATCH 060/119] ;) :D and :-O are also enabled for wink laugh and surprised smiley's --- include/text.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/include/text.php b/include/text.php index 9e67d36a98..68170e9885 100755 --- a/include/text.php +++ b/include/text.php @@ -678,9 +678,9 @@ function smilies($s) { $a = get_app(); $s = str_replace( - array( '<3', '</3', '<\\3', ':-)', ':)', ';-)', ':-(', ':(', ':-P', ':P', ':-"', ':-"', ':-x', ':-X', ':-D', '8-|', '8-O', '\\o/', 'o.O', 'O.o', '\\.../', '\\ooo/', + array( '<3', '</3', '<\\3', ':-)', ':)', ';-)', ';)', ':-(', ':(', ':-P', ':P', ':-"', ':-"', ':-x', ':-X', ':-D', ':D', '8-|', '8-O', ':-O', '\\o/', 'o.O', 'O.o', '\\.../', '\\ooo/', ':beer', ':homebrew', ':coffee', - '~friendika', '~friendica', 'Diaspora*' ), + '~friendika', '~friendica', 'Diaspora*' ), array( '<3', '</3', @@ -688,6 +688,7 @@ function smilies($s) { ':-)', ':)', ';-)', + ';)', ':-(', ':(', ':-P', @@ -697,13 +698,16 @@ function smilies($s) { ':-x', ':-X', ':-D', + ':D', '8-|', '8-O', + ':-O', '\\o/', 'o.O', 'O.o', '\\.../', - '\\ooo/', + '\\ooo/', + ':beer', ':homebrew', ':coffee', From 5107ee52d3e9c743e977b2e651c8846dfa4ada38 Mon Sep 17 00:00:00 2001 From: "Abinoam P. Marques Jr" Date: Sun, 12 Feb 2012 06:13:49 -0800 Subject: [PATCH 061/119] Regexp fix for [LIST=i], [list=i], [LIST=I] and [LIST=i] bbcodes --- include/bbcode.php | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/include/bbcode.php b/include/bbcode.php index 6b733c8f43..7825914b55 100755 --- a/include/bbcode.php +++ b/include/bbcode.php @@ -124,10 +124,14 @@ function bbcode($Text,$preserve_nl = false) { $Text = preg_replace("/\[list\](.*?)\[\/list\]/ism", '
    $1
' ,$Text); $Text = preg_replace("/\[list=\](.*?)\[\/list\]/ism", '
    $1
' ,$Text); $Text = preg_replace("/\[list=1\](.*?)\[\/list\]/ism", '
    $1
' ,$Text); - $Text = preg_replace("/\[list=i\](.*?)\[\/list\]/sm",'
    $1
' ,$Text); - $Text = preg_replace("/\[list=I\](.*?)\[\/list\]/sm", '
    $1
' ,$Text); - $Text = preg_replace("/\[list=a\](.*?)\[\/list\]/sm", '
    $1
' ,$Text); - $Text = preg_replace("/\[list=A\](.*?)\[\/list\]/sm", '
    $1
' ,$Text); + $Text = preg_replace("/\[list=((?-i)i)\](.*?)\[\/list\]/ism",'
    $2
' ,$Text); + $Text = preg_replace("/\[list=((?-i)I)\](.*?)\[\/list\]/ism", '
    $2
' ,$Text); + $Text = preg_replace("/\[list=((?-i)a)\](.*?)\[\/list\]/ism", '
    $2
' ,$Text); + $Text = preg_replace("/\[list=((?-i)A)\](.*?)\[\/list\]/ism", '
    $2
' ,$Text); $Text = preg_replace("/\[li\](.*?)\[\/li\]/sm", '
  • $1
  • ' ,$Text); $Text = preg_replace("/\[td\](.*?)\[\/td\]/sm", '
    ' ,$Text); From 5479142efca1fff08f2d60dc5a723b5d0842548b Mon Sep 17 00:00:00 2001 From: "Abinoam P. Marques Jr" Date: Sun, 12 Feb 2012 06:21:01 -0800 Subject: [PATCH 062/119] Added support for [ul] standard unordered list bbcode. --- include/bbcode.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/include/bbcode.php b/include/bbcode.php index 7825914b55..5d9665be56 100755 --- a/include/bbcode.php +++ b/include/bbcode.php @@ -115,13 +115,15 @@ function bbcode($Text,$preserve_nl = false) { // Check for list text - if(stristr($Text,'[/list]')) + if(stristr($Text,'[/(list|ul|ol)]')) $Text = str_replace("[*]", "
  • ", $Text); if(stristr($Text,'[/list]')) $Text = str_replace("[*]", "
  • ", $Text); $Text = preg_replace("/\[list\](.*?)\[\/list\]/ism", '
      $1
    ' ,$Text); + $Text = preg_replace("/\[ul\](.*?)\[\/ul\]/ism", '
      $1
    ' +,$Text); $Text = preg_replace("/\[list=\](.*?)\[\/list\]/ism", '
      $1
    ' ,$Text); $Text = preg_replace("/\[list=1\](.*?)\[\/list\]/ism", '
      $1
    ' ,$Text); $Text = preg_replace("/\[list=((?-i)i)\](.*?)\[\/list\]/ism",'
      Date: Sun, 12 Feb 2012 12:00:23 -0800 Subject: [PATCH 063/119] Added support for [ol] standard ordered list bbcode. --- include/bbcode.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/bbcode.php b/include/bbcode.php index 5d9665be56..7133a1a34d 100755 --- a/include/bbcode.php +++ b/include/bbcode.php @@ -126,6 +126,8 @@ function bbcode($Text,$preserve_nl = false) { ,$Text); $Text = preg_replace("/\[list=\](.*?)\[\/list\]/ism", '
        $1
      ' ,$Text); $Text = preg_replace("/\[list=1\](.*?)\[\/list\]/ism", '
        $1
      ' ,$Text); + $Text = preg_replace("/\[ol\](.*?)\[\/ol\]/ism", '
        $1
      ' +,$Text); $Text = preg_replace("/\[list=((?-i)i)\](.*?)\[\/list\]/ism",'
        $2
      ' ,$Text); $Text = preg_replace("/\[list=((?-i)I)\](.*?)\[\/list\]/ism", '
        Date: Sun, 12 Feb 2012 14:35:29 -0800 Subject: [PATCH 065/119] Added support to [noparse], [nobb] and [pre] as bbcode escape tags. --- include/bbcode.php | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/include/bbcode.php b/include/bbcode.php index 7133a1a34d..3534a7315f 100755 --- a/include/bbcode.php +++ b/include/bbcode.php @@ -24,13 +24,40 @@ function tryoembed($match){ } +// [noparse][i]italic[/i][/noparse] turns into +// [noparse][ i ]italic[ /i ][/noparse], +// to hide them from parser. +function bb_spacefy($st) { + $whole_match = $st[0]; + $captured = $st[1]; + $spacefied = preg_replace("/\[(.*?)\]/", "[ $1 ]", $captured); + $new_str = str_replace($captured, $spacefied, $whole_match); + return $new_str; +} + +// The previously spacefied [noparse][ i ]italic[ /i ][/noparse], +// now turns back and the [noparse] tags are trimed +// returning [i]italic[/i] + +function bb_unspacefy_and_trim($st) { + $whole_match = $st[0]; + $captured = $st[1]; + $unspacefied = preg_replace("/\[ (.*?)\ ]/", "[$1]", $captured); + return $unspacefied; +} // BBcode 2 HTML was written by WAY2WEB.net // extended to work with Mistpark/Friendica - Mike Macgirvin function bbcode($Text,$preserve_nl = false) { + // Hide all [noparse] contained bbtags spacefying them + + $Text = preg_replace_callback("/\[noparse\](.*?)\[\/noparse\]/ism", 'bb_spacefy',$Text); + $Text = preg_replace_callback("/\[nobb\](.*?)\[\/nobb\]/ism", 'bb_spacefy',$Text); + $Text = preg_replace_callback("/\[pre\](.*?)\[\/pre\]/ism", 'bb_spacefy',$Text); + // Extract a single private image which uses data url's since preg has issues with // large data sizes. Stash it away while we do bbcode conversion, and then put it back @@ -227,6 +254,13 @@ upper-alpha;">$2
      ' ,$Text); $Text = preg_replace("/\[event\-adjust\](.*?)\[\/event\-adjust\]/ism",'',$Text); } + // Unhide all [noparse] contained bbtags unspacefying them + // and triming the [noparse] tag. + + $Text = preg_replace_callback("/\[noparse\](.*?)\[\/noparse\]/ism", 'bb_unspacefy_and_trim',$Text); + $Text = preg_replace_callback("/\[nobb\](.*?)\[\/nobb\]/ism", 'bb_unspacefy_and_trim',$Text); + $Text = preg_replace_callback("/\[pre\](.*?)\[\/pre\]/ism", 'bb_unspacefy_and_trim',$Text); + // fix any escaped ampersands that may have been converted into links $Text = preg_replace("/\<(.*?)(src|href)=(.*?)\&\;(.*?)\>/ism",'<$1$2=$3&$4>',$Text); if(strlen($saved_image)) From 74b529bda2fb024815299db094ac8313a9d9d809 Mon Sep 17 00:00:00 2001 From: "Abinoam P. Marques Jr" Date: Sun, 12 Feb 2012 14:59:07 -0800 Subject: [PATCH 066/119] BBCode [size=50] --> font-size: 50px (with the unit px). This [size=number] without unit is kind of a standard. It was being rendered like "font-size: 50" and that's not valid CSS style. --- include/bbcode.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/bbcode.php b/include/bbcode.php index 3534a7315f..fa5b7e0806 100755 --- a/include/bbcode.php +++ b/include/bbcode.php @@ -138,6 +138,8 @@ function bbcode($Text,$preserve_nl = false) { $Text = preg_replace("(\[color=(.*?)\](.*?)\[\/color\])ism","$2",$Text); // Check for sized text + // [size=50] --> font-size: 50px (with the unit). + $Text = preg_replace("(\[size=(\d*?)\](.*?)\[\/size\])ism","$2",$Text); $Text = preg_replace("(\[size=(.*?)\](.*?)\[\/size\])ism","$2",$Text); // Check for list text From 3a07973ffae4e0f9c576d343eafee30401d92449 Mon Sep 17 00:00:00 2001 From: "Abinoam P. Marques Jr" Date: Sun, 12 Feb 2012 15:51:17 -0800 Subject: [PATCH 067/119] Added [center] bbcode support. --- include/bbcode.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/bbcode.php b/include/bbcode.php index fa5b7e0806..20418f9407 100755 --- a/include/bbcode.php +++ b/include/bbcode.php @@ -142,6 +142,9 @@ function bbcode($Text,$preserve_nl = false) { $Text = preg_replace("(\[size=(\d*?)\](.*?)\[\/size\])ism","$2",$Text); $Text = preg_replace("(\[size=(.*?)\](.*?)\[\/size\])ism","$2",$Text); + // Check for centered text + $Text = preg_replace("(\[center\](.*?)\[\/center\])ism","
      $1
      ",$Text); + // Check for list text if(stristr($Text,'[/(list|ul|ol)]')) From 10e66d293df695e37be05200ab130f1fc988880b Mon Sep 17 00:00:00 2001 From: "Abinoam P. Marques Jr" Date: Sun, 12 Feb 2012 16:18:58 -0800 Subject: [PATCH 068/119] Added [quote=Name] bbcode support. --- include/bbcode.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/include/bbcode.php b/include/bbcode.php index 20418f9407..5eacb256b2 100755 --- a/include/bbcode.php +++ b/include/bbcode.php @@ -197,7 +197,13 @@ upper-alpha;">$2
    ' ,$Text); $QuoteLayout = '
    $1
    '; // Check for [quote] text $Text = preg_replace("/\[quote\](.*?)\[\/quote\]/ism","$QuoteLayout", $Text); - + + // Check for [quote=Author] text + $t_wrote = t("wrote"); + $Text = preg_replace("/\[quote=[\"\']*(.*?)[\"\']*\](.*?)\[\/quote\]/ism", + "
    $1 wrote: $2
    ", + $Text); + // [img=widthxheight]image source[/img] $Text = preg_replace("/\[img\=([0-9]*)x([0-9]*)\](.*?)\[\/img\]/ism", '', $Text); From e575a3a02c324d65e6849ffd3f8cf68e7318f748 Mon Sep 17 00:00:00 2001 From: "Abinoam P. Marques Jr" Date: Sun, 12 Feb 2012 17:10:06 -0800 Subject: [PATCH 069/119] Fixed bbcode [li] and [*] handling. --- include/bbcode.php | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/include/bbcode.php b/include/bbcode.php index 5eacb256b2..1d11f687de 100755 --- a/include/bbcode.php +++ b/include/bbcode.php @@ -146,12 +146,8 @@ function bbcode($Text,$preserve_nl = false) { $Text = preg_replace("(\[center\](.*?)\[\/center\])ism","
    $1
    ",$Text); // Check for list text - - if(stristr($Text,'[/(list|ul|ol)]')) - $Text = str_replace("[*]", "
  • ", $Text); - - if(stristr($Text,'[/list]')) - $Text = str_replace("[*]", "
  • ", $Text); + $Text = str_replace("[*]", "
  • ", $Text); + $Text = preg_replace("/\[li\](.*?)\[\/li\]/ism", '
  • $1
  • ' ,$Text); $Text = preg_replace("/\[list\](.*?)\[\/list\]/ism", '
      $1
    ' ,$Text); $Text = preg_replace("/\[ul\](.*?)\[\/ul\]/ism", '
      $1
    ' @@ -168,7 +164,6 @@ upper-roman;">$2' ,$Text); lower-alpha;">$2' ,$Text); $Text = preg_replace("/\[list=((?-i)A)\](.*?)\[\/list\]/ism", '
      $2
    ' ,$Text); - $Text = preg_replace("/\[li\](.*?)\[\/li\]/sm", '
  • $1
  • ' ,$Text); $Text = preg_replace("/\[td\](.*?)\[\/td\]/sm", '
    ' ,$Text); $Text = preg_replace("/\[tr\](.*?)\[\/tr\]/sm", '$1' ,$Text); From 3e85c1d3304c51489249ce2a284910885a1a3c73 Mon Sep 17 00:00:00 2001 From: friendica Date: Sun, 12 Feb 2012 17:15:09 -0800 Subject: [PATCH 070/119] make 'x minutes ago' fully translateable with argument ordering. string update. --- include/bbcode.php | 2 +- include/datetime.php | 9 +- util/messages.po | 8114 ++++++++++++++++++++++-------------------- 3 files changed, 4167 insertions(+), 3958 deletions(-) diff --git a/include/bbcode.php b/include/bbcode.php index 6b733c8f43..e93cbf7d7f 100755 --- a/include/bbcode.php +++ b/include/bbcode.php @@ -11,7 +11,7 @@ function stripcode_br_cb($s) { function tryoembed($match){ $url = ((count($match)==2)?$match[1]:$match[2]); - logger("tryoembed: $url"); +// logger("tryoembed: $url"); $o = oembed_fetch_url($url); diff --git a/include/datetime.php b/include/datetime.php index d44e995cfa..6d395fe3f2 100755 --- a/include/datetime.php +++ b/include/datetime.php @@ -260,10 +260,11 @@ function relative_date($posted_date) { ); foreach ($a as $secs => $str) { - $d = $etime / $secs; - if ($d >= 1) { - $r = round($d); - return $r . ' ' . (($r == 1) ? $str[0] : $str[1]) . t(' ago'); + $d = $etime / $secs; + if ($d >= 1) { + $r = round($d); + // translators - e.g. 22 hours ago, 1 minute ago + return sprintf( t('%1$d %2$s ago'),$r, (($r == 1) ? $str[0] : $str[1])); } } }} diff --git a/util/messages.po b/util/messages.po index f553041b2b..6e1652b393 100755 --- a/util/messages.po +++ b/util/messages.po @@ -6,9 +6,9 @@ #, fuzzy msgid "" msgstr "" -"Project-Id-Version: 2.3.1221\n" +"Project-Id-Version: 2.3.1250\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2012-01-10 08:21-0800\n" +"POT-Creation-Date: 2012-02-12 17:14-0800\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -17,98 +17,2108 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" #"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n" -#: ../../mod/allfriends.php:9 ../../mod/follow.php:8 -#: ../../mod/contacts.php:117 ../../mod/settings.php:43 -#: ../../mod/settings.php:48 ../../mod/settings.php:403 -#: ../../mod/crepair.php:113 ../../mod/notifications.php:62 -#: ../../mod/message.php:9 ../../mod/message.php:46 -#: ../../mod/wall_upload.php:42 ../../mod/wall_attach.php:43 -#: ../../mod/profile_photo.php:19 ../../mod/profile_photo.php:137 -#: ../../mod/profile_photo.php:148 ../../mod/profile_photo.php:159 -#: ../../mod/manage.php:75 ../../mod/common.php:9 ../../mod/profiles.php:7 -#: ../../mod/profiles.php:229 ../../mod/invite.php:13 ../../mod/invite.php:81 -#: ../../mod/register.php:36 ../../mod/fsuggest.php:78 -#: ../../mod/editpost.php:10 ../../mod/regmod.php:111 -#: ../../mod/install.php:171 ../../mod/suggest.php:28 -#: ../../mod/display.php:111 ../../mod/notes.php:20 -#: ../../mod/dfrn_confirm.php:53 ../../mod/item.php:118 -#: ../../mod/photos.php:125 ../../mod/photos.php:860 ../../mod/network.php:6 -#: ../../mod/api.php:26 ../../mod/api.php:31 ../../mod/attach.php:33 -#: ../../mod/viewcontacts.php:21 ../../mod/group.php:19 -#: ../../mod/events.php:109 ../../index.php:288 ../../include/items.php:2867 -#: ../../addon/facebook/facebook.php:331 -msgid "Permission denied." +#: ../../mod/oexchange.php:27 +msgid "Post successful." msgstr "" -#: ../../mod/allfriends.php:34 -#, php-format -msgid "Friends of %s" -msgstr "" - -#: ../../mod/allfriends.php:40 -msgid "No friends to display." -msgstr "" - -#: ../../mod/update_profile.php:41 ../../mod/update_network.php:22 #: ../../mod/update_notes.php:41 ../../mod/update_community.php:18 +#: ../../mod/update_network.php:22 ../../mod/update_profile.php:41 msgid "[Embedded content - reload page to view]" msgstr "" -#: ../../mod/directory.php:31 ../../mod/dfrn_request.php:624 -#: ../../mod/community.php:16 ../../mod/display.php:7 ../../mod/search.php:71 -#: ../../mod/photos.php:754 ../../mod/viewcontacts.php:16 +#: ../../mod/crepair.php:102 +msgid "Contact settings applied." +msgstr "" + +#: ../../mod/crepair.php:104 +msgid "Contact update failed." +msgstr "" + +#: ../../mod/crepair.php:115 ../../mod/wall_attach.php:43 +#: ../../mod/fsuggest.php:78 ../../mod/events.php:109 ../../mod/api.php:26 +#: ../../mod/api.php:31 ../../mod/photos.php:129 ../../mod/photos.php:865 +#: ../../mod/editpost.php:10 ../../mod/install.php:171 +#: ../../mod/notifications.php:62 ../../mod/contacts.php:125 +#: ../../mod/settings.php:49 ../../mod/settings.php:404 +#: ../../mod/settings.php:409 ../../mod/manage.php:86 ../../mod/network.php:6 +#: ../../mod/notes.php:20 ../../mod/attach.php:33 ../../mod/group.php:19 +#: ../../mod/viewcontacts.php:21 ../../mod/register.php:36 +#: ../../mod/regmod.php:111 ../../mod/item.php:123 ../../mod/item.php:139 +#: ../../mod/profile_photo.php:19 ../../mod/profile_photo.php:137 +#: ../../mod/profile_photo.php:148 ../../mod/profile_photo.php:159 +#: ../../mod/message.php:9 ../../mod/message.php:46 ../../mod/allfriends.php:9 +#: ../../mod/wall_upload.php:42 ../../mod/follow.php:8 ../../mod/common.php:9 +#: ../../mod/display.php:112 ../../mod/profiles.php:7 +#: ../../mod/profiles.php:229 ../../mod/delegate.php:6 +#: ../../mod/suggest.php:28 ../../mod/invite.php:13 ../../mod/invite.php:81 +#: ../../mod/dfrn_confirm.php:53 ../../addon/facebook/facebook.php:331 +#: ../../include/items.php:2907 ../../index.php:288 +msgid "Permission denied." +msgstr "" + +#: ../../mod/crepair.php:129 ../../mod/fsuggest.php:20 +#: ../../mod/fsuggest.php:92 ../../mod/dfrn_confirm.php:118 +msgid "Contact not found." +msgstr "" + +#: ../../mod/crepair.php:135 +msgid "Repair Contact Settings" +msgstr "" + +#: ../../mod/crepair.php:137 +msgid "" +"WARNING: This is highly advanced and if you enter incorrect " +"information your communications with this contact may stop working." +msgstr "" + +#: ../../mod/crepair.php:138 +msgid "" +"Please use your browser 'Back' button now if you are " +"uncertain what to do on this page." +msgstr "" + +#: ../../mod/crepair.php:144 +msgid "Return to contact editor" +msgstr "" + +#: ../../mod/crepair.php:148 ../../mod/settings.php:455 +#: ../../mod/settings.php:481 ../../mod/admin.php:464 ../../mod/admin.php:473 +msgid "Name" +msgstr "" + +#: ../../mod/crepair.php:149 +msgid "Account Nickname" +msgstr "" + +#: ../../mod/crepair.php:150 +msgid "@Tagname - overrides Name/Nickname" +msgstr "" + +#: ../../mod/crepair.php:151 +msgid "Account URL" +msgstr "" + +#: ../../mod/crepair.php:152 +msgid "Friend Request URL" +msgstr "" + +#: ../../mod/crepair.php:153 +msgid "Friend Confirm URL" +msgstr "" + +#: ../../mod/crepair.php:154 +msgid "Notification Endpoint URL" +msgstr "" + +#: ../../mod/crepair.php:155 +msgid "Poll/Feed URL" +msgstr "" + +#: ../../mod/crepair.php:156 +msgid "New photo from this URL" +msgstr "" + +#: ../../mod/crepair.php:166 ../../mod/fsuggest.php:107 +#: ../../mod/events.php:333 ../../mod/photos.php:900 ../../mod/photos.php:958 +#: ../../mod/photos.php:1182 ../../mod/photos.php:1222 +#: ../../mod/photos.php:1262 ../../mod/photos.php:1293 +#: ../../mod/install.php:251 ../../mod/install.php:289 +#: ../../mod/localtime.php:45 ../../mod/contacts.php:319 +#: ../../mod/settings.php:453 ../../mod/settings.php:592 +#: ../../mod/settings.php:773 ../../mod/manage.php:109 ../../mod/group.php:84 +#: ../../mod/group.php:167 ../../mod/admin.php:296 ../../mod/admin.php:461 +#: ../../mod/admin.php:587 ../../mod/admin.php:652 ../../mod/profiles.php:375 +#: ../../mod/invite.php:106 ../../addon/facebook/facebook.php:410 +#: ../../addon/yourls/yourls.php:76 ../../addon/nsfw/nsfw.php:57 +#: ../../addon/uhremotestorage/uhremotestorage.php:89 +#: ../../addon/randplace/randplace.php:179 ../../addon/drpost/drpost.php:110 +#: ../../addon/geonames/geonames.php:187 ../../addon/oembed.old/oembed.php:41 +#: ../../addon/impressum/impressum.php:69 ../../addon/blockem/blockem.php:57 +#: ../../addon/editplain/editplain.php:84 ../../addon/blackout/blackout.php:94 +#: ../../addon/pageheader/pageheader.php:52 +#: ../../addon/statusnet/statusnet.php:280 +#: ../../addon/statusnet/statusnet.php:294 +#: ../../addon/statusnet/statusnet.php:320 +#: ../../addon/statusnet/statusnet.php:327 +#: ../../addon/statusnet/statusnet.php:349 +#: ../../addon/statusnet/statusnet.php:495 ../../addon/tumblr/tumblr.php:90 +#: ../../addon/numfriends/numfriends.php:85 ../../addon/wppost/wppost.php:102 +#: ../../addon/piwik/piwik.php:81 ../../addon/twitter/twitter.php:180 +#: ../../addon/twitter/twitter.php:203 ../../addon/twitter/twitter.php:315 +#: ../../addon/posterous/posterous.php:90 ../../include/conversation.php:515 +msgid "Submit" +msgstr "" + +#: ../../mod/help.php:30 +msgid "Help:" +msgstr "" + +#: ../../mod/help.php:34 ../../include/nav.php:82 +msgid "Help" +msgstr "" + +#: ../../mod/help.php:38 ../../index.php:221 +msgid "Not Found" +msgstr "" + +#: ../../mod/help.php:41 ../../index.php:224 +msgid "Page not found." +msgstr "" + +#: ../../mod/wall_attach.php:57 +#, php-format +msgid "File exceeds size limit of %d" +msgstr "" + +#: ../../mod/wall_attach.php:85 ../../mod/wall_attach.php:96 +msgid "File upload failed." +msgstr "" + +#: ../../mod/fsuggest.php:63 +msgid "Friend suggestion sent." +msgstr "" + +#: ../../mod/fsuggest.php:97 +msgid "Suggest Friends" +msgstr "" + +#: ../../mod/fsuggest.php:99 +#, php-format +msgid "Suggest a friend for %s" +msgstr "" + +#: ../../mod/events.php:61 +msgid "Event description and start time are required." +msgstr "" + +#: ../../mod/events.php:117 ../../include/nav.php:50 ../../boot.php:1345 +msgid "Events" +msgstr "" + +#: ../../mod/events.php:207 +msgid "Create New Event" +msgstr "" + +#: ../../mod/events.php:210 +msgid "Previous" +msgstr "" + +#: ../../mod/events.php:213 ../../mod/install.php:210 +msgid "Next" +msgstr "" + +#: ../../mod/events.php:220 +msgid "l, F j" +msgstr "" + +#: ../../mod/events.php:235 +msgid "Edit event" +msgstr "" + +#: ../../mod/events.php:237 ../../include/text.php:883 +msgid "link to source" +msgstr "" + +#: ../../mod/events.php:305 +msgid "hour:minute" +msgstr "" + +#: ../../mod/events.php:314 +msgid "Event details" +msgstr "" + +#: ../../mod/events.php:315 +#, php-format +msgid "Format is %s %s. Starting date and Description are required." +msgstr "" + +#: ../../mod/events.php:316 +msgid "Event Starts:" +msgstr "" + +#: ../../mod/events.php:319 +msgid "Finish date/time is not known or not relevant" +msgstr "" + +#: ../../mod/events.php:321 +msgid "Event Finishes:" +msgstr "" + +#: ../../mod/events.php:324 +msgid "Adjust for viewer timezone" +msgstr "" + +#: ../../mod/events.php:326 +msgid "Description:" +msgstr "" + +#: ../../mod/events.php:328 ../../include/event.php:37 +#: ../../include/bb2diaspora.php:271 ../../boot.php:976 +msgid "Location:" +msgstr "" + +#: ../../mod/events.php:330 +msgid "Share this event" +msgstr "" + +#: ../../mod/tagrm.php:11 ../../mod/tagrm.php:94 +#: ../../mod/dfrn_request.php:685 ../../mod/settings.php:454 +#: ../../mod/settings.php:480 ../../addon/js_upload/js_upload.php:45 +msgid "Cancel" +msgstr "" + +#: ../../mod/tagrm.php:41 +msgid "Tag removed" +msgstr "" + +#: ../../mod/tagrm.php:79 +msgid "Remove Item Tag" +msgstr "" + +#: ../../mod/tagrm.php:81 +msgid "Select a tag to remove: " +msgstr "" + +#: ../../mod/tagrm.php:93 ../../mod/delegate.php:130 +msgid "Remove" +msgstr "" + +#: ../../mod/dfrn_poll.php:91 ../../mod/dfrn_poll.php:517 +#, php-format +msgid "%s welcomes %s" +msgstr "" + +#: ../../mod/api.php:76 ../../mod/api.php:102 +msgid "Authorize application connection" +msgstr "" + +#: ../../mod/api.php:77 +msgid "Return to your app and insert this Securty Code:" +msgstr "" + +#: ../../mod/api.php:89 +msgid "Please login to continue." +msgstr "" + +#: ../../mod/api.php:104 +msgid "" +"Do you want to authorize this application to access your posts and contacts, " +"and/or create new posts for you?" +msgstr "" + +#: ../../mod/api.php:105 ../../mod/dfrn_request.php:675 +#: ../../mod/settings.php:681 ../../mod/settings.php:687 +#: ../../mod/settings.php:695 ../../mod/settings.php:699 +#: ../../mod/settings.php:704 ../../mod/settings.php:710 +#: ../../mod/settings.php:716 ../../mod/settings.php:763 +#: ../../mod/settings.php:764 ../../mod/settings.php:765 +#: ../../mod/settings.php:766 ../../mod/register.php:524 +#: ../../mod/profiles.php:357 +msgid "Yes" +msgstr "" + +#: ../../mod/api.php:106 ../../mod/dfrn_request.php:676 +#: ../../mod/settings.php:681 ../../mod/settings.php:687 +#: ../../mod/settings.php:695 ../../mod/settings.php:699 +#: ../../mod/settings.php:704 ../../mod/settings.php:710 +#: ../../mod/settings.php:716 ../../mod/settings.php:763 +#: ../../mod/settings.php:764 ../../mod/settings.php:765 +#: ../../mod/settings.php:766 ../../mod/register.php:525 +#: ../../mod/profiles.php:358 +msgid "No" +msgstr "" + +#: ../../mod/photos.php:42 +msgid "Photo Albums" +msgstr "" + +#: ../../mod/photos.php:50 ../../mod/photos.php:150 ../../mod/photos.php:879 +#: ../../mod/photos.php:950 ../../mod/photos.php:965 ../../mod/photos.php:1371 +#: ../../mod/photos.php:1383 ../../addon/communityhome/communityhome.php:110 +msgid "Contact Photos" +msgstr "" + +#: ../../mod/photos.php:57 ../../mod/photos.php:975 ../../mod/photos.php:1413 +msgid "Upload New Photos" +msgstr "" + +#: ../../mod/photos.php:68 ../../mod/settings.php:11 +msgid "everybody" +msgstr "" + +#: ../../mod/photos.php:139 +msgid "Contact information unavailable" +msgstr "" + +#: ../../mod/photos.php:150 ../../mod/photos.php:597 ../../mod/photos.php:950 +#: ../../mod/photos.php:965 ../../mod/register.php:327 +#: ../../mod/register.php:334 ../../mod/register.php:341 +#: ../../mod/profile_photo.php:58 ../../mod/profile_photo.php:65 +#: ../../mod/profile_photo.php:72 ../../mod/profile_photo.php:170 +#: ../../mod/profile_photo.php:246 ../../mod/profile_photo.php:255 +#: ../../addon/communityhome/communityhome.php:111 +msgid "Profile Photos" +msgstr "" + +#: ../../mod/photos.php:160 +msgid "Album not found." +msgstr "" + +#: ../../mod/photos.php:178 ../../mod/photos.php:959 +msgid "Delete Album" +msgstr "" + +#: ../../mod/photos.php:241 ../../mod/photos.php:1183 +msgid "Delete Photo" +msgstr "" + +#: ../../mod/photos.php:528 +msgid "was tagged in a" +msgstr "" + +#: ../../mod/photos.php:528 ../../mod/like.php:127 ../../mod/tagger.php:70 +#: ../../addon/communityhome/communityhome.php:163 +#: ../../include/diaspora.php:1587 ../../include/conversation.php:31 +#: ../../include/conversation.php:104 +msgid "photo" +msgstr "" + +#: ../../mod/photos.php:528 +msgid "by" +msgstr "" + +#: ../../mod/photos.php:631 ../../addon/js_upload/js_upload.php:312 +msgid "Image exceeds size limit of " +msgstr "" + +#: ../../mod/photos.php:639 +msgid "Image file is empty." +msgstr "" + +#: ../../mod/photos.php:653 ../../mod/profile_photo.php:122 +#: ../../mod/wall_upload.php:65 +msgid "Unable to process image." +msgstr "" + +#: ../../mod/photos.php:673 ../../mod/profile_photo.php:251 +#: ../../mod/wall_upload.php:84 +msgid "Image upload failed." +msgstr "" + +#: ../../mod/photos.php:759 ../../mod/community.php:16 +#: ../../mod/dfrn_request.php:624 ../../mod/viewcontacts.php:16 +#: ../../mod/display.php:7 ../../mod/search.php:71 ../../mod/directory.php:31 msgid "Public access denied." msgstr "" -#: ../../mod/directory.php:49 -msgid "Global Directory" +#: ../../mod/photos.php:769 +msgid "No photos selected" msgstr "" -#: ../../mod/directory.php:55 -msgid "Normal site view" +#: ../../mod/photos.php:846 +msgid "Access to this item is restricted." msgstr "" -#: ../../mod/directory.php:57 -msgid "Admin - View all site entries" +#: ../../mod/photos.php:907 +msgid "Upload Photos" msgstr "" -#: ../../mod/directory.php:63 -msgid "Find on this site" +#: ../../mod/photos.php:910 ../../mod/photos.php:954 +msgid "New album name: " msgstr "" -#: ../../mod/directory.php:65 ../../mod/contacts.php:372 +#: ../../mod/photos.php:911 +msgid "or existing album name: " +msgstr "" + +#: ../../mod/photos.php:912 +msgid "Do not show a status post for this upload" +msgstr "" + +#: ../../mod/photos.php:914 ../../mod/photos.php:1178 +msgid "Permissions" +msgstr "" + +#: ../../mod/photos.php:969 +msgid "Edit Album" +msgstr "" + +#: ../../mod/photos.php:984 ../../mod/photos.php:1396 +msgid "View Photo" +msgstr "" + +#: ../../mod/photos.php:1019 +msgid "Permission denied. Access to this item may be restricted." +msgstr "" + +#: ../../mod/photos.php:1021 +msgid "Photo not available" +msgstr "" + +#: ../../mod/photos.php:1071 +msgid "View photo" +msgstr "" + +#: ../../mod/photos.php:1071 +msgid "Edit photo" +msgstr "" + +#: ../../mod/photos.php:1072 +msgid "Use as profile photo" +msgstr "" + +#: ../../mod/photos.php:1078 ../../include/conversation.php:450 +msgid "Private Message" +msgstr "" + +#: ../../mod/photos.php:1089 +msgid "View Full Size" +msgstr "" + +#: ../../mod/photos.php:1157 +msgid "Tags: " +msgstr "" + +#: ../../mod/photos.php:1160 +msgid "[Remove any tag]" +msgstr "" + +#: ../../mod/photos.php:1171 +msgid "New album name" +msgstr "" + +#: ../../mod/photos.php:1174 +msgid "Caption" +msgstr "" + +#: ../../mod/photos.php:1176 +msgid "Add a Tag" +msgstr "" + +#: ../../mod/photos.php:1180 +msgid "Example: @bob, @Barbara_Jensen, @jim@example.com, #California, #camping" +msgstr "" + +#: ../../mod/photos.php:1200 ../../include/conversation.php:497 +msgid "I like this (toggle)" +msgstr "" + +#: ../../mod/photos.php:1201 ../../include/conversation.php:498 +msgid "I don't like this (toggle)" +msgstr "" + +#: ../../mod/photos.php:1202 ../../include/conversation.php:889 +msgid "Share" +msgstr "" + +#: ../../mod/photos.php:1203 ../../mod/editpost.php:100 +#: ../../mod/message.php:155 ../../mod/message.php:296 +#: ../../include/conversation.php:321 ../../include/conversation.php:652 +#: ../../include/conversation.php:906 +msgid "Please wait" +msgstr "" + +#: ../../mod/photos.php:1219 ../../mod/photos.php:1259 +#: ../../mod/photos.php:1290 ../../include/conversation.php:512 +msgid "This is you" +msgstr "" + +#: ../../mod/photos.php:1221 ../../mod/photos.php:1261 +#: ../../mod/photos.php:1292 ../../include/conversation.php:514 +#: ../../boot.php:443 +msgid "Comment" +msgstr "" + +#: ../../mod/photos.php:1223 ../../mod/editpost.php:119 +#: ../../include/conversation.php:516 ../../include/conversation.php:924 +msgid "Preview" +msgstr "" + +#: ../../mod/photos.php:1320 ../../mod/settings.php:513 +#: ../../mod/group.php:154 ../../mod/admin.php:468 +#: ../../include/conversation.php:280 ../../include/conversation.php:536 +msgid "Delete" +msgstr "" + +#: ../../mod/photos.php:1402 +msgid "View Album" +msgstr "" + +#: ../../mod/photos.php:1411 +msgid "Recent Photos" +msgstr "" + +#: ../../mod/community.php:21 +msgid "Not available." +msgstr "" + +#: ../../mod/community.php:30 ../../include/nav.php:97 +msgid "Community" +msgstr "" + +#: ../../mod/community.php:60 ../../mod/search.php:118 +msgid "No results." +msgstr "" + +#: ../../mod/friendica.php:43 +msgid "This is Friendica, version" +msgstr "" + +#: ../../mod/friendica.php:44 +msgid "running at web location" +msgstr "" + +#: ../../mod/friendica.php:46 +msgid "" +"Please visit Friendica.com to learn " +"more about the Friendica project." +msgstr "" + +#: ../../mod/friendica.php:48 +msgid "Bug reports and issues: please visit" +msgstr "" + +#: ../../mod/friendica.php:49 +msgid "" +"Suggestions, praise, donations, etc. - please email \"Info\" at Friendica - " +"dot com" +msgstr "" + +#: ../../mod/friendica.php:54 +msgid "Installed plugins/addons/apps" +msgstr "" + +#: ../../mod/friendica.php:62 +msgid "No installed plugins/addons/apps" +msgstr "" + +#: ../../mod/editpost.php:17 ../../mod/editpost.php:27 +msgid "Item not found" +msgstr "" + +#: ../../mod/editpost.php:32 +msgid "Edit post" +msgstr "" + +#: ../../mod/editpost.php:76 ../../include/conversation.php:875 +msgid "Post to Email" +msgstr "" + +#: ../../mod/editpost.php:91 ../../mod/settings.php:512 +#: ../../include/conversation.php:523 +msgid "Edit" +msgstr "" + +#: ../../mod/editpost.php:92 ../../mod/message.php:153 +#: ../../mod/message.php:294 ../../include/conversation.php:890 +msgid "Upload photo" +msgstr "" + +#: ../../mod/editpost.php:93 ../../include/conversation.php:892 +msgid "Attach file" +msgstr "" + +#: ../../mod/editpost.php:94 ../../mod/message.php:154 +#: ../../mod/message.php:295 ../../include/conversation.php:894 +msgid "Insert web link" +msgstr "" + +#: ../../mod/editpost.php:95 +msgid "Insert YouTube video" +msgstr "" + +#: ../../mod/editpost.php:96 +msgid "Insert Vorbis [.ogg] video" +msgstr "" + +#: ../../mod/editpost.php:97 +msgid "Insert Vorbis [.ogg] audio" +msgstr "" + +#: ../../mod/editpost.php:98 ../../include/conversation.php:900 +msgid "Set your location" +msgstr "" + +#: ../../mod/editpost.php:99 ../../include/conversation.php:902 +msgid "Clear browser location" +msgstr "" + +#: ../../mod/editpost.php:101 ../../include/conversation.php:907 +msgid "Permission settings" +msgstr "" + +#: ../../mod/editpost.php:109 ../../include/conversation.php:916 +msgid "CC: email addresses" +msgstr "" + +#: ../../mod/editpost.php:110 ../../include/conversation.php:917 +msgid "Public post" +msgstr "" + +#: ../../mod/editpost.php:113 ../../include/conversation.php:905 +msgid "Set title" +msgstr "" + +#: ../../mod/editpost.php:114 ../../include/conversation.php:919 +msgid "Example: bob@example.com, mary@example.com" +msgstr "" + +#: ../../mod/dfrn_request.php:92 +msgid "This introduction has already been accepted." +msgstr "" + +#: ../../mod/dfrn_request.php:116 ../../mod/dfrn_request.php:381 +msgid "Profile location is not valid or does not contain profile information." +msgstr "" + +#: ../../mod/dfrn_request.php:121 ../../mod/dfrn_request.php:386 +msgid "Warning: profile location has no identifiable owner name." +msgstr "" + +#: ../../mod/dfrn_request.php:123 ../../mod/dfrn_request.php:388 +msgid "Warning: profile location has no profile photo." +msgstr "" + +#: ../../mod/dfrn_request.php:126 ../../mod/dfrn_request.php:391 +#, php-format +msgid "%d required parameter was not found at the given location" +msgid_plural "%d required parameters were not found at the given location" +msgstr[0] "" +msgstr[1] "" + +#: ../../mod/dfrn_request.php:167 +msgid "Introduction complete." +msgstr "" + +#: ../../mod/dfrn_request.php:191 +msgid "Unrecoverable protocol error." +msgstr "" + +#: ../../mod/dfrn_request.php:219 +msgid "Profile unavailable." +msgstr "" + +#: ../../mod/dfrn_request.php:244 +#, php-format +msgid "%s has received too many connection requests today." +msgstr "" + +#: ../../mod/dfrn_request.php:245 +msgid "Spam protection measures have been invoked." +msgstr "" + +#: ../../mod/dfrn_request.php:246 +msgid "Friends are advised to please try again in 24 hours." +msgstr "" + +#: ../../mod/dfrn_request.php:306 +msgid "Invalid locator" +msgstr "" + +#: ../../mod/dfrn_request.php:326 +msgid "Unable to resolve your name at the provided location." +msgstr "" + +#: ../../mod/dfrn_request.php:339 +msgid "You have already introduced yourself here." +msgstr "" + +#: ../../mod/dfrn_request.php:343 +#, php-format +msgid "Apparently you are already friends with %s." +msgstr "" + +#: ../../mod/dfrn_request.php:364 +msgid "Invalid profile URL." +msgstr "" + +#: ../../mod/dfrn_request.php:370 ../../mod/follow.php:20 +msgid "Disallowed profile URL." +msgstr "" + +#: ../../mod/dfrn_request.php:439 ../../mod/contacts.php:102 +msgid "Failed to update contact record." +msgstr "" + +#: ../../mod/dfrn_request.php:460 +msgid "Your introduction has been sent." +msgstr "" + +#: ../../mod/dfrn_request.php:513 +msgid "Please login to confirm introduction." +msgstr "" + +#: ../../mod/dfrn_request.php:527 +msgid "" +"Incorrect identity currently logged in. Please login to this profile." +msgstr "" + +#: ../../mod/dfrn_request.php:539 +#, php-format +msgid "Welcome home %s." +msgstr "" + +#: ../../mod/dfrn_request.php:540 +#, php-format +msgid "Please confirm your introduction/connection request to %s." +msgstr "" + +#: ../../mod/dfrn_request.php:541 +msgid "Confirm" +msgstr "" + +#: ../../mod/dfrn_request.php:581 ../../include/items.php:2443 +msgid "[Name Withheld]" +msgstr "" + +#: ../../mod/dfrn_request.php:665 +#, php-format +msgid "" +"Diaspora members: Please do not use this form. Instead, enter \"%s\" into " +"your Diaspora search bar." +msgstr "" + +#: ../../mod/dfrn_request.php:668 +msgid "" +"Please enter your 'Identity Address' from one of the following supported " +"social networks:" +msgstr "" + +#: ../../mod/dfrn_request.php:671 +msgid "Friend/Connection Request" +msgstr "" + +#: ../../mod/dfrn_request.php:672 +msgid "" +"Examples: jojo@demo.friendica.com, http://demo.friendica.com/profile/jojo, " +"testuser@identi.ca" +msgstr "" + +#: ../../mod/dfrn_request.php:673 +msgid "Please answer the following:" +msgstr "" + +#: ../../mod/dfrn_request.php:674 +#, php-format +msgid "Does %s know you?" +msgstr "" + +#: ../../mod/dfrn_request.php:677 +msgid "Add a personal note:" +msgstr "" + +#: ../../mod/dfrn_request.php:679 ../../include/contact_selectors.php:76 +msgid "Friendica" +msgstr "" + +#: ../../mod/dfrn_request.php:680 +msgid "StatusNet/Federated Social Web" +msgstr "" + +#: ../../mod/dfrn_request.php:681 ../../mod/settings.php:548 +#: ../../include/contact_selectors.php:80 +msgid "Diaspora" +msgstr "" + +#: ../../mod/dfrn_request.php:682 +msgid "- please share from your own site as noted above" +msgstr "" + +#: ../../mod/dfrn_request.php:683 +msgid "Your Identity Address:" +msgstr "" + +#: ../../mod/dfrn_request.php:684 +msgid "Submit Request" +msgstr "" + +#: ../../mod/install.php:111 +msgid "Friendica Social Communications Server - Setup" +msgstr "" + +#: ../../mod/install.php:117 ../../mod/install.php:157 +#: ../../mod/install.php:230 +msgid "Database connection" +msgstr "" + +#: ../../mod/install.php:124 +msgid "Could not connect to database." +msgstr "" + +#: ../../mod/install.php:128 +msgid "Could not create table." +msgstr "" + +#: ../../mod/install.php:133 +msgid "Your Friendica site database has been installed." +msgstr "" + +#: ../../mod/install.php:134 +msgid "" +"IMPORTANT: You will need to [manually] setup a scheduled task for the poller." +msgstr "" + +#: ../../mod/install.php:135 ../../mod/install.php:151 +#: ../../mod/install.php:209 +msgid "Please see the file \"INSTALL.txt\"." +msgstr "" + +#: ../../mod/install.php:137 +msgid "Proceed to registration" +msgstr "" + +#: ../../mod/install.php:143 +msgid "Proceed with Installation" +msgstr "" + +#: ../../mod/install.php:150 +msgid "" +"You may need to import the file \"database.sql\" manually using phpmyadmin " +"or mysql." +msgstr "" + +#: ../../mod/install.php:158 +msgid "Database import failed." +msgstr "" + +#: ../../mod/install.php:206 +msgid "System check" +msgstr "" + +#: ../../mod/install.php:211 +msgid "Check again" +msgstr "" + +#: ../../mod/install.php:231 +msgid "" +"In order to install Friendica we need to know how to connect to your " +"database." +msgstr "" + +#: ../../mod/install.php:232 +msgid "" +"Please contact your hosting provider or site administrator if you have " +"questions about these settings." +msgstr "" + +#: ../../mod/install.php:233 +msgid "" +"The database you specify below should already exist. If it does not, please " +"create it before continuing." +msgstr "" + +#: ../../mod/install.php:237 +msgid "Database Server Name" +msgstr "" + +#: ../../mod/install.php:238 +msgid "Database Login Name" +msgstr "" + +#: ../../mod/install.php:239 +msgid "Database Login Password" +msgstr "" + +#: ../../mod/install.php:240 +msgid "Database Name" +msgstr "" + +#: ../../mod/install.php:241 ../../mod/install.php:280 +msgid "Site administrator email address" +msgstr "" + +#: ../../mod/install.php:241 ../../mod/install.php:280 +msgid "" +"Your account email address must match this in order to use the web admin " +"panel." +msgstr "" + +#: ../../mod/install.php:245 ../../mod/install.php:283 +msgid "Please select a default timezone for your website" +msgstr "" + +#: ../../mod/install.php:270 +msgid "Site settings" +msgstr "" + +#: ../../mod/install.php:323 +msgid "Could not find a command line version of PHP in the web server PATH." +msgstr "" + +#: ../../mod/install.php:326 +msgid "PHP executable path" +msgstr "" + +#: ../../mod/install.php:326 +msgid "Enter full path to php executable" +msgstr "" + +#: ../../mod/install.php:331 +msgid "Command line PHP" +msgstr "" + +#: ../../mod/install.php:340 +msgid "" +"The command line version of PHP on your system does not have " +"\"register_argc_argv\" enabled." +msgstr "" + +#: ../../mod/install.php:341 +msgid "This is required for message delivery to work." +msgstr "" + +#: ../../mod/install.php:343 +msgid "PHP \"register_argc_argv\"" +msgstr "" + +#: ../../mod/install.php:364 +msgid "" +"Error: the \"openssl_pkey_new\" function on this system is not able to " +"generate encryption keys" +msgstr "" + +#: ../../mod/install.php:365 +msgid "" +"If running under Windows, please see \"http://www.php.net/manual/en/openssl." +"installation.php\"." +msgstr "" + +#: ../../mod/install.php:367 +msgid "Generate encryption keys" +msgstr "" + +#: ../../mod/install.php:374 +msgid "libCurl PHP module" +msgstr "" + +#: ../../mod/install.php:375 +msgid "GD graphics PHP module" +msgstr "" + +#: ../../mod/install.php:376 +msgid "OpenSSL PHP module" +msgstr "" + +#: ../../mod/install.php:377 +msgid "mysqli PHP module" +msgstr "" + +#: ../../mod/install.php:378 +msgid "mb_string PHP module" +msgstr "" + +#: ../../mod/install.php:383 ../../mod/install.php:385 +msgid "Apace mod_rewrite module" +msgstr "" + +#: ../../mod/install.php:383 +msgid "" +"Error: Apache webserver mod-rewrite module is required but not installed." +msgstr "" + +#: ../../mod/install.php:390 +msgid "Error: libCURL PHP module required but not installed." +msgstr "" + +#: ../../mod/install.php:394 +msgid "" +"Error: GD graphics PHP module with JPEG support required but not installed." +msgstr "" + +#: ../../mod/install.php:398 +msgid "Error: openssl PHP module required but not installed." +msgstr "" + +#: ../../mod/install.php:402 +msgid "Error: mysqli PHP module required but not installed." +msgstr "" + +#: ../../mod/install.php:406 +msgid "Error: mb_string PHP module required but not installed." +msgstr "" + +#: ../../mod/install.php:423 +msgid "" +"The web installer needs to be able to create a file called \".htconfig.php\" " +"in the top folder of your web server and it is unable to do so." +msgstr "" + +#: ../../mod/install.php:424 +msgid "" +"This is most often a permission setting, as the web server may not be able " +"to write files in your folder - even if you can." +msgstr "" + +#: ../../mod/install.php:425 +msgid "" +"Please check with your site documentation or support people to see if this " +"situation can be corrected." +msgstr "" + +#: ../../mod/install.php:426 +msgid "" +"If not, you may be required to perform a manual installation. Please see the " +"file \"INSTALL.txt\" for instructions." +msgstr "" + +#: ../../mod/install.php:429 +msgid ".htconfig.php is writable" +msgstr "" + +#: ../../mod/install.php:436 +msgid "" +"The database configuration file \".htconfig.php\" could not be written. " +"Please use the enclosed text to create a configuration file in your web " +"server root." +msgstr "" + +#: ../../mod/install.php:461 +msgid "Errors encountered creating database tables." +msgstr "" + +#: ../../mod/localtime.php:12 ../../include/event.php:11 +#: ../../include/bb2diaspora.php:249 +msgid "l F d, Y \\@ g:i A" +msgstr "" + +#: ../../mod/localtime.php:24 +msgid "Time Conversion" +msgstr "" + +#: ../../mod/localtime.php:26 +msgid "" +"Friendika provides this service for sharing events with other networks and " +"friends in unknown timezones." +msgstr "" + +#: ../../mod/localtime.php:30 +#, php-format +msgid "UTC time: %s" +msgstr "" + +#: ../../mod/localtime.php:33 +#, php-format +msgid "Current timezone: %s" +msgstr "" + +#: ../../mod/localtime.php:36 +#, php-format +msgid "Converted localtime: %s" +msgstr "" + +#: ../../mod/localtime.php:41 +msgid "Please select your timezone:" +msgstr "" + +#: ../../mod/match.php:12 +msgid "Profile Match" +msgstr "" + +#: ../../mod/match.php:20 +msgid "No keywords to match. Please add keywords to your default profile." +msgstr "" + +#: ../../mod/match.php:57 +msgid "is interested in:" +msgstr "" + +#: ../../mod/match.php:58 ../../mod/suggest.php:59 +#: ../../include/contact_widgets.php:9 ../../boot.php:926 +msgid "Connect" +msgstr "" + +#: ../../mod/match.php:65 ../../mod/dirfind.php:57 +msgid "No matches" +msgstr "" + +#: ../../mod/lockview.php:39 +msgid "Remote privacy information not available." +msgstr "" + +#: ../../mod/lockview.php:43 +msgid "Visible to:" +msgstr "" + +#: ../../mod/home.php:26 ../../addon/communityhome/communityhome.php:179 +#, php-format +msgid "Welcome to %s" +msgstr "" + +#: ../../mod/notifications.php:26 +msgid "Invalid request identifier." +msgstr "" + +#: ../../mod/notifications.php:35 ../../mod/notifications.php:152 +#: ../../mod/notifications.php:198 +msgid "Discard" +msgstr "" + +#: ../../mod/notifications.php:47 ../../mod/notifications.php:151 +#: ../../mod/notifications.php:197 ../../mod/contacts.php:302 +#: ../../mod/contacts.php:345 +msgid "Ignore" +msgstr "" + +#: ../../mod/notifications.php:71 ../../include/nav.php:109 +msgid "Network" +msgstr "" + +#: ../../mod/notifications.php:76 ../../mod/network.php:177 +msgid "Personal" +msgstr "" + +#: ../../mod/notifications.php:81 ../../include/nav.php:73 +#: ../../include/nav.php:111 +msgid "Home" +msgstr "" + +#: ../../mod/notifications.php:86 ../../include/nav.php:117 +msgid "Introductions" +msgstr "" + +#: ../../mod/notifications.php:91 ../../mod/message.php:76 +#: ../../include/nav.php:123 +msgid "Messages" +msgstr "" + +#: ../../mod/notifications.php:110 +msgid "Show Ignored Requests" +msgstr "" + +#: ../../mod/notifications.php:110 +msgid "Hide Ignored Requests" +msgstr "" + +#: ../../mod/notifications.php:136 ../../mod/notifications.php:182 +msgid "Notification type: " +msgstr "" + +#: ../../mod/notifications.php:137 +msgid "Friend Suggestion" +msgstr "" + +#: ../../mod/notifications.php:139 +#, php-format +msgid "suggested by %s" +msgstr "" + +#: ../../mod/notifications.php:144 ../../mod/notifications.php:191 +#: ../../mod/contacts.php:350 +msgid "Hide this contact from others" +msgstr "" + +#: ../../mod/notifications.php:145 ../../mod/notifications.php:192 +msgid "Post a new friend activity" +msgstr "" + +#: ../../mod/notifications.php:145 ../../mod/notifications.php:192 +msgid "if applicable" +msgstr "" + +#: ../../mod/notifications.php:148 ../../mod/notifications.php:195 +#: ../../mod/admin.php:466 +msgid "Approve" +msgstr "" + +#: ../../mod/notifications.php:168 +msgid "Claims to be known to you: " +msgstr "" + +#: ../../mod/notifications.php:168 +msgid "yes" +msgstr "" + +#: ../../mod/notifications.php:168 +msgid "no" +msgstr "" + +#: ../../mod/notifications.php:175 +msgid "Approve as: " +msgstr "" + +#: ../../mod/notifications.php:176 +msgid "Friend" +msgstr "" + +#: ../../mod/notifications.php:177 +msgid "Sharer" +msgstr "" + +#: ../../mod/notifications.php:177 +msgid "Fan/Admirer" +msgstr "" + +#: ../../mod/notifications.php:183 +msgid "Friend/Connect Request" +msgstr "" + +#: ../../mod/notifications.php:183 +msgid "New Follower" +msgstr "" + +#: ../../mod/notifications.php:204 +msgid "No introductions." +msgstr "" + +#: ../../mod/notifications.php:207 ../../mod/notifications.php:293 +#: ../../mod/notifications.php:388 ../../mod/notifications.php:469 +#: ../../include/nav.php:118 +msgid "Notifications" +msgstr "" + +#: ../../mod/notifications.php:244 ../../mod/notifications.php:339 +#: ../../mod/notifications.php:426 +#, php-format +msgid "%s liked %s's post" +msgstr "" + +#: ../../mod/notifications.php:253 ../../mod/notifications.php:348 +#: ../../mod/notifications.php:435 +#, php-format +msgid "%s disliked %s's post" +msgstr "" + +#: ../../mod/notifications.php:267 ../../mod/notifications.php:362 +#: ../../mod/notifications.php:449 +#, php-format +msgid "%s is now friends with %s" +msgstr "" + +#: ../../mod/notifications.php:274 ../../mod/notifications.php:369 +#, php-format +msgid "%s created a new post" +msgstr "" + +#: ../../mod/notifications.php:275 ../../mod/notifications.php:370 +#: ../../mod/notifications.php:458 +#, php-format +msgid "%s commented on %s's post" +msgstr "" + +#: ../../mod/notifications.php:289 +msgid "No more network notifications." +msgstr "" + +#: ../../mod/notifications.php:384 +msgid "No more personal notifications." +msgstr "" + +#: ../../mod/notifications.php:465 +msgid "No more home notifications." +msgstr "" + +#: ../../mod/contacts.php:63 ../../mod/contacts.php:143 +msgid "Could not access contact record." +msgstr "" + +#: ../../mod/contacts.php:77 +msgid "Could not locate selected profile." +msgstr "" + +#: ../../mod/contacts.php:100 +msgid "Contact updated." +msgstr "" + +#: ../../mod/contacts.php:165 +msgid "Contact has been blocked" +msgstr "" + +#: ../../mod/contacts.php:165 +msgid "Contact has been unblocked" +msgstr "" + +#: ../../mod/contacts.php:179 +msgid "Contact has been ignored" +msgstr "" + +#: ../../mod/contacts.php:179 +msgid "Contact has been unignored" +msgstr "" + +#: ../../mod/contacts.php:200 +msgid "stopped following" +msgstr "" + +#: ../../mod/contacts.php:221 +msgid "Contact has been removed." +msgstr "" + +#: ../../mod/contacts.php:245 +#, php-format +msgid "You are mutual friends with %s" +msgstr "" + +#: ../../mod/contacts.php:249 +#, php-format +msgid "You are sharing with %s" +msgstr "" + +#: ../../mod/contacts.php:254 +#, php-format +msgid "%s is sharing with you" +msgstr "" + +#: ../../mod/contacts.php:271 +msgid "Private communications are not available for this contact." +msgstr "" + +#: ../../mod/contacts.php:274 +msgid "Never" +msgstr "" + +#: ../../mod/contacts.php:278 +msgid "(Update was successful)" +msgstr "" + +#: ../../mod/contacts.php:278 +msgid "(Update was not successful)" +msgstr "" + +#: ../../mod/contacts.php:280 +msgid "Suggest friends" +msgstr "" + +#: ../../mod/contacts.php:284 +#, php-format +msgid "Network type: %s" +msgstr "" + +#: ../../mod/contacts.php:287 +#, php-format +msgid "%d contact in common" +msgid_plural "%d contacts in common" +msgstr[0] "" +msgstr[1] "" + +#: ../../mod/contacts.php:292 +msgid "View all contacts" +msgstr "" + +#: ../../mod/contacts.php:297 ../../mod/contacts.php:344 +#: ../../mod/admin.php:470 +msgid "Unblock" +msgstr "" + +#: ../../mod/contacts.php:297 ../../mod/contacts.php:344 +#: ../../mod/admin.php:469 +msgid "Block" +msgstr "" + +#: ../../mod/contacts.php:302 ../../mod/contacts.php:345 +msgid "Unignore" +msgstr "" + +#: ../../mod/contacts.php:307 +msgid "Repair" +msgstr "" + +#: ../../mod/contacts.php:317 +msgid "Contact Editor" +msgstr "" + +#: ../../mod/contacts.php:320 +msgid "Profile Visibility" +msgstr "" + +#: ../../mod/contacts.php:321 +#, php-format +msgid "" +"Please choose the profile you would like to display to %s when viewing your " +"profile securely." +msgstr "" + +#: ../../mod/contacts.php:322 +msgid "Contact Information / Notes" +msgstr "" + +#: ../../mod/contacts.php:323 +msgid "Edit contact notes" +msgstr "" + +#: ../../mod/contacts.php:328 ../../mod/contacts.php:458 +#: ../../mod/viewcontacts.php:61 +#, php-format +msgid "Visit %s's profile [%s]" +msgstr "" + +#: ../../mod/contacts.php:329 +msgid "Block/Unblock contact" +msgstr "" + +#: ../../mod/contacts.php:330 +msgid "Ignore contact" +msgstr "" + +#: ../../mod/contacts.php:331 +msgid "Repair URL settings" +msgstr "" + +#: ../../mod/contacts.php:332 +msgid "View conversations" +msgstr "" + +#: ../../mod/contacts.php:334 +msgid "Delete contact" +msgstr "" + +#: ../../mod/contacts.php:338 +msgid "Last update:" +msgstr "" + +#: ../../mod/contacts.php:339 +msgid "Update public posts" +msgstr "" + +#: ../../mod/contacts.php:341 ../../mod/admin.php:701 +msgid "Update now" +msgstr "" + +#: ../../mod/contacts.php:348 +msgid "Currently blocked" +msgstr "" + +#: ../../mod/contacts.php:349 +msgid "Currently ignored" +msgstr "" + +#: ../../mod/contacts.php:350 +msgid "" +"Replies/likes to your public posts may still be visible" +msgstr "" + +#: ../../mod/contacts.php:387 ../../include/nav.php:131 +msgid "Contacts" +msgstr "" + +#: ../../mod/contacts.php:389 +msgid "Show Unblocked Contacts" +msgstr "" + +#: ../../mod/contacts.php:389 +msgid "Show Blocked Contacts" +msgstr "" + +#: ../../mod/contacts.php:391 +msgid "Show All Contacts" +msgstr "" + +#: ../../mod/contacts.php:393 +msgid "Search your contacts" +msgstr "" + +#: ../../mod/contacts.php:394 ../../mod/directory.php:65 msgid "Finding: " msgstr "" -#: ../../mod/directory.php:66 -msgid "Site Directory" -msgstr "" - -#: ../../mod/directory.php:67 ../../mod/contacts.php:373 +#: ../../mod/contacts.php:395 ../../mod/directory.php:67 #: ../../include/contact_widgets.php:34 msgid "Find" msgstr "" -#: ../../mod/directory.php:122 ../../mod/profiles.php:426 -msgid "Age: " +#: ../../mod/contacts.php:434 +msgid "Mutual Friendship" msgstr "" -#: ../../mod/directory.php:125 -msgid "Gender: " +#: ../../mod/contacts.php:438 +msgid "is a fan of yours" msgstr "" -#: ../../mod/directory.php:151 -msgid "No entries (some entries may be hidden)." +#: ../../mod/contacts.php:442 +msgid "you are a fan of" msgstr "" -#: ../../mod/notice.php:15 ../../mod/viewsrc.php:15 ../../mod/admin.php:111 -#: ../../mod/admin.php:502 ../../mod/display.php:28 ../../mod/display.php:115 -#: ../../include/items.php:2779 -msgid "Item not found." +#: ../../mod/contacts.php:459 ../../include/Contact.php:135 +#: ../../include/conversation.php:748 +msgid "Edit contact" msgstr "" -#: ../../mod/viewsrc.php:7 -msgid "Access denied." +#: ../../mod/lostpass.php:16 +msgid "No valid account found." +msgstr "" + +#: ../../mod/lostpass.php:31 +msgid "Password reset request issued. Check your email." +msgstr "" + +#: ../../mod/lostpass.php:42 +#, php-format +msgid "Password reset requested at %s" +msgstr "" + +#: ../../mod/lostpass.php:44 ../../mod/lostpass.php:106 +#: ../../mod/register.php:380 ../../mod/register.php:434 +#: ../../mod/regmod.php:54 ../../mod/dfrn_confirm.php:716 +#: ../../include/items.php:2452 +msgid "Administrator" +msgstr "" + +#: ../../mod/lostpass.php:64 +msgid "" +"Request could not be verified. (You may have previously submitted it.) " +"Password reset failed." +msgstr "" + +#: ../../mod/lostpass.php:82 ../../boot.php:719 +msgid "Password Reset" +msgstr "" + +#: ../../mod/lostpass.php:83 +msgid "Your password has been reset as requested." +msgstr "" + +#: ../../mod/lostpass.php:84 +msgid "Your new password is" +msgstr "" + +#: ../../mod/lostpass.php:85 +msgid "Save or copy your new password - and then" +msgstr "" + +#: ../../mod/lostpass.php:86 +msgid "click here to login" +msgstr "" + +#: ../../mod/lostpass.php:87 +msgid "" +"Your password may be changed from the Settings page after " +"successful login." +msgstr "" + +#: ../../mod/lostpass.php:118 +msgid "Forgot your Password?" +msgstr "" + +#: ../../mod/lostpass.php:119 +msgid "" +"Enter your email address and submit to have your password reset. Then check " +"your email for further instructions." +msgstr "" + +#: ../../mod/lostpass.php:120 +msgid "Nickname or Email: " +msgstr "" + +#: ../../mod/lostpass.php:121 +msgid "Reset" +msgstr "" + +#: ../../mod/settings.php:70 +msgid "Missing some important data!" +msgstr "" + +#: ../../mod/settings.php:73 ../../mod/settings.php:479 ../../mod/admin.php:62 +msgid "Update" +msgstr "" + +#: ../../mod/settings.php:168 +msgid "Failed to connect with email account using the settings provided." +msgstr "" + +#: ../../mod/settings.php:173 +msgid "Email settings updated." +msgstr "" + +#: ../../mod/settings.php:191 +msgid "Passwords do not match. Password unchanged." +msgstr "" + +#: ../../mod/settings.php:196 +msgid "Empty passwords are not allowed. Password unchanged." +msgstr "" + +#: ../../mod/settings.php:207 +msgid "Password changed." +msgstr "" + +#: ../../mod/settings.php:209 +msgid "Password update failed. Please try again." +msgstr "" + +#: ../../mod/settings.php:273 +msgid " Please use a shorter name." +msgstr "" + +#: ../../mod/settings.php:275 +msgid " Name too short." +msgstr "" + +#: ../../mod/settings.php:281 +msgid " Not valid email." +msgstr "" + +#: ../../mod/settings.php:283 +msgid " Cannot change to that email." +msgstr "" + +#: ../../mod/settings.php:351 ../../addon/facebook/facebook.php:320 +#: ../../addon/impressum/impressum.php:64 ../../addon/piwik/piwik.php:94 +#: ../../addon/twitter/twitter.php:310 +msgid "Settings updated." +msgstr "" + +#: ../../mod/settings.php:415 ../../include/nav.php:129 +msgid "Account settings" +msgstr "" + +#: ../../mod/settings.php:420 +msgid "Connector settings" +msgstr "" + +#: ../../mod/settings.php:425 +msgid "Plugin settings" +msgstr "" + +#: ../../mod/settings.php:430 +msgid "Connections" +msgstr "" + +#: ../../mod/settings.php:435 +msgid "Export personal data" +msgstr "" + +#: ../../mod/settings.php:452 ../../mod/settings.php:478 +#: ../../mod/settings.php:511 +msgid "Add application" +msgstr "" + +#: ../../mod/settings.php:456 ../../mod/settings.php:482 +#: ../../addon/statusnet/statusnet.php:489 +msgid "Consumer Key" +msgstr "" + +#: ../../mod/settings.php:457 ../../mod/settings.php:483 +#: ../../addon/statusnet/statusnet.php:488 +msgid "Consumer Secret" +msgstr "" + +#: ../../mod/settings.php:458 ../../mod/settings.php:484 +msgid "Redirect" +msgstr "" + +#: ../../mod/settings.php:459 ../../mod/settings.php:485 +msgid "Icon url" +msgstr "" + +#: ../../mod/settings.php:470 +msgid "You can't edit this application." +msgstr "" + +#: ../../mod/settings.php:510 +msgid "Connected Apps" +msgstr "" + +#: ../../mod/settings.php:514 +msgid "Client key starts with" +msgstr "" + +#: ../../mod/settings.php:515 +msgid "No name" +msgstr "" + +#: ../../mod/settings.php:516 +msgid "Remove authorization" +msgstr "" + +#: ../../mod/settings.php:528 +msgid "No Plugin settings configured" +msgstr "" + +#: ../../mod/settings.php:535 ../../addon/widgets/widgets.php:122 +msgid "Plugin Settings" +msgstr "" + +#: ../../mod/settings.php:548 ../../mod/settings.php:549 +#, php-format +msgid "Built-in support for %s connectivity is %s" +msgstr "" + +#: ../../mod/settings.php:548 ../../mod/settings.php:549 +msgid "enabled" +msgstr "" + +#: ../../mod/settings.php:548 ../../mod/settings.php:549 +msgid "disabled" +msgstr "" + +#: ../../mod/settings.php:549 +msgid "StatusNet" +msgstr "" + +#: ../../mod/settings.php:575 +msgid "Connector Settings" +msgstr "" + +#: ../../mod/settings.php:581 +msgid "Email/Mailbox Setup" +msgstr "" + +#: ../../mod/settings.php:582 +msgid "" +"If you wish to communicate with email contacts using this service " +"(optional), please specify how to connect to your mailbox." +msgstr "" + +#: ../../mod/settings.php:583 +msgid "Last successful email check:" +msgstr "" + +#: ../../mod/settings.php:584 +msgid "Email access is disabled on this site." +msgstr "" + +#: ../../mod/settings.php:585 +msgid "IMAP server name:" +msgstr "" + +#: ../../mod/settings.php:586 +msgid "IMAP port:" +msgstr "" + +#: ../../mod/settings.php:587 +msgid "Security:" +msgstr "" + +#: ../../mod/settings.php:587 +msgid "None" +msgstr "" + +#: ../../mod/settings.php:588 +msgid "Email login name:" +msgstr "" + +#: ../../mod/settings.php:589 +msgid "Email password:" +msgstr "" + +#: ../../mod/settings.php:590 +msgid "Reply-to address:" +msgstr "" + +#: ../../mod/settings.php:591 +msgid "Send public posts to all email contacts:" +msgstr "" + +#: ../../mod/settings.php:648 ../../mod/admin.php:126 ../../mod/admin.php:443 +msgid "Normal Account" +msgstr "" + +#: ../../mod/settings.php:649 +msgid "This account is a normal personal profile" +msgstr "" + +#: ../../mod/settings.php:652 ../../mod/admin.php:127 ../../mod/admin.php:444 +msgid "Soapbox Account" +msgstr "" + +#: ../../mod/settings.php:653 +msgid "Automatically approve all connection/friend requests as read-only fans" +msgstr "" + +#: ../../mod/settings.php:656 ../../mod/admin.php:128 ../../mod/admin.php:445 +msgid "Community/Celebrity Account" +msgstr "" + +#: ../../mod/settings.php:657 +msgid "Automatically approve all connection/friend requests as read-write fans" +msgstr "" + +#: ../../mod/settings.php:660 ../../mod/admin.php:129 ../../mod/admin.php:446 +msgid "Automatic Friend Account" +msgstr "" + +#: ../../mod/settings.php:661 +msgid "Automatically approve all connection/friend requests as friends" +msgstr "" + +#: ../../mod/settings.php:671 +msgid "OpenID:" +msgstr "" + +#: ../../mod/settings.php:671 +msgid "(Optional) Allow this OpenID to login to this account." +msgstr "" + +#: ../../mod/settings.php:681 +msgid "Publish your default profile in your local site directory?" +msgstr "" + +#: ../../mod/settings.php:687 +msgid "Publish your default profile in the global social directory?" +msgstr "" + +#: ../../mod/settings.php:695 +msgid "Hide your contact/friend list from viewers of your default profile?" +msgstr "" + +#: ../../mod/settings.php:699 +msgid "Hide your profile details from unknown viewers?" +msgstr "" + +#: ../../mod/settings.php:704 +msgid "Allow friends to post to your profile page?" +msgstr "" + +#: ../../mod/settings.php:710 +msgid "Allow friends to tag your posts?" +msgstr "" + +#: ../../mod/settings.php:716 +msgid "Allow us to suggest you as a potential friend to new members?" +msgstr "" + +#: ../../mod/settings.php:725 +msgid "Profile is not published." +msgstr "" + +#: ../../mod/settings.php:744 ../../mod/profile_photo.php:206 +msgid "or" +msgstr "" + +#: ../../mod/settings.php:749 +msgid "Your Identity Address is" +msgstr "" + +#: ../../mod/settings.php:760 +msgid "Automatically expire posts after this many days:" +msgstr "" + +#: ../../mod/settings.php:760 +msgid "If empty, posts will not expire. Expired posts will be deleted" +msgstr "" + +#: ../../mod/settings.php:761 +msgid "Advanced expiration settings" +msgstr "" + +#: ../../mod/settings.php:762 +msgid "Advanced Expiration" +msgstr "" + +#: ../../mod/settings.php:763 +msgid "Expire posts:" +msgstr "" + +#: ../../mod/settings.php:764 +msgid "Expire personal notes:" +msgstr "" + +#: ../../mod/settings.php:765 +msgid "Expire starred posts:" +msgstr "" + +#: ../../mod/settings.php:766 +msgid "Expire photos:" +msgstr "" + +#: ../../mod/settings.php:771 +msgid "Account Settings" +msgstr "" + +#: ../../mod/settings.php:779 +msgid "Password Settings" +msgstr "" + +#: ../../mod/settings.php:780 +msgid "New Password:" +msgstr "" + +#: ../../mod/settings.php:781 +msgid "Confirm:" +msgstr "" + +#: ../../mod/settings.php:781 +msgid "Leave password fields blank unless changing" +msgstr "" + +#: ../../mod/settings.php:785 +msgid "Basic Settings" +msgstr "" + +#: ../../mod/settings.php:786 ../../include/profile_advanced.php:15 +msgid "Full Name:" +msgstr "" + +#: ../../mod/settings.php:787 +msgid "Email Address:" +msgstr "" + +#: ../../mod/settings.php:788 +msgid "Your Timezone:" +msgstr "" + +#: ../../mod/settings.php:789 +msgid "Default Post Location:" +msgstr "" + +#: ../../mod/settings.php:790 +msgid "Use Browser Location:" +msgstr "" + +#: ../../mod/settings.php:791 +msgid "Display Theme:" +msgstr "" + +#: ../../mod/settings.php:792 +msgid "Update browser every xx seconds" +msgstr "" + +#: ../../mod/settings.php:792 +msgid "Minimum of 10 seconds, no maximum" +msgstr "" + +#: ../../mod/settings.php:794 +msgid "Security and Privacy Settings" +msgstr "" + +#: ../../mod/settings.php:796 +msgid "Maximum Friend Requests/Day:" +msgstr "" + +#: ../../mod/settings.php:796 +msgid "(to prevent spam abuse)" +msgstr "" + +#: ../../mod/settings.php:797 +msgid "Default Post Permissions" +msgstr "" + +#: ../../mod/settings.php:798 +msgid "(click to open/close)" +msgstr "" + +#: ../../mod/settings.php:813 +msgid "Notification Settings" +msgstr "" + +#: ../../mod/settings.php:814 +msgid "Send a notification email when:" +msgstr "" + +#: ../../mod/settings.php:815 +msgid "You receive an introduction" +msgstr "" + +#: ../../mod/settings.php:816 +msgid "Your introductions are confirmed" +msgstr "" + +#: ../../mod/settings.php:817 +msgid "Someone writes on your profile wall" +msgstr "" + +#: ../../mod/settings.php:818 +msgid "Someone writes a followup comment" +msgstr "" + +#: ../../mod/settings.php:819 +msgid "You receive a private message" +msgstr "" + +#: ../../mod/settings.php:820 +msgid "You receive a friend suggestion" +msgstr "" + +#: ../../mod/settings.php:821 +msgid "You are tagged in a post" +msgstr "" + +#: ../../mod/settings.php:824 +msgid "Advanced Page Settings" +msgstr "" + +#: ../../mod/manage.php:90 +msgid "Manage Identities and/or Pages" +msgstr "" + +#: ../../mod/manage.php:93 +msgid "" +"Toggle between different identities or community/group pages which share " +"your account details or which you have been granted \"manage\" permissions" +msgstr "" + +#: ../../mod/manage.php:95 +msgid "Select an identity to manage: " +msgstr "" + +#: ../../mod/network.php:43 +msgid "Search Results For:" +msgstr "" + +#: ../../mod/network.php:77 ../../mod/search.php:16 +msgid "Remove term" +msgstr "" + +#: ../../mod/network.php:86 ../../mod/search.php:13 +msgid "Saved Searches" +msgstr "" + +#: ../../mod/network.php:87 ../../include/group.php:216 +msgid "add" +msgstr "" + +#: ../../mod/network.php:166 +msgid "Commented Order" +msgstr "" + +#: ../../mod/network.php:171 +msgid "Posted Order" +msgstr "" + +#: ../../mod/network.php:182 +msgid "New" +msgstr "" + +#: ../../mod/network.php:187 +msgid "Starred" +msgstr "" + +#: ../../mod/network.php:192 +msgid "Bookmarks" +msgstr "" + +#: ../../mod/network.php:250 +#, php-format +msgid "Warning: This group contains %s member from an insecure network." +msgid_plural "" +"Warning: This group contains %s members from an insecure network." +msgstr[0] "" +msgstr[1] "" + +#: ../../mod/network.php:253 +msgid "Private messages to this group are at risk of public disclosure." +msgstr "" + +#: ../../mod/network.php:304 +msgid "No such group" +msgstr "" + +#: ../../mod/network.php:315 +msgid "Group is empty" +msgstr "" + +#: ../../mod/network.php:319 +msgid "Group: " +msgstr "" + +#: ../../mod/network.php:329 +msgid "Contact: " +msgstr "" + +#: ../../mod/network.php:331 +msgid "Private messages to this person are at risk of public disclosure." +msgstr "" + +#: ../../mod/network.php:336 +msgid "Invalid contact." +msgstr "" + +#: ../../mod/notes.php:44 ../../boot.php:1350 +msgid "Personal Notes" +msgstr "" + +#: ../../mod/notes.php:63 ../../include/text.php:639 +msgid "Save" msgstr "" #: ../../mod/newmember.php:6 @@ -200,1711 +2210,94 @@ msgid "" "features and resources." msgstr "" -#: ../../mod/follow.php:20 ../../mod/dfrn_request.php:370 -msgid "Disallowed profile URL." +#: ../../mod/attach.php:8 +msgid "Item not available." msgstr "" -#: ../../mod/follow.php:27 -msgid "Connect URL missing." +#: ../../mod/attach.php:20 +msgid "Item was not found." msgstr "" -#: ../../mod/follow.php:47 -msgid "" -"This site is not configured to allow communications with other networks." +#: ../../mod/group.php:27 +msgid "Group created." msgstr "" -#: ../../mod/follow.php:48 ../../mod/follow.php:58 -msgid "No compatible communication protocols or feeds were discovered." +#: ../../mod/group.php:33 +msgid "Could not create group." msgstr "" -#: ../../mod/follow.php:56 -msgid "The profile address specified does not provide adequate information." +#: ../../mod/group.php:43 ../../mod/group.php:123 +msgid "Group not found." msgstr "" -#: ../../mod/follow.php:60 -msgid "An author or name was not found." +#: ../../mod/group.php:56 +msgid "Group name changed." msgstr "" -#: ../../mod/follow.php:62 -msgid "No browser URL could be matched to this address." +#: ../../mod/group.php:67 ../../mod/profperm.php:19 ../../index.php:287 +msgid "Permission denied" msgstr "" -#: ../../mod/follow.php:69 -msgid "" -"The profile address specified belongs to a network which has been disabled " -"on this site." +#: ../../mod/group.php:82 +msgid "Create a group of contacts/friends." msgstr "" -#: ../../mod/follow.php:74 -msgid "" -"Limited profile. This person will be unable to receive direct/personal " -"notifications from you." +#: ../../mod/group.php:83 ../../mod/group.php:166 +msgid "Group Name: " msgstr "" -#: ../../mod/follow.php:144 -msgid "Unable to retrieve contact information." +#: ../../mod/group.php:98 +msgid "Group removed." msgstr "" -#: ../../mod/follow.php:190 -msgid "following" +#: ../../mod/group.php:100 +msgid "Unable to remove group." msgstr "" -#: ../../mod/dirfind.php:23 -msgid "People Search" +#: ../../mod/group.php:164 ../../mod/profperm.php:105 +msgid "Click on a contact to add or remove." msgstr "" -#: ../../mod/dirfind.php:57 ../../mod/match.php:65 -msgid "No matches" +#: ../../mod/group.php:165 +msgid "Group Editor" msgstr "" -#: ../../mod/contacts.php:62 ../../mod/contacts.php:135 -msgid "Could not access contact record." +#: ../../mod/group.php:179 +msgid "Members" msgstr "" -#: ../../mod/contacts.php:76 -msgid "Could not locate selected profile." +#: ../../mod/group.php:194 +msgid "All Contacts" msgstr "" -#: ../../mod/contacts.php:99 -msgid "Contact updated." +#: ../../mod/profperm.php:25 ../../mod/profperm.php:55 +msgid "Invalid profile identifier." msgstr "" -#: ../../mod/contacts.php:101 ../../mod/dfrn_request.php:439 -msgid "Failed to update contact record." +#: ../../mod/profperm.php:101 +msgid "Profile Visibility Editor" msgstr "" -#: ../../mod/contacts.php:157 -msgid "Contact has been blocked" +#: ../../mod/profperm.php:103 ../../include/profile_advanced.php:7 +#: ../../include/profile_advanced.php:76 ../../include/nav.php:48 +#: ../../boot.php:1332 +msgid "Profile" msgstr "" -#: ../../mod/contacts.php:157 -msgid "Contact has been unblocked" +#: ../../mod/profperm.php:114 +msgid "Visible To" msgstr "" -#: ../../mod/contacts.php:171 -msgid "Contact has been ignored" +#: ../../mod/profperm.php:130 +msgid "All Contacts (with secure profile access)" msgstr "" -#: ../../mod/contacts.php:171 -msgid "Contact has been unignored" +#: ../../mod/viewcontacts.php:25 ../../include/text.php:578 +msgid "View Contacts" msgstr "" -#: ../../mod/contacts.php:192 -msgid "stopped following" -msgstr "" - -#: ../../mod/contacts.php:213 -msgid "Contact has been removed." -msgstr "" - -#: ../../mod/contacts.php:234 -#, php-format -msgid "You are mutual friends with %s" -msgstr "" - -#: ../../mod/contacts.php:238 -#, php-format -msgid "You are sharing with %s" -msgstr "" - -#: ../../mod/contacts.php:243 -#, php-format -msgid "%s is sharing with you" -msgstr "" - -#: ../../mod/contacts.php:260 -msgid "Private communications are not available for this contact." -msgstr "" - -#: ../../mod/contacts.php:263 -msgid "Never" -msgstr "" - -#: ../../mod/contacts.php:267 -msgid "(Update was successful)" -msgstr "" - -#: ../../mod/contacts.php:267 -msgid "(Update was not successful)" -msgstr "" - -#: ../../mod/contacts.php:269 -msgid "Suggest friends" -msgstr "" - -#: ../../mod/contacts.php:273 -#, php-format -msgid "Network type: %s" -msgstr "" - -#: ../../mod/contacts.php:276 -#, php-format -msgid "%d contact in common" -msgid_plural "%d contacts in common" -msgstr[0] "" -msgstr[1] "" - -#: ../../mod/contacts.php:281 -msgid "View all contacts" -msgstr "" - -#: ../../mod/contacts.php:286 ../../mod/contacts.php:333 -#: ../../mod/admin.php:470 -msgid "Unblock" -msgstr "" - -#: ../../mod/contacts.php:286 ../../mod/contacts.php:333 -#: ../../mod/admin.php:469 -msgid "Block" -msgstr "" - -#: ../../mod/contacts.php:291 ../../mod/contacts.php:334 -msgid "Unignore" -msgstr "" - -#: ../../mod/contacts.php:291 ../../mod/contacts.php:334 -#: ../../mod/notifications.php:47 ../../mod/notifications.php:149 -#: ../../mod/notifications.php:194 -msgid "Ignore" -msgstr "" - -#: ../../mod/contacts.php:296 -msgid "Repair" -msgstr "" - -#: ../../mod/contacts.php:306 -msgid "Contact Editor" -msgstr "" - -#: ../../mod/contacts.php:308 ../../mod/settings.php:447 -#: ../../mod/settings.php:586 ../../mod/settings.php:767 -#: ../../mod/crepair.php:162 ../../mod/manage.php:106 -#: ../../mod/profiles.php:375 ../../mod/localtime.php:45 -#: ../../mod/invite.php:106 ../../mod/fsuggest.php:107 -#: ../../mod/install.php:250 ../../mod/install.php:288 ../../mod/admin.php:296 -#: ../../mod/admin.php:461 ../../mod/admin.php:587 ../../mod/admin.php:652 -#: ../../mod/photos.php:888 ../../mod/photos.php:946 ../../mod/photos.php:1165 -#: ../../mod/photos.php:1205 ../../mod/photos.php:1245 -#: ../../mod/photos.php:1276 ../../mod/group.php:84 ../../mod/group.php:167 -#: ../../mod/events.php:333 ../../include/conversation.php:488 -#: ../../addon/facebook/facebook.php:410 ../../addon/wppost/wppost.php:101 -#: ../../addon/uhremotestorage/uhremotestorage.php:58 -#: ../../addon/tumblr/tumblr.php:89 ../../addon/oembed/oembed.php:41 -#: ../../addon/posterous/posterous.php:89 -#: ../../addon/statusnet/statusnet.php:282 -#: ../../addon/statusnet/statusnet.php:296 -#: ../../addon/statusnet/statusnet.php:322 -#: ../../addon/statusnet/statusnet.php:329 -#: ../../addon/statusnet/statusnet.php:351 -#: ../../addon/statusnet/statusnet.php:486 ../../addon/twitter/twitter.php:179 -#: ../../addon/twitter/twitter.php:202 ../../addon/twitter/twitter.php:299 -#: ../../addon/impressum/impressum.php:69 ../../addon/piwik/piwik.php:81 -#: ../../addon/pageheader/pageheader.php:52 -#: ../../addon/randplace/randplace.php:178 ../../addon/blockem/blockem.php:53 -#: ../../addon/nsfw/nsfw.php:53 -msgid "Submit" -msgstr "" - -#: ../../mod/contacts.php:309 -msgid "Profile Visibility" -msgstr "" - -#: ../../mod/contacts.php:310 -#, php-format -msgid "" -"Please choose the profile you would like to display to %s when viewing your " -"profile securely." -msgstr "" - -#: ../../mod/contacts.php:311 -msgid "Contact Information / Notes" -msgstr "" - -#: ../../mod/contacts.php:312 -msgid "Edit contact notes" -msgstr "" - -#: ../../mod/contacts.php:317 ../../mod/contacts.php:433 -#: ../../mod/viewcontacts.php:61 -#, php-format -msgid "Visit %s's profile [%s]" -msgstr "" - -#: ../../mod/contacts.php:318 -msgid "Block/Unblock contact" -msgstr "" - -#: ../../mod/contacts.php:319 -msgid "Ignore contact" -msgstr "" - -#: ../../mod/contacts.php:320 -msgid "Repair URL settings" -msgstr "" - -#: ../../mod/contacts.php:321 -msgid "View conversations" -msgstr "" - -#: ../../mod/contacts.php:323 -msgid "Delete contact" -msgstr "" - -#: ../../mod/contacts.php:327 -msgid "Last update:" -msgstr "" - -#: ../../mod/contacts.php:328 -msgid "Update public posts" -msgstr "" - -#: ../../mod/contacts.php:330 ../../mod/admin.php:701 -msgid "Update now" -msgstr "" - -#: ../../mod/contacts.php:337 -msgid "Currently blocked" -msgstr "" - -#: ../../mod/contacts.php:338 -msgid "Currently ignored" -msgstr "" - -#: ../../mod/contacts.php:339 ../../mod/notifications.php:144 -#: ../../mod/notifications.php:189 -msgid "Hide this contact from others" -msgstr "" - -#: ../../mod/contacts.php:339 -msgid "" -"Replies/likes to your public posts may still be visible" -msgstr "" - -#: ../../mod/contacts.php:367 ../../include/nav.php:130 -msgid "Contacts" -msgstr "" - -#: ../../mod/contacts.php:369 -msgid "Show Blocked Connections" -msgstr "" - -#: ../../mod/contacts.php:369 -msgid "Hide Blocked Connections" -msgstr "" - -#: ../../mod/contacts.php:371 -msgid "Search your contacts" -msgstr "" - -#: ../../mod/contacts.php:409 -msgid "Mutual Friendship" -msgstr "" - -#: ../../mod/contacts.php:413 -msgid "is a fan of yours" -msgstr "" - -#: ../../mod/contacts.php:417 -msgid "you are a fan of" -msgstr "" - -#: ../../mod/contacts.php:434 ../../include/Contact.php:129 -#: ../../include/conversation.php:727 -msgid "Edit contact" -msgstr "" - -#: ../../mod/settings.php:11 ../../mod/photos.php:64 -msgid "everybody" -msgstr "" - -#: ../../mod/settings.php:69 -msgid "Missing some important data!" -msgstr "" - -#: ../../mod/settings.php:72 ../../mod/settings.php:473 ../../mod/admin.php:62 -msgid "Update" -msgstr "" - -#: ../../mod/settings.php:167 -msgid "Failed to connect with email account using the settings provided." -msgstr "" - -#: ../../mod/settings.php:172 -msgid "Email settings updated." -msgstr "" - -#: ../../mod/settings.php:190 -msgid "Passwords do not match. Password unchanged." -msgstr "" - -#: ../../mod/settings.php:195 -msgid "Empty passwords are not allowed. Password unchanged." -msgstr "" - -#: ../../mod/settings.php:206 -msgid "Password changed." -msgstr "" - -#: ../../mod/settings.php:208 -msgid "Password update failed. Please try again." -msgstr "" - -#: ../../mod/settings.php:272 -msgid " Please use a shorter name." -msgstr "" - -#: ../../mod/settings.php:274 -msgid " Name too short." -msgstr "" - -#: ../../mod/settings.php:280 -msgid " Not valid email." -msgstr "" - -#: ../../mod/settings.php:282 -msgid " Cannot change to that email." -msgstr "" - -#: ../../mod/settings.php:350 ../../addon/facebook/facebook.php:320 -#: ../../addon/twitter/twitter.php:294 ../../addon/impressum/impressum.php:64 -#: ../../addon/piwik/piwik.php:94 -msgid "Settings updated." -msgstr "" - -#: ../../mod/settings.php:409 ../../include/nav.php:128 -msgid "Account settings" -msgstr "" - -#: ../../mod/settings.php:414 -msgid "Connector settings" -msgstr "" - -#: ../../mod/settings.php:419 -msgid "Plugin settings" -msgstr "" - -#: ../../mod/settings.php:424 -msgid "Connections" -msgstr "" - -#: ../../mod/settings.php:429 -msgid "Export personal data" -msgstr "" - -#: ../../mod/settings.php:446 ../../mod/settings.php:472 -#: ../../mod/settings.php:505 -msgid "Add application" -msgstr "" - -#: ../../mod/settings.php:448 ../../mod/settings.php:474 -#: ../../mod/dfrn_request.php:685 ../../mod/tagrm.php:11 -#: ../../mod/tagrm.php:94 ../../addon/js_upload/js_upload.php:45 -msgid "Cancel" -msgstr "" - -#: ../../mod/settings.php:449 ../../mod/settings.php:475 -#: ../../mod/crepair.php:144 ../../mod/admin.php:464 ../../mod/admin.php:473 -msgid "Name" -msgstr "" - -#: ../../mod/settings.php:450 ../../mod/settings.php:476 -#: ../../addon/statusnet/statusnet.php:480 -msgid "Consumer Key" -msgstr "" - -#: ../../mod/settings.php:451 ../../mod/settings.php:477 -#: ../../addon/statusnet/statusnet.php:479 -msgid "Consumer Secret" -msgstr "" - -#: ../../mod/settings.php:452 ../../mod/settings.php:478 -msgid "Redirect" -msgstr "" - -#: ../../mod/settings.php:453 ../../mod/settings.php:479 -msgid "Icon url" -msgstr "" - -#: ../../mod/settings.php:464 -msgid "You can't edit this application." -msgstr "" - -#: ../../mod/settings.php:504 -msgid "Connected Apps" -msgstr "" - -#: ../../mod/settings.php:506 ../../mod/editpost.php:90 -#: ../../include/conversation.php:496 -msgid "Edit" -msgstr "" - -#: ../../mod/settings.php:507 ../../mod/admin.php:468 -#: ../../mod/photos.php:1303 ../../mod/group.php:154 -#: ../../include/conversation.php:253 ../../include/conversation.php:509 -msgid "Delete" -msgstr "" - -#: ../../mod/settings.php:508 -msgid "Client key starts with" -msgstr "" - -#: ../../mod/settings.php:509 -msgid "No name" -msgstr "" - -#: ../../mod/settings.php:510 -msgid "Remove authorization" -msgstr "" - -#: ../../mod/settings.php:522 -msgid "No Plugin settings configured" -msgstr "" - -#: ../../mod/settings.php:529 ../../addon/widgets/widgets.php:122 -msgid "Plugin Settings" -msgstr "" - -#: ../../mod/settings.php:542 ../../mod/settings.php:543 -#, php-format -msgid "Built-in support for %s connectivity is %s" -msgstr "" - -#: ../../mod/settings.php:542 ../../mod/dfrn_request.php:681 -#: ../../include/contact_selectors.php:80 -msgid "Diaspora" -msgstr "" - -#: ../../mod/settings.php:542 ../../mod/settings.php:543 -msgid "enabled" -msgstr "" - -#: ../../mod/settings.php:542 ../../mod/settings.php:543 -msgid "disabled" -msgstr "" - -#: ../../mod/settings.php:543 -msgid "StatusNet" -msgstr "" - -#: ../../mod/settings.php:569 -msgid "Connector Settings" -msgstr "" - -#: ../../mod/settings.php:575 -msgid "Email/Mailbox Setup" -msgstr "" - -#: ../../mod/settings.php:576 -msgid "" -"If you wish to communicate with email contacts using this service " -"(optional), please specify how to connect to your mailbox." -msgstr "" - -#: ../../mod/settings.php:577 -msgid "Last successful email check:" -msgstr "" - -#: ../../mod/settings.php:578 -msgid "Email access is disabled on this site." -msgstr "" - -#: ../../mod/settings.php:579 -msgid "IMAP server name:" -msgstr "" - -#: ../../mod/settings.php:580 -msgid "IMAP port:" -msgstr "" - -#: ../../mod/settings.php:581 -msgid "Security:" -msgstr "" - -#: ../../mod/settings.php:581 -msgid "None" -msgstr "" - -#: ../../mod/settings.php:582 -msgid "Email login name:" -msgstr "" - -#: ../../mod/settings.php:583 -msgid "Email password:" -msgstr "" - -#: ../../mod/settings.php:584 -msgid "Reply-to address:" -msgstr "" - -#: ../../mod/settings.php:585 -msgid "Send public posts to all email contacts:" -msgstr "" - -#: ../../mod/settings.php:642 ../../mod/admin.php:126 ../../mod/admin.php:443 -msgid "Normal Account" -msgstr "" - -#: ../../mod/settings.php:643 -msgid "This account is a normal personal profile" -msgstr "" - -#: ../../mod/settings.php:646 ../../mod/admin.php:127 ../../mod/admin.php:444 -msgid "Soapbox Account" -msgstr "" - -#: ../../mod/settings.php:647 -msgid "Automatically approve all connection/friend requests as read-only fans" -msgstr "" - -#: ../../mod/settings.php:650 ../../mod/admin.php:128 ../../mod/admin.php:445 -msgid "Community/Celebrity Account" -msgstr "" - -#: ../../mod/settings.php:651 -msgid "Automatically approve all connection/friend requests as read-write fans" -msgstr "" - -#: ../../mod/settings.php:654 ../../mod/admin.php:129 ../../mod/admin.php:446 -msgid "Automatic Friend Account" -msgstr "" - -#: ../../mod/settings.php:655 -msgid "Automatically approve all connection/friend requests as friends" -msgstr "" - -#: ../../mod/settings.php:665 -msgid "OpenID:" -msgstr "" - -#: ../../mod/settings.php:665 -msgid "(Optional) Allow this OpenID to login to this account." -msgstr "" - -#: ../../mod/settings.php:675 -msgid "Publish your default profile in your local site directory?" -msgstr "" - -#: ../../mod/settings.php:675 ../../mod/settings.php:681 -#: ../../mod/settings.php:689 ../../mod/settings.php:693 -#: ../../mod/settings.php:698 ../../mod/settings.php:704 -#: ../../mod/settings.php:710 ../../mod/settings.php:757 -#: ../../mod/settings.php:758 ../../mod/settings.php:759 -#: ../../mod/settings.php:760 ../../mod/dfrn_request.php:676 -#: ../../mod/profiles.php:358 ../../mod/register.php:525 ../../mod/api.php:106 -msgid "No" -msgstr "" - -#: ../../mod/settings.php:675 ../../mod/settings.php:681 -#: ../../mod/settings.php:689 ../../mod/settings.php:693 -#: ../../mod/settings.php:698 ../../mod/settings.php:704 -#: ../../mod/settings.php:710 ../../mod/settings.php:757 -#: ../../mod/settings.php:758 ../../mod/settings.php:759 -#: ../../mod/settings.php:760 ../../mod/dfrn_request.php:675 -#: ../../mod/profiles.php:357 ../../mod/register.php:524 ../../mod/api.php:105 -msgid "Yes" -msgstr "" - -#: ../../mod/settings.php:681 -msgid "Publish your default profile in the global social directory?" -msgstr "" - -#: ../../mod/settings.php:689 -msgid "Hide your contact/friend list from viewers of your default profile?" -msgstr "" - -#: ../../mod/settings.php:693 -msgid "Hide your profile details from unknown viewers?" -msgstr "" - -#: ../../mod/settings.php:698 -msgid "Allow friends to post to your profile page?" -msgstr "" - -#: ../../mod/settings.php:704 -msgid "Allow friends to tag your posts?" -msgstr "" - -#: ../../mod/settings.php:710 -msgid "Allow us to suggest you as a potential friend to new members?" -msgstr "" - -#: ../../mod/settings.php:719 -msgid "Profile is not published." -msgstr "" - -#: ../../mod/settings.php:738 ../../mod/profile_photo.php:206 -msgid "or" -msgstr "" - -#: ../../mod/settings.php:743 -msgid "Your Identity Address is" -msgstr "" - -#: ../../mod/settings.php:754 -msgid "Automatically expire posts after days:" -msgstr "" - -#: ../../mod/settings.php:754 -msgid "If empty, posts will not expire. Expired posts will be deleted" -msgstr "" - -#: ../../mod/settings.php:755 -msgid "Advanced expiration settings" -msgstr "" - -#: ../../mod/settings.php:756 -msgid "Advanced Expiration" -msgstr "" - -#: ../../mod/settings.php:757 -msgid "Expire posts:" -msgstr "" - -#: ../../mod/settings.php:758 -msgid "Expire personal notes:" -msgstr "" - -#: ../../mod/settings.php:759 -msgid "Expire starred posts:" -msgstr "" - -#: ../../mod/settings.php:760 -msgid "Expire photos:" -msgstr "" - -#: ../../mod/settings.php:765 -msgid "Account Settings" -msgstr "" - -#: ../../mod/settings.php:773 -msgid "Password Settings" -msgstr "" - -#: ../../mod/settings.php:774 -msgid "New Password:" -msgstr "" - -#: ../../mod/settings.php:775 -msgid "Confirm:" -msgstr "" - -#: ../../mod/settings.php:775 -msgid "Leave password fields blank unless changing" -msgstr "" - -#: ../../mod/settings.php:779 -msgid "Basic Settings" -msgstr "" - -#: ../../mod/settings.php:780 ../../include/profile_advanced.php:15 -msgid "Full Name:" -msgstr "" - -#: ../../mod/settings.php:781 -msgid "Email Address:" -msgstr "" - -#: ../../mod/settings.php:782 -msgid "Your Timezone:" -msgstr "" - -#: ../../mod/settings.php:783 -msgid "Default Post Location:" -msgstr "" - -#: ../../mod/settings.php:784 -msgid "Use Browser Location:" -msgstr "" - -#: ../../mod/settings.php:785 -msgid "Display Theme:" -msgstr "" - -#: ../../mod/settings.php:786 -msgid "Update browser every xx seconds" -msgstr "" - -#: ../../mod/settings.php:786 -msgid "Minimum of 10 seconds, no maximum" -msgstr "" - -#: ../../mod/settings.php:788 -msgid "Security and Privacy Settings" -msgstr "" - -#: ../../mod/settings.php:790 -msgid "Maximum Friend Requests/Day:" -msgstr "" - -#: ../../mod/settings.php:790 -msgid "(to prevent spam abuse)" -msgstr "" - -#: ../../mod/settings.php:791 -msgid "Default Post Permissions" -msgstr "" - -#: ../../mod/settings.php:792 -msgid "(click to open/close)" -msgstr "" - -#: ../../mod/settings.php:807 -msgid "Notification Settings" -msgstr "" - -#: ../../mod/settings.php:808 -msgid "Send a notification email when:" -msgstr "" - -#: ../../mod/settings.php:809 -msgid "You receive an introduction" -msgstr "" - -#: ../../mod/settings.php:810 -msgid "Your introductions are confirmed" -msgstr "" - -#: ../../mod/settings.php:811 -msgid "Someone writes on your profile wall" -msgstr "" - -#: ../../mod/settings.php:812 -msgid "Someone writes a followup comment" -msgstr "" - -#: ../../mod/settings.php:813 -msgid "You receive a private message" -msgstr "" - -#: ../../mod/settings.php:814 -msgid "You receive a friend suggestion" -msgstr "" - -#: ../../mod/settings.php:817 -msgid "Advanced Page Settings" -msgstr "" - -#: ../../mod/crepair.php:100 -msgid "Contact settings applied." -msgstr "" - -#: ../../mod/crepair.php:102 -msgid "Contact update failed." -msgstr "" - -#: ../../mod/crepair.php:127 ../../mod/fsuggest.php:20 -#: ../../mod/fsuggest.php:92 ../../mod/dfrn_confirm.php:116 -msgid "Contact not found." -msgstr "" - -#: ../../mod/crepair.php:133 -msgid "Repair Contact Settings" -msgstr "" - -#: ../../mod/crepair.php:135 -msgid "" -"WARNING: This is highly advanced and if you enter incorrect " -"information your communications with this contact may stop working." -msgstr "" - -#: ../../mod/crepair.php:136 -msgid "" -"Please use your browser 'Back' button now if you are " -"uncertain what to do on this page." -msgstr "" - -#: ../../mod/crepair.php:145 -msgid "Account Nickname" -msgstr "" - -#: ../../mod/crepair.php:146 -msgid "@Tagname - overrides Name/Nickname" -msgstr "" - -#: ../../mod/crepair.php:147 -msgid "Account URL" -msgstr "" - -#: ../../mod/crepair.php:148 -msgid "Friend Request URL" -msgstr "" - -#: ../../mod/crepair.php:149 -msgid "Friend Confirm URL" -msgstr "" - -#: ../../mod/crepair.php:150 -msgid "Notification Endpoint URL" -msgstr "" - -#: ../../mod/crepair.php:151 -msgid "Poll/Feed URL" -msgstr "" - -#: ../../mod/crepair.php:152 -msgid "New photo from this URL" -msgstr "" - -#: ../../mod/dfrn_request.php:92 -msgid "This introduction has already been accepted." -msgstr "" - -#: ../../mod/dfrn_request.php:116 ../../mod/dfrn_request.php:381 -msgid "Profile location is not valid or does not contain profile information." -msgstr "" - -#: ../../mod/dfrn_request.php:121 ../../mod/dfrn_request.php:386 -msgid "Warning: profile location has no identifiable owner name." -msgstr "" - -#: ../../mod/dfrn_request.php:123 ../../mod/dfrn_request.php:388 -msgid "Warning: profile location has no profile photo." -msgstr "" - -#: ../../mod/dfrn_request.php:126 ../../mod/dfrn_request.php:391 -#, php-format -msgid "%d required parameter was not found at the given location" -msgid_plural "%d required parameters were not found at the given location" -msgstr[0] "" -msgstr[1] "" - -#: ../../mod/dfrn_request.php:167 -msgid "Introduction complete." -msgstr "" - -#: ../../mod/dfrn_request.php:191 -msgid "Unrecoverable protocol error." -msgstr "" - -#: ../../mod/dfrn_request.php:219 -msgid "Profile unavailable." -msgstr "" - -#: ../../mod/dfrn_request.php:244 -#, php-format -msgid "%s has received too many connection requests today." -msgstr "" - -#: ../../mod/dfrn_request.php:245 -msgid "Spam protection measures have been invoked." -msgstr "" - -#: ../../mod/dfrn_request.php:246 -msgid "Friends are advised to please try again in 24 hours." -msgstr "" - -#: ../../mod/dfrn_request.php:306 -msgid "Invalid locator" -msgstr "" - -#: ../../mod/dfrn_request.php:326 -msgid "Unable to resolve your name at the provided location." -msgstr "" - -#: ../../mod/dfrn_request.php:339 -msgid "You have already introduced yourself here." -msgstr "" - -#: ../../mod/dfrn_request.php:343 -#, php-format -msgid "Apparently you are already friends with %s." -msgstr "" - -#: ../../mod/dfrn_request.php:364 -msgid "Invalid profile URL." -msgstr "" - -#: ../../mod/dfrn_request.php:460 -msgid "Your introduction has been sent." -msgstr "" - -#: ../../mod/dfrn_request.php:513 -msgid "Please login to confirm introduction." -msgstr "" - -#: ../../mod/dfrn_request.php:527 -msgid "" -"Incorrect identity currently logged in. Please login to this profile." -msgstr "" - -#: ../../mod/dfrn_request.php:539 -#, php-format -msgid "Welcome home %s." -msgstr "" - -#: ../../mod/dfrn_request.php:540 -#, php-format -msgid "Please confirm your introduction/connection request to %s." -msgstr "" - -#: ../../mod/dfrn_request.php:541 -msgid "Confirm" -msgstr "" - -#: ../../mod/dfrn_request.php:581 ../../include/items.php:2406 -msgid "[Name Withheld]" -msgstr "" - -#: ../../mod/dfrn_request.php:665 -#, php-format -msgid "" -"Diaspora members: Please do not use this form. Instead, enter \"%s\" into " -"your Diaspora search bar." -msgstr "" - -#: ../../mod/dfrn_request.php:668 -msgid "" -"Please enter your 'Identity Address' from one of the following supported " -"social networks:" -msgstr "" - -#: ../../mod/dfrn_request.php:671 -msgid "Friend/Connection Request" -msgstr "" - -#: ../../mod/dfrn_request.php:672 -msgid "" -"Examples: jojo@demo.friendica.com, http://demo.friendica.com/profile/jojo, " -"testuser@identi.ca" -msgstr "" - -#: ../../mod/dfrn_request.php:673 -msgid "Please answer the following:" -msgstr "" - -#: ../../mod/dfrn_request.php:674 -#, php-format -msgid "Does %s know you?" -msgstr "" - -#: ../../mod/dfrn_request.php:677 -msgid "Add a personal note:" -msgstr "" - -#: ../../mod/dfrn_request.php:679 ../../include/contact_selectors.php:76 -msgid "Friendica" -msgstr "" - -#: ../../mod/dfrn_request.php:680 -msgid "StatusNet/Federated Social Web" -msgstr "" - -#: ../../mod/dfrn_request.php:682 -msgid "- please share from your own site as noted above" -msgstr "" - -#: ../../mod/dfrn_request.php:683 -msgid "Your Identity Address:" -msgstr "" - -#: ../../mod/dfrn_request.php:684 -msgid "Submit Request" -msgstr "" - -#: ../../mod/notifications.php:26 -msgid "Invalid request identifier." -msgstr "" - -#: ../../mod/notifications.php:35 ../../mod/notifications.php:150 -#: ../../mod/notifications.php:195 -msgid "Discard" -msgstr "" - -#: ../../mod/notifications.php:71 ../../include/nav.php:109 -msgid "Network" -msgstr "" - -#: ../../mod/notifications.php:76 ../../mod/network.php:169 -msgid "Personal" -msgstr "" - -#: ../../mod/notifications.php:81 ../../include/nav.php:73 -#: ../../include/nav.php:111 -msgid "Home" -msgstr "" - -#: ../../mod/notifications.php:86 ../../include/nav.php:117 -msgid "Introductions" -msgstr "" - -#: ../../mod/notifications.php:91 ../../mod/message.php:76 -#: ../../include/nav.php:122 -msgid "Messages" -msgstr "" - -#: ../../mod/notifications.php:110 -msgid "Show Ignored Requests" -msgstr "" - -#: ../../mod/notifications.php:110 -msgid "Hide Ignored Requests" -msgstr "" - -#: ../../mod/notifications.php:136 ../../mod/notifications.php:180 -msgid "Notification type: " -msgstr "" - -#: ../../mod/notifications.php:137 -msgid "Friend Suggestion" -msgstr "" - -#: ../../mod/notifications.php:139 -#, php-format -msgid "suggested by %s" -msgstr "" - -#: ../../mod/notifications.php:146 ../../mod/notifications.php:192 -#: ../../mod/admin.php:466 -msgid "Approve" -msgstr "" - -#: ../../mod/notifications.php:166 -msgid "Claims to be known to you: " -msgstr "" - -#: ../../mod/notifications.php:166 -msgid "yes" -msgstr "" - -#: ../../mod/notifications.php:166 -msgid "no" -msgstr "" - -#: ../../mod/notifications.php:173 -msgid "Approve as: " -msgstr "" - -#: ../../mod/notifications.php:174 -msgid "Friend" -msgstr "" - -#: ../../mod/notifications.php:175 -msgid "Sharer" -msgstr "" - -#: ../../mod/notifications.php:175 -msgid "Fan/Admirer" -msgstr "" - -#: ../../mod/notifications.php:181 -msgid "Friend/Connect Request" -msgstr "" - -#: ../../mod/notifications.php:181 -msgid "New Follower" -msgstr "" - -#: ../../mod/notifications.php:201 -msgid "No introductions." -msgstr "" - -#: ../../mod/notifications.php:204 ../../mod/notifications.php:290 -#: ../../mod/notifications.php:385 ../../mod/notifications.php:466 -#: ../../include/nav.php:118 -msgid "Notifications" -msgstr "" - -#: ../../mod/notifications.php:241 ../../mod/notifications.php:336 -#: ../../mod/notifications.php:423 -#, php-format -msgid "%s liked %s's post" -msgstr "" - -#: ../../mod/notifications.php:250 ../../mod/notifications.php:345 -#: ../../mod/notifications.php:432 -#, php-format -msgid "%s disliked %s's post" -msgstr "" - -#: ../../mod/notifications.php:264 ../../mod/notifications.php:359 -#: ../../mod/notifications.php:446 -#, php-format -msgid "%s is now friends with %s" -msgstr "" - -#: ../../mod/notifications.php:271 ../../mod/notifications.php:366 -#, php-format -msgid "%s created a new post" -msgstr "" - -#: ../../mod/notifications.php:272 ../../mod/notifications.php:367 -#: ../../mod/notifications.php:455 -#, php-format -msgid "%s commented on %s's post" -msgstr "" - -#: ../../mod/notifications.php:286 -msgid "No more network notifications." -msgstr "" - -#: ../../mod/notifications.php:381 -msgid "No more personal notifications." -msgstr "" - -#: ../../mod/notifications.php:462 -msgid "No more home notifications." -msgstr "" - -#: ../../mod/message.php:23 -msgid "No recipient selected." -msgstr "" - -#: ../../mod/message.php:26 -msgid "Unable to locate contact information." -msgstr "" - -#: ../../mod/message.php:29 -msgid "Message could not be sent." -msgstr "" - -#: ../../mod/message.php:32 -msgid "Message collection failure." -msgstr "" - -#: ../../mod/message.php:35 -msgid "Message sent." -msgstr "" - -#: ../../mod/message.php:55 -msgid "Inbox" -msgstr "" - -#: ../../mod/message.php:60 -msgid "Outbox" -msgstr "" - -#: ../../mod/message.php:65 -msgid "New Message" -msgstr "" - -#: ../../mod/message.php:91 -msgid "Message deleted." -msgstr "" - -#: ../../mod/message.php:121 -msgid "Conversation removed." -msgstr "" - -#: ../../mod/message.php:137 ../../include/conversation.php:815 -msgid "Please enter a link URL:" -msgstr "" - -#: ../../mod/message.php:145 -msgid "Send Private Message" -msgstr "" - -#: ../../mod/message.php:146 ../../mod/message.php:287 -msgid "To:" -msgstr "" - -#: ../../mod/message.php:147 ../../mod/message.php:288 -msgid "Subject:" -msgstr "" - -#: ../../mod/message.php:150 ../../mod/message.php:291 -#: ../../mod/invite.php:101 -msgid "Your message:" -msgstr "" - -#: ../../mod/message.php:153 ../../mod/message.php:294 -#: ../../mod/editpost.php:91 ../../include/conversation.php:863 -msgid "Upload photo" -msgstr "" - -#: ../../mod/message.php:154 ../../mod/message.php:295 -#: ../../mod/editpost.php:93 ../../include/conversation.php:867 -msgid "Insert web link" -msgstr "" - -#: ../../mod/message.php:155 ../../mod/message.php:296 -#: ../../mod/editpost.php:99 ../../mod/photos.php:1186 -#: ../../include/conversation.php:294 ../../include/conversation.php:631 -#: ../../include/conversation.php:879 -msgid "Please wait" -msgstr "" - -#: ../../mod/message.php:188 -msgid "No messages." -msgstr "" - -#: ../../mod/message.php:201 -msgid "Delete conversation" -msgstr "" - -#: ../../mod/message.php:204 -msgid "D, d M Y - g:i A" -msgstr "" - -#: ../../mod/message.php:239 -msgid "Message not available." -msgstr "" - -#: ../../mod/message.php:276 -msgid "Delete message" -msgstr "" - -#: ../../mod/message.php:286 -msgid "Send Reply" -msgstr "" - -#: ../../mod/wall_upload.php:56 ../../mod/profile_photo.php:113 -#, php-format -msgid "Image exceeds size limit of %d" -msgstr "" - -#: ../../mod/wall_upload.php:65 ../../mod/profile_photo.php:122 -#: ../../mod/photos.php:649 -msgid "Unable to process image." -msgstr "" - -#: ../../mod/wall_upload.php:81 ../../mod/wall_upload.php:90 -#: ../../mod/wall_upload.php:97 ../../mod/item.php:318 -#: ../../include/message.php:143 -msgid "Wall Photos" -msgstr "" - -#: ../../mod/wall_upload.php:84 ../../mod/profile_photo.php:251 -#: ../../mod/photos.php:669 -msgid "Image upload failed." -msgstr "" - -#: ../../mod/wall_attach.php:57 -#, php-format -msgid "File exceeds size limit of %d" -msgstr "" - -#: ../../mod/wall_attach.php:87 ../../mod/wall_attach.php:98 -msgid "File upload failed." -msgstr "" - -#: ../../mod/profile_photo.php:28 -msgid "Image uploaded but image cropping failed." -msgstr "" - -#: ../../mod/profile_photo.php:58 ../../mod/profile_photo.php:65 -#: ../../mod/profile_photo.php:72 ../../mod/profile_photo.php:170 -#: ../../mod/profile_photo.php:246 ../../mod/profile_photo.php:255 -#: ../../mod/register.php:327 ../../mod/register.php:334 -#: ../../mod/register.php:341 ../../mod/photos.php:146 -#: ../../mod/photos.php:593 ../../mod/photos.php:938 ../../mod/photos.php:953 -#: ../../addon/communityhome/communityhome.php:111 -msgid "Profile Photos" -msgstr "" - -#: ../../mod/profile_photo.php:61 ../../mod/profile_photo.php:68 -#: ../../mod/profile_photo.php:75 ../../mod/profile_photo.php:258 -#, php-format -msgid "Image size reduction [%s] failed." -msgstr "" - -#: ../../mod/profile_photo.php:89 -msgid "" -"Shift-reload the page or clear browser cache if the new photo does not " -"display immediately." -msgstr "" - -#: ../../mod/profile_photo.php:99 -msgid "Unable to process image" -msgstr "" - -#: ../../mod/profile_photo.php:203 -msgid "Upload File:" -msgstr "" - -#: ../../mod/profile_photo.php:204 -msgid "Upload Profile Photo" -msgstr "" - -#: ../../mod/profile_photo.php:205 -msgid "Upload" -msgstr "" - -#: ../../mod/profile_photo.php:206 -msgid "skip this step" -msgstr "" - -#: ../../mod/profile_photo.php:206 -msgid "select a photo from your photo albums" -msgstr "" - -#: ../../mod/profile_photo.php:219 -msgid "Crop Image" -msgstr "" - -#: ../../mod/profile_photo.php:220 -msgid "Please adjust the image cropping for optimum viewing." -msgstr "" - -#: ../../mod/profile_photo.php:221 -msgid "Done Editing" -msgstr "" - -#: ../../mod/profile_photo.php:249 -msgid "Image uploaded successfully." -msgstr "" - -#: ../../mod/manage.php:37 -#, php-format -msgid "Welcome back %s" -msgstr "" - -#: ../../mod/manage.php:87 -msgid "Manage Identities and/or Pages" -msgstr "" - -#: ../../mod/manage.php:90 -msgid "" -"(Toggle between different identities or community/group pages which share " -"your account details.)" -msgstr "" - -#: ../../mod/manage.php:92 -msgid "Select an identity to manage: " -msgstr "" - -#: ../../mod/tagger.php:70 ../../mod/like.php:127 ../../mod/photos.php:524 -#: ../../include/conversation.php:31 ../../include/conversation.php:104 -#: ../../include/diaspora.php:1554 -#: ../../addon/communityhome/communityhome.php:163 -msgid "photo" -msgstr "" - -#: ../../mod/tagger.php:70 ../../mod/like.php:127 -#: ../../include/conversation.php:26 ../../include/conversation.php:35 -#: ../../include/conversation.php:99 ../../include/conversation.php:108 -#: ../../include/diaspora.php:1554 ../../addon/facebook/facebook.php:1084 -#: ../../addon/communityhome/communityhome.php:158 -#: ../../addon/communityhome/communityhome.php:167 -msgid "status" -msgstr "" - -#: ../../mod/tagger.php:103 ../../include/conversation.php:116 -#, php-format -msgid "%1$s tagged %2$s's %3$s with %4$s" -msgstr "" - -#: ../../mod/common.php:34 -msgid "Common Friends" -msgstr "" - -#: ../../mod/common.php:42 -msgid "No friends in common." -msgstr "" - -#: ../../mod/profiles.php:21 ../../mod/profiles.php:239 -#: ../../mod/profiles.php:344 ../../mod/dfrn_confirm.php:62 -msgid "Profile not found." -msgstr "" - -#: ../../mod/profiles.php:28 -msgid "Profile Name is required." -msgstr "" - -#: ../../mod/profiles.php:198 -msgid "Profile updated." -msgstr "" - -#: ../../mod/profiles.php:256 -msgid "Profile deleted." -msgstr "" - -#: ../../mod/profiles.php:272 ../../mod/profiles.php:303 -msgid "Profile-" -msgstr "" - -#: ../../mod/profiles.php:291 ../../mod/profiles.php:330 -msgid "New profile created." -msgstr "" - -#: ../../mod/profiles.php:309 -msgid "Profile unavailable to clone." -msgstr "" - -#: ../../mod/profiles.php:356 -msgid "Hide your contact/friend list from viewers of this profile?" -msgstr "" - -#: ../../mod/profiles.php:374 -msgid "Edit Profile Details" -msgstr "" - -#: ../../mod/profiles.php:376 -msgid "View this profile" -msgstr "" - -#: ../../mod/profiles.php:377 -msgid "Create a new profile using these settings" -msgstr "" - -#: ../../mod/profiles.php:378 -msgid "Clone this profile" -msgstr "" - -#: ../../mod/profiles.php:379 -msgid "Delete this profile" -msgstr "" - -#: ../../mod/profiles.php:380 -msgid "Profile Name:" -msgstr "" - -#: ../../mod/profiles.php:381 -msgid "Your Full Name:" -msgstr "" - -#: ../../mod/profiles.php:382 -msgid "Title/Description:" -msgstr "" - -#: ../../mod/profiles.php:383 -msgid "Your Gender:" -msgstr "" - -#: ../../mod/profiles.php:384 -#, php-format -msgid "Birthday (%s):" -msgstr "" - -#: ../../mod/profiles.php:385 -msgid "Street Address:" -msgstr "" - -#: ../../mod/profiles.php:386 -msgid "Locality/City:" -msgstr "" - -#: ../../mod/profiles.php:387 -msgid "Postal/Zip Code:" -msgstr "" - -#: ../../mod/profiles.php:388 -msgid "Country:" -msgstr "" - -#: ../../mod/profiles.php:389 -msgid "Region/State:" -msgstr "" - -#: ../../mod/profiles.php:390 -msgid " Marital Status:" -msgstr "" - -#: ../../mod/profiles.php:391 -msgid "Who: (if applicable)" -msgstr "" - -#: ../../mod/profiles.php:392 -msgid "Examples: cathy123, Cathy Williams, cathy@example.com" -msgstr "" - -#: ../../mod/profiles.php:393 ../../include/profile_advanced.php:43 -msgid "Sexual Preference:" -msgstr "" - -#: ../../mod/profiles.php:394 -msgid "Homepage URL:" -msgstr "" - -#: ../../mod/profiles.php:395 ../../include/profile_advanced.php:47 -msgid "Political Views:" -msgstr "" - -#: ../../mod/profiles.php:396 -msgid "Religious Views:" -msgstr "" - -#: ../../mod/profiles.php:397 -msgid "Public Keywords:" -msgstr "" - -#: ../../mod/profiles.php:398 -msgid "Private Keywords:" -msgstr "" - -#: ../../mod/profiles.php:399 -msgid "Example: fishing photography software" -msgstr "" - -#: ../../mod/profiles.php:400 -msgid "(Used for suggesting potential friends, can be seen by others)" -msgstr "" - -#: ../../mod/profiles.php:401 -msgid "(Used for searching profiles, never shown to others)" -msgstr "" - -#: ../../mod/profiles.php:402 -msgid "Tell us about yourself..." -msgstr "" - -#: ../../mod/profiles.php:403 -msgid "Hobbies/Interests" -msgstr "" - -#: ../../mod/profiles.php:404 -msgid "Contact information and Social Networks" -msgstr "" - -#: ../../mod/profiles.php:405 -msgid "Musical interests" -msgstr "" - -#: ../../mod/profiles.php:406 -msgid "Books, literature" -msgstr "" - -#: ../../mod/profiles.php:407 -msgid "Television" -msgstr "" - -#: ../../mod/profiles.php:408 -msgid "Film/dance/culture/entertainment" -msgstr "" - -#: ../../mod/profiles.php:409 -msgid "Love/romance" -msgstr "" - -#: ../../mod/profiles.php:410 -msgid "Work/employment" -msgstr "" - -#: ../../mod/profiles.php:411 -msgid "School/education" -msgstr "" - -#: ../../mod/profiles.php:416 -msgid "" -"This is your public profile.
    It may " -"be visible to anybody using the internet." -msgstr "" - -#: ../../mod/profiles.php:461 -msgid "Edit/Manage Profiles" -msgstr "" - -#: ../../mod/profiles.php:462 ../../boot.php:927 -msgid "Change profile photo" -msgstr "" - -#: ../../mod/profiles.php:463 ../../boot.php:928 -msgid "Create New Profile" -msgstr "" - -#: ../../mod/profiles.php:473 ../../boot.php:938 -msgid "Profile Image" -msgstr "" - -#: ../../mod/profiles.php:475 ../../boot.php:941 -msgid "visible to everybody" -msgstr "" - -#: ../../mod/profiles.php:476 ../../boot.php:942 -msgid "Edit visibility" -msgstr "" - -#: ../../mod/openid.php:63 ../../mod/openid.php:123 ../../include/auth.php:122 -#: ../../include/auth.php:147 ../../include/auth.php:201 -msgid "Login failed." -msgstr "" - -#: ../../mod/openid.php:79 ../../include/auth.php:217 -msgid "Welcome " -msgstr "" - -#: ../../mod/openid.php:80 ../../include/auth.php:218 -msgid "Please upload a profile photo." -msgstr "" - -#: ../../mod/openid.php:83 ../../include/auth.php:221 -msgid "Welcome back " -msgstr "" - -#: ../../mod/localtime.php:12 ../../include/event.php:11 -#: ../../include/bb2diaspora.php:237 -msgid "l F d, Y \\@ g:i A" -msgstr "" - -#: ../../mod/localtime.php:24 -msgid "Time Conversion" -msgstr "" - -#: ../../mod/localtime.php:26 -msgid "" -"Friendika provides this service for sharing events with other networks and " -"friends in unknown timezones." -msgstr "" - -#: ../../mod/localtime.php:30 -#, php-format -msgid "UTC time: %s" -msgstr "" - -#: ../../mod/localtime.php:33 -#, php-format -msgid "Current timezone: %s" -msgstr "" - -#: ../../mod/localtime.php:36 -#, php-format -msgid "Converted localtime: %s" -msgstr "" - -#: ../../mod/localtime.php:41 -msgid "Please select your timezone:" -msgstr "" - -#: ../../mod/invite.php:35 -#, php-format -msgid "%s : Not a valid email address." -msgstr "" - -#: ../../mod/invite.php:59 -#, php-format -msgid "Please join my network on %s" -msgstr "" - -#: ../../mod/invite.php:69 -#, php-format -msgid "%s : Message delivery failed." -msgstr "" - -#: ../../mod/invite.php:73 -#, php-format -msgid "%d message sent." -msgid_plural "%d messages sent." -msgstr[0] "" -msgstr[1] "" - -#: ../../mod/invite.php:92 -msgid "You have no more invitations available" -msgstr "" - -#: ../../mod/invite.php:99 -msgid "Send invitations" -msgstr "" - -#: ../../mod/invite.php:100 -msgid "Enter email addresses, one per line:" -msgstr "" - -#: ../../mod/invite.php:102 -#, php-format -msgid "Please join my social network on %s" -msgstr "" - -#: ../../mod/invite.php:103 -msgid "To accept this invitation, please visit:" -msgstr "" - -#: ../../mod/invite.php:104 -msgid "You will need to supply this invitation code: $invite_code" -msgstr "" - -#: ../../mod/invite.php:104 -msgid "" -"Once you have registered, please connect with me via my profile page at:" +#: ../../mod/viewcontacts.php:40 +msgid "No contacts." msgstr "" #: ../../mod/register.php:62 @@ -1974,13 +2367,6 @@ msgstr "" msgid "Registration details for %s" msgstr "" -#: ../../mod/register.php:380 ../../mod/register.php:434 -#: ../../mod/lostpass.php:44 ../../mod/lostpass.php:106 -#: ../../mod/regmod.php:54 ../../mod/dfrn_confirm.php:710 -#: ../../include/items.php:2415 -msgid "Administrator" -msgstr "" - #: ../../mod/register.php:386 msgid "" "Registration successful. Please check your email for further instructions." @@ -2060,207 +2446,44 @@ msgstr "" msgid "Choose a nickname: " msgstr "" -#: ../../mod/register.php:554 ../../include/nav.php:77 ../../boot.php:684 +#: ../../mod/register.php:554 ../../include/nav.php:77 ../../boot.php:689 msgid "Register" msgstr "" -#: ../../mod/apps.php:4 -msgid "Applications" +#: ../../mod/dirfind.php:23 +msgid "People Search" msgstr "" -#: ../../mod/apps.php:7 -msgid "No installed applications." +#: ../../mod/like.php:127 ../../mod/tagger.php:70 +#: ../../addon/facebook/facebook.php:1091 +#: ../../addon/communityhome/communityhome.php:158 +#: ../../addon/communityhome/communityhome.php:167 +#: ../../include/diaspora.php:1587 ../../include/conversation.php:26 +#: ../../include/conversation.php:35 ../../include/conversation.php:99 +#: ../../include/conversation.php:108 +msgid "status" msgstr "" -#: ../../mod/hcard.php:10 -msgid "No profile" -msgstr "" - -#: ../../mod/fsuggest.php:63 -msgid "Friend suggestion sent." -msgstr "" - -#: ../../mod/fsuggest.php:97 -msgid "Suggest Friends" -msgstr "" - -#: ../../mod/fsuggest.php:99 +#: ../../mod/like.php:144 ../../addon/facebook/facebook.php:1095 +#: ../../addon/communityhome/communityhome.php:172 +#: ../../include/diaspora.php:1603 ../../include/conversation.php:43 #, php-format -msgid "Suggest a friend for %s" +msgid "%1$s likes %2$s's %3$s" msgstr "" -#: ../../mod/ping.php:148 -msgid "{0} wants to be your friend" -msgstr "" - -#: ../../mod/ping.php:153 -msgid "{0} sent you a message" -msgstr "" - -#: ../../mod/ping.php:158 -msgid "{0} requested registration" -msgstr "" - -#: ../../mod/ping.php:164 +#: ../../mod/like.php:146 ../../include/conversation.php:46 #, php-format -msgid "{0} commented %s's post" +msgid "%1$s doesn't like %2$s's %3$s" msgstr "" -#: ../../mod/ping.php:169 -#, php-format -msgid "{0} liked %s's post" +#: ../../mod/notice.php:15 ../../mod/viewsrc.php:15 ../../mod/admin.php:111 +#: ../../mod/admin.php:502 ../../mod/display.php:28 ../../mod/display.php:116 +#: ../../mod/viewd.php:14 ../../include/items.php:2819 +msgid "Item not found." msgstr "" -#: ../../mod/ping.php:174 -#, php-format -msgid "{0} disliked %s's post" -msgstr "" - -#: ../../mod/ping.php:179 -#, php-format -msgid "{0} is now friends with %s" -msgstr "" - -#: ../../mod/ping.php:184 -msgid "{0} posted" -msgstr "" - -#: ../../mod/ping.php:189 -#, php-format -msgid "{0} tagged %s's post with #%s" -msgstr "" - -#: ../../mod/ping.php:195 -msgid "{0} mentioned you in a post" -msgstr "" - -#: ../../mod/lostpass.php:16 -msgid "No valid account found." -msgstr "" - -#: ../../mod/lostpass.php:31 -msgid "Password reset request issued. Check your email." -msgstr "" - -#: ../../mod/lostpass.php:42 -#, php-format -msgid "Password reset requested at %s" -msgstr "" - -#: ../../mod/lostpass.php:64 -msgid "" -"Request could not be verified. (You may have previously submitted it.) " -"Password reset failed." -msgstr "" - -#: ../../mod/lostpass.php:82 ../../boot.php:714 -msgid "Password Reset" -msgstr "" - -#: ../../mod/lostpass.php:83 -msgid "Your password has been reset as requested." -msgstr "" - -#: ../../mod/lostpass.php:84 -msgid "Your new password is" -msgstr "" - -#: ../../mod/lostpass.php:85 -msgid "Save or copy your new password - and then" -msgstr "" - -#: ../../mod/lostpass.php:86 -msgid "click here to login" -msgstr "" - -#: ../../mod/lostpass.php:87 -msgid "" -"Your password may be changed from the Settings page after " -"successful login." -msgstr "" - -#: ../../mod/lostpass.php:118 -msgid "Forgot your Password?" -msgstr "" - -#: ../../mod/lostpass.php:119 -msgid "" -"Enter your email address and submit to have your password reset. Then check " -"your email for further instructions." -msgstr "" - -#: ../../mod/lostpass.php:120 -msgid "Nickname or Email: " -msgstr "" - -#: ../../mod/lostpass.php:121 -msgid "Reset" -msgstr "" - -#: ../../mod/editpost.php:17 ../../mod/editpost.php:27 -msgid "Item not found" -msgstr "" - -#: ../../mod/editpost.php:32 -msgid "Edit post" -msgstr "" - -#: ../../mod/editpost.php:75 ../../include/conversation.php:848 -msgid "Post to Email" -msgstr "" - -#: ../../mod/editpost.php:92 ../../include/conversation.php:865 -msgid "Attach file" -msgstr "" - -#: ../../mod/editpost.php:94 -msgid "Insert YouTube video" -msgstr "" - -#: ../../mod/editpost.php:95 -msgid "Insert Vorbis [.ogg] video" -msgstr "" - -#: ../../mod/editpost.php:96 -msgid "Insert Vorbis [.ogg] audio" -msgstr "" - -#: ../../mod/editpost.php:97 ../../include/conversation.php:873 -msgid "Set your location" -msgstr "" - -#: ../../mod/editpost.php:98 ../../include/conversation.php:875 -msgid "Clear browser location" -msgstr "" - -#: ../../mod/editpost.php:100 ../../include/conversation.php:880 -msgid "Permission settings" -msgstr "" - -#: ../../mod/editpost.php:108 ../../include/conversation.php:889 -msgid "CC: email addresses" -msgstr "" - -#: ../../mod/editpost.php:109 ../../include/conversation.php:890 -msgid "Public post" -msgstr "" - -#: ../../mod/editpost.php:111 ../../include/conversation.php:892 -msgid "Example: bob@example.com, mary@example.com" -msgstr "" - -#: ../../mod/removeme.php:42 ../../mod/removeme.php:45 -msgid "Remove My Account" -msgstr "" - -#: ../../mod/removeme.php:43 -msgid "" -"This will completely remove your account. Once this has been done it is not " -"recoverable." -msgstr "" - -#: ../../mod/removeme.php:44 -msgid "Please enter your password for verification:" +#: ../../mod/viewsrc.php:7 ../../mod/viewd.php:6 +msgid "Access denied." msgstr "" #: ../../mod/regmod.php:61 @@ -2276,274 +2499,217 @@ msgstr "" msgid "Please login." msgstr "" -#: ../../mod/install.php:111 -msgid "Friendica Social Communications Server - Setup" +#: ../../mod/item.php:88 +msgid "Unable to locate original post." msgstr "" -#: ../../mod/install.php:117 ../../mod/install.php:157 -#: ../../mod/install.php:229 -msgid "Database connection" +#: ../../mod/item.php:248 +msgid "Empty post discarded." msgstr "" -#: ../../mod/install.php:124 -msgid "Could not connect to database." +#: ../../mod/item.php:350 ../../mod/wall_upload.php:81 +#: ../../mod/wall_upload.php:90 ../../mod/wall_upload.php:97 +#: ../../include/message.php:143 +msgid "Wall Photos" msgstr "" -#: ../../mod/install.php:128 -msgid "Could not create table." +#: ../../mod/item.php:827 +msgid "System error. Post not saved." msgstr "" -#: ../../mod/install.php:133 -msgid "Your Friendica site database has been installed." -msgstr "" - -#: ../../mod/install.php:134 +#: ../../mod/item.php:852 +#, php-format msgid "" -"IMPORTANT: You will need to [manually] setup a scheduled task for the poller." +"This message was sent to you by %s, a member of the Friendica social network." msgstr "" -#: ../../mod/install.php:135 ../../mod/install.php:151 -#: ../../mod/install.php:209 -msgid "Please see the file \"INSTALL.txt\"." +#: ../../mod/item.php:854 +#, php-format +msgid "You may visit them online at %s" msgstr "" -#: ../../mod/install.php:137 -msgid "Proceed to registration" -msgstr "" - -#: ../../mod/install.php:143 -msgid "Proceed with Installation" -msgstr "" - -#: ../../mod/install.php:150 +#: ../../mod/item.php:855 msgid "" -"You may need to import the file \"database.sql\" manually using phpmyadmin " -"or mysql." +"Please contact the sender by replying to this post if you do not wish to " +"receive these messages." msgstr "" -#: ../../mod/install.php:158 -msgid "Database import failed." +#: ../../mod/item.php:857 +#, php-format +msgid "%s posted an update." msgstr "" -#: ../../mod/install.php:206 -msgid "System check" +#: ../../mod/profile_photo.php:28 +msgid "Image uploaded but image cropping failed." msgstr "" -#: ../../mod/install.php:210 ../../mod/events.php:213 -msgid "Next" +#: ../../mod/profile_photo.php:61 ../../mod/profile_photo.php:68 +#: ../../mod/profile_photo.php:75 ../../mod/profile_photo.php:258 +#, php-format +msgid "Image size reduction [%s] failed." msgstr "" -#: ../../mod/install.php:211 -msgid "Check again" -msgstr "" - -#: ../../mod/install.php:230 +#: ../../mod/profile_photo.php:89 msgid "" -"In order to install Friendica we need to know how to connect to your " -"database." +"Shift-reload the page or clear browser cache if the new photo does not " +"display immediately." msgstr "" -#: ../../mod/install.php:231 +#: ../../mod/profile_photo.php:99 +msgid "Unable to process image" +msgstr "" + +#: ../../mod/profile_photo.php:113 ../../mod/wall_upload.php:56 +#, php-format +msgid "Image exceeds size limit of %d" +msgstr "" + +#: ../../mod/profile_photo.php:203 +msgid "Upload File:" +msgstr "" + +#: ../../mod/profile_photo.php:204 +msgid "Upload Profile Photo" +msgstr "" + +#: ../../mod/profile_photo.php:205 +msgid "Upload" +msgstr "" + +#: ../../mod/profile_photo.php:206 +msgid "skip this step" +msgstr "" + +#: ../../mod/profile_photo.php:206 +msgid "select a photo from your photo albums" +msgstr "" + +#: ../../mod/profile_photo.php:219 +msgid "Crop Image" +msgstr "" + +#: ../../mod/profile_photo.php:220 +msgid "Please adjust the image cropping for optimum viewing." +msgstr "" + +#: ../../mod/profile_photo.php:221 +msgid "Done Editing" +msgstr "" + +#: ../../mod/profile_photo.php:249 +msgid "Image uploaded successfully." +msgstr "" + +#: ../../mod/hcard.php:10 +msgid "No profile" +msgstr "" + +#: ../../mod/removeme.php:45 ../../mod/removeme.php:48 +msgid "Remove My Account" +msgstr "" + +#: ../../mod/removeme.php:46 msgid "" -"Please contact your hosting provider or site administrator if you have " -"questions about these settings." +"This will completely remove your account. Once this has been done it is not " +"recoverable." msgstr "" -#: ../../mod/install.php:232 -msgid "" -"The database you specify below should already exist. If it does not, please " -"create it before continuing." +#: ../../mod/removeme.php:47 +msgid "Please enter your password for verification:" msgstr "" -#: ../../mod/install.php:236 -msgid "Database Server Name" +#: ../../mod/message.php:23 +msgid "No recipient selected." msgstr "" -#: ../../mod/install.php:237 -msgid "Database Login Name" +#: ../../mod/message.php:26 +msgid "Unable to locate contact information." msgstr "" -#: ../../mod/install.php:238 -msgid "Database Login Password" +#: ../../mod/message.php:29 +msgid "Message could not be sent." msgstr "" -#: ../../mod/install.php:239 -msgid "Database Name" +#: ../../mod/message.php:32 +msgid "Message collection failure." msgstr "" -#: ../../mod/install.php:240 ../../mod/install.php:279 -msgid "Site administrator email address" +#: ../../mod/message.php:35 +msgid "Message sent." msgstr "" -#: ../../mod/install.php:240 ../../mod/install.php:279 -msgid "" -"Your account email address must match this in order to use the web admin " -"panel." +#: ../../mod/message.php:55 +msgid "Inbox" msgstr "" -#: ../../mod/install.php:244 ../../mod/install.php:282 -msgid "Please select a default timezone for your website" +#: ../../mod/message.php:60 +msgid "Outbox" msgstr "" -#: ../../mod/install.php:269 -msgid "Site settings" +#: ../../mod/message.php:65 +msgid "New Message" msgstr "" -#: ../../mod/install.php:322 -msgid "Could not find a command line version of PHP in the web server PATH." +#: ../../mod/message.php:91 +msgid "Message deleted." msgstr "" -#: ../../mod/install.php:325 -msgid "PHP executable path" +#: ../../mod/message.php:121 +msgid "Conversation removed." msgstr "" -#: ../../mod/install.php:325 -msgid "Enter full path to php executable" +#: ../../mod/message.php:137 ../../include/conversation.php:843 +msgid "Please enter a link URL:" msgstr "" -#: ../../mod/install.php:330 -msgid "Command line PHP" +#: ../../mod/message.php:145 +msgid "Send Private Message" msgstr "" -#: ../../mod/install.php:339 -msgid "" -"The command line version of PHP on your system does not have " -"\"register_argc_argv\" enabled." +#: ../../mod/message.php:146 ../../mod/message.php:287 +msgid "To:" msgstr "" -#: ../../mod/install.php:340 -msgid "This is required for message delivery to work." +#: ../../mod/message.php:147 ../../mod/message.php:288 +msgid "Subject:" msgstr "" -#: ../../mod/install.php:342 -msgid "PHP \"register_argc_argv\"" +#: ../../mod/message.php:150 ../../mod/message.php:291 +#: ../../mod/invite.php:101 +msgid "Your message:" msgstr "" -#: ../../mod/install.php:363 -msgid "" -"Error: the \"openssl_pkey_new\" function on this system is not able to " -"generate encryption keys" +#: ../../mod/message.php:188 +msgid "No messages." msgstr "" -#: ../../mod/install.php:364 -msgid "" -"If running under Windows, please see \"http://www.php.net/manual/en/openssl." -"installation.php\"." +#: ../../mod/message.php:201 +msgid "Delete conversation" msgstr "" -#: ../../mod/install.php:366 -msgid "Generate encryption keys" +#: ../../mod/message.php:204 +msgid "D, d M Y - g:i A" msgstr "" -#: ../../mod/install.php:373 -msgid "libCurl PHP module" +#: ../../mod/message.php:239 +msgid "Message not available." msgstr "" -#: ../../mod/install.php:374 -msgid "GD graphics PHP module" +#: ../../mod/message.php:276 +msgid "Delete message" msgstr "" -#: ../../mod/install.php:375 -msgid "OpenSSL PHP module" +#: ../../mod/message.php:286 +msgid "Send Reply" msgstr "" -#: ../../mod/install.php:376 -msgid "mysqli PHP module" +#: ../../mod/allfriends.php:34 +#, php-format +msgid "Friends of %s" msgstr "" -#: ../../mod/install.php:377 -msgid "mb_string PHP module" -msgstr "" - -#: ../../mod/install.php:382 ../../mod/install.php:384 -msgid "Apace mod_rewrite module" -msgstr "" - -#: ../../mod/install.php:382 -msgid "" -"Error: Apache webserver mod-rewrite module is required but not installed." -msgstr "" - -#: ../../mod/install.php:389 -msgid "Error: libCURL PHP module required but not installed." -msgstr "" - -#: ../../mod/install.php:393 -msgid "" -"Error: GD graphics PHP module with JPEG support required but not installed." -msgstr "" - -#: ../../mod/install.php:397 -msgid "Error: openssl PHP module required but not installed." -msgstr "" - -#: ../../mod/install.php:401 -msgid "Error: mysqli PHP module required but not installed." -msgstr "" - -#: ../../mod/install.php:405 -msgid "Error: mb_string PHP module required but not installed." -msgstr "" - -#: ../../mod/install.php:422 -msgid "" -"The web installer needs to be able to create a file called \".htconfig.php\" " -"in the top folder of your web server and it is unable to do so." -msgstr "" - -#: ../../mod/install.php:423 -msgid "" -"This is most often a permission setting, as the web server may not be able " -"to write files in your folder - even if you can." -msgstr "" - -#: ../../mod/install.php:424 -msgid "" -"Please check with your site documentation or support people to see if this " -"situation can be corrected." -msgstr "" - -#: ../../mod/install.php:425 -msgid "" -"If not, you may be required to perform a manual installation. Please see the " -"file \"INSTALL.txt\" for instructions." -msgstr "" - -#: ../../mod/install.php:428 -msgid ".htconfig.php is writable" -msgstr "" - -#: ../../mod/install.php:435 -msgid "" -"The database configuration file \".htconfig.php\" could not be written. " -"Please use the enclosed text to create a configuration file in your web " -"server root." -msgstr "" - -#: ../../mod/install.php:460 -msgid "Errors encountered creating database tables." -msgstr "" - -#: ../../mod/community.php:21 -msgid "Not available." -msgstr "" - -#: ../../mod/community.php:30 ../../include/nav.php:97 -msgid "Community" -msgstr "" - -#: ../../mod/community.php:60 ../../mod/search.php:118 -msgid "No results." -msgstr "" - -#: ../../mod/community.php:87 -msgid "" -"Shared content is covered by the Creative Commons Attribution 3.0 license." -msgstr "" - -#: ../../mod/oexchange.php:27 -msgid "Post successful." +#: ../../mod/allfriends.php:40 +msgid "No friends to display." msgstr "" #: ../../mod/admin.php:59 ../../mod/admin.php:295 @@ -2619,7 +2785,7 @@ msgstr "" msgid "Advanced" msgstr "" -#: ../../mod/admin.php:304 ../../addon/statusnet/statusnet.php:477 +#: ../../mod/admin.php:304 ../../addon/statusnet/statusnet.php:486 msgid "Site name" msgstr "" @@ -2833,7 +2999,7 @@ msgstr "" msgid "Toggle" msgstr "" -#: ../../mod/admin.php:551 ../../include/nav.php:128 +#: ../../mod/admin.php:551 ../../include/nav.php:129 msgid "Settings" msgstr "" @@ -2883,6 +3049,393 @@ msgstr "" msgid "FTP Password" msgstr "" +#: ../../mod/profile.php:15 ../../boot.php:841 +msgid "Requested profile is not available." +msgstr "" + +#: ../../mod/profile.php:111 ../../mod/display.php:66 +msgid "Access to this profile has been restricted." +msgstr "" + +#: ../../mod/profile.php:131 +msgid "Tips for New Members" +msgstr "" + +#: ../../mod/ping.php:148 +msgid "{0} wants to be your friend" +msgstr "" + +#: ../../mod/ping.php:153 +msgid "{0} sent you a message" +msgstr "" + +#: ../../mod/ping.php:158 +msgid "{0} requested registration" +msgstr "" + +#: ../../mod/ping.php:164 +#, php-format +msgid "{0} commented %s's post" +msgstr "" + +#: ../../mod/ping.php:169 +#, php-format +msgid "{0} liked %s's post" +msgstr "" + +#: ../../mod/ping.php:174 +#, php-format +msgid "{0} disliked %s's post" +msgstr "" + +#: ../../mod/ping.php:179 +#, php-format +msgid "{0} is now friends with %s" +msgstr "" + +#: ../../mod/ping.php:184 +msgid "{0} posted" +msgstr "" + +#: ../../mod/ping.php:189 +#, php-format +msgid "{0} tagged %s's post with #%s" +msgstr "" + +#: ../../mod/ping.php:195 +msgid "{0} mentioned you in a post" +msgstr "" + +#: ../../mod/openid.php:63 ../../mod/openid.php:77 ../../include/auth.php:90 +#: ../../include/auth.php:115 ../../include/auth.php:169 +msgid "Login failed." +msgstr "" + +#: ../../mod/follow.php:27 +msgid "Connect URL missing." +msgstr "" + +#: ../../mod/follow.php:47 +msgid "" +"This site is not configured to allow communications with other networks." +msgstr "" + +#: ../../mod/follow.php:48 ../../mod/follow.php:58 +msgid "No compatible communication protocols or feeds were discovered." +msgstr "" + +#: ../../mod/follow.php:56 +msgid "The profile address specified does not provide adequate information." +msgstr "" + +#: ../../mod/follow.php:60 +msgid "An author or name was not found." +msgstr "" + +#: ../../mod/follow.php:62 +msgid "No browser URL could be matched to this address." +msgstr "" + +#: ../../mod/follow.php:69 +msgid "" +"The profile address specified belongs to a network which has been disabled " +"on this site." +msgstr "" + +#: ../../mod/follow.php:74 +msgid "" +"Limited profile. This person will be unable to receive direct/personal " +"notifications from you." +msgstr "" + +#: ../../mod/follow.php:144 +msgid "Unable to retrieve contact information." +msgstr "" + +#: ../../mod/follow.php:190 +msgid "following" +msgstr "" + +#: ../../mod/common.php:34 +msgid "Common Friends" +msgstr "" + +#: ../../mod/common.php:42 +msgid "No friends in common." +msgstr "" + +#: ../../mod/display.php:109 +msgid "Item has been removed." +msgstr "" + +#: ../../mod/apps.php:4 +msgid "Applications" +msgstr "" + +#: ../../mod/apps.php:7 +msgid "No installed applications." +msgstr "" + +#: ../../mod/search.php:83 +msgid "Search This Site" +msgstr "" + +#: ../../mod/profiles.php:21 ../../mod/profiles.php:239 +#: ../../mod/profiles.php:344 ../../mod/dfrn_confirm.php:62 +msgid "Profile not found." +msgstr "" + +#: ../../mod/profiles.php:28 +msgid "Profile Name is required." +msgstr "" + +#: ../../mod/profiles.php:198 +msgid "Profile updated." +msgstr "" + +#: ../../mod/profiles.php:256 +msgid "Profile deleted." +msgstr "" + +#: ../../mod/profiles.php:272 ../../mod/profiles.php:303 +msgid "Profile-" +msgstr "" + +#: ../../mod/profiles.php:291 ../../mod/profiles.php:330 +msgid "New profile created." +msgstr "" + +#: ../../mod/profiles.php:309 +msgid "Profile unavailable to clone." +msgstr "" + +#: ../../mod/profiles.php:356 +msgid "Hide your contact/friend list from viewers of this profile?" +msgstr "" + +#: ../../mod/profiles.php:374 +msgid "Edit Profile Details" +msgstr "" + +#: ../../mod/profiles.php:376 +msgid "View this profile" +msgstr "" + +#: ../../mod/profiles.php:377 +msgid "Create a new profile using these settings" +msgstr "" + +#: ../../mod/profiles.php:378 +msgid "Clone this profile" +msgstr "" + +#: ../../mod/profiles.php:379 +msgid "Delete this profile" +msgstr "" + +#: ../../mod/profiles.php:380 +msgid "Profile Name:" +msgstr "" + +#: ../../mod/profiles.php:381 +msgid "Your Full Name:" +msgstr "" + +#: ../../mod/profiles.php:382 +msgid "Title/Description:" +msgstr "" + +#: ../../mod/profiles.php:383 +msgid "Your Gender:" +msgstr "" + +#: ../../mod/profiles.php:384 +#, php-format +msgid "Birthday (%s):" +msgstr "" + +#: ../../mod/profiles.php:385 +msgid "Street Address:" +msgstr "" + +#: ../../mod/profiles.php:386 +msgid "Locality/City:" +msgstr "" + +#: ../../mod/profiles.php:387 +msgid "Postal/Zip Code:" +msgstr "" + +#: ../../mod/profiles.php:388 +msgid "Country:" +msgstr "" + +#: ../../mod/profiles.php:389 +msgid "Region/State:" +msgstr "" + +#: ../../mod/profiles.php:390 +msgid " Marital Status:" +msgstr "" + +#: ../../mod/profiles.php:391 +msgid "Who: (if applicable)" +msgstr "" + +#: ../../mod/profiles.php:392 +msgid "Examples: cathy123, Cathy Williams, cathy@example.com" +msgstr "" + +#: ../../mod/profiles.php:393 ../../include/profile_advanced.php:43 +msgid "Sexual Preference:" +msgstr "" + +#: ../../mod/profiles.php:394 +msgid "Homepage URL:" +msgstr "" + +#: ../../mod/profiles.php:395 ../../include/profile_advanced.php:49 +msgid "Political Views:" +msgstr "" + +#: ../../mod/profiles.php:396 +msgid "Religious Views:" +msgstr "" + +#: ../../mod/profiles.php:397 +msgid "Public Keywords:" +msgstr "" + +#: ../../mod/profiles.php:398 +msgid "Private Keywords:" +msgstr "" + +#: ../../mod/profiles.php:399 +msgid "Example: fishing photography software" +msgstr "" + +#: ../../mod/profiles.php:400 +msgid "(Used for suggesting potential friends, can be seen by others)" +msgstr "" + +#: ../../mod/profiles.php:401 +msgid "(Used for searching profiles, never shown to others)" +msgstr "" + +#: ../../mod/profiles.php:402 +msgid "Tell us about yourself..." +msgstr "" + +#: ../../mod/profiles.php:403 +msgid "Hobbies/Interests" +msgstr "" + +#: ../../mod/profiles.php:404 +msgid "Contact information and Social Networks" +msgstr "" + +#: ../../mod/profiles.php:405 +msgid "Musical interests" +msgstr "" + +#: ../../mod/profiles.php:406 +msgid "Books, literature" +msgstr "" + +#: ../../mod/profiles.php:407 +msgid "Television" +msgstr "" + +#: ../../mod/profiles.php:408 +msgid "Film/dance/culture/entertainment" +msgstr "" + +#: ../../mod/profiles.php:409 +msgid "Love/romance" +msgstr "" + +#: ../../mod/profiles.php:410 +msgid "Work/employment" +msgstr "" + +#: ../../mod/profiles.php:411 +msgid "School/education" +msgstr "" + +#: ../../mod/profiles.php:416 +msgid "" +"This is your public profile.
    It may " +"be visible to anybody using the internet." +msgstr "" + +#: ../../mod/profiles.php:426 ../../mod/directory.php:122 +msgid "Age: " +msgstr "" + +#: ../../mod/profiles.php:461 +msgid "Edit/Manage Profiles" +msgstr "" + +#: ../../mod/profiles.php:462 ../../boot.php:942 +msgid "Change profile photo" +msgstr "" + +#: ../../mod/profiles.php:463 ../../boot.php:943 +msgid "Create New Profile" +msgstr "" + +#: ../../mod/profiles.php:473 ../../boot.php:953 +msgid "Profile Image" +msgstr "" + +#: ../../mod/profiles.php:475 ../../boot.php:956 +msgid "visible to everybody" +msgstr "" + +#: ../../mod/profiles.php:476 ../../boot.php:957 +msgid "Edit visibility" +msgstr "" + +#: ../../mod/tagger.php:103 ../../include/conversation.php:116 +#, php-format +msgid "%1$s tagged %2$s's %3$s with %4$s" +msgstr "" + +#: ../../mod/delegate.php:95 +msgid "No potential page delegates located." +msgstr "" + +#: ../../mod/delegate.php:121 +msgid "Delegate Page Management" +msgstr "" + +#: ../../mod/delegate.php:123 +msgid "" +"Delegates are able to manage all aspects of this account/page except for " +"basic account settings. Please do not delegate your personal account to " +"anybody that you do not trust completely." +msgstr "" + +#: ../../mod/delegate.php:124 +msgid "Existing Page Managers" +msgstr "" + +#: ../../mod/delegate.php:126 +msgid "Existing Page Delegates" +msgstr "" + +#: ../../mod/delegate.php:128 +msgid "Potential Delegates" +msgstr "" + +#: ../../mod/delegate.php:131 +msgid "Add" +msgstr "" + +#: ../../mod/delegate.php:132 +msgid "No entries." +msgstr "" + #: ../../mod/suggest.php:38 ../../include/contact_widgets.php:35 msgid "Friend Suggestions" msgstr "" @@ -2893,1018 +3446,945 @@ msgid "" "hours." msgstr "" -#: ../../mod/suggest.php:59 ../../mod/match.php:58 -#: ../../include/contact_widgets.php:9 ../../boot.php:911 -msgid "Connect" -msgstr "" - #: ../../mod/suggest.php:61 msgid "Ignore/Hide" msgstr "" -#: ../../mod/display.php:66 ../../mod/profile.php:111 -msgid "Access to this profile has been restricted." +#: ../../mod/directory.php:49 +msgid "Global Directory" msgstr "" -#: ../../mod/display.php:108 -msgid "Item has been removed." +#: ../../mod/directory.php:55 +msgid "Normal site view" msgstr "" -#: ../../mod/like.php:144 ../../include/conversation.php:43 -#: ../../include/diaspora.php:1570 ../../addon/facebook/facebook.php:1088 -#: ../../addon/communityhome/communityhome.php:172 +#: ../../mod/directory.php:57 +msgid "Admin - View all site entries" +msgstr "" + +#: ../../mod/directory.php:63 +msgid "Find on this site" +msgstr "" + +#: ../../mod/directory.php:66 +msgid "Site Directory" +msgstr "" + +#: ../../mod/directory.php:125 +msgid "Gender: " +msgstr "" + +#: ../../mod/directory.php:151 +msgid "No entries (some entries may be hidden)." +msgstr "" + +#: ../../mod/invite.php:35 #, php-format -msgid "%1$s likes %2$s's %3$s" +msgid "%s : Not a valid email address." msgstr "" -#: ../../mod/like.php:146 ../../include/conversation.php:46 +#: ../../mod/invite.php:59 #, php-format -msgid "%1$s doesn't like %2$s's %3$s" +msgid "Please join my network on %s" msgstr "" -#: ../../mod/match.php:12 -msgid "Profile Match" +#: ../../mod/invite.php:69 +#, php-format +msgid "%s : Message delivery failed." msgstr "" -#: ../../mod/match.php:20 -msgid "No keywords to match. Please add keywords to your default profile." +#: ../../mod/invite.php:73 +#, php-format +msgid "%d message sent." +msgid_plural "%d messages sent." +msgstr[0] "" +msgstr[1] "" + +#: ../../mod/invite.php:92 +msgid "You have no more invitations available" msgstr "" -#: ../../mod/match.php:57 -msgid "is interested in:" +#: ../../mod/invite.php:99 +msgid "Send invitations" msgstr "" -#: ../../mod/notes.php:44 ../../boot.php:1335 -msgid "Personal Notes" +#: ../../mod/invite.php:100 +msgid "Enter email addresses, one per line:" msgstr "" -#: ../../mod/notes.php:63 ../../include/text.php:635 -msgid "Save" +#: ../../mod/invite.php:102 +#, php-format +msgid "Please join my social network on %s" msgstr "" -#: ../../mod/help.php:30 -msgid "Help:" +#: ../../mod/invite.php:103 +msgid "To accept this invitation, please visit:" msgstr "" -#: ../../mod/help.php:34 ../../include/nav.php:82 -msgid "Help" +#: ../../mod/invite.php:104 +msgid "You will need to supply this invitation code: $invite_code" msgstr "" -#: ../../mod/help.php:38 ../../index.php:221 -msgid "Not Found" +#: ../../mod/invite.php:104 +msgid "" +"Once you have registered, please connect with me via my profile page at:" msgstr "" -#: ../../mod/help.php:41 ../../index.php:224 -msgid "Page not found." -msgstr "" - -#: ../../mod/dfrn_confirm.php:236 +#: ../../mod/dfrn_confirm.php:238 msgid "Response from remote site was not understood." msgstr "" -#: ../../mod/dfrn_confirm.php:245 +#: ../../mod/dfrn_confirm.php:247 msgid "Unexpected response from remote site: " msgstr "" -#: ../../mod/dfrn_confirm.php:253 +#: ../../mod/dfrn_confirm.php:255 msgid "Confirmation completed successfully." msgstr "" -#: ../../mod/dfrn_confirm.php:255 ../../mod/dfrn_confirm.php:269 -#: ../../mod/dfrn_confirm.php:276 +#: ../../mod/dfrn_confirm.php:257 ../../mod/dfrn_confirm.php:271 +#: ../../mod/dfrn_confirm.php:278 msgid "Remote site reported: " msgstr "" -#: ../../mod/dfrn_confirm.php:267 +#: ../../mod/dfrn_confirm.php:269 msgid "Temporary failure. Please wait and try again." msgstr "" -#: ../../mod/dfrn_confirm.php:274 +#: ../../mod/dfrn_confirm.php:276 msgid "Introduction failed or was revoked." msgstr "" -#: ../../mod/dfrn_confirm.php:416 +#: ../../mod/dfrn_confirm.php:421 msgid "Unable to set contact photo." msgstr "" -#: ../../mod/dfrn_confirm.php:466 ../../include/conversation.php:79 -#: ../../include/diaspora.php:495 +#: ../../mod/dfrn_confirm.php:473 ../../include/diaspora.php:495 +#: ../../include/conversation.php:79 #, php-format msgid "%1$s is now friends with %2$s" msgstr "" -#: ../../mod/dfrn_confirm.php:537 +#: ../../mod/dfrn_confirm.php:543 #, php-format msgid "No user record found for '%s' " msgstr "" -#: ../../mod/dfrn_confirm.php:547 +#: ../../mod/dfrn_confirm.php:553 msgid "Our site encryption key is apparently messed up." msgstr "" -#: ../../mod/dfrn_confirm.php:558 +#: ../../mod/dfrn_confirm.php:564 msgid "Empty site URL was provided or URL could not be decrypted by us." msgstr "" -#: ../../mod/dfrn_confirm.php:579 +#: ../../mod/dfrn_confirm.php:585 msgid "Contact record was not found for you on our site." msgstr "" -#: ../../mod/dfrn_confirm.php:593 +#: ../../mod/dfrn_confirm.php:599 #, php-format msgid "Site public key not available in contact record for URL %s." msgstr "" -#: ../../mod/dfrn_confirm.php:613 +#: ../../mod/dfrn_confirm.php:619 msgid "" "The ID provided by your system is a duplicate on our system. It should work " "if you try again." msgstr "" -#: ../../mod/dfrn_confirm.php:624 +#: ../../mod/dfrn_confirm.php:630 msgid "Unable to set your contact credentials on our system." msgstr "" -#: ../../mod/dfrn_confirm.php:678 +#: ../../mod/dfrn_confirm.php:684 msgid "Unable to update your contact profile details on our system" msgstr "" -#: ../../mod/dfrn_confirm.php:708 +#: ../../mod/dfrn_confirm.php:714 #, php-format msgid "Connection accepted at %s" msgstr "" -#: ../../mod/profile.php:15 ../../boot.php:836 -msgid "Requested profile is not available." +#: ../../addon/facebook/facebook.php:337 +msgid "Facebook disabled" msgstr "" -#: ../../mod/profile.php:131 -msgid "Tips for New Members" +#: ../../addon/facebook/facebook.php:342 +msgid "Updating contacts" msgstr "" -#: ../../mod/item.php:89 -msgid "Unable to locate original post." +#: ../../addon/facebook/facebook.php:351 +msgid "Facebook API key is missing." msgstr "" -#: ../../mod/item.php:206 -msgid "Empty post discarded." +#: ../../addon/facebook/facebook.php:358 +msgid "Facebook Connect" msgstr "" -#: ../../mod/item.php:778 -msgid "System error. Post not saved." +#: ../../addon/facebook/facebook.php:364 +msgid "Install Facebook connector for this account." msgstr "" -#: ../../mod/item.php:803 -#, php-format +#: ../../addon/facebook/facebook.php:371 +msgid "Remove Facebook connector" +msgstr "" + +#: ../../addon/facebook/facebook.php:376 msgid "" -"This message was sent to you by %s, a member of the Friendica social network." +"Re-authenticate [This is necessary whenever your Facebook password is " +"changed.]" msgstr "" -#: ../../mod/item.php:805 -#, php-format -msgid "You may visit them online at %s" +#: ../../addon/facebook/facebook.php:383 +msgid "Post to Facebook by default" msgstr "" -#: ../../mod/item.php:806 +#: ../../addon/facebook/facebook.php:387 +msgid "Link all your Facebook friends and conversations on this website" +msgstr "" + +#: ../../addon/facebook/facebook.php:389 msgid "" -"Please contact the sender by replying to this post if you do not wish to " -"receive these messages." +"Facebook conversations consist of your profile wall and your friend " +"stream." msgstr "" -#: ../../mod/item.php:808 +#: ../../addon/facebook/facebook.php:390 +msgid "On this website, your Facebook friend stream is only visible to you." +msgstr "" + +#: ../../addon/facebook/facebook.php:391 +msgid "" +"The following settings determine the privacy of your Facebook profile wall " +"on this website." +msgstr "" + +#: ../../addon/facebook/facebook.php:395 +msgid "" +"On this website your Facebook profile wall conversations will only be " +"visible to you" +msgstr "" + +#: ../../addon/facebook/facebook.php:400 +msgid "Do not import your Facebook profile wall conversations" +msgstr "" + +#: ../../addon/facebook/facebook.php:402 +msgid "" +"If you choose to link conversations and leave both of these boxes unchecked, " +"your Facebook profile wall will be merged with your profile wall on this " +"website and your privacy settings on this website will be used to determine " +"who may see the conversations." +msgstr "" + +#: ../../addon/facebook/facebook.php:407 +msgid "Comma separated applications to ignore" +msgstr "" + +#: ../../addon/facebook/facebook.php:475 +#: ../../include/contact_selectors.php:81 +msgid "Facebook" +msgstr "" + +#: ../../addon/facebook/facebook.php:476 +msgid "Facebook Connector Settings" +msgstr "" + +#: ../../addon/facebook/facebook.php:490 +msgid "Post to Facebook" +msgstr "" + +#: ../../addon/facebook/facebook.php:581 +msgid "" +"Post to Facebook cancelled because of multi-network access permission " +"conflict." +msgstr "" + +#: ../../addon/facebook/facebook.php:650 +msgid "Image: " +msgstr "" + +#: ../../addon/facebook/facebook.php:727 +msgid "View on Friendica" +msgstr "" + +#: ../../addon/facebook/facebook.php:751 +msgid "Facebook post failed. Queued for retry." +msgstr "" + +#: ../../addon/facebook/facebook.php:876 ../../addon/facebook/facebook.php:885 +#: ../../include/bb2diaspora.php:113 +msgid "link" +msgstr "" + +#: ../../addon/widgets/widget_like.php:58 #, php-format -msgid "%s posted an update." -msgstr "" - -#: ../../mod/search.php:13 ../../mod/network.php:84 -msgid "Saved Searches" -msgstr "" - -#: ../../mod/search.php:16 ../../mod/network.php:75 -msgid "Remove term" -msgstr "" - -#: ../../mod/search.php:83 -msgid "Search This Site" -msgstr "" - -#: ../../mod/photos.php:42 -msgid "Photo Albums" -msgstr "" - -#: ../../mod/photos.php:50 ../../mod/photos.php:146 ../../mod/photos.php:868 -#: ../../mod/photos.php:938 ../../mod/photos.php:953 ../../mod/photos.php:1354 -#: ../../mod/photos.php:1366 ../../addon/communityhome/communityhome.php:110 -msgid "Contact Photos" -msgstr "" - -#: ../../mod/photos.php:135 -msgid "Contact information unavailable" -msgstr "" - -#: ../../mod/photos.php:156 -msgid "Album not found." -msgstr "" - -#: ../../mod/photos.php:174 ../../mod/photos.php:947 -msgid "Delete Album" -msgstr "" - -#: ../../mod/photos.php:237 ../../mod/photos.php:1166 -msgid "Delete Photo" -msgstr "" - -#: ../../mod/photos.php:524 -msgid "was tagged in a" -msgstr "" - -#: ../../mod/photos.php:524 -msgid "by" -msgstr "" - -#: ../../mod/photos.php:627 ../../addon/js_upload/js_upload.php:312 -msgid "Image exceeds size limit of " -msgstr "" - -#: ../../mod/photos.php:635 -msgid "Image file is empty." -msgstr "" - -#: ../../mod/photos.php:764 -msgid "No photos selected" -msgstr "" - -#: ../../mod/photos.php:841 -msgid "Access to this item is restricted." -msgstr "" - -#: ../../mod/photos.php:895 -msgid "Upload Photos" -msgstr "" - -#: ../../mod/photos.php:898 ../../mod/photos.php:942 -msgid "New album name: " -msgstr "" - -#: ../../mod/photos.php:899 -msgid "or existing album name: " -msgstr "" - -#: ../../mod/photos.php:900 -msgid "Do not show a status post for this upload" -msgstr "" - -#: ../../mod/photos.php:902 ../../mod/photos.php:1161 -msgid "Permissions" -msgstr "" - -#: ../../mod/photos.php:957 -msgid "Edit Album" -msgstr "" - -#: ../../mod/photos.php:967 ../../mod/photos.php:1379 -msgid "View Photo" -msgstr "" - -#: ../../mod/photos.php:1002 -msgid "Permission denied. Access to this item may be restricted." -msgstr "" - -#: ../../mod/photos.php:1004 -msgid "Photo not available" -msgstr "" - -#: ../../mod/photos.php:1054 -msgid "View photo" -msgstr "" - -#: ../../mod/photos.php:1054 -msgid "Edit photo" -msgstr "" - -#: ../../mod/photos.php:1055 -msgid "Use as profile photo" -msgstr "" - -#: ../../mod/photos.php:1061 ../../include/conversation.php:423 -msgid "Private Message" -msgstr "" - -#: ../../mod/photos.php:1072 -msgid "View Full Size" -msgstr "" - -#: ../../mod/photos.php:1140 -msgid "Tags: " -msgstr "" - -#: ../../mod/photos.php:1143 -msgid "[Remove any tag]" -msgstr "" - -#: ../../mod/photos.php:1154 -msgid "New album name" -msgstr "" - -#: ../../mod/photos.php:1157 -msgid "Caption" -msgstr "" - -#: ../../mod/photos.php:1159 -msgid "Add a Tag" -msgstr "" - -#: ../../mod/photos.php:1163 -msgid "Example: @bob, @Barbara_Jensen, @jim@example.com, #California, #camping" -msgstr "" - -#: ../../mod/photos.php:1183 ../../include/conversation.php:470 -msgid "I like this (toggle)" -msgstr "" - -#: ../../mod/photos.php:1184 ../../include/conversation.php:471 -msgid "I don't like this (toggle)" -msgstr "" - -#: ../../mod/photos.php:1185 ../../include/conversation.php:862 -msgid "Share" -msgstr "" - -#: ../../mod/photos.php:1202 ../../mod/photos.php:1242 -#: ../../mod/photos.php:1273 ../../include/conversation.php:485 -msgid "This is you" -msgstr "" - -#: ../../mod/photos.php:1204 ../../mod/photos.php:1244 -#: ../../mod/photos.php:1275 ../../include/conversation.php:487 -#: ../../boot.php:438 -msgid "Comment" -msgstr "" - -#: ../../mod/photos.php:1206 ../../include/conversation.php:489 -#: ../../include/conversation.php:897 -msgid "Preview" -msgstr "" - -#: ../../mod/photos.php:1385 -msgid "View Album" -msgstr "" - -#: ../../mod/photos.php:1394 -msgid "Recent Photos" -msgstr "" - -#: ../../mod/photos.php:1396 -msgid "Upload New Photos" -msgstr "" - -#: ../../mod/network.php:43 -msgid "Search Results For:" -msgstr "" - -#: ../../mod/network.php:85 ../../include/group.php:216 -msgid "add" -msgstr "" - -#: ../../mod/network.php:158 -msgid "Commented Order" -msgstr "" - -#: ../../mod/network.php:163 -msgid "Posted Order" -msgstr "" - -#: ../../mod/network.php:174 -msgid "New" -msgstr "" - -#: ../../mod/network.php:179 -msgid "Starred" -msgstr "" - -#: ../../mod/network.php:184 -msgid "Bookmarks" -msgstr "" - -#: ../../mod/network.php:232 -#, php-format -msgid "Warning: This group contains %s member from an insecure network." -msgid_plural "" -"Warning: This group contains %s members from an insecure network." +msgid "%d person likes this" +msgid_plural "%d people like this" msgstr[0] "" msgstr[1] "" -#: ../../mod/network.php:235 -msgid "Private messages to this group are at risk of public disclosure." -msgstr "" - -#: ../../mod/network.php:286 -msgid "No such group" -msgstr "" - -#: ../../mod/network.php:297 -msgid "Group is empty" -msgstr "" - -#: ../../mod/network.php:301 -msgid "Group: " -msgstr "" - -#: ../../mod/network.php:311 -msgid "Contact: " -msgstr "" - -#: ../../mod/network.php:313 -msgid "Private messages to this person are at risk of public disclosure." -msgstr "" - -#: ../../mod/network.php:318 -msgid "Invalid contact." -msgstr "" - -#: ../../mod/api.php:76 ../../mod/api.php:102 -msgid "Authorize application connection" -msgstr "" - -#: ../../mod/api.php:77 -msgid "Return to your app and insert this Securty Code:" -msgstr "" - -#: ../../mod/api.php:89 -msgid "Please login to continue." -msgstr "" - -#: ../../mod/api.php:104 -msgid "" -"Do you want to authorize this application to access your posts and contacts, " -"and/or create new posts for you?" -msgstr "" - -#: ../../mod/friendica.php:43 -msgid "This is Friendica, version" -msgstr "" - -#: ../../mod/friendica.php:44 -msgid "running at web location" -msgstr "" - -#: ../../mod/friendica.php:46 -msgid "" -"Please visit Friendica.com to learn " -"more about the Friendica project." -msgstr "" - -#: ../../mod/friendica.php:48 -msgid "Bug reports and issues: please visit" -msgstr "" - -#: ../../mod/friendica.php:49 -msgid "" -"Suggestions, praise, donations, etc. - please email \"Info\" at Friendica - " -"dot com" -msgstr "" - -#: ../../mod/friendica.php:54 -msgid "Installed plugins/addons/apps" -msgstr "" - -#: ../../mod/friendica.php:62 -msgid "No installed plugins/addons/apps" -msgstr "" - -#: ../../mod/attach.php:8 -msgid "Item not available." -msgstr "" - -#: ../../mod/attach.php:20 -msgid "Item was not found." -msgstr "" - -#: ../../mod/viewcontacts.php:25 ../../include/text.php:574 -msgid "View Contacts" -msgstr "" - -#: ../../mod/viewcontacts.php:40 -msgid "No contacts." -msgstr "" - -#: ../../mod/tagrm.php:41 -msgid "Tag removed" -msgstr "" - -#: ../../mod/tagrm.php:79 -msgid "Remove Item Tag" -msgstr "" - -#: ../../mod/tagrm.php:81 -msgid "Select a tag to remove: " -msgstr "" - -#: ../../mod/tagrm.php:93 -msgid "Remove" -msgstr "" - -#: ../../mod/group.php:27 -msgid "Group created." -msgstr "" - -#: ../../mod/group.php:33 -msgid "Could not create group." -msgstr "" - -#: ../../mod/group.php:43 ../../mod/group.php:123 -msgid "Group not found." -msgstr "" - -#: ../../mod/group.php:56 -msgid "Group name changed." -msgstr "" - -#: ../../mod/group.php:67 ../../mod/profperm.php:19 ../../index.php:287 -msgid "Permission denied" -msgstr "" - -#: ../../mod/group.php:82 -msgid "Create a group of contacts/friends." -msgstr "" - -#: ../../mod/group.php:83 ../../mod/group.php:166 -msgid "Group Name: " -msgstr "" - -#: ../../mod/group.php:98 -msgid "Group removed." -msgstr "" - -#: ../../mod/group.php:100 -msgid "Unable to remove group." -msgstr "" - -#: ../../mod/group.php:164 ../../mod/profperm.php:105 -msgid "Click on a contact to add or remove." -msgstr "" - -#: ../../mod/group.php:165 -msgid "Group Editor" -msgstr "" - -#: ../../mod/group.php:179 -msgid "Members" -msgstr "" - -#: ../../mod/group.php:194 -msgid "All Contacts" -msgstr "" - -#: ../../mod/events.php:61 -msgid "Event description and start time are required." -msgstr "" - -#: ../../mod/events.php:117 ../../include/nav.php:50 ../../boot.php:1330 -msgid "Events" -msgstr "" - -#: ../../mod/events.php:207 -msgid "Create New Event" -msgstr "" - -#: ../../mod/events.php:210 -msgid "Previous" -msgstr "" - -#: ../../mod/events.php:220 -msgid "l, F j" -msgstr "" - -#: ../../mod/events.php:235 -msgid "Edit event" -msgstr "" - -#: ../../mod/events.php:237 ../../include/text.php:867 -msgid "link to source" -msgstr "" - -#: ../../mod/events.php:305 -msgid "hour:minute" -msgstr "" - -#: ../../mod/events.php:314 -msgid "Event details" -msgstr "" - -#: ../../mod/events.php:315 +#: ../../addon/widgets/widget_like.php:61 #, php-format -msgid "Format is %s %s. Starting date and Description are required." -msgstr "" - -#: ../../mod/events.php:316 -msgid "Event Starts:" -msgstr "" - -#: ../../mod/events.php:319 -msgid "Finish date/time is not known or not relevant" -msgstr "" - -#: ../../mod/events.php:321 -msgid "Event Finishes:" -msgstr "" - -#: ../../mod/events.php:324 -msgid "Adjust for viewer timezone" -msgstr "" - -#: ../../mod/events.php:326 -msgid "Description:" -msgstr "" - -#: ../../mod/events.php:328 ../../include/event.php:37 -#: ../../include/bb2diaspora.php:259 ../../boot.php:961 -msgid "Location:" -msgstr "" - -#: ../../mod/events.php:330 -msgid "Share this event" -msgstr "" - -#: ../../mod/profperm.php:25 ../../mod/profperm.php:55 -msgid "Invalid profile identifier." -msgstr "" - -#: ../../mod/profperm.php:101 -msgid "Profile Visibility Editor" -msgstr "" - -#: ../../mod/profperm.php:103 ../../include/nav.php:48 -#: ../../include/profile_advanced.php:7 ../../include/profile_advanced.php:74 -#: ../../boot.php:1317 -msgid "Profile" -msgstr "" - -#: ../../mod/profperm.php:114 -msgid "Visible To" -msgstr "" - -#: ../../mod/profperm.php:130 -msgid "All Contacts (with secure profile access)" -msgstr "" - -#: ../../mod/dfrn_poll.php:90 ../../mod/dfrn_poll.php:516 -#, php-format -msgid "%s welcomes %s" -msgstr "" - -#: ../../mod/lockview.php:39 -msgid "Remote privacy information not available." -msgstr "" - -#: ../../mod/lockview.php:43 -msgid "Visible to:" -msgstr "" - -#: ../../mod/home.php:26 ../../addon/communityhome/communityhome.php:179 -#, php-format -msgid "Welcome to %s" -msgstr "" - -#: ../../include/datetime.php:43 ../../include/datetime.php:45 -msgid "Miscellaneous" -msgstr "" - -#: ../../include/datetime.php:121 ../../include/datetime.php:253 -msgid "year" -msgstr "" - -#: ../../include/datetime.php:126 ../../include/datetime.php:254 -msgid "month" -msgstr "" - -#: ../../include/datetime.php:131 ../../include/datetime.php:256 -msgid "day" -msgstr "" - -#: ../../include/datetime.php:244 -msgid "never" -msgstr "" - -#: ../../include/datetime.php:250 -msgid "less than a second ago" -msgstr "" - -#: ../../include/datetime.php:253 -msgid "years" -msgstr "" - -#: ../../include/datetime.php:254 -msgid "months" -msgstr "" - -#: ../../include/datetime.php:255 -msgid "week" -msgstr "" - -#: ../../include/datetime.php:255 -msgid "weeks" -msgstr "" - -#: ../../include/datetime.php:256 -msgid "days" -msgstr "" - -#: ../../include/datetime.php:257 -msgid "hour" -msgstr "" - -#: ../../include/datetime.php:257 -msgid "hours" -msgstr "" - -#: ../../include/datetime.php:258 -msgid "minute" -msgstr "" - -#: ../../include/datetime.php:258 -msgid "minutes" -msgstr "" - -#: ../../include/datetime.php:259 -msgid "second" -msgstr "" - -#: ../../include/datetime.php:259 -msgid "seconds" -msgstr "" - -#: ../../include/datetime.php:266 -msgid " ago" -msgstr "" - -#: ../../include/datetime.php:437 ../../include/profile_advanced.php:30 -#: ../../include/items.php:1285 -msgid "Birthday:" -msgstr "" - -#: ../../include/dba.php:39 -#, php-format -msgid "Cannot locate DNS info for database server '%s'" -msgstr "" - -#: ../../include/text.php:232 -msgid "prev" -msgstr "" - -#: ../../include/text.php:234 -msgid "first" -msgstr "" - -#: ../../include/text.php:263 -msgid "last" -msgstr "" - -#: ../../include/text.php:266 -msgid "next" -msgstr "" - -#: ../../include/text.php:553 -msgid "No contacts" -msgstr "" - -#: ../../include/text.php:562 -#, php-format -msgid "%d Contact" -msgid_plural "%d Contacts" +msgid "%d person doesn't like this" +msgid_plural "%d people don't like this" msgstr[0] "" msgstr[1] "" -#: ../../include/text.php:633 ../../include/nav.php:87 -msgid "Search" +#: ../../addon/widgets/widgets.php:55 +msgid "Generate new key" msgstr "" -#: ../../include/text.php:719 -msgid "Monday" +#: ../../addon/widgets/widgets.php:58 +msgid "Widgets key" msgstr "" -#: ../../include/text.php:719 -msgid "Tuesday" +#: ../../addon/widgets/widgets.php:60 +msgid "Widgets available" msgstr "" -#: ../../include/text.php:719 -msgid "Wednesday" +#: ../../addon/widgets/widget_friends.php:40 +msgid "Connect on Friendica!" msgstr "" -#: ../../include/text.php:719 -msgid "Thursday" +#: ../../addon/yourls/yourls.php:55 +msgid "YourLS Settings" msgstr "" -#: ../../include/text.php:719 -msgid "Friday" +#: ../../addon/yourls/yourls.php:57 +msgid "URL: http://" msgstr "" -#: ../../include/text.php:719 -msgid "Saturday" +#: ../../addon/yourls/yourls.php:62 +msgid "Username:" msgstr "" -#: ../../include/text.php:719 -msgid "Sunday" +#: ../../addon/yourls/yourls.php:67 +msgid "Password:" msgstr "" -#: ../../include/text.php:723 -msgid "January" +#: ../../addon/yourls/yourls.php:72 +msgid "Use SSL " msgstr "" -#: ../../include/text.php:723 -msgid "February" +#: ../../addon/yourls/yourls.php:92 +msgid "yourls Settings saved." msgstr "" -#: ../../include/text.php:723 -msgid "March" +#: ../../addon/nsfw/nsfw.php:47 +msgid "\"Not Safe For Work\" Settings" msgstr "" -#: ../../include/text.php:723 -msgid "April" +#: ../../addon/nsfw/nsfw.php:50 +msgid "Enable NSFW filter" msgstr "" -#: ../../include/text.php:723 -msgid "May" +#: ../../addon/nsfw/nsfw.php:53 +msgid "Comma separated words to treat as NSFW" msgstr "" -#: ../../include/text.php:723 -msgid "June" +#: ../../addon/nsfw/nsfw.php:58 +msgid "Use /expression/ to provide regular expressions" msgstr "" -#: ../../include/text.php:723 -msgid "July" +#: ../../addon/nsfw/nsfw.php:74 +msgid "NSFW Settings saved." msgstr "" -#: ../../include/text.php:723 -msgid "August" +#: ../../addon/nsfw/nsfw.php:120 +#, php-format +msgid "%s - Click to open/close" msgstr "" -#: ../../include/text.php:723 -msgid "September" -msgstr "" - -#: ../../include/text.php:723 -msgid "October" -msgstr "" - -#: ../../include/text.php:723 -msgid "November" -msgstr "" - -#: ../../include/text.php:723 -msgid "December" -msgstr "" - -#: ../../include/text.php:793 -msgid "bytes" -msgstr "" - -#: ../../include/text.php:885 -msgid "Select an alternate language" -msgstr "" - -#: ../../include/text.php:897 -msgid "default" -msgstr "" - -#: ../../include/poller.php:459 -msgid "From: " -msgstr "" - -#: ../../include/nav.php:44 ../../boot.php:700 -msgid "Logout" -msgstr "" - -#: ../../include/nav.php:44 -msgid "End this session" -msgstr "" - -#: ../../include/nav.php:47 ../../boot.php:1312 -msgid "Status" -msgstr "" - -#: ../../include/nav.php:47 ../../include/nav.php:111 -msgid "Your posts and conversations" -msgstr "" - -#: ../../include/nav.php:48 -msgid "Your profile page" -msgstr "" - -#: ../../include/nav.php:49 ../../boot.php:1322 -msgid "Photos" -msgstr "" - -#: ../../include/nav.php:49 -msgid "Your photos" -msgstr "" - -#: ../../include/nav.php:50 -msgid "Your events" -msgstr "" - -#: ../../include/nav.php:51 -msgid "Personal notes" -msgstr "" - -#: ../../include/nav.php:51 -msgid "Your personal photos" -msgstr "" - -#: ../../include/nav.php:62 ../../addon/communityhome/communityhome.php:28 -#: ../../addon/communityhome/communityhome.php:34 ../../boot.php:701 +#: ../../addon/communityhome/communityhome.php:28 +#: ../../addon/communityhome/communityhome.php:34 ../../include/nav.php:62 +#: ../../boot.php:706 msgid "Login" msgstr "" -#: ../../include/nav.php:62 -msgid "Sign in" +#: ../../addon/communityhome/communityhome.php:29 +msgid "OpenID" msgstr "" -#: ../../include/nav.php:73 -msgid "Home Page" +#: ../../addon/communityhome/communityhome.php:38 +msgid "Last users" msgstr "" -#: ../../include/nav.php:77 -msgid "Create an account" +#: ../../addon/communityhome/communityhome.php:81 +msgid "Most active users" msgstr "" -#: ../../include/nav.php:82 -msgid "Help and documentation" +#: ../../addon/communityhome/communityhome.php:98 +msgid "Last photos" msgstr "" -#: ../../include/nav.php:85 -msgid "Apps" +#: ../../addon/communityhome/communityhome.php:133 +msgid "Last likes" msgstr "" -#: ../../include/nav.php:85 -msgid "Addon applications, utilities, games" +#: ../../addon/communityhome/communityhome.php:155 +#: ../../include/conversation.php:23 ../../include/conversation.php:96 +msgid "event" msgstr "" -#: ../../include/nav.php:87 -msgid "Search site content" +#: ../../addon/uhremotestorage/uhremotestorage.php:84 +#, php-format +msgid "" +"Allow to use your friendica id (%s) to connecto to external unhosted-enabled " +"storage (like ownCloud). See RemoteStorage WebFinger" msgstr "" -#: ../../include/nav.php:97 -msgid "Conversations on this site" +#: ../../addon/uhremotestorage/uhremotestorage.php:85 +msgid "Template URL (with {category})" msgstr "" -#: ../../include/nav.php:99 -msgid "Directory" +#: ../../addon/uhremotestorage/uhremotestorage.php:86 +msgid "OAuth end-point" msgstr "" -#: ../../include/nav.php:99 -msgid "People directory" +#: ../../addon/uhremotestorage/uhremotestorage.php:87 +msgid "Api" msgstr "" -#: ../../include/nav.php:109 -msgid "Conversations from your friends" +#: ../../addon/membersince/membersince.php:18 +msgid "Member since:" msgstr "" -#: ../../include/nav.php:117 -msgid "Friend Requests" +#: ../../addon/tictac/tictac.php:20 +msgid "Three Dimensional Tic-Tac-Toe" msgstr "" -#: ../../include/nav.php:122 -msgid "Private mail" +#: ../../addon/tictac/tictac.php:53 +msgid "3D Tic-Tac-Toe" msgstr "" -#: ../../include/nav.php:125 -msgid "Manage" +#: ../../addon/tictac/tictac.php:58 +msgid "New game" msgstr "" -#: ../../include/nav.php:125 -msgid "Manage other pages" +#: ../../addon/tictac/tictac.php:59 +msgid "New game with handicap" msgstr "" -#: ../../include/nav.php:129 ../../boot.php:921 -msgid "Profiles" +#: ../../addon/tictac/tictac.php:60 +msgid "" +"Three dimensional tic-tac-toe is just like the traditional game except that " +"it is played on multiple levels simultaneously. " msgstr "" -#: ../../include/nav.php:129 ../../boot.php:921 -msgid "Manage/edit profiles" +#: ../../addon/tictac/tictac.php:61 +msgid "" +"In this case there are three levels. You win by getting three in a row on " +"any level, as well as up, down, and diagonally across the different levels." msgstr "" -#: ../../include/nav.php:130 -msgid "Manage/edit friends and contacts" +#: ../../addon/tictac/tictac.php:63 +msgid "" +"The handicap game disables the center position on the middle level because " +"the player claiming this square often has an unfair advantage." msgstr "" -#: ../../include/nav.php:137 -msgid "Admin" +#: ../../addon/tictac/tictac.php:182 +msgid "You go first..." msgstr "" -#: ../../include/nav.php:137 -msgid "Site setup and configuration" +#: ../../addon/tictac/tictac.php:187 +msgid "I'm going first this time..." msgstr "" -#: ../../include/nav.php:160 -msgid "Nothing new here" +#: ../../addon/tictac/tictac.php:193 +msgid "You won!" msgstr "" -#: ../../include/message.php:14 -msgid "[no subject]" +#: ../../addon/tictac/tictac.php:199 ../../addon/tictac/tictac.php:224 +msgid "\"Cat\" game!" msgstr "" -#: ../../include/profile_advanced.php:17 ../../boot.php:963 +#: ../../addon/tictac/tictac.php:222 +msgid "I won!" +msgstr "" + +#: ../../addon/randplace/randplace.php:171 +msgid "Randplace Settings" +msgstr "" + +#: ../../addon/randplace/randplace.php:173 +msgid "Enable Randplace Plugin" +msgstr "" + +#: ../../addon/drpost/drpost.php:35 +msgid "Post to Drupal" +msgstr "" + +#: ../../addon/drpost/drpost.php:72 +msgid "Drupal Post Settings" +msgstr "" + +#: ../../addon/drpost/drpost.php:74 +msgid "Enable Drupal Post Plugin" +msgstr "" + +#: ../../addon/drpost/drpost.php:79 +msgid "Drupal username" +msgstr "" + +#: ../../addon/drpost/drpost.php:84 +msgid "Drupal password" +msgstr "" + +#: ../../addon/drpost/drpost.php:89 +msgid "Post Type - article,page,or blog" +msgstr "" + +#: ../../addon/drpost/drpost.php:94 +msgid "Drupal site URL" +msgstr "" + +#: ../../addon/drpost/drpost.php:99 +msgid "Drupal site uses clean URLS" +msgstr "" + +#: ../../addon/drpost/drpost.php:104 +msgid "Post to Drupal by default" +msgstr "" + +#: ../../addon/drpost/drpost.php:184 ../../addon/wppost/wppost.php:172 +#: ../../addon/posterous/posterous.php:173 +msgid "Post from Friendica" +msgstr "" + +#: ../../addon/geonames/geonames.php:143 +msgid "Geonames settings updated." +msgstr "" + +#: ../../addon/geonames/geonames.php:179 +msgid "Geonames Settings" +msgstr "" + +#: ../../addon/geonames/geonames.php:181 +msgid "Enable Geonames Plugin" +msgstr "" + +#: ../../addon/js_upload/js_upload.php:43 +msgid "Upload a file" +msgstr "" + +#: ../../addon/js_upload/js_upload.php:44 +msgid "Drop files here to upload" +msgstr "" + +#: ../../addon/js_upload/js_upload.php:46 +msgid "Failed" +msgstr "" + +#: ../../addon/js_upload/js_upload.php:294 +msgid "No files were uploaded." +msgstr "" + +#: ../../addon/js_upload/js_upload.php:300 +msgid "Uploaded file is empty" +msgstr "" + +#: ../../addon/js_upload/js_upload.php:323 +msgid "File has an invalid extension, it should be one of " +msgstr "" + +#: ../../addon/js_upload/js_upload.php:334 +msgid "Upload was cancelled, or server error encountered" +msgstr "" + +#: ../../addon/oembed.old/oembed.php:30 +msgid "OEmbed settings updated" +msgstr "" + +#: ../../addon/oembed.old/oembed.php:43 +msgid "Use OEmbed for YouTube videos" +msgstr "" + +#: ../../addon/oembed.old/oembed.php:71 +msgid "URL to embed:" +msgstr "" + +#: ../../addon/impressum/impressum.php:25 +msgid "Impressum" +msgstr "" + +#: ../../addon/impressum/impressum.php:38 +#: ../../addon/impressum/impressum.php:40 +#: ../../addon/impressum/impressum.php:70 +msgid "Site Owner" +msgstr "" + +#: ../../addon/impressum/impressum.php:38 +#: ../../addon/impressum/impressum.php:74 +msgid "Email Address" +msgstr "" + +#: ../../addon/impressum/impressum.php:43 +#: ../../addon/impressum/impressum.php:72 +msgid "Postal Address" +msgstr "" + +#: ../../addon/impressum/impressum.php:49 +msgid "" +"The impressum addon needs to be configured!
    Please add at least the " +"owner variable to your config file. For other variables please " +"refer to the README file of the addon." +msgstr "" + +#: ../../addon/impressum/impressum.php:71 +msgid "Site Owners Profile" +msgstr "" + +#: ../../addon/impressum/impressum.php:73 +msgid "Notes" +msgstr "" + +#: ../../addon/buglink/buglink.php:15 +msgid "Report Bug" +msgstr "" + +#: ../../addon/blockem/blockem.php:51 +msgid "\"Blockem\" Settings" +msgstr "" + +#: ../../addon/blockem/blockem.php:53 +msgid "Comma separated profile URLS to block" +msgstr "" + +#: ../../addon/blockem/blockem.php:70 +msgid "BLOCKEM Settings saved." +msgstr "" + +#: ../../addon/blockem/blockem.php:105 +#, php-format +msgid "Blocked %s - Click to open/close" +msgstr "" + +#: ../../addon/blockem/blockem.php:160 +msgid "Unblock Author" +msgstr "" + +#: ../../addon/blockem/blockem.php:162 +msgid "Block Author" +msgstr "" + +#: ../../addon/blockem/blockem.php:194 +msgid "blockem settings updated" +msgstr "" + +#: ../../addon/editplain/editplain.php:46 +msgid "Editplain settings updated." +msgstr "" + +#: ../../addon/editplain/editplain.php:76 +msgid "Editplain Settings" +msgstr "" + +#: ../../addon/editplain/editplain.php:78 +msgid "Disable richtext status editor" +msgstr "" + +#: ../../addon/pageheader/pageheader.php:47 +msgid "\"pageheader\" Settings" +msgstr "" + +#: ../../addon/pageheader/pageheader.php:65 +msgid "pageheader Settings saved." +msgstr "" + +#: ../../addon/viewsrc/viewsrc.php:25 +msgid "View Source" +msgstr "" + +#: ../../addon/statusnet/statusnet.php:140 +msgid "Post to StatusNet" +msgstr "" + +#: ../../addon/statusnet/statusnet.php:182 +msgid "" +"Please contact your site administrator.
    The provided API URL is not " +"valid." +msgstr "" + +#: ../../addon/statusnet/statusnet.php:210 +msgid "We could not contact the StatusNet API with the Path you entered." +msgstr "" + +#: ../../addon/statusnet/statusnet.php:236 +msgid "StatusNet settings updated." +msgstr "" + +#: ../../addon/statusnet/statusnet.php:259 +msgid "StatusNet Posting Settings" +msgstr "" + +#: ../../addon/statusnet/statusnet.php:273 +msgid "Globally Available StatusNet OAuthKeys" +msgstr "" + +#: ../../addon/statusnet/statusnet.php:274 +msgid "" +"There are preconfigured OAuth key pairs for some StatusNet servers " +"available. If you are useing one of them, please use these credentials. If " +"not feel free to connect to any other StatusNet instance (see below)." +msgstr "" + +#: ../../addon/statusnet/statusnet.php:282 +msgid "Provide your own OAuth Credentials" +msgstr "" + +#: ../../addon/statusnet/statusnet.php:283 +msgid "" +"No consumer key pair for StatusNet found. Register your Friendica Account as " +"an desktop client on your StatusNet account, copy the consumer key pair here " +"and enter the API base root.
    Before you register your own OAuth key " +"pair ask the administrator if there is already a key pair for this Friendica " +"installation at your favorited StatusNet installation." +msgstr "" + +#: ../../addon/statusnet/statusnet.php:285 +msgid "OAuth Consumer Key" +msgstr "" + +#: ../../addon/statusnet/statusnet.php:288 +msgid "OAuth Consumer Secret" +msgstr "" + +#: ../../addon/statusnet/statusnet.php:291 +msgid "Base API Path (remember the trailing /)" +msgstr "" + +#: ../../addon/statusnet/statusnet.php:312 +msgid "" +"To connect to your StatusNet account click the button below to get a " +"security code from StatusNet which you have to copy into the input box below " +"and submit the form. Only your public posts will be posted " +"to StatusNet." +msgstr "" + +#: ../../addon/statusnet/statusnet.php:313 +msgid "Log in with StatusNet" +msgstr "" + +#: ../../addon/statusnet/statusnet.php:315 +msgid "Copy the security code from StatusNet here" +msgstr "" + +#: ../../addon/statusnet/statusnet.php:321 +msgid "Cancel Connection Process" +msgstr "" + +#: ../../addon/statusnet/statusnet.php:323 +msgid "Current StatusNet API is" +msgstr "" + +#: ../../addon/statusnet/statusnet.php:324 +msgid "Cancel StatusNet Connection" +msgstr "" + +#: ../../addon/statusnet/statusnet.php:335 ../../addon/twitter/twitter.php:189 +msgid "Currently connected to: " +msgstr "" + +#: ../../addon/statusnet/statusnet.php:336 +msgid "" +"If enabled all your public postings can be posted to the " +"associated StatusNet account. You can choose to do so by default (here) or " +"for every posting separately in the posting options when writing the entry." +msgstr "" + +#: ../../addon/statusnet/statusnet.php:338 +msgid "Allow posting to StatusNet" +msgstr "" + +#: ../../addon/statusnet/statusnet.php:341 +msgid "Send public postings to StatusNet by default" +msgstr "" + +#: ../../addon/statusnet/statusnet.php:346 ../../addon/twitter/twitter.php:200 +msgid "Clear OAuth configuration" +msgstr "" + +#: ../../addon/statusnet/statusnet.php:487 +msgid "API URL" +msgstr "" + +#: ../../addon/tumblr/tumblr.php:36 +msgid "Post to Tumblr" +msgstr "" + +#: ../../addon/tumblr/tumblr.php:67 +msgid "Tumblr Post Settings" +msgstr "" + +#: ../../addon/tumblr/tumblr.php:69 +msgid "Enable Tumblr Post Plugin" +msgstr "" + +#: ../../addon/tumblr/tumblr.php:74 +msgid "Tumblr login" +msgstr "" + +#: ../../addon/tumblr/tumblr.php:79 +msgid "Tumblr password" +msgstr "" + +#: ../../addon/tumblr/tumblr.php:84 +msgid "Post to Tumblr by default" +msgstr "" + +#: ../../addon/numfriends/numfriends.php:46 +msgid "Numfriends settings updated." +msgstr "" + +#: ../../addon/numfriends/numfriends.php:77 +msgid "Numfriends Settings" +msgstr "" + +#: ../../addon/numfriends/numfriends.php:79 +msgid "How many contacts to display on profile sidebar" +msgstr "" + +#: ../../addon/wppost/wppost.php:42 +msgid "Post to Wordpress" +msgstr "" + +#: ../../addon/wppost/wppost.php:74 +msgid "WordPress Post Settings" +msgstr "" + +#: ../../addon/wppost/wppost.php:76 +msgid "Enable WordPress Post Plugin" +msgstr "" + +#: ../../addon/wppost/wppost.php:81 +msgid "WordPress username" +msgstr "" + +#: ../../addon/wppost/wppost.php:86 +msgid "WordPress password" +msgstr "" + +#: ../../addon/wppost/wppost.php:91 +msgid "WordPress API URL" +msgstr "" + +#: ../../addon/wppost/wppost.php:96 +msgid "Post to WordPress by default" +msgstr "" + +#: ../../addon/piwik/piwik.php:70 +msgid "" +"This website is tracked using the Piwik " +"analytics tool." +msgstr "" + +#: ../../addon/piwik/piwik.php:73 +#, php-format +msgid "" +"If you do not want that your visits are logged this way you can " +"set a cookie to prevent Piwik from tracking further visits of the site " +"(opt-out)." +msgstr "" + +#: ../../addon/piwik/piwik.php:82 +msgid "Piwik Base URL" +msgstr "" + +#: ../../addon/piwik/piwik.php:83 +msgid "Site ID" +msgstr "" + +#: ../../addon/piwik/piwik.php:84 +msgid "Show opt-out cookie link?" +msgstr "" + +#: ../../addon/twitter/twitter.php:78 +msgid "Post to Twitter" +msgstr "" + +#: ../../addon/twitter/twitter.php:124 +msgid "Twitter settings updated." +msgstr "" + +#: ../../addon/twitter/twitter.php:146 +msgid "Twitter Posting Settings" +msgstr "" + +#: ../../addon/twitter/twitter.php:153 +msgid "" +"No consumer key pair for Twitter found. Please contact your site " +"administrator." +msgstr "" + +#: ../../addon/twitter/twitter.php:172 +msgid "" +"At this Friendica instance the Twitter plugin was enabled but you have not " +"yet connected your account to your Twitter account. To do so click the " +"button below to get a PIN from Twitter which you have to copy into the input " +"box below and submit the form. Only your public posts will " +"be posted to Twitter." +msgstr "" + +#: ../../addon/twitter/twitter.php:173 +msgid "Log in with Twitter" +msgstr "" + +#: ../../addon/twitter/twitter.php:175 +msgid "Copy the PIN from Twitter here" +msgstr "" + +#: ../../addon/twitter/twitter.php:190 +msgid "" +"If enabled all your public postings can be posted to the " +"associated Twitter account. You can choose to do so by default (here) or for " +"every posting separately in the posting options when writing the entry." +msgstr "" + +#: ../../addon/twitter/twitter.php:192 +msgid "Allow posting to Twitter" +msgstr "" + +#: ../../addon/twitter/twitter.php:195 +msgid "Send public postings to Twitter by default" +msgstr "" + +#: ../../addon/twitter/twitter.php:317 +msgid "Consumer key" +msgstr "" + +#: ../../addon/twitter/twitter.php:318 +msgid "Consumer secret" +msgstr "" + +#: ../../addon/posterous/posterous.php:36 +msgid "Post to Posterous" +msgstr "" + +#: ../../addon/posterous/posterous.php:67 +msgid "Posterous Post Settings" +msgstr "" + +#: ../../addon/posterous/posterous.php:69 +msgid "Enable Posterous Post Plugin" +msgstr "" + +#: ../../addon/posterous/posterous.php:74 +msgid "Posterous login" +msgstr "" + +#: ../../addon/posterous/posterous.php:79 +msgid "Posterous password" +msgstr "" + +#: ../../addon/posterous/posterous.php:84 +msgid "Post to Posterous by default" +msgstr "" + +#: ../../include/profile_advanced.php:17 ../../boot.php:978 msgid "Gender:" msgstr "" @@ -3916,76 +4396,141 @@ msgstr "" msgid "j F" msgstr "" +#: ../../include/profile_advanced.php:30 ../../include/datetime.php:438 +#: ../../include/items.php:1318 +msgid "Birthday:" +msgstr "" + #: ../../include/profile_advanced.php:34 msgid "Age:" msgstr "" -#: ../../include/profile_advanced.php:37 ../../boot.php:966 +#: ../../include/profile_advanced.php:37 ../../boot.php:981 msgid "Status:" msgstr "" -#: ../../include/profile_advanced.php:45 ../../boot.php:968 +#: ../../include/profile_advanced.php:45 ../../boot.php:983 msgid "Homepage:" msgstr "" -#: ../../include/profile_advanced.php:49 -msgid "Religion:" +#: ../../include/profile_advanced.php:47 +msgid "Tags:" msgstr "" #: ../../include/profile_advanced.php:51 -msgid "About:" +msgid "Religion:" msgstr "" #: ../../include/profile_advanced.php:53 -msgid "Hobbies/Interests:" +msgid "About:" msgstr "" #: ../../include/profile_advanced.php:55 -msgid "Contact information and Social Networks:" +msgid "Hobbies/Interests:" msgstr "" #: ../../include/profile_advanced.php:57 -msgid "Musical interests:" +msgid "Contact information and Social Networks:" msgstr "" #: ../../include/profile_advanced.php:59 -msgid "Books, literature:" +msgid "Musical interests:" msgstr "" #: ../../include/profile_advanced.php:61 -msgid "Television:" +msgid "Books, literature:" msgstr "" #: ../../include/profile_advanced.php:63 -msgid "Film/dance/culture/entertainment:" +msgid "Television:" msgstr "" #: ../../include/profile_advanced.php:65 -msgid "Love/Romance:" +msgid "Film/dance/culture/entertainment:" msgstr "" #: ../../include/profile_advanced.php:67 -msgid "Work/employment:" +msgid "Love/Romance:" msgstr "" #: ../../include/profile_advanced.php:69 +msgid "Work/employment:" +msgstr "" + +#: ../../include/profile_advanced.php:71 msgid "School/education:" msgstr "" -#: ../../include/event.php:17 ../../include/bb2diaspora.php:243 -msgid "Starts:" +#: ../../include/contact_selectors.php:32 +msgid "Unknown | Not categorised" msgstr "" -#: ../../include/event.php:27 ../../include/bb2diaspora.php:251 -msgid "Finishes:" +#: ../../include/contact_selectors.php:33 +msgid "Block immediately" msgstr "" -#: ../../include/items.php:2413 -msgid "A new person is sharing with you at " +#: ../../include/contact_selectors.php:34 +msgid "Shady, spammer, self-marketer" msgstr "" -#: ../../include/items.php:2413 -msgid "You have a new follower at " +#: ../../include/contact_selectors.php:35 +msgid "Known to me, but no opinion" +msgstr "" + +#: ../../include/contact_selectors.php:36 +msgid "OK, probably harmless" +msgstr "" + +#: ../../include/contact_selectors.php:37 +msgid "Reputable, has my trust" +msgstr "" + +#: ../../include/contact_selectors.php:56 +msgid "Frequently" +msgstr "" + +#: ../../include/contact_selectors.php:57 +msgid "Hourly" +msgstr "" + +#: ../../include/contact_selectors.php:58 +msgid "Twice daily" +msgstr "" + +#: ../../include/contact_selectors.php:59 +msgid "Daily" +msgstr "" + +#: ../../include/contact_selectors.php:60 +msgid "Weekly" +msgstr "" + +#: ../../include/contact_selectors.php:61 +msgid "Monthly" +msgstr "" + +#: ../../include/contact_selectors.php:77 +msgid "OStatus" +msgstr "" + +#: ../../include/contact_selectors.php:78 +msgid "RSS/Atom" +msgstr "" + +#: ../../include/contact_selectors.php:82 +msgid "Zot!" +msgstr "" + +#: ../../include/contact_selectors.php:83 +msgid "LinkedIn" +msgstr "" + +#: ../../include/contact_selectors.php:84 +msgid "XMPP/IM" +msgstr "" + +#: ../../include/contact_selectors.php:85 +msgid "MySpace" msgstr "" #: ../../include/profile_selectors.php:6 @@ -4200,444 +4745,155 @@ msgstr "" msgid "Ask me" msgstr "" -#: ../../include/Contact.php:125 ../../include/conversation.php:723 -msgid "View status" +#: ../../include/event.php:17 ../../include/bb2diaspora.php:255 +msgid "Starts:" msgstr "" -#: ../../include/Contact.php:126 ../../include/conversation.php:724 -msgid "View profile" +#: ../../include/event.php:27 ../../include/bb2diaspora.php:263 +msgid "Finishes:" msgstr "" -#: ../../include/Contact.php:127 ../../include/conversation.php:725 -msgid "View photos" -msgstr "" - -#: ../../include/Contact.php:128 ../../include/Contact.php:141 -#: ../../include/conversation.php:726 -msgid "View recent" -msgstr "" - -#: ../../include/Contact.php:130 ../../include/Contact.php:141 -#: ../../include/conversation.php:728 -msgid "Send PM" -msgstr "" - -#: ../../include/conversation.php:23 ../../include/conversation.php:96 -#: ../../addon/communityhome/communityhome.php:155 -msgid "event" -msgstr "" - -#: ../../include/conversation.php:252 ../../include/conversation.php:508 -msgid "Select" -msgstr "" - -#: ../../include/conversation.php:267 ../../include/conversation.php:602 -#: ../../include/conversation.php:603 -#, php-format -msgid "View %s's profile @ %s" -msgstr "" - -#: ../../include/conversation.php:276 ../../include/conversation.php:614 -#, php-format -msgid "%s from %s" -msgstr "" - -#: ../../include/conversation.php:292 -msgid "View in context" -msgstr "" - -#: ../../include/conversation.php:407 -#, php-format -msgid "%d comment" -msgid_plural "%d comments" -msgstr[0] "" -msgstr[1] "" - -#: ../../include/conversation.php:410 ../../boot.php:439 -msgid "show more" -msgstr "" - -#: ../../include/conversation.php:470 -msgid "like" -msgstr "" - -#: ../../include/conversation.php:471 -msgid "dislike" -msgstr "" - -#: ../../include/conversation.php:473 -msgid "Share this" -msgstr "" - -#: ../../include/conversation.php:473 -msgid "share" -msgstr "" - -#: ../../include/conversation.php:518 -msgid "add star" -msgstr "" - -#: ../../include/conversation.php:519 -msgid "remove star" -msgstr "" - -#: ../../include/conversation.php:520 -msgid "toggle star status" -msgstr "" - -#: ../../include/conversation.php:523 -msgid "starred" -msgstr "" - -#: ../../include/conversation.php:524 -msgid "add tag" -msgstr "" - -#: ../../include/conversation.php:604 -msgid "to" -msgstr "" - -#: ../../include/conversation.php:605 -msgid "Wall-to-Wall" -msgstr "" - -#: ../../include/conversation.php:606 -msgid "via Wall-To-Wall:" -msgstr "" - -#: ../../include/conversation.php:648 -msgid "Delete Selected Items" -msgstr "" - -#: ../../include/conversation.php:778 -#, php-format -msgid "%s likes this." -msgstr "" - -#: ../../include/conversation.php:778 -#, php-format -msgid "%s doesn't like this." -msgstr "" - -#: ../../include/conversation.php:782 -#, php-format -msgid "%2$d people like this." -msgstr "" - -#: ../../include/conversation.php:784 -#, php-format -msgid "%2$d people don't like this." -msgstr "" - -#: ../../include/conversation.php:790 -msgid "and" -msgstr "" - -#: ../../include/conversation.php:793 -#, php-format -msgid ", and %d other people" -msgstr "" - -#: ../../include/conversation.php:794 -#, php-format -msgid "%s like this." -msgstr "" - -#: ../../include/conversation.php:794 -#, php-format -msgid "%s don't like this." -msgstr "" - -#: ../../include/conversation.php:814 -msgid "Visible to everybody" -msgstr "" - -#: ../../include/conversation.php:816 -msgid "Please enter a video link/URL:" -msgstr "" - -#: ../../include/conversation.php:817 -msgid "Please enter an audio link/URL:" -msgstr "" - -#: ../../include/conversation.php:818 -msgid "Tag term:" -msgstr "" - -#: ../../include/conversation.php:819 -msgid "Where are you right now?" -msgstr "" - -#: ../../include/conversation.php:820 -msgid "Enter a title for this item" -msgstr "" - -#: ../../include/conversation.php:864 -msgid "upload photo" -msgstr "" - -#: ../../include/conversation.php:866 -msgid "attach file" -msgstr "" - -#: ../../include/conversation.php:868 -msgid "web link" -msgstr "" - -#: ../../include/conversation.php:869 -msgid "Insert video link" -msgstr "" - -#: ../../include/conversation.php:870 -msgid "video link" -msgstr "" - -#: ../../include/conversation.php:871 -msgid "Insert audio link" -msgstr "" - -#: ../../include/conversation.php:872 -msgid "audio link" -msgstr "" - -#: ../../include/conversation.php:874 -msgid "set location" -msgstr "" - -#: ../../include/conversation.php:876 -msgid "clear location" -msgstr "" - -#: ../../include/conversation.php:878 -msgid "Set title" -msgstr "" - -#: ../../include/conversation.php:881 -msgid "permissions" -msgstr "" - -#: ../../include/notifier.php:628 ../../include/delivery.php:415 +#: ../../include/delivery.php:416 ../../include/notifier.php:629 msgid "(no subject)" msgstr "" -#: ../../include/notifier.php:635 ../../include/enotify.php:16 +#: ../../include/delivery.php:423 ../../include/enotify.php:16 +#: ../../include/notifier.php:636 msgid "noreply" msgstr "" +#: ../../include/text.php:232 +msgid "prev" +msgstr "" + +#: ../../include/text.php:234 +msgid "first" +msgstr "" + +#: ../../include/text.php:263 +msgid "last" +msgstr "" + +#: ../../include/text.php:266 +msgid "next" +msgstr "" + +#: ../../include/text.php:557 +msgid "No contacts" +msgstr "" + +#: ../../include/text.php:566 +#, php-format +msgid "%d Contact" +msgid_plural "%d Contacts" +msgstr[0] "" +msgstr[1] "" + +#: ../../include/text.php:637 ../../include/nav.php:87 +msgid "Search" +msgstr "" + +#: ../../include/text.php:735 +msgid "Monday" +msgstr "" + +#: ../../include/text.php:735 +msgid "Tuesday" +msgstr "" + +#: ../../include/text.php:735 +msgid "Wednesday" +msgstr "" + +#: ../../include/text.php:735 +msgid "Thursday" +msgstr "" + +#: ../../include/text.php:735 +msgid "Friday" +msgstr "" + +#: ../../include/text.php:735 +msgid "Saturday" +msgstr "" + +#: ../../include/text.php:735 +msgid "Sunday" +msgstr "" + +#: ../../include/text.php:739 +msgid "January" +msgstr "" + +#: ../../include/text.php:739 +msgid "February" +msgstr "" + +#: ../../include/text.php:739 +msgid "March" +msgstr "" + +#: ../../include/text.php:739 +msgid "April" +msgstr "" + +#: ../../include/text.php:739 +msgid "May" +msgstr "" + +#: ../../include/text.php:739 +msgid "June" +msgstr "" + +#: ../../include/text.php:739 +msgid "July" +msgstr "" + +#: ../../include/text.php:739 +msgid "August" +msgstr "" + +#: ../../include/text.php:739 +msgid "September" +msgstr "" + +#: ../../include/text.php:739 +msgid "October" +msgstr "" + +#: ../../include/text.php:739 +msgid "November" +msgstr "" + +#: ../../include/text.php:739 +msgid "December" +msgstr "" + +#: ../../include/text.php:809 +msgid "bytes" +msgstr "" + +#: ../../include/text.php:901 +msgid "Select an alternate language" +msgstr "" + +#: ../../include/text.php:913 +msgid "default" +msgstr "" + #: ../../include/diaspora.php:570 msgid "Sharing notification from Diaspora network" msgstr "" -#: ../../include/diaspora.php:1862 +#: ../../include/diaspora.php:1895 msgid "Attachments:" msgstr "" -#: ../../include/diaspora.php:2045 +#: ../../include/diaspora.php:2078 #, php-format msgid "[Relayed] Comment authored by %s from network %s" msgstr "" -#: ../../include/bb2diaspora.php:53 -msgid "view full size" -msgstr "" - -#: ../../include/bb2diaspora.php:102 ../../include/bb2diaspora.php:112 -msgid "image/photo" -msgstr "" - -#: ../../include/bb2diaspora.php:102 ../../addon/facebook/facebook.php:869 -#: ../../addon/facebook/facebook.php:878 -msgid "link" -msgstr "" - -#: ../../include/acl_selectors.php:279 -msgid "Visible to everybody" -msgstr "" - -#: ../../include/acl_selectors.php:280 -msgid "show" -msgstr "" - -#: ../../include/acl_selectors.php:281 -msgid "don't show" -msgstr "" - -#: ../../include/enotify.php:8 -msgid "Friendica Notification" -msgstr "" - -#: ../../include/enotify.php:11 -msgid "Thank You," -msgstr "" - -#: ../../include/enotify.php:13 -#, php-format -msgid "%s Administrator" -msgstr "" - -#: ../../include/enotify.php:28 -#, php-format -msgid "New mail received at %s" -msgstr "" - -#: ../../include/enotify.php:30 -#, php-format -msgid "%s sent you a new private message at %s." -msgstr "" - -#: ../../include/enotify.php:32 -#, php-format -msgid "Please visit %s to view and/or reply to your private messages." -msgstr "" - -#: ../../include/enotify.php:40 -#, php-format -msgid "%s commented on an item at %s" -msgstr "" - -#: ../../include/enotify.php:41 -#, php-format -msgid "%s commented on an item/conversation you have been following." -msgstr "" - -#: ../../include/enotify.php:42 ../../include/enotify.php:51 -#, php-format -msgid "Please visit %s to view and/or reply to the conversation." -msgstr "" - -#: ../../include/enotify.php:49 -#, php-format -msgid "%s posted to your profile wall at %s" -msgstr "" - -#: ../../include/enotify.php:58 -#, php-format -msgid "Introduction received at %s" -msgstr "" - -#: ../../include/enotify.php:59 -#, php-format -msgid "You've received an introduction from '%s' at %s" -msgstr "" - -#: ../../include/enotify.php:60 ../../include/enotify.php:73 -#, php-format -msgid "You may visit their profile at %s" -msgstr "" - -#: ../../include/enotify.php:62 -#, php-format -msgid "Please visit %s to approve or reject the introduction." -msgstr "" - -#: ../../include/enotify.php:69 -#, php-format -msgid "Friend suggestion received at %s" -msgstr "" - -#: ../../include/enotify.php:70 -#, php-format -msgid "You've received a friend suggestion from '%s' at %s" -msgstr "" - -#: ../../include/enotify.php:71 -msgid "Name:" -msgstr "" - -#: ../../include/enotify.php:72 -msgid "Photo:" -msgstr "" - -#: ../../include/enotify.php:75 -#, php-format -msgid "Please visit %s to approve or reject the suggestion." -msgstr "" - -#: ../../include/bbcode.php:166 ../../include/bbcode.php:225 -msgid "Image/photo" -msgstr "" - -#: ../../include/contact_selectors.php:32 -msgid "Unknown | Not categorised" -msgstr "" - -#: ../../include/contact_selectors.php:33 -msgid "Block immediately" -msgstr "" - -#: ../../include/contact_selectors.php:34 -msgid "Shady, spammer, self-marketer" -msgstr "" - -#: ../../include/contact_selectors.php:35 -msgid "Known to me, but no opinion" -msgstr "" - -#: ../../include/contact_selectors.php:36 -msgid "OK, probably harmless" -msgstr "" - -#: ../../include/contact_selectors.php:37 -msgid "Reputable, has my trust" -msgstr "" - -#: ../../include/contact_selectors.php:56 -msgid "Frequently" -msgstr "" - -#: ../../include/contact_selectors.php:57 -msgid "Hourly" -msgstr "" - -#: ../../include/contact_selectors.php:58 -msgid "Twice daily" -msgstr "" - -#: ../../include/contact_selectors.php:59 -msgid "Daily" -msgstr "" - -#: ../../include/contact_selectors.php:60 -msgid "Weekly" -msgstr "" - -#: ../../include/contact_selectors.php:61 -msgid "Monthly" -msgstr "" - -#: ../../include/contact_selectors.php:77 -msgid "OStatus" -msgstr "" - -#: ../../include/contact_selectors.php:78 -msgid "RSS/Atom" -msgstr "" - -#: ../../include/contact_selectors.php:81 -#: ../../addon/facebook/facebook.php:475 -msgid "Facebook" -msgstr "" - -#: ../../include/contact_selectors.php:82 -msgid "Zot!" -msgstr "" - -#: ../../include/contact_selectors.php:83 -msgid "LinkedIn" -msgstr "" - -#: ../../include/contact_selectors.php:84 -msgid "XMPP/IM" -msgstr "" - -#: ../../include/contact_selectors.php:85 -msgid "MySpace" -msgstr "" - -#: ../../include/auth.php:27 -msgid "Logged out." -msgstr "" - #: ../../include/oembed.php:128 msgid "Embedded content" msgstr "" @@ -4673,6 +4929,134 @@ msgstr "" msgid "Create a new group" msgstr "" +#: ../../include/nav.php:44 ../../boot.php:705 +msgid "Logout" +msgstr "" + +#: ../../include/nav.php:44 +msgid "End this session" +msgstr "" + +#: ../../include/nav.php:47 ../../boot.php:1327 +msgid "Status" +msgstr "" + +#: ../../include/nav.php:47 ../../include/nav.php:111 +msgid "Your posts and conversations" +msgstr "" + +#: ../../include/nav.php:48 +msgid "Your profile page" +msgstr "" + +#: ../../include/nav.php:49 ../../boot.php:1337 +msgid "Photos" +msgstr "" + +#: ../../include/nav.php:49 +msgid "Your photos" +msgstr "" + +#: ../../include/nav.php:50 +msgid "Your events" +msgstr "" + +#: ../../include/nav.php:51 +msgid "Personal notes" +msgstr "" + +#: ../../include/nav.php:51 +msgid "Your personal photos" +msgstr "" + +#: ../../include/nav.php:62 +msgid "Sign in" +msgstr "" + +#: ../../include/nav.php:73 +msgid "Home Page" +msgstr "" + +#: ../../include/nav.php:77 +msgid "Create an account" +msgstr "" + +#: ../../include/nav.php:82 +msgid "Help and documentation" +msgstr "" + +#: ../../include/nav.php:85 +msgid "Apps" +msgstr "" + +#: ../../include/nav.php:85 +msgid "Addon applications, utilities, games" +msgstr "" + +#: ../../include/nav.php:87 +msgid "Search site content" +msgstr "" + +#: ../../include/nav.php:97 +msgid "Conversations on this site" +msgstr "" + +#: ../../include/nav.php:99 +msgid "Directory" +msgstr "" + +#: ../../include/nav.php:99 +msgid "People directory" +msgstr "" + +#: ../../include/nav.php:109 +msgid "Conversations from your friends" +msgstr "" + +#: ../../include/nav.php:117 +msgid "Friend Requests" +msgstr "" + +#: ../../include/nav.php:119 +msgid "See all notifications" +msgstr "" + +#: ../../include/nav.php:123 +msgid "Private mail" +msgstr "" + +#: ../../include/nav.php:126 +msgid "Manage" +msgstr "" + +#: ../../include/nav.php:126 +msgid "Manage other pages" +msgstr "" + +#: ../../include/nav.php:130 ../../boot.php:936 +msgid "Profiles" +msgstr "" + +#: ../../include/nav.php:130 ../../boot.php:936 +msgid "Manage/edit profiles" +msgstr "" + +#: ../../include/nav.php:131 +msgid "Manage/edit friends and contacts" +msgstr "" + +#: ../../include/nav.php:138 +msgid "Admin" +msgstr "" + +#: ../../include/nav.php:138 +msgid "Site setup and configuration" +msgstr "" + +#: ../../include/nav.php:161 +msgid "Nothing new here" +msgstr "" + #: ../../include/contact_widgets.php:6 msgid "Add New Contact" msgstr "" @@ -4724,695 +5108,519 @@ msgstr "" msgid "All Networks" msgstr "" -#: ../../addon/facebook/facebook.php:337 -msgid "Facebook disabled" +#: ../../include/auth.php:29 +msgid "Logged out." msgstr "" -#: ../../addon/facebook/facebook.php:342 -msgid "Updating contacts" +#: ../../include/datetime.php:43 ../../include/datetime.php:45 +msgid "Miscellaneous" msgstr "" -#: ../../addon/facebook/facebook.php:351 -msgid "Facebook API key is missing." +#: ../../include/datetime.php:121 ../../include/datetime.php:253 +msgid "year" msgstr "" -#: ../../addon/facebook/facebook.php:358 -msgid "Facebook Connect" +#: ../../include/datetime.php:126 ../../include/datetime.php:254 +msgid "month" msgstr "" -#: ../../addon/facebook/facebook.php:364 -msgid "Install Facebook connector for this account." +#: ../../include/datetime.php:131 ../../include/datetime.php:256 +msgid "day" msgstr "" -#: ../../addon/facebook/facebook.php:371 -msgid "Remove Facebook connector" +#: ../../include/datetime.php:244 +msgid "never" msgstr "" -#: ../../addon/facebook/facebook.php:376 -msgid "" -"Re-authenticate [This is necessary whenever your Facebook password is " -"changed.]" +#: ../../include/datetime.php:250 +msgid "less than a second ago" msgstr "" -#: ../../addon/facebook/facebook.php:383 -msgid "Post to Facebook by default" +#: ../../include/datetime.php:253 +msgid "years" msgstr "" -#: ../../addon/facebook/facebook.php:387 -msgid "Link all your Facebook friends and conversations on this website" +#: ../../include/datetime.php:254 +msgid "months" msgstr "" -#: ../../addon/facebook/facebook.php:389 -msgid "" -"Facebook conversations consist of your profile wall and your friend " -"stream." +#: ../../include/datetime.php:255 +msgid "week" msgstr "" -#: ../../addon/facebook/facebook.php:390 -msgid "On this website, your Facebook friend stream is only visible to you." +#: ../../include/datetime.php:255 +msgid "weeks" msgstr "" -#: ../../addon/facebook/facebook.php:391 -msgid "" -"The following settings determine the privacy of your Facebook profile wall " -"on this website." +#: ../../include/datetime.php:256 +msgid "days" msgstr "" -#: ../../addon/facebook/facebook.php:395 -msgid "" -"On this website your Facebook profile wall conversations will only be " -"visible to you" +#: ../../include/datetime.php:257 +msgid "hour" msgstr "" -#: ../../addon/facebook/facebook.php:400 -msgid "Do not import your Facebook profile wall conversations" +#: ../../include/datetime.php:257 +msgid "hours" msgstr "" -#: ../../addon/facebook/facebook.php:402 -msgid "" -"If you choose to link conversations and leave both of these boxes unchecked, " -"your Facebook profile wall will be merged with your profile wall on this " -"website and your privacy settings on this website will be used to determine " -"who may see the conversations." +#: ../../include/datetime.php:258 +msgid "minute" msgstr "" -#: ../../addon/facebook/facebook.php:407 -msgid "Comma separated applications to ignore" +#: ../../include/datetime.php:258 +msgid "minutes" msgstr "" -#: ../../addon/facebook/facebook.php:476 -msgid "Facebook Connector Settings" +#: ../../include/datetime.php:259 +msgid "second" msgstr "" -#: ../../addon/facebook/facebook.php:490 -msgid "Post to Facebook" +#: ../../include/datetime.php:259 +msgid "seconds" msgstr "" -#: ../../addon/facebook/facebook.php:581 -msgid "" -"Post to Facebook cancelled because of multi-network access permission " -"conflict." -msgstr "" - -#: ../../addon/facebook/facebook.php:644 -msgid "Image: " -msgstr "" - -#: ../../addon/facebook/facebook.php:720 -msgid "View on Friendica" -msgstr "" - -#: ../../addon/facebook/facebook.php:744 -msgid "Facebook post failed. Queued for retry." -msgstr "" - -#: ../../addon/wppost/wppost.php:41 -msgid "Post to Wordpress" -msgstr "" - -#: ../../addon/wppost/wppost.php:73 -msgid "WordPress Post Settings" -msgstr "" - -#: ../../addon/wppost/wppost.php:75 -msgid "Enable WordPress Post Plugin" -msgstr "" - -#: ../../addon/wppost/wppost.php:80 -msgid "WordPress username" -msgstr "" - -#: ../../addon/wppost/wppost.php:85 -msgid "WordPress password" -msgstr "" - -#: ../../addon/wppost/wppost.php:90 -msgid "WordPress API URL" -msgstr "" - -#: ../../addon/wppost/wppost.php:95 -msgid "Post to WordPress by default" -msgstr "" - -#: ../../addon/wppost/wppost.php:171 ../../addon/tumblr/tumblr.php:174 -#: ../../addon/posterous/posterous.php:172 -msgid "Post from Friendica" -msgstr "" - -#: ../../addon/uhremotestorage/uhremotestorage.php:56 +#: ../../include/datetime.php:267 #, php-format -msgid "" -"Allow to use your friendika id (%s) to connecto to external unhosted-enabled " -"storage (like ownCloud)" +msgid "%1$d %2$s ago" msgstr "" -#: ../../addon/uhremotestorage/uhremotestorage.php:57 -msgid "Unhosted DAV storage url" +#: ../../include/poller.php:459 +msgid "From: " msgstr "" -#: ../../addon/tumblr/tumblr.php:35 -msgid "Post to Tumblr" +#: ../../include/bbcode.php:166 ../../include/bbcode.php:225 +msgid "Image/photo" msgstr "" -#: ../../addon/tumblr/tumblr.php:66 -msgid "Tumblr Post Settings" -msgstr "" - -#: ../../addon/tumblr/tumblr.php:68 -msgid "Enable Tumblr Post Plugin" -msgstr "" - -#: ../../addon/tumblr/tumblr.php:73 -msgid "Tumblr login" -msgstr "" - -#: ../../addon/tumblr/tumblr.php:78 -msgid "Tumblr password" -msgstr "" - -#: ../../addon/tumblr/tumblr.php:83 -msgid "Post to Tumblr by default" -msgstr "" - -#: ../../addon/oembed/oembed.php:30 -msgid "OEmbed settings updated" -msgstr "" - -#: ../../addon/oembed/oembed.php:43 -msgid "Use OEmbed for YouTube videos" -msgstr "" - -#: ../../addon/oembed/oembed.php:71 -msgid "URL to embed:" -msgstr "" - -#: ../../addon/posterous/posterous.php:35 -msgid "Post to Posterous" -msgstr "" - -#: ../../addon/posterous/posterous.php:66 -msgid "Posterous Post Settings" -msgstr "" - -#: ../../addon/posterous/posterous.php:68 -msgid "Enable Posterous Post Plugin" -msgstr "" - -#: ../../addon/posterous/posterous.php:73 -msgid "Posterous login" -msgstr "" - -#: ../../addon/posterous/posterous.php:78 -msgid "Posterous password" -msgstr "" - -#: ../../addon/posterous/posterous.php:83 -msgid "Post to Posterous by default" -msgstr "" - -#: ../../addon/js_upload/js_upload.php:43 -msgid "Upload a file" -msgstr "" - -#: ../../addon/js_upload/js_upload.php:44 -msgid "Drop files here to upload" -msgstr "" - -#: ../../addon/js_upload/js_upload.php:46 -msgid "Failed" -msgstr "" - -#: ../../addon/js_upload/js_upload.php:294 -msgid "No files were uploaded." -msgstr "" - -#: ../../addon/js_upload/js_upload.php:300 -msgid "Uploaded file is empty" -msgstr "" - -#: ../../addon/js_upload/js_upload.php:323 -msgid "File has an invalid extension, it should be one of " -msgstr "" - -#: ../../addon/js_upload/js_upload.php:334 -msgid "Upload was cancelled, or server error encountered" -msgstr "" - -#: ../../addon/buglink/buglink.php:15 -msgid "Report Bug" -msgstr "" - -#: ../../addon/statusnet/statusnet.php:141 -msgid "Post to StatusNet" -msgstr "" - -#: ../../addon/statusnet/statusnet.php:183 -msgid "" -"Please contact your site administrator.
    The provided API URL is not " -"valid." -msgstr "" - -#: ../../addon/statusnet/statusnet.php:211 -msgid "We could not contact the StatusNet API with the Path you entered." -msgstr "" - -#: ../../addon/statusnet/statusnet.php:238 -msgid "StatusNet settings updated." -msgstr "" - -#: ../../addon/statusnet/statusnet.php:261 -msgid "StatusNet Posting Settings" -msgstr "" - -#: ../../addon/statusnet/statusnet.php:275 -msgid "Globally Available StatusNet OAuthKeys" -msgstr "" - -#: ../../addon/statusnet/statusnet.php:276 -msgid "" -"There are preconfigured OAuth key pairs for some StatusNet servers " -"available. If you are useing one of them, please use these credentials. If " -"not feel free to connect to any other StatusNet instance (see below)." -msgstr "" - -#: ../../addon/statusnet/statusnet.php:284 -msgid "Provide your own OAuth Credentials" -msgstr "" - -#: ../../addon/statusnet/statusnet.php:285 -msgid "" -"No consumer key pair for StatusNet found. Register your Friendica Account as " -"an desktop client on your StatusNet account, copy the consumer key pair here " -"and enter the API base root.
    Before you register your own OAuth key " -"pair ask the administrator if there is already a key pair for this Friendica " -"installation at your favorited StatusNet installation." -msgstr "" - -#: ../../addon/statusnet/statusnet.php:287 -msgid "OAuth Consumer Key" -msgstr "" - -#: ../../addon/statusnet/statusnet.php:290 -msgid "OAuth Consumer Secret" -msgstr "" - -#: ../../addon/statusnet/statusnet.php:293 -msgid "Base API Path (remember the trailing /)" -msgstr "" - -#: ../../addon/statusnet/statusnet.php:314 -msgid "" -"To connect to your StatusNet account click the button below to get a " -"security code from StatusNet which you have to copy into the input box below " -"and submit the form. Only your public posts will be posted " -"to StatusNet." -msgstr "" - -#: ../../addon/statusnet/statusnet.php:315 -msgid "Log in with StatusNet" -msgstr "" - -#: ../../addon/statusnet/statusnet.php:317 -msgid "Copy the security code from StatusNet here" -msgstr "" - -#: ../../addon/statusnet/statusnet.php:323 -msgid "Cancel Connection Process" -msgstr "" - -#: ../../addon/statusnet/statusnet.php:325 -msgid "Current StatusNet API is" -msgstr "" - -#: ../../addon/statusnet/statusnet.php:326 -msgid "Cancel StatusNet Connection" -msgstr "" - -#: ../../addon/statusnet/statusnet.php:337 ../../addon/twitter/twitter.php:188 -msgid "Currently connected to: " -msgstr "" - -#: ../../addon/statusnet/statusnet.php:338 -msgid "" -"If enabled all your public postings can be posted to the " -"associated StatusNet account. You can choose to do so by default (here) or " -"for every posting separately in the posting options when writing the entry." -msgstr "" - -#: ../../addon/statusnet/statusnet.php:340 -msgid "Allow posting to StatusNet" -msgstr "" - -#: ../../addon/statusnet/statusnet.php:343 -msgid "Send public postings to StatusNet by default" -msgstr "" - -#: ../../addon/statusnet/statusnet.php:348 ../../addon/twitter/twitter.php:199 -msgid "Clear OAuth configuration" -msgstr "" - -#: ../../addon/statusnet/statusnet.php:478 -msgid "API URL" -msgstr "" - -#: ../../addon/widgets/widgets.php:55 -msgid "Generate new key" -msgstr "" - -#: ../../addon/widgets/widgets.php:58 -msgid "Widgets key" -msgstr "" - -#: ../../addon/widgets/widgets.php:60 -msgid "Widgets available" -msgstr "" - -#: ../../addon/widgets/widget_friends.php:40 -msgid "Connect on Friendica!" -msgstr "" - -#: ../../addon/widgets/widget_like.php:58 +#: ../../include/dba.php:39 #, php-format -msgid "%d person likes this" -msgid_plural "%d people like this" +msgid "Cannot locate DNS info for database server '%s'" +msgstr "" + +#: ../../include/message.php:14 +msgid "[no subject]" +msgstr "" + +#: ../../include/acl_selectors.php:279 +msgid "Visible to everybody" +msgstr "" + +#: ../../include/acl_selectors.php:280 +msgid "show" +msgstr "" + +#: ../../include/acl_selectors.php:281 +msgid "don't show" +msgstr "" + +#: ../../include/enotify.php:8 +msgid "Friendica Notification" +msgstr "" + +#: ../../include/enotify.php:11 +msgid "Thank You," +msgstr "" + +#: ../../include/enotify.php:13 +#, php-format +msgid "%s Administrator" +msgstr "" + +#: ../../include/enotify.php:28 +#, php-format +msgid "New mail received at %s" +msgstr "" + +#: ../../include/enotify.php:30 +#, php-format +msgid "%s sent you a new private message at %s." +msgstr "" + +#: ../../include/enotify.php:32 +#, php-format +msgid "Please visit %s to view and/or reply to your private messages." +msgstr "" + +#: ../../include/enotify.php:40 +#, php-format +msgid "%s commented on an item at %s" +msgstr "" + +#: ../../include/enotify.php:41 +#, php-format +msgid "%s commented on an item/conversation you have been following." +msgstr "" + +#: ../../include/enotify.php:42 ../../include/enotify.php:51 +#: ../../include/enotify.php:60 ../../include/enotify.php:69 +#, php-format +msgid "Please visit %s to view and/or reply to the conversation." +msgstr "" + +#: ../../include/enotify.php:49 +#, php-format +msgid "%s posted to your profile wall at %s" +msgstr "" + +#: ../../include/enotify.php:58 +#, php-format +msgid "%s tagged you at %s" +msgstr "" + +#: ../../include/enotify.php:67 +#, php-format +msgid "%s tagged your post at %s" +msgstr "" + +#: ../../include/enotify.php:76 +#, php-format +msgid "Introduction received at %s" +msgstr "" + +#: ../../include/enotify.php:77 +#, php-format +msgid "You've received an introduction from '%s' at %s" +msgstr "" + +#: ../../include/enotify.php:78 ../../include/enotify.php:91 +#, php-format +msgid "You may visit their profile at %s" +msgstr "" + +#: ../../include/enotify.php:80 +#, php-format +msgid "Please visit %s to approve or reject the introduction." +msgstr "" + +#: ../../include/enotify.php:87 +#, php-format +msgid "Friend suggestion received at %s" +msgstr "" + +#: ../../include/enotify.php:88 +#, php-format +msgid "You've received a friend suggestion from '%s' at %s" +msgstr "" + +#: ../../include/enotify.php:89 +msgid "Name:" +msgstr "" + +#: ../../include/enotify.php:90 +msgid "Photo:" +msgstr "" + +#: ../../include/enotify.php:93 +#, php-format +msgid "Please visit %s to approve or reject the suggestion." +msgstr "" + +#: ../../include/items.php:2450 +msgid "A new person is sharing with you at " +msgstr "" + +#: ../../include/items.php:2450 +msgid "You have a new follower at " +msgstr "" + +#: ../../include/bb2diaspora.php:64 +msgid "view full size" +msgstr "" + +#: ../../include/bb2diaspora.php:113 ../../include/bb2diaspora.php:123 +#: ../../include/bb2diaspora.php:124 +msgid "image/photo" +msgstr "" + +#: ../../include/security.php:20 +msgid "Welcome " +msgstr "" + +#: ../../include/security.php:21 +msgid "Please upload a profile photo." +msgstr "" + +#: ../../include/security.php:24 +msgid "Welcome back " +msgstr "" + +#: ../../include/Contact.php:131 ../../include/conversation.php:744 +msgid "View status" +msgstr "" + +#: ../../include/Contact.php:132 ../../include/conversation.php:745 +msgid "View profile" +msgstr "" + +#: ../../include/Contact.php:133 ../../include/conversation.php:746 +msgid "View photos" +msgstr "" + +#: ../../include/Contact.php:134 ../../include/Contact.php:147 +#: ../../include/conversation.php:747 +msgid "View recent" +msgstr "" + +#: ../../include/Contact.php:136 ../../include/Contact.php:147 +#: ../../include/conversation.php:749 +msgid "Send PM" +msgstr "" + +#: ../../include/conversation.php:141 +msgid "post/item" +msgstr "" + +#: ../../include/conversation.php:142 +#, php-format +msgid "%1$s marked %2$s's %3$s as favorite" +msgstr "" + +#: ../../include/conversation.php:279 ../../include/conversation.php:535 +msgid "Select" +msgstr "" + +#: ../../include/conversation.php:294 ../../include/conversation.php:623 +#: ../../include/conversation.php:624 +#, php-format +msgid "View %s's profile @ %s" +msgstr "" + +#: ../../include/conversation.php:303 ../../include/conversation.php:635 +#, php-format +msgid "%s from %s" +msgstr "" + +#: ../../include/conversation.php:319 +msgid "View in context" +msgstr "" + +#: ../../include/conversation.php:434 +#, php-format +msgid "%d comment" +msgid_plural "%d comments" msgstr[0] "" msgstr[1] "" -#: ../../addon/widgets/widget_like.php:61 +#: ../../include/conversation.php:437 ../../boot.php:444 +msgid "show more" +msgstr "" + +#: ../../include/conversation.php:497 +msgid "like" +msgstr "" + +#: ../../include/conversation.php:498 +msgid "dislike" +msgstr "" + +#: ../../include/conversation.php:500 +msgid "Share this" +msgstr "" + +#: ../../include/conversation.php:500 +msgid "share" +msgstr "" + +#: ../../include/conversation.php:545 +msgid "add star" +msgstr "" + +#: ../../include/conversation.php:546 +msgid "remove star" +msgstr "" + +#: ../../include/conversation.php:547 +msgid "toggle star status" +msgstr "" + +#: ../../include/conversation.php:550 +msgid "starred" +msgstr "" + +#: ../../include/conversation.php:551 +msgid "add tag" +msgstr "" + +#: ../../include/conversation.php:625 +msgid "to" +msgstr "" + +#: ../../include/conversation.php:626 +msgid "Wall-to-Wall" +msgstr "" + +#: ../../include/conversation.php:627 +msgid "via Wall-To-Wall:" +msgstr "" + +#: ../../include/conversation.php:669 +msgid "Delete Selected Items" +msgstr "" + +#: ../../include/conversation.php:801 #, php-format -msgid "%d person doesn't like this" -msgid_plural "%d people don't like this" -msgstr[0] "" -msgstr[1] "" - -#: ../../addon/twitter/twitter.php:78 -msgid "Post to Twitter" +msgid "%s likes this." msgstr "" -#: ../../addon/twitter/twitter.php:123 -msgid "Twitter settings updated." -msgstr "" - -#: ../../addon/twitter/twitter.php:145 -msgid "Twitter Posting Settings" -msgstr "" - -#: ../../addon/twitter/twitter.php:152 -msgid "" -"No consumer key pair for Twitter found. Please contact your site " -"administrator." -msgstr "" - -#: ../../addon/twitter/twitter.php:171 -msgid "" -"At this Friendica instance the Twitter plugin was enabled but you have not " -"yet connected your account to your Twitter account. To do so click the " -"button below to get a PIN from Twitter which you have to copy into the input " -"box below and submit the form. Only your public posts will " -"be posted to Twitter." -msgstr "" - -#: ../../addon/twitter/twitter.php:172 -msgid "Log in with Twitter" -msgstr "" - -#: ../../addon/twitter/twitter.php:174 -msgid "Copy the PIN from Twitter here" -msgstr "" - -#: ../../addon/twitter/twitter.php:189 -msgid "" -"If enabled all your public postings can be posted to the " -"associated Twitter account. You can choose to do so by default (here) or for " -"every posting separately in the posting options when writing the entry." -msgstr "" - -#: ../../addon/twitter/twitter.php:191 -msgid "Allow posting to Twitter" -msgstr "" - -#: ../../addon/twitter/twitter.php:194 -msgid "Send public postings to Twitter by default" -msgstr "" - -#: ../../addon/twitter/twitter.php:301 -msgid "Consumer key" -msgstr "" - -#: ../../addon/twitter/twitter.php:302 -msgid "Consumer secret" -msgstr "" - -#: ../../addon/impressum/impressum.php:25 -msgid "Impressum" -msgstr "" - -#: ../../addon/impressum/impressum.php:38 -#: ../../addon/impressum/impressum.php:40 -#: ../../addon/impressum/impressum.php:70 -msgid "Site Owner" -msgstr "" - -#: ../../addon/impressum/impressum.php:38 -#: ../../addon/impressum/impressum.php:74 -msgid "Email Address" -msgstr "" - -#: ../../addon/impressum/impressum.php:43 -#: ../../addon/impressum/impressum.php:72 -msgid "Postal Address" -msgstr "" - -#: ../../addon/impressum/impressum.php:49 -msgid "" -"The impressum addon needs to be configured!
    Please add at least the " -"owner variable to your config file. For other variables please " -"refer to the README file of the addon." -msgstr "" - -#: ../../addon/impressum/impressum.php:71 -msgid "Site Owners Profile" -msgstr "" - -#: ../../addon/impressum/impressum.php:73 -msgid "Notes" -msgstr "" - -#: ../../addon/tictac/tictac.php:20 -msgid "Three Dimensional Tic-Tac-Toe" -msgstr "" - -#: ../../addon/tictac/tictac.php:53 -msgid "3D Tic-Tac-Toe" -msgstr "" - -#: ../../addon/tictac/tictac.php:58 -msgid "New game" -msgstr "" - -#: ../../addon/tictac/tictac.php:59 -msgid "New game with handicap" -msgstr "" - -#: ../../addon/tictac/tictac.php:60 -msgid "" -"Three dimensional tic-tac-toe is just like the traditional game except that " -"it is played on multiple levels simultaneously. " -msgstr "" - -#: ../../addon/tictac/tictac.php:61 -msgid "" -"In this case there are three levels. You win by getting three in a row on " -"any level, as well as up, down, and diagonally across the different levels." -msgstr "" - -#: ../../addon/tictac/tictac.php:63 -msgid "" -"The handicap game disables the center position on the middle level because " -"the player claiming this square often has an unfair advantage." -msgstr "" - -#: ../../addon/tictac/tictac.php:182 -msgid "You go first..." -msgstr "" - -#: ../../addon/tictac/tictac.php:187 -msgid "I'm going first this time..." -msgstr "" - -#: ../../addon/tictac/tictac.php:193 -msgid "You won!" -msgstr "" - -#: ../../addon/tictac/tictac.php:199 ../../addon/tictac/tictac.php:224 -msgid "\"Cat\" game!" -msgstr "" - -#: ../../addon/tictac/tictac.php:222 -msgid "I won!" -msgstr "" - -#: ../../addon/piwik/piwik.php:70 -msgid "" -"This website is tracked using the Piwik " -"analytics tool." -msgstr "" - -#: ../../addon/piwik/piwik.php:73 +#: ../../include/conversation.php:801 #, php-format -msgid "" -"If you do not want that your visits are logged this way you can " -"set a cookie to prevent Piwik from tracking further visits of the site " -"(opt-out)." +msgid "%s doesn't like this." msgstr "" -#: ../../addon/piwik/piwik.php:82 -msgid "Piwik Base URL" -msgstr "" - -#: ../../addon/piwik/piwik.php:83 -msgid "Site ID" -msgstr "" - -#: ../../addon/piwik/piwik.php:84 -msgid "Show opt-out cookie link?" -msgstr "" - -#: ../../addon/membersince/membersince.php:17 +#: ../../include/conversation.php:805 #, php-format -msgid " - Member since: %s" +msgid "%2$d people like this." msgstr "" -#: ../../addon/communityhome/communityhome.php:29 -msgid "OpenID" -msgstr "" - -#: ../../addon/communityhome/communityhome.php:38 -msgid "Last users" -msgstr "" - -#: ../../addon/communityhome/communityhome.php:81 -msgid "Most active users" -msgstr "" - -#: ../../addon/communityhome/communityhome.php:98 -msgid "Last photos" -msgstr "" - -#: ../../addon/communityhome/communityhome.php:133 -msgid "Last likes" -msgstr "" - -#: ../../addon/pageheader/pageheader.php:47 -msgid "\"pageheader\" Settings" -msgstr "" - -#: ../../addon/pageheader/pageheader.php:65 -msgid "pageheader Settings saved." -msgstr "" - -#: ../../addon/randplace/randplace.php:170 -msgid "Randplace Settings" -msgstr "" - -#: ../../addon/randplace/randplace.php:172 -msgid "Enable Randplace Plugin" -msgstr "" - -#: ../../addon/blockem/blockem.php:47 -msgid "\"Blockem\" Settings" -msgstr "" - -#: ../../addon/blockem/blockem.php:49 -msgid "Comma separated profile URLS to block" -msgstr "" - -#: ../../addon/blockem/blockem.php:66 -msgid "BLOCKEM Settings saved." -msgstr "" - -#: ../../addon/blockem/blockem.php:104 +#: ../../include/conversation.php:807 #, php-format -msgid "Blocked %s - Click to open/close" +msgid "%2$d people don't like this." msgstr "" -#: ../../addon/nsfw/nsfw.php:47 -msgid "\"Not Safe For Work\" Settings" +#: ../../include/conversation.php:813 +msgid "and" msgstr "" -#: ../../addon/nsfw/nsfw.php:49 -msgid "Comma separated words to treat as NSFW" -msgstr "" - -#: ../../addon/nsfw/nsfw.php:66 -msgid "NSFW Settings saved." -msgstr "" - -#: ../../addon/nsfw/nsfw.php:102 +#: ../../include/conversation.php:816 #, php-format -msgid "%s - Click to open/close" +msgid ", and %d other people" msgstr "" -#: ../../boot.php:437 +#: ../../include/conversation.php:817 +#, php-format +msgid "%s like this." +msgstr "" + +#: ../../include/conversation.php:817 +#, php-format +msgid "%s don't like this." +msgstr "" + +#: ../../include/conversation.php:842 +msgid "Visible to everybody" +msgstr "" + +#: ../../include/conversation.php:844 +msgid "Please enter a video link/URL:" +msgstr "" + +#: ../../include/conversation.php:845 +msgid "Please enter an audio link/URL:" +msgstr "" + +#: ../../include/conversation.php:846 +msgid "Tag term:" +msgstr "" + +#: ../../include/conversation.php:847 +msgid "Where are you right now?" +msgstr "" + +#: ../../include/conversation.php:848 +msgid "Enter a title for this item" +msgstr "" + +#: ../../include/conversation.php:891 +msgid "upload photo" +msgstr "" + +#: ../../include/conversation.php:893 +msgid "attach file" +msgstr "" + +#: ../../include/conversation.php:895 +msgid "web link" +msgstr "" + +#: ../../include/conversation.php:896 +msgid "Insert video link" +msgstr "" + +#: ../../include/conversation.php:897 +msgid "video link" +msgstr "" + +#: ../../include/conversation.php:898 +msgid "Insert audio link" +msgstr "" + +#: ../../include/conversation.php:899 +msgid "audio link" +msgstr "" + +#: ../../include/conversation.php:901 +msgid "set location" +msgstr "" + +#: ../../include/conversation.php:903 +msgid "clear location" +msgstr "" + +#: ../../include/conversation.php:908 +msgid "permissions" +msgstr "" + +#: ../../boot.php:442 msgid "Delete this item?" msgstr "" -#: ../../boot.php:440 +#: ../../boot.php:445 msgid "show fewer" msgstr "" -#: ../../boot.php:683 +#: ../../boot.php:688 msgid "Create a New Account" msgstr "" -#: ../../boot.php:703 +#: ../../boot.php:708 msgid "Nickname or Email address: " msgstr "" -#: ../../boot.php:704 +#: ../../boot.php:709 msgid "Password: " msgstr "" -#: ../../boot.php:707 +#: ../../boot.php:712 msgid "Or login using OpenID: " msgstr "" -#: ../../boot.php:713 +#: ../../boot.php:718 msgid "Forgot your password?" msgstr "" -#: ../../boot.php:860 +#: ../../boot.php:875 msgid "Edit profile" msgstr "" -#: ../../boot.php:1027 ../../boot.php:1098 +#: ../../boot.php:1042 ../../boot.php:1113 msgid "g A l F d" msgstr "" -#: ../../boot.php:1028 ../../boot.php:1099 +#: ../../boot.php:1043 ../../boot.php:1114 msgid "F d" msgstr "" -#: ../../boot.php:1053 +#: ../../boot.php:1068 msgid "Birthday Reminders" msgstr "" -#: ../../boot.php:1054 +#: ../../boot.php:1069 msgid "Birthdays this week:" msgstr "" -#: ../../boot.php:1077 ../../boot.php:1141 +#: ../../boot.php:1092 ../../boot.php:1156 msgid "[today]" msgstr "" -#: ../../boot.php:1122 +#: ../../boot.php:1137 msgid "Event Reminders" msgstr "" -#: ../../boot.php:1123 +#: ../../boot.php:1138 msgid "Events this week:" msgstr "" -#: ../../boot.php:1135 +#: ../../boot.php:1150 msgid "[No description]" msgstr "" From 135005571f4cfe3170b2f2ce0ea94b39a75c111a Mon Sep 17 00:00:00 2001 From: "Abinoam P. Marques Jr" Date: Sun, 12 Feb 2012 17:27:08 -0800 Subject: [PATCH 071/119] Added [th] bbcode tag support. --- include/bbcode.php | 1 + 1 file changed, 1 insertion(+) diff --git a/include/bbcode.php b/include/bbcode.php index 1d11f687de..9c70cb494a 100755 --- a/include/bbcode.php +++ b/include/bbcode.php @@ -165,6 +165,7 @@ lower-alpha;">$2' ,$Text); $Text = preg_replace("/\[list=((?-i)A)\](.*?)\[\/list\]/ism", '
      $2
    ' ,$Text); + $Text = preg_replace("/\[th\](.*?)\[\/th\]/sm", '
    ' ,$Text); $Text = preg_replace("/\[td\](.*?)\[\/td\]/sm", '' ,$Text); $Text = preg_replace("/\[tr\](.*?)\[\/tr\]/sm", '$1' ,$Text); $Text = preg_replace("/\[table\](.*?)\[\/table\]/sm", '
    HandlerDescription
    $name$version
    $1$1
    $1$1
    $1
    ' ,$Text); From 85c831bcbf6f4cc2793d91e4e3fb3da5828a3f60 Mon Sep 17 00:00:00 2001 From: friendica Date: Sun, 12 Feb 2012 20:56:44 -0800 Subject: [PATCH 072/119] finish translation of 'xxxxx wrote:' --- include/bbcode.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/include/bbcode.php b/include/bbcode.php index a4a651027b..118be1298c 100755 --- a/include/bbcode.php +++ b/include/bbcode.php @@ -195,9 +195,11 @@ upper-alpha;">$2' ,$Text); $Text = preg_replace("/\[quote\](.*?)\[\/quote\]/ism","$QuoteLayout", $Text); // Check for [quote=Author] text - $t_wrote = t("wrote"); + + $t_wrote = t('$1 wrote:'); + $Text = preg_replace("/\[quote=[\"\']*(.*?)[\"\']*\](.*?)\[\/quote\]/ism", - "
    $1 wrote: $2
    ", + "
    " . $t_wrote . " $2
    ", $Text); // [img=widthxheight]image source[/img] From 3e664dbdfe4a7b0d27a7dd317ab7e85853822275 Mon Sep 17 00:00:00 2001 From: Fabio Comuni Date: Mon, 13 Feb 2012 09:33:20 +0100 Subject: [PATCH 073/119] reshare in "display" view --- mod/display.php | 14 ++++++++++++++ view/jot-header.tpl | 5 ++--- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/mod/display.php b/mod/display.php index 79eaf37178..d96be4333b 100755 --- a/mod/display.php +++ b/mod/display.php @@ -11,6 +11,7 @@ function display_content(&$a) { require_once("include/bbcode.php"); require_once('include/security.php'); require_once('include/conversation.php'); + require_once('include/acl_selectors.php'); $o = '
    ' . "\r\n"; @@ -68,6 +69,19 @@ function display_content(&$a) { } if ($is_owner) + $celeb = ((($a->user['page-flags'] == PAGE_SOAPBOX) || ($a->user['page-flags'] == PAGE_COMMUNITY)) ? true : false); + + $x = array( + 'is_owner' => true, + 'allow_location' => $a->user['allow_location'], + 'default_location' => $a->user['default_location'], + 'nickname' => $a->user['nickname'], + 'lockstate' => ((($group) || (is_array($a->user) && ((strlen($a->user['allow_cid'])) || (strlen($a->user['allow_gid'])) || (strlen($a->user['deny_cid'])) || (strlen($a->user['deny_gid']))))) ? 'lock' : 'unlock'), + 'acl' => populate_acl((($group || $cid) ? $def_acl : $a->user), $celeb), + 'bang' => (($group || $cid) ? '!' : ''), + 'visitor' => 'block', + 'profile_uid' => local_user() + ); $o .= status_editor($a,$x,0,true); diff --git a/view/jot-header.tpl b/view/jot-header.tpl index 482fb0e0dc..251b9cdd03 100755 --- a/view/jot-header.tpl +++ b/view/jot-header.tpl @@ -209,15 +209,14 @@ function enableOnUser(){ } function jotShare(id) { + if ($('#jot-popup').length != 0) $('#jot-popup').show(); + $('#like-rotator-' + id).show(); $.get('share/' + id, function(data) { if (!editor) $("#profile-jot-text").val(""); initEditor(function(){ addeditortext(data); $('#like-rotator-' + id).hide(); - if ($('#jot-popup').length != 0){ - $('#jot-popup').show(); - } $(window).scrollTop(0); }); From 16d3bc9deb5cb80f438a53f1bf483c79351674af Mon Sep 17 00:00:00 2001 From: Fabio Comuni Date: Mon, 13 Feb 2012 09:35:11 +0100 Subject: [PATCH 074/119] quattro: pause icon --- view/theme/quattro/quattro.less | 7 +++++++ view/theme/quattro/style.css | 5 +++++ 2 files changed, 12 insertions(+) diff --git a/view/theme/quattro/quattro.less b/view/theme/quattro/quattro.less index c9fda0e1d7..1724ff30f0 100755 --- a/view/theme/quattro/quattro.less +++ b/view/theme/quattro/quattro.less @@ -503,6 +503,13 @@ section { } .wwto .contact-photo { width: 25px; height: 25px; } + +#pause { + position: fixed; + bottom: 5px; + right: 5px; +} + /* contacts menu */ .contact-photo-wrapper { position: relative; } .contact-photo { diff --git a/view/theme/quattro/style.css b/view/theme/quattro/style.css index 41adcd8d2c..8ff57813f8 100755 --- a/view/theme/quattro/style.css +++ b/view/theme/quattro/style.css @@ -844,6 +844,11 @@ section { width: 25px; height: 25px; } +#pause { + position: fixed; + bottom: 5px; + right: 5px; +} /* contacts menu */ .contact-photo-wrapper { position: relative; From 8369c243b321a421ea2ab92a49d8995b5724244e Mon Sep 17 00:00:00 2001 From: Fabio Comuni Date: Mon, 13 Feb 2012 10:19:10 +0100 Subject: [PATCH 075/119] Fix 'item not found' message --- view/jot-header.tpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/view/jot-header.tpl b/view/jot-header.tpl index 251b9cdd03..02662d2d4b 100755 --- a/view/jot-header.tpl +++ b/view/jot-header.tpl @@ -118,7 +118,7 @@ function enableOnUser(){ } - + + + + + {{ endif }} - - +