<?php

/**
 * @file
 * mathsplain_feature.features.inc
 */

/**
 * Implements hook_commerce_tax_default_rates().
 */
function mathsplain_feature_commerce_tax_default_rates() {
  $items = array(
    '20_mwst' => array(
      'name' => '20_mwst',
      'display_title' => '20% MwSt',
      'description' => '',
      'rate' => '.2',
      'type' => 'vat',
      'rules_component' => 'commerce_tax_rate_20_mwst',
      'default_rules_component' => 1,
      'price_component' => 'tax|20_mwst',
      'calculation_callback' => 'commerce_tax_rate_calculate',
      'module' => 'commerce_tax_ui',
      'title' => '20% MwSt',
      'admin_list' => TRUE,
    ),
    'afa_0' => array(
      'name' => 'afa_0',
      'display_title' => 'Áfa 0% (AAM)',
      'description' => '',
      'rate' => 0,
      'type' => 'vat',
      'rules_component' => 'commerce_tax_rate_afa_0',
      'default_rules_component' => 1,
      'price_component' => 'tax|afa_0',
      'calculation_callback' => 'commerce_tax_rate_calculate',
      'module' => 'commerce_tax_ui',
      'title' => 'ÁFA 0% (AAM)',
      'admin_list' => TRUE,
    ),
    'afa_0_tam' => array(
      'name' => 'afa_0_tam',
      'display_title' => 'ÁFA 0% (TAM)',
      'description' => '',
      'rate' => 0,
      'type' => 'vat',
      'rules_component' => 'commerce_tax_rate_afa_0_tam',
      'default_rules_component' => 1,
      'price_component' => 'tax|afa_0_tam',
      'calculation_callback' => 'commerce_tax_rate_calculate',
      'module' => 'commerce_tax_ui',
      'title' => 'ÁFA 0% (TAM)',
      'admin_list' => TRUE,
    ),
  );
  return $items;
}

/**
 * Implements hook_commerce_tax_default_types().
 */
function mathsplain_feature_commerce_tax_default_types() {
  $items = array(
    'vat' => array(
      'name' => 'vat',
      'display_title' => 'ÁFA',
      'description' => 'Alapvető adónem, amelyet a megjelenített termékárak tartalmaznak.',
      'display_inclusive' => 1,
      'round_mode' => 1,
      'rule' => 'commerce_tax_type_vat',
      'module' => 'commerce_tax_ui',
      'title' => 'ÁFA',
      'admin_list' => TRUE,
    ),
  );
  return $items;
}

/**
 * Implements hook_ctools_plugin_api().
 */
function mathsplain_feature_ctools_plugin_api($module = NULL, $api = NULL) {
  if ($module == "captcha" && $api == "captcha") {
    return array("version" => "1");
  }
  if ($module == "ctools_custom_content" && $api == "ctools_content") {
    return array("version" => "1");
  }
  if ($module == "ds" && $api == "ds") {
    return array("version" => "1");
  }
  if ($module == "environment_indicator" && $api == "default_environment_indicator_environments") {
    return array("version" => "1");
  }
  if ($module == "field_group" && $api == "field_group") {
    return array("version" => "1");
  }
  if ($module == "flexslider" && $api == "flexslider_default_preset") {
    return array("version" => "1");
  }
  if ($module == "page_manager" && $api == "pages_default") {
    return array("version" => "1");
  }
  if ($module == "panels_mini" && $api == "panels_default") {
    return array("version" => "1");
  }
  if ($module == "strongarm" && $api == "strongarm") {
    return array("version" => "1");
  }
}

/**
 * Implements hook_views_api().
 */
function mathsplain_feature_views_api($module = NULL, $api = NULL) {
  return array("api" => "3.0");
}

/**
 * Implements hook_default_entityform_type().
 */
