zeros - theming for new categories/folder display
This commit is contained in:
parent
b661e61d6a
commit
054f8edb59
8 changed files with 67 additions and 17 deletions
|
|
@ -626,13 +626,12 @@ function prepare_threads_body($a, $items, $cmnt_tpl, $page_writeable, $mode, $pr
|
|||
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...
|
||||
|
|
@ -903,6 +902,7 @@ function conversation(&$a, $items, $mode, $update, $preview = false) {
|
|||
|
||||
$body = prepare_body($item,true);
|
||||
|
||||
|
||||
list($categories, $folders) = get_cats_and_terms($item);
|
||||
//$tmp_item = replace_macros($tpl,array(
|
||||
$tmp_item = array(
|
||||
|
|
|
|||
|
|
@ -1115,24 +1115,25 @@ function get_cats_and_terms($item) {
|
|||
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);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue