aboutsummaryrefslogtreecommitdiffstats
path: root/include/text.php
diff options
context:
space:
mode:
authorTobias Hößl <tobias@hoessl.eu>2012-03-13 18:34:15 +0000
committerTobias Hößl <tobias@hoessl.eu>2012-03-13 18:34:15 +0000
commit43430ef561a004aca8a9a28449e51e3885d39a9a (patch)
tree018927c54c16f68aeae7153c81c404d3e9cbbc7d /include/text.php
parent59766b944c9ea3a45b1d7e8593f7bb5d4a0b8445 (diff)
parent5a4167646553e589cf9647c0e0d0446e3f5fd672 (diff)
downloadvolse-hubzilla-43430ef561a004aca8a9a28449e51e3885d39a9a.tar.gz
volse-hubzilla-43430ef561a004aca8a9a28449e51e3885d39a9a.tar.bz2
volse-hubzilla-43430ef561a004aca8a9a28449e51e3885d39a9a.zip
Merge branch 'master' of git://github.com/friendica/friendica
Diffstat (limited to 'include/text.php')
-rw-r--r--include/text.php27
1 files changed, 27 insertions, 0 deletions
diff --git a/include/text.php b/include/text.php
index 011006b76..2663bdeba 100644
--- a/include/text.php
+++ b/include/text.php
@@ -913,6 +913,33 @@ function prepare_body($item,$attach = false) {
}
$s .= '<div class="clear"></div></div>';
}
+ $matches = false;
+ $cnt = preg_match_all('/<(.*?)>/',$item['file'],$matches,PREG_SET_ORDER);
+ if($cnt) {
+ logger('prepare_text: categories: ' . print_r($matches,true), LOGGER_DEBUG);
+ foreach($matches as $mtch) {
+ if(strlen($x))
+ $x .= ',';
+ $x .= file_tag_decode($mtch[1]);
+ }
+ if(strlen($x))
+ $s .= '<div class="categorytags"><span>' . t('Categories:') . ' </span>' . $x . '</div>';
+
+
+ }
+ $matches = 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);
+ foreach($matches as $mtch) {
+ if(strlen($x))
+ $x .= ',';
+ $x .= file_tag_decode($mtch[1]);
+ }
+ if(strlen($x) && (local_user() == $item['uid']))
+ $s .= '<div class="filesavetags"><span>' . t('Filed under:') . ' </span>' . $x . '</div>';
+ }
$prep_arr = array('item' => $item, 'html' => $s);