diff options
35 files changed, 495 insertions, 129 deletions
diff --git a/INSTALL.txt b/INSTALL.txt index 12dca9c5b..85114dee5 100644 --- a/INSTALL.txt +++ b/INSTALL.txt @@ -12,6 +12,11 @@ blog. Not every PHP/MySQL hosting provider will be able to support Friendika. Many will. But please review the requirements and confirm these with your hosting provider prior to installation. +Before you begin: Choose a domain name or subdomain name for your server. +Put some thought into this - because changing it is currently not-supported. +Things will break, and some of your friends may have difficulty communicating +with you. We plan to address this limitation in a future release. + 1. Requirements - Apache with mod-rewrite enabled and "Options All" so you can use a diff --git a/addon/js_upload/js_upload.php b/addon/js_upload/js_upload.php index dc2dc37dc..9f3fa9600 100644 --- a/addon/js_upload/js_upload.php +++ b/addon/js_upload/js_upload.php @@ -36,6 +36,11 @@ function js_upload_form(&$a,&$b) { $b['addon_text'] .= '<link href="' . $a->get_baseurl() . '/addon/js_upload/file-uploader/client/fileuploader.css" rel="stylesheet" type="text/css">'; $b['addon_text'] .= '<script src="' . $a->get_baseurl() . '/addon/js_upload/file-uploader/client/fileuploader.js" type="text/javascript"></script>'; + $upload_msg = t('Upload a file'); + $drop_msg = t('Drop files here to upload'); + $cancel = t('Cancel'); + $failed = t('Failed'); + $b['addon_text'] .= <<< EOT <div id="file-uploader-demo1"> @@ -65,6 +70,22 @@ function createUploader() { uploader = new qq.FileUploader({ element: document.getElementById('file-uploader-demo1'), action: '{$b['post_url']}', + + template: '<div class="qq-uploader">' + + '<div class="qq-upload-drop-area"><span>$drop_msg</span></div>' + + '<div class="qq-upload-button">$upload_msg</div>' + + '<ul class="qq-upload-list"></ul>' + + '</div>', + + // template for one item in file list + fileTemplate: '<li>' + + '<span class="qq-upload-file"></span>' + + '<span class="qq-upload-spinner"></span>' + + '<span class="qq-upload-size"></span>' + + '<a class="qq-upload-cancel" href="#">$cancel</a>' + + '<span class="qq-upload-failed-text">$failed</span>' + + '</li>', + debug: true, onSubmit: function(id,filename) { @@ -3,8 +3,8 @@ set_time_limit(0); define ( 'BUILD_ID', 1034 ); -define ( 'FRIENDIKA_VERSION', '2.10.0902' ); -define ( 'DFRN_PROTOCOL_VERSION', '2.0' ); +define ( 'FRIENDIKA_VERSION', '2.10.0904' ); +define ( 'DFRN_PROTOCOL_VERSION', '2.1' ); define ( 'EOL', "<br />\r\n" ); define ( 'ATOM_TIME', 'Y-m-d\TH:i:s\Z' ); @@ -1366,6 +1366,7 @@ function lrdd($uri) { else { $html = fetch_url($uri); $headers = $a->get_curl_headers(); + logger('lrdd: headers=' . $headers, LOGGER_DEBUG); $lines = explode("\n",$headers); if(count($lines)) { foreach($lines as $line) { @@ -1374,6 +1375,11 @@ function lrdd($uri) { $link = $matches[1]; break; } + // don't try and run feeds through the html5 parser + if(stristr($line,'content-type:') && ((stristr($line,'application/atom+xml')) || (stristr($line,'application/rss+xml')))) + return array(); + if(stristr($html,'<rss') || stristr($html,'<feed')) + return array(); } } if(! isset($link)) { diff --git a/include/Contact.php b/include/Contact.php index 98d3e7c0b..7cac3c0e0 100644 --- a/include/Contact.php +++ b/include/Contact.php @@ -6,6 +6,10 @@ // authorisation to do this. function user_remove($uid) { + if(! $uid) + return; + $a = get_app(); + logger('Removing user: ' . $uid); q("DELETE FROM `contact` WHERE `uid` = %d", intval($uid)); q("DELETE FROM `group` WHERE `uid` = %d", intval($uid)); q("DELETE FROM `group_member` WHERE `uid` = %d", intval($uid)); @@ -19,7 +23,7 @@ function user_remove($uid) { if($uid == local_user()) { unset($_SESSION['authenticated']); unset($_SESSION['uid']); - killme(); + goaway($a->get_baseurl()); } } diff --git a/include/Scrape.php b/include/Scrape.php index e4f7a0878..ff9899252 100644 --- a/include/Scrape.php +++ b/include/Scrape.php @@ -5,12 +5,31 @@ require_once('library/HTML5/Parser.php'); if(! function_exists('scrape_dfrn')) { function scrape_dfrn($url) { + $a = get_app(); + $ret = array(); + + logger('scrape_dfrn: url=' . $url); + $s = fetch_url($url); if(! $s) return $ret; + $headers = $a->get_curl_headers(); + logger('scrape_dfrn: headers=' . $headers, LOGGER_DEBUG); + + + $lines = explode("\n",$headers); + if(count($lines)) { + foreach($lines as $line) { + // don't try and run feeds through the html5 parser + if(stristr($line,'content-type:') && ((stristr($line,'application/atom+xml')) || (stristr($line,'application/rss+xml')))) + return ret; + } + } + + $dom = HTML5_Parser::parse($s); if(! $dom) @@ -77,12 +96,31 @@ function validate_dfrn($a) { if(! function_exists('scrape_meta')) { function scrape_meta($url) { + $a = get_app(); + $ret = array(); + + logger('scrape_meta: url=' . $url); + $s = fetch_url($url); if(! $s) return $ret; + $headers = $a->get_curl_headers(); + logger('scrape_meta: headers=' . $headers, LOGGER_DEBUG); + + $lines = explode("\n",$headers); + if(count($lines)) { + foreach($lines as $line) { + // don't try and run feeds through the html5 parser + if(stristr($line,'content-type:') && ((stristr($line,'application/atom+xml')) || (stristr($line,'application/rss+xml')))) + return ret; + } + } + + + $dom = HTML5_Parser::parse($s); if(! $dom) @@ -105,12 +143,27 @@ function scrape_meta($url) { if(! function_exists('scrape_vcard')) { function scrape_vcard($url) { + $a = get_app(); + $ret = array(); + + logger('scrape_vcard: url=' . $url); + $s = fetch_url($url); if(! $s) return $ret; + $headers = $a->get_curl_headers(); + $lines = explode("\n",$headers); + if(count($lines)) { + foreach($lines as $line) { + // don't try and run feeds through the html5 parser + if(stristr($line,'content-type:') && ((stristr($line,'application/atom+xml')) || (stristr($line,'application/rss+xml')))) + return ret; + } + } + $dom = HTML5_Parser::parse($s); if(! $dom) @@ -142,12 +195,33 @@ function scrape_vcard($url) { if(! function_exists('scrape_feed')) { function scrape_feed($url) { + $a = get_app(); + $ret = array(); $s = fetch_url($url); if(! $s) return $ret; + $headers = $a->get_curl_headers(); + logger('scrape_feed: headers=' . $headers, LOGGER_DEBUG); + + $lines = explode("\n",$headers); + if(count($lines)) { + foreach($lines as $line) { + if(stristr($line,'content-type:')) { + if(stristr($line,'application/atom+xml') || stristr($s,'<feed')) { + $ret['feed_atom'] = $url; + return $ret; + } + if(stristr($line,'application/rss+xml') || stristr($s,'<rss')) { + $ret['feed_rss'] = $url; + return ret; + } + } + } + } + $dom = HTML5_Parser::parse($s); if(! $dom) diff --git a/include/html2bbcode.php b/include/html2bbcode.php index 65cbcec41..6af8df824 100644 --- a/include/html2bbcode.php +++ b/include/html2bbcode.php @@ -23,7 +23,7 @@ function html2bbcode($s) { '/\<div(.*?)\>(.*?)\<\/div\>/is', '/\<br(.*?)\>/is', '/\<strong\>(.*?)\<\/strong\>/is', - '/\<a href=\"(.*?)\"(.*?)\>(.*?)\<\/a\>/is', + '/\<a (.*?)href=\"(.*?)\"(.*?)\>(.*?)\<\/a\>/is', '/\<code\>(.*?)\<\/code\>/is', '/\<span style=\"color:(.*?)\"\>(.*?)\<\/span\>/is', '/\<blockquote\>(.*?)\<\/blockquote\>/is', @@ -48,7 +48,7 @@ function html2bbcode($s) { '$2', "\n", '[b]$1[/b]', - '[url=$1]$3[/url]', + '[url=$2]$4[/url]', '[code]$1[/code]', '[color="$1"]$2[/color]', '[quote]$1[/quote]', diff --git a/include/items.php b/include/items.php index f204745bb..45d8b62c0 100644 --- a/include/items.php +++ b/include/items.php @@ -2,6 +2,7 @@ require_once('bbcode.php'); require_once('oembed.php'); +require_once('include/salmon.php'); function get_feed_for(&$a, $dfrn_id, $owner_nick, $last_update, $direction = 0) { @@ -376,6 +377,21 @@ function get_atom_elements($feed,$item) { } + /** + * If there's a copy of the body content which is guaranteed to have survived mangling in transit, use it. + */ + + $have_real_body = false; + + $rawenv = $item->get_item_tags(NAMESPACE_DFRN, 'env'); + if($rawenv) { + $have_real_body = true; + $res['body'] = $rawenv[0]['data']; + $res['body'] = str_replace(array(' ',"\t","\r","\n"), array('','','',''),$res['body']); + // make sure nobody is trying to sneak some html tags by us + $res['body'] = notags(base64url_decode($res['body'])); + } + $maxlen = get_max_import_size(); if($maxlen && (strlen($res['body']) > $maxlen)) $res['body'] = substr($res['body'],0, $maxlen); @@ -391,7 +407,7 @@ function get_atom_elements($feed,$item) { // html. - if((strpos($res['body'],'<')) || (strpos($res['body'],'>'))) { + if((strpos($res['body'],'<') !== false) || (strpos($res['body'],'>') !== false)) { $res['body'] = preg_replace('#<object[^>]+>.+?' . 'http://www.youtube.com/((?:v|cp)/[A-Za-z0-9\-_=]+).+?</object>#s', '[youtube]$1[/youtube]', $res['body']); @@ -410,10 +426,7 @@ function get_atom_elements($feed,$item) { $res['body'] = html2bbcode($res['body']); } - else - $res['body'] = escape_tags($res['body']); - $allow = $item->get_item_tags(NAMESPACE_DFRN,'comment-allow'); if($allow && $allow[0]['data'] == 1) $res['last-child'] = 1; @@ -439,14 +452,16 @@ function get_atom_elements($feed,$item) { $rawedited = $item->get_item_tags(SIMPLEPIE_NAMESPACE_ATOM_10,'updated'); if($rawedited) - $res['edited'] = unxmlify($rawcreated[0]['data']); + $res['edited'] = unxmlify($rawedited[0]['data']); + if((x($res,'edited')) && (! (x($res,'created')))) + $res['created'] = $res['edited']; if(! $res['created']) - $res['created'] = $item->get_date(); + $res['created'] = $item->get_date('c'); if(! $res['edited']) - $res['edited'] = $item->get_date(); + $res['edited'] = $item->get_date('c'); $rawowner = $item->get_item_tags(NAMESPACE_DFRN, 'owner'); @@ -510,7 +525,7 @@ function get_atom_elements($feed,$item) { $body = $rawobj[0]['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['summary'][0]['data']; // preserve a copy of the original body content in case we later need to parse out any microformat information, e.g. events $res['object'] .= '<orig>' . xmlify($body) . '</orig>' . "\n"; - if((strpos($body,'<')) || (strpos($body,'>'))) { + if((strpos($body,'<') !== false) || (strpos($body,'>') !== false)) { $body = preg_replace('#<object[^>]+>.+?' . 'http://www.youtube.com/((?:v|cp)/[A-Za-z0-9\-_=]+).+?</object>#s', '[youtube]$1[/youtube]', $body); @@ -522,8 +537,6 @@ function get_atom_elements($feed,$item) { $body = $purifier->purify($body); $body = html2bbcode($body); } - else - $body = escape_tags($body); $res['object'] .= '<content>' . $body . '</content>' . "\n"; } @@ -551,7 +564,7 @@ function get_atom_elements($feed,$item) { $body = $rawobj[0]['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['summary'][0]['data']; // preserve a copy of the original body content in case we later need to parse out any microformat information, e.g. events $res['object'] .= '<orig>' . xmlify($body) . '</orig>' . "\n"; - if((strpos($body,'<')) || (strpos($body,'>'))) { + if((strpos($body,'<') !== false) || (strpos($body,'>') !== false)) { $body = preg_replace('#<object[^>]+>.+?' . 'http://www.youtube.com/((?:v|cp)/[A-Za-z0-9\-_=]+).+?</object>#s', '[youtube]$1[/youtube]', $body); @@ -563,8 +576,6 @@ function get_atom_elements($feed,$item) { $body = $purifier->purify($body); $body = html2bbcode($body); } - else - $body = escape_tags($body); $res['target'] .= '<content>' . $body . '</content>' . "\n"; } @@ -600,7 +611,7 @@ function encode_rel_links($links) { return xmlify($o); } -function item_store($arr) { +function item_store($arr,$force_parent = false) { if($arr['gravity']) $arr['gravity'] = intval($arr['gravity']); @@ -613,6 +624,13 @@ function item_store($arr) { if(! x($arr,'type')) $arr['type'] = 'remote'; + + // Shouldn't happen but we want to make absolutely sure it doesn't leak from a plugin. + + if((strpos($arr['body'],'<') !== false) || (strpos($arr['body'],'>') !== false)) + $arr['body'] = strip_tags($arr['body']); + + $arr['wall'] = ((x($arr,'wall')) ? intval($arr['wall']) : 0); $arr['uri'] = ((x($arr,'uri')) ? notags(trim($arr['uri'])) : random_string()); $arr['author-name'] = ((x($arr,'author-name')) ? notags(trim($arr['author-name'])) : ''); @@ -641,20 +659,7 @@ function item_store($arr) { $arr['deny_cid'] = ((x($arr,'deny_cid')) ? trim($arr['deny_cid']) : ''); $arr['deny_gid'] = ((x($arr,'deny_gid')) ? trim($arr['deny_gid']) : ''); $arr['private'] = ((x($arr,'private')) ? intval($arr['private']) : 0 ); - $arr['body'] = ((x($arr,'body')) ? escape_tags(trim($arr['body'])) : ''); - - // The content body has been through a lot of filtering and transport escaping by now. - // We don't want to skip any filters, however a side effect of all this filtering - // is that ampersands and <> may have been double encoded, depending on which filter chain - // they came through. - - $arr['body'] = str_replace( - array('&amp;', '&gt;', '&lt;', '&quot;'), - array('&' , '>' , '<', '"'), - $arr['body'] - ); - - + $arr['body'] = ((x($arr,'body')) ? trim($arr['body']) : ''); if($arr['parent-uri'] === $arr['uri']) { $parent_id = 0; @@ -690,8 +695,20 @@ function item_store($arr) { $deny_gid = $r[0]['deny_gid']; } else { - logger('item_store: item parent was not found - ignoring item'); - return 0; + + // Allow one to see reply tweets from status.net even when + // we don't have or can't see the original post. + + if($force_parent) { + logger('item_store: $force_parent=true, reply converted to top-level post.'); + $parent_id = 0; + $arr['thr-parent'] = $arr['parent-uri']; + $arr['parent-uri'] = $arr['uri']; + } + else { + logger('item_store: item parent was not found - ignoring item'); + return 0; + } } } @@ -763,7 +780,7 @@ function dfrn_deliver($owner,$contact,$atom, $dissolve = false) { $a = get_app(); - if((! strlen($contact['dfrn-id'])) && (! $contact['duplex']) && (! ($owner['page-flags'] == PAGE_COMMUNITY))) + if((! strlen($contact['issued-id'])) && (! $contact['duplex']) && (! ($owner['page-flags'] == PAGE_COMMUNITY))) return 3; $idtosend = $orig_id = (($contact['dfrn-id']) ? $contact['dfrn-id'] : $contact['issued-id']); @@ -795,6 +812,12 @@ function dfrn_deliver($owner,$contact,$atom, $dissolve = false) { if(! $xml) return 3; + if(strpos($xml,'<?xml') === false) { + logger('dfrn_deliver: no valid XML returned'); + logger('dfrn_deliver: returned XML: ' . $xml, LOGGER_DATA); + return 3; + } + $res = simplexml_load_string($xml); if((intval($res->status) != 0) || (! strlen($res->challenge)) || (! strlen($res->dfrn_id))) @@ -803,19 +826,20 @@ function dfrn_deliver($owner,$contact,$atom, $dissolve = false) { $postvars = array(); $sent_dfrn_id = hex2bin((string) $res->dfrn_id); $challenge = hex2bin((string) $res->challenge); + $dfrn_version = (float) (($res->dfrn_version) ? $res->dfrn_version : 2.0); $rino_allowed = ((intval($res->rino) === 1) ? 1 : 0); $final_dfrn_id = ''; - if(($contact['duplex'] && strlen($contact['prvkey'])) || ($owner['page-flags'] == PAGE_COMMUNITY)) { - openssl_private_decrypt($sent_dfrn_id,$final_dfrn_id,$contact['prvkey']); - openssl_private_decrypt($challenge,$postvars['challenge'],$contact['prvkey']); - } - else { + if(($contact['duplex'] && strlen($contact['pubkey'])) || ($owner['page-flags'] == PAGE_COMMUNITY)) { openssl_public_decrypt($sent_dfrn_id,$final_dfrn_id,$contact['pubkey']); openssl_public_decrypt($challenge,$postvars['challenge'],$contact['pubkey']); } + else { + openssl_private_decrypt($sent_dfrn_id,$final_dfrn_id,$contact['prvkey']); + openssl_private_decrypt($challenge,$postvars['challenge'],$contact['prvkey']); + } $final_dfrn_id = substr($final_dfrn_id, 0, strpos($final_dfrn_id, '.')); @@ -849,11 +873,22 @@ function dfrn_deliver($owner,$contact,$atom, $dissolve = false) { $postvars['data'] = $data; logger('rino: sent key = ' . $key); - if(($contact['duplex'] && strlen($contact['prvkey'])) || ($owner['page-flags'] == PAGE_COMMUNITY)) { - openssl_private_encrypt($key,$postvars['key'],$contact['prvkey']); + + if($dfrn_version >= 2.1) { + if(($contact['duplex'] && strlen($contact['pubkey'])) || ($owner['page-flags'] == PAGE_COMMUNITY)) { + openssl_public_encrypt($key,$postvars['key'],$contact['pubkey']); + } + else { + openssl_private_encrypt($key,$postvars['key'],$contact['prvkey']); + } } else { - openssl_public_encrypt($key,$postvars['key'],$contact['pubkey']); + if(($contact['duplex'] && strlen($contact['prvkey'])) || ($owner['page-flags'] == PAGE_COMMUNITY)) { + openssl_private_encrypt($key,$postvars['key'],$contact['prvkey']); + } + else { + openssl_public_encrypt($key,$postvars['key'],$contact['pubkey']); + } } logger('md5 rawkey ' . md5($postvars['key'])); @@ -871,6 +906,13 @@ function dfrn_deliver($owner,$contact,$atom, $dissolve = false) { if((! $curl_stat) || (! strlen($xml))) return(-1); // timed out + + if(strpos($xml,'<?xml') === false) { + logger('dfrn_deliver: phase 2: no valid XML returned'); + logger('dfrn_deliver: phase 2: returned XML: ' . $xml, LOGGER_DATA); + return 3; + } + $res = simplexml_load_string($xml); return $res->status; @@ -1164,8 +1206,9 @@ function consume_feed($xml,$importer,&$contact, &$hub, $datedir = 0) { continue; } $datarray = get_atom_elements($feed,$item); - + $force_parent = false; if($contact['network'] === 'stat') { + $force_parent = true; if(strlen($datarray['title'])) unset($datarray['title']); $r = q("UPDATE `item` SET `last-child` = 0, `changed` = '%s' WHERE `parent-uri` = '%s' AND `uid` = %d", @@ -1188,7 +1231,7 @@ function consume_feed($xml,$importer,&$contact, &$hub, $datedir = 0) { $datarray['gravity'] = GRAVITY_LIKE; } - $r = item_store($datarray); + $r = item_store($datarray,$force_parent); continue; } @@ -1421,6 +1464,7 @@ function atom_entry($item,$type,$author,$owner,$comment = false) { $o .= '<title>' . xmlify($item['title']) . '</title>' . "\r\n"; $o .= '<published>' . xmlify(datetime_convert('UTC','UTC',$item['created'] . '+00:00',ATOM_TIME)) . '</published>' . "\r\n"; $o .= '<updated>' . xmlify(datetime_convert('UTC','UTC',$item['edited'] . '+00:00',ATOM_TIME)) . '</updated>' . "\r\n"; + $o .= '<dfrn:env>' . base64url_encode($item['body'], true) . '</dfrn:env>' . "\r\n"; $o .= '<content type="' . $type . '" >' . xmlify(($type === 'html') ? bbcode($item['body']) : $item['body']) . '</content>' . "\r\n"; $o .= '<link rel="alternate" href="' . xmlify($a->get_baseurl() . '/display/' . $owner['nickname'] . '/' . $item['id']) . '" />' . "\r\n"; if($comment) diff --git a/include/poller.php b/include/poller.php index 2ba285b7b..20c84990e 100644 --- a/include/poller.php +++ b/include/poller.php @@ -35,16 +35,16 @@ function poller_run($argv, $argc){ q("DELETE FROM `cache` WHERE `updated`<'%s'", dbesc(datetime_convert('UTC','UTC',"now - 30 days"))); - + $manual_id = 0; $hub_update = false; - $force = false; + $force = false; if(($argc > 1) && ($argv[1] == 'force')) $force = true; if(($argc > 1) && intval($argv[1])) { $manual_id = intval($argv[1]); - $force = true; + $force = true; } $sql_extra = (($manual_id) ? " AND `id` = $manual_id " : ""); @@ -62,8 +62,8 @@ function poller_run($argv, $argc){ foreach($contacts as $contact) { - if($manual_id) - $contact['last-update'] = '0000-00-00 00:00:00'; + if($manual_id) + $contact['last-update'] = '0000-00-00 00:00:00'; if($contact['priority'] || $contact['subhub']) { diff --git a/include/salmon.php b/include/salmon.php index 49384efea..8a56882ad 100644 --- a/include/salmon.php +++ b/include/salmon.php @@ -18,15 +18,13 @@ function salmon_key($pubkey) { } -function base64url_encode($s) { +function base64url_encode($s, $strip_padding = false) { + $s = strtr(base64_encode($s),'+/','-_'); -/* - * // placeholder for un-padded base64url_encode - * // per latest salmon rev - * - * $s = str_replace('=','',$s); - * - */ + + if($strip_padding) + $s = str_replace('=','',$s); + return $s; } diff --git a/mod/contacts.php b/mod/contacts.php index 4c627c88f..61d9ce398 100644 --- a/mod/contacts.php +++ b/mod/contacts.php @@ -367,7 +367,7 @@ function contacts_content(&$a) { '$alt_text' => $alt_text, '$dir_icon' => $dir_icon, '$thumb' => $rr['thumb'], - '$name' => $rr['name'], + '$name' => substr($rr['name'],0,20), '$sparkle' => $sparkle, '$url' => $url )); diff --git a/mod/dfrn_notify.php b/mod/dfrn_notify.php index f904b06bc..7f023ef22 100644 --- a/mod/dfrn_notify.php +++ b/mod/dfrn_notify.php @@ -24,7 +24,7 @@ function dfrn_notify_post(&$a) { dbesc($challenge) ); if(! count($r)) { - logger('dfrn_notify: could not match challenge to dfrn_id ' . $dfrn_id); + logger('dfrn_notify: could not match challenge to dfrn_id ' . $dfrn_id . ' challenge=' . $challenge); xml_status(3); } @@ -52,8 +52,6 @@ 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` @@ -93,11 +91,21 @@ function dfrn_notify_post(&$a) { logger('rino: md5 raw key: ' . md5($rawkey)); $final_key = ''; - if((($importer['duplex']) && strlen($importer['cpubkey'])) || (! strlen($importer['cprvkey']))) { - openssl_public_decrypt($rawkey,$final_key,$importer['cpubkey']); + if($dfrn_version >= 2.1) { + if((($importer['duplex']) && strlen($importer['cprvkey'])) || (! strlen($importer['cpubkey']))) { + openssl_private_decrypt($rawkey,$final_key,$importer['cprvkey']); + } + else { + openssl_public_decrypt($rawkey,$final_key,$importer['cpubkey']); + } } else { - openssl_private_decrypt($rawkey,$final_key,$importer['cprvkey']); + if((($importer['duplex']) && strlen($importer['cpubkey'])) || (! strlen($importer['cprvkey']))) { + openssl_public_decrypt($rawkey,$final_key,$importer['cpubkey']); + } + else { + openssl_private_decrypt($rawkey,$final_key,$importer['cprvkey']); + } } logger('rino: received key : ' . $final_key); @@ -460,12 +468,13 @@ function dfrn_notify_content(&$a) { $r = q("DELETE FROM `challenge` WHERE `expire` < " . intval(time())); $r = q("INSERT INTO `challenge` ( `challenge`, `dfrn-id`, `expire` ) - VALUES( '%s', '%s', '%s') ", + VALUES( '%s', '%s', %d ) ", dbesc($hash), dbesc($dfrn_id), - intval(time() + 60 ) + intval(time() + 90 ) ); + logger('dfrn_notify: challenge=' . $hash ); $sql_extra = ''; switch($direction) { @@ -498,14 +507,14 @@ function dfrn_notify_content(&$a) { $encrypted_id = ''; $id_str = $my_id . '.' . mt_rand(1000,9999); - if((($r[0]['duplex']) && strlen($r[0]['pubkey'])) || (! strlen($r[0]['prvkey']))) { - openssl_public_encrypt($hash,$challenge,$r[0]['pubkey']); - openssl_public_encrypt($id_str,$encrypted_id,$r[0]['pubkey']); - } - else { + if((($r[0]['duplex']) && strlen($r[0]['prvkey'])) || (! strlen($r[0]['pubkey']))) { openssl_private_encrypt($hash,$challenge,$r[0]['prvkey']); openssl_private_encrypt($id_str,$encrypted_id,$r[0]['prvkey']); } + else { + openssl_public_encrypt($hash,$challenge,$r[0]['pubkey']); + openssl_public_encrypt($id_str,$encrypted_id,$r[0]['pubkey']); + } $challenge = bin2hex($challenge); $encrypted_id = bin2hex($encrypted_id); diff --git a/mod/follow.php b/mod/follow.php index 62ba2585c..8c1dc348f 100644 --- a/mod/follow.php +++ b/mod/follow.php @@ -113,10 +113,16 @@ function follow_post(&$a) { $vcard['nick'] = trim(substr($vcard['nick'],0,strpos($vcard['nick'],' '))); $email = $author->get_email(); } + if(! $vcard['photo']) { + $rawmedia = $item->get_item_tags('http://search.yahoo.com/mrss/','thumbnail'); + if($rawmedia && $rawmedia[0]['attribs']['']['url']) + $vcard['photo'] = $rawmedia[0]['attribs']['']['url']; + } } } if((! $vcard['photo']) && strlen($email)) $vcard['photo'] = gravatar_img($email); + $network = 'feed'; $priority = 2; } @@ -161,7 +167,7 @@ function follow_post(&$a) { // create contact record $r = q("INSERT INTO `contact` ( `uid`, `created`, `url`, `notify`, `poll`, `name`, `nick`, `photo`, `network`, `rel`, `priority`, `blocked`, `readonly`, `pending` ) - VALUES ( %d, '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', %d, 0, 0, 0 ) ", + VALUES ( %d, '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', %d, %d, 0, 0, 0 ) ", intval(local_user()), dbesc(datetime_convert()), dbesc($profile), diff --git a/mod/network.php b/mod/network.php index 80edca1d0..2ec06fe61 100644 --- a/mod/network.php +++ b/mod/network.php @@ -38,11 +38,11 @@ function network_content(&$a, $update = 0) { $group = 0; + $nouveau = false; + if(! $update) { $o .= '<script> $(document).ready(function() { $(\'#nav-network-link\').addClass(\'nav-selected\'); });</script>'; - $nouveau = false; - if(($a->argc > 2) && $a->argv[2] === 'new') $nouveau = true; diff --git a/mod/photos.php b/mod/photos.php index c80a82e66..52cc66eae 100644 --- a/mod/photos.php +++ b/mod/photos.php @@ -244,20 +244,26 @@ foreach($_FILES AS $key => $val) { return; // NOTREACHED } - if(($a->argc > 2) && ((x($_POST,'desc') !== false) || (x($_POST,'newtag') !== false))) { + if(($a->argc > 2) && ((x($_POST,'desc') !== false) || (x($_POST,'newtag') !== false)) || (x($_POST,'albname') !== false)) { - $desc = ((x($_POST,'desc')) ? notags(trim($_POST['desc'])) : ''); - $rawtags = ((x($_POST,'newtag')) ? notags(trim($_POST['newtag'])) : ''); - $item_id = ((x($_POST,'item_id')) ? intval($_POST['item_id']) : 0); + $desc = ((x($_POST,'desc')) ? notags(trim($_POST['desc'])) : ''); + $rawtags = ((x($_POST,'newtag')) ? notags(trim($_POST['newtag'])) : ''); + $item_id = ((x($_POST,'item_id')) ? intval($_POST['item_id']) : 0); + $albname = ((x($_POST,'albname')) ? notags(trim($_POST['albname'])) : ''); $resource_id = $a->argv[2]; + if(! strlen($albname)) + $albname = datetime_convert('UTC',date_default_timezone_get(),'now', 'Y'); + + $p = q("SELECT * FROM `photo` WHERE `resource-id` = '%s' AND `uid` = %d ORDER BY `scale` DESC", dbesc($resource_id), intval($page_owner_uid) ); - if((count($p)) && ($p[0]['desc'] !== $desc)) { - $r = q("UPDATE `photo` SET `desc` = '%s' WHERE `resource-id` = '%s' AND `uid` = %d", + if((count($p)) && (($p[0]['desc'] !== $desc) || ($p[0]['album'] !== $albname))) { + $r = q("UPDATE `photo` SET `desc` = '%s', `album` = '%s' WHERE `resource-id` = '%s' AND `uid` = %d", dbesc($desc), + dbesc($albname), dbesc($resource_id), intval($page_owner_uid) ); @@ -997,6 +1003,8 @@ function photos_content(&$a) { $edit_tpl = load_view_file('view/photo_edit.tpl'); $o .= replace_macros($edit_tpl, array( '$id' => $ph[0]['id'], + '$album' => $ph[0]['album'], + '$newalbum' => t('New album name'), '$nickname' => $a->data['user']['nickname'], '$resource_id' => $ph[0]['resource-id'], '$capt_label' => t('Caption'), diff --git a/mod/removeme.php b/mod/removeme.php new file mode 100644 index 000000000..62b9a6d13 --- /dev/null +++ b/mod/removeme.php @@ -0,0 +1,50 @@ +<?php + +function removeme_post(&$a) { + + if(! local_user()) + return; + + if((! x($_POST,'qxz_password')) || (! strlen(trim($_POST['qxz_password'])))) + return; + + if((! x($_POST,'verify')) || (! strlen(trim($_POST['verify'])))) + return; + + if($_POST['verify'] !== $_SESSION['remove_account_verify']) + return; + + $encrypted = hash('whirlpool',trim($_POST['qxz_password'])); + + if((strlen($a->user['password'])) && ($encrypted === $a->user['password'])) { + require_once('include/Contact.php'); + user_remove($a->user['uid']); + // NOTREACHED + } + +} + + + +function removeme_content(&$a) { + + if(! local_user()) + goaway($a->get_baseurl()); + + $hash = random_string(); + + $_SESSION['remove_account_verify'] = $hash; + + $tpl = load_view_file('view/removeme.tpl'); + $o .= replace_macros($tpl, array( + '$basedir' => $a->get_baseurl(), + '$hash' => $hash, + '$title' => t('Remove My Account'), + '$desc' => t('This will completely remove your account. Once this has been done it is not recoverable.'), + '$passwd' => t('Please enter your password for verification:'), + '$submit' => t('Remove My Account') + )); + + return $o; + +}
\ No newline at end of file diff --git a/mod/viewcontacts.php b/mod/viewcontacts.php index bd73b2ffb..90ff85b9d 100644 --- a/mod/viewcontacts.php +++ b/mod/viewcontacts.php @@ -43,7 +43,7 @@ function viewcontacts_content(&$a) { '$id' => $rr['id'], '$alt_text' => t('Visit ') . $rr['name'] . t('\'s profile'), '$thumb' => $rr['thumb'], - '$name' => $rr['name'], + '$name' => substr($rr['name'],0,20), '$url' => $rr['url'] )); } diff --git a/util/strings.php b/util/strings.php index 5233c5619..762c68d2b 100644 --- a/util/strings.php +++ b/util/strings.php @@ -84,6 +84,7 @@ $a->strings['Delete contact'] = 'Delete contact'; $a->strings['Last updated: '] = 'Last updated: '; $a->strings['Update public posts: '] = 'Update public posts: '; $a->strings['Never'] = 'Never'; +$a->strings['Update now'] = 'Update now'; $a->strings['Unblock this contact'] = 'Unblock this contact'; $a->strings['Block this contact'] = 'Block this contact'; $a->strings['Unignore this contact'] = 'Unignore this contact'; @@ -219,6 +220,11 @@ $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['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'; @@ -251,6 +257,8 @@ $a->strings['Delete message'] = 'Delete message'; $a->strings['Send Reply'] = 'Send Reply'; $a->strings['Normal View'] = 'Normal View'; $a->strings['New Item View'] = 'New Item View'; +$a->strings['CC: email addresses'] = 'CC: email addresses'; +$a->strings['Example: bob@example.com, mary@example.com'] = 'Example: bob@example.com, mary@example.com'; $a->strings['No such group'] = 'No such group'; $a->strings['Group is empty'] = 'Group is empty'; $a->strings['Group: '] = 'Group: '; @@ -295,6 +303,7 @@ $a->strings['Edit photo'] = 'Edit photo'; $a->strings['View Full Size'] = 'View Full Size'; $a->strings['Tags: '] = 'Tags: '; $a->strings['[Remove any tag]'] = '[Remove any tag]'; +$a->strings['New album name'] = 'New album name'; $a->strings['Caption'] = 'Caption'; $a->strings['Add a Tag'] = 'Add a Tag'; $a->strings['Example: @bob, @Barbara_Jensen, @jim@example.com, #California, #camping'] = 'Example: @bob, @Barbara_Jensen, @jim@example.com, #California, #camping'; @@ -347,6 +356,9 @@ $a->strings['Register'] = 'Register'; $a->strings['Please login.'] = 'Please login.'; $a->strings['Registration revoked for '] = 'Registration revoked for '; $a->strings['Account approved.'] = 'Account approved.'; +$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.'] = 'Passwords do not match. Password unchanged.'; $a->strings['Empty passwords are not allowed. Password unchanged.'] = 'Empty passwords are not allowed. Password unchanged.'; $a->strings['Password changed.'] = 'Password changed.'; @@ -411,6 +423,7 @@ $a->strings['Network'] = 'Network'; $a->strings['Notifications'] = 'Notifications'; $a->strings['Settings'] = 'Settings'; $a->strings['Profiles'] = 'Profiles'; +$a->strings['Embedding disabled'] = 'Embedding disabled'; $a->strings['Male'] = 'Male'; $a->strings['Female'] = 'Female'; $a->strings['Currently Male'] = 'Currently Male'; @@ -467,6 +480,9 @@ $a->strings['Ask me'] = 'Ask me'; $a->strings['Facebook status update failed.'] = 'Facebook status update failed.'; $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'; +$a->strings['Drop files here to upload'] = 'Drop files here to upload'; +$a->strings['Failed'] = 'Failed'; $a->strings['No files were uploaded.'] = 'No files were uploaded.'; $a->strings['Uploaded file is empty'] = 'Uploaded file is empty'; $a->strings['Uploaded file is too large'] = 'Uploaded file is too large'; diff --git a/view/de/jot-header.tpl b/view/de/jot-header.tpl index 508715dca..41abdf0f3 100644 --- a/view/de/jot-header.tpl +++ b/view/de/jot-header.tpl @@ -2,17 +2,20 @@ <script language="javascript" type="text/javascript" src="$baseurl/tinymce/jscripts/tiny_mce/tiny_mce_src.js"></script> <script language="javascript" type="text/javascript"> +var editor; + tinyMCE.init({ theme : "advanced", mode : "specific_textareas", editor_selector: /(profile-jot-text|prvmail-text)/, - plugins : "bbcode", - theme_advanced_buttons1 : "bold,italic,underline,undo,redo,link,unlink,image,forecolor,formatselect", + plugins : "bbcode,paste", + theme_advanced_buttons1 : "bold,italic,underline,undo,redo,link,unlink,image,forecolor,formatselect,code", theme_advanced_buttons2 : "", theme_advanced_buttons3 : "", theme_advanced_toolbar_location : "top", theme_advanced_toolbar_align : "center", theme_advanced_blockformats : "blockquote,code", + paste_text_sticky : true, entity_encoding : "raw", add_unload_trigger : false, remove_linebreaks : false, @@ -43,8 +46,13 @@ tinyMCE.init({ $('#character-counter').addClass('red'); } $('#character-counter').text(text); - }); - } + }); + + ed.onInit.add(function(ed) { + ed.pasteAsPlainText = true; + }); + + } }); </script> diff --git a/view/de/jot.tpl b/view/de/jot.tpl index d86d8f847..545bbdadd 100644 --- a/view/de/jot.tpl +++ b/view/de/jot.tpl @@ -13,10 +13,6 @@ <input type="hidden" name="location" id="jot-location" value="$defloc" /> <input type="hidden" name="coord" id="jot-coord" value="" /> -<div id="profile-jot-plugin-wrapper" > - $jotplugins -</div> -<div id="profile-jot-plugin-end"></div> <textarea rows="5" cols="64" class="profile-jot-text" id="profile-jot-text" name="body" ></textarea> @@ -37,6 +33,12 @@ <div id="profile-nolocation-wrapper" style="display: none;" > <img id="profile-nolocation" src="images/noglobe.gif" alt="Browser Standort leeren" title="Browser Standort leeren" onclick="jotClearLocation();" /> </div> + + <div id="profile-jot-plugin-wrapper" > + $jotplugins + </div> + + <div id="profile-rotator-wrapper" style="display: $visitor;" > <img id="profile-rotator" src="images/rotator.gif" alt="Bitte warten" title="Bitte warten" style="display: none;" /> </div> diff --git a/view/de/settings.tpl b/view/de/settings.tpl index 6259c171a..0ef50546f 100644 --- a/view/de/settings.tpl +++ b/view/de/settings.tpl @@ -5,7 +5,7 @@ $nickname_block -<form action="settings" id="settings-form" method="post" autocomplete="false" > +<form action="settings" id="settings-form" method="post" autocomplete="off" > <h3 class="settings-heading">Grundeinstellungen</h3> diff --git a/view/de/strings.php b/view/de/strings.php index 20e2a8d74..f59dcf63b 100644 --- a/view/de/strings.php +++ b/view/de/strings.php @@ -35,6 +35,28 @@ $a->strings[', '] = ', '; $a->strings['Gender:'] = 'Geschlecht:'; $a->strings['Status:'] = 'Status:'; $a->strings['Homepage:'] = 'Homepage:'; +$a->strings['Monday'] = 'Montag'; +$a->strings['Tuesday'] = 'Dienstag'; +$a->strings['Wednesday'] = 'Mittwoch'; +$a->strings['Thursday'] = 'Donnerstag'; +$a->strings['Friday'] = 'Freitag'; +$a->strings['Saturday'] = 'Samstag'; +$a->strings['Sunday'] = 'Sonntag'; +$a->strings['January'] = 'Januar'; +$a->strings['February'] = 'Februar'; +$a->strings['March'] = 'März'; +$a->strings['April'] = 'April'; +$a->strings['May'] = 'Mai'; +$a->strings['June'] = 'Juni'; +$a->strings['July'] = 'Juli'; +$a->strings['August'] = 'August'; +$a->strings['September'] = 'September'; +$a->strings['October'] = 'Oktober'; +$a->strings['November'] = 'November'; +$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["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'; @@ -62,6 +84,7 @@ $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'; $a->strings['Unignore this contact'] = 'Diesen Kontakt nicht mehr ignorieren'; @@ -141,6 +164,7 @@ $a->strings['Private Message'] = 'Private Nachricht'; $a->strings['This is you'] = 'Das bist du'; $a->strings['View $name\'s profile'] = 'Profile von $name'; $a->strings['Item has been removed.'] = 'Eintrag wurde entfernt.'; +$a->strings['Shared content is covered by the <a href="http://creativecommons.org/licenses/by/3.0/">Creative Commons Attribution 3.0</a> license.'] = 'Shared content is covered by the <a href="http://creativecommons.org/licenses/by/3.0/">Creative Commons Attribution 3.0</a> license.'; $a->strings['The profile address specified does not provide adequate information.'] = 'Die angegebene Profiladresse liefert unzureichende Informationen.'; $a->strings['Limited profile. This person will be unable to receive direct/personal notifications from you.'] = 'Eingeschränktes Profil. Diese Person wird keine direkten/privaten Nachrichten von dir erhalten können.'; $a->strings['Unable to retrieve contact information.'] = 'Konnte die Kontaktinformationen nicht empfangen.'; @@ -189,13 +213,18 @@ $a->strings['Send invitations'] = 'Einladungen senden'; $a->strings['Enter email addresses, one per line:'] = 'EMail Adressen eingeben, eine pro Zeile:'; $a->strings['Your message:'] = 'Deine Nachricht:'; $a->strings['Please join my social network on '] = 'Bitte trete meinem sozialen Netzwerk bei '; -$a->strings["\r\n"] = "\r\n"; $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 es'; @@ -226,9 +255,14 @@ $a->strings['Delete conversation'] = 'Unterhaltung löschen'; $a->strings['Message not available.'] = 'Nachricht nicht verfügbar.'; $a->strings['Delete message'] = 'Nachricht löschen'; $a->strings['Send Reply'] = 'Antwort senden'; +$a->strings['Normal View'] = 'Normale Ansicht'; +$a->strings['New Item View'] = 'Neue Einträge'; +$a->strings['CC: email addresses'] = 'CC: EMail Addresse'; +$a->strings['Example: bob@example.com, mary@example.com'] = 'Z.B.: bob@example.com, mary@example.com'; $a->strings['No such group'] = 'Es gibt keine solche Gruppe'; $a->strings['Group is empty'] = 'Gruppe ist leer'; $a->strings['Group: '] = 'Gruppe: '; +$a->strings['View in context'] = 'Im Zusammenhang betrachten'; $a->strings['Invalid request identifier.'] = 'Invalid request identifier.'; $a->strings['Discard'] = 'Verwerfen'; $a->strings['Ignore'] = 'Ignorieren'; @@ -261,9 +295,7 @@ $a->strings['No photos selected'] = 'Keine Bilder ausgewählt'; $a->strings['Upload Photos'] = 'Bilder hochladen'; $a->strings['New album name: '] = 'Name des neuen Albums: '; $a->strings['or existing album name: '] = 'oder existierender Albumname: '; -$a->strings['Select files to upload: '] = 'Wähle die Dateien zum Hochladen: '; $a->strings['Permissions'] = 'Berechtigungen'; -$a->strings['Use the following controls only if the Java uploader [above] fails to launch.'] = 'Verwende die folgenden Kontrollen nur wenn das Java Applet (oben) nicht funktioniert.'; $a->strings['Edit Album'] = 'Album bearbeiten'; $a->strings['View Photo'] = 'Fotos betrachten'; $a->strings['Photo not available'] = 'Foto nicht verfügbar'; @@ -271,6 +303,7 @@ $a->strings['Edit photo'] = 'Foto bearbeiten'; $a->strings['View Full Size'] = 'Betrachte Originalgröße'; $a->strings['Tags: '] = 'Tags: '; $a->strings['[Remove any tag]'] = '[Tag entfernen]'; +$a->strings['New album name'] = 'Name des neuen Albums'; $a->strings['Caption'] = 'Titel'; $a->strings['Add a Tag'] = 'Tag hinzufügen'; $a->strings['Example: @bob, @Barbara_Jensen, @jim@example.com, #California, #camping'] = 'Beispiel: @bob, @Barbara_Jensen, @jim@example.com, #California, #camping'; @@ -292,11 +325,14 @@ $a->strings['New profile created.'] = 'Neues Profil angelegt'; $a->strings['Profile unavailable to clone.'] = 'Profil nicht zum Duplizieren verfügbar.'; $a->strings['This is your <strong>public</strong> profile.<br />It <strong>may</strong> be visible to anybody using the internet.'] = 'Dies ist dein <strong>öffentliches</strong> Profil.<br />Es <strong>könnte</strong> für jeden Nutzer des Internets sichtbar sein.'; $a->strings['Age: '] = 'Alter: '; +$a->strings['Profile Image'] = 'Profilbild'; +$a->strings['Invalid OpenID url'] = 'Ungültige OpenID URL'; $a->strings['Please enter the required information.'] = 'Bitte trage die erforderlichen Informationen ein.'; $a->strings['Please use a shorter name.'] = 'Bitte verwende einen kürzeren Namen.'; $a->strings['Name too short.'] = 'Der Name ist zu kurz.'; $a->strings["That doesn\'t appear to be your full \x28First Last\x29 name."] = "Das scheint kein vollständiger Name zu sein, verwende \x28Vorname Nachname\x29."; $a->strings['Your email domain is not among those allowed on this site.'] = 'Die Domain deiner EMail Adresse ist nicht erlaubt auf dieser Seite.'; +$a->strings['Cannot use that email.'] = 'Konnte diese EMail Adresse nicht verwenden'; $a->strings['Your "nickname" can only contain "a-z", "0-9", "-", and "_", and must also begin with a letter.'] = 'Dein Spitzname darf nur aus Buchstaben und Zahlen ("a-z","0-9", "_" und "-") bestehen, außerdem muss er mit einem Buchstaben beginnen.'; $a->strings['Nickname is already registered. Please choose another.'] = 'Dieser Spitzname ist bereits vergeben. Bitte wähle einen anderen.'; $a->strings['SERIOUS ERROR: Generation of security keys failed.'] = 'SERIOUS ERROR: Generation of security keys failed.'; @@ -311,7 +347,6 @@ $a->strings['Your registration is pending approval by the site owner.'] = 'Deine $a->strings["You may \x28optionally\x29 fill in this form via OpenID by supplying your OpenID and clicking 'Register'."] = "Du kannst dieses Formular auch \x28optional\x29 mit deiner OpenID ausfüllen indem du deine OpenID angibst und 'Registrieren' klickst."; $a->strings['If you are not familiar with OpenID, please leave that field blank and fill in the rest of the items.'] = 'Wenn du nicht mit OpenID vertraut bist, lass dieses Feld bitte leer und fülle die restlichen Felder aus.'; $a->strings["Your OpenID \x28optional\x29: "] = "Deine OpenID \x28optional\x29: "; -$a->strings['Shared content is covered by the <a href="http://creativecommons.org/licenses/by/3.0/">Creative Commons Attribution 3.0</a> license.'] = 'Shared content is covered by the <a href="http://creativecommons.org/licenses/by/3.0/">Creative Commons Attribution 3.0</a> license.'; $a->strings['Registration'] = 'Registration'; $a->strings['Your Full Name ' . "\x28" . 'e.g. Joe Smith' . "\x29" . ': '] = 'Vollständiger Name ' . "\x28" . 'z.B. Joe Smith' . "\x29" . ': '; $a->strings['Your Email Address: '] = 'Deine EMail Adresse: '; @@ -342,11 +377,10 @@ $a->strings['Remove Item Tag'] = 'Gegenstands Tag entfernen'; $a->strings['Select a tag to remove: '] = 'Wähle ein Tag zum Entfernen aus: '; $a->strings['Remove'] = 'Entfernen'; $a->strings['No contacts.'] = 'Keine Kontakte.'; -$a->strings['Wall Photos'] = 'Wall Fotos'; -$a->strings['Logged out.'] = 'Abgemeldet.'; $a->strings['Visible To:'] = 'Sichtbar für:'; $a->strings['Groups'] = 'Gruppen'; $a->strings['Except For:'] = 'Abgesehen von:'; +$a->strings['Logged out.'] = 'Abgemeldet.'; $a->strings['Unknown | Not categorised'] = 'Unbekannt | Nicht kategorisiert'; $a->strings['Block immediately'] = 'Sofort blockieren'; $a->strings['Shady, spammer, self-marketer'] = 'Zwielichtig, Spammer, Selbstdarsteller'; @@ -378,6 +412,7 @@ $a->strings['seconds'] = 'Sekunden'; $a->strings[' ago'] = ' her'; $a->strings['Create a new group'] = 'Neue Gruppe erstellen'; $a->strings['Everybody'] = 'Alle Kontakte'; +$a->strings['Birthday:'] = 'Geburtstag:'; $a->strings['Logout'] = 'Abmelden'; $a->strings['Home'] = 'Persönlich'; $a->strings['Directory'] = 'Verzeichnis'; @@ -385,6 +420,7 @@ $a->strings['Network'] = 'Netzwerk'; $a->strings['Notifications'] = 'Benachrichtigungen'; $a->strings['Settings'] = 'Einstellungen'; $a->strings['Profiles'] = 'Profile'; +$a->strings['Embedding disabled'] = 'Einbettungen deaktiviert'; $a->strings['Male'] = 'Männlich'; $a->strings['Female'] = 'Weiblich'; $a->strings['Currently Male'] = 'Momentan Männlich'; @@ -438,6 +474,19 @@ $a->strings['Uncertain'] = 'Unsicher'; $a->strings['Complicated'] = 'Kompliziert'; $a->strings['Don\'t care'] = 'Ist mir nicht wichtig'; $a->strings['Ask me'] = 'Frag mich'; +$a->strings['Facebook status update failed.'] = 'Konnte den Facebook Status nicht aktualisieren.'; +$a->strings['Select files to upload: '] = 'Wähle Dateien zum Upload aus: '; +$a->strings['Use the following controls only if the Java uploader [above] fails to launch.'] = 'Verwende die folgenden Kontrollen nur, wenn der Java Uploader [oben] nicht funktioniert.'; +$a->strings['Upload a file'] = 'Datei hochladen'; +$a->strings['Drop files here to upload'] = 'Ziehe die Dateien hier her die du hochladen willst'; +$a->strings['Failed'] = 'Fehlgeschlagen'; +$a->strings['No files were uploaded.'] = 'Keine Dateien hochgeladen.'; +$a->strings['Uploaded file is empty'] = 'Hochgeladene Datei ist leer'; +$a->strings['Uploaded file is too large'] = 'Hochgeladene Datei ist zu groß'; +$a->strings['File has an invalid extension, it should be one of '] = 'Die Dateiextension ist nicht erlaubt, sie muss eine der folgenden sein '; +$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['Africa/Abidjan'] = 'Africa/Abidjan'; $a->strings['Africa/Accra'] = 'Africa/Accra'; $a->strings['Africa/Addis_Ababa'] = 'Africa/Addis_Ababa'; diff --git a/view/en/jot.tpl b/view/en/jot.tpl index d2a1014e7..5f9935778 100644 --- a/view/en/jot.tpl +++ b/view/en/jot.tpl @@ -15,10 +15,6 @@ <textarea rows="5" cols="64" class="profile-jot-text" id="profile-jot-text" name="body" ></textarea> -<div id="profile-jot-plugin-wrapper" > - $jotplugins -</div> -<div id="profile-jot-plugin-end"></div> <div id="profile-jot-submit-wrapper" > <input type="submit" id="profile-jot-submit" name="submit" value="Share" /> @@ -37,6 +33,10 @@ <div id="profile-nolocation-wrapper" style="display: none;" > <img id="profile-nolocation" src="images/noglobe.gif" alt="Clear Browser Location" title="Clear Browser Location" onclick="jotClearLocation();" /> </div> + <div id="profile-jot-plugin-wrapper"> + $jotplugins + </div> + <div id="profile-rotator-wrapper" style="display: $visitor;" > <img id="profile-rotator" src="images/rotator.gif" alt="Please wait" title="Please wait" style="display: none;" /> </div> diff --git a/view/en/settings.tpl b/view/en/settings.tpl index 5e1bfabf4..97d67cbf6 100644 --- a/view/en/settings.tpl +++ b/view/en/settings.tpl @@ -5,7 +5,7 @@ $nickname_block -<form action="settings" id="settings-form" method="post" autocomplete="false" > +<form action="settings" id="settings-form" method="post" autocomplete="off" > <h3 class="settings-heading">Basic Settings</h3> diff --git a/view/fr/jot-header.tpl b/view/fr/jot-header.tpl index b687f65a6..d0c956a02 100644 --- a/view/fr/jot-header.tpl +++ b/view/fr/jot-header.tpl @@ -2,17 +2,20 @@ <script language="javascript" type="text/javascript" src="$baseurl/tinymce/jscripts/tiny_mce/tiny_mce_src.js"></script> <script language="javascript" type="text/javascript"> +var editor; + tinyMCE.init({ theme : "advanced", mode : "specific_textareas", editor_selector: /(profile-jot-text|prvmail-text)/, - plugins : "bbcode", - theme_advanced_buttons1 : "bold,italic,underline,undo,redo,link,unlink,image,forecolor,formatselect", + plugins : "bbcode,paste", + theme_advanced_buttons1 : "bold,italic,underline,undo,redo,link,unlink,image,forecolor,formatselect,code", theme_advanced_buttons2 : "", theme_advanced_buttons3 : "", theme_advanced_toolbar_location : "top", theme_advanced_toolbar_align : "center", theme_advanced_blockformats : "blockquote,code", + paste_text_sticky : true, entity_encoding : "raw", add_unload_trigger : false, remove_linebreaks : false, @@ -43,8 +46,13 @@ tinyMCE.init({ $('#character-counter').addClass('red'); } $('#character-counter').text(text); - }); - } + }); + + ed.onInit.add(function(ed) { + ed.pasteAsPlainText = true; + }); + + } }); </script> diff --git a/view/fr/jot.tpl b/view/fr/jot.tpl index 7c49d771d..720cb0d1b 100644 --- a/view/fr/jot.tpl +++ b/view/fr/jot.tpl @@ -15,10 +15,6 @@ <textarea rows="5" cols="64" class="profile-jot-text" id="profile-jot-text" name="body" ></textarea> -<div id="profile-jot-plugin-wrapper" > - $jotplugins -</div> -<div id="profile-jot-plugin-end"></div> <div id="profile-jot-submit-wrapper" > @@ -38,6 +34,11 @@ <div id="profile-nolocation-wrapper" style="display: none;" > <img id="profile-nolocation" src="images/noglobe.gif" alt="Clear Browser Location" title="Clear Browser Location" onclick="jotClearLocation();" /> </div> + + <div id="profile-jot-plugin-wrapper" > + $jotplugins + </div> + <div id="profile-rotator-wrapper" style="display: $visitor;" > <img id="profile-rotator" src="images/rotator.gif" alt="Please wait" title="Please wait" style="display: none;" /> </div> diff --git a/view/fr/settings.tpl b/view/fr/settings.tpl index 5e1bfabf4..97d67cbf6 100644 --- a/view/fr/settings.tpl +++ b/view/fr/settings.tpl @@ -5,7 +5,7 @@ $nickname_block -<form action="settings" id="settings-form" method="post" autocomplete="false" > +<form action="settings" id="settings-form" method="post" autocomplete="off" > <h3 class="settings-heading">Basic Settings</h3> diff --git a/view/fr/strings.php b/view/fr/strings.php index c64bba1b7..39e15eccf 100644 --- a/view/fr/strings.php +++ b/view/fr/strings.php @@ -293,6 +293,7 @@ $a->strings['Edit Album'] = 'Éditer l\'album'; $a->strings['View Photo'] = 'Voir la photo'; $a->strings['Photo not available'] = 'Photo indisponible'; $a->strings['Edit photo'] = 'Éditer la photo'; +$a->strings['New album name] = 'Nom du nuovel album'; $a->strings['View Full Size'] = 'Voir en taille réelle'; $a->strings['Tags: '] = 'Étiquettes: '; $a->strings['[Remove any tag]'] = '[Retirer toutes les étiquettes]'; diff --git a/view/it/jot-header.tpl b/view/it/jot-header.tpl index bf655ab37..e55a357e8 100644 --- a/view/it/jot-header.tpl +++ b/view/it/jot-header.tpl @@ -2,17 +2,20 @@ <script language="javascript" type="text/javascript" src="$baseurl/tinymce/jscripts/tiny_mce/tiny_mce_src.js"></script> <script language="javascript" type="text/javascript"> +var editor; + tinyMCE.init({ theme : "advanced", mode : "specific_textareas", editor_selector: /(profile-jot-text|prvmail-text)/, - plugins : "bbcode", - theme_advanced_buttons1 : "bold,italic,underline,undo,redo,link,unlink,image,forecolor,formatselect", + plugins : "bbcode,paste", + theme_advanced_buttons1 : "bold,italic,underline,undo,redo,link,unlink,image,forecolor,formatselect,code", theme_advanced_buttons2 : "", theme_advanced_buttons3 : "", theme_advanced_toolbar_location : "top", theme_advanced_toolbar_align : "center", theme_advanced_blockformats : "blockquote,code", + paste_text_sticky : true, entity_encoding : "raw", add_unload_trigger : false, remove_linebreaks : false, @@ -43,8 +46,13 @@ tinyMCE.init({ $('#character-counter').addClass('red'); } $('#character-counter').text(text); - }); - } + }); + + ed.onInit.add(function(ed) { + ed.pasteAsPlainText = true; + }); + + } }); </script> diff --git a/view/it/jot.tpl b/view/it/jot.tpl index 7153c341c..eae3ecba8 100644 --- a/view/it/jot.tpl +++ b/view/it/jot.tpl @@ -15,10 +15,6 @@ <textarea rows="5" cols="64" class="profile-jot-text" id="profile-jot-text" name="body" ></textarea> -<div id="profile-jot-plugin-wrapper" > - $jotplugins -</div> -<div id="profile-jot-plugin-end"></div> <div id="profile-jot-submit-wrapper" > <input type="submit" id="profile-jot-submit" name="submit" value="Condividi" /> @@ -37,6 +33,11 @@ <div id="profile-nolocation-wrapper" style="display: none;" > <img id="profile-nolocation" src="images/noglobe.gif" alt="Cancella la tua posizione data dal browser" title="Cancella la tua posizione data dal browser" onclick="jotClearLocation();" /> </div> + + <div id="profile-jot-plugin-wrapper" > + $jotplugins + </div> + <div id="profile-rotator-wrapper" style="display: $visitor;" > <img id="profile-rotator" src="images/rotator.gif" alt="Attendi" title="Attendi" style="display: none;" /> </div> diff --git a/view/it/settings.tpl b/view/it/settings.tpl index 2ff259acc..3b68923cf 100644 --- a/view/it/settings.tpl +++ b/view/it/settings.tpl @@ -6,7 +6,7 @@ $nickname_block -<form action="settings" id="settings-form" method="post" autocomplete="false" > +<form action="settings" id="settings-form" method="post" autocomplete="off" > <h3 class="settings-heading">Impostazioni base</h3> diff --git a/view/it/strings.php b/view/it/strings.php index d0f62543f..6ae9285ad 100644 --- a/view/it/strings.php +++ b/view/it/strings.php @@ -270,6 +270,7 @@ $a->strings['Edit photo'] = 'Modifica foto'; $a->strings['View Full Size'] = 'Vedi dimensione intera'; $a->strings['Tags: '] = 'Tag: '; $a->strings['[Remove any tag]'] = '[Rimuovi tutti i tag]'; +$a->strings['New album name'] = 'Nome nuovo album'; $a->strings['Caption'] = 'Didascalia'; $a->strings['Add a Tag'] = 'Aggiungi un tag'; $a->strings['Example: @bob, @Barbara_Jensen, @jim@example.com, #California, #camping'] = 'Esempio: @bob, @Barbara_Jensen, @jim@example.com, #California, #camping'; @@ -1032,4 +1033,23 @@ $a->strings['Normal View'] = 'Vista normale'; $a->strings['New Item View'] = 'Vista Nuovi Elementi'; $a->strings[' Cannot change to that email.'] = 'Non puoi cambiare a quella email.'; $a->strings['Birthday:'] = 'Compleanno:'; +$a->strings['Update now'] = 'Aggiorna adesso'; +$a->strings['This message was sent to you by '] = 'Questo messaggio è ti è stato inviato da '; +$a->strings[', a member of the Friendika social network.'] = ', un membro del social network Friendika'; +$a->strings['You may visit them online at'] = 'Puoi visitarli online a '; +$a->strings['Please contact the sender by replying to this post if you do not wish to receive these messages.'] = 'Contatta il mittente rispondendo a questo post se non vuoi ricevere questi messaggi.'; +$a->strings['posted an update.'] = 'ha inviato un aggiornamento.'; +$a->strings['CC: email addresses'] = 'CC: indirizzi email'; +$a->strings['Example: bob@example.com, mary@example.com'] = 'Esempio: bob@example.com, mary@example.com'; +$a->strings['Embedding disabled'] = 'Inclusione disabilitata'; +$a->strings['Upload a file'] = 'Carica un file'; +$a->strings['Drop files here to upload'] = 'Trascina un file qui per caricarlo'; +$a->strings['Failed'] = 'Fallito'; +$a->strings['No files were uploaded.'] = 'Nessun file è stato caricato.'; +$a->strings['Uploaded file is empty'] = 'Il file caricato è vuoto'; +$a->strings['Uploaded file is too large'] = 'Il file caricato è troppo grande'; +$a->strings['File has an invalid extension, it should be one of '] = 'Il file ha una estensione non valida, dovrebbe essere una di '; +$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'; ?> diff --git a/view/photo_edit.tpl b/view/photo_edit.tpl index a40e3fef6..bf8563b3c 100644 --- a/view/photo_edit.tpl +++ b/view/photo_edit.tpl @@ -3,6 +3,12 @@ <input type="hidden" name="item_id" value="$item_id" /> + <label id="photo-edit-albumname-label" for="photo-edit-albumname">$newalbum</label> + <input id="photo-edit-albumname" type="text" size="32" name="albname" value="$album" /> + + <div id="photo-edit-albumname-end"></div> + + <label id="photo-edit-caption-label" for="photo-edit-caption">$capt_label</label> <input id="photo-edit-caption" type="text" size="84" name="desc" value="$caption" /> diff --git a/view/removeme.tpl b/view/removeme.tpl new file mode 100644 index 000000000..a3ca8d4cf --- /dev/null +++ b/view/removeme.tpl @@ -0,0 +1,20 @@ +<h1>$title</h1> + +<div id="remove-account-wrapper"> + +<div id="remove-account-desc">$desc</div> + +<form action="$basedir/removeme" autocomplete="off" method="post" > +<input type="hidden" name="verify" value="$hash" /> + +<div id="remove-account-pass-wrapper"> +<label id="remove-account-pass-label" for="remove-account-pass">$passwd</label> +<input type="password" id="remove-account-pass" name="qxz_password" /> +</div> +<div id="remove-account-pass-end"></div> + +<input type="submit" name="submit" value="$submit" /> + +</form> +</div> + diff --git a/view/theme/default/style.css b/view/theme/default/style.css index ae45a4244..61782f6e3 100644 --- a/view/theme/default/style.css +++ b/view/theme/default/style.css @@ -1798,11 +1798,11 @@ a.mail-list-link { margin-bottom: 15px; } -#photo-edit-caption-label, #photo-edit-tags-label { +#photo-edit-caption-label, #photo-edit-tags-label, #photo-edit-albumname-label { float: left; width: 150px; } -#photo-edit-caption, #photo-edit-newtag { +#photo-edit-caption, #photo-edit-newtag, #photo-edit-albumname { float: left; margin-bottom: 25px; } @@ -1813,7 +1813,7 @@ a.mail-list-link { margin-bottom: 25px; } -#photo-edit-caption-end, #photo-edit-tags-end { +#photo-edit-caption-end, #photo-edit-tags-end, #photo-edit-albumname-end { clear: both; } @@ -2010,7 +2010,7 @@ a.mail-list-link { .tool-wrapper { float: left; - margin-left: 5px; + margin-left: 20px; } .tool-link { cursor: pointer; diff --git a/view/theme/duepuntozero/style.css b/view/theme/duepuntozero/style.css index d6a1744a6..a1098f6a4 100644 --- a/view/theme/duepuntozero/style.css +++ b/view/theme/duepuntozero/style.css @@ -1673,11 +1673,11 @@ a.mail-list-link { margin-bottom: 15px; } -#photo-edit-caption-label, #photo-edit-tags-label { +#photo-edit-caption-label, #photo-edit-tags-label, #photo-edit-albumname-label { float: left; width: 150px; } -#photo-edit-caption, #photo-edit-newtag { +#photo-edit-caption, #photo-edit-newtag, #photo-edit-albumname { float: left; margin-bottom: 25px; } @@ -1688,7 +1688,7 @@ a.mail-list-link { margin-bottom: 25px; } -#photo-edit-caption-end, #photo-edit-tags-end { +#photo-edit-caption-end, #photo-edit-tags-end, #photo-edit-albumname-end { clear: both; } @@ -1900,8 +1900,9 @@ a.mail-list-link { .tool-wrapper { float: left; - margin-left: 5px; + margin-left: 20px; } + .tool-link { cursor: pointer; } |