From aeb8a51330f15fb34b85e66f4ad0a2ce00636a8c Mon Sep 17 00:00:00 2001 From: Arslan Hassan Date: Thu, 10 May 2012 07:41:46 +0000 Subject: [PATCH] removed : custom fields --- .../plugins/custom_fields/custom_fields.php | 90 ------------------- .../custom_fields/install_custom_fields.php | 48 ---------- .../custom_fields/uninstall_custom_fields.php | 15 ---- 3 files changed, 153 deletions(-) delete mode 100644 upload/plugins/custom_fields/custom_fields.php delete mode 100644 upload/plugins/custom_fields/install_custom_fields.php delete mode 100644 upload/plugins/custom_fields/uninstall_custom_fields.php diff --git a/upload/plugins/custom_fields/custom_fields.php b/upload/plugins/custom_fields/custom_fields.php deleted file mode 100644 index 392d9650..00000000 --- a/upload/plugins/custom_fields/custom_fields.php +++ /dev/null @@ -1,90 +0,0 @@ -$attr) - { - - if($key=='name' || $key=='title') - { - if(empty($attr)) - e(sprintf(lang('cust_field_err'),$key)); - } - - if(!error_list()) - { - if(!empty($attr)) - { - $fields_array[] = 'custom_field_'.$key; - $value_array[] = mysql_clean($attr); - } - - if($key=='db_field') - { - $db->execute("ALTER TABLE ".tbl('video')." ADD `".$attr."` TEXT NOT NULL"); - } - } - - } - - if(!error_list()) - $db->insert(tbl("custom_fields"),$fields_array,$value_array); - } - - - /** - * Function used add fields in upload form - */ - function load_form_fields() - { - global $db; - $results = $db->select(tbl("custom_fields"),"*"); - if(count($results[0])>0) - { - foreach($results as $result) - { - $name = $result['custom_field_name']; - foreach($result as $field => $value) - { - $field_array[$name][substr($field,13,strlen($field))] = $value; - } - } - } - - if(count($field_array)>0) - return false; - return $field_array; - } - - - //Adding Admin Menu - add_admin_menu('Custom Fields','Add New Custom Field','add_custom_fields.php'); - add_admin_menu('Custom Fields','Manage Custom Fields','manage_custom_fields.php'); - - if(load_form_fields()) - register_custom_form_field(load_form_fields()); - -} - - -?> \ No newline at end of file diff --git a/upload/plugins/custom_fields/install_custom_fields.php b/upload/plugins/custom_fields/install_custom_fields.php deleted file mode 100644 index f9836952..00000000 --- a/upload/plugins/custom_fields/install_custom_fields.php +++ /dev/null @@ -1,48 +0,0 @@ -Execute( -"CREATE TABLE `clipbucket_svn`.`".tbl('custom_fields')."` ( -`custom_field_list_id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY , -`custom_field_title` TEXT NOT NULL , -`custom_field_type` TEXT NOT NULL , -`custom_field_name` TEXT NOT NULL , -`custom_field_id` TEXT NOT NULL , -`custom_field_value` TEXT NOT NULL , -`custom_field_hint_1` TEXT NOT NULL , -`custom_field_db_field` TEXT NOT NULL , -`custom_field_required` ENUM( 'yes', 'no' ) NOT NULL DEFAULT 'no', -`custom_field_validate_function` TEXT NOT NULL , -`custom_field_invalid_err` TEXT NOT NULL , -`custom_field_display_function` TEXT NOT NULL , -`custom_field_anchor_before` TEXT NOT NULL , -`custom_field_anchor_after` TEXT NOT NULL , -`custom_field_hint_2` TEXT NOT NULL , -`date_added` DATETIME NOT NULL -) ENGINE = MYISAM CHARACTER SET utf8 COLLATE utf8_general_ci;"); - - $db->Execute( -"INSERT INTO `".tbl('phrases')."` ( -`id` , -`lang_iso` , -`varname` , -`text` -) -VALUES ( -NULL , 'en', 'cust_field_err', 'Invalid \'%s\' field value' -)"); - -} -install_custom_fields(); - -?> \ No newline at end of file diff --git a/upload/plugins/custom_fields/uninstall_custom_fields.php b/upload/plugins/custom_fields/uninstall_custom_fields.php deleted file mode 100644 index 7c14ec7f..00000000 --- a/upload/plugins/custom_fields/uninstall_custom_fields.php +++ /dev/null @@ -1,15 +0,0 @@ -Execute("DELETE FROM ".tbl('phrases')." WHERE varname='cust_field_err'"); - $db->Execute("DROP TABLE `".tbl('custom_fields')."`"); -} -uninstall_embed_video_mode(); -?> \ No newline at end of file