diff --git a/include/conversation.php b/include/conversation.php index a420e9923a..117127a287 100755 --- a/include/conversation.php +++ b/include/conversation.php @@ -560,25 +560,28 @@ function conversation(&$a, $items, $mode, $update, $preview = false) { ); $star = false; + $filer = false; + $isstarred = "unstarred"; - if ($profile_owner == local_user() && $toplevelpost) { - $isstarred = (($item['starred']) ? "starred" : "unstarred"); + if ($profile_owner == local_user()) { + if($toplevelpost) { + $isstarred = (($item['starred']) ? "starred" : "unstarred"); - $star = array( - 'do' => t("add star"), - 'undo' => t("remove star"), - 'toggle' => t("toggle star status"), - 'classdo' => (($item['starred']) ? "hidden" : ""), - 'classundo' => (($item['starred']) ? "" : "hidden"), - 'starred' => t('starred'), - 'tagger' => t("add tag"), - 'filer' => t("file as"), - 'classtagger' => "", - ); + $star = array( + 'do' => t("add star"), + 'undo' => t("remove star"), + 'toggle' => t("toggle star status"), + 'classdo' => (($item['starred']) ? "hidden" : ""), + 'classundo' => (($item['starred']) ? "" : "hidden"), + 'starred' => t('starred'), + 'tagger' => t("add tag"), + 'classtagger' => "", + ); + } + $filer = t("file as"); } - $photo = $item['photo']; $thumb = $item['thumb']; @@ -672,6 +675,7 @@ function conversation(&$a, $items, $mode, $update, $preview = false) { 'edpost' => $edpost, 'isstarred' => $isstarred, 'star' => $star, + 'filer' => $filer, 'drop' => $drop, 'vote' => $likebuttons, 'like' => $like, diff --git a/include/oembed.php b/include/oembed.php index 52068efc76..cc71f9757c 100755 --- a/include/oembed.php +++ b/include/oembed.php @@ -1,6 +1,6 @@ /',$item['file'],$matches,PREG_SET_ORDER); if($cnt) { - logger('prepare_text: categories: ' . print_r($matches,true), LOGGER_DEBUG); +// logger('prepare_text: categories: ' . print_r($matches,true), LOGGER_DEBUG); foreach($matches as $mtch) { if(strlen($x)) $x .= ','; @@ -931,11 +932,11 @@ function prepare_body($item,$attach = false) { $x = ''; $cnt = preg_match_all('/\[(.*?)\]/',$item['file'],$matches,PREG_SET_ORDER); if($cnt) { - logger('prepare_text: filed_under: ' . print_r($matches,true), LOGGER_DEBUG); +// logger('prepare_text: filed_under: ' . print_r($matches,true), LOGGER_DEBUG); foreach($matches as $mtch) { if(strlen($x)) - $x .= ','; - $x .= file_tag_decode($mtch[1]); + $x .= '   '; + $x .= file_tag_decode($mtch[1]). ' ' . t('[remove]') . ''; } if(strlen($x) && (local_user() == $item['uid'])) $s .= '
' . t('Filed under:') . ' ' . $x . '
'; diff --git a/mod/filerm.php b/mod/filerm.php new file mode 100644 index 0000000000..66b684dc96 --- /dev/null +++ b/mod/filerm.php @@ -0,0 +1,21 @@ +argc > 1) ? notags(trim($a->argv[1])) : 0); + + logger('filerm: tag ' . $term . ' item ' . $item_id); + + if($item_id && strlen($term)) + file_tag_unsave_file(local_user(),$item_id,$term); + + if(x($_SESSION,'return_url')) + goaway($a->get_baseurl() . '/' . $_SESSION['return_url']); + + killme(); +} 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..6cb018b7bc 100755 --- a/view/theme/duepuntozero/wall_item.tpl +++ b/view/theme/duepuntozero/wall_item.tpl @@ -56,9 +56,11 @@ {{ 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..c37bcb4a28 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 }}