From 52ea842e872cc004fd012496c828e9fb6186bec9 Mon Sep 17 00:00:00 2001 From: Michael Date: Fri, 2 Mar 2012 10:33:39 +0100 Subject: [PATCH 01/30] html2bbcode: don't convert sizes and fonts. --- include/html2bbcode.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/include/html2bbcode.php b/include/html2bbcode.php index 65920380b5..442e386911 100755 --- a/include/html2bbcode.php +++ b/include/html2bbcode.php @@ -10,7 +10,7 @@ Originally made for the syncom project: http://wiki.piratenpartei.de/Syncom function node2bbcode(&$doc, $oldnode, $attributes, $startbb, $endbb) { do { - $done = node2bbcodesub(&$doc, $oldnode, $attributes, $startbb, $endbb); + $done = node2bbcodesub($doc, $oldnode, $attributes, $startbb, $endbb); } while ($done); } @@ -150,10 +150,14 @@ function html2bbcode($message) node2bbcode($doc, 'font', array('size'=>'/(\d+)/'), '[size=$1]', '[/size]'); node2bbcode($doc, 'font', array('color'=>'/(.+)/'), '[color=$1]', '[/color]'); - node2bbcode($doc, 'span', array('style'=>'/.*color:\s*(.+?)[,;].*/'), '[color="$1"]', '[/color]'); - node2bbcode($doc, 'span', array('style'=>'/.*font-size:\s*(\d+)/'), '[size=$1]', '[/size]'); + // Untested + //node2bbcode($doc, 'span', array('style'=>'/.*font-size:\s*(.+?)[,;].*font-family:\s*(.+?)[,;].*color:\s*(.+?)[,;].*/'), '[size=$1][font=$2][color=$3]', '[/color][/font][/size]'); + //node2bbcode($doc, 'span', array('style'=>'/.*font-size:\s*(\d+)[,;].*/'), '[size=$1]', '[/size]'); + //node2bbcode($doc, 'span', array('style'=>'/.*font-size:\s*(.+?)[,;].*/'), '[size=$1]', '[/size]'); + node2bbcode($doc, 'span', array('style'=>'/.*color:\s*(.+?)[,;].*/'), '[color="$1"]', '[/color]'); //node2bbcode($doc, 'span', array('style'=>'/.*font-family:\s*(.+?)[,;].*/'), '[font=$1]', '[/font]'); + //node2bbcode($doc, 'div', array('style'=>'/.*font-family:\s*(.+?)[,;].*font-size:\s*(\d+?)pt.*/'), '[font=$1][size=$2]', '[/size][/font]'); //node2bbcode($doc, 'div', array('style'=>'/.*font-family:\s*(.+?)[,;].*font-size:\s*(\d+?)px.*/'), '[font=$1][size=$2]', '[/size][/font]'); //node2bbcode($doc, 'div', array('style'=>'/.*font-family:\s*(.+?)[,;].*/'), '[font=$1]', '[/font]'); From cb1ecf2c5ad649eb372db9eb3bd1da756f207fb6 Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Sat, 10 Mar 2012 00:15:27 +0100 Subject: [PATCH 02/30] diabook: Moving the location between the icons --- view/theme/diabook/style.css | 3 +++ view/theme/diabook/wall_item.tpl | 3 +-- view/theme/diabook/wallwall_item.tpl | 6 +++--- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/view/theme/diabook/style.css b/view/theme/diabook/style.css index bccfea149e..2d4670dca4 100644 --- a/view/theme/diabook/style.css +++ b/view/theme/diabook/style.css @@ -1113,6 +1113,7 @@ section { } .wall-item-container .wall-item-location { padding-right: 40px; + display: table-cell; } .wall-item-container .wall-item-ago { word-wrap: break-word; @@ -1168,6 +1169,7 @@ section { .wall-item-container .wall-item-actions-social { float: left; margin-bottom: 1px; + display: table-cell; } .wall-item-container .wall-item-actions-social a { margin-right: 1em; @@ -1178,6 +1180,7 @@ section { .wall-item-container .wall-item-actions-tools { float: right; width: 80px; + display: table-cell; } .wall-item-container .wall-item-actions-tools a { float: right; diff --git a/view/theme/diabook/wall_item.tpl b/view/theme/diabook/wall_item.tpl index b1a0149490..8c892fd2a9 100644 --- a/view/theme/diabook/wall_item.tpl +++ b/view/theme/diabook/wall_item.tpl @@ -46,7 +46,6 @@
-
$item.location 
@@ -82,7 +81,7 @@ {{ endif }}
- +
$item.location 
diff --git a/view/theme/diabook/wallwall_item.tpl b/view/theme/diabook/wallwall_item.tpl index 603a908c5a..3b103745bb 100644 --- a/view/theme/diabook/wallwall_item.tpl +++ b/view/theme/diabook/wallwall_item.tpl @@ -52,7 +52,6 @@
-
$item.location 
@@ -88,7 +87,8 @@ {{ endif }}
- +
$item.location 
+
@@ -100,4 +100,4 @@
$item.comment -
\ No newline at end of file +
From 15916a2cb717828367fc7e0bb74137942836a772 Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Sat, 10 Mar 2012 09:52:20 +0100 Subject: [PATCH 03/30] Mail: Removing signatures, gpg, unnecessary line breaks --- include/email.php | 14 +++ include/msgclean.php | 225 +++++++++++++++++++++++++++++++++++++++++++ include/poller.php | 3 +- 3 files changed, 240 insertions(+), 2 deletions(-) create mode 100644 include/msgclean.php diff --git a/include/email.php b/include/email.php index 659978b6ee..a3449a4249 100755 --- a/include/email.php +++ b/include/email.php @@ -1,5 +1,7 @@ parts) { $ret['body'] = email_get_part($mbox,$uid,$struc,0, 'html'); + $html = $ret['body']; if (trim($ret['body']) == '') $ret['body'] = email_get_part($mbox,$uid,$struc,0, 'plain'); @@ -107,6 +110,17 @@ function email_get_msg($mbox,$uid) { else $ret['body'] = $text; } + + $ret['body'] = removegpg($ret['body']); + $msg = removesig($ret['body']); + $ret['body'] = $msg['body']; + $ret['body'] = convertquote($ret['body'], false); + + if (trim($html) != '') + $ret['body'] = removelinebreak($ret['body']); + + $ret['body'] = unifyattributionline($ret['body']); + return $ret; } diff --git a/include/msgclean.php b/include/msgclean.php new file mode 100644 index 0000000000..284ad1ce4b --- /dev/null +++ b/include/msgclean.php @@ -0,0 +1,225 @@ +\s.*?To: (.*?)\s*?Cc: (.*?)\s*?Sent: (.*?)\s.*?Subject: ([^\n].*)\s*\['.$quote.'\]/i', "[".$quote."='$1']\n", $message); + $message = savereplace('/----- Original Message -----\s.*?From: "([^<"].*?)" <(.*?)>\s.*?To: (.*?)\s*?Sent: (.*?)\s.*?Subject: ([^\n].*)\s*\['.$quote.'\]/i', "[".$quote."='$1']\n", $message); + + $message = savereplace('/-------- Original-Nachricht --------\s*\['.$quote.'\]\nDatum: (.*?)\nVon: (.*?) <(.*?)>\nAn: (.*?)\nBetreff: (.*?)\n/i', "[".$quote."='$2']\n", $message); + $message = savereplace('/-------- Original-Nachricht --------\s*\['.$quote.'\]\sDatum: (.*?)\s.*Von: "([^<"].*?)" <(.*?)>\s.*An: (.*?)\n.*/i', "[".$quote."='$2']\n", $message); + $message = savereplace('/-------- Original-Nachricht --------\s*\['.$quote.'\]\nDatum: (.*?)\nVon: (.*?)\nAn: (.*?)\nBetreff: (.*?)\n/i', "[".$quote."='$2']\n", $message); + + $message = savereplace('/-----Urspr.*?ngliche Nachricht-----\sVon: "([^<"].*?)" <(.*?)>\s.*Gesendet: (.*?)\s.*An: (.*?)\s.*Betreff: ([^\n].*?).*:\s*\['.$quote.'\]/i', "[".$quote."='$1']\n", $message); + $message = savereplace('/-----Urspr.*?ngliche Nachricht-----\sVon: "([^<"].*?)" <(.*?)>\s.*Gesendet: (.*?)\s.*An: (.*?)\s.*Betreff: ([^\n].*?)\s*\['.$quote.'\]/i', "[".$quote."='$1']\n", $message); + + $message = savereplace('/Am (.*?), schrieb (.*?):\s*\['.$quote.'\]/i', "[".$quote."='$2']\n", $message); + + $message = savereplace('/Am .*?, \d+ .*? \d+ \d+:\d+:\d+ \+\d+\sschrieb\s(.*?)\s<(.*?)>:\s*\['.$quote.'\]/i', "[".$quote."='$1']\n", $message); + + $message = savereplace('/Am (.*?) schrieb (.*?) <(.*?)>:\s*\['.$quote.'\]/i', "[".$quote."='$2']\n", $message); + $message = savereplace('/Am (.*?) schrieb <(.*?)>:\s*\['.$quote.'\]/i', "[".$quote."='$2']\n", $message); + $message = savereplace('/Am (.*?) schrieb (.*?):\s*\['.$quote.'\]/i', "[".$quote."='$2']\n", $message); + $message = savereplace('/Am (.*?) schrieb (.*?)\n(.*?):\s*\['.$quote.'\]/i', "[".$quote."='$2']\n", $message); + + $message = savereplace('/(\d+)\/(\d+)\/(\d+) ([^<"].*?) <(.*?)>\s*\['.$quote.'\]/i', "[".$quote."='$4']\n", $message); + + $message = savereplace('/On .*?, \d+ .*? \d+ \d+:\d+:\d+ \+\d+\s(.*?)\s<(.*?)>\swrote:\s*\['.$quote.'\]/i', "[".$quote."='$1']\n", $message); + + $message = savereplace('/On (.*?) at (.*?), (.*?)\s<(.*?)>\swrote:\s*\['.$quote.'\]/i', "[".$quote."='$3']\n", $message); + $message = savereplace('/On (.*?)\n([^<].*?)\s<(.*?)>\swrote:\s*\['.$quote.'\]/i', "[".$quote."='$2']\n", $message); + $message = savereplace('/On (.*?), (.*?), (.*?)\s<(.*?)>\swrote:\s*\['.$quote.'\]/i', "[".$quote."='$3']\n", $message); + $message = savereplace('/On ([^,].*?), (.*?)\swrote:\s*\['.$quote.'\]/i', "[".$quote."='$2']\n", $message); + $message = savereplace('/On (.*?), (.*?)\swrote\s*\['.$quote.'\]/i', "[".$quote."='$2']\n", $message); + + // Der loescht manchmal den Body - was eigentlich unmoeglich ist + $message = savereplace('/On (.*?),(.*?),(.*?),(.*?), (.*?) wrote:\s*\['.$quote.'\]/i', "[".$quote."='$5']\n", $message); + + $message = savereplace('/Zitat von ([^<].*?) <(.*?)>:\s*\['.$quote.'\]/i', "[".$quote."='$1']\n", $message); + + $message = savereplace('/Quoting ([^<].*?) <(.*?)>:\s*\['.$quote.'\]/i', "[".$quote."='$1']\n", $message); + + $message = savereplace('/From: "([^<"].*?)" <(.*?)>\s*\['.$quote.'\]/i', "[".$quote."='$1']\n", $message); + $message = savereplace('/From: <(.*?)>\s*\['.$quote.'\]/i', "[".$quote."='$1']\n", $message); + + $message = savereplace('/Du \(([^)].*?)\) schreibst:\s*\['.$quote.'\]/i', "[".$quote."='$1']\n", $message); + + $message = savereplace('/--- (.*?) <.*?> schrieb am (.*?):\s*\['.$quote.'\]/i', "[".$quote."='$1']\n", $message); + $message = savereplace('/--- (.*?) schrieb am (.*?):\s*\['.$quote.'\]/i', "[".$quote."='$1']\n", $message); + + $message = savereplace('/\* (.*?) <(.*?)> hat geschrieben:\s*\['.$quote.'\]/i', "[".$quote."='$1']\n", $message); + + $message = savereplace('/(.*?) <(.*?)> schrieb (.*?)\):\s*\['.$quote.'\]/i', "[".$quote."='$1']\n", $message); + $message = savereplace('/(.*?) <(.*?)> schrieb am (.*?) um (.*):\s*\['.$quote.'\]/i', "[".$quote."='$1']\n", $message); + $message = savereplace('/(.*?) schrieb am (.*?) um (.*):\s*\['.$quote.'\]/i', "[".$quote."='$1']\n", $message); + $message = savereplace('/(.*?) \((.*?)\) schrieb:\s*\['.$quote.'\]/i', "[".$quote."='$2']\n", $message); + $message = savereplace('/(.*?) schrieb:\s*\['.$quote.'\]/i', "[".$quote."='$1']\n", $message); + + $message = savereplace('/(.*?) <(.*?)> writes:\s*\['.$quote.'\]/i', "[".$quote."='$1']\n", $message); + $message = savereplace('/(.*?) \((.*?)\) writes:\s*\['.$quote.'\]/i', "[".$quote."='$2']\n", $message); + $message = savereplace('/(.*?) writes:\s*\['.$quote.'\]/i', "[".$quote."='$1']\n", $message); + + $message = savereplace('/\* (.*?) wrote:\s*\['.$quote.'\]/i', "[".$quote."='$1']\n", $message); + $message = savereplace('/(.*?) wrote \(.*?\):\s*\['.$quote.'\]/i', "[".$quote."='$1']\n", $message); + $message = savereplace('/(.*?) wrote:\s*\['.$quote.'\]/i', "[".$quote."='$1']\n", $message); + + $message = savereplace('/([^<].*?) <.*?> hat am (.*?)\sum\s(.*)\sgeschrieben:\s*\['.$quote.'\]/i', "[".$quote."='$1']\n", $message); + + $message = savereplace('/(\d+)\/(\d+)\/(\d+) ([^<"].*?) <(.*?)>:\s*\['.$quote.'\]/i', "[".$quote."='$4']\n", $message); + $message = savereplace('/(\d+)\/(\d+)\/(\d+) (.*?) <(.*?)>\s*\['.$quote.'\]/i', "[".$quote."='$4']\n", $message); + $message = savereplace('/(\d+)\/(\d+)\/(\d+) <(.*?)>:\s*\['.$quote.'\]/i', "[".$quote."='$4']\n", $message); + $message = savereplace('/(\d+)\/(\d+)\/(\d+) <(.*?)>\s*\['.$quote.'\]/i', "[".$quote."='$4']\n", $message); + + $message = savereplace('/(.*?) <(.*?)> schrubselte:\s*\['.$quote.'\]/i', "[".$quote."='$1']\n", $message); + $message = savereplace('/(.*?) \((.*?)\) schrubselte:\s*\['.$quote.'\]/i', "[".$quote."='$2']\n", $message); + + } + return($message); +} + +function removegpg($message) +{ + + $pattern = '/(.*)\s*-----BEGIN PGP SIGNED MESSAGE-----\s*[\r\n].*Hash:.*?[\r\n](.*)'. + '[\r\n]\s*-----BEGIN PGP SIGNATURE-----\s*[\r\n].*'. + '[\r\n]\s*-----END PGP SIGNATURE-----(.*)/is'; + + preg_match($pattern, $message, $result); + + $cleaned = trim($result[1].$result[2].$result[3]); + + $cleaned = str_replace(array("\n- --\n", "\n- -"), array("\n-- \n", "\n-"), $cleaned); + + + if ($cleaned == '') + $cleaned = $message; + + return($cleaned); +} + +function removesig($message) +{ + $sigpos = strrpos($message, "\n-- \n"); + $quotepos = strrpos($message, "[/quote]"); + + if ($sigpos == 0) { + // Speziell fuer web.de, die das als Trenner verwenden + $message = str_replace("\n___________________________________________________________\n", "\n-- \n", $message); + $sigpos = strrpos($message, "\n-- \n"); + $quotepos = strrpos($message, "[/quote]"); + } + + // Sollte sich der Signaturtrenner innerhalb eines Quotes befinden + // wird keine Signaturtrennung ausgefuehrt + if (($sigpos < $quotepos) and ($sigpos != 0)) + return(array('body' => $message, 'sig' => '')); + + // To-Do: Regexp umstellen, so dass auf 1 oder kein Leerzeichen + // geprueft wird + //$message = str_replace("\n--\n", "\n-- \n", $message); + + $pattern = '/(.*)[\r\n]-- [\r\n](.*)/is'; + + preg_match($pattern, $message, $result); + + if (($result[1] != '') and ($result[2] != '')) { + $cleaned = trim($result[1])."\n"; + $sig = trim($result[2]); + // '[hr][size=x-small][color=darkblue]'.trim($result[2]).'[/color][/size]'; + } else { + $cleaned = $message; + $sig = ''; + } + + return(array('body' => $cleaned, 'sig' => $sig)); +} + +function removelinebreak($message) +{ + $arrbody = explode("\n", trim($message)); + + $lines = array(); + $lineno = 0; + + foreach($arrbody as $i => $line) { + $currquotelevel = 0; + $currline = $line; + while ((strlen($currline)>0) and ((substr($currline, 0, 1) == '>') + or (substr($currline, 0, 1) == ' '))) { + if (substr($currline, 0, 1) == '>') + $currquotelevel++; + + $currline = ltrim(substr($currline, 1)); + } + + $quotelevel = 0; + $nextline = trim($arrbody[$i+1]); + while ((strlen($nextline)>0) and ((substr($nextline, 0, 1) == '>') + or (substr($nextline, 0, 1) == ' '))) { + if (substr($nextline, 0, 1) == '>') + $quotelevel++; + + $nextline = ltrim(substr($nextline, 1)); + } + + $len = strlen($line); + $firstword = strpos($nextline.' ', ' '); + + $specialchars = ((substr(trim($nextline), 0, 1) == '-') or + (substr(trim($nextline), 0, 1) == '=') or + (substr(trim($nextline), 0, 1) == '*') or + (substr(trim($nextline), 0, 1) == '·') or + (substr(trim($nextline), 0, 4) == '[url') or + (substr(trim($nextline), 0, 5) == '[size') or + (substr(trim($nextline), 0, 7) == 'http://') or + (substr(trim($nextline), 0, 8) == 'https://')); + + if (!$specialchars) + $specialchars = ((substr(rtrim($line), -1) == '-') or + (substr(rtrim($line), -1) == '=') or + (substr(rtrim($line), -1) == '*') or + (substr(rtrim($line), -1) == '·') or + (substr(rtrim($line), -6) == '[/url]') or + (substr(rtrim($line), -7) == '[/size]')); + + //if ($specialchars) + // echo ("Special\n"); + + if ($lines[$lineno] != '') { + if (substr($lines[$lineno], -1) != ' ') + $lines[$lineno] .= ' '; + + while ((strlen($line)>0) and ((substr($line, 0, 1) == '>') + or (substr($line, 0, 1) == ' '))) { + + $line = ltrim(substr($line, 1)); + } + + } + //else + // $lines[$lineno] = $quotelevel.'-'.$len.'-'.$firstword.'-'; + + $lines[$lineno] .= $line; + //if ((($len + $firstword < 68) and (substr($line, -1, 1) != ' ')) + // or ($quotelevel != $currquotelevel) or $specialchars) + if (((substr($line, -1, 1) != ' ')) + or ($quotelevel != $currquotelevel)) + $lineno++; + } + return(implode("\n", $lines)); + +} +?> diff --git a/include/poller.php b/include/poller.php index cfbc46b87e..3be6caebd7 100755 --- a/include/poller.php +++ b/include/poller.php @@ -1,7 +1,6 @@ Date: Sat, 10 Mar 2012 11:29:40 +0100 Subject: [PATCH 04/30] New config options if ostatus polling should use the priority in the contacts --- include/poller.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/include/poller.php b/include/poller.php index 3be6caebd7..f165ad5905 100755 --- a/include/poller.php +++ b/include/poller.php @@ -140,7 +140,10 @@ function poller_run($argv, $argc){ if($manual_id) $contact['last-update'] = '0000-00-00 00:00:00'; - if($contact['network'] === NETWORK_DFRN || $contact['network'] === NETWORK_OSTATUS) + if($contact['network'] === NETWORK_DFRN) + $contact['priority'] = 2; + + if(!get_config('system','ostatus_use_priority') and ($contact['network'] === NETWORK_OSTATUS)) $contact['priority'] = 2; if($contact['priority'] || $contact['subhub']) { From 74b3e9f273b019729d213f3ccaeba1bb11d61d24 Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Sat, 10 Mar 2012 15:50:35 +0100 Subject: [PATCH 05/30] Enabled Caching for items. Changed color of tags in diabook. --- include/text.php | 17 ++++++++++++++++- view/theme/diabook/style.css | 4 ++-- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/include/text.php b/include/text.php index 5ad0154d7a..38736d8364 100644 --- a/include/text.php +++ b/include/text.php @@ -874,6 +874,14 @@ function link_compare($a,$b) { if(! function_exists('prepare_body')) { function prepare_body($item,$attach = false) { + $cache = get_config('system','itemcache'); + + if (($cache != '')) { + $cachefile = $cache."/".$item["guid"]."-".strtotime($item["edited"])."-".$attach; + if (file_exists($cachefile)) + return(file_get_contents($cachefile)); + } + call_hooks('prepare_body_init', $item); $s = prepare_text($item['body']); @@ -882,8 +890,11 @@ function prepare_body($item,$attach = false) { call_hooks('prepare_body', $prep_arr); $s = $prep_arr['html']; - if(! $attach) + if(! $attach) { + if ($cache != '') + file_put_contents($cachefile, $s); return $s; + } $arr = explode(',',$item['attach']); if(count($arr)) { @@ -917,6 +928,10 @@ function prepare_body($item,$attach = false) { $prep_arr = array('item' => $item, 'html' => $s); call_hooks('prepare_body_final', $prep_arr); + + if ($cache != '') + file_put_contents($cachefile, $prep_arr['html']); + return $prep_arr['html']; }} diff --git a/view/theme/diabook/style.css b/view/theme/diabook/style.css index 2d4670dca4..0504ce96a9 100644 --- a/view/theme/diabook/style.css +++ b/view/theme/diabook/style.css @@ -1277,14 +1277,14 @@ section { } .tag { /*background: url("../../../images/tag_b.png") repeat-x center left;*/ - color: #3465A4; + color: #999; padding-left: 3px; font-size: 12px; } .tag a { padding-right: 5px; /*background: url("../../../images/tag.png") no-repeat center right;*/ - color: #3465A4; + color: #999; } .wwto { position: absolute !important; From 670b571c8ac0532cc80fff6351f91b1b0fa58e0c Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Sat, 10 Mar 2012 18:19:00 +0100 Subject: [PATCH 06/30] Caching improved. --- include/text.php | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/include/text.php b/include/text.php index 38736d8364..5bf815105b 100644 --- a/include/text.php +++ b/include/text.php @@ -874,25 +874,27 @@ function link_compare($a,$b) { if(! function_exists('prepare_body')) { function prepare_body($item,$attach = false) { + call_hooks('prepare_body_init', $item); + $cache = get_config('system','itemcache'); if (($cache != '')) { - $cachefile = $cache."/".$item["guid"]."-".strtotime($item["edited"])."-".$attach; + $cachefile = $cache."/".$item["guid"]."-".strtotime($item["edited"])."-".$attach."-".hash("crc32", $item['body']); + if (file_exists($cachefile)) - return(file_get_contents($cachefile)); - } - - call_hooks('prepare_body_init', $item); - - $s = prepare_text($item['body']); + $s = file_get_contents($cachefile); + else { + $s = prepare_text($item['body']); + file_put_contents($cachefile, $s); + } + } else + $s = prepare_text($item['body']); $prep_arr = array('item' => $item, 'html' => $s); call_hooks('prepare_body', $prep_arr); $s = $prep_arr['html']; if(! $attach) { - if ($cache != '') - file_put_contents($cachefile, $s); return $s; } @@ -925,13 +927,9 @@ function prepare_body($item,$attach = false) { $s .= '
'; } - $prep_arr = array('item' => $item, 'html' => $s); call_hooks('prepare_body_final', $prep_arr); - if ($cache != '') - file_put_contents($cachefile, $prep_arr['html']); - return $prep_arr['html']; }} From eb3b211461906c405c7d016401cb3cd6d7d03b83 Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Sun, 11 Mar 2012 14:22:19 +0100 Subject: [PATCH 07/30] New plugin that shows community pages in the sidebar --- addon/pages/README | 3 +++ addon/pages/pages.php | 39 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 42 insertions(+) create mode 100755 addon/pages/README create mode 100755 addon/pages/pages.php diff --git a/addon/pages/README b/addon/pages/README new file mode 100755 index 0000000000..6ec314b702 --- /dev/null +++ b/addon/pages/README @@ -0,0 +1,3 @@ +Pages + +Shows lists of community pages diff --git a/addon/pages/pages.php b/addon/pages/pages.php new file mode 100755 index 0000000000..13e6c4b593 --- /dev/null +++ b/addon/pages/pages.php @@ -0,0 +1,39 @@ + + * + */ + +function pages_install() { + register_hook('page_end', 'addon/pages/pages.php', 'pages_page_end'); +} + +function pages_uninstall() { + unregister_hook('page_end', 'addon/pages/pages.php', 'pages_page_end'); +} + +function pages_page_end($a,&$b) { + if (($a->module != "network") OR ($a->user['uid'] == 0)) + return; + + $pages = '

'.t("Community").'

    '; + $contacts = q("SELECT `contact`.`id`, `contact`.`url`, `contact`.`Name` FROM `contact`, `user` + WHERE `network`= 'dfrn' AND `duplex` + AND `contact`.`nick`=`user`.`nickname` + AND `user`.`page-flags`= %d + AND `contact`.`uid` = %d", + intval(PAGE_COMMUNITY), + intval($a->user['uid'])); + foreach($contacts as $contact) { + $pages .= '
  • '.$contact["Name"]."
  • "; + } + $pages .= "
"; + if (sizeof($contacts) > 0) + $a->page['aside'] = $pages.$a->page['aside']; + +} + +?> From b879a1ddf1575a3bd355edcee634be4a8d179c25 Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Sun, 11 Mar 2012 17:45:12 +0100 Subject: [PATCH 08/30] Pages: Show every community page - even from foreign servers (with caching) --- addon/pages/pages.php | 70 +++++++++++++++++++++++++++++------- view/theme/diabook/style.css | 3 ++ 2 files changed, 61 insertions(+), 12 deletions(-) diff --git a/addon/pages/pages.php b/addon/pages/pages.php index 13e6c4b593..6b242be316 100755 --- a/addon/pages/pages.php +++ b/addon/pages/pages.php @@ -15,25 +15,71 @@ function pages_uninstall() { unregister_hook('page_end', 'addon/pages/pages.php', 'pages_page_end'); } +function pages_iscommunity($url, &$pagelist) { + // check every week for the status - should be enough + if ($pagelist[$url]["checked"]') != 0); + + $pagelist[$url] = array("community" => $iscommunity, "checked" => time()); + } else // Fetch from cache + $iscommunity = $pagelist[$url]["community"]; + return($iscommunity); +} + +function pages_getpages($uid) { + + // Fetch cached pagelist from configuration + $pagelist = get_pconfig($uid,'pages','pagelist'); + + if (sizeof($pagelist) == 0) + $pagelist = array(); + + $contacts = q("SELECT `id`, `url`, `Name` FROM `contact` + WHERE `network`= 'dfrn' AND `uid` = %d", + intval($uid)); + + $pages = array(); + + // Look if the profile is a community page + foreach($contacts as $contact) { + if (pages_iscommunity($contact["url"], $pagelist)) + $pages[] = array("url"=>$contact["url"], "Name"=>$contact["Name"]); + } + + // Write back cached pagelist + set_pconfig($uid,'pages','pagelist', $pagelist); + return($pages); +} + function pages_page_end($a,&$b) { + // Only move on if if it's the "network" module and there is a logged on user if (($a->module != "network") OR ($a->user['uid'] == 0)) return; - $pages = '

'.t("Community").'

    '; - $contacts = q("SELECT `contact`.`id`, `contact`.`url`, `contact`.`Name` FROM `contact`, `user` - WHERE `network`= 'dfrn' AND `duplex` - AND `contact`.`nick`=`user`.`nickname` - AND `user`.`page-flags`= %d - AND `contact`.`uid` = %d", - intval(PAGE_COMMUNITY), - intval($a->user['uid'])); + $pages = '
    +
    +

    '.t("Community").'

    +
"; if (sizeof($contacts) > 0) $a->page['aside'] = $pages.$a->page['aside']; - } - ?> diff --git a/view/theme/diabook/style.css b/view/theme/diabook/style.css index 0504ce96a9..ce33076451 100644 --- a/view/theme/diabook/style.css +++ b/view/theme/diabook/style.css @@ -484,6 +484,9 @@ code { #sidebar-group-list .tool:hover { background: #EEE; } +#sidebar-pages-list .tool:hover { + background: #EEE; +} .tool .label { float: left; } From 9f76d96d46356b18325ca49c383f94a1958fefd3 Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Sun, 11 Mar 2012 19:11:25 +0100 Subject: [PATCH 09/30] Cache: item cache now has an autodelete of old files. The pages plugin now sets a link via redirection. So posting works. --- addon/pages/pages.php | 5 +++-- include/poller.php | 13 +++++++++++++ include/text.php | 2 +- 3 files changed, 17 insertions(+), 3 deletions(-) diff --git a/addon/pages/pages.php b/addon/pages/pages.php index 6b242be316..9e90cc24dd 100755 --- a/addon/pages/pages.php +++ b/addon/pages/pages.php @@ -55,7 +55,7 @@ function pages_getpages($uid) { // Look if the profile is a community page foreach($contacts as $contact) { if (pages_iscommunity($contact["url"], $pagelist)) - $pages[] = array("url"=>$contact["url"], "Name"=>$contact["Name"]); + $pages[] = array("url"=>$contact["url"], "Name"=>$contact["Name"], "id"=>$contact["id"]); } // Write back cached pagelist @@ -76,7 +76,8 @@ function pages_page_end($a,&$b) { $contacts = pages_getpages($a->user['uid']); foreach($contacts as $contact) { - $pages .= '
  • '.$contact["Name"]."
  • "; + $pages .= '
  • '. + $contact["Name"]."
  • "; } $pages .= ""; if (sizeof($contacts) > 0) diff --git a/include/poller.php b/include/poller.php index f165ad5905..65fafda4c8 100755 --- a/include/poller.php +++ b/include/poller.php @@ -69,6 +69,19 @@ function poller_run($argv, $argc){ // clear old cache Cache::clear(); + // clear item cache files if they are older than one day + $cache = get_config('system','itemcache'); + if (($cache != '') and is_dir($cache)) { + if ($dh = opendir($cache)) { + while (($file = readdir($dh)) !== false) { + $fullpath = $cache."/".$file; + if ((filetype($fullpath) == "file") and filectime($fullpath) < (time() - 1800)) + unlink($fullpath); + } + closedir($dh); + } + } + $manual_id = 0; $generation = 0; $hub_update = false; diff --git a/include/text.php b/include/text.php index 5bf815105b..08c5a54246 100644 --- a/include/text.php +++ b/include/text.php @@ -879,7 +879,7 @@ function prepare_body($item,$attach = false) { $cache = get_config('system','itemcache'); if (($cache != '')) { - $cachefile = $cache."/".$item["guid"]."-".strtotime($item["edited"])."-".$attach."-".hash("crc32", $item['body']); + $cachefile = $cache."/".$item["guid"]."-".strtotime($item["edited"])."-".hash("crc32", $item['body']); if (file_exists($cachefile)) $s = file_get_contents($cachefile); From 739309abd0cb103fe5a4d5081a7252b5698ab787 Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Sun, 11 Mar 2012 19:41:29 +0100 Subject: [PATCH 10/30] Corrected some git problems --- addon/pages/README | 3 -- addon/pages/pages.php | 86 ------------------------------------------- 2 files changed, 89 deletions(-) delete mode 100755 addon/pages/README delete mode 100755 addon/pages/pages.php diff --git a/addon/pages/README b/addon/pages/README deleted file mode 100755 index 6ec314b702..0000000000 --- a/addon/pages/README +++ /dev/null @@ -1,3 +0,0 @@ -Pages - -Shows lists of community pages diff --git a/addon/pages/pages.php b/addon/pages/pages.php deleted file mode 100755 index 9e90cc24dd..0000000000 --- a/addon/pages/pages.php +++ /dev/null @@ -1,86 +0,0 @@ - - * - */ - -function pages_install() { - register_hook('page_end', 'addon/pages/pages.php', 'pages_page_end'); -} - -function pages_uninstall() { - unregister_hook('page_end', 'addon/pages/pages.php', 'pages_page_end'); -} - -function pages_iscommunity($url, &$pagelist) { - // check every week for the status - should be enough - if ($pagelist[$url]["checked"]') != 0); - - $pagelist[$url] = array("community" => $iscommunity, "checked" => time()); - } else // Fetch from cache - $iscommunity = $pagelist[$url]["community"]; - return($iscommunity); -} - -function pages_getpages($uid) { - - // Fetch cached pagelist from configuration - $pagelist = get_pconfig($uid,'pages','pagelist'); - - if (sizeof($pagelist) == 0) - $pagelist = array(); - - $contacts = q("SELECT `id`, `url`, `Name` FROM `contact` - WHERE `network`= 'dfrn' AND `uid` = %d", - intval($uid)); - - $pages = array(); - - // Look if the profile is a community page - foreach($contacts as $contact) { - if (pages_iscommunity($contact["url"], $pagelist)) - $pages[] = array("url"=>$contact["url"], "Name"=>$contact["Name"], "id"=>$contact["id"]); - } - - // Write back cached pagelist - set_pconfig($uid,'pages','pagelist', $pagelist); - return($pages); -} - -function pages_page_end($a,&$b) { - // Only move on if if it's the "network" module and there is a logged on user - if (($a->module != "network") OR ($a->user['uid'] == 0)) - return; - - $pages = '
    -
    -

    '.t("Community").'

    -
    "; - if (sizeof($contacts) > 0) - $a->page['aside'] = $pages.$a->page['aside']; -} -?> From 9ca5de8c281fa0a7b2323f33765bca25b64bc29d Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Sun, 11 Mar 2012 19:45:28 +0100 Subject: [PATCH 11/30] Item cache now is one day. --- include/poller.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/poller.php b/include/poller.php index 65fafda4c8..3bc98e36ff 100755 --- a/include/poller.php +++ b/include/poller.php @@ -75,7 +75,7 @@ function poller_run($argv, $argc){ if ($dh = opendir($cache)) { while (($file = readdir($dh)) !== false) { $fullpath = $cache."/".$file; - if ((filetype($fullpath) == "file") and filectime($fullpath) < (time() - 1800)) + if ((filetype($fullpath) == "file") and filectime($fullpath) < (time() - 86400)) unlink($fullpath); } closedir($dh); From ebdf4842184cc8d0576abe99b29650c6b6512167 Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Sun, 11 Mar 2012 19:50:51 +0100 Subject: [PATCH 12/30] Added config options for the item cache and the ostatus priority --- htconfig.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/htconfig.php b/htconfig.php index f52aed2b10..9d9c8a2c79 100755 --- a/htconfig.php +++ b/htconfig.php @@ -79,3 +79,9 @@ $a->config['system']['theme'] = 'duepuntozero'; // By default allow pseudonyms $a->config['system']['no_regfullname'] = true; + +// If set to true the priority settings of ostatus contacts are used +$a->config['system']['ostatus_use_priority'] = false; + +// If enabled all items are cached in the given directory +$a->config['system']['itemcache'] = ""; From 7235d5466a4f54cd80d1b661b142ec99230afbf2 Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Sun, 11 Mar 2012 20:24:55 +0100 Subject: [PATCH 13/30] Removed changes --- view/theme/diabook/wall_item.tpl | 14 +++++--------- view/theme/diabook/wallwall_item.tpl | 16 ++++++---------- 2 files changed, 11 insertions(+), 19 deletions(-) diff --git a/view/theme/diabook/wall_item.tpl b/view/theme/diabook/wall_item.tpl index 6cbab0a715..321bbbe9ea 100644 --- a/view/theme/diabook/wall_item.tpl +++ b/view/theme/diabook/wall_item.tpl @@ -13,7 +13,8 @@ $item.name - menu + menu @@ -21,7 +22,8 @@
    - $item.name + $item.name - {{ if $item.plink }}$item.ago{{ else }} $item.ago {{ endif }} {{ if $item.lock }} - $item.lock {{ endif }} @@ -46,10 +48,7 @@
    -<<<<<<< HEAD:view/theme/diabook/wall_item.tpl -======= ->>>>>>> upstream/master:view/theme/diabook/wall_item.tpl
    @@ -85,11 +84,7 @@ {{ endif }}
    -<<<<<<< HEAD:view/theme/diabook/wall_item.tpl -
    $item.location 
    -=======
    $item.location 
    ->>>>>>> upstream/master:view/theme/diabook/wall_item.tpl
    @@ -102,3 +97,4 @@
    $item.comment
    + diff --git a/view/theme/diabook/wallwall_item.tpl b/view/theme/diabook/wallwall_item.tpl index 4f0a2e25fd..05ed4cc82c 100644 --- a/view/theme/diabook/wallwall_item.tpl +++ b/view/theme/diabook/wallwall_item.tpl @@ -18,7 +18,8 @@ $item.name - menu + menu @@ -26,8 +27,10 @@
    - $item.name - $item.to $item.owner_name + $item.name + $item.to $item.owner_name $item.vwall -   {{ if $item.plink }}$item.ago{{ else }} $item.ago {{ endif }} {{ if $item.lock }} - $item.lock {{ endif }} @@ -52,10 +55,7 @@
    -<<<<<<< HEAD:view/theme/diabook/wallwall_item.tpl -======= ->>>>>>> upstream/master:view/theme/diabook/wallwall_item.tpl
    @@ -92,10 +92,6 @@ {{ endif }}
    $item.location 
    -<<<<<<< HEAD:view/theme/diabook/wallwall_item.tpl - -======= ->>>>>>> upstream/master:view/theme/diabook/wallwall_item.tpl
    From 905ba5ba1d5d8e2d0caa5c0208357672ee527b7d Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Sun, 11 Mar 2012 22:39:40 +0100 Subject: [PATCH 14/30] Missing field in database.sql --- database.sql | 1 + 1 file changed, 1 insertion(+) diff --git a/database.sql b/database.sql index 35c257f021..2add8bd856 100755 --- a/database.sql +++ b/database.sql @@ -636,6 +636,7 @@ CREATE TABLE IF NOT EXISTS `mailacct` ( `mailbox` CHAR( 255 ) NOT NULL, `user` CHAR( 255 ) NOT NULL , `pass` TEXT NOT NULL , +`reply_to` CHAR( 255 ) NOT NULL , `action` INT NOT NULL , `movetofolder` CHAR(255) NOT NULL , `pubmail` TINYINT(1) NOT NULL DEFAULT '0', From 2ed6b3531eb1a9b778dfd87614fd824480a135e2 Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Sun, 11 Mar 2012 23:29:59 +0100 Subject: [PATCH 15/30] Removing test exports --- include/delivery.php | 4 ++-- include/notifier.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/delivery.php b/include/delivery.php index c1ff07bd54..41869988dc 100755 --- a/include/delivery.php +++ b/include/delivery.php @@ -435,8 +435,8 @@ function delivery_run($argv, $argc){ $headers .= 'Reply-to: ' . $reply_to . "\n"; // for testing purposes: Collect exported mails - $file = tempnam("/tmp/friendica/", "mail-out-"); - file_put_contents($file, json_encode($it)); + // $file = tempnam("/tmp/friendica/", "mail-out-"); + // file_put_contents($file, json_encode($it)); $headers .= 'Message-Id: <' . iri2msgid($it['uri']). '>' . "\n"; diff --git a/include/notifier.php b/include/notifier.php index 5b23406fce..c0a98c8eb3 100755 --- a/include/notifier.php +++ b/include/notifier.php @@ -648,8 +648,8 @@ function notifier_run($argv, $argc){ $headers .= 'Reply-to: ' . $reply_to . "\n"; // for testing purposes: Collect exported mails - $file = tempnam("/tmp/friendica/", "mail-out2-"); - file_put_contents($file, json_encode($it)); + //$file = tempnam("/tmp/friendica/", "mail-out2-"); + //file_put_contents($file, json_encode($it)); $headers .= 'Message-Id: <' . iri2msgid($it['uri']) . '>' . "\n"; From 6e7a190e9197bcf4d00accc5d85ccca4a080bec8 Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Mon, 12 Mar 2012 00:22:12 +0100 Subject: [PATCH 16/30] Mail: Subject are now with working "Re:" --- include/delivery.php | 28 +++++++--------------------- include/notifier.php | 31 ++++++++----------------------- 2 files changed, 15 insertions(+), 44 deletions(-) diff --git a/include/delivery.php b/include/delivery.php index 41869988dc..44a482ca28 100755 --- a/include/delivery.php +++ b/include/delivery.php @@ -446,30 +446,16 @@ function delivery_run($argv, $argc){ if($it['uri'] !== $it['parent-uri']) { $headers .= 'References: <' . iri2msgid($it['parent-uri']) . '>' . "\n"; - if(! strlen($it['title'])) { + if(!strlen($it['title'])) { $r = q("SELECT `title` FROM `item` WHERE `parent-uri` = '%s' LIMIT 1", - dbesc($it['parent-uri']) - ); - if(count($r)) { - $subtitle = $r[0]['title']; - if($subtitle) { - if(strncasecmp($subtitle,'RE:',3)) - $subject = $subtitle; - else - $subject = 'Re: ' . $subtitle; - } - } + dbesc($it['parent-uri'])); + + if(count($r) AND ($r[0]['title'] != '')) + $subject = $r[0]['title']; } + if(strncasecmp($subject,'RE:',3)) + $subject = 'Re: '.$subject; } - /*$headers .= 'MIME-Version: 1.0' . "\n"; - //$headers .= 'Content-Type: text/html; charset=UTF-8' . "\n"; - $headers .= 'Content-Type: text/plain; charset=UTF-8' . "\n"; - $headers .= 'Content-Transfer-Encoding: 8bit' . "\n\n"; - $html = prepare_body($it); - //$message = '' . $html . ''; - $message = html2plain($html); - logger('notifier: email delivery to ' . $addr); - mail($addr, $subject, $message, $headers);*/ email_send($addr, $subject, $headers, $it); } break; diff --git a/include/notifier.php b/include/notifier.php index c0a98c8eb3..07edc70465 100755 --- a/include/notifier.php +++ b/include/notifier.php @@ -655,31 +655,16 @@ function notifier_run($argv, $argc){ if($it['uri'] !== $it['parent-uri']) { $headers .= 'References: <' . iri2msgid($it['parent-uri']) . '>' . "\n"; - if(! strlen($it['title'])) { + if(!strlen($it['title'])) { $r = q("SELECT `title` FROM `item` WHERE `parent-uri` = '%s' LIMIT 1", - dbesc($it['parent-uri']) - ); - if(count($r)) { - $subtitle = $r[0]['title']; - if($subtitle) { - if(strncasecmp($subtitle,'RE:',3)) - $subject = $subtitle; - else - $subject = 'Re: ' . $subtitle; - } - } - } - } + dbesc($it['parent-uri'])); - /*$headers .= 'MIME-Version: 1.0' . "\n"; - //$headers .= 'Content-Type: text/html; charset=UTF-8' . "\n"; - $headers .= 'Content-Type: text/plain; charset=UTF-8' . "\n"; - $headers .= 'Content-Transfer-Encoding: 8bit' . "\n\n"; - $html = prepare_body($it); - //$message = '' . $html . ''; - $message = html2plain($html); - logger('notifier: email delivery to ' . $addr); - mail($addr, $subject, $message, $headers);*/ + if(count($r) AND ($r[0]['title'] != '')) + $subject = $r[0]['title']; + } + if(strncasecmp($subject,'RE:',3)) + $subject = 'Re: '.$subject; + } email_send($addr, $subject, $headers, $it); } break; From 9cd1c35c22e40cc7fea522f071a72452edd08017 Mon Sep 17 00:00:00 2001 From: friendica Date: Thu, 15 Mar 2012 03:44:41 -0700 Subject: [PATCH 18/30] fix recycle symbol when using plaintext editor --- mod/share.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mod/share.php b/mod/share.php index f6c025e3ce..5a72e23770 100755 --- a/mod/share.php +++ b/mod/share.php @@ -17,7 +17,7 @@ function share_init(&$a) { $o = ''; if(local_user() && intval(get_pconfig(local_user(),'system','plaintext'))) { - $o .= '♲ [url=' . $r[0]['author-link'] . ']' . $r[0]['author-name'] . '[/url]'; + $o .= "\xE2\x99\xb2" . ' [url=' . $r[0]['author-link'] . ']' . $r[0]['author-name'] . '[/url]'; if($r[0]['title']) $o .= '[b]' . $r[0]['title'] . '[/b]' . "\n"; $o .= $r[0]['body'] . "\n"; From f96aff5518d2d5fb726d381892893a68d8c36450 Mon Sep 17 00:00:00 2001 From: friendica Date: Thu, 15 Mar 2012 03:47:02 -0700 Subject: [PATCH 19/30] more recycle fixes for plaintext --- mod/share.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mod/share.php b/mod/share.php index 5a72e23770..47bb851a4f 100755 --- a/mod/share.php +++ b/mod/share.php @@ -17,7 +17,7 @@ function share_init(&$a) { $o = ''; if(local_user() && intval(get_pconfig(local_user(),'system','plaintext'))) { - $o .= "\xE2\x99\xb2" . ' [url=' . $r[0]['author-link'] . ']' . $r[0]['author-name'] . '[/url]'; + $o .= "\xE2\x99\xb2" . ' [url=' . $r[0]['author-link'] . ']' . $r[0]['author-name'] . '[/url]' . "\n"; if($r[0]['title']) $o .= '[b]' . $r[0]['title'] . '[/b]' . "\n"; $o .= $r[0]['body'] . "\n"; From 5b757e4e0e2f33a17a5a17953e49aba44a6ae7b3 Mon Sep 17 00:00:00 2001 From: Simon L'nu Date: Thu, 15 Mar 2012 15:07:17 -0400 Subject: [PATCH 20/30] commit latest to dispy-dark. fixes in html css and js Signed-off-by: Simon L'nu --- view/profile_vcard.tpl | 4 +- view/theme/dispy-dark/contact_template.tpl | 2 + view/theme/dispy-dark/group_side.tpl | 6 +- view/theme/dispy-dark/head.tpl | 19 ------ view/theme/dispy-dark/jot-header.tpl | 14 +++++ view/theme/dispy-dark/nets.tpl | 2 +- view/theme/dispy-dark/profile_vcard.tpl | 39 ++++++++---- .../theme/dispy-dark/saved_searches_aside.tpl | 2 +- view/theme/dispy-dark/style.css | 59 ++++++++++++------- view/theme/dispy-dark/theme.php | 25 ++++---- view/theme/dispy-dark/wall_item.tpl | 5 +- view/theme/dispy-dark/wallwall_item.tpl | 7 ++- view/theme/dispy/theme.php | 3 - view/theme/duepuntozero/style.css | 4 +- view/theme/duepuntozero/wall_item.tpl | 6 +- view/theme/duepuntozero/wallwall_item.tpl | 3 - 16 files changed, 115 insertions(+), 85 deletions(-) diff --git a/view/profile_vcard.tpl b/view/profile_vcard.tpl index 5bcbfd0b02..7cd02f1648 100755 --- a/view/profile_vcard.tpl +++ b/view/profile_vcard.tpl @@ -18,8 +18,8 @@
    {{ endif }} - - + + {{ if $pdesc }}
    $profile.pdesc
    {{ endif }}
    $profile.name
    diff --git a/view/theme/dispy-dark/contact_template.tpl b/view/theme/dispy-dark/contact_template.tpl index fbf354b475..04968bd07d 100644 --- a/view/theme/dispy-dark/contact_template.tpl +++ b/view/theme/dispy-dark/contact_template.tpl @@ -20,9 +20,11 @@
    $contact.name
    +{{ if $contact.alt_text }}
    $contact.alt_text
    {{ endif }}
    Profile URL
    $contact.network
    + diff --git a/view/theme/dispy-dark/group_side.tpl b/view/theme/dispy-dark/group_side.tpl index 516d70d5b4..10ecec2e85 100644 --- a/view/theme/dispy-dark/group_side.tpl +++ b/view/theme/dispy-dark/group_side.tpl @@ -1,5 +1,5 @@ -
    -

    $title

    +
    +

    $title

    +
    $item.name diff --git a/view/theme/dispy/theme.php b/view/theme/dispy/theme.php index 75297290cd..cbfcb09e67 100644 --- a/view/theme/dispy/theme.php +++ b/view/theme/dispy/theme.php @@ -111,6 +111,3 @@ $(document).ready(function() { }); EOT; - -$a->page['footer'] .= << + {{ endif }} - {{ if $item.filer }} - - {{ endif }} - +
    {{ if $item.drop.dropping }}{{ endif }}
    diff --git a/view/theme/duepuntozero/wallwall_item.tpl b/view/theme/duepuntozero/wallwall_item.tpl index c37bcb4a28..211906c934 100755 --- a/view/theme/duepuntozero/wallwall_item.tpl +++ b/view/theme/duepuntozero/wallwall_item.tpl @@ -61,9 +61,6 @@ {{ endif }} - {{ if $item.filer }} - - {{ endif }}
    {{ if $item.drop.dropping }}{{ endif }} From b5120888cf6e3aac29aa2a8d80bddcab73822e1e Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Thu, 15 Mar 2012 21:17:51 +0100 Subject: [PATCH 21/30] html2bbcode: Disabled size conversion --- include/html2bbcode.php | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/include/html2bbcode.php b/include/html2bbcode.php index 0dafecc71f..69ccf41b71 100755 --- a/include/html2bbcode.php +++ b/include/html2bbcode.php @@ -142,14 +142,14 @@ function html2bbcode($message) node2bbcode($doc, 'span', array('style'=>'font-style: italic;'), '[i]', '[/i]'); node2bbcode($doc, 'span', array('style'=>'font-weight: bold;'), '[b]', '[/b]'); - node2bbcode($doc, 'font', array('face'=>'/([\w ]+)/', 'size'=>'/(\d+)/', 'color'=>'/(.+)/'), '[font=$1][size=$2][color=$3]', '[/color][/size][/font]'); + /*node2bbcode($doc, 'font', array('face'=>'/([\w ]+)/', 'size'=>'/(\d+)/', 'color'=>'/(.+)/'), '[font=$1][size=$2][color=$3]', '[/color][/size][/font]'); node2bbcode($doc, 'font', array('size'=>'/(\d+)/', 'color'=>'/(.+)/'), '[size=$1][color=$2]', '[/color][/size]'); node2bbcode($doc, 'font', array('face'=>'/([\w ]+)/', 'size'=>'/(.+)/'), '[font=$1][size=$2]', '[/size][/font]'); node2bbcode($doc, 'font', array('face'=>'/([\w ]+)/', 'color'=>'/(.+)/'), '[font=$1][color=$3]', '[/color][/font]'); node2bbcode($doc, 'font', array('face'=>'/([\w ]+)/'), '[font=$1]', '[/font]'); node2bbcode($doc, 'font', array('size'=>'/(\d+)/'), '[size=$1]', '[/size]'); node2bbcode($doc, 'font', array('color'=>'/(.+)/'), '[color=$1]', '[/color]'); - +*/ // Untested //node2bbcode($doc, 'span', array('style'=>'/.*font-size:\s*(.+?)[,;].*font-family:\s*(.+?)[,;].*color:\s*(.+?)[,;].*/'), '[size=$1][font=$2][color=$3]', '[/color][/font][/size]'); //node2bbcode($doc, 'span', array('style'=>'/.*font-size:\s*(\d+)[,;].*/'), '[size=$1]', '[/size]'); @@ -191,13 +191,13 @@ function html2bbcode($message) node2bbcode($doc, 'hr', array(), "[hr]", ""); - //node2bbcode($doc, 'table', array(), "", ""); - //node2bbcode($doc, 'tr', array(), "\n", ""); - //node2bbcode($doc, 'td', array(), "\t", ""); - node2bbcode($doc, 'table', array(), "[table]", "[/table]"); - node2bbcode($doc, 'th', array(), "[th]", "[/th]"); - node2bbcode($doc, 'tr', array(), "[tr]", "[/tr]"); - node2bbcode($doc, 'td', array(), "[td]", "[/td]"); + node2bbcode($doc, 'table', array(), "", ""); + node2bbcode($doc, 'tr', array(), "\n", ""); + node2bbcode($doc, 'td', array(), "\t", ""); + //node2bbcode($doc, 'table', array(), "[table]", "[/table]"); + //node2bbcode($doc, 'th', array(), "[th]", "[/th]"); + //node2bbcode($doc, 'tr', array(), "[tr]", "[/tr]"); + //node2bbcode($doc, 'td', array(), "[td]", "[/td]"); node2bbcode($doc, 'h1', array(), "\n\n[size=xx-large][b]", "[/b][/size]\n"); node2bbcode($doc, 'h2', array(), "\n\n[size=x-large][b]", "[/b][/size]\n"); From 5c75d40c0b6bee04d8c58a6f88ecbbe34684874a Mon Sep 17 00:00:00 2001 From: Simon L'nu Date: Thu, 15 Mar 2012 17:27:06 -0400 Subject: [PATCH 23/30] fixed the sidebar edit thingy. haven't synced dispy yet. Signed-off-by: Simon L'nu --- view/theme/dispy-dark/profile_vcard.tpl | 35 ++++++++++++------------- view/theme/dispy-dark/style.css | 16 ++++++----- 2 files changed, 27 insertions(+), 24 deletions(-) diff --git a/view/theme/dispy-dark/profile_vcard.tpl b/view/theme/dispy-dark/profile_vcard.tpl index 6228e4f282..350a6ce4a9 100644 --- a/view/theme/dispy-dark/profile_vcard.tpl +++ b/view/theme/dispy-dark/profile_vcard.tpl @@ -1,24 +1,23 @@
    -
    $profile.name
    - - {{ if $profile.edit }} -
    - - $profile.edit.1 - -
    - {{ endif }} + {{ if $profile.edit }} +
    + + $profile.edit.1 +
    + {{ endif }} + +
    $profile.name
    {{ if $pdesc }}
    $profile.pdesc
    diff --git a/view/theme/dispy-dark/style.css b/view/theme/dispy-dark/style.css index 2dc21817a2..6ab0c7921a 100644 --- a/view/theme/dispy-dark/style.css +++ b/view/theme/dispy-dark/style.css @@ -694,7 +694,7 @@ aside #viewcontacts { margin: 30px 0px; } .ttright { - margin: 0px 0px 0px 5px; + margin: 0px 0px 0px 0px; } /** @@ -835,6 +835,7 @@ aside #viewcontacts { border: 0; text-decoration: none; float: right; + cursor: pointer; } #profile-jot-perms { float: right; @@ -1702,7 +1703,6 @@ div[id$="wrapper"] br { } - /** * register, settings & profile forms */ @@ -1767,21 +1767,25 @@ div[id$="wrapper"] br { /*margin: 3px 0px 0px 70px;*/ /*}*/ #profiles-menu-trigger { - width: 100px; + margin: 0px 0px 0px 25px; } .profile-listing { float: left; margin: 20px 20px 0px 0px; } .icon-profile-edit { - background: url("icons.png") no-repeat scroll -150px 0px transparent; - border: 0 none; + background: url("icons.png") -150px 0px no-repeat; + border: 0; + cursor: pointer; display: block; float: right; + width: 20px; height: 20px; margin: 0 0 -18px; + position: absolute; text-decoration: none; - cursor: pointer; + top: 18px; + right: 226px; } #profile-edit-links ul { margin: 20px 0; From 7684f63ecdfce560f24475630144f6058df15ca9 Mon Sep 17 00:00:00 2001 From: friendica Date: Thu, 15 Mar 2012 16:38:26 -0700 Subject: [PATCH 24/30] track whether contact is a community page or not --- boot.php | 4 ++-- database.sql | 2 ++ include/items.php | 5 +++++ mod/dfrn_confirm.php | 6 ++++++ mod/dfrn_notify.php | 12 ++++++++---- update.php | 7 ++++++- 6 files changed, 29 insertions(+), 7 deletions(-) diff --git a/boot.php b/boot.php index 04f36093bf..86da3cd2eb 100755 --- a/boot.php +++ b/boot.php @@ -9,9 +9,9 @@ require_once('include/nav.php'); require_once('include/cache.php'); define ( 'FRIENDICA_PLATFORM', 'Friendica'); -define ( 'FRIENDICA_VERSION', '2.3.1281' ); +define ( 'FRIENDICA_VERSION', '2.3.1282' ); define ( 'DFRN_PROTOCOL_VERSION', '2.23' ); -define ( 'DB_UPDATE_VERSION', 1131 ); +define ( 'DB_UPDATE_VERSION', 1132 ); define ( 'EOL', "
    \r\n" ); define ( 'ATOM_TIME', 'Y-m-d\TH:i:s\Z' ); diff --git a/database.sql b/database.sql index 35c257f021..5f69a1d008 100755 --- a/database.sql +++ b/database.sql @@ -92,6 +92,7 @@ CREATE TABLE IF NOT EXISTS `contact` ( `blocked` tinyint(1) NOT NULL DEFAULT '1', `readonly` tinyint(1) NOT NULL DEFAULT '0', `writable` tinyint(1) NOT NULL DEFAULT '0', + `forum` tinyint(1) NOT NULL DEFAULT '0', `hidden` tinyint(1) NOT NULL DEFAULT '0', `pending` tinyint(1) NOT NULL DEFAULT '1', `rating` tinyint(1) NOT NULL DEFAULT '0', @@ -116,6 +117,7 @@ CREATE TABLE IF NOT EXISTS `contact` ( KEY `dfrn-id` (`dfrn-id`), KEY `blocked` (`blocked`), KEY `readonly` (`readonly`), + KEY `forum` (`forum`), KEY `hidden` (`hidden`), KEY `pending` (`pending`), KEY `closeness` (`closeness`) diff --git a/include/items.php b/include/items.php index 4b1523ff65..68acb45f9b 100755 --- a/include/items.php +++ b/include/items.php @@ -1048,6 +1048,7 @@ function dfrn_deliver($owner,$contact,$atom, $dissolve = false) { $ssl_val = intval(get_config('system','ssl_policy')); $ssl_policy = ''; + switch($ssl_val){ case SSL_POLICY_FULL: $ssl_policy = 'full'; @@ -1092,6 +1093,7 @@ function dfrn_deliver($owner,$contact,$atom, $dissolve = false) { $challenge = hex2bin((string) $res->challenge); $dfrn_version = (float) (($res->dfrn_version) ? $res->dfrn_version : 2.0); $rino_allowed = ((intval($res->rino) === 1) ? 1 : 0); + $page = (($owner['page-flags'] == PAGE_COMMUNITY) ? 1 : 0); $final_dfrn_id = ''; @@ -1135,6 +1137,9 @@ function dfrn_deliver($owner,$contact,$atom, $dissolve = false) { $postvars['ssl_policy'] = $ssl_policy; + if($page) + $postvars['page'] = '1'; + if($rino && $rino_allowed && (! $dissolve)) { $key = substr(random_string(),0,16); $data = bin2hex(aes_encrypt($postvars['data'],$key)); diff --git a/mod/dfrn_confirm.php b/mod/dfrn_confirm.php index 0bc3ea7df5..2f4fb70452 100644 --- a/mod/dfrn_confirm.php +++ b/mod/dfrn_confirm.php @@ -207,6 +207,9 @@ function dfrn_confirm_post(&$a,$handsfree = null) { if($duplex == 1) $params['duplex'] = 1; + if($user['page-flags'] == PAGE_COMMUNITY) + $params['page'] = 1; + logger('dfrn_confirm: Confirm: posting data to ' . $dfrn_confirm . ': ' . print_r($params,true), LOGGER_DATA); /** @@ -522,6 +525,7 @@ function dfrn_confirm_post(&$a,$handsfree = null) { $source_url = ((x($_POST,'source_url')) ? hex2bin($_POST['source_url']) : ''); $aes_key = ((x($_POST,'aes_key')) ? $_POST['aes_key'] : ''); $duplex = ((x($_POST,'duplex')) ? intval($_POST['duplex']) : 0 ); + $page = ((x($_POST,'page')) ? intval($_POST['page']) : 0 ); $version_id = ((x($_POST,'dfrn_version')) ? (float) $_POST['dfrn_version'] : 2.0); logger('dfrn_confirm: requestee contacted: ' . $node); @@ -677,6 +681,7 @@ function dfrn_confirm_post(&$a,$handsfree = null) { `blocked` = 0, `pending` = 0, `duplex` = %d, + `forum` = %d, `network` = '%s' WHERE `id` = %d LIMIT 1 ", dbesc($photos[0]), @@ -687,6 +692,7 @@ function dfrn_confirm_post(&$a,$handsfree = null) { dbesc(datetime_convert()), dbesc(datetime_convert()), intval($duplex), + intval($page), dbesc(NETWORK_DFRN), intval($dfrn_record) ); diff --git a/mod/dfrn_notify.php b/mod/dfrn_notify.php index 3dbdc5b328..71860ac3b1 100755 --- a/mod/dfrn_notify.php +++ b/mod/dfrn_notify.php @@ -15,6 +15,7 @@ function dfrn_notify_post(&$a) { $dissolve = ((x($_POST,'dissolve')) ? intval($_POST['dissolve']) : 0); $perm = ((x($_POST,'perm')) ? notags(trim($_POST['perm'])) : 'r'); $ssl_policy = ((x($_POST,'ssl_policy')) ? notags(trim($_POST['ssl_policy'])): 'none'); + $page = ((x($_POST,'page')) ? intval($_POST['page']) : 0); $writable = (-1); if($dfrn_version >= 2.21) { @@ -87,12 +88,15 @@ function dfrn_notify_post(&$a) { $importer = $r[0]; - if(($writable != (-1)) && ($writable != $importer['writable'])) { - q("UPDATE `contact` SET `writable` = %d WHERE `id` = %d LIMIT 1", - intval($writable), + if((($writable != (-1)) && ($writable != $importer['writable'])) || ($importer['forum'] != $page)) { + q("UPDATE `contact` SET `writable` = %d, forum = %d WHERE `id` = %d LIMIT 1", + intval(($writable == (-1)) ? $importer['writable'] : $writable), + intval($page), intval($importer['id']) ); - $importer['writable'] = $writable; + if($writable != (-1)) + $importer['writable'] = $writable; + $importer['forum'] = $page; } // if contact's ssl policy changed, update our links diff --git a/update.php b/update.php index c29394b480..6a685a6ff0 100755 --- a/update.php +++ b/update.php @@ -1,6 +1,6 @@ Date: Fri, 16 Mar 2012 03:49:43 +0100 Subject: [PATCH 25/30] added icons to profile_side, fixes in css --- view/theme/diabook-blue/icons/com_side.png | Bin 0 -> 680 bytes view/theme/diabook-blue/icons/events.png | Bin 0 -> 663 bytes view/theme/diabook-blue/icons/home.png | Bin 0 -> 722 bytes view/theme/diabook-blue/icons/mess_side.png | Bin 0 -> 664 bytes view/theme/diabook-blue/icons/notes.png | Bin 0 -> 739 bytes view/theme/diabook-blue/icons/pubgroups.png | Bin 0 -> 710 bytes view/theme/diabook-blue/photo_album.tpl | 7 +++ view/theme/diabook-blue/photo_top.tpl | 7 +++ view/theme/diabook-blue/photo_view.tpl | 2 +- view/theme/diabook-blue/profile_side.tpl | 12 ++--- view/theme/diabook-blue/style.css | 52 ++++++++++++++++++-- view/theme/diabook-blue/theme.php | 13 +++-- view/theme/diabook/style.css | 7 +-- view/theme/diabook/wall_item.tpl | 7 +-- view/theme/diabook/wallwall_item.tpl | 11 ++--- 15 files changed, 86 insertions(+), 32 deletions(-) create mode 100644 view/theme/diabook-blue/icons/com_side.png create mode 100644 view/theme/diabook-blue/icons/events.png create mode 100644 view/theme/diabook-blue/icons/home.png create mode 100644 view/theme/diabook-blue/icons/mess_side.png create mode 100644 view/theme/diabook-blue/icons/notes.png create mode 100644 view/theme/diabook-blue/icons/pubgroups.png create mode 100755 view/theme/diabook-blue/photo_album.tpl create mode 100755 view/theme/diabook-blue/photo_top.tpl diff --git a/view/theme/diabook-blue/icons/com_side.png b/view/theme/diabook-blue/icons/com_side.png new file mode 100644 index 0000000000000000000000000000000000000000..bc5969ef1afd41f0cfba08f51a0ac17356e60c3f GIT binary patch literal 680 zcmV;Z0$2TsP)Px#24YJ`L;(K){{a7>y{D4^000SaNLh0L01FcU01FcV0GgZ_00007bV*G`2iyY? z0Rkbx3`0-=00JmUL_t(I%k9#=Z&Fbh2Jq)S_k-KZ1#T4r@^xEjWNEvYK;oo}sYAEM zq3K3oHHI`Dn;1778dLuQ{WDD6YBZ7>gG~UVKm(>GG`&!IODX5LD-CpTF@469_x$qa zJO{YWzYa}0SO#PPD2yS)3@ry>7N9BaIPA^G~#Tg@6?w7#SGGYWL(F?X~!*~Yxj6(t_byC0;WYDIx*FHs_d z>adTk)(4Dl9yubC_du#c$gS6%b&u*`|91x z$4@RRpN%-1CB*@C>%{$Ta1z)#K7_E7NQKj4zt*O4=q0~`rsPNrvfl%4g&-LkJU$cm zX&$EJrE;T%ap>ss9EUpF1!&7d49o=#&NLKCyO=v#L#!RW^i8kxALTa>E5j@Pn;_Hx O0000 literal 0 HcmV?d00001 diff --git a/view/theme/diabook-blue/icons/events.png b/view/theme/diabook-blue/icons/events.png new file mode 100644 index 0000000000000000000000000000000000000000..4a0b3f3f11316265ad45472244094c3fbc27147d GIT binary patch literal 663 zcmV;I0%-k-P)Px#24YJ`L;(K){{a7>y{D4^000SaNLh0L01FcU01FcV0GgZ_00007bV*G`2iyY? z067OPaYLd200I|DL_t(I%k7j+OB+!XhMzl`8BGSXGpW?p)x_=se$Z*9BgdJX%NV_=NVB&JC#O|bzxpT`0kaZKN~>1mC5 zGbeX}|FE$Sj~^LE^Q>HE-*tH!hP-MvQCgEk5kFj)Q_JFQqrtPwODx&R43Es#EIpBK`&^S4Pxw-o@HaZ<>w-FJ@GLEZN_O`YN&(En>tL$uUl7pLmyN$ZK zVyNTYmWWU+7U_1oc%DbE*JEa8hJL?K6h-JeBKT_*gJ8#T07#OAcDv2^_&Bv%4G|%V zB9v0Yft6Cfhebpbfa5s$zR%Ru6k2Oar4pS^hitP=_j5V0w84ZHw6Fy002ovPDHLkV1n4c9mD_t literal 0 HcmV?d00001 diff --git a/view/theme/diabook-blue/icons/home.png b/view/theme/diabook-blue/icons/home.png new file mode 100644 index 0000000000000000000000000000000000000000..be47a48fc3638b94385eec044d6373e056890b09 GIT binary patch literal 722 zcmV;@0xkWCP)Px#24YJ`L;(K){{a7>y{D4^000SaNLh0L01FcU01FcV0GgZ_00007bV*G`2iyY? z05l_~+}S<=00L4;L_t(I%k7liYm!kM$A9P1`8M4|%%*E|>72nvF4lRY zSLsNG5JJRX>$k*MI!~_Lo5`2+Nh?8}!){rlN@nk9){kq5(XLKYpk$idq*Ib?#+fqF`eavL(Ftk`~D97Z%?a$itMDybLT-deE;h^vC=^vH) zDGPoRzou&cl2IE~Qy`Hmp~wp`zhnxIPSZCad~xHi9*CxY)aX3W`ttncz9TECb&^SM zgAA#`ByU3Qv1!kGEIgE*y_&8DE-CN+8TqTuqrJyyWh;pnbincklw!2N@KQLw_nUPP zJ?VM-G4!|^xa7L^w`?6^={eX8GpLRNq>uw>4S*7{B-)el!U=2cU@cLUWX#p?JG`~V zIs!rOaGgTYO#vkpFc$d&vm7%scW`IhCxF@AU-p02Pg$c1kPx#24YJ`L;(K){{a7>y{D4^000SaNLh0L01FcU01FcV0GgZ_00007bV*G`2iyY? z05%0j=RQFI00J0EL_t(I%k7lSYEw}Zh1a<`r+>M&iCi0~MWl6*f?x~?9Y}qFj>PwH z;>DJa(Yt)k)4GM+APPJNH3ByoyyIn4& z%tiAzgVR38(#k3(rt-y3r}Kn!zAA($CrR?4(P+FJ_3+Wad;iEe=i@kLmHSnA??J}k zq*K7&-X6j*#QOSr)M~Y$l=9o#+Yc|R;y1C@8Zt}S)Qx4l*fr=%zyVmEE1|r>xU< zSXfxV+1VM0h*@hd?Kl_>thHe9_u>C zF$P(dLQNV3ECM1((8ajCd{-0{WvfJMBF#O1-^{j6@YkMDLtL?9wK=Ric>TFb@~4~N734+jSo z!JD|Xcz|o(fi$tB)35l_I!38fLcLx`9LJDSGOhLbSO>DUwsyPU?^p8qykm?pB7*lG y)>;seS4u%C1?vaxAJsMh0000Px#24YJ`L;(K){{a7>y{D4^000SaNLh0L01FcU01FcV0GgZ_00007bV*G`2iyY? z06Pi${|qMp00Lu4L_t(I%k7j+NK{c6hM#lpotaWcr(w#nva~`=t3_1MVj{7GXweVR zE@~4*yEf4eL9J@hDj{g2)T*c!6)h6d1d))+NT|@%Xe_m`P@A87?>S!!i^7Cv(796lf-rN7=N5Yd6PgQKHzvwGR)b61Y2AaC%N z)2*?F^$Yq>?5U1Udg1~gU_~&-;yMn^Z9RnF_q5lCnl72(-LrK^`%=?6?jMG$wS{>j z6EHk3puk$eHhvR1b(%Y$KbxM*54R zdY?bWY(xiXJyYU8!NC+*DaF{pGvw`c#8|v^JJysi z+L7W@`7xxT4kd!|4S7`&SRt^2a$u0^8?o^W;Aj2( zz}6ESE8KVouU?EuvZGlotx3|=*21IOGYo#H!h7$_&dQL&x8yQ;CicAmFK38_V01x) zI^Q|Y%H>O#sBdCUyoS|Q$QV%tVTJD*yiA^nvy%ZffMluI6~|9%D-c)+Yl!Hn9gn!0 z%6XWl4;4AjNM7KgxlX$4_1NXZXWMrfu?v6y_CEPx#24YJ`L;(K){{a7>y{D4^000SaNLh0L01FcU01FcV0GgZ_00007bV*G`2iyY? z0RST%G(i3U00KryL_t(I%k7j&Pg7AChTqfP&b_VWQaW&ZduxHvMudQdMnPRTB$7y6 zkl=<5ae>Ai{ts3fCF;T+J`+vnV zHET+(3o5;Z=xnEu*%srkKbaEMI#nmW5^!|{n!L{;K`4=OZen32Em}3$Fq=T6A|_Us z$nBaf_OBdY?Q%O>J)S2jM&mOY^|ZKC($t!C=4FRKKj+JsDo_aLj~k#aoXPRZck97e zRMy1JmXgQi6&pQX0isY#LZJxO!Vx6vlSFSbU|ZV7YJQR0Yk2ptBmH;?vp!jl->e*3 z<*aO|;fN2MQ$Xv90JtU_iVOovmCz9_l?o*ijwW!9Q#Z?Y{3><>{FjjA=7QKVT7dEn zUQQM1&+I1Q>Jp$7B$dsU6hG`^dB1slF9xYN3B0g$G#Ks;UF*Ia&rKr{O#zez@9e_E z`@xShW9lBDeSN=8s(8GSKFx#HlbwAT-h(BHr&)C)NtE5#+$Hpwqu@F#-nuXzoV>Fi zxWe&8e!1U}{)UB64kQmSdBC6r-N= + + $imgalt +

    $desc

    +
    +
    +
    diff --git a/view/theme/diabook-blue/photo_top.tpl b/view/theme/diabook-blue/photo_top.tpl new file mode 100755 index 0000000000..98ac9c4576 --- /dev/null +++ b/view/theme/diabook-blue/photo_top.tpl @@ -0,0 +1,7 @@ + + diff --git a/view/theme/diabook-blue/photo_view.tpl b/view/theme/diabook-blue/photo_view.tpl index 511fc73acb..902c2a0ed3 100755 --- a/view/theme/diabook-blue/photo_view.tpl +++ b/view/theme/diabook-blue/photo_view.tpl @@ -12,7 +12,7 @@
    {{ if $prevlink }}{{ endif }} - + {{ if $nextlink }}{{ endif }}
    diff --git a/view/theme/diabook-blue/profile_side.tpl b/view/theme/diabook-blue/profile_side.tpl index 01da55ce1c..a65677696a 100644 --- a/view/theme/diabook-blue/profile_side.tpl +++ b/view/theme/diabook-blue/profile_side.tpl @@ -7,12 +7,12 @@
    diff --git a/view/theme/diabook-blue/style.css b/view/theme/diabook-blue/style.css index bdc79a350d..738dde0e5d 100644 --- a/view/theme/diabook-blue/style.css +++ b/view/theme/diabook-blue/style.css @@ -891,22 +891,47 @@ ul.menu-popup .empty { text-decoration: none; } .menu-profile-side{ - list-style: none; - padding-left: 16px; - min-height: 16px; + list-style: none; + padding-left: 0px; + min-height: 0px; } .menu-profile-list{ height: auto; overflow: auto; padding-top: 3px; padding-bottom: 3px; + padding-left: 16px; + min-height: 16px; + list-style: none; } .menu-profile-list:hover{ background: #EEE; } +.menu-profile-list-item{ + padding-left: 5px; + } .menu-profile-list-item:hover{ - text-decoration: none; + text-decoration: none; } +/*http://prothemedesign.com/circular-icons/*/ +.menu-profile-list.home{ + background: url("../../../view/theme/diabook-blue/icons/home.png") no-repeat; + } +.menu-profile-list.photos{ + background: url("../../../view/theme/diabook-blue/icons/mess_side.png") no-repeat; + } +.menu-profile-list.events{ + background: url("../../../view/theme/diabook-blue/icons/events.png") no-repeat; + } +.menu-profile-list.notes{ + background: url("../../../view/theme/diabook-blue/icons/notes.png") no-repeat; + } +.menu-profile-list.foren{ + background: url("../../../view/theme/diabook-blue/icons/pubgroups.png") no-repeat; + } +.menu-profile-list.com_side{ + background: url("../../../view/theme/diabook-blue/icons/com_side.png") no-repeat; + } /* aside */ aside { display: table-cell; @@ -1066,6 +1091,16 @@ aside #side-peoplefind-url { min-height: 16px; list-style: none; } +#side-bar-photos-albums li{ +list-style-type: disc; +} +#side-bar-photos-albums ul li{ + margin-left: 30px; + padding-left: 0px; + } +#side-bar-photos-albums ul li a{ + color: #1872A2; +} .widget .tool.selected { background: url("../../../view/theme/diabook-blue/icons/selected.png") no-repeat left center; } @@ -2207,6 +2242,9 @@ a.mail-list-link { .calendar { font-family: Courier, monospace; } +.calendar.eventcal a { + color: #1872A2; + } .today { font-weight: bold; color: #FF0000; @@ -2380,6 +2418,9 @@ float: left; padding-bottom: 20px; position: relative; margin: 0 10px 10px 0; + overflow: hidden; + float: left; + position: relative; } .photo-top-album-name { position: absolute; @@ -2388,6 +2429,9 @@ float: left; } .photo-top-album-link{ color: #1872A2; + } +.photo-top-album-img{ + } /*.photo-top-image-wrapper { position: relative; diff --git a/view/theme/diabook-blue/theme.php b/view/theme/diabook-blue/theme.php index 9093ac2ca2..f9128ea1fd 100755 --- a/view/theme/diabook-blue/theme.php +++ b/view/theme/diabook-blue/theme.php @@ -11,10 +11,10 @@ $a->theme_info = array( 'extends' => 'diabook', ); +//fancybox: provide $photo.href to photo_top.tpl to img in org. scale + //profile_side - - $nav['usermenu']=array(); $userinfo = null; @@ -110,10 +110,15 @@ $('html').click(function() { event.stopPropagation(); }); - $(function() { - $('a.lightbox').fancybox(); // Select all links with lightbox class + + + $(document).ready(function() { + $("a.fancy-photo").fancybox(); // Select all links with lightbox class + $("a.fancy-album").fancybox(); }); + + EOT; diff --git a/view/theme/diabook/style.css b/view/theme/diabook/style.css index b7568631ff..437f323faa 100644 --- a/view/theme/diabook/style.css +++ b/view/theme/diabook/style.css @@ -485,9 +485,6 @@ code { #sidebar-group-list .tool:hover { background: #EEE; } -#sidebar-pages-list .tool:hover { - background: #EEE; -} .tool .label { float: left; } @@ -1337,14 +1334,14 @@ body .pageheader{ } .tag { /*background: url("../../../images/tag_b.png") repeat-x center left;*/ - color: #999; + color: #3465A4; padding-left: 3px; font-size: 12px; } .tag a { padding-right: 5px; /*background: url("../../../images/tag.png") no-repeat center right;*/ - color: #999; + color: #3465A4; } .wwto { position: absolute !important; diff --git a/view/theme/diabook/wall_item.tpl b/view/theme/diabook/wall_item.tpl index 321bbbe9ea..ebe40fd4ea 100644 --- a/view/theme/diabook/wall_item.tpl +++ b/view/theme/diabook/wall_item.tpl @@ -13,8 +13,7 @@ $item.name - menu + menu @@ -22,8 +21,7 @@ id="wall-item-photo-menu-button-$item.id">menu
    - $item.name + $item.name - {{ if $item.plink }}$item.ago{{ else }} $item.ago {{ endif }} {{ if $item.lock }} - $item.lock {{ endif }} @@ -97,4 +95,3 @@ class="wall-item-name$item.sparkle">$item.name
    $item.comment
    - diff --git a/view/theme/diabook/wallwall_item.tpl b/view/theme/diabook/wallwall_item.tpl index 05ed4cc82c..e02e5a8bec 100644 --- a/view/theme/diabook/wallwall_item.tpl +++ b/view/theme/diabook/wallwall_item.tpl @@ -18,8 +18,7 @@ $item.name - menu + menu @@ -27,10 +26,8 @@ id="wall-item-photo-menu-button-$item.id">menu
    - $item.name - $item.to $item.owner_name + $item.name + $item.to $item.owner_name $item.vwall -   {{ if $item.plink }}$item.ago{{ else }} $item.ago {{ endif }} {{ if $item.lock }} - $item.lock {{ endif }} @@ -103,4 +100,4 @@ id="wall-item-ownername-$item.id">$item.owner_name
    $item.comment -
    +
    \ No newline at end of file From 5a12383b78980d873f54ccbac2733d7267f7da36 Mon Sep 17 00:00:00 2001 From: friendica Date: Thu, 15 Mar 2012 19:55:58 -0700 Subject: [PATCH 26/30] undo git stuffup --- view/theme/duepuntozero/style.css | 4 ++-- view/theme/duepuntozero/wall_item.tpl | 5 +++-- view/theme/duepuntozero/wallwall_item.tpl | 3 +++ 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/view/theme/duepuntozero/style.css b/view/theme/duepuntozero/style.css index 10ddb00909..b79b00ef41 100755 --- a/view/theme/duepuntozero/style.css +++ b/view/theme/duepuntozero/style.css @@ -2615,12 +2615,12 @@ aside input[type='text'] { margin-top: 10px; } -.body-tag { +.body-tag, .filesavetags { opacity: 0.5; filter:alpha(opacity=50); } -.body-tag:hover { +.body-tag:hover, .filesavetags:hover { opacity: 1.0 !important; filter:alpha(opacity=100) !important; } diff --git a/view/theme/duepuntozero/wall_item.tpl b/view/theme/duepuntozero/wall_item.tpl index 2c88fc598e..e2db70a14a 100755 --- a/view/theme/duepuntozero/wall_item.tpl +++ b/view/theme/duepuntozero/wall_item.tpl @@ -56,9 +56,10 @@ {{ if $item.star }} - {{ endif }} - + {{ if $item.filer }} + + {{ endif }}
    {{ if $item.drop.dropping }}{{ endif }}
    diff --git a/view/theme/duepuntozero/wallwall_item.tpl b/view/theme/duepuntozero/wallwall_item.tpl index 211906c934..420c0e08b9 100755 --- a/view/theme/duepuntozero/wallwall_item.tpl +++ b/view/theme/duepuntozero/wallwall_item.tpl @@ -61,6 +61,9 @@ {{ endif }} + {{ if $item.filer }} + + {{ endif }}
    {{ if $item.drop.dropping }}{{ endif }} From be4e4dfb0d552857c683ee7f7bf5cf0a4bdfb686 Mon Sep 17 00:00:00 2001 From: friendica Date: Thu, 15 Mar 2012 20:07:30 -0700 Subject: [PATCH 27/30] turn indexes back off (this is from an errant checkin a year or more ago) --- .htaccess | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.htaccess b/.htaccess index 5f9531a7eb..28ac3dd802 100755 --- a/.htaccess +++ b/.htaccess @@ -1,4 +1,4 @@ -#Options -Indexes +Options -Indexes AddType application/x-java-archive .jar AddType audio/ogg .oga From 6bdb71f01c93c691a43caaf9686ce5ac0b687701 Mon Sep 17 00:00:00 2001 From: Simon L'nu Date: Fri, 16 Mar 2012 01:55:34 -0400 Subject: [PATCH 29/30] more changes in dispy-dark Signed-off-by: Simon L'nu --- view/theme/dispy-dark/style.css | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/view/theme/dispy-dark/style.css b/view/theme/dispy-dark/style.css index 6ab0c7921a..d1ec4efd73 100644 --- a/view/theme/dispy-dark/style.css +++ b/view/theme/dispy-dark/style.css @@ -1490,6 +1490,8 @@ div[id$="wrapper"] br { } #prvmail-subject { width: 100%; + color: #2e2f2e; + background: #eec; } #prvmail-submit-wrapper { margin-top: 10px; @@ -1803,6 +1805,10 @@ div[id$="wrapper"] br { background: #2e2f2e; color: #eec; } +#id_ssl_policy { + width: 374px; +} + /** * contacts selector From d965f73ef149e6baaf058987c146901e3cc16fa0 Mon Sep 17 00:00:00 2001 From: Simon L'nu Date: Fri, 16 Mar 2012 01:57:27 -0400 Subject: [PATCH 30/30] missing close double quote in mail_list.tpl Signed-off-by: Simon L'nu --- view/mail_list.tpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) mode change 100755 => 100644 view/mail_list.tpl diff --git a/view/mail_list.tpl b/view/mail_list.tpl old mode 100755 new mode 100644 index b284ffb0e3..22e35dec81 --- a/view/mail_list.tpl +++ b/view/mail_list.tpl @@ -1,6 +1,6 @@
    - $from_name + $from_name
    $from_name