5 require_once('include/security.php');
6 require_once('include/bbcode.php');
7 require_once('include/items.php');
9 function filer_content(App $a) {
15 $term = unxmlify(trim($_GET['term']));
16 $item_id = (($a->argc > 1) ? intval($a->argv[1]) : 0);
18 logger('filer: tag ' . $term . ' item ' . $item_id);
20 if($item_id && strlen($term)){
22 file_tag_save_file(local_user(),$item_id,$term);
24 // return filer dialog
25 $filetags = get_pconfig(local_user(),'system','filetags');
26 $filetags = file_tag_file_to_list($filetags,'file');
27 $filetags = explode(",", $filetags);
29 $tpl = get_markup_template("filer_dialog.tpl");
30 $o = replace_macros($tpl, array(
31 '$field' => array('term', t("Save to Folder:"), '', '', $filetags, t('- select -')),
32 '$submit' => t('Save'),