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