Advertisement
Guest User

Untitled

a guest
Aug 18th, 2014
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 2.20 KB | None | 0 0
  1. <?php
  2. $finder = new finder();
  3. $finder->disabled = FALSE; /* Edit this to true to make a default finder disabled initially */
  4. $finder->api_version = 2;
  5. $finder->name = 'content_finder';
  6. $finder->views_view = 'finder_node';
  7. $finder->views_display = 'page_1';
  8. $finder->title = 'Поиск фильмов и сериалов';
  9. $finder->description = 'This is an example finder that finds nodes by title using an autocomplete element.';
  10. $finder->path = 'fsearch';
  11. $finder->block = TRUE;
  12. $finder->status = TRUE;
  13. $finder->settings = array(
  14.   'search_tab' => 'node',
  15.   'block' => TRUE,
  16.   'form_on_page' => TRUE,
  17.   'find_button' => 1,
  18.   'find_text' => 'Найти',
  19.   'go_button' => 0,
  20.   'go_text' => 'Go',
  21.   'ajax_effect' => 'none',
  22.   'show_results' => 'filter',
  23.   'results_style' => 'views',
  24.   'no_results' => 'configured',
  25.   'pager' => 10,
  26.   'redirect' => 'best',
  27.   'element_logic' => 'AND',
  28.   'url' => 'enabled',
  29.   'url_delimiter' => ',',
  30.   'ajax' => 0,
  31.   'ajax_remote' => 0,
  32.   'ajax_results_load' => 0,
  33.   'ajax_results_update' => 0,
  34.   'autosubmit' => 1,
  35.   'search' => '1',
  36.   'no_results_configured' => '<?php drupal_goto(\'node/123\') ?>',
  37.   'custom_results_style_render' => 1,
  38.   'results_style_views_format' => 0,
  39. );
  40. $finder->elements = array(
  41.   'title' => (object) array(
  42.     'id' => 'title',
  43.     'finder' => 'content_finder',
  44.     'settings' => array(
  45.       'field_logic' => 'OR',
  46.       'value_logic' => 'AND',
  47.       'match' => 'c',
  48.       'fields' => array(
  49.         'node.title' => (object) array(
  50.           'table' => 'node',
  51.           'field' => 'title',
  52.           'relationship' => NULL,
  53.         ),
  54.       ),
  55.       'max_suggestions' => 10,
  56.       'autocomplete_field_logic' => 'OR',
  57.       'autocomplete_value_logic' => 'OR',
  58.       'autocomplete_match' => 'c',
  59.       'sort' => 0,
  60.       'autocomplete_match_custom_operator' => '',
  61.       'autocomplete_match_custom_prefix' => '',
  62.       'autocomplete_match_custom_suffix' => '',
  63.       'match_custom_operator' => '',
  64.       'match_custom_prefix' => '',
  65.       'match_custom_suffix' => '',
  66.       'ajax_load' => 0,
  67.     ),
  68.     'title' => 'Название',
  69.     'element' => 'autocomplete',
  70.     'weight' => 0,
  71.     'parent' => '',
  72.   ),
  73. );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement