if(strcmp(datetime_convert('UTC','UTC',$item['created']),datetime_convert('UTC','UTC','now - 12 hours')) > 0)
$indent .= ' shiny';
+
localize_item($item);
$body = prepare_body($item,true);
- list($categories, $folders) = get_cats_and_terms($item);
-
-
+ list($categories,$folders) = get_cats_and_terms($item);
$tmp_item = array(
// collapse comments in template. I don't like this much...
$body = prepare_body($item,true);
+
list($categories, $folders) = get_cats_and_terms($item);
//$tmp_item = replace_macros($tpl,array(
$tmp_item = array(
if (count($categories)) $categories[count($categories)-1]['last'] = true;
-
- $matches = false; $first = true;
- $cnt = preg_match_all('/\[(.*?)\]/',$item['file'],$matches,PREG_SET_ORDER);
- if($cnt) {
- foreach($matches as $mtch) {
- $folders[] = array(
- 'name' => xmlify(file_tag_decode($mtch[1])),
- 'url' => "#",
- 'removeurl' => ((local_user() == $item['uid'])?$a->get_baseurl() . '/filerm/' . $item['id'] . '?f=&term=' . xmlify(file_tag_decode($mtch[1])):""),
- 'first' => $first,
- 'last' => false
- );
- $first = false;
+ if(local_user() == $item['uid']) {
+ $matches = false; $first = true;
+ $cnt = preg_match_all('/\[(.*?)\]/',$item['file'],$matches,PREG_SET_ORDER);
+ if($cnt) {
+ foreach($matches as $mtch) {
+ $folders[] = array(
+ 'name' => xmlify(file_tag_decode($mtch[1])),
+ 'url' => "#",
+ 'removeurl' => ((local_user() == $item['uid'])?$a->get_baseurl() . '/filerm/' . $item['id'] . '?f=&term=' . xmlify(file_tag_decode($mtch[1])):""),
+ 'first' => $first,
+ 'last' => false
+ );
+ $first = false;
+ }
}
}
if (count($folders)) $folders[count($folders)-1]['last'] = true;
-
+
return array($categories, $folders);
}
'tags' => $tags,
'hashtags' => $hashtags,
'mentions' => $mentions,
+ 'txt_cats' => t('Categories:'),
+ 'txt_folders' => t('Filed under:'),
+ 'has_cats' => ((count($categories)) ? 'true' : ''),
+ 'has_folders' => ((count($folders)) ? 'true' : ''),
'categories' => $categories,
'folders' => $folders,
'body' => template_escape($body),
<div class="wall-item-title" id="wall-item-title-$item.id">$item.title</div>
<div class="wall-item-title-end"></div>
<div class="wall-item-body" id="wall-item-body-$item.id" >$item.body</div>
+ {{ if $item.has_cats }}
+ <div class="categorytags"><span>$item.txt_cats {{ for $item.categories as $cat }}$cat.name <a href="$cat.removeurl" title="$remove">[$remove]</a> {{ if $cat.last }}{{ else }}, {{ endif }}{{ endfor }}
+ </div>
+ {{ endif }}
+
+ {{ if $item.has_folders }}
+ <div class="filesavetags"><span>$item.txt_folders {{ for $item.folders as $cat }}$cat.name <a href="$cat.removeurl" title="$remove">[$remove]</a> {{ if $cat.last }}{{ else }}, {{ endif }}{{ endfor }}
+ </div>
+ {{ endif }}
</div>
<div class="wall-item-tools" id="wall-item-tools-$item.id">
<div class="wall-item-delete-wrapper" id="wall-item-delete-wrapper-$item.id" >
<span class='tag'>$tag</span>
{{ endfor }}
</div>
+ {{ if $item.has_cats }}
+ <div class="categorytags"><span>$item.txt_cats {{ for $item.categories as $cat }}$cat.name <a href="$cat.removeurl" title="$remove">[$remove]</a> {{ if $cat.last }}{{ else }}, {{ endif }}{{ endfor }}
+ </div>
+ {{ endif }}
+
+ {{ if $item.has_folders }}
+ <div class="filesavetags"><span>$item.txt_folders {{ for $item.folders as $cat }}$cat.name <a href="$cat.removeurl" title="$remove">[$remove]</a> {{ if $cat.last }}{{ else }}, {{ endif }}{{ endfor }}
+ </div>
+ {{ endif }}
</div>
</div>
<div class="wall-item-tools" id="wall-item-tools-$item.id">
<span class='tag'>$tag</span>
{{ endfor }}
</div>
+ {{ if $item.has_cats }}
+ <div class="categorytags"><span>$item.txt_cats {{ for $item.categories as $cat }}$cat.name <a href="$cat.removeurl" title="$remove">[$remove]</a> {{ if $cat.last }}{{ else }}, {{ endif }}{{ endfor }}
+ </div>
+ {{ endif }}
+
+ {{ if $item.has_folders }}
+ <div class="filesavetags"><span>$item.txt_folders {{ for $item.folders as $cat }}$cat.name <a href="$cat.removeurl" title="$remove">[$remove]</a> {{ if $cat.last }}{{ else }}, {{ endif }}{{ endfor }}
+ </div>
+ {{ endif }}
</div>
</div>
<div class="wall-item-tools" id="wall-item-tools-$item.id">
<span class='tag'>$tag</span>
{{ endfor }}
</div>
+ {{ if $item.has_cats }}
+ <div class="categorytags"><span>$item.txt_cats {{ for $item.categories as $cat }}$cat.name <a href="$cat.removeurl" title="$remove">[$remove]</a> {{ if $cat.last }}{{ else }}, {{ endif }}{{ endfor }}
+ </div>
+ {{ endif }}
+
+ {{ if $item.has_folders }}
+ <div class="filesavetags"><span>$item.txt_folders {{ for $item.folders as $cat }}$cat.name <a href="$cat.removeurl" title="$remove">[$remove]</a> {{ if $cat.last }}{{ else }}, {{ endif }}{{ endfor }}
+ </div>
+ {{ endif }}
</div>
</div>
<div class="wall-item-tools" id="wall-item-tools-$item.id">
<span class='tag'>$tag</span>
{{ endfor }}
</div>
+ {{ if $item.has_cats }}
+ <div class="categorytags"><span>$item.txt_cats {{ for $item.categories as $cat }}$cat.name <a href="$cat.removeurl" title="$remove">[$remove]</a> {{ if $cat.last }}{{ else }}, {{ endif }}{{ endfor }}
+ </div>
+ {{ endif }}
+
+ {{ if $item.has_folders }}
+ <div class="filesavetags"><span>$item.txt_folders {{ for $item.folders as $cat }}$cat.name <a href="$cat.removeurl" title="$remove">[$remove]</a> {{ if $cat.last }}{{ else }}, {{ endif }}{{ endfor }}
+ </div>
+ {{ endif }}
</div>
</div>
<div class="wall-item-tools" id="wall-item-tools-$item.id">