function mathsplain_feature_default_entityform_type() {
  $items = array();
  $items['contact'] = entity_import('entityform_type', '{
    "type" : "contact",
    "label" : "Contact",
    "data" : {
      "draftable" : 0,
      "draft_redirect_path" : "",
      "draft_button_text" : "",
      "draft_save_text" : { "value" : "", "format" : "swiffy" },
      "submit_button_text" : "Submit",
      "submit_confirm_msg" : "",
      "your_submissions" : "",
      "disallow_resubmit_msg" : "",
      "delete_confirm_msg" : "",
      "page_title_view" : "",
      "preview_page" : 0,
      "submission_page_title" : "Thanks",
      "submission_text" : {
        "value" : "\\u003Cp\\u003E\\u0026nbsp;\\u003C\\/p\\u003E\\r\\n\\r\\n\\u003Cp\\u003E\\u0026nbsp;\\u003C\\/p\\u003E\\r\\n",
        "format" : "full_html"
      },
      "submission_show_submitted" : 0,
      "submissions_view" : "default",
      "user_submissions_view" : "default",
      "form_status" : "ENTITYFORM_OPEN",
      "roles" : { "1" : "1", "2" : "2", "5" : 0, "4" : 0, "3" : 0 },
      "resubmit_action" : "new",
      "redirect_path" : "",
      "instruction_pre" : {
        "value" : "\\u003Cp\\u003EWe welcome any feedback or questions related to the website.\\u003C\\/p\\u003E\\r\\n",
        "format" : "full_html"
      }
    },
    "weight" : "0",
    "rdf_mapping" : [],
    "paths" : { "submit" : {
        "source" : "eform\\/submit\\/contact",
        "alias" : "contact",
        "language" : "und"
      }
    }
  }');
  $items['contact_at'] = entity_import('entityform_type', '{
    "type" : "contact_at",
    "label" : "Kontakt",
    "data" : {
      "draftable" : 0,
      "draft_redirect_path" : "",
      "draft_button_text" : "",
      "draft_save_text" : { "value" : "", "format" : "swiffy" },
      "submit_button_text" : "Einreichen",
      "submit_confirm_msg" : "",
      "your_submissions" : "",
      "disallow_resubmit_msg" : "",
      "delete_confirm_msg" : "",
      "page_title_view" : "",
      "preview_page" : 0,
      "submission_page_title" : "K\\u00f6sz\\u00f6nj\\u00fck!",
      "submission_text" : {
        "value" : "\\u003Cp\\u003EWir haben die Nachricht erhalten.\\u003C\\/p\\u003E\\r\\n\\r\\n\\u003Cp\\u003E\\u0026nbsp;\\u003C\\/p\\u003E\\r\\n",
        "format" : "full_html"
      },
      "submission_show_submitted" : 0,
      "submissions_view" : "default",
      "user_submissions_view" : "default",
      "form_status" : "ENTITYFORM_OPEN",
      "roles" : {
        "1" : "1",
        "2" : "2",
        "6" : 0,
        "7" : 0,
        "9" : 0,
        "5" : 0,
        "8" : 0,
        "12" : 0,
        "13" : 0,
        "11" : 0,
        "15" : 0,
        "10" : 0,
        "3" : 0,
        "16" : 0
      },
      "resubmit_action" : "new",
      "redirect_path" : "",
      "instruction_pre" : {
        "value" : "\\u003Cp\\u003EWir freuen uns \\u00fcber Kommentare oder Fragen zu dieser Seite.\\u003C\\/p\\u003E\\r\\n",
        "format" : "full_html"
      }
    },
    "weight" : "0",
    "rdf_mapping" : [],
    "paths" : { "submit" : {
        "source" : "eform\\/submit\\/contact-at",
        "alias" : "kontakt",
        "language" : "und"
      }
    }
  }');
  $items['contact_hu'] = entity_import('entityform_type', '{
    "type" : "contact_hu",
    "label" : "Kapcsolatfelv\\u00e9tel",
    "data" : {
      "draftable" : 0,
      "draft_redirect_path" : "",
      "draft_button_text" : "",
      "draft_save_text" : { "value" : "", "format" : "swiffy" },
      "submit_button_text" : "Bek\\u00fcld\\u00e9s",
      "submit_confirm_msg" : "",
      "your_submissions" : "",
      "disallow_resubmit_msg" : "",
      "delete_confirm_msg" : "",
      "page_title_view" : "",
      "preview_page" : 0,
      "submission_page_title" : "K\\u00f6sz\\u00f6nj\\u00fck!",
      "submission_text" : {
        "value" : "\\u003Cp\\u003EAz \\u00fczenetet megkaptuk!\\u003C\\/p\\u003E\\r\\n\\r\\n\\u003Cp\\u003E\\u0026nbsp;\\u003C\\/p\\u003E\\r\\n",
        "format" : "full_html"
      },
      "submission_show_submitted" : 0,
      "submissions_view" : "default",
      "user_submissions_view" : "default",
      "form_status" : "ENTITYFORM_OPEN",
      "roles" : { "1" : "1", "2" : "2", "5" : 0, "3" : 0, "4" : 0 },
      "resubmit_action" : "new",
      "redirect_path" : "",
      "instruction_pre" : {
        "value" : "\\u003Cp\\u003E\\u00d6r\\u00f6mmel fogadunk b\\u00e1rmilyen \\u00e9szrev\\u00e9telt, k\\u00e9rd\\u00e9st az oldallal kapcsolatban.\\u003C\\/p\\u003E\\r\\n",
        "format" : "full_html"
      }
    },
    "weight" : "0",
    "rdf_mapping" : [],
    "paths" : { "submit" : {
        "source" : "eform\\/submit\\/contact-hu",
        "alias" : "kapcsolat",
        "language" : "und"
      }
    }
  }');
  $items['teacher'] = entity_import('entityform_type', '{
    "type" : "teacher",
    "label" : "Tan\\u00e1ri hozz\\u00e1f\\u00e9r\\u00e9s ig\\u00e9nyl\\u00e9se",
    "data" : {
      "draftable" : 0,
      "draft_redirect_path" : "",
      "draft_button_text" : "",
      "draft_save_text" : { "value" : "", "format" : "full_html" },
      "submit_button_text" : "Bek\\u00fcld\\u00e9s",
      "submit_confirm_msg" : "",
      "your_submissions" : "",
      "disallow_resubmit_msg" : "",
      "delete_confirm_msg" : "",
      "page_title_view" : "Tan\\u00e1ri hozz\\u00e1f\\u00e9r\\u00e9s ig\\u00e9nyl\\u00e9se",
      "preview_page" : 0,
      "submission_page_title" : "K\\u00f6sz\\u00f6nj\\u00fck!",
      "submission_text" : {
        "value" : "\\u003Cp\\u003EK\\u00f6sz\\u00f6nj\\u00fck sz\\u00e9pen, hogy \\u00edrt\\u00e1l nek\\u00fcnk, igyeksz\\u00fcnk a lehet\\u0151 leghamarabb v\\u00e1laszolni.\\u003C\\/p\\u003E\\r\\n",
        "format" : "full_html"
      },
      "submission_show_submitted" : 0,
      "submissions_view" : "default",
      "user_submissions_view" : "default",
      "form_status" : "ENTITYFORM_OPEN",
      "roles" : {
        "1" : "1",
        "2" : "2",
        "4" : 0,
        "5" : 0,
        "3" : 0,
        "6" : 0,
        "8" : 0,
        "11" : 0,
        "7" : 0,
        "9" : 0,
        "10" : 0
      },
      "resubmit_action" : "new",
      "redirect_path" : "",
      "instruction_pre" : {
        "value" : "\\u003Cp\\u003ENagyon \\u00f6r\\u00fcl\\u00fcnk neki, hogy oktat\\u00f3k\\u00e9nt szeretn\\u00e9d haszn\\u00e1lni a mateking.hu weboldalt. B\\u00edzunk benne, hogy ak\\u00e1r \\u00e1ltal\\u00e1nos iskol\\u00e1ban, ak\\u00e1r k\\u00f6z\\u00e9piskol\\u00e1ban szeretn\\u00e9d a matekinget haszn\\u00e1lni, hat\\u00e9konyan fogjuk tudni seg\\u00edteni a munk\\u00e1dat.\\u003Cbr \\/\\u003E\\r\\nMit kell tenni ahhoz, hogy az oktat\\u00e1sban tan\\u00f3r\\u00e1kon haszn\\u00e1lni lehessen a mateking.hu tananyagait?\\u003Cbr \\/\\u003E\\r\\nIskol\\u00e1k sz\\u00e1m\\u00e1ra az iskol\\u00e1k tan\\u00e1rainak tan\\u00f3rai haszn\\u00e1latra a mateking tananyagait teljesen ingyenesen rendelkez\\u00e9sre bocs\\u00e1tjuk, mind\\u00f6ssze egyetlen teend\\u0151 van: az iskola hivatalos megkeres\\u00e9s\\u00e9re van sz\\u00fcks\\u00e9g\\u00fcnk az iskola vezet\\u0151s\\u00e9ge r\\u00e9sz\\u00e9r\\u0151l.\\u003Cbr \\/\\u003E\\r\\nHa iskol\\u00e1ban tan\\u00edt\\u00f3 tan\\u00e1r, vagy az int\\u00e9zm\\u00e9ny vezet\\u0151je vagy, k\\u00e9rj\\u00fck vedd fel vel\\u00fcnk a kapcsolatot az al\\u00e1bbi \\u0171rlap seg\\u00edts\\u00e9g\\u00e9vel, \\u00e9s seg\\u00edt\\u00fcnk.\\u003C\\/p\\u003E\\r\\n",
        "format" : "full_html"
      }
    },
    "weight" : "0",
    "rdf_mapping" : [],
    "paths" : { "submit" : {
        "source" : "eform\\/submit\\/teacher",
        "alias" : "tanari-jelentkezes",
        "language" : "und"
      }
    }
  }');
  return $items;
}

/**
 * Implements hook_flag_default_flags().
 */
function mathsplain_feature_flag_default_flags() {
  $flags = array();
  // Exported flag: "Understood".
  $flags['understood'] = array(
    'entity_type' => 'node',
    'title' => 'Understood',
    'global' => 0,
    'types' => array(
      0 => 'video',
    ),
    'flag_short' => 'Understood',
    'flag_long' => '',
    'flag_message' => '',
    'unflag_short' => 'Understood',
    'unflag_long' => '',
    'unflag_message' => '',
    'unflag_denied_text' => '',
    'link_type' => 'checkbox',
    'weight' => 0,
    'show_in_links' => array(
      'full' => 0,
      'teaser' => 0,
      'rss' => 0,
      'diff_standard' => 0,
      'exit_popup' => 0,
      'promobar' => 0,
      'question' => 0,
      'token' => 0,
      'revision' => 0,
    ),
    'show_as_field' => 0,
    'show_on_form' => 0,
    'access_author' => '',
    'show_contextual_link' => 0,
    'i18n' => 0,
    'module' => 'mathsplain_feature',
    'locked' => array(
      0 => 'name',
    ),
    'api_version' => 3,
  );
  return $flags;

}

/**
 * Implements hook_node_info().
 */
function mathsplain_feature_node_info() {
  $items = array(
    'article' => array(
      'name' => t('Article'),
      'base' => 'node_content',
      'description' => t('Use <em>articles</em> for time-sensitive content like news, press releases or blog posts.'),
      'has_title' => '1',
      'title_label' => t('Title'),
      'help' => '',
    ),
  );
  drupal_alter('node_info', $items);
  return $items;
}

/**
 * Implements hook_default_search_api_index().
 */
function mathsplain_feature_default_search_api_index() {
  $items = array();
  $items['default_node_index'] = entity_import('search_api_index', '{
    "name" : "Video index",
    "machine_name" : "default_node_index",
    "description" : "viktor k\\u00e9sz\\u00edtette a videok indexel\\u00e9s\\u00e9hez",
    "server" : "default_db_server",
    "item_type" : "node",
    "options" : {
      "index_directly" : 1,
      "cron_limit" : "50",
      "data_alter_callbacks" : {
        "search_api_alter_bundle_filter" : {
          "status" : 1,
          "weight" : "-10",
          "settings" : { "default" : "0", "bundles" : { "video" : "video" } }
        },
        "search_api_metatag_alter_callback" : { "status" : 0, "weight" : "0", "settings" : [] },
        "search_api_alter_add_url" : { "status" : 0, "weight" : "0", "settings" : [] },
        "search_api_alter_add_aggregation" : {
          "status" : 1,
          "weight" : "0",
          "settings" : { "fields" : { "search_api_aggregation_1" : {
                "name" : "Category weight",
                "type" : "first",
                "separator" : "\\n\\n",
                "fields" : [ "field_category:weight" ],
                "description" : "A Els\\u0151 aggregation of the following fields: Category \\u00bb S\\u00faly."
              }
            }
          }
        },
        "search_api_alter_add_viewed_entity" : { "status" : 0, "weight" : "0", "settings" : { "mode" : "full" } },
        "search_api_alter_add_hierarchy" : { "status" : 0, "weight" : "0", "settings" : { "fields" : [] } },
        "search_api_alter_language_control" : {
          "status" : 0,
          "weight" : "0",
          "settings" : { "lang_field" : "", "languages" : [] }
        },
        "search_api_alter_node_access" : { "status" : 0, "weight" : "0", "settings" : [] },
        "search_api_alter_node_status" : { "status" : 0, "weight" : "0", "settings" : [] }
      },
      "processors" : {
        "search_api_case_ignore" : {
          "status" : 1,
          "weight" : "0",
          "settings" : { "fields" : {
              "title" : true,
              "body:value" : true,
              "field_description:value" : true,
              "field_swiffy_entity:field_description:value" : true,
              "field_swiffy_entity:field_text_content:value" : true
            }
          }
        },
        "search_api_html_filter" : {
          "status" : 1,
          "weight" : "10",
          "settings" : {
            "fields" : {
              "title" : true,
              "body:value" : true,
              "field_description:value" : true,
              "field_swiffy_entity:field_description:value" : true,
              "field_swiffy_entity:field_text_content:value" : true
            },
            "title" : 0,
            "alt" : 1,
            "tags" : "h1 = 5\\r\\nh2 = 3\\r\\nh3 = 2\\r\\nstrong = 2\\r\\nb = 2\\r\\nem = 1.5\\r\\nu = 1.5"
          }
        },
        "search_api_transliteration" : {
          "status" : 0,
          "weight" : "15",
          "settings" : { "fields" : { "title" : true, "body:value" : true } }
        },
        "search_api_tokenizer" : {
          "status" : 1,
          "weight" : "20",
          "settings" : {
            "fields" : {
              "title" : true,
              "body:value" : true,
              "field_description:value" : true,
              "field_swiffy_entity:field_description:value" : true,
              "field_swiffy_entity:field_text_content:value" : true
            },
            "spaces" : "[^\\\\p{L}\\\\p{N}]",
            "ignorable" : "[-]"
          }
        },
        "search_api_stopwords" : {
          "status" : 0,
          "weight" : "30",
          "settings" : {
            "fields" : { "title" : true, "body:value" : true },
            "file" : "",
            "stopwords" : "but\\r\\ndid\\r\\nthe this that those\\r\\netc"
          }
        },
        "search_api_porter_stemmer" : {
          "status" : 0,
          "weight" : "35",
          "settings" : {
            "fields" : {
              "title" : true,
              "body:value" : true,
              "field_category:name" : true,
              "field_description:value" : true,
              "field_swiffy_entity:field_description:value" : true,
              "field_swiffy_entity:field_text_content:value" : true
            },
            "exceptions" : "texan=texa"
          }
        },
        "search_api_highlighting" : {
          "status" : 1,
          "weight" : "35",
          "settings" : {
            "prefix" : "\\u003Cstrong\\u003E",
            "suffix" : "\\u003C\\/strong\\u003E",
            "excerpt" : 1,
            "excerpt_length" : "256",
            "exclude_fields" : [],
            "highlight" : "always",
            "highlight_partial" : 0
          }
        }
      },
      "fields" : {
        "author" : { "type" : "integer", "entity_type" : "user" },
        "body:value" : { "type" : "text" },
        "field_category" : { "type" : "list\\u003Cinteger\\u003E", "entity_type" : "taxonomy_term" },
        "field_category:name" : { "type" : "list\\u003Ctext\\u003E" },
        "field_category:weight" : { "type" : "list\\u003Cinteger\\u003E" },
        "field_description:value" : { "type" : "text" },
        "field_swiffy_entity:field_description:value" : { "type" : "text" },
        "field_swiffy_entity:field_text_content:value" : { "type" : "text" },
        "search_api_aggregation_1" : { "type" : "integer" },
        "search_api_language" : { "type" : "string" },
        "status" : { "type" : "boolean" },
        "sticky" : { "type" : "boolean" },
        "title" : { "type" : "text", "boost" : "5.0" },
        "type" : { "type" : "string" }
      }
    },
    "enabled" : "1",
    "read_only" : "0",
    "rdf_mapping" : []
  }');
  return $items;
}
