From 3d9845f4a45f963161e31fe18d69ed31e38af003 Mon Sep 17 00:00:00 2001 From: Friendika Date: Sat, 12 Feb 2011 03:14:59 -0800 Subject: [PATCH 01/26] preliminary ajax comment setups --- mod/item.php | 4 +++- mod/network.php | 2 +- mod/profile.php | 2 +- view/comment_item.tpl | 1 + 4 files changed, 6 insertions(+), 3 deletions(-) diff --git a/mod/item.php b/mod/item.php index a83373f59..0d9a674f2 100644 --- a/mod/item.php +++ b/mod/item.php @@ -490,7 +490,9 @@ function item_post(&$a) { } } - goaway($a->get_baseurl() . "/" . $_POST['return'] ); + if((x($_POST,'return')) && strlen($_POST['return'])) + goaway($a->get_baseurl() . "/" . $_POST['return'] ); + killme(); // NOTREACHED } diff --git a/mod/network.php b/mod/network.php index f11db45a8..f09b302e9 100644 --- a/mod/network.php +++ b/mod/network.php @@ -340,7 +340,7 @@ function network_content(&$a, $update = 0) { if($item['last-child']) { $comment = replace_macros($cmnt_tpl,array( - '$return_path' => $_SESSION['return_url'], + '$return_path' => '', // $_SESSION['return_url'], '$type' => 'net-comment', '$id' => $item['item_id'], '$parent' => $item['parent'], diff --git a/mod/profile.php b/mod/profile.php index 8ec29d382..57abc479d 100644 --- a/mod/profile.php +++ b/mod/profile.php @@ -293,7 +293,7 @@ function profile_content(&$a, $update = 0) { } if($item['last-child']) { $comment = replace_macros($cmnt_tpl,array( - '$return_path' => $_SESSION['return_url'], + '$return_path' => '', // $_SESSION['return_url'], '$type' => 'wall-comment', '$id' => $item['item_id'], '$parent' => $item['parent'], diff --git a/view/comment_item.tpl b/view/comment_item.tpl index 6f63e39b7..2f1a8393f 100644 --- a/view/comment_item.tpl +++ b/view/comment_item.tpl @@ -18,4 +18,5 @@
+ From ee46a028d6e443d4cffcd24a99871d88089a93c9 Mon Sep 17 00:00:00 2001 From: Friendika Date: Sat, 12 Feb 2011 03:42:57 -0800 Subject: [PATCH 02/26] more test ajax comments --- include/main.js | 13 +++++++++++++ view/comment_item.tpl | 4 ++-- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/include/main.js b/include/main.js index 63b34bd21..afe968daf 100644 --- a/include/main.js +++ b/include/main.js @@ -210,3 +210,16 @@ $('#panel').hide(); } + function post_comment(id) { + var typename = 'f-type-' + id; + var puidname = 'f-profile-uid-' + id; + var parname = 'f-parent-' + id; + var textname = 'comment-edit-text-' + id; + var type = $('input[id=typename]').val(); + var profile_uid = $('input[id=puidname]').val(); + var parent = $('input[id=parname]').val(); + var body = $('textarea[id=textname]').val(); + + alert(body); + + } \ No newline at end of file diff --git a/view/comment_item.tpl b/view/comment_item.tpl index 2f1a8393f..068cf0731 100644 --- a/view/comment_item.tpl +++ b/view/comment_item.tpl @@ -1,5 +1,5 @@
-
+ @@ -13,7 +13,7 @@
From 91190de0f0ae7961c99baffa460fde89cf963abb Mon Sep 17 00:00:00 2001 From: Friendika Date: Sat, 12 Feb 2011 19:24:19 -0800 Subject: [PATCH 03/26] fb addon only working from one site - more debug + simplify permission toggle --- README | 6 ++---- addon/facebook/facebook.php | 17 ++--------------- 2 files changed, 4 insertions(+), 19 deletions(-) diff --git a/README b/README index e5c5e02d6..36bd01792 100644 --- a/README +++ b/README @@ -40,10 +40,8 @@ interaction you've grown to love, *and* was free to use, *and* was open source, *and* where your privacy is always under your control? And what if this social network could scale to encompass the entire -internet, and *not* require a central organisation to provide servers (in -exchange for selling your private information; and everything else they can -find out about you - from logging all of your online activities and -conversations)? +internet, and *not* require a central organisation to provide servers? +(In exchange for peddling your private information behind your back.) Look no further. diff --git a/addon/facebook/facebook.php b/addon/facebook/facebook.php index 7bebb3b4f..119ee2f3e 100644 --- a/addon/facebook/facebook.php +++ b/addon/facebook/facebook.php @@ -123,15 +123,12 @@ function facebook_content(&$a) { function facebook_install() { register_hook('post_local_end', 'addon/facebook/facebook.php', 'facebook_post_hook'); register_hook('jot_networks', 'addon/facebook/facebook.php', 'facebook_jot_nets'); - register_hook('post_local_start','addon/facebook/facebook.php', 'facebook_post_local'); - } function facebook_uninstall() { unregister_hook('post_local_end', 'addon/facebook/facebook.php', 'facebook_post_hook'); unregister_hook('jot_networks', 'addon/facebook/facebook.php', 'facebook_jot_nets'); - unregister_hook('post_local_start','addon/facebook/facebook.php', 'facebook_post_local'); } @@ -148,17 +145,6 @@ function facebook_jot_nets(&$a,&$b) { } } -function facebook_post_local(&$a,&$b) { - - if(! local_user()) - return; - - if((x($b,'facebook_enable')) && (intval($b['facebook_enable']))) - set_pconfig(local_user(),'facebook','enable','1'); - else - del_pconfig(local_user(),'facebook','enable'); -} - function facebook_post_hook(&$a,&$b) { @@ -179,9 +165,10 @@ function facebook_post_hook(&$a,&$b) { logger('facebook: have appid+secret'); $fb_post = intval(get_pconfig(local_user(),'facebook','post')); - $fb_enable = intval(get_pconfig(local_user(),'facebook','enable')); + $fb_enable = (($fb_post && x($_POST,'facebook_enable')) ? intval($_POST['facebook_enable']) : 0); $fb_token = get_pconfig(local_user(),'facebook','access_token'); + logger('facebook: $fb_post: ' . $fb_post . ' $fb_enable: ' . $fb_enable . ' $fb_token: ' . $fb_token,LOGGER_DEBUG); if($fb_post && $fb_token && $fb_enable) { logger('facebook: able to post'); require_once('library/facebook.php'); From 2d542e0f982598b792da6fbdf9cd7b29c2a04c83 Mon Sep 17 00:00:00 2001 From: Friendika Date: Sat, 12 Feb 2011 22:29:32 -0800 Subject: [PATCH 04/26] receiving comment notifications for conversations we aren't "involved" in --- mod/dfrn_notify.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mod/dfrn_notify.php b/mod/dfrn_notify.php index dffbb5974..755d674c1 100644 --- a/mod/dfrn_notify.php +++ b/mod/dfrn_notify.php @@ -391,8 +391,9 @@ function dfrn_notify_post(&$a) { intval($importer['importer_uid']) ); if(count($myconv)) { + $importer_url = $a->get_baseurl() . '/profile/' . $importer['nickname']; foreach($myconv as $conv) { - if(! link_compare($conv['author-link'],$importer['url'])) + if(! link_compare($conv['author-link'],$importer_url)) continue; require_once('bbcode.php'); $from = stripslashes($datarray['author-name']); From e32cda65422265ad93458e7028e088dcf8c4504b Mon Sep 17 00:00:00 2001 From: Friendika Date: Sun, 13 Feb 2011 13:35:08 -0800 Subject: [PATCH 05/26] app not defined --- include/acl_selectors.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/acl_selectors.php b/include/acl_selectors.php index 953243a43..94f51a9ff 100644 --- a/include/acl_selectors.php +++ b/include/acl_selectors.php @@ -44,6 +44,8 @@ function group_select($selname,$selclass,$preselected = false,$size = 4) { function contact_select($selname, $selclass, $preselected = false, $size = 4, $privmail = false, $celeb = false, $privatenet = false) { + $a = get_app(); + $o = ''; // When used for private messages, we limit correspondence to mutual friends and the selector From f98ba371cfdb0d0d47a5717aa60a5b703017cbe4 Mon Sep 17 00:00:00 2001 From: Chris Case Date: Sun, 13 Feb 2011 14:55:48 -0800 Subject: [PATCH 06/26] updated private message notification to use HTML, still need the foreign language message notifications updated --- mod/dfrn_notify.php | 56 +++++++++++++++++++++-------------- view/en/mail_received_eml.tpl | 35 ++++++++++++++-------- 2 files changed, 56 insertions(+), 35 deletions(-) diff --git a/mod/dfrn_notify.php b/mod/dfrn_notify.php index 755d674c1..49276647a 100644 --- a/mod/dfrn_notify.php +++ b/mod/dfrn_notify.php @@ -2,8 +2,6 @@ require_once('simplepie/simplepie.inc'); require_once('include/items.php'); - - function dfrn_notify_post(&$a) { $dfrn_id = ((x($_POST,'dfrn_id')) ? notags(trim($_POST['dfrn_id'])) : ''); @@ -52,11 +50,17 @@ function dfrn_notify_post(&$a) { } - $r = q("SELECT `contact`.*, `contact`.`uid` AS `importer_uid`, - `contact`.`pubkey` AS `cpubkey`, `contact`.`prvkey` AS `cprvkey`, `user`.* FROM `contact` - LEFT JOIN `user` ON `contact`.`uid` = `user`.`uid` - WHERE `contact`.`blocked` = 0 AND `contact`.`pending` = 0 - AND `user`.`nickname` = '%s' $sql_extra LIMIT 1", + $r = q("SELECT `contact`.*, `contact`.`uid` AS `importer_uid`, + `contact`.`pubkey` AS `cpubkey`, + `contact`.`prvkey` AS `cprvkey`, + `contact`.`thumb` AS `thumb`, + `contact`.`url` as `url`, + `contact`.`name` as `senderName`, + `user`.* + FROM `contact` + LEFT JOIN `user` ON `contact`.`uid` = `user`.`uid` + WHERE `contact`.`blocked` = 0 AND `contact`.`pending` = 0 + AND `user`.`nickname` = '%s' $sql_extra LIMIT 1", dbesc($a->argv[1]) ); @@ -169,29 +173,37 @@ function dfrn_notify_post(&$a) { require_once('bbcode.php'); if($importer['notify-flags'] & NOTIFY_MAIL) { - $body = html_entity_decode(strip_tags(bbcode(stripslashes($msg['body']))),ENT_QUOTES,'UTF-8'); - - if(function_exists('quoted_printable_encode')) +// $body = html_entity_decode(strip_tags(bbcode(stripslashes(nl2br($msg['body'])))),ENT_QUOTES,'UTF-8'); +// $body = strip_tags(bbcode(stripslashes(nl2br($msg['body'])))); + + /*if(function_exists('quoted_printable_encode')) $body = quoted_printable_encode($body); else - $body = qp($body); + $body = qp($body);*/ + $msg['body'] = str_replace(array("\\r\\n", "\\r", "\\n"), "
", $msg['body']); + $msg['body'] = html_entity_decode(strip_tags(bbcode($msg['body']))); $tpl = load_view_file('view/mail_received_eml.tpl'); $email_tpl = replace_macros($tpl, array( - '$sitename' => $a->config['sitename'], - '$siteurl' => $a->get_baseurl(), - '$username' => $importer['username'], - '$email' => $importer['email'], - '$from' => $msg['from-name'], - '$title' => stripslashes($msg['title']), - '$body' => $body + '$siteName' => $a->config['sitename'], + '$siteurl' => $a->get_baseurl(), + '$username' => $importer['username'], + '$thumb' => $importer['thumb'], + '$email' => $importer['email'], + '$url' => $importer['url'], + '$senderName' => $importer['senderName'], + '$from' => $msg['from-name'], + '$title' => stripslashes($msg['title']), + '$body' => $msg['body'], + '$hostname' => $a->get_hostname() )); - + $res = mail($importer['email'], t('New mail received at ') . $a->config['sitename'], - $email_tpl, 'From: ' . t('Administrator') . '@' . $a->get_hostname() . "\r\n" + $email_tpl, + 'From: ' . t('Administrator') . '@' . $a->get_hostname() . "\r\n" . 'MIME-Version: 1.0' . "\r\n" - . 'Content-type: text/plain; charset=UTF-8' . "\r\n" - . 'Content-transfer-encoding: quoted-printable' . "\r\n" + . 'Content-type: text/html; charset=iso-8859-1' . "\r\n" + . 'Content-transfer-encoding: 7-bit' . "\r\n" ); } xml_status(0); diff --git a/view/en/mail_received_eml.tpl b/view/en/mail_received_eml.tpl index 261aec4be..510978582 100644 --- a/view/en/mail_received_eml.tpl +++ b/view/en/mail_received_eml.tpl @@ -1,16 +1,25 @@ + + + + Friendika Message + + + + + + -Dear $username, + - You've received a new private message at $sitename from '$from'. ------ -$title ------ -$body ------ -Please login at $siteurl to read and reply to your private messages. - -Thank you, - $sitename administrator - - + + + + + + + + +
Friendika
$from sent you a new private message at $siteName.
$from
$title
$body
Please login at $siteurl to read and reply to your private messages.
Thank you,
$siteName administrator
+ + \ No newline at end of file From ce8c6dfaf700ab09587a7a9eab5985941bd939b8 Mon Sep 17 00:00:00 2001 From: Friendika Date: Sun, 13 Feb 2011 17:24:42 -0800 Subject: [PATCH 07/26] just in time for valentines day - heart smiley <3 --- boot.php | 3 ++- images/smiley-heart.gif | Bin 0 -> 592 bytes 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 images/smiley-heart.gif diff --git a/boot.php b/boot.php index 2cbc48cde..6a1d3a04b 100644 --- a/boot.php +++ b/boot.php @@ -1978,8 +1978,9 @@ function smilies($s) { $a = get_app(); return str_replace( - array( ':-)', ';-)', ':-(', ':(', ':-P', ':-"', ':-x', ':-X', ':-D', '8-|', '8-O'), + array( '<3', ':-)', ';-)', ':-(', ':(', ':-P', ':-"', ':-x', ':-X', ':-D', '8-|', '8-O'), array( + '<3', ':-)', ';-)', ':-(', diff --git a/images/smiley-heart.gif b/images/smiley-heart.gif new file mode 100644 index 0000000000000000000000000000000000000000..21c0c6530847f73e43881e6c631c580517d42e8a GIT binary patch literal 592 zcmZ?wbhEHb6k-r!IOf2>#>6DTz@WguAjZXO#lq^r#Kb8g9L>Ox!@wXZAyv-6*v!B% zlYuFZPhc?v!$tT2m?($YHG*24gBNFd7E#@frv)yKy%B*Zs3I4(N6proX=s3fzhs;sH0ed5GPQ>XMzpEhCE ztf}+n&0Mr_+KS~1HmqN_W%JHWn>Ov+yKV2@o%{CgK79Dt@(K!~JTglaWck#aOvGj7w#qG+-zF=|YU!XTwR79yZ3-NQ4jSTz zj_i`?B%dEvU{`8$&}EX@vh_aO zwnz95Gwl=UFan$0o=`eV?NI{sPph9L#^U?hd4AubR C7DkHz literal 0 HcmV?d00001 From f37caa0999b4d9a7a1ef92b7996d3bec00150b2b Mon Sep 17 00:00:00 2001 From: Friendika Date: Mon, 14 Feb 2011 02:59:22 -0800 Subject: [PATCH 08/26] try this again --- view/comment_item.tpl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/view/comment_item.tpl b/view/comment_item.tpl index 6f63e39b7..1b1f3a49e 100644 --- a/view/comment_item.tpl +++ b/view/comment_item.tpl @@ -1,9 +1,9 @@
- - - - + + + +
$mytitle From 5eebb373e5ac761ba0f2020a85fa6db7544f7229 Mon Sep 17 00:00:00 2001 From: Chris Case Date: Mon, 14 Feb 2011 03:59:54 -0800 Subject: [PATCH 09/26] revamped private message templates, added multipart messages with text and html versions, updated de, en, fr and it. Translated the french version of the private message template. --- mod/dfrn_notify.php | 40 ++++++++++++++++++++++----- view/de/mail_received_eml.tpl | 48 ++++++++++++++++++++++++++------ view/en/mail_received_eml.tpl | 30 +++++++++++++++++--- view/fr/mail_received_eml.tpl | 52 +++++++++++++++++++++++++++-------- view/it/mail_received_eml.tpl | 48 ++++++++++++++++++++++++++------ 5 files changed, 178 insertions(+), 40 deletions(-) diff --git a/mod/dfrn_notify.php b/mod/dfrn_notify.php index 49276647a..ffd9020c5 100644 --- a/mod/dfrn_notify.php +++ b/mod/dfrn_notify.php @@ -181,8 +181,28 @@ function dfrn_notify_post(&$a) { else $body = qp($body);*/ - $msg['body'] = str_replace(array("\\r\\n", "\\r", "\\n"), "
", $msg['body']); - $msg['body'] = html_entity_decode(strip_tags(bbcode($msg['body']))); + //$msg['body'] = str_replace(array("\\r\\n", "\\r", "\\n"), "
", $msg['body']); + //$msg['body'] = html_entity_decode(strip_tags(bbcode($msg['body']))); + $msg['mimeboundary'] =rand(0,9)."-" + .rand(10000000000,9999999999)."-" + .rand(10000000000,9999999999)."=:" + .rand(10000,99999); + + $msg['notificationfromname'] = t('Administrator'); + $msg['notificationfromemail'] = t('noreply') . '@' . $a->get_hostname(); + $msg['headers'] = + "From: {$msg['notificationfromname']} <{$msg['notificationfromemail']}>\n" . + "Reply-To: {$msg['notificationfromemail']}\n" . + "MIME-Version: 1.0\n" . + "Content-Type: multipart/alternative; boundary=\"{$msg['mimeboundary']}\""; + + + $msg['textversion'] + = html_entity_decode(strip_tags(bbcode(stripslashes($msg['body']))),ENT_QUOTES,'UTF-8'); + //$TextMessage = html_entity_decode(strip_tags(bbcode(str_replace(array("\\r\\n", "\\r", "\\n"), "\n",$msg['body'])))); ; + $msg['htmlversion'] + = str_replace(array("\\r\\n", "\\r", "\\n"), "
\n",html_entity_decode($msg['body'])); + $tpl = load_view_file('view/mail_received_eml.tpl'); $email_tpl = replace_macros($tpl, array( '$siteName' => $a->config['sitename'], @@ -194,16 +214,22 @@ function dfrn_notify_post(&$a) { '$senderName' => $importer['senderName'], '$from' => $msg['from-name'], '$title' => stripslashes($msg['title']), - '$body' => $msg['body'], + '$textversion' => $msg['textversion'], + '$htmlversion' => $msg['htmlversion'], + '$mimeboundary' => $msg['mimeboundary'], '$hostname' => $a->get_hostname() )); + logger("message headers: " . $msg['headers']); + logger("message body: " . $mail_tpl); + + $res = mail($importer['email'], t('New mail received at ') . $a->config['sitename'], - $email_tpl, - 'From: ' . t('Administrator') . '@' . $a->get_hostname() . "\r\n" + $email_tpl, $msg['headers'] + /* 'From: ' . t('Administrator') . '@' . $a->get_hostname() . "\r\n" . 'MIME-Version: 1.0' . "\r\n" - . 'Content-type: text/html; charset=iso-8859-1' . "\r\n" - . 'Content-transfer-encoding: 7-bit' . "\r\n" + . 'Content-type: text/html; charset=utf-8' . "\r\n" + . 'Content-transfer-encoding: quoted-printable' . "\r\n" */ ); } xml_status(0); diff --git a/view/de/mail_received_eml.tpl b/view/de/mail_received_eml.tpl index 466d31e79..174aa4f97 100644 --- a/view/de/mail_received_eml.tpl +++ b/view/de/mail_received_eml.tpl @@ -1,17 +1,47 @@ +--$mimeboundary +Content-Type: text/plain; charset=utf-8 +Content-Transfer-Encoding: 8bit -Lieber $username, - -du hast eine neue private Nachricht von '$from' auf '$sitename' erhhalten. ------ +Du hast eine neue private Nachricht von '$from' auf '$siteName' erhhalten. + $title ------ -$body ------ + +$textversion + Bitte melde dich unter $siteurl an um deine privaten Nachrichte zu lesen und zu beantworten. Viele Grüße, - $sitename Administrator +$siteName Administrator - +--$mimeboundary +Content-Type: text/html; charset=utf-8 +Content-Transfer-Encoding: 8bit + + + + + Friendika Nachricht + + + + + + + + + + + + + + + + + +
Friendika
Du hast eine neue private Nachricht von '$from' auf '$siteName' erhhalten.
$from
$title
$htmlversion
Bitte melde dich unter $siteurl an um deine privaten Nachrichte zu lesen und zu beantworten.
Viele Grüße,
$siteName Administrator
+ + + +--$mimeboundary-- \ No newline at end of file diff --git a/view/en/mail_received_eml.tpl b/view/en/mail_received_eml.tpl index 510978582..68df07c3d 100644 --- a/view/en/mail_received_eml.tpl +++ b/view/en/mail_received_eml.tpl @@ -1,3 +1,22 @@ +--$mimeboundary +Content-Type: text/plain; charset=utf-8 +Content-Transfer-Encoding: 8bit + +$from sent you a new private message at $siteName. + +$title + +$textversion + +Please login at $siteurl to read and reply to your private messages. + +Thank you, +$siteName administrator + +--$mimeboundary +Content-Type: text/html; charset=utf-8 +Content-Transfer-Encoding: 8bit + @@ -15,11 +34,14 @@ $from $title - $body + $htmlversion Please login at $siteurl to read and reply to your private messages. - Thank you, - $siteName administrator + Thank You, + $siteName Administrator - \ No newline at end of file + + +--$mimeboundary-- + diff --git a/view/fr/mail_received_eml.tpl b/view/fr/mail_received_eml.tpl index 261aec4be..972d141c3 100644 --- a/view/fr/mail_received_eml.tpl +++ b/view/fr/mail_received_eml.tpl @@ -1,16 +1,46 @@ +--$mimeboundary +Content-Type: text/plain; charset=utf-8 +Content-Transfer-Encoding: 8bit -Dear $username, - - You've received a new private message at $sitename from '$from'. ------ +$from t'a envoyŽ un message ˆ $siteName. + $title ------ -$body ------ -Please login at $siteurl to read and reply to your private messages. -Thank you, - $sitename administrator +$textversion - +Ouvrez une session svp ˆ $siteurl pour lire et rŽpondre ˆ vos messages privŽs. +Merci, +$siteName Administrateur + +--$mimeboundary +Content-Type: text/html; charset=utf-8 +Content-Transfer-Encoding: 8bit + + + + + Friendika Message + + + + + + + + + + + + + + + + + + +
Friendika
$from t'a envoyŽ un message ˆ $siteName.
$from
$title
$htmlversion
Ouvrez une session svp ˆ $siteurl pour lire et rŽpondre ˆ vos messages privŽs.
Merci,
$siteName Administrateur
+ + + +--$mimeboundary-- \ No newline at end of file diff --git a/view/it/mail_received_eml.tpl b/view/it/mail_received_eml.tpl index 137614ca4..c51917a88 100644 --- a/view/it/mail_received_eml.tpl +++ b/view/it/mail_received_eml.tpl @@ -1,16 +1,46 @@ +--$mimeboundary +Content-Type: text/plain; charset=utf-8 +Content-Transfer-Encoding: 8bit -Caro/a $username, - - Hai ricevuto un nuovo messsaggio privato su $sitename da '$from'. ------ +Hai ricevuto un nuovo messsaggio privato su $siteName da '$from'. + $title ------ -$body ------ + +$textversion + Accedi a $siteurl per leggere e rispondere ai tuoi messaggi privati. Grazie, - L'amministratore di $sitename +L'amministratore di $siteName - +--$mimeboundary +Content-Type: text/html; charset=utf-8 +Content-Transfer-Encoding: 8bit + + + + + Friendika Messsaggio + + + + + + + + + + + + + + + + + +
Friendika
Hai ricevuto un nuovo messsaggio privato su $siteName da '$from'.
$from
$title
$htmlversion
Accedi a $siteurl per leggere e rispondere ai tuoi messaggi privati.
Grazie,
L'amministratore di $siteName
+ + + +--$mimeboundary-- \ No newline at end of file From 39dd36176bb3c72702d6964394d9409be4d6cdcd Mon Sep 17 00:00:00 2001 From: Friendika Date: Mon, 14 Feb 2011 04:43:19 -0800 Subject: [PATCH 10/26] ajax comments --- include/main.js | 30 +++++++++++++++++++----------- 1 file changed, 19 insertions(+), 11 deletions(-) diff --git a/include/main.js b/include/main.js index afe968daf..abd097e54 100644 --- a/include/main.js +++ b/include/main.js @@ -29,6 +29,7 @@ $(document).ready(function() { $.ajaxSetup({cache: false}); + msie = $.browser.msie ; NavUpdate(); // Allow folks to stop the ajax page updates with the pause/break key @@ -211,15 +212,22 @@ } function post_comment(id) { - var typename = 'f-type-' + id; - var puidname = 'f-profile-uid-' + id; - var parname = 'f-parent-' + id; - var textname = 'comment-edit-text-' + id; - var type = $('input[id=typename]').val(); - var profile_uid = $('input[id=puidname]').val(); - var parent = $('input[id=parname]').val(); - var body = $('textarea[id=textname]').val(); + $.post( + "item", + $("#comment-edit-form-" + id).serialize(), + function(data) { + if(data.success) { + $("#comment-edit-wrapper-" + id).hide(); + $("#comment-edit-text-" + id).val(''); + var tarea = document.getElementById("comment-edit-text-" + id); + if(tarea) + commentClose(tarea,id); + if(timer) clearTimeout(timer); + timer = setTimeout(NavUpdate,10); + } + }, + "json" + ); + return false; + } - alert(body); - - } \ No newline at end of file From df209907536a3c5e093b8ae95070ca9941c6c797 Mon Sep 17 00:00:00 2001 From: Friendika Date: Mon, 14 Feb 2011 04:43:49 -0800 Subject: [PATCH 11/26] ajax comments --- mod/item.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mod/item.php b/mod/item.php index 0d9a674f2..2cc2b9eb2 100644 --- a/mod/item.php +++ b/mod/item.php @@ -492,6 +492,9 @@ function item_post(&$a) { if((x($_POST,'return')) && strlen($_POST['return'])) goaway($a->get_baseurl() . "/" . $_POST['return'] ); + + $json = array('success' => 1); + echo json_encode($json); killme(); // NOTREACHED } From 94e0c3c97044ea2fd3f9bcfcbd07dd6215d084a0 Mon Sep 17 00:00:00 2001 From: Chris Case Date: Mon, 14 Feb 2011 04:54:44 -0800 Subject: [PATCH 12/26] fixed the charset on the html version of the message, overlooked this in the last commit, now uses utf-8 in the meta tag --- view/de/mail_received_eml.tpl | 2 +- view/en/mail_received_eml.tpl | 2 +- view/fr/mail_received_eml.tpl | 2 +- view/it/mail_received_eml.tpl | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/view/de/mail_received_eml.tpl b/view/de/mail_received_eml.tpl index 174aa4f97..bf9bb9ca9 100644 --- a/view/de/mail_received_eml.tpl +++ b/view/de/mail_received_eml.tpl @@ -22,7 +22,7 @@ Content-Transfer-Encoding: 8bit Friendika Nachricht - + diff --git a/view/en/mail_received_eml.tpl b/view/en/mail_received_eml.tpl index 68df07c3d..802280052 100644 --- a/view/en/mail_received_eml.tpl +++ b/view/en/mail_received_eml.tpl @@ -21,7 +21,7 @@ Content-Transfer-Encoding: 8bit Friendika Message - +
diff --git a/view/fr/mail_received_eml.tpl b/view/fr/mail_received_eml.tpl index 972d141c3..f872a6713 100644 --- a/view/fr/mail_received_eml.tpl +++ b/view/fr/mail_received_eml.tpl @@ -21,7 +21,7 @@ Content-Transfer-Encoding: 8bit Friendika Message - +
diff --git a/view/it/mail_received_eml.tpl b/view/it/mail_received_eml.tpl index c51917a88..829c0fee5 100644 --- a/view/it/mail_received_eml.tpl +++ b/view/it/mail_received_eml.tpl @@ -21,7 +21,7 @@ Content-Transfer-Encoding: 8bit Friendika Messsaggio - +
From 42eb6dd723abd31aaaf6c1608f2dec645f4e20b5 Mon Sep 17 00:00:00 2001 From: Chris Case Date: Mon, 14 Feb 2011 05:44:27 -0800 Subject: [PATCH 13/26] fixed a bbcode issue with rich text html messages, fixed some issues with plain text. --- mod/dfrn_notify.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mod/dfrn_notify.php b/mod/dfrn_notify.php index ffd9020c5..7231e8fd2 100644 --- a/mod/dfrn_notify.php +++ b/mod/dfrn_notify.php @@ -198,10 +198,10 @@ function dfrn_notify_post(&$a) { $msg['textversion'] - = html_entity_decode(strip_tags(bbcode(stripslashes($msg['body']))),ENT_QUOTES,'UTF-8'); + = strip_tags(html_entity_decode(bbcode(stripslashes(str_replace(array("\\r\\n", "\\r", "\\n"), "\n",$msg['body']))),ENT_QUOTES,'UTF-8')); //$TextMessage = html_entity_decode(strip_tags(bbcode(str_replace(array("\\r\\n", "\\r", "\\n"), "\n",$msg['body'])))); ; $msg['htmlversion'] - = str_replace(array("\\r\\n", "\\r", "\\n"), "
\n",html_entity_decode($msg['body'])); + = html_entity_decode(bbcode(stripslashes(str_replace(array("\\r\\n", "\\r", "\\n"), "
\n",$msg['body'])))); $tpl = load_view_file('view/mail_received_eml.tpl'); $email_tpl = replace_macros($tpl, array( From 1dea6a2d711ddf39a5239dc86a1e3c4b7a650064 Mon Sep 17 00:00:00 2001 From: Friendika Date: Mon, 14 Feb 2011 20:21:28 -0800 Subject: [PATCH 14/26] wrong return url for ajax comments on display and photos pages --- boot.php | 4 +++- images/smiley-brokenheart.gif | Bin 0 -> 616 bytes mod/display.php | 2 +- mod/photos.php | 2 +- 4 files changed, 5 insertions(+), 3 deletions(-) create mode 100644 images/smiley-brokenheart.gif diff --git a/boot.php b/boot.php index 6a1d3a04b..5dc751879 100644 --- a/boot.php +++ b/boot.php @@ -1978,9 +1978,11 @@ function smilies($s) { $a = get_app(); return str_replace( - array( '<3', ':-)', ';-)', ':-(', ':(', ':-P', ':-"', ':-x', ':-X', ':-D', '8-|', '8-O'), + array( '<3', '</3', '<\\3', ':-)', ';-)', ':-(', ':(', ':-P', ':-"', ':-x', ':-X', ':-D', '8-|', '8-O'), array( '<3', + '</3', + '<\\3', ':-)', ';-)', ':-(', diff --git a/images/smiley-brokenheart.gif b/images/smiley-brokenheart.gif new file mode 100644 index 0000000000000000000000000000000000000000..79ca0c31b46ad5fad3780cb4e009f7b427907179 GIT binary patch literal 616 zcmZ?wbhEHb6k-r!IOf2>#>6DTz@WguAjZXO#lq^r#Kb8g9L>Ox!@wXZAyv-6*v!B% zlYuFZPhc?v!$tT2m?($YHG*24gBNFd7E#@frv)yKy%B*Zs3I4(N6proX=s3fzhs;sH0ed5GPQ>XMzpEhCE ztf}+n&0Mr_+KS~1HmqN_W%JHWn>Ov+yKV2@o%{CgK79DtWV5P;%@f&FNMb(5a5h=i7{wZ3YbmQ7QW5i6gR7?+^x zI1ZO;B&r5Z|*&fL&>V zEUTrp0h89{h$W#bC6!dXaV|dUZ!NFh+02paY-v9sr literal 0 HcmV?d00001 diff --git a/mod/display.php b/mod/display.php index 3215ae90a..b07e1aee5 100644 --- a/mod/display.php +++ b/mod/display.php @@ -153,7 +153,7 @@ function display_content(&$a) { } if($item['last-child']) { $comment = replace_macros($cmnt_tpl,array( - '$return_path' => $_SESSION['return_url'], + '$return_path' => '', // $_SESSION['return_url'], '$type' => 'wall-comment', '$id' => $item['item_id'], '$parent' => $item['parent'], diff --git a/mod/photos.php b/mod/photos.php index 9acde458d..a44eb5a5f 100644 --- a/mod/photos.php +++ b/mod/photos.php @@ -1048,7 +1048,7 @@ function photos_content(&$a) { if($can_post || can_write_wall($a,$owner_uid)) { if($link_item['last-child']) { $o .= replace_macros($cmnt_tpl,array( - '$return_path' => $return_url, + '$return_path' => '', // $return_url, '$type' => 'wall-comment', '$id' => $link_item['id'], '$parent' => $link_item['id'], From 0e7b09b41c6df5944dfe65ee047f74227c294e26 Mon Sep 17 00:00:00 2001 From: Friendika Date: Mon, 14 Feb 2011 21:33:17 -0800 Subject: [PATCH 15/26] bug #0000002, strip HTML from pasted text in prv messages --- view/de/msg-header.tpl | 14 +++++++++----- view/en/msg-header.tpl | 14 +++++++++----- view/fr/msg-header.tpl | 14 +++++++++----- view/it/msg-header.tpl | 14 +++++++++----- 4 files changed, 36 insertions(+), 20 deletions(-) diff --git a/view/de/msg-header.tpl b/view/de/msg-header.tpl index 3d2567f62..174e6c985 100644 --- a/view/de/msg-header.tpl +++ b/view/de/msg-header.tpl @@ -6,14 +6,14 @@ tinyMCE.init({ theme : "advanced", mode : "specific_textareas", editor_selector: /(profile-jot-text|prvmail-text)/, - plugins : "bbcode", + plugins : "bbcode,paste", theme_advanced_buttons1 : "bold,italic,underline,undo,redo,link,unlink,image,forecolor", theme_advanced_buttons2 : "", theme_advanced_buttons3 : "", theme_advanced_toolbar_location : "top", theme_advanced_toolbar_align : "center", - theme_advanced_styles : "Code=codeStyle;Quote=quoteStyle", - content_css : "bbcode.css", + theme_advanced_blockformats : "blockquote,code", + paste_text_sticky : true, entity_encoding : "raw", add_unload_trigger : false, remove_linebreaks : false, @@ -44,8 +44,12 @@ tinyMCE.init({ $('#character-counter').addClass('red'); } $('#character-counter').text(text); - }); - } + }); + + ed.onInit.add(function(ed) { + ed.pasteAsPlainText = true; + }); + } }); diff --git a/view/en/msg-header.tpl b/view/en/msg-header.tpl index 3d2567f62..174e6c985 100644 --- a/view/en/msg-header.tpl +++ b/view/en/msg-header.tpl @@ -6,14 +6,14 @@ tinyMCE.init({ theme : "advanced", mode : "specific_textareas", editor_selector: /(profile-jot-text|prvmail-text)/, - plugins : "bbcode", + plugins : "bbcode,paste", theme_advanced_buttons1 : "bold,italic,underline,undo,redo,link,unlink,image,forecolor", theme_advanced_buttons2 : "", theme_advanced_buttons3 : "", theme_advanced_toolbar_location : "top", theme_advanced_toolbar_align : "center", - theme_advanced_styles : "Code=codeStyle;Quote=quoteStyle", - content_css : "bbcode.css", + theme_advanced_blockformats : "blockquote,code", + paste_text_sticky : true, entity_encoding : "raw", add_unload_trigger : false, remove_linebreaks : false, @@ -44,8 +44,12 @@ tinyMCE.init({ $('#character-counter').addClass('red'); } $('#character-counter').text(text); - }); - } + }); + + ed.onInit.add(function(ed) { + ed.pasteAsPlainText = true; + }); + } }); diff --git a/view/fr/msg-header.tpl b/view/fr/msg-header.tpl index 3d2567f62..174e6c985 100644 --- a/view/fr/msg-header.tpl +++ b/view/fr/msg-header.tpl @@ -6,14 +6,14 @@ tinyMCE.init({ theme : "advanced", mode : "specific_textareas", editor_selector: /(profile-jot-text|prvmail-text)/, - plugins : "bbcode", + plugins : "bbcode,paste", theme_advanced_buttons1 : "bold,italic,underline,undo,redo,link,unlink,image,forecolor", theme_advanced_buttons2 : "", theme_advanced_buttons3 : "", theme_advanced_toolbar_location : "top", theme_advanced_toolbar_align : "center", - theme_advanced_styles : "Code=codeStyle;Quote=quoteStyle", - content_css : "bbcode.css", + theme_advanced_blockformats : "blockquote,code", + paste_text_sticky : true, entity_encoding : "raw", add_unload_trigger : false, remove_linebreaks : false, @@ -44,8 +44,12 @@ tinyMCE.init({ $('#character-counter').addClass('red'); } $('#character-counter').text(text); - }); - } + }); + + ed.onInit.add(function(ed) { + ed.pasteAsPlainText = true; + }); + } }); diff --git a/view/it/msg-header.tpl b/view/it/msg-header.tpl index f6f437864..69e813ae2 100644 --- a/view/it/msg-header.tpl +++ b/view/it/msg-header.tpl @@ -6,14 +6,14 @@ tinyMCE.init({ theme : "advanced", mode : "specific_textareas", editor_selector: /(profile-jot-text|prvmail-text)/, - plugins : "bbcode", + plugins : "bbcode,paste", theme_advanced_buttons1 : "bold,italic,underline,undo,redo,link,unlink,image,forecolor", theme_advanced_buttons2 : "", theme_advanced_buttons3 : "", theme_advanced_toolbar_location : "top", theme_advanced_toolbar_align : "center", - theme_advanced_styles : "Code=codeStyle;Quote=quoteStyle", - content_css : "bbcode.css", + theme_advanced_blockformats : "blockquote,code", + paste_text_sticky : true, entity_encoding : "raw", add_unload_trigger : false, remove_linebreaks : false, @@ -44,8 +44,12 @@ tinyMCE.init({ $('#character-counter').addClass('red'); } $('#character-counter').text(text); - }); - } + }); + + ed.onInit.add(function(ed) { + ed.pasteAsPlainText = true; + }); + } }); From afdfc725b8ad025c003214f75bbad7a2bdd83b9c Mon Sep 17 00:00:00 2001 From: Tobias Diekershoff Date: Tue, 15 Feb 2011 09:49:38 +0100 Subject: [PATCH 16/26] some translations into German --- view/de/comment_item.tpl | 22 ++++++++++++++++++ view/de/strings.php | 49 +++++++++++++++++++++++++++++----------- 2 files changed, 58 insertions(+), 13 deletions(-) create mode 100644 view/de/comment_item.tpl diff --git a/view/de/comment_item.tpl b/view/de/comment_item.tpl new file mode 100644 index 000000000..3ee4dfa9c --- /dev/null +++ b/view/de/comment_item.tpl @@ -0,0 +1,22 @@ +
+ + + + + + +
+ $mytitle +
+
+ + +
+ + +
+ + +
diff --git a/view/de/strings.php b/view/de/strings.php index bc31fab78..ef6892e8d 100644 --- a/view/de/strings.php +++ b/view/de/strings.php @@ -57,6 +57,18 @@ $a->strings['December'] = 'Dezember'; $a->strings['Birthdays this week:'] = 'Geburtstage diese Woche:'; $a->strings["\x28Adjusted for local time\x29"] = "\x28an die lokale Zeit angepasst\x29"; $a->strings['[today]'] = '[heute]'; +$a->strings['Unable to locate original post.'] = 'Unable to locate original post.'; +$a->strings['Empty post discarded.'] = 'Empty post discarded.'; +$a->strings['Wall Photos'] = 'Wall Photos'; +$a->strings[" commented on your item at "] = " commented on your item at "; +$a->strings[" posted on your profile wall at "] = " posted on your profile wall at "; +$a->strings['System error. Post not saved.'] = 'System error. Post not saved.'; +$a->strings['This message was sent to you by '] = 'This message was sent to you by '; +$a->strings[', a member of the Friendika social network.'] = ', a member of the Friendika social network.'; +$a->strings['You may visit them online at'] = 'You may visit them online at'; +$a->strings['Please contact the sender by replying to this post if you do not wish to receive these messages.'] = 'Please contact the sender by replying to this post if you do not wish to receive these messages.'; +$a->strings['posted an update.'] = 'posted an update.'; +$a->strings['Item not found.'] = 'Item not found.'; $a->strings["Invite Friends"] = "Freunde einladen"; $a->strings['Connect/Follow [profile address]'] = 'Kontaktiere/Folge [Profil Adresse]'; $a->strings['Example: bob@example.com, http://example.com/barbara'] = 'Beispiel: bob@example.com, http://example.com/barbara'; @@ -76,6 +88,9 @@ $a->strings['Contact not found.'] = 'Kontakt nicht gefunden.'; $a->strings['Mutual Friendship'] = 'Beidseitige Freundschaft'; $a->strings['is a fan of yours'] = 'ist ein Fan von dir'; $a->strings['you are a fan of'] = 'du bist Fan von'; +$a->strings['Never'] = 'Niemals'; +$a->strings["\x28Update was successful\x29"] = "\x28Aktualisierung war erfolgreich\x29"; +$a->strings["\x28Update was not successful\x29"] = "\x28Aktualisierung war nicht erfolgreich\x29"; $a->strings['Contact Editor'] = 'Kontakt Editor'; $a->strings['Visit $name\'s profile'] = 'Besuche das Profil von $name'; $a->strings['Block/Unblock contact'] = 'Kontakt blockieren/freischalten'; @@ -83,7 +98,6 @@ $a->strings['Ignore contact'] = 'Ignoriere den Kontakt'; $a->strings['Delete contact'] = 'Lösche den Kontakt'; $a->strings['Last updated: '] = 'Letzte Aktualisierung: '; $a->strings['Update public posts: '] = 'Aktualisierung öffentlicher Nachrichten: '; -$a->strings['Never'] = 'Niemals'; $a->strings['Update now'] = 'Jetzt aktualisieren'; $a->strings['Unblock this contact'] = 'Blockade dieses Kontakts aufheben'; $a->strings['Block this contact'] = 'Diesen Kontakt blockieren'; @@ -159,7 +173,6 @@ $a->strings['Your profile address:'] = 'Deine Profiladresse:'; $a->strings['Submit Request'] = 'Anfrage abschicken'; $a->strings['Cancel'] = 'Abbrechen'; $a->strings['Global Directory'] = 'Weltweites Verzeichnis'; -$a->strings['Item not found.'] = 'Eintrag nicht gefunden.'; $a->strings['Private Message'] = 'Private Nachricht'; $a->strings['This is you'] = 'Das bist du'; $a->strings['View $name\'s profile'] = 'Profile von $name'; @@ -215,16 +228,6 @@ $a->strings['Your message:'] = 'Deine Nachricht:'; $a->strings['Please join my social network on '] = 'Bitte trete meinem sozialen Netzwerk bei '; $a->strings['To accept this invitation, please visit:'] = 'Um diese Einladung anzunehmen beuche bitte:'; $a->strings['Once you have registered, please connect with me via my profile page at:'] = 'Sobald du registriert bist kontaktiere mich bitte auf meiner Profilseite:'; -$a->strings['Unable to locate original post.'] = 'Konnte das original Posting nicht finden.'; -$a->strings['Empty post discarded.'] = 'Leere Nachricht verworfen.'; -$a->strings['Wall Photos'] = 'Pinnwand Fotos'; -$a->strings[" commented on your item at "] = " kommentierte eines deiner Postings auf "; -$a->strings[" posted on your profile wall at "] = " schrieb an deine Profilwand auf "; -$a->strings['This message was sent to you by '] = 'This message was sent to you by '; -$a->strings[', a member of the Friendika social network.'] = ', a member of the Friendika social network.'; -$a->strings['You may visit them online at'] = 'You may visit them online at'; -$a->strings['Please contact the sender by replying to this post if you do not wish to receive these messages.'] = 'Please contact the sender by replying to this post if you do not wish to receive these messages.'; -$a->strings['posted an update.'] = 'posted an update.'; $a->strings['photo'] = 'Foto'; $a->strings['status'] = 'Status'; $a->strings['likes'] = 'mag das'; @@ -356,7 +359,9 @@ $a->strings['Register'] = 'Registrieren'; $a->strings['Please login.'] = 'Bitte melde dich an.'; $a->strings['Registration revoked for '] = 'Registration zurückgezogen '; $a->strings['Account approved.'] = 'Account freigegeben.'; -$a->strings['View in context'] = 'Im Kontext betrachten'; +$a->strings['Remove My Account'] = 'Remove My Account'; +$a->strings['This will completely remove your account. Once this has been done it is not recoverable.'] = 'This will completely remove your account. Once this has been done it is not recoverable.'; +$a->strings['Please enter your password for verification:'] = 'Please enter your password for verification:'; $a->strings['Passwords do not match. Password unchanged.'] = 'Die Passwörter stimmen nicht überein. Das Passwort bleibt unverändert.'; $a->strings['Empty passwords are not allowed. Password unchanged.'] = 'Leere Passwörter sind nicht erlaubt. Passwort bleibt unverändert.'; $a->strings['Password changed.'] = 'Passwort ändern.'; @@ -364,6 +369,7 @@ $a->strings['Password update failed. Please try again.'] = 'Aktualisierung des P $a->strings[' Please use a shorter name.'] = ' Bitte verwende einen kürzeren Namen.'; $a->strings[' Name too short.'] = ' Name ist zu kurz.'; $a->strings[' Not valid email.'] = ' Keine gültige EMail.'; +$a->strings[' Cannot change to that email.'] = ' Cannot change to that email.'; $a->strings['Settings updated.'] = 'Einstellungen aktualisiert.'; $a->strings['Plugin Settings'] = 'Plugin Einstellungen'; $a->strings['Account Settings'] = 'Account Einstellungen'; @@ -487,6 +493,23 @@ $a->strings['File has an invalid extension, it should be one of '] = 'Die Dateie $a->strings['Upload was cancelled, or server error encountered'] = 'Upload abgebrochen oder Serverfehler aufgetreten'; $a->strings['Randplace Settings'] = 'Randplace Settings'; $a->strings['Enable Randplace Plugin'] = 'Randplace Erweiterung aktivieren'; +$a->strings['No consumer key pair for StatusNet found. Register your Friendika 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 Friendika installation at your favorited StatusNet installation.'] = 'No consumer key pair for StatusNet found. Register your Friendika 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 Friendika installation at your favorited StatusNet installation.'; +$a->strings['OAuth Consumer Key'] = 'OAuth Consumer Key'; +$a->strings['OAuth Consumer Secret'] = 'OAuth Consumer Secret'; +$a->strings['Base API Path (remember the trailing /] = 'Base API Path (remember the trailing /; +$a->strings['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.'] = '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.'; +$a->strings['Log in with StatusNet'] = 'Log in with StatusNet'; +$a->strings['Copy the security code from StatusNet here'] = 'Copy the security code from StatusNet here'; +$a->strings['Currently connected to: '] = 'Currently connected to: '; +$a->strings['If enabled all your public postings will be posted to the associated StatusNet account as well.'] = 'If enabled all your public postings will be posted to the associated StatusNet account as well.'; +$a->strings['Send public postings to StatusNet'] = 'Send public postings to StatusNet'; +$a->strings['Clear OAuth configuration'] = 'Clear OAuth configuration'; +$a->strings['Twitter Posting Settings'] = 'Twitter Posting Settings'; +$a->strings['No consumer key pair for Twitter found. Please contact your site administrator.'] = 'No consumer key pair for Twitter found. Please contact your site administrator.'; +$a->strings['At this Friendika 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.'] = 'At this Friendika 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.'; +$a->strings['Copy the PIN from Twitter here'] = 'Copy the PIN from Twitter here'; +$a->strings['If enabled all your public postings will be posted to the associated Twitter account as well.'] = 'If enabled all your public postings will be posted to the associated Twitter account as well.'; +$a->strings['Send public postings to Twitter'] = 'Send public postings to Twitter'; $a->strings['Africa/Abidjan'] = 'Africa/Abidjan'; $a->strings['Africa/Accra'] = 'Africa/Accra'; $a->strings['Africa/Addis_Ababa'] = 'Africa/Addis_Ababa'; From 397643a0660930ffb80c108727b3453dd5717bd9 Mon Sep 17 00:00:00 2001 From: Tobias Diekershoff Date: Tue, 15 Feb 2011 10:03:05 +0100 Subject: [PATCH 17/26] masked the / in the config strings to fix problems with the strings.php --- addon/statusnet/statusnet.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addon/statusnet/statusnet.php b/addon/statusnet/statusnet.php index bc47242fc..46ecdde99 100644 --- a/addon/statusnet/statusnet.php +++ b/addon/statusnet/statusnet.php @@ -133,7 +133,7 @@ function statusnet_settings(&$a,&$s) { $s .= '
'; $s .= ''; $s .= '
'; - $s .= ''; + $s .= ''; $s .= '
'; $s .= '
'; $s .= '
'; From 7a6174298b23aa9a4c94bc8a56b146630da3f2c6 Mon Sep 17 00:00:00 2001 From: Tobias Diekershoff Date: Tue, 15 Feb 2011 10:56:07 +0100 Subject: [PATCH 18/26] deleted the translated file of comment_item.tpl --- view/de/comment_item.tpl | 22 ---------------------- 1 file changed, 22 deletions(-) delete mode 100644 view/de/comment_item.tpl diff --git a/view/de/comment_item.tpl b/view/de/comment_item.tpl deleted file mode 100644 index 3ee4dfa9c..000000000 --- a/view/de/comment_item.tpl +++ /dev/null @@ -1,22 +0,0 @@ -
-
- - - - - -
- $mytitle -
-
- - -
- - -
- - -
From 1b14f67a86c17da457af4c2ede78aec49f673195 Mon Sep 17 00:00:00 2001 From: Friendika Date: Tue, 15 Feb 2011 02:30:01 -0800 Subject: [PATCH 19/26] bug #0000006, local sparkle links visible in "like" items when remote viewing --- boot.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/boot.php b/boot.php index 5dc751879..ede8459cb 100644 --- a/boot.php +++ b/boot.php @@ -1804,7 +1804,7 @@ function like_puller($a,$item,&$arr,$mode) { if((activity_match($item['verb'],$verb)) && ($item['id'] != $item['parent'])) { $url = $item['author-link']; - if(($item['network'] === 'dfrn') && (! $item['self']) && ($item['author-link'] == $item['url'])) { + if((local_user()) && (local_user() == $item['uid']) && ($item['network'] === 'dfrn') && (! $item['self']) && (link_compare($item['author-link'],$item['url']))) { $url = $a->get_baseurl() . '/redir/' . $item['contact-id']; $sparkle = ' class="sparkle" '; } From f856493555480ae74f39f7d56796edc74ea61312 Mon Sep 17 00:00:00 2001 From: Friendika Date: Tue, 15 Feb 2011 03:13:38 -0800 Subject: [PATCH 20/26] add permalink field to item table --- boot.php | 4 ++-- database.sql | 1 + update.php | 4 ++++ 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/boot.php b/boot.php index ede8459cb..3dff39a33 100644 --- a/boot.php +++ b/boot.php @@ -2,8 +2,8 @@ set_time_limit(0); -define ( 'BUILD_ID', 1038 ); -define ( 'FRIENDIKA_VERSION', '2.10.0906' ); +define ( 'BUILD_ID', 1039 ); +define ( 'FRIENDIKA_VERSION', '2.10.0907' ); define ( 'DFRN_PROTOCOL_VERSION', '2.1' ); define ( 'EOL', "
\r\n" ); diff --git a/database.sql b/database.sql index 55671db85..93e444b6b 100644 --- a/database.sql +++ b/database.sql @@ -181,6 +181,7 @@ CREATE TABLE IF NOT EXISTS `item` ( `object` text NOT NULL, `target-type` char(255) NOT NULL, `target` text NOT NULL, + `plink` char(255) NOT NULL, `resource-id` char(255) NOT NULL, `tag` mediumtext NOT NULL, `inform` mediumtext NOT NULL, diff --git a/update.php b/update.php index 84eaebe18..131014d4a 100644 --- a/update.php +++ b/update.php @@ -370,3 +370,7 @@ function update_1037() { } +function update_1038() { + q("ALTER TABLE `item` ADD `plink` CHAR( 255 ) NOT NULL AFTER `target` "); +} + From dd8bbe820294ce6e0ca2e17f8783cb125b9871db Mon Sep 17 00:00:00 2001 From: Fabio Comuni Date: Tue, 15 Feb 2011 12:23:47 +0100 Subject: [PATCH 21/26] change \"html\" with \"bb code\" in tinyMce icons --- .../tiny_mce/themes/advanced/img/icons.gif | Bin 11794 -> 11827 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/tinymce/jscripts/tiny_mce/themes/advanced/img/icons.gif b/tinymce/jscripts/tiny_mce/themes/advanced/img/icons.gif index e46de5333082869b9bdab2576a554a2f9d01a966..c6a75fc13aa5383080f25558bb2030776b773178 100644 GIT binary patch delta 10994 zcmWle`#;l<80z-p0zirmA^h~fyz4+!cvbCthU1HYSJ!ohxjiUWEq4c5k;M5n?vZyN+JJ7R1 zFL;D|CnXfbyMbco%`Z!a^V(ik<~bYtFnaPyR|J*mA7-2I0wPAt$u*em$H1C2I-6=q z`Kf?$f%?T1gcAJqV%2_)JUBV@Yy687U#_i?QAFlx+0Ky|%CRiXL)5TR!!S2an)Khz zyO19*>QQWHTb~g7pGOnN2@h4Bip)2-k{D;tJ1Iez;fOOLUf@_aw1K|vY=9nxHggG@ z4eG1%mqMl7((m*CZ8B&GqMl=$8L+@i&{!bL!R2p%wta_58c?V_8+DzI2xPspx^Cj( zw?^R4*HqDH;c%V@F1Z2~;v_7gMFC3V&%;X(T=8F;FkvCdzT?#BBTkw>tMi=up<=>fD|9>GFl38iW^w5(hjv#?~$w^i0N2p~ml!!fRdsp?dBDaHe7 z+p8WON1^fiMf zJkMnbeO!9-@?rL~NAbOpwte`E2h6XT9;gg(*oi9cSLP8v7h@ouLC^4p!P8Pdg2bw8 zB!APL!bdGKL*G-wdKZUNaGKs&e@lnHVYrk0JTn4-H~)-x2o#?kmY{5=eCrm^S|m`f z=Cy}7$9PWV+XyLSYLIlb&8xdecVUPL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oE^pEZu1n+d`B_Yw2t2!J5V$Wb0%9M% zym#H?HJygfyl>lzau;63cZp5?;G&%wV3rx^_$|P!kL8jXoRS&B$PBH>3~R^?@5+q0 zkr_Fe8TBkP`cvi(X(mlRD@HqOr&(64V^*AB)~+2{@hMpe3`SOBMb_?ytfa22JvXwF zC$siG%i8xTE9K<3mZR_V-V_jjXQeyt&+yxyxnqA;%KptBK&qp{j_j*7o<+_SCZ@U| zOtf|Xr~M4+ex`hOzV>Q(SAKNyk6%VV3O!lweW0-zwvCi8^^@#ib!C^{$S#}AF7L`l zNRXU1`J4odiV=fjEG!B+py!;;u2{%Ek#gW9<3M%A&uIDm9K#^PW)*ZiEZu~R`Q0gR({$hS8v#7smwfR}j`A<1r(wrtg z7R88@AqEor5b9!%pYWHRfE7wX2r6=~H01Vo{f<3}WQ47v2S#$QJ^OwAb?$Y?V*OB% zc#X4N3{zmDZx^9;nCRh)xuX?%V-0!ZBj22XLix~wvpI-^4M_J+_|NvdDeZ&PW(Q{y zid+2-wl!Qk)5nQ|kSGD`T6~a?fa6DgJ2QFk$+Lr>o?7RyLlVRxt8A{%Ttblhmax6h zuctc>ZF`k+==G2N2w_nLgUR)K8Y=XA?C~#5`1kdvL!YFFBt==Z75h&$NIXU-mmU>H z%>I+4Fn%x?tFJS&rP+D>LleGCKTlZFD#8`OL`hM{xF+j%j#sS@xzH1O<`KKvB4NCv zn|{L7G%{mr;+rpqBA#=Rf=SX>qv>YvlNNj5D(QhcEZc@%C12M+>#?r#tujFnv0ZV}?QicK-qB(3eR7 From 0d853433eb9b3e6d7bd4305f42bad739ca7a7e48 Mon Sep 17 00:00:00 2001 From: Chris Case Date: Tue, 15 Feb 2011 03:31:20 -0800 Subject: [PATCH 22/26] fixed error which was causing multiple line breaks, added comments to better document what is occuring, cleaned up code, removed unnecessary parameters from templating step --- mod/dfrn_notify.php | 75 +++++++++++++++++++++++++-------------------- 1 file changed, 41 insertions(+), 34 deletions(-) diff --git a/mod/dfrn_notify.php b/mod/dfrn_notify.php index 7231e8fd2..5f91f1b1b 100644 --- a/mod/dfrn_notify.php +++ b/mod/dfrn_notify.php @@ -173,63 +173,70 @@ function dfrn_notify_post(&$a) { require_once('bbcode.php'); if($importer['notify-flags'] & NOTIFY_MAIL) { -// $body = html_entity_decode(strip_tags(bbcode(stripslashes(nl2br($msg['body'])))),ENT_QUOTES,'UTF-8'); -// $body = strip_tags(bbcode(stripslashes(nl2br($msg['body'])))); - - /*if(function_exists('quoted_printable_encode')) - $body = quoted_printable_encode($body); - else - $body = qp($body);*/ - - //$msg['body'] = str_replace(array("\\r\\n", "\\r", "\\n"), "
", $msg['body']); - //$msg['body'] = html_entity_decode(strip_tags(bbcode($msg['body']))); + // generate a mime boundary $msg['mimeboundary'] =rand(0,9)."-" .rand(10000000000,9999999999)."-" .rand(10000000000,9999999999)."=:" .rand(10000,99999); + // name of the automated email sender $msg['notificationfromname'] = t('Administrator'); + // noreply address to send from $msg['notificationfromemail'] = t('noreply') . '@' . $a->get_hostname(); + // message headers $msg['headers'] = "From: {$msg['notificationfromname']} <{$msg['notificationfromemail']}>\n" . "Reply-To: {$msg['notificationfromemail']}\n" . "MIME-Version: 1.0\n" . "Content-Type: multipart/alternative; boundary=\"{$msg['mimeboundary']}\""; - + // text version + // process the message body to display properly in text mode + // 1) substitute a \n character for the "\" then "n", so it behaves properly (it doesn't come in as a \n character) + // 2) remove escape slashes + // 3) decode any bbcode from the message editor + // 4) decode any encoded html tags + // 5) remove html tags $msg['textversion'] = strip_tags(html_entity_decode(bbcode(stripslashes(str_replace(array("\\r\\n", "\\r", "\\n"), "\n",$msg['body']))),ENT_QUOTES,'UTF-8')); - //$TextMessage = html_entity_decode(strip_tags(bbcode(str_replace(array("\\r\\n", "\\r", "\\n"), "\n",$msg['body'])))); ; + + // html version + // process the message body to display properly in text mode + // 1) substitute a
tag for the "\" then "n", so it behaves properly (it doesn't come in as a \n character) + // 2) remove escape slashes + // 3) decode any bbcode from the message editor + // 4) decode any encoded html tags $msg['htmlversion'] - = html_entity_decode(bbcode(stripslashes(str_replace(array("\\r\\n", "\\r", "\\n"), "
\n",$msg['body'])))); - - $tpl = load_view_file('view/mail_received_eml.tpl'); + = html_entity_decode(bbcode(stripslashes(str_replace(array("\\r\\n", "\\r","\\n\\n" ,"\\n"), "
\n",$msg['body'])))); + + // load the template for private message notifications + $tpl = load_view_file('view/mail_received_eml.tpl'); + + // import the data into the template $email_tpl = replace_macros($tpl, array( - '$siteName' => $a->config['sitename'], - '$siteurl' => $a->get_baseurl(), - '$username' => $importer['username'], - '$thumb' => $importer['thumb'], - '$email' => $importer['email'], - '$url' => $importer['url'], - '$senderName' => $importer['senderName'], - '$from' => $msg['from-name'], - '$title' => stripslashes($msg['title']), - '$textversion' => $msg['textversion'], - '$htmlversion' => $msg['htmlversion'], - '$mimeboundary' => $msg['mimeboundary'], - '$hostname' => $a->get_hostname() + '$siteName' => $a->config['sitename'], // name of this site + '$siteurl' => $a->get_baseurl(), // descriptive url of this site + '$thumb' => $importer['thumb'], // thumbnail url for sender icon + '$email' => $importer['email'], // email address to send to + '$url' => $importer['url'], // full url for the site + '$from' => $msg['from-name'], // name of the person sending the message + '$title' => stripslashes($msg['title']), // subject of the message + '$textversion' => $msg['textversion'], // text version of the message + '$htmlversion' => $msg['htmlversion'], // html version of the message + '$mimeboundary' => $msg['mimeboundary'], // mime message divider + '$hostname' => $a->get_hostname() // name of this host )); logger("message headers: " . $msg['headers']); logger("message body: " . $mail_tpl); - $res = mail($importer['email'], t('New mail received at ') . $a->config['sitename'], - $email_tpl, $msg['headers'] - /* 'From: ' . t('Administrator') . '@' . $a->get_hostname() . "\r\n" - . 'MIME-Version: 1.0' . "\r\n" - . 'Content-type: text/html; charset=utf-8' . "\r\n" - . 'Content-transfer-encoding: quoted-printable' . "\r\n" */ + // send the message + $res = mail( + $importer['email'], // send to address + t('New mail received at ') . $a->config['sitename'], // subject + $email_tpl, // message body + $msg['headers'] // message headers ); } xml_status(0); From 5cfefba5c8852c101ad62b0a59410705fa15b842 Mon Sep 17 00:00:00 2001 From: Fabio Comuni Date: Tue, 15 Feb 2011 14:40:26 +0100 Subject: [PATCH 23/26] Small tweaks to string_translator --- util/string_translator.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/util/string_translator.php b/util/string_translator.php index 4d24f7a6f..4112d9506 100644 --- a/util/string_translator.php +++ b/util/string_translator.php @@ -4,6 +4,7 @@ @@ -78,14 +79,13 @@ function strhex($string) { echo "

Translator

"; -echo "

Utility to translate string.php file."; -echo " Need write permission to language file you want to modify

"; +echo "Utility to translate string.php file."; +echo " Need write permission to language file you want to modify"; echo "

Installed languages:"; -echo "

    "; foreach($LANGS as $l){ - echo "
  • $l
  • "; + echo "$l, "; } -echo "

"; +echo "

"; $strings['en'] = loadstrings(); @@ -156,7 +156,7 @@ if (isset($_GET['lang'])){ $istranslate = $translation != '' ? 'yes':'no'; echo "
"; - echo "
"; + echo "
"; echo "
"; echo "
"; } From 1bb9effd383f6e174f56109606ae37fa927bad07 Mon Sep 17 00:00:00 2001 From: Fabio Comuni Date: Tue, 15 Feb 2011 14:41:48 +0100 Subject: [PATCH 24/26] fin un util/strings --- util/strings.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/strings.php b/util/strings.php index b6360e971..e74922c6e 100644 --- a/util/strings.php +++ b/util/strings.php @@ -496,7 +496,7 @@ $a->strings['Enable Randplace Plugin'] = 'Enable Randplace Plugin'; $a->strings['No consumer key pair for StatusNet found. Register your Friendika 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 Friendika installation at your favorited StatusNet installation.'] = 'No consumer key pair for StatusNet found. Register your Friendika 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 Friendika installation at your favorited StatusNet installation.'; $a->strings['OAuth Consumer Key'] = 'OAuth Consumer Key'; $a->strings['OAuth Consumer Secret'] = 'OAuth Consumer Secret'; -$a->strings['Base API Path (remember the trailing /] = 'Base API Path (remember the trailing /; +$a->strings['Base API Path (remember the trailing /)'] = 'Base API Path (remember the trailing /)'; $a->strings['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.'] = '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.'; $a->strings['Log in with StatusNet'] = 'Log in with StatusNet'; $a->strings['Copy the security code from StatusNet here'] = 'Copy the security code from StatusNet here'; From 48e2a6bde94c45825714e4dddd231984129a3e9a Mon Sep 17 00:00:00 2001 From: Fabio Comuni Date: Tue, 15 Feb 2011 14:53:55 +0100 Subject: [PATCH 25/26] Updated it language --- view/it/settings_nick_unset.tpl | 11 ++++++----- view/it/strings.php | 23 +++++++++++++++++++++++ 2 files changed, 29 insertions(+), 5 deletions(-) diff --git a/view/it/settings_nick_unset.tpl b/view/it/settings_nick_unset.tpl index 903768b59..8f4cba475 100644 --- a/view/it/settings_nick_unset.tpl +++ b/view/it/settings_nick_unset.tpl @@ -1,13 +1,14 @@

-Your profile URL is currently '$baseurl/profile/$uid'. -Setting a nickname will allow a friendly profile URL such as -'nickname@$basepath'. +L'URL del tuo profilo è '$baseurl/profile/$uid'. +Impostare un soprannome permetterà di avere un URL più aimchevole, come +'soprannome@$basepath'.
-Once set, it can never be changed. The nickname must start with a letter; and only letters, numbers, dashes, and underscores are allowed. +Una volta impostato, non potr&agreve; più essere cambiato. Il soprannome deve +cominciare con una lettera; nel soprannome sono permessi solo lettere, numeri, trattini (-) e underscore (_).

- +
diff --git a/view/it/strings.php b/view/it/strings.php index 2c429cc8a..bbbd30220 100644 --- a/view/it/strings.php +++ b/view/it/strings.php @@ -1052,4 +1052,27 @@ $a->strings['File has an invalid extension, it should be one of '] = 'Il file ha $a->strings['Upload was cancelled, or server error encountered'] = 'Il caricamento è stato cancellato, o si è verificato un errore sul server'; $a->strings['Randplace Settings'] = 'Impostazioni Randplace'; $a->strings['Enable Randplace Plugin'] = 'Abilita il plugin Randplace'; +$a->strings['System error. Post not saved.'] = 'Errore di sistema. Messaggio non salvato.'; +$a->strings['(Update was successful)'] = '(L\'aggiornamento è stato completato)'; +$a->strings['(Update was not successful)'] = '(L\'aggiornamento non è stato completato)'; +$a->strings['Remove My Account'] = 'Rimuovi il mio Account'; +$a->strings['This will completely remove your account. Once this has been done it is not recoverable.'] = 'Questo rimuoverà completamente il tuo account. Una volta rimosso non si potrà recuperarlo.'; +$a->strings['Please enter your password for verification:'] = 'Inserisci la tua password per verifica:'; +$a->strings['No consumer key pair for StatusNet found. Register your Friendika 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 Friendika installation at your favorited StatusNet installation.'] = 'Nessuna coppia di chiavi consumer per StatusNet trovata. Regitstra il tuo Account Friendika come un client desktop sul tuo account StatusNet, copia la coppia di chiavi qui e inserisci l\'url di base delle API.
Prima di registrare la tua coppia di chiavi OAuth, chiedi all\'amministratore se esiste già una coppia di chiavi per questa installazione di Friendika sulla installazione di StatusNet che ti interessa.'; +$a->strings['OAuth Consumer Key'] = 'OAuth Consumer Key'; +$a->strings['OAuth Consumer Secret'] = 'OAuth Consumer Secret'; +$a->strings['Base API Path (remember the trailing /)'] = 'Indirizzo di base per le API (ricorda la / alla fine)'; +$a->strings['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.'] = 'Per collegare il tuo account StatusNet, clicca sul bottone qui sotto per ottenere un codice di sicurezza da StatusNet, che dovrai copiare nel box più sotto per poi inviare la form. Solo i tuoi messaggi pubblci saranno inviati a StatusNet.'; +$a->strings['Log in with StatusNet'] = 'Login con StatuNet'; +$a->strings['Copy the security code from StatusNet here'] = 'Copia il codice di sicurezza da StatusNet qui'; +$a->strings['Currently connected to: '] = 'Al momento collegato con:'; +$a->strings['If enabled all your public postings will be posted to the associated StatusNet account as well.'] = 'Se abilitato tutti i tuoi messaggi pubblici verranno inviati anche sull\'account StatusNet associato.'; +$a->strings['Send public postings to StatusNet'] = 'Invia messaggi pubblici su StatusNet'; +$a->strings['Clear OAuth configuration'] = 'Cancella la configurazione OAuth'; +$a->strings['Twitter Posting Settings'] = 'Impostazioni Invio a Twitter'; +$a->strings['No consumer key pair for Twitter found. Please contact your site administrator.'] = 'Nessuna coopia di chiavi per Twitter trovata. Contatta il tuo amministratore del sito.'; +$a->strings['At this Friendika 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.'] = 'Questa installazione di Friendika ha il plugin Twitter abilitato, ma non hai ancora collegato il tuo account locale con il tuo account su Twitter. Per farlo, clicca il bottone qui sotto per ottenere un PIN da Twitter, che dovrai copiare nel box più sotto per poi inviare la form. Solo i tuoi messaggi pubblici verranno inviati anche su Twitter.'; +$a->strings['Copy the PIN from Twitter here'] = 'Copia il PIN da Twitter qui'; +$a->strings['If enabled all your public postings will be posted to the associated Twitter account as well.'] = 'Se abilitato tutti i tuoi messaggi pubblici verranno inviati anche sull\'account Twitter associato.'; +$a->strings['Send public postings to Twitter'] = 'Invia messaggi pubblici su Twitter'; ?> From 97723ad69f71c716bd0e68eec95944b5469008ec Mon Sep 17 00:00:00 2001 From: Fabio Comuni Date: Tue, 15 Feb 2011 15:09:29 +0100 Subject: [PATCH 26/26] Fixed parentheses in translable string in statusnet.php. Rebulid util/strings.php. Update it/strings --- addon/statusnet/statusnet.php | 2 +- util/strings.php | 42 ++++++++++++++++++----------------- view/it/strings.php | 10 +++++++++ 3 files changed, 33 insertions(+), 21 deletions(-) diff --git a/addon/statusnet/statusnet.php b/addon/statusnet/statusnet.php index 46ecdde99..3dd4b5e98 100644 --- a/addon/statusnet/statusnet.php +++ b/addon/statusnet/statusnet.php @@ -133,7 +133,7 @@ function statusnet_settings(&$a,&$s) { $s .= '
'; $s .= ''; $s .= '
'; - $s .= ''; + $s .= ''; $s .= '
'; $s .= '
'; $s .= '
'; diff --git a/util/strings.php b/util/strings.php index e74922c6e..994243976 100644 --- a/util/strings.php +++ b/util/strings.php @@ -57,18 +57,6 @@ $a->strings['December'] = 'December'; $a->strings['Birthdays this week:'] = 'Birthdays this week:'; $a->strings["\x28Adjusted for local time\x29"] = "\x28Adjusted for local time\x29"; $a->strings['[today]'] = '[today]'; -$a->strings['Unable to locate original post.'] = 'Unable to locate original post.'; -$a->strings['Empty post discarded.'] = 'Empty post discarded.'; -$a->strings['Wall Photos'] = 'Wall Photos'; -$a->strings[" commented on your item at "] = " commented on your item at "; -$a->strings[" posted on your profile wall at "] = " posted on your profile wall at "; -$a->strings['System error. Post not saved.'] = 'System error. Post not saved.'; -$a->strings['This message was sent to you by '] = 'This message was sent to you by '; -$a->strings[', a member of the Friendika social network.'] = ', a member of the Friendika social network.'; -$a->strings['You may visit them online at'] = 'You may visit them online at'; -$a->strings['Please contact the sender by replying to this post if you do not wish to receive these messages.'] = 'Please contact the sender by replying to this post if you do not wish to receive these messages.'; -$a->strings['posted an update.'] = 'posted an update.'; -$a->strings['Item not found.'] = 'Item not found.'; $a->strings["Invite Friends"] = "Invite Friends"; $a->strings['Connect/Follow [profile address]'] = 'Connect/Follow [profile address]'; $a->strings['Example: bob@example.com, http://example.com/barbara'] = 'Example: bob@example.com, http://example.com/barbara'; @@ -130,7 +118,7 @@ $a->strings['Unable to set your contact credentials on our system.'] = 'Unable t $a->strings['Unable to update your contact profile details on our system'] = 'Unable to update your contact profile details on our system'; $a->strings["Connection accepted at "] = "Connection accepted at "; $a->strings['Administrator'] = 'Administrator'; -$a->strings['New mail received at '] = 'New mail received at '; +$a->strings['noreply'] = 'noreply'; $a->strings[' commented on an item at '] = ' commented on an item at '; $a->strings[" commented on an item at "] = " commented on an item at "; $a->strings[' welcomes '] = ' welcomes '; @@ -173,6 +161,7 @@ $a->strings['Your profile address:'] = 'Your profile address:'; $a->strings['Submit Request'] = 'Submit Request'; $a->strings['Cancel'] = 'Cancel'; $a->strings['Global Directory'] = 'Global Directory'; +$a->strings['Item not found.'] = 'Item not found.'; $a->strings['Private Message'] = 'Private Message'; $a->strings['This is you'] = 'This is you'; $a->strings['View $name\'s profile'] = 'View $name\'s profile'; @@ -228,6 +217,17 @@ $a->strings['Your message:'] = 'Your message:'; $a->strings['Please join my social network on '] = 'Please join my social network on '; $a->strings['To accept this invitation, please visit:'] = 'To accept this invitation, please visit:'; $a->strings['Once you have registered, please connect with me via my profile page at:'] = 'Once you have registered, please connect with me via my profile page at:'; +$a->strings['Unable to locate original post.'] = 'Unable to locate original post.'; +$a->strings['Empty post discarded.'] = 'Empty post discarded.'; +$a->strings['Wall Photos'] = 'Wall Photos'; +$a->strings[" commented on your item at "] = " commented on your item at "; +$a->strings[" posted on your profile wall at "] = " posted on your profile wall at "; +$a->strings['System error. Post not saved.'] = 'System error. Post not saved.'; +$a->strings['This message was sent to you by '] = 'This message was sent to you by '; +$a->strings[', a member of the Friendika social network.'] = ', a member of the Friendika social network.'; +$a->strings['You may visit them online at'] = 'You may visit them online at'; +$a->strings['Please contact the sender by replying to this post if you do not wish to receive these messages.'] = 'Please contact the sender by replying to this post if you do not wish to receive these messages.'; +$a->strings['posted an update.'] = 'posted an update.'; $a->strings['photo'] = 'photo'; $a->strings['status'] = 'status'; $a->strings['likes'] = 'likes'; @@ -480,7 +480,13 @@ $a->strings['Uncertain'] = 'Uncertain'; $a->strings['Complicated'] = 'Complicated'; $a->strings['Don\'t care'] = 'Don\'t care'; $a->strings['Ask me'] = 'Ask me'; -$a->strings['Facebook status update failed.'] = 'Facebook status update failed.'; +$a->strings['Facebook disabled'] = 'Facebook disabled'; +$a->strings['Facebook API key is missing.'] = 'Facebook API key is missing.'; +$a->strings['Facebook Connect'] = 'Facebook Connect'; +$a->strings['Install Facebook posting'] = 'Install Facebook posting'; +$a->strings['Remove Facebook posting'] = 'Remove Facebook posting'; +$a->strings['Post to Facebook'] = 'Post to Facebook'; +$a->strings['Image: '] = 'Image: '; $a->strings['Select files to upload: '] = 'Select files to upload: '; $a->strings['Use the following controls only if the Java uploader [above] fails to launch.'] = 'Use the following controls only if the Java uploader [above] fails to launch.'; $a->strings['Upload a file'] = 'Upload a file'; @@ -496,7 +502,7 @@ $a->strings['Enable Randplace Plugin'] = 'Enable Randplace Plugin'; $a->strings['No consumer key pair for StatusNet found. Register your Friendika 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 Friendika installation at your favorited StatusNet installation.'] = 'No consumer key pair for StatusNet found. Register your Friendika 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 Friendika installation at your favorited StatusNet installation.'; $a->strings['OAuth Consumer Key'] = 'OAuth Consumer Key'; $a->strings['OAuth Consumer Secret'] = 'OAuth Consumer Secret'; -$a->strings['Base API Path (remember the trailing /)'] = 'Base API Path (remember the trailing /)'; +$a->strings['Base API Path \x28remember the trailing /\x29'] = 'Base API Path \x28remember the trailing /\x29'; $a->strings['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.'] = '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.'; $a->strings['Log in with StatusNet'] = 'Log in with StatusNet'; $a->strings['Copy the security code from StatusNet here'] = 'Copy the security code from StatusNet here'; @@ -504,6 +510,7 @@ $a->strings['Currently connected to: '] = 'Currently connected to: '; $a->strings['If enabled all your public postings will be posted to the associated StatusNet account as well.'] = 'If enabled all your public postings will be posted to the associated StatusNet account as well.'; $a->strings['Send public postings to StatusNet'] = 'Send public postings to StatusNet'; $a->strings['Clear OAuth configuration'] = 'Clear OAuth configuration'; +$a->strings['Post to Twitter'] = 'Post to Twitter'; $a->strings['Twitter Posting Settings'] = 'Twitter Posting Settings'; $a->strings['No consumer key pair for Twitter found. Please contact your site administrator.'] = 'No consumer key pair for Twitter found. Please contact your site administrator.'; $a->strings['At this Friendika 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.'] = 'At this Friendika 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.'; @@ -658,7 +665,6 @@ $a->strings['America/Managua'] = 'America/Managua'; $a->strings['America/Manaus'] = 'America/Manaus'; $a->strings['America/Marigot'] = 'America/Marigot'; $a->strings['America/Martinique'] = 'America/Martinique'; -$a->strings['America/Matamoros'] = 'America/Matamoros'; $a->strings['America/Mazatlan'] = 'America/Mazatlan'; $a->strings['America/Mendoza'] = 'America/Mendoza'; $a->strings['America/Menominee'] = 'America/Menominee'; @@ -677,7 +683,6 @@ $a->strings['America/Nome'] = 'America/Nome'; $a->strings['America/Noronha'] = 'America/Noronha'; $a->strings['America/North_Dakota/Center'] = 'America/North_Dakota/Center'; $a->strings['America/North_Dakota/New_Salem'] = 'America/North_Dakota/New_Salem'; -$a->strings['America/Ojinaga'] = 'America/Ojinaga'; $a->strings['America/Panama'] = 'America/Panama'; $a->strings['America/Pangnirtung'] = 'America/Pangnirtung'; $a->strings['America/Paramaribo'] = 'America/Paramaribo'; @@ -694,7 +699,6 @@ $a->strings['America/Regina'] = 'America/Regina'; $a->strings['America/Resolute'] = 'America/Resolute'; $a->strings['America/Rio_Branco'] = 'America/Rio_Branco'; $a->strings['America/Rosario'] = 'America/Rosario'; -$a->strings['America/Santa_Isabel'] = 'America/Santa_Isabel'; $a->strings['America/Santarem'] = 'America/Santarem'; $a->strings['America/Santiago'] = 'America/Santiago'; $a->strings['America/Santo_Domingo'] = 'America/Santo_Domingo'; @@ -723,7 +727,6 @@ $a->strings['America/Yellowknife'] = 'America/Yellowknife'; $a->strings['Antarctica/Casey'] = 'Antarctica/Casey'; $a->strings['Antarctica/Davis'] = 'Antarctica/Davis'; $a->strings['Antarctica/DumontDUrville'] = 'Antarctica/DumontDUrville'; -$a->strings['Antarctica/Macquarie'] = 'Antarctica/Macquarie'; $a->strings['Antarctica/Mawson'] = 'Antarctica/Mawson'; $a->strings['Antarctica/McMurdo'] = 'Antarctica/McMurdo'; $a->strings['Antarctica/Palmer'] = 'Antarctica/Palmer'; @@ -786,7 +789,6 @@ $a->strings['Asia/Makassar'] = 'Asia/Makassar'; $a->strings['Asia/Manila'] = 'Asia/Manila'; $a->strings['Asia/Muscat'] = 'Asia/Muscat'; $a->strings['Asia/Nicosia'] = 'Asia/Nicosia'; -$a->strings['Asia/Novokuznetsk'] = 'Asia/Novokuznetsk'; $a->strings['Asia/Novosibirsk'] = 'Asia/Novosibirsk'; $a->strings['Asia/Omsk'] = 'Asia/Omsk'; $a->strings['Asia/Oral'] = 'Asia/Oral'; diff --git a/view/it/strings.php b/view/it/strings.php index bbbd30220..d04e02167 100644 --- a/view/it/strings.php +++ b/view/it/strings.php @@ -1075,4 +1075,14 @@ $a->strings['At this Friendika instance the Twitter plugin was enabled but you h $a->strings['Copy the PIN from Twitter here'] = 'Copia il PIN da Twitter qui'; $a->strings['If enabled all your public postings will be posted to the associated Twitter account as well.'] = 'Se abilitato tutti i tuoi messaggi pubblici verranno inviati anche sull\'account Twitter associato.'; $a->strings['Send public postings to Twitter'] = 'Invia messaggi pubblici su Twitter'; +$a->strings['noreply'] = 'nessuna risposta'; +$a->strings['Facebook disabled'] = 'Facebook disabilitato'; +$a->strings['Facebook API key is missing.'] = 'Chiave API Facebook mancante.'; +$a->strings['Facebook Connect'] = 'Facebook Connect'; +$a->strings['Install Facebook posting'] = 'Installa invio a Facebook'; +$a->strings['Remove Facebook posting'] = 'Rimuovi invio a Facebook'; +$a->strings['Post to Facebook'] = 'Invia a Facebook'; +$a->strings['Image: '] = 'Immagine: '; +$a->strings['Base API Path \x28remember the trailing /\x29'] = 'Indirizzo base API \x28ricorda il / alla fine\x29'; +$a->strings['Post to Twitter'] = 'Inva a Twitter'; ?>