diff --git a/include/bbcode.php b/include/bbcode.php index b3f6aa826b..e09b1ed342 100644 --- a/include/bbcode.php +++ b/include/bbcode.php @@ -251,11 +251,11 @@ function bb_ShareAttributes($match) { if ($avatar != "") $headline .= ''; - $headline .= sprintf(t('%s wrote the following post:'), $profile, $author, $link); + $headline .= sprintf(t('%s wrote the following post:'), $profile, $author, $link); $headline .= ""; - $text = "
".$headline.'
'.trim($match[2])."
"; + $text = $headline.'
'.trim($match[2])."
"; return($text); } @@ -314,6 +314,7 @@ function bbcode($Text,$preserve_nl = false, $tryoembed = true) { // We'll emulate it. + $Text = trim($Text); $Text = str_replace("\r\n","\n", $Text); $Text = str_replace(array("\r","\n"), array('
','
'), $Text); diff --git a/include/delivery.php b/include/delivery.php index c56d7d2884..fcb0ee47b9 100644 --- a/include/delivery.php +++ b/include/delivery.php @@ -439,14 +439,14 @@ function delivery_run(&$argv, &$argc){ } if(! $it) break; - + $local_user = q("SELECT * FROM `user` WHERE `uid` = %d LIMIT 1", intval($uid) ); if(! count($local_user)) break; - + $reply_to = ''; $r1 = q("SELECT * FROM `mailacct` WHERE `uid` = %d LIMIT 1", intval($uid) @@ -481,13 +481,28 @@ function delivery_run(&$argv, &$argc){ //logger("Mail: Data: ".print_r($it, true), LOGGER_DATA); if($it['uri'] !== $it['parent-uri']) { - $headers .= 'References: <' . iri2msgid($it['parent-uri']) . '>' . "\n"; - if(!strlen($it['title'])) { - $r = q("SELECT `title` FROM `item` WHERE `parent-uri` = '%s' LIMIT 1", - dbesc($it['parent-uri'])); + $headers .= "References: <".iri2msgid($it["parent-uri"]).">"; + + // If Threading is enabled, write down the correct parent + if (($it["thr-parent"] != "") and ($it["thr-parent"] != $it["parent-uri"])) + $headers .= " <".iri2msgid($it["thr-parent"]).">"; + $headers .= "\n"; + + if(!$it['title']) { + $r = q("SELECT `title` FROM `item` WHERE `uri` = '%s' AND `uid` = %d LIMIT 1", + dbesc($it['parent-uri']), + intval($uid)); if(count($r) AND ($r[0]['title'] != '')) $subject = $r[0]['title']; + else { + $r = q("SELECT `title` FROM `item` WHERE `parent-uri` = '%s' AND `uid` = %d LIMIT 1", + dbesc($it['parent-uri']), + intval($uid)); + + if(count($r) AND ($r[0]['title'] != '')) + $subject = $r[0]['title']; + } } if(strncasecmp($subject,'RE:',3)) $subject = 'Re: '.$subject; diff --git a/include/diaspora.php b/include/diaspora.php index c2b2fbcf4e..b14402b5a2 100755 --- a/include/diaspora.php +++ b/include/diaspora.php @@ -923,6 +923,7 @@ function diaspora_reshare($importer,$xml,$msg) { $orig_guid = notags(unxmlify($xml->root_guid)); $source_url = 'https://' . substr($orig_author,strpos($orig_author,'@')+1) . '/p/' . $orig_guid . '.xml'; + $orig_url = 'https://'.substr($orig_author,strpos($orig_author,'@')+1).'/posts/'.$orig_guid; $x = fetch_url($source_url); if(! $x) $x = fetch_url(str_replace('https://','http://',$source_url)); @@ -1032,10 +1033,14 @@ function diaspora_reshare($importer,$xml,$msg) { $datarray['author-avatar'] = ((x($person,'thumb')) ? $person['thumb'] : $person['photo']); $datarray['body'] = $body; } else { + $prefix = "[share author='".$person['name']. + "' profile='".$person['url']. + "' avatar='".((x($person,'thumb')) ? $person['thumb'] : $person['photo']). + "' link='".$orig_url."']"; $datarray['author-name'] = $contact['name']; $datarray['author-link'] = $contact['url']; $datarray['author-avatar'] = $contact['thumb']; - $datarray['body'] = $prefix . $body; + $datarray['body'] = $prefix.$body."[/share]"; } $datarray['tag'] = $str_tags; diff --git a/include/items.php b/include/items.php index fb7a7e25d1..b5e6062b23 100755 --- a/include/items.php +++ b/include/items.php @@ -798,6 +798,7 @@ function get_atom_elements($feed,$item) { logger('get_atom_elements: Looking for status.net repeated message'); $message = $child["http://activitystrea.ms/spec/1.0/"]["object"][0]["child"][SIMPLEPIE_NAMESPACE_ATOM_10]["content"][0]["data"]; + $orig_uri = $child["http://activitystrea.ms/spec/1.0/"]["object"][0]["child"][SIMPLEPIE_NAMESPACE_ATOM_10]["id"][0]["data"]; $author = $child[SIMPLEPIE_NAMESPACE_ATOM_10]["author"][0]["child"][SIMPLEPIE_NAMESPACE_ATOM_10]; $uri = $author["uri"][0]["data"]; $name = $author["name"][0]["data"]; @@ -805,17 +806,22 @@ function get_atom_elements($feed,$item) { $avatar = $avatar["href"]; if (($name != "") and ($uri != "") and ($avatar != "") and ($message != "")) { - logger('get_atom_elements: fixing sender of repeated message'); + logger('get_atom_elements: fixing sender of repeated message.'); - $res["owner-name"] = $res["author-name"]; + /*$res["owner-name"] = $res["author-name"]; $res["owner-link"] = $res["author-link"]; $res["owner-avatar"] = $res["author-avatar"]; $res["author-name"] = $name; $res["author-link"] = $uri; - $res["author-avatar"] = $avatar; + $res["author-avatar"] = $avatar;*/ - $res["body"] = html2bbcode($message); + $prefix = "[share author='".$name. + "' profile='".$uri. + "' avatar='".$avatar. + "' link='".$orig_uri."']"; + + $res["body"] = $prefix.html2bbcode($message)."[/share]"; } } diff --git a/include/network.php b/include/network.php index 5877dda41b..f6e6cc2a30 100644 --- a/include/network.php +++ b/include/network.php @@ -15,6 +15,9 @@ function fetch_url($url,$binary = false, &$redirects = 0, $timeout = 0, $accept_ @curl_setopt($ch, CURLOPT_HEADER, true); + @curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); + @curl_setopt($ch, CURLOPT_MAXREDIRS, 5); + if (!is_null($accept_content)){ curl_setopt($ch,CURLOPT_HTTPHEADER, array ( "Accept: " . $accept_content diff --git a/include/notifier.php b/include/notifier.php index b685e1b998..b5a92ff252 100644 --- a/include/notifier.php +++ b/include/notifier.php @@ -790,13 +790,28 @@ function notifier_run(&$argv, &$argc){ $headers .= 'Message-Id: <' . iri2msgid($it['uri']) . '>' . "\n"; if($it['uri'] !== $it['parent-uri']) { - $headers .= 'References: <' . iri2msgid($it['parent-uri']) . '>' . "\n"; - if(!strlen($it['title'])) { - $r = q("SELECT `title` FROM `item` WHERE `parent-uri` = '%s' LIMIT 1", - dbesc($it['parent-uri'])); + $headers .= "References: <".iri2msgid($it["parent-uri"]).">"; - if(count($r) AND ($r[0]['title'] != '')) + // If Threading is enabled, write down the correct parent + if (($it["thr-parent"] != "") and ($it["thr-parent"] != $it["parent-uri"])) + $headers .= " <".iri2msgid($it["thr-parent"]).">"; + $headers .= "\n"; + + if(!$it['title']) { + $r = q("SELECT `title` FROM `item` WHERE `uri` = '%s' AND `uid` = %d LIMIT 1", + dbesc($it['parent-uri']), + intval($uid)); + + if(count($r) AND ($r[0]['title'] != '')) $subject = $r[0]['title']; + else { + $r = q("SELECT `title` FROM `item` WHERE `parent-uri` = '%s' AND `uid` = %d LIMIT 1", + dbesc($it['parent-uri']), + intval($uid)); + + if(count($r) AND ($r[0]['title'] != '')) + $subject = $r[0]['title']; + } } if(strncasecmp($subject,'RE:',3)) $subject = 'Re: '.$subject; diff --git a/include/onepoll.php b/include/onepoll.php index 1e11f2ca1e..c493aff762 100644 --- a/include/onepoll.php +++ b/include/onepoll.php @@ -335,7 +335,7 @@ function onepoll_run(&$argv, &$argc){ intval($r[0]['id']) ); } - /*switch ($mailconf[0]['action']) { + switch ($mailconf[0]['action']) { case 0: logger("Mail: Seen before ".$msg_uid." for ".$mailconf[0]['user'].". Doing nothing.", LOGGER_DEBUG); break; @@ -353,7 +353,7 @@ function onepoll_run(&$argv, &$argc){ if ($mailconf[0]['movetofolder'] != "") imap_mail_move($mbox, $msg_uid, $mailconf[0]['movetofolder'], FT_UID); break; - }*/ + } continue; } @@ -405,8 +405,9 @@ function onepoll_run(&$argv, &$argc){ // If it seems to be a reply but a header couldn't be found take the last message with matching subject if(!x($datarray,'parent-uri') and $reply) { - $r = q("SELECT `uri` , `parent-uri` FROM `item` WHERE MATCH (`title`) AGAINST ('".'"%s"'."' IN BOOLEAN MODE) ORDER BY `created` DESC LIMIT 1", - dbesc(protect_sprintf($datarray['title']))); + $r = q("SELECT `uri` , `parent-uri` FROM `item` WHERE MATCH (`title`) AGAINST ('".'"%s"'."' IN BOOLEAN MODE) AND `uid` = %d ORDER BY `created` DESC LIMIT 1", + dbesc(protect_sprintf($datarray['title'])), + intval($importer_uid)); if(count($r)) $datarray['parent-uri'] = $r[0]['parent-uri']; } @@ -436,7 +437,29 @@ function onepoll_run(&$argv, &$argc){ else $fromdecoded .= $frompart->text; - $datarray['body'] = "[b]".t('From: ') . escape_tags($fromdecoded) . "[/b]\n\n" . $datarray['body']; + $fromarr = imap_rfc822_parse_adrlist($fromdecoded, $a->get_hostname()); + + $frommail = $fromarr[0]->mailbox."@".$fromarr[0]->host; + + if (isset($fromarr[0]->personal)) + $fromname = $fromarr[0]->personal; + else + $fromname = $frommail; + + //$datarray['body'] = "[b]".t('From: ') . escape_tags($fromdecoded) . "[/b]\n\n" . $datarray['body']; + + $datarray['author-name'] = $fromname; + $datarray['author-link'] = "mailto:".$frommail; + $datarray['author-avatar'] = $contact['photo']; + + $datarray['owner-name'] = $contact['name']; + $datarray['owner-link'] = "mailto:".$contact['addr']; + $datarray['owner-avatar'] = $contact['photo']; + + } else { + $datarray['author-name'] = $contact['name']; + $datarray['author-link'] = 'mailbox'; + $datarray['author-avatar'] = $contact['photo']; } $datarray['uid'] = $importer_uid; @@ -447,9 +470,6 @@ function onepoll_run(&$argv, &$argc){ $datarray['private'] = 1; $datarray['allow_cid'] = '<' . $contact['id'] . '>'; } - $datarray['author-name'] = $contact['name']; - $datarray['author-link'] = 'mailbox'; - $datarray['author-avatar'] = $contact['photo']; $stored_item = item_store($datarray); q("UPDATE `item` SET `last-child` = 0 WHERE `parent-uri` = '%s' AND `uid` = %d", diff --git a/include/text.php b/include/text.php index 7d26d35508..4212e23ca4 100644 --- a/include/text.php +++ b/include/text.php @@ -982,6 +982,9 @@ function prepare_body($item,$attach = false) { $s = $prep_arr['html']; if(! $attach) { + // Replace the blockquotes with quotes that are used in mails + $mailquote = '
'; + $s = str_replace(array('
', '
', '
'), array($mailquote, $mailquote, $mailquote), $s); return $s; } diff --git a/view/de/strings.php b/view/de/strings.php index 23d0503364..297e7fac3c 100644 --- a/view/de/strings.php +++ b/view/de/strings.php @@ -1024,6 +1024,7 @@ $a->strings["Delegate Page Management"] = "Delegiere das Management für die Sei $a->strings["Delegates are able to manage all aspects of this account/page except for basic account settings. Please do not delegate your personal account to anybody that you do not trust completely."] = "Bevollmächtigte sind in der Lage, alle Aspekte dieses Kontos/dieser Seite zu verwalten, abgesehen von den Grundeinstellungen des Kontos. Bitte gib niemandem eine Bevollmächtigung für deinen privaten Account, dem du nicht absolut vertraust!"; $a->strings["Existing Page Managers"] = "Vorhandene Seiten Manager"; $a->strings["Existing Page Delegates"] = "Vorhandene Bevollmächtigte für die Seite"; +$a->strings["Delegations"] = "Bevollmächtigungen"; $a->strings["Potential Delegates"] = "Potentielle Bevollmächtigte"; $a->strings["Add"] = "Hinzufügen"; $a->strings["No entries."] = "Keine Einträge"; @@ -2076,7 +2077,7 @@ $a->strings["Birthday Reminders"] = "Geburtstagserinnerungen"; $a->strings["Birthdays this week:"] = "Geburtstage diese Woche:"; $a->strings["[No description]"] = "[keine Beschreibung]"; $a->strings["Event Reminders"] = "Veranstaltungserinnerungen"; -$a->strings["Events this week:"] = "Veranstaltungen diese Woche"; +$a->strings["Events this week:"] = "Veranstaltungen diese Woche:"; $a->strings["Status Messages and Posts"] = "Statusnachrichten und Beiträge"; $a->strings["Profile Details"] = "Profildetails"; $a->strings["Events and Calendar"] = "Ereignisse und Kalender"; @@ -2097,5 +2098,7 @@ $a->strings["Post to Drupal by default"] = "Veröffentliche öffentliche Beiträ $a->strings["OEmbed settings updated"] = "OEmbed Einstellungen aktualisiert."; $a->strings["Use OEmbed for YouTube videos"] = "OEmbed für Youtube Videos verwenden"; $a->strings["URL to embed:"] = "URL zum Einbetten:"; +$a->strings['%s wrote the following post:'] = + '%s hat diesen Beitrag ursprünglich gepostet:'; $a->strings["Tumblr login"] = "Tumblr Login"; $a->strings["Tumblr password"] = "Tumblr Passwort"; diff --git a/view/theme/vier/comment_item.tpl b/view/theme/vier/comment_item.tpl new file mode 100644 index 0000000000..ac7073d710 --- /dev/null +++ b/view/theme/vier/comment_item.tpl @@ -0,0 +1,50 @@ + {{ if $threaded }} +
+ {{ else }} +
+ {{ endif }} +
+ + + + + + + + +
+ $mytitle +
+
+ + {{ if $qcomment }} + + {{ endif }} + +
+ + +
+
+ +
diff --git a/view/theme/vier/style.css b/view/theme/vier/style.css index d6acade692..f7e10c94de 100644 --- a/view/theme/vier/style.css +++ b/view/theme/vier/style.css @@ -86,6 +86,34 @@ #adminpage .selectall { text-align: right; } /* icons */ +.icon.bb-url{ + background-image: url("../../../view/theme/diabook/icons/bb-url.png"); + float: right; + margin-top: 2px;} +.icon.quote{ + background-image: url("../../../view/theme/diabook/icons/quote.png"); + float: right; + margin-top: 2px;} +.icon.bold{ + background-image: url("../../../view/theme/diabook/icons/bold.png"); + float: right; + margin-top: 2px;} +.icon.underline{ + background-image: url("../../../view/theme/diabook/icons/underline.png"); + float: right; + margin-top: 2px;} +.icon.italic{ + background-image: url("../../../view/theme/diabook/icons/italic.png"); + float: right; + margin-top: 2px;} +.icon.bb-image{ + background-image: url("../../../view/theme/diabook/icons/bb-image.png"); + float: right; + margin-top: 2px;} +.icon.bb-video{ + background-image: url("../../../view/theme/diabook/icons/bb-video.png"); + float: right; + margin-top: 2px;} .article { background-position: -50px 0px;} .audio { background-position: -70px 0px;} @@ -313,6 +341,10 @@ cursor: url('lock.cur'), pointer; } +#birthday-title, #event-title { + font-weight: bold; + margin-bottom: 5px; +} div.pager, .birthday-notice { text-align: center; @@ -356,8 +388,8 @@ div.pager, .birthday-notice { height: 32px; color: #999; border-top: 1px solid #D2D2D2; - padding-top: 16px; - margin-top: 16px; + padding-top: 5px; + margin-top: 5px; } .shared_header img { @@ -1212,8 +1244,11 @@ border-bottom: 1px solid #D2D2D2; .wall-item-container.comment .wall-item-links { padding-left: 12px; } +.wall-item-bottom .wall-item-comment-wrapper { + margin: 1px 5px 1px 0px; +} .wall-item-comment-wrapper { - margin: 1px 5px 1px 80px; + margin: 1px 15px 1px 80px; } .wall-item-comment-wrapper .comment-edit-photo { display: none; @@ -1238,11 +1273,6 @@ border-bottom: 1px solid #D2D2D2; margin-right: 1em; } -.comment-edit-preview { - width: 710px; - border: 1px solid #2d2d2d; - margin-top: 10px; -} .comment-edit-preview .contact-photo { width: 32px; height: 32px; @@ -1251,6 +1281,9 @@ border-bottom: 1px solid #D2D2D2; } .comment-edit-preview { + width: 660px; + border: 1px solid #2d2d2d; + margin-top: 10px; top: 15px !important; left: 15px !important; } @@ -1264,6 +1297,12 @@ border-bottom: 1px solid #D2D2D2; width: 700px; padding: 0; margin: 10px 0; + border-bottom: 0px; +} + +.wall-item-bottom .comment-edit-preview { + width: 575px; + margin-bottom: 5px; } .shiny { @@ -1303,6 +1342,10 @@ border-bottom: 1px solid #D2D2D2; height: 100px; } +#jot-preview-content { + padding-top: 25px; +} + #jot-preview-content .tread-wrapper { background-color: #fce94f; } @@ -1694,10 +1737,15 @@ ul.tabs li { /*ul.tabs li .active { border-bottom: 1px solid #005c94; }*/ + ul.tabs a { display: block; float: left; - padding: 0px 10px 1px 10px; +} + +ul.tabs a, #jot-preview-link, .comment-edit-submit-wrapper .fakelink { + /* padding: 0px 10px 1px 10px; */ + padding: 0px 5px 1px 5px; -webkit-border-radius: 4px; -moz-border-radius: 4px; border-radius: 4px; @@ -1715,7 +1763,9 @@ ul.tabs a { filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#ececf2',GradientType=0 ); background: linear-gradient(top, #ffffff 0%,#ececf2 100%); } -ul.tabs li .active, ul.tabs a:hover { + +ul.tabs li .active, ul.tabs a:hover, #jot-preview-link:hover, .comment-edit-submit-wrapper .fakelink:hover { + color: #fff; text-shadow: 0px 1px 0px rgba(0, 0, 0, 0.5); border: 1px solid #ececf2; diff --git a/view/theme/vier/theme.php b/view/theme/vier/theme.php index 5e483c5adc..db74385c8b 100644 --- a/view/theme/vier/theme.php +++ b/view/theme/vier/theme.php @@ -12,7 +12,7 @@ $a->theme_info = array(); function vier_init(&$a) { $a->page['htmlhead'] .= <<< EOT