Merge branch 'master', remote-tracking branch 'remotes/upstream/master'
* remotes/upstream/master: initial tag display for categories and save-to-file - suitable for testing but needs cleanup, links to delete term, and theming. * master:
This commit is contained in:
commit
1763a6c9c2
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue