diff --git a/sites/all/modules/custom/features/f_candidate_details/f_candidate_details.features.inc b/sites/all/modules/custom/features/f_candidate_details/f_candidate_details.features.inc index 33653ed..0f7de13 100644 --- a/sites/all/modules/custom/features/f_candidate_details/f_candidate_details.features.inc +++ b/sites/all/modules/custom/features/f_candidate_details/f_candidate_details.features.inc @@ -8,6 +8,14 @@ * Implements hook_ctools_plugin_api(). */ function f_candidate_details_ctools_plugin_api() { + list($module, $api) = func_get_args(); + if ($module == "feeds" && $api == "feeds_importer_default") { + return array("version" => "1"); + } + list($module, $api) = func_get_args(); + if ($module == "feeds_tamper" && $api == "feeds_tamper_default") { + return array("version" => "2"); + } list($module, $api) = func_get_args(); if ($module == "page_manager" && $api == "pages_default") { return array("version" => "1"); diff --git a/sites/all/modules/custom/features/f_candidate_details/f_candidate_details.features.metatag.inc b/sites/all/modules/custom/features/f_candidate_details/f_candidate_details.features.metatag.inc new file mode 100644 index 0000000..fc84c1e --- /dev/null +++ b/sites/all/modules/custom/features/f_candidate_details/f_candidate_details.features.metatag.inc @@ -0,0 +1,24 @@ + 'node:ct_candidate_details', + 'config' => array( + 'title' => array( + 'value' => '[node:field_cd_name] | [node:field_cd_pc] Constituency Candidate | India Lok Sabha Elections 2014 | [site:name]', + ), + ), + ); + + return $config; +} diff --git a/sites/all/modules/custom/features/f_candidate_details/f_candidate_details.features.user_permission.inc b/sites/all/modules/custom/features/f_candidate_details/f_candidate_details.features.user_permission.inc index 6383c03..62a26ca 100644 --- a/sites/all/modules/custom/features/f_candidate_details/f_candidate_details.features.user_permission.inc +++ b/sites/all/modules/custom/features/f_candidate_details/f_candidate_details.features.user_permission.inc @@ -52,6 +52,13 @@ function f_candidate_details_user_default_permissions() { 'module' => 'panelizer', ); + // Exported permission: clear candidate_data_import feeds. + $permissions['clear candidate_data_import feeds'] = array( + 'name' => 'clear candidate_data_import feeds', + 'roles' => array(), + 'module' => 'feeds', + ); + // Exported permission: create ct_candidate_details content. $permissions['create ct_candidate_details content'] = array( 'name' => 'create ct_candidate_details content', @@ -87,6 +94,17 @@ function f_candidate_details_user_default_permissions() { 'module' => 'node', ); + // Exported permission: import candidate_data_import feeds. + $permissions['import candidate_data_import feeds'] = array( + 'name' => 'import candidate_data_import feeds', + 'roles' => array( + 'Administrator' => 'Administrator', + 'Content Approver' => 'Content Approver', + 'Content Author' => 'Content Author', + ), + 'module' => 'feeds', + ); + // Exported permission: publish any ct_candidate_details content. $permissions['publish any ct_candidate_details content'] = array( 'name' => 'publish any ct_candidate_details content', @@ -108,6 +126,22 @@ function f_candidate_details_user_default_permissions() { 'module' => 'publishcontent', ); + // Exported permission: tamper candidate_data_import. + $permissions['tamper candidate_data_import'] = array( + 'name' => 'tamper candidate_data_import', + 'roles' => array( + 'Administrator' => 'Administrator', + ), + 'module' => 'feeds_tamper', + ); + + // Exported permission: unlock candidate_data_import feeds. + $permissions['unlock candidate_data_import feeds'] = array( + 'name' => 'unlock candidate_data_import feeds', + 'roles' => array(), + 'module' => 'feeds', + ); + // Exported permission: unpublish any ct_candidate_details content. $permissions['unpublish any ct_candidate_details content'] = array( 'name' => 'unpublish any ct_candidate_details content', diff --git a/sites/all/modules/custom/features/f_candidate_details/f_candidate_details.feeds_importer_default.inc b/sites/all/modules/custom/features/f_candidate_details/f_candidate_details.feeds_importer_default.inc new file mode 100644 index 0000000..8f2f649 --- /dev/null +++ b/sites/all/modules/custom/features/f_candidate_details/f_candidate_details.feeds_importer_default.inc @@ -0,0 +1,118 @@ +disabled = FALSE; /* Edit this to true to make a default feeds_importer disabled initially */ + $feeds_importer->api_version = 1; + $feeds_importer->id = 'candidate_data_import'; + $feeds_importer->config = array( + 'name' => 'Candidate Data Import', + 'description' => '', + 'fetcher' => array( + 'plugin_key' => 'FeedsFileFetcher', + 'config' => array( + 'allowed_extensions' => 'txt csv tsv xml opml', + 'direct' => 0, + 'directory' => 'private://feeds', + 'allowed_schemes' => array( + 'public' => 'public', + 'private' => 'private', + ), + ), + ), + 'parser' => array( + 'plugin_key' => 'FeedsCSVParser', + 'config' => array( + 'delimiter' => ',', + 'no_headers' => 0, + ), + ), + 'processor' => array( + 'plugin_key' => 'FeedsNodeProcessor', + 'config' => array( + 'expire' => '-1', + 'author' => '1', + 'authorize' => 0, + 'mappings' => array( + 0 => array( + 'source' => 'name', + 'target' => 'field_cd_name', + 'unique' => FALSE, + ), + 1 => array( + 'source' => 'state', + 'target' => 'field_cd_state', + 'unique' => FALSE, + ), + 2 => array( + 'source' => 'loksabha', + 'target' => 'field_cd_pc', + 'unique' => FALSE, + ), + 3 => array( + 'source' => 'mobile', + 'target' => 'field_cd_phone', + 'unique' => FALSE, + ), + 4 => array( + 'source' => 'email', + 'target' => 'field_cd_email', + 'unique' => FALSE, + ), + 5 => array( + 'source' => 'gender', + 'target' => 'field_cd_gender', + 'unique' => FALSE, + ), + 6 => array( + 'source' => 'dob', + 'target' => 'field_cd_dob_text', + 'unique' => FALSE, + ), + 7 => array( + 'source' => 'education', + 'target' => 'field_cd_education_qualification', + 'unique' => FALSE, + ), + 8 => array( + 'source' => 'name', + 'target' => 'title', + 'unique' => FALSE, + ), + 9 => array( + 'source' => 'link', + 'target' => 'field_cd_links:url', + 'unique' => FALSE, + ), + 10 => array( + 'source' => 'linktitle', + 'target' => 'field_cd_links:title', + 'unique' => FALSE, + ), + ), + 'update_existing' => '0', + 'input_format' => 'plain_text', + 'skip_hash_check' => 0, + 'bundle' => 'ct_candidate_details', + ), + ), + 'content_type' => '', + 'update' => 0, + 'import_period' => '-1', + 'expire_period' => 3600, + 'import_on_create' => 1, + 'process_in_background' => 0, + ); + $export['candidate_data_import'] = $feeds_importer; + + return $export; +} diff --git a/sites/all/modules/custom/features/f_candidate_details/f_candidate_details.feeds_tamper_default.inc b/sites/all/modules/custom/features/f_candidate_details/f_candidate_details.feeds_tamper_default.inc new file mode 100644 index 0000000..05aee41 --- /dev/null +++ b/sites/all/modules/custom/features/f_candidate_details/f_candidate_details.feeds_tamper_default.inc @@ -0,0 +1,28 @@ +disabled = FALSE; /* Edit this to true to make a default feeds_tamper disabled initially */ + $feeds_tamper->api_version = 2; + $feeds_tamper->id = 'candidate_data_import-gender-convert_case'; + $feeds_tamper->importer = 'candidate_data_import'; + $feeds_tamper->source = 'gender'; + $feeds_tamper->plugin_id = 'convert_case'; + $feeds_tamper->settings = array( + 'mode' => '1', + ); + $feeds_tamper->weight = 0; + $feeds_tamper->description = 'Convert case'; + $export['candidate_data_import-gender-convert_case'] = $feeds_tamper; + + return $export; +} diff --git a/sites/all/modules/custom/features/f_candidate_details/f_candidate_details.info b/sites/all/modules/custom/features/f_candidate_details/f_candidate_details.info index 399ceeb..f34c59e 100644 --- a/sites/all/modules/custom/features/f_candidate_details/f_candidate_details.info +++ b/sites/all/modules/custom/features/f_candidate_details/f_candidate_details.info @@ -7,19 +7,27 @@ version = 7.x-1.0 project = f_candidate_details dependencies[] = ctools dependencies[] = f_site_controller +dependencies[] = features +dependencies[] = feeds +dependencies[] = feeds_tamper dependencies[] = image dependencies[] = link dependencies[] = list +dependencies[] = metatag dependencies[] = number dependencies[] = page_manager dependencies[] = panelizer dependencies[] = publishcontent dependencies[] = views +features[ctools][] = feeds:feeds_importer_default:1 +features[ctools][] = feeds_tamper:feeds_tamper_default:2 features[ctools][] = page_manager:pages_default:1 features[ctools][] = panelizer:panelizer:1 features[ctools][] = strongarm:strongarm:1 features[ctools][] = views:views_default:3.0 features[features_api][] = api:1 +features[feeds_importer][] = candidate_data_import +features[feeds_tamper][] = candidate_data_import-gender-convert_case features[field][] = node-ct_candidate_details-field_cd_address features[field][] = node-ct_candidate_details-field_cd_age features[field][] = node-ct_candidate_details-field_cd_dob_text @@ -37,6 +45,7 @@ features[field][] = node-ct_candidate_details-field_cd_profession_occupation features[field][] = node-ct_candidate_details-field_cd_special_category features[field][] = node-ct_candidate_details-field_cd_state features[field][] = node-ct_candidate_details-field_cd_state_text +features[metatag][] = node:ct_candidate_details features[node][] = ct_candidate_details features[page_manager_handlers][] = term_view_panel_context features[panelizer_defaults][] = node:ct_candidate_details:default:default @@ -48,14 +57,18 @@ features[user_permission][] = administer panelizer node ct_candidate_details def features[user_permission][] = administer panelizer node ct_candidate_details layout features[user_permission][] = administer panelizer node ct_candidate_details overview features[user_permission][] = administer panelizer node ct_candidate_details settings +features[user_permission][] = clear candidate_data_import feeds features[user_permission][] = create ct_candidate_details content features[user_permission][] = delete any ct_candidate_details content features[user_permission][] = delete own ct_candidate_details content features[user_permission][] = edit any ct_candidate_details content features[user_permission][] = edit own ct_candidate_details content +features[user_permission][] = import candidate_data_import feeds features[user_permission][] = publish any ct_candidate_details content features[user_permission][] = publish editable ct_candidate_details content features[user_permission][] = publish own ct_candidate_details content +features[user_permission][] = tamper candidate_data_import +features[user_permission][] = unlock candidate_data_import feeds features[user_permission][] = unpublish any ct_candidate_details content features[user_permission][] = unpublish editable ct_candidate_details content features[user_permission][] = unpublish own ct_candidate_details content diff --git a/sites/all/modules/custom/features/f_site_controller/f_site_controller.features.taxonomy.inc b/sites/all/modules/custom/features/f_site_controller/f_site_controller.features.taxonomy.inc index da9fc40..c21107e 100644 --- a/sites/all/modules/custom/features/f_site_controller/f_site_controller.features.taxonomy.inc +++ b/sites/all/modules/custom/features/f_site_controller/f_site_controller.features.taxonomy.inc @@ -17,14 +17,6 @@ function f_site_controller_taxonomy_default_vocabularies() { 'module' => 'taxonomy', 'weight' => '0', ), - 'vocab_pc' => array( - 'name' => 'Parliament Constituencies', - 'machine_name' => 'vocab_pc', - 'description' => 'List of Parliament Constituencies of India', - 'hierarchy' => '0', - 'module' => 'taxonomy', - 'weight' => '0', - ), 'vocab_states' => array( 'name' => 'States', 'machine_name' => 'vocab_states', diff --git a/sites/all/modules/custom/features/f_site_controller/f_site_controller.info b/sites/all/modules/custom/features/f_site_controller/f_site_controller.info index bfd30eb..e012d7f 100644 --- a/sites/all/modules/custom/features/f_site_controller/f_site_controller.info +++ b/sites/all/modules/custom/features/f_site_controller/f_site_controller.info @@ -2,6 +2,7 @@ name = Site Controller description = Holds site wide components and deployment related install hooks core = 7.x package = AAP Features +php = 5.2.4 version = 7.x-1.0 project = f_site_controller dependencies[] = ctools @@ -15,5 +16,5 @@ features[taxonomy][] = vocab_elections features[taxonomy][] = vocab_pc features[taxonomy][] = vocab_states features[variable][] = pathauto_taxonomy_term_vocab_elections_pattern -features[variable][] = pathauto_taxonomy_term_vocab_pc_pattern +features[variable][] = pathauto_taxonomy_term_vocab_ls_pattern features[variable][] = pathauto_taxonomy_term_vocab_states_pattern diff --git a/sites/all/modules/custom/features/f_site_controller/f_site_controller.strongarm.inc b/sites/all/modules/custom/features/f_site_controller/f_site_controller.strongarm.inc index 980435b..44d0064 100644 --- a/sites/all/modules/custom/features/f_site_controller/f_site_controller.strongarm.inc +++ b/sites/all/modules/custom/features/f_site_controller/f_site_controller.strongarm.inc @@ -20,15 +20,15 @@ function f_site_controller_strongarm() { $strongarm = new stdClass(); $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */ $strongarm->api_version = 1; - $strongarm->name = 'pathauto_taxonomy_term_vocab_pc_pattern'; - $strongarm->value = 'parliament-constituency/[term:name]'; - $export['pathauto_taxonomy_term_vocab_pc_pattern'] = $strongarm; + $strongarm->name = 'pathauto_taxonomy_term_vocab_ls_pattern'; + $strongarm->value = 'candidate-details-by-lok-sabha/[term:name]'; + $export['pathauto_taxonomy_term_vocab_ls_pattern'] = $strongarm; $strongarm = new stdClass(); $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */ $strongarm->api_version = 1; $strongarm->name = 'pathauto_taxonomy_term_vocab_states_pattern'; - $strongarm->value = 'state/[term:name]'; + $strongarm->value = 'candidate-details-by-state/[term:name]'; $export['pathauto_taxonomy_term_vocab_states_pattern'] = $strongarm; return $export;