From c99e82bc378b67c6b1dccabc6d5da3220dcbb691 Mon Sep 17 00:00:00 2001 From: Paul Annekov Date: Sun, 11 Feb 2018 16:53:10 +0100 Subject: [PATCH] All: Add Relevanssi plugin, remove broken search algorithm Fixes #359 Closes #361 Closes #408 --- mu-plugins/_loader.php | 1 + mu-plugins/api-sites/search-weights.php | 42 - mu-plugins/relevanssi-install.php | 22 + mu-plugins/relevanssi/lib/cache.php | 77 + mu-plugins/relevanssi/lib/common.php | 701 ++++++++ .../relevanssi/lib/excerpts-highlights.php | 490 ++++++ mu-plugins/relevanssi/lib/indexing.php | 704 ++++++++ mu-plugins/relevanssi/lib/init.php | 250 +++ mu-plugins/relevanssi/lib/interface.php | 1400 ++++++++++++++++ mu-plugins/relevanssi/lib/search.php | 1185 ++++++++++++++ mu-plugins/relevanssi/lib/shortcodes.php | 40 + mu-plugins/relevanssi/lib/stopwords.php | 40 + mu-plugins/relevanssi/lib/uninstall.php | 32 + mu-plugins/relevanssi/readme.txt | 1101 +++++++++++++ mu-plugins/relevanssi/relevanssi-de_DE.po | 988 +++++++++++ mu-plugins/relevanssi/relevanssi-fr_FR.po | 1254 ++++++++++++++ mu-plugins/relevanssi/relevanssi-it_IT.po | 321 ++++ mu-plugins/relevanssi/relevanssi-pl_PL.po | 1452 +++++++++++++++++ mu-plugins/relevanssi/relevanssi-pt_BR.po | 578 +++++++ mu-plugins/relevanssi/relevanssi-ro_RO.po | 1123 +++++++++++++ mu-plugins/relevanssi/relevanssi-ru_RU.po | 1392 ++++++++++++++++ mu-plugins/relevanssi/relevanssi.php | 438 +++++ mu-plugins/relevanssi/relevanssi.po | 321 ++++ .../relevanssi/stopwords/stopwords.de_DE | 1037 ++++++++++++ .../relevanssi/stopwords/stopwords.en_GB | 323 ++++ .../relevanssi/stopwords/stopwords.en_US | 323 ++++ .../relevanssi/stopwords/stopwords.es_ES | 386 +++++ mu-plugins/relevanssi/stopwords/stopwords.fi | 365 +++++ .../relevanssi/stopwords/stopwords.fr_FR | 72 + .../relevanssi/stopwords/stopwords.pl_PL | 210 +++ .../relevanssi/stopwords/stopwords.pt_BR | 173 ++ .../relevanssi/stopwords/stopwords.pt_PT | 173 ++ .../relevanssi/stopwords/stopwords.ru_RU | 427 +++++ mu-plugins/relevanssi/uninstall.php | 80 + 34 files changed, 17479 insertions(+), 42 deletions(-) delete mode 100644 mu-plugins/api-sites/search-weights.php create mode 100644 mu-plugins/relevanssi-install.php create mode 100644 mu-plugins/relevanssi/lib/cache.php create mode 100644 mu-plugins/relevanssi/lib/common.php create mode 100644 mu-plugins/relevanssi/lib/excerpts-highlights.php create mode 100644 mu-plugins/relevanssi/lib/indexing.php create mode 100644 mu-plugins/relevanssi/lib/init.php create mode 100644 mu-plugins/relevanssi/lib/interface.php create mode 100644 mu-plugins/relevanssi/lib/search.php create mode 100644 mu-plugins/relevanssi/lib/shortcodes.php create mode 100644 mu-plugins/relevanssi/lib/stopwords.php create mode 100644 mu-plugins/relevanssi/lib/uninstall.php create mode 100644 mu-plugins/relevanssi/readme.txt create mode 100644 mu-plugins/relevanssi/relevanssi-de_DE.po create mode 100644 mu-plugins/relevanssi/relevanssi-fr_FR.po create mode 100644 mu-plugins/relevanssi/relevanssi-it_IT.po create mode 100644 mu-plugins/relevanssi/relevanssi-pl_PL.po create mode 100644 mu-plugins/relevanssi/relevanssi-pt_BR.po create mode 100644 mu-plugins/relevanssi/relevanssi-ro_RO.po create mode 100644 mu-plugins/relevanssi/relevanssi-ru_RU.po create mode 100644 mu-plugins/relevanssi/relevanssi.php create mode 100644 mu-plugins/relevanssi/relevanssi.po create mode 100644 mu-plugins/relevanssi/stopwords/stopwords.de_DE create mode 100644 mu-plugins/relevanssi/stopwords/stopwords.en_GB create mode 100644 mu-plugins/relevanssi/stopwords/stopwords.en_US create mode 100644 mu-plugins/relevanssi/stopwords/stopwords.es_ES create mode 100644 mu-plugins/relevanssi/stopwords/stopwords.fi create mode 100644 mu-plugins/relevanssi/stopwords/stopwords.fr_FR create mode 100644 mu-plugins/relevanssi/stopwords/stopwords.pl_PL create mode 100644 mu-plugins/relevanssi/stopwords/stopwords.pt_BR create mode 100644 mu-plugins/relevanssi/stopwords/stopwords.pt_PT create mode 100644 mu-plugins/relevanssi/stopwords/stopwords.ru_RU create mode 100644 mu-plugins/relevanssi/uninstall.php diff --git a/mu-plugins/_loader.php b/mu-plugins/_loader.php index d6b66c08..d38d5336 100644 --- a/mu-plugins/_loader.php +++ b/mu-plugins/_loader.php @@ -14,4 +14,5 @@ } unset( $live_domain, $subdomain, $domain_specific_file, $type_specific_file ); +require_once WPMU_PLUGIN_DIR . '/relevanssi/relevanssi.php'; require 'disable-emojis/disable-emojis.php'; diff --git a/mu-plugins/api-sites/search-weights.php b/mu-plugins/api-sites/search-weights.php deleted file mode 100644 index c598569d..00000000 --- a/mu-plugins/api-sites/search-weights.php +++ /dev/null @@ -1,42 +0,0 @@ -is_main_query() || ! $query->is_search() || - is_null( $query->query_vars[ 'search_term' ] ) ) { - return $posts; - } - - $priorities = array_fill( 0, 4, array() ); - - $search_terms = $query->query_vars['search_terms']; - $search_terms = array_map( 'strtolower', $search_terms ); - foreach ( $posts as $post ) { - if ( strtolower( $post->post_title ) === implode( ' ', $search_terms ) ) { - // Perfect title match: Priority 0. - $priorities[0][] = $post; - continue; - } - - foreach ( array( 1 => 'post_title', 2 => 'post_excerpt' ) as $priority => $field ) { - foreach ( $search_terms as $search_term ) { - // A search term is not present in the field, so move to the next field. - if ( false === stripos( $post->$field, $search_term ) ) - continue 2; - } - - // Found all matching terms in this field, so add it to the respective priority. - $priorities[ $priority ][] = $post; - continue 2; - } - - // No matches in a priority field, so assume the post got here via the content. - $priorities[3][] = $post; - } - - return array_merge( $priorities[0], $priorities[1], $priorities[2], $priorities[3] ); -}, 10, 2 ); \ No newline at end of file diff --git a/mu-plugins/relevanssi-install.php b/mu-plugins/relevanssi-install.php new file mode 100644 index 00000000..3e7f46f9 --- /dev/null +++ b/mu-plugins/relevanssi-install.php @@ -0,0 +1,22 @@ +query("DELETE FROM " . $relevanssi_variables['relevanssi_excerpt_cache'] . " WHERE post = $post"); +} + +function relevanssi_fetch_excerpt($post, $query) { + global $wpdb, $relevanssi_variables; + + $query = mysql_real_escape_string($query); + $excerpt = $wpdb->get_var("SELECT excerpt FROM " . $relevanssi_variables['relevanssi_excerpt_cache'] . " WHERE post = $post AND query = '$query'"); + + if (!$excerpt) return null; + + return $excerpt; +} + +function relevanssi_store_excerpt($post, $query, $excerpt) { + global $wpdb, $relevanssi_variables; + + $query = mysql_real_escape_string($query); + $excerpt = mysql_real_escape_string($excerpt); + + $wpdb->query("INSERT INTO " . $relevanssi_variables['relevanssi_excerpt_cache'] . " (post, query, excerpt) + VALUES ($post, '$query', '$excerpt') + ON DUPLICATE KEY UPDATE excerpt = '$excerpt'"); +} + +function relevanssi_fetch_hits($param) { + global $wpdb, $relevanssi_variables; + + $time = get_option('relevanssi_cache_seconds', 172800); + + $hits = $wpdb->get_var("SELECT hits FROM " . $relevanssi_variables['relevanssi_cache'] . " WHERE param = '$param' AND UNIX_TIMESTAMP() - UNIX_TIMESTAMP(tstamp) < $time"); + + if ($hits) { + return unserialize($hits); + } + else { + return null; + } +} + +function relevanssi_store_hits($param, $data) { + global $wpdb, $relevanssi_variables; + + $param = mysql_real_escape_string($param); + $data = mysql_real_escape_string($data); + $wpdb->query("INSERT INTO " . $relevanssi_variables['relevanssi_cache'] . " (param, hits) + VALUES ('$param', '$data') + ON DUPLICATE KEY UPDATE hits = '$data'"); +} + +function relevanssi_truncate_cache($all = false) { + global $wpdb, $relevanssi_variables; + $relevanssi_excerpt_cache = $relevanssi_variables['relevanssi_excerpt_cache']; + $relevanssi_cache = $relevanssi_variables['relevanssi_cache']; + + if ($all) { + $query = "TRUNCATE TABLE $relevanssi_excerpt_cache"; + $wpdb->query($query); + + $query = "TRUNCATE TABLE $relevanssi_cache"; + } + else { + $time = get_option('relevanssi_cache_seconds', 172800); + $query = "DELETE FROM $relevanssi_cache + WHERE UNIX_TIMESTAMP() - UNIX_TIMESTAMP(tstamp) > $time"; + // purge all expired cache data + } + $wpdb->query($query); +} + + +?> diff --git a/mu-plugins/relevanssi/lib/common.php b/mu-plugins/relevanssi/lib/common.php new file mode 100644 index 00000000..2649fbd8 --- /dev/null +++ b/mu-plugins/relevanssi/lib/common.php @@ -0,0 +1,701 @@ +blog_id)) { + switch_to_blog($hit->blog_id); + } + global $sitepress; + + if (function_exists('icl_object_id') && !function_exists('pll_is_translated_post_type')) { + if ($sitepress->is_translated_post_type($hit->post_type)) { + if ($hit->ID == icl_object_id($hit->ID, $hit->post_type, false, ICL_LANGUAGE_CODE)) $filtered_hits[] = $hit; + } + else { + $filtered_hits[] = $hit; + } + } + elseif (function_exists('icl_object_id') && function_exists('pll_is_translated_post_type')) { + if (pll_is_translated_post_type($hit->post_type)) { + global $polylang; + if ($polylang->model->get_post_language($hit->ID)->slug == ICL_LANGUAGE_CODE) { + $filtered_hits[] = $hit; + } + else if ($hit->ID == icl_object_id($hit->ID, $hit->post_type, false, ICL_LANGUAGE_CODE)) { + $filtered_hits[] = $hit; + } + } + else { + $filtered_hits[] = $hit; + } + } + + // if there is no WPML but the target blog has identical language with current blog, + // we use the hits. Note en-US is not identical to en-GB! + elseif (get_bloginfo('language') == $lang) { + $filtered_hits[] = $hit; + } + if (isset($hit->blog_id)) { + restore_current_blog(); + } + } + return array($filtered_hits, $data[1]); + } + return $data; +} + +/** + * Function by Matthew Hood http://my.php.net/manual/en/function.sort.php#75036 + */ +function relevanssi_object_sort(&$data, $key, $dir = 'desc') { + if ('title' == $key) $key = 'post_title'; + if ('date' == $key) $key = 'post_date'; + if (!isset($data[0]->$key)) return; // trying to sort by a non-existent key + $dir = strtolower($dir); + for ($i = count($data) - 1; $i >= 0; $i--) { + $swapped = false; + for ($j = 0; $j < $i; $j++) { + if (function_exists('mb_strtolower')) { + $key1 = mb_strtolower($data[$j]->$key); + $key2 = mb_strtolower($data[$j + 1]->$key); + } + else { + $key1 = strtolower($data[$j]->$key); + $key2 = strtolower($data[$j + 1]->$key); + } + if ('asc' == $dir) { + if ($key1 > $key2) { + $tmp = $data[$j]; + $data[$j] = $data[$j + 1]; + $data[$j + 1] = $tmp; + $swapped = true; + } + } + else { + if ($key1 < $key2) { + $tmp = $data[$j]; + $data[$j] = $data[$j + 1]; + $data[$j + 1] = $tmp; + $swapped = true; + } + } + } + if (!$swapped) return; + } +} + +function relevanssi_show_matches($data, $hit) { + isset($data['body_matches'][$hit]) ? $body = $data['body_matches'][$hit] : $body = ""; + isset($data['title_matches'][$hit]) ? $title = $data['title_matches'][$hit] : $title = ""; + isset($data['tag_matches'][$hit]) ? $tag = $data['tag_matches'][$hit] : $tag = ""; + isset($data['comment_matches'][$hit]) ? $comment = $data['comment_matches'][$hit] : $comment = ""; + isset($data['scores'][$hit]) ? $score = round($data['scores'][$hit], 2) : $score = 0; + isset($data['term_hits'][$hit]) ? $term_hits_a = $data['term_hits'][$hit] : $term_hits_a = array(); + arsort($term_hits_a); + $term_hits = ""; + $total_hits = 0; + foreach ($term_hits_a as $term => $hits) { + $term_hits .= " $term: $hits"; + $total_hits += $hits; + } + + $text = get_option('relevanssi_show_matches_text'); + $replace_these = array("%body%", "%title%", "%tags%", "%comments%", "%score%", "%terms%", "%total%"); + $replacements = array($body, $title, $tag, $comment, $score, $term_hits, $total_hits); + + $result = " " . str_replace($replace_these, $replacements, $text); + + return apply_filters('relevanssi_show_matches', $result); +} + +function relevanssi_update_log($query, $hits) { + if(isset($_SERVER['HTTP_USER_AGENT']) && $_SERVER['HTTP_USER_AGENT'] == "Mediapartners-Google") + return; + + global $wpdb, $relevanssi_variables; + + $user = wp_get_current_user(); + if ($user->ID != 0 && get_option('relevanssi_omit_from_logs')) { + $omit = explode(",", get_option('relevanssi_omit_from_logs')); + if (in_array($user->ID, $omit)) return; + if (in_array($user->user_login, $omit)) return; + } + + // Bot filter, by Justin_K + // See: http://wordpress.org/support/topic/bot-logging-problem-w-tested-solution + if (isset($_SERVER['HTTP_USER_AGENT'])) { + $user_agent = $_SERVER['HTTP_USER_AGENT']; + $bots = array('Google'=>'Mediapartners-Google'); + $bots = apply_filters('relevanssi_bots_to_not_log', $bots); + foreach ($bots as $name => $lookfor) { + if (stristr($user_agent, $lookfor) !== false) return; + } + } + + get_option('relevanssi_log_queries_with_ip') == "on" ? $ip = $_SERVER['REMOTE_ADDR'] : $ip = ''; + $q = $wpdb->prepare("INSERT INTO " . $relevanssi_variables['log_table'] . " (query, hits, user_id, ip, time) VALUES (%s, %d, %d, %s, NOW())", $query, intval($hits), $user->ID, $ip); + $wpdb->query($q); +} + +/** + * Do note that while this function takes $post_ok as a parameter, it actually doesn't care much + * about the previous value, and will instead overwrite it. If you want to make sure your value + * is preserved, either disable this default function, or run your function on a later priority + * (this defaults to 10). + */ +function relevanssi_default_post_ok($post_ok, $doc) { + $status = relevanssi_get_post_status($doc); + + // if it's not public, don't show + if ('publish' != $status) { + $post_ok = false; + } + + // ...unless + + if ('private' == $status) { + $post_ok = false; + + if (function_exists('awp_user_can')) { + // Role-Scoper, though Role-Scoper actually uses a different function to do this + // So whatever is in here doesn't actually run. + $current_user = wp_get_current_user(); + $post_ok = awp_user_can('read_post', $doc, $current_user->ID); + } + else { + // Basic WordPress version + $type = relevanssi_get_post_type($doc); + $cap = 'read_private_' . $type . 's'; + $cap = apply_filters('relevanssi_private_cap', $cap); + if (current_user_can($cap)) { + $post_ok = true; + } + } + } + + // only show drafts, pending and future posts in admin search + if (in_array($status, array('draft', 'pending', 'future')) && is_admin()) { + $post_ok = true; + } + + if (relevanssi_s2member_level($doc) == 0) $post_ok = false; // not ok with s2member + + return $post_ok; +} + +/** + * Return values: + * 2: full access to post + * 1: show title only + * 0: no access to post + * -1: s2member not active + */ +function relevanssi_s2member_level($doc) { + $return = -1; + if (function_exists('is_permitted_by_s2member')) { + // s2member + $alt_view_protect = $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["filter_wp_query"]; + + if (version_compare (WS_PLUGIN__S2MEMBER_VERSION, "110912", ">=")) + $completely_hide_protected_search_results = (in_array ("all", $alt_view_protect) || in_array ("searches", $alt_view_protect)) ? true : false; + else /* Backward compatibility with versions of s2Member, prior to v110912. */ + $completely_hide_protected_search_results = (strpos ($alt_view_protect, "all") !== false || strpos ($alt_view_protect, "searches") !== false) ? true : false; + + if (is_permitted_by_s2member($doc)) { + // Show title and excerpt, even full content if you like. + $return = 2; + } + else if (!is_permitted_by_s2member($doc) && $completely_hide_protected_search_results === false) { + // Show title and excerpt. Alt View Protection is NOT enabled for search results. However, do NOT show full content body. + $return = 1; + } + else { + // Hide this search result completely. + $return = 0; + } + } + + return $return; +} + +function relevanssi_populate_array($matches) { + global $relevanssi_post_array, $relevanssi_post_types, $wpdb; + if (function_exists('wp_suspend_cache_addition')) + wp_suspend_cache_addition(true); + + $ids = array(); + foreach ($matches as $match) { + array_push($ids, $match->doc); + } + + $ids = implode(',', $ids); + $posts = $wpdb->get_results("SELECT * FROM $wpdb->posts WHERE id IN ($ids)"); + foreach ($posts as $post) { + $relevanssi_post_array[$post->ID] = $post; + $relevanssi_post_types[$post->ID] = $post->post_type; + } + + if (function_exists('wp_suspend_cache_addition')) + wp_suspend_cache_addition(false); +} + +function relevanssi_get_term_taxonomy($id) { + global $wpdb; + $taxonomy = $wpdb->get_var("SELECT taxonomy FROM $wpdb->term_taxonomy WHERE term_id = $id"); + return $taxonomy; +} + +/** + * Extracts phrases from search query + * Returns an array of phrases + */ +function relevanssi_extract_phrases($q) { + if ( function_exists( 'mb_strpos' ) ) + $pos = mb_strpos($q, '"'); + else + $pos = strpos($q, '"'); + + $phrases = array(); + while ($pos !== false) { + $start = $pos; + if ( function_exists( 'mb_strpos' ) ) + $end = mb_strpos($q, '"', $start + 1); + else + $end = strpos($q, '"', $start + 1); + + if ($end === false) { + // just one " in the query + $pos = $end; + continue; + } + if ( function_exists( 'mb_substr' ) ) + $phrase = mb_substr($q, $start + 1, $end - $start - 1); + else + $phrase = substr($q, $start + 1, $end - $start - 1); + + $phrase = trim($phrase); + + if (!empty($phrase)) $phrases[] = $phrase; + $pos = $end; + } + return $phrases; +} + +/* If no phrase hits are made, this function returns an empty string + * If phrase matches are found, the function returns MySQL queries + */ +function relevanssi_recognize_phrases($q) { + global $wpdb; + + $phrases = relevanssi_extract_phrases($q); + + $all_queries = array(); + if (count($phrases) > 0) { + foreach ($phrases as $phrase) { + $queries = array(); + $phrase = esc_sql($phrase); + "on" == get_option("relevanssi_index_excerpt") ? $excerpt = " OR post_excerpt LIKE '%$phrase%'" : $excerpt = ""; + $query = "(SELECT ID FROM $wpdb->posts + WHERE (post_content LIKE '%$phrase%' OR post_title LIKE '%$phrase%' $excerpt) + AND post_status IN ('publish', 'draft', 'private', 'pending', 'future', 'inherit'))"; + + $queries[] = $query; + + $query = "(SELECT ID FROM $wpdb->posts as p, $wpdb->term_relationships as r, $wpdb->term_taxonomy as s, $wpdb->terms as t + WHERE r.term_taxonomy_id = s.term_taxonomy_id AND s.term_id = t.term_id AND p.ID = r.object_id + AND t.name LIKE '%$phrase%' AND p.post_status IN ('publish', 'draft', 'private', 'pending', 'future', 'inherit'))"; + + $queries[] = $query; + + $query = "(SELECT ID + FROM $wpdb->posts AS p, $wpdb->postmeta AS m + WHERE p.ID = m.post_id + AND m.meta_value LIKE '%$phrase%' + AND p.post_status IN ('publish', 'draft', 'private', 'pending', 'future', 'inherit'))"; + + $queries[] = $query; + + $queries = implode(' OR relevanssi.doc IN ', $queries); + $queries = "AND (relevanssi.doc IN $queries)"; + $all_queries[] = $queries; + } + } + else { + $phrases = ""; + } + + $all_queries = implode(" ", $all_queries); + + return $all_queries; +} + +// found here: http://forums.digitalpoint.com/showthread.php?t=1106745 +function relevanssi_strip_invisibles($text) { + $text = preg_replace( + array( + '@]*?>.*?@siu', + '@]*?.*?@siu', + '@]*?.*?@siu', + '@]*?.*?@siu', + '@]*?.*?@siu', + '@]*?.*?@siu', + '@]*?.*?@siu', + '@]*?.*?@siu', + '@]*?.*?@siu', + ), + ' ', + $text ); + return $text; +} + +function relevanssi_strlen_sort($a, $b) { + return strlen($b) - strlen($a); +} + +function relevanssi_get_custom_fields() { + $custom_fields = get_option("relevanssi_index_fields"); + if ($custom_fields) { + if ($custom_fields == 'all') { + return $custom_fields; + } + else if ($custom_fields == 'visible') { + return $custom_fields; + } + else { + $custom_fields = explode(",", $custom_fields); + for ($i = 0; $i < count($custom_fields); $i++) { + $custom_fields[$i] = trim($custom_fields[$i]); + } + } + } + else { + $custom_fields = false; + } + return $custom_fields; +} + +function relevanssi_mb_trim($string) { + $string = str_replace(chr(194) . chr(160), '', $string); + $string = preg_replace( "/(^\s+)|(\s+$)/us", "", $string ); + return $string; +} + +function relevanssi_remove_punct($a) { + $a = strip_tags($a); + $a = stripslashes($a); + + $a = str_replace('ß', 'ss', $a); + + $a = str_replace("·", '', $a); + $a = str_replace("…", '', $a); + $a = str_replace("€", '', $a); + $a = str_replace("­", '', $a); + + $a = str_replace(chr(194) . chr(160), ' ', $a); + $a = str_replace(" ", ' ', $a); + $a = str_replace('’', ' ', $a); + $a = str_replace("'", ' ', $a); + $a = str_replace("’", ' ', $a); + $a = str_replace("‘", ' ', $a); + $a = str_replace("”", ' ', $a); + $a = str_replace("“", ' ', $a); + $a = str_replace("„", ' ', $a); + $a = str_replace("´", ' ', $a); + $a = str_replace("—", ' ', $a); + $a = str_replace("–", ' ', $a); + $a = str_replace("×", ' ', $a); + $a = preg_replace('/[[:punct:]]+/u', ' ', $a); + + $a = preg_replace('/[[:space:]]+/', ' ', $a); + $a = trim($a); + + return $a; +} + + +/** + * This function will prevent the default search from running, when Relevanssi is + * active. + * Thanks to John Blackbourne. + */ +function relevanssi_prevent_default_request( $request, $query ) { + if ($query->is_search) { + global $wpdb; + if (isset($query->query_vars['post_type']) && isset($query->query_vars['post_status'])) { + if ($query->query_vars['post_type'] == 'attachment' && $query->query_vars['post_status'] == 'inherit,private') { + // this is a media library search; do not meddle + return $request; + } + } + $bbpress = false; + if ($query->query_vars['post_type'] == 'topic' || $query->query_vars['post_type'] == 'reply') $bbpress = true; + if (is_array($query->query_vars['post_type'])) { + if (in_array('topic', $query->query_vars['post_type'])) $bbpress = true; + if (in_array('reply', $query->query_vars['post_type'])) $bbpress = true; + } + if ($bbpress) { + // this is a BBPress search; do not meddle + return $request; + } + $admin_search_ok = true; + $admin_search_ok = apply_filters('relevanssi_admin_search_ok', $admin_search_ok, $query ); + + $prevent = true; + $prevent = apply_filters('relevanssi_prevent_default_request', $prevent, $query ); + + if (!is_admin() && $prevent ) + $request = "SELECT * FROM $wpdb->posts WHERE 1=2"; + else if ('on' == get_option('relevanssi_admin_search') && $admin_search_ok ) + $request = "SELECT * FROM $wpdb->posts WHERE 1=2"; + } + return $request; +} + +function relevanssi_tokenize($str, $remove_stops = true, $min_word_length = -1) { + $tokens = array(); + if (is_array($str)) { + foreach ($str as $part) { + $tokens = array_merge($tokens, relevanssi_tokenize($part, $remove_stops, $min_word_length)); + } + } + if (is_array($str)) return $tokens; + + if ( function_exists('mb_internal_encoding') ) + mb_internal_encoding("UTF-8"); + + if ($remove_stops) { + $stopword_list = relevanssi_fetch_stopwords(); + } + + if (function_exists('relevanssi_thousandsep')) { + $str = relevanssi_thousandsep($str); + } + + $str = apply_filters('relevanssi_remove_punctuation', $str); + + if ( function_exists('mb_strtolower') ) + $str = mb_strtolower($str); + else + $str = strtolower($str); + + $t = strtok($str, "\n\t "); + while ($t !== false) { + $t = strval($t); + $accept = true; + if (strlen($t) < $min_word_length) { + $t = strtok("\n\t "); + continue; + } + if ($remove_stops == false) { + $accept = true; + } + else { + if (count($stopword_list) > 0) { //added by OdditY -> got warning when stopwords table was empty + if (in_array($t, $stopword_list)) { + $accept = false; + } + } + } + + if (RELEVANSSI_PREMIUM) { + $t = apply_filters('relevanssi_premium_tokenizer', $t); + } + + if ($accept) { + $t = relevanssi_mb_trim($t); + if (is_numeric($t)) $t = " $t"; // $t ends up as an array index, and numbers just don't work there + if (!isset($tokens[$t])) { + $tokens[$t] = 1; + } + else { + $tokens[$t]++; + } + } + + $t = strtok("\n\t "); + } + return $tokens; +} + +function relevanssi_get_post_status($id) { + global $relevanssi_post_array; + + $type = substr($id, 0, 2); + if ($type == '**') { + return 'publish'; + } + if ($type == 'u_') { + return 'publish'; + } + + if (isset($relevanssi_post_array[$id])) { + $status = $relevanssi_post_array[$id]->post_status; + if ('inherit' == $status) { + $parent = $relevanssi_post_array[$id]->post_parent; + $status = relevanssi_get_post_status($parent); + if ($status == false) { + // attachment without a parent + // let's assume it's public + $status = 'publish'; + } + } + return $status; + } + else { + return get_post_status($id); + } +} + +function relevanssi_get_post_type($id) { + global $relevanssi_post_array; + + if (isset($relevanssi_post_array[$id])) { + return $relevanssi_post_array[$id]->post_type; + } + else { + return get_post_type($id); + } +} + +function relevanssi_the_tags($sep = ', ', $echo = true) { + $tags = relevanssi_highlight_terms(get_the_tag_list('', $sep), get_search_query()); + if ($echo) { + echo $tags; + } + else { + return $tags; + } +} + +function relevanssi_get_the_tags($sep = ', ') { + return relevanssi_the_tags($sep, false); +} + +function relevanssi_get_term_tax_id($field, $id, $taxonomy) { + global $wpdb; + return $wpdb->get_var( + "SELECT term_taxonomy_id + FROM $wpdb->term_taxonomy + WHERE term_id = $id AND taxonomy = '$taxonomy'"); +} + +/** + * Takes in a search query, returns it with synonyms added. + */ +function relevanssi_add_synonyms($q) { + if (empty($q)) return $q; + + $synonym_data = get_option('relevanssi_synonyms'); + if ($synonym_data) { + $synonyms = array(); + if (function_exists('mb_strtolower')) { + $synonym_data = mb_strtolower($synonym_data); + } + else { + $synonym_data = strtolower($synonym_data); + } + $pairs = explode(";", $synonym_data); + foreach ($pairs as $pair) { + $parts = explode("=", $pair); + $key = strval(trim($parts[0])); + $value = trim($parts[1]); + $synonyms[$key][$value] = true; + } + if (count($synonyms) > 0) { + $new_terms = array(); + $terms = array_keys(relevanssi_tokenize($q, false)); // remove stopwords is false here + if (!in_array($q, $terms)) $terms[] = $q; + + foreach ($terms as $term) { + if (in_array(strval($term), array_keys($synonyms))) { // strval, otherwise numbers cause problems + if (isset($synonyms[strval($term)])) { // necessary, otherwise terms like "02" can cause problems + $new_terms = array_merge($new_terms, array_keys($synonyms[strval($term)])); + } + } + } + if (count($new_terms) > 0) { + foreach ($new_terms as $new_term) { + $q .= " $new_term"; + } + } + } + } + return $q; +} + +/* Helper function that does mb_stripos, falls back to mb_strpos and mb_strtoupper + * if that cannot be found, and falls back to just strpos if even that is not possible. + */ +function relevanssi_stripos($content, $term, $offset) { + if (function_exists('mb_strlen')) { + if ($offset > mb_strlen($content)) return false; + } + else { + if ($offset > strlen($content)) return false; + } + if (function_exists('mb_stripos')) { + $pos = ("" == $content) ? false : mb_stripos($content, $term, $offset); + } + else if (function_exists('mb_strpos') && function_exists('mb_strtoupper') && function_exists('mb_substr')) { + $pos = mb_strpos(mb_strtoupper($content), mb_strtoupper($term), $offset); + } + else { + $pos = strpos(strtoupper($content), strtoupper($term), $offset); + } + return $pos; +} + +/* Function to close tags in a bit of HTML code. Used to make sure no tags are left open + * in excerpts. This method is not foolproof, but it's good enough for now. + */ +function relevanssi_close_tags($html) { + preg_match_all('#<(?!meta|img|br|hr|input\b)\b([a-z]+)(?: .*)?(?#iU', $html, $result); + $openedtags = $result[1]; + preg_match_all('##iU', $html, $result); + $closedtags = $result[1]; + $len_opened = count($openedtags); + if (count($closedtags) == $len_opened) { + return $html; + } + $openedtags = array_reverse($openedtags); + for ($i=0; $i < $len_opened; $i++) { + if (!in_array($openedtags[$i], $closedtags)) { + $html .= ''; + } else { + unset($closedtags[array_search($openedtags[$i], $closedtags)]); + } + } + return $html; +} + +/* Prints out post title with highlighting. + */ +function relevanssi_the_title() { + global $post; + if (empty($post->post_highlighted_title)) $post->post_highlighted_title = $post->post_title; + echo $post->post_highlighted_title; +} + +/* Returns the post title with highlighting. + */ +function relevanssi_get_the_title($post_id) { + $post = get_post($post_id); + if (empty($post->post_highlighted_title)) $post->post_highlighted_title = $post->post_title; + return $post->post_highlighted_title; +} + +function relevanssi_update_doc_count( $values, $post ) { + $D = get_option( 'relevanssi_doc_count'); + $count = count($values); + if ($values && $count > 0) { + update_option( 'relevanssi_doc_count', $D + $count); + } + return $values; +} +?> diff --git a/mu-plugins/relevanssi/lib/excerpts-highlights.php b/mu-plugins/relevanssi/lib/excerpts-highlights.php new file mode 100644 index 00000000..fd9b11b3 --- /dev/null +++ b/mu-plugins/relevanssi/lib/excerpts-highlights.php @@ -0,0 +1,490 @@ +" . $post->post_excerpt . "

"; + } + else { + echo __('There is no excerpt because this is a protected post.'); + } +} + +function relevanssi_do_excerpt($t_post, $query) { + global $post; + $old_global_post = NULL; + if ($post != NULL) $old_global_post = $post; + $post = $t_post; + + $remove_stopwords = false; + $terms = relevanssi_tokenize($query, $remove_stopwords, -1); + + // These shortcodes cause problems with Relevanssi excerpts + remove_shortcode('layerslider'); + + $content = apply_filters('relevanssi_pre_excerpt_content', $post->post_content, $post, $query); + $content = apply_filters('the_content', $content); + $content = apply_filters('relevanssi_excerpt_content', $content, $post, $query); + + $content = relevanssi_strip_invisibles($content); // removes , &c with content + $content = preg_replace('/(<\/[^>]+?>)(<[^>\/][^>]*?>)/', '$1 $2', $content); // add spaces between tags to avoid getting words stuck together + $content = strip_tags($content, get_option('relevanssi_excerpt_allowable_tags', '')); // this removes the tags, but leaves the content + + $content = preg_replace("/\n\r|\r\n|\n|\r/", " ", $content); +// $content = trim(preg_replace("/\s\s+/", " ", $content)); + + $query = relevanssi_add_synonyms($query); + + $excerpt_data = relevanssi_create_excerpt($content, $terms, $query); + + if (get_option("relevanssi_index_comments") != 'none') { + $comment_content = relevanssi_get_comments($post->ID); + $comment_content = preg_replace('/(<\/[^>]+?>)(<[^>\/][^>]*?>)/', '$1 $2', $comment_content); // add spaces between tags to avoid getting words stuck together + $comment_content = strip_tags($comment_content, get_option('relevanssi_excerpt_allowable_tags', '')); // this removes the tags, but leaves the content + if (!empty($comment_content)) { + $comment_excerpts = relevanssi_create_excerpt($comment_content, $terms, $query); + if ($comment_excerpts[1] > $excerpt_data[1]) { + $excerpt_data = $comment_excerpts; + } + } + } + + if (get_option("relevanssi_index_excerpt") != 'off') { + $excerpt_content = $post->post_excerpt; + if (!empty($excerpt_content)) { + $excerpt_excerpts = relevanssi_create_excerpt($excerpt_content, $terms, $query); + if ($excerpt_excerpts[1] > $excerpt_data[1]) { + $excerpt_data = $excerpt_excerpts; + } + } + } + + $start = $excerpt_data[2]; + + $excerpt = $excerpt_data[0]; + $excerpt = trim($excerpt); + $excerpt = apply_filters('relevanssi_excerpt', $excerpt); + + $ellipsis = apply_filters('relevanssi_ellipsis', '...'); + + $highlight = get_option('relevanssi_highlight'); + if ("none" != $highlight) { + if (!is_admin()) { + $query = relevanssi_add_synonyms($query); + $excerpt = relevanssi_highlight_terms($excerpt, $query); + } + } + + $excerpt = relevanssi_close_tags($excerpt); + + if (!$start && !empty($excerpt)) { + $excerpt = $ellipsis . $excerpt; + // do not add three dots to the beginning of the post + } + + if (!empty($excerpt)) + $excerpt = $excerpt . $ellipsis; + + if (relevanssi_s2member_level($post->ID) == 1) $excerpt = $post->post_excerpt; + + if ($old_global_post != NULL) $post = $old_global_post; + + return $excerpt; +} + +/** + * Creates an excerpt from content. + * + * @return array - element 0 is the excerpt, element 1 the number of term hits, element 2 is + * true, if the excerpt is from the start of the content. + */ +function relevanssi_create_excerpt($content, $terms, $query) { + // If you need to modify these on the go, use 'pre_option_relevanssi_excerpt_length' filter. + $excerpt_length = get_option("relevanssi_excerpt_length"); + $type = get_option("relevanssi_excerpt_type"); + + $best_excerpt_term_hits = -1; + $excerpt = ""; + + $content = " $content"; + + $phrases = relevanssi_extract_phrases(stripslashes($query)); + + $non_phrase_terms = array(); + foreach ($phrases as $phrase) { + $phrase_terms = array_keys(relevanssi_tokenize($phrase, $remove_stopwords = false)); + foreach (array_keys($terms) as $term) { + if (!in_array($term, $phrase_terms)) { + $non_phrase_terms[] = $term; + } + } + + $terms = $non_phrase_terms; + $terms[$phrase] = 1; + } + + uksort($terms, 'relevanssi_strlen_sort'); + + $start = false; + if ("chars" == $type) { + $term_positions = array(); + foreach (array_keys($terms) as $term) { + $term = trim($term); + $term_key = $term; + get_option('relevanssi_fuzzy') != 'none' ? $term = "$term" : $term = " $term"; + + $pos = 0; + $n = 0; + while (false !== $pos) { + $pos = relevanssi_stripos($content, $term, $pos); + if (false !== $pos) { + $term_positions[$pos] = $term_key; + function_exists('mb_strlen') ? $pos = $pos + mb_strlen($term) : $pos = $pos + strlen(utf8_decode($term)); + } + } + } + ksort($term_positions); + $positions = array_keys($term_positions); + $best_position = 0; + $best_position_hits = 0; + $quarter = floor($excerpt_length/4); // adjustment, so the excerpt doesn't start with the search term + for ($i = 0; $i < count($positions); $i++) { + $key = $positions[$i]; + $orig_key = $key; + $key = $key - $quarter; + if ($key < 0) $key = 0; + + $j = $i + 1; + + $this_excerpt_terms = array(); + + if (isset($term_positions[$orig_key])) $this_excerpt_terms[$term_positions[$orig_key]] = true; + + while (isset($positions[$j])) { + if (isset($positions[$j])) { + $next_key = $positions[$j]; + } + + if ($key + $excerpt_length > $next_key) { + $this_excerpt_terms[$term_positions[$next_key]] = true; + } + else { + break; // farther than the excerpt length + } + $j++; + } + + if (count($this_excerpt_terms) > $best_position_hits) { + $best_position_hits = count($this_excerpt_terms); + $best_position = $key; + } + } + + if ($best_position + $excerpt_length < strlen($content)) { + if (function_exists('mb_substr')) + $excerpt = mb_substr($content, $best_position, $excerpt_length); + else + $excerpt = substr($content, $best_position, $excerpt_length); + } + else { + $fixed_position = strlen($content) - $excerpt_length; + if ($fixed_position > 0) { + if (function_exists('mb_substr')) + $excerpt = mb_substr($content, $fixed_position, $excerpt_length); + else + $excerpt = substr($content, $fixed_position, $excerpt_length); + } + } + + if ($best_position == 0) $start = true; + + + if ("" == $excerpt) { + if (function_exists('mb_substr')) + $excerpt = mb_substr($content, 0, $excerpt_length); + else + $excerpt = substr($content, 0, $excerpt_length); + $start = true; + } + } + else { + $words = explode(' ', $content); + $i = 0; + + while ($i < count($words)) { + if ($i + $excerpt_length > count($words)) { + $i = count($words) - $excerpt_length; + if ($i < 0) $i = 0; + } + + $excerpt_slice = array_slice($words, $i, $excerpt_length); + $excerpt_slice = implode(' ', $excerpt_slice); + + $excerpt_slice = " $excerpt_slice"; + $term_hits = 0; + foreach (array_keys($terms) as $term) { + $term = " $term"; + if (function_exists('mb_stripos')) { + $pos = ("" == $excerpt_slice) ? false : mb_stripos($excerpt_slice, $term); + // To avoid "empty haystack" warnings + } + else if (function_exists('mb_strpos')) { + $pos = mb_strpos($excerpt_slice, $term); + if (false === $pos) { + if (function_exists('mb_strtoupper') && function_exists('mb_strpos') && function_exists('mb_substr')) { + $titlecased = mb_strtoupper(mb_substr($term, 0, 1)) . mb_substr($term, 1); + $pos = mb_strpos($excerpt_slice, $titlecased); + if (false === $pos) { + $pos = mb_strpos($excerpt_slice, mb_strtoupper($term)); + } + } + else { + $titlecased = strtoupper(substr($term, 0, 1)) . substr($term, 1); + $pos = strpos($excerpt_slice, $titlecased); + if (false === $pos) { + $pos = strpos($excerpt_slice, strtoupper($term)); + } + } + } + } + else { + $pos = strpos($excerpt_slice, $term); + if (false === $pos) { + $titlecased = strtoupper(substr($term, 0, 1)) . substr($term, 1); + $pos = strpos($excerpt_slice, $titlecased); + if (false === $pos) { + $pos = strpos($excerpt_slice, strtoupper($term)); + } + } + } + + if (false !== $pos) { + $term_hits++; + if (0 == $i) $start = true; + + if ($term_hits > $best_excerpt_term_hits) { + $best_excerpt_term_hits = $term_hits; + $excerpt = $excerpt_slice; + } + } + } + + $i += $excerpt_length; + } + + if ("" == $excerpt) { + $excerpt = explode(' ', $content, $excerpt_length); + array_pop($excerpt); + $excerpt = implode(' ', $excerpt); + $start = true; + } + } + + return array($excerpt, $best_excerpt_term_hits, $start); +} + +/** HIGHLIGHTING **/ + +function relevanssi_highlight_in_docs($content) { + global $wp_query; + if (is_singular() && in_the_loop()) { + if (isset($_SERVER['HTTP_REFERER'])) { + $referrer = preg_replace('@(http|https)://@', '', stripslashes(urldecode($_SERVER['HTTP_REFERER']))); + $args = explode('?', $referrer); + $query = array(); + + if ( count( $args ) > 1 ) + parse_str( $args[1], $query ); + + if (stripos($referrer, $_SERVER['SERVER_NAME']) !== false) { + // Local search + if (isset($query['s'])) { + $q = relevanssi_add_synonyms($query['s']); + $highlighted_content = relevanssi_highlight_terms($content, $q); + if (!empty($highlighted_content)) $content = $highlighted_content; + // Sometimes the content comes back empty; until I figure out why, this tries to be a solution. + } + } + if (function_exists('relevanssi_nonlocal_highlighting')) { + $content = relevanssi_nonlocal_highlighting($referrer, $content, $query); + } + } + } + + return $content; +} + +function relevanssi_highlight_terms($excerpt, $query) { + $type = get_option("relevanssi_highlight"); + if ("none" == $type) { + return $excerpt; + } + + switch ($type) { + case "mark": // thanks to Jeff Byrnes + $start_emp = ""; + $end_emp = ""; + break; + case "strong": + $start_emp = ""; + $end_emp = ""; + break; + case "em": + $start_emp = ""; + $end_emp = ""; + break; + case "col": + $col = get_option("relevanssi_txt_col"); + if (!$col) $col = "#ff0000"; + $start_emp = ""; + $end_emp = ""; + break; + case "bgcol": + $col = get_option("relevanssi_bg_col"); + if (!$col) $col = "#ff0000"; + $start_emp = ""; + $end_emp = ""; + break; + case "css": + $css = get_option("relevanssi_css"); + if (!$css) $css = "color: #ff0000"; + $start_emp = ""; + $end_emp = ""; + break; + case "class": + $css = get_option("relevanssi_class"); + if (!$css) $css = "relevanssi-query-term"; + $start_emp = ""; + $end_emp = ""; + break; + default: + return $excerpt; + } + + $start_emp_token = "**["; + $end_emp_token = "]**"; + + if ( function_exists('mb_internal_encoding') ) + mb_internal_encoding("UTF-8"); + + $terms = array_keys(relevanssi_tokenize($query, $remove_stopwords = true, $min_word_length = -1)); + + if (is_array($query)) $query = implode(' ', $query); // just in case + $phrases = relevanssi_extract_phrases(stripslashes($query)); + + $non_phrase_terms = array(); + foreach ($phrases as $phrase) { + $phrase_terms = array_keys(relevanssi_tokenize($phrase, $remove_stopwords = false)); + foreach ($terms as $term) { + if (!in_array($term, $phrase_terms)) { + $non_phrase_terms[] = $term; + } + } + $terms = $non_phrase_terms; + $terms[] = $phrase; + } + + uksort($terms, 'relevanssi_strlen_sort'); + + get_option('relevanssi_word_boundaries', 'on') == 'on' ? $word_boundaries = true : $word_boundaries = false; + foreach ($terms as $term) { +// $pr_term = relevanssi_replace_punctuation(preg_quote($term, '/')); + $pr_term = preg_quote($term, '/'); + + $undecoded_excerpt = $excerpt; + $excerpt = html_entity_decode($excerpt); + + if ($word_boundaries) { + get_option('relevanssi_fuzzy') != 'none' ? $regex = "/($pr_term)(?!(^&+)?(;))/iu" : $regex = "/(\b$pr_term|$pr_term\b)(?!(^&+)?(;))/iu"; + $excerpt = preg_replace($regex, $start_emp_token . '\\1' . $end_emp_token, $excerpt); + if (empty($excerpt)) $excerpt = preg_replace($regex, $start_emp_token . '\\1' . $end_emp_token, $undecoded_excerpt); + } + else { + $excerpt = preg_replace("/($pr_term)(?!(^&+)?(;))/iu", $start_emp_token . '\\1' . $end_emp_token, $excerpt); + if (empty($excerpt)) $excerpt = preg_replace("/($pr_term)(?!(^&+)?(;))/iu", $start_emp_token . '\\1' . $end_emp_token, $undecoded_excerpt); + } + + $preg_start = preg_quote($start_emp_token); + $preg_end = preg_quote($end_emp_token); + + if (preg_match_all('/<.*>/U', $excerpt, $matches) > 0) { + // Remove highlights from inside HTML tags + foreach ($matches as $match) { + $new_match = str_replace($start_emp_token, '', $match); + $new_match = str_replace($end_emp_token, '', $new_match); + $excerpt = str_replace($match, $new_match, $excerpt); + } + } + + if (preg_match_all('/<(style|script|object|embed)>.*<\/(style|script|object|embed)>/U', $excerpt, $matches) > 0) { + // Remove highlights in style, object, embed and script tags + foreach ($matches as $match) { + $new_match = str_replace($start_emp_token, '', $match); + $new_match = str_replace($end_emp_token, '', $new_match); + $excerpt = str_replace($match, $new_match, $excerpt); + } + } + } + + $excerpt = relevanssi_remove_nested_highlights($excerpt, $start_emp_token, $end_emp_token); + +/* + $excerpt = htmlentities($excerpt, ENT_QUOTES, 'UTF-8'); + // return the HTML entities that were stripped before +*/ + + $excerpt = str_replace($start_emp_token, $start_emp, $excerpt); + $excerpt = str_replace($end_emp_token, $end_emp, $excerpt); + $excerpt = str_replace($end_emp . $start_emp, "", $excerpt); + if (function_exists('mb_ereg_replace')) { + $pattern = $end_emp . '\s*' . $start_emp; + $excerpt = mb_ereg_replace($pattern, " ", $excerpt); + } + + return $excerpt; +} + + +function relevanssi_replace_punctuation($a) { + $a = preg_replace('/[[:punct:]]/u', '.', $a); + return $a; +} + +function relevanssi_remove_nested_highlights($s, $a, $b) { + $offset = 0; + $string = ""; + $bits = explode($a, $s); + $new_bits = array($bits[0]); + $in = false; + for ($i = 1; $i < count($bits); $i++) { + if ($bits[$i] == '') continue; + + if (!$in) { + array_push($new_bits, $a); + $in = true; + } + if (substr_count($bits[$i], $b) > 0) { + $in = false; + } + if (substr_count($bits[$i], $b) > 1) { + $more_bits = explode($b, $bits[$i]); + $j = 0; + $k = count($more_bits) - 2; + $whole_bit = ""; + foreach ($more_bits as $bit) { + $whole_bit .= $bit; + if ($j == $k) $whole_bit .= $b; + $j++; + } + $bits[$i] = $whole_bit; + } + array_push($new_bits, $bits[$i]); + } + $whole = implode('', $new_bits); + + return $whole; +} + +?> diff --git a/mu-plugins/relevanssi/lib/indexing.php b/mu-plugins/relevanssi/lib/indexing.php new file mode 100644 index 00000000..85bc950c --- /dev/null +++ b/mu-plugins/relevanssi/lib/indexing.php @@ -0,0 +1,704 @@ + 0) { + $restriction = " AND post.post_type IN (" . implode(', ', $post_types) . ') '; + } + else { + $restriction = ""; + } + + $valid_status_array = apply_filters('relevanssi_valid_status', array('publish', 'draft', 'private', 'pending', 'future')); + if (is_array($valid_status_array) && count($valid_status_array) > 0) { + $valid_status = array(); + foreach ($valid_status_array as $status) { + $valid_status[] = "'$status'"; + } + $valid_status = implode(',', $valid_status); + } + else { + // this really should never happen + $valid_status = "'publish', 'draft', 'private', 'pending', 'future'"; + } + + $n = 0; + $size = 0; + + if (!$extend) { + // truncate table first + $wpdb->query("TRUNCATE TABLE $relevanssi_table"); + + if (function_exists('relevanssi_index_taxonomies')) { + if (get_option('relevanssi_index_taxonomies') == 'on') { + relevanssi_index_taxonomies(); + } + } + + if (function_exists('relevanssi_index_users')) { + if (get_option('relevanssi_index_users') == 'on') { + relevanssi_index_users(); + } + } + + $q = "SELECT post.ID + FROM $wpdb->posts post + LEFT JOIN $wpdb->posts parent ON (post.post_parent=parent.ID) + WHERE + (post.post_status IN ($valid_status) + OR + (post.post_status='inherit' + AND( + (parent.ID is not null AND (parent.post_status IN ($valid_status))) + OR (post.post_parent=0) + ) + )) + $restriction"; + + update_option('relevanssi_index', ''); + } + else { + // extending, so no truncate and skip the posts already in the index + $limit = get_option('relevanssi_index_limit', 200); + if (is_numeric($limit) && $limit > 0) { + $size = $limit; + $limit = " LIMIT $limit"; + } + else { + $limit = ""; + } + $q = "SELECT post.ID + FROM $wpdb->posts post + LEFT JOIN $wpdb->posts parent ON (post.post_parent=parent.ID) + LEFT JOIN $relevanssi_table r ON (post.ID=r.doc) + WHERE + r.doc is null + AND + (post.post_status IN ($valid_status) + OR + (post.post_status='inherit' + AND( + (parent.ID is not null AND (parent.post_status IN ($valid_status))) + OR (post.post_parent=0) + ) + ) + ) + $restriction $limit"; + } + + $custom_fields = relevanssi_get_custom_fields(); + + do_action('relevanssi_pre_indexing_query'); + $content = $wpdb->get_results($q); + + foreach ($content as $post) { + $n += relevanssi_index_doc($post->ID, false, $custom_fields, true); + // n calculates the number of insert queries + // $bypassglobalpost set to true, because at this point global $post should be NULL, but in some cases it is not + } + + $wpdb->query("ANALYZE TABLE $relevanssi_table"); + // To prevent empty indices + + echo '

' + . __((($size == 0) || (count($content) < $size)) ? "Indexing complete!" : "More to index...", "relevanssi") + . '

'; + update_option('relevanssi_indexed', 'done'); + + // We always want to run this on init, if the index is finishd building. + $D = $wpdb->get_var("SELECT COUNT(DISTINCT(relevanssi.doc)) FROM $relevanssi_table AS relevanssi"); + update_option( 'relevanssi_doc_count', $D); + + if (function_exists('wp_suspend_cache_addition')) + wp_suspend_cache_addition(false); // Thanks to Julien Mession +} + +// BEGIN modified by renaissancehack +// recieve $post argument as $indexpost, so we can make it the $post global. This will allow shortcodes +// that need to know what post is calling them to access $post->ID +/* + Different cases: + + - Build index: + global $post is NULL, $indexpost is a post object. + + - Update post: + global $post has the original $post, $indexpost is the ID of revision. + + - Quick edit: + global $post is an array, $indexpost is the ID of current revision. +*/ +function relevanssi_index_doc($indexpost, $remove_first = false, $custom_fields = false, $bypassglobalpost = false) { + global $wpdb, $post, $relevanssi_variables; + $relevanssi_table = $relevanssi_variables['relevanssi_table']; + $post_was_null = false; + $previous_post = NULL; + + // Check if this is a Jetpack Contact Form entry + if (isset($_REQUEST['contact-form-id'])) return; + + if ($bypassglobalpost) { + // if $bypassglobalpost is set, relevanssi_index_doc() will index the post object or post + // ID as specified in $indexpost + isset($post) ? + $previous_post = $post : $post_was_null = true; + is_object($indexpost) ? + $post = $indexpost : $post = get_post($indexpost); + } + else { + // Quick edit has an array in the global $post, so fetch the post ID for the post to edit. + if (is_array($post)) { + $post = get_post($post['ID']); + } + + if (empty($post)) { + // No $post set, so we need to use $indexpost, if it's a post object + $post_was_null = true; + if (is_object($indexpost)) { + $post = $indexpost; + } + else { + $post = get_post($indexpost); + } + } + else { + // $post was set, let's grab the previous value in case we need it + $previous_post = $post; + } + } + + if ($post == NULL) { + // At this point we should have something in $post; if not, quit. + if ($post_was_null) $post = null; + if ($previous_post) $post = $previous_post; + return; + } + + // Finally fetch the post again by ID. Complicated, yes, but unless we do this, we might end + // up indexing the post before the updates come in. + $post = get_post($post->ID); + + if (function_exists('relevanssi_hide_post')) { + if (relevanssi_hide_post($post->ID)) { + if ($post_was_null) $post = null; + if ($previous_post) $post = $previous_post; + return; + } + } + + $index_this_post = false; + + $post->indexing_content = true; + $index_types = get_option('relevanssi_index_post_types'); + if (!is_array($index_types)) $index_types = array(); + if (in_array($post->post_type, $index_types)) $index_this_post = true; + + if (true == apply_filters('relevanssi_do_not_index', false, $post->ID)) { + // filter says no + if ($post_was_null) $post = null; + if ($previous_post) $post = $previous_post; + $index_this_post = false; + } + + if ($remove_first) { + // we are updating a post, so remove the old stuff first + relevanssi_remove_doc($post->ID, true); + if (function_exists('relevanssi_remove_item')) { + relevanssi_remove_item($post->ID, 'post'); + } + } + + // This needs to be here, after the call to relevanssi_remove_doc(), because otherwise + // a post that's in the index but shouldn't be there won't get removed. A remote chance, + // I mean who ever flips exclude_from_search between true and false once it's set, but + // I'd like to cover all bases. + if (!$index_this_post) { + if ($post_was_null) $post = null; + if ($previous_post) $post = $previous_post; + return; + } + + $n = 0; + + $post = apply_filters('relevanssi_post_to_index', $post); + + $min_word_length = get_option('relevanssi_min_word_length', 3); + $insert_data = array(); + + //Added by OdditY - INDEX COMMENTS of the POST -> + if ("none" != get_option("relevanssi_index_comments")) { + $pcoms = relevanssi_get_comments($post->ID); + if ($pcoms != "") { + $pcoms = relevanssi_strip_invisibles($pcoms); + $pcoms = preg_replace('/<[a-zA-Z\/][^>]*>/', ' ', $pcoms); + $pcoms = strip_tags($pcoms); + $pcoms = relevanssi_tokenize($pcoms, true, $min_word_length); + if (count($pcoms) > 0) { + foreach ($pcoms as $pcom => $count) { + $n++; + $insert_data[$pcom]['comment'] = $count; + } + } + } + } //Added by OdditY END <- + + + $taxonomies = get_option("relevanssi_index_taxonomies_list"); + + // Then process all taxonomies, if any. + foreach ($taxonomies as $taxonomy) { + $insert_data = relevanssi_index_taxonomy_terms($post, $taxonomy, $insert_data); + } + + // index author + if ("on" == get_option("relevanssi_index_author")) { + $auth = $post->post_author; + $display_name = $wpdb->get_var("SELECT display_name FROM $wpdb->users WHERE ID=$auth"); + $names = relevanssi_tokenize($display_name, false, $min_word_length); + foreach($names as $name => $count) { + isset($insert_data[$name]['author']) ? $insert_data[$name]['author'] += $count : $insert_data[$name]['author'] = $count; + } + } + + if ($custom_fields) { + $remove_underscore_fields = false; + if ($custom_fields == 'all') + $custom_fields = get_post_custom_keys($post->ID); + if ($custom_fields == 'visible') { + $custom_fields = get_post_custom_keys($post->ID); + $remove_underscore_fields = true; + } + $custom_fields = apply_filters('relevanssi_index_custom_fields', $custom_fields); + if (is_array($custom_fields)) { + foreach ($custom_fields as $field) { + if ($remove_underscore_fields) { + if (substr($field, 0, 1) == '_') continue; + } + $values = get_post_meta($post->ID, $field, false); + if ("" == $values) continue; + foreach ($values as $value) { + $value_tokens = relevanssi_tokenize($value, true, $min_word_length); + foreach ($value_tokens as $token => $count) { + isset($insert_data[$token]['customfield']) ? $insert_data[$token]['customfield'] += $count : $insert_data[$token]['customfield'] = $count; + if (function_exists('relevanssi_customfield_detail')) { + $insert_data = relevanssi_customfield_detail($insert_data, $token, $count, $field); + } + } + } + } + } + } + + if (isset($post->post_excerpt) && ("on" == get_option("relevanssi_index_excerpt") || "attachment" == $post->post_type)) { // include excerpt for attachments which use post_excerpt for captions - modified by renaissancehack + $excerpt_tokens = relevanssi_tokenize($post->post_excerpt, true, $min_word_length); + foreach ($excerpt_tokens as $token => $count) { + isset($insert_data[$token]['excerpt']) ? $insert_data[$token]['excerpt'] += $count : $insert_data[$token]['excerpt'] = $count; + } + } + + if (function_exists('relevanssi_index_mysql_columns')) { + $insert_data = relevanssi_index_mysql_columns($insert_data, $post->ID); + } + + $index_titles = true; + if (apply_filters('relevanssi_index_titles', $index_titles)) { + $filtered_title = apply_filters('relevanssi_post_title_before_tokenize', $post->post_title); + $titles = relevanssi_tokenize(apply_filters('the_title', $filtered_title)); + + if (count($titles) > 0) { + foreach ($titles as $title => $count) { + $n++; + isset($insert_data[$title]['title']) ? $insert_data[$title]['title'] += $count : $insert_data[$title]['title'] = $count; + } + } + } + + $index_content = true; + if (apply_filters('relevanssi_index_content', $index_content)) { + remove_shortcode('noindex'); + add_shortcode('noindex', 'relevanssi_noindex_shortcode_indexing'); + + $contents = apply_filters('relevanssi_post_content', $post->post_content, $post); + + // Allow user to add extra content for Relevanssi to index + // Thanks to Alexander Gieg + $additional_content = trim(apply_filters('relevanssi_content_to_index', '', $post)); + if ('' != $additional_content) + $contents .= ' '.$additional_content; + + if ('on' == get_option('relevanssi_expand_shortcodes')) { + if (function_exists("do_shortcode")) { + // WP Table Reloaded support + if (defined('WP_TABLE_RELOADED_ABSPATH')) { + include_once(WP_TABLE_RELOADED_ABSPATH . 'controllers/controller-frontend.php'); + $My_WP_Table_Reloaded = new WP_Table_Reloaded_Controller_Frontend(); + } + // TablePress support + if ( defined( 'TABLEPRESS_ABSPATH' ) ) { + $My_TablePress_Controller = TablePress::load_controller( 'frontend' ); + $My_TablePress_Controller->init_shortcodes(); + } + + $disable_shortcodes = get_option('relevanssi_disable_shortcodes'); + $shortcodes = explode(',', $disable_shortcodes); + foreach ($shortcodes as $shortcode) { + remove_shortcode(trim($shortcode)); + } + remove_shortcode('contact-form'); // Jetpack Contact Form causes an error message + remove_shortcode('starrater'); // GD Star Rating rater shortcode causes problems + remove_shortcode('responsive-flipbook'); // Responsive Flipbook causes problems + remove_shortcode('avatar_upload'); // WP User Avatar is incompatible + remove_shortcode('product_categories'); // A problematic WooCommerce shortcode + remove_shortcode('recent_products'); // A problematic WooCommerce shortcode + + $post_before_shortcode = $post; + $contents = do_shortcode($contents); + $post = $post_before_shortcode; + + if (defined('TABLEPRESS_ABSPATH')) { + unset($My_TablePress_Controller); + } + if (defined('WP_TABLE_RELOADED_ABSPATH')) { + unset($My_WP_Table_Reloaded); + } + } + } + else { + if (function_exists("strip_shortcodes")) { + // WP 2.5 doesn't have the function + $contents = strip_shortcodes($contents); + } + } + + remove_shortcode('noindex'); + add_shortcode('noindex', 'relevanssi_noindex_shortcode'); + + $contents = relevanssi_strip_invisibles($contents); + + if (function_exists('relevanssi_process_internal_links')) { + $contents = relevanssi_process_internal_links($contents, $post->ID); + } + + $contents = preg_replace('/<[a-zA-Z\/][^>]*>/', ' ', $contents); + $contents = strip_tags($contents); + $contents = apply_filters('relevanssi_post_content_before_tokenize', $contents, $post); + $contents = relevanssi_tokenize($contents, true, $min_word_length); + + if (count($contents) > 0) { + foreach ($contents as $content => $count) { + $n++; + isset($insert_data[$content]['content']) ? $insert_data[$content]['content'] += $count : $insert_data[$content]['content'] = $count; + } + } + } + + $type = 'post'; + if ($post->post_type == 'attachment') $type = 'attachment'; + + $insert_data = apply_filters('relevanssi_indexing_data', $insert_data, $post); + + $values = array(); + foreach ($insert_data as $term => $data) { + $content = 0; + $title = 0; + $comment = 0; + $tag = 0; + $link = 0; + $author = 0; + $category = 0; + $excerpt = 0; + $taxonomy = 0; + $customfield = 0; + $taxonomy_detail = ''; + $customfield_detail = ''; + $mysqlcolumn = 0; + extract($data); + + $term = trim($term); + + $value = $wpdb->prepare("(%d, %s, REVERSE(%s), %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %s, %s, %s, %d)", + $post->ID, $term, $term, $content, $title, $comment, $tag, $link, $author, $category, $excerpt, $taxonomy, $customfield, $type, $taxonomy_detail, $customfield_detail, $mysqlcolumn); + + array_push($values, $value); + } + + $values = apply_filters('relevanssi_indexing_values', $values, $post); + + if (!empty($values)) { + $values = implode(', ', $values); + $query = "INSERT IGNORE INTO $relevanssi_table (doc, term, term_reverse, content, title, comment, tag, link, author, category, excerpt, taxonomy, customfield, type, taxonomy_detail, customfield_detail, mysqlcolumn) + VALUES $values"; + $wpdb->query($query); + } + + if ($post_was_null) $post = null; + if ($previous_post) $post = $previous_post; + + return $n; +} + +/** + * Index taxonomy terms for given post and given taxonomy. + * + * @since 1.8 + * @param object $post Post object. + * @param string $taxonomy Taxonomy name. + * @param array $insert_data Insert query data array. + * @return array Updated insert query data array. + */ +function relevanssi_index_taxonomy_terms($post = null, $taxonomy = "", $insert_data) { + global $wpdb, $relevanssi_variables; + $relevanssi_table = $relevanssi_variables['relevanssi_table']; + + $n = 0; + + if (null == $post) return $insert_data; + if ("" == $taxonomy) return $insert_data; + + $min_word_length = get_option('relevanssi_min_word_length', 3); + $ptagobj = get_the_terms($post->ID, $taxonomy); + if ($ptagobj !== FALSE) { + $tagstr = ""; + foreach ($ptagobj as $ptag) { + if (is_object($ptag)) { + $tagstr .= $ptag->name . ' '; + } + } + $tagstr = trim($tagstr); + $ptags = relevanssi_tokenize($tagstr, true, $min_word_length); + if (count($ptags) > 0) { + foreach ($ptags as $ptag => $count) { + $n++; + + if ('post_tags' == $taxonomy) { + $insert_data[$ptag]['tag'] = $count; + } + else if ('category' == $taxonomy) { + $insert_data[$ptag]['category'] = $count; + } + else { + if (isset($insert_data[$ptag]['taxonomy'])) { + $insert_data[$ptag]['taxonomy'] += $count; + } + else { + $insert_data[$ptag]['taxonomy'] = $count; + } + } + if (isset($insert_data[$ptag]['taxonomy_detail'])) { + $tax_detail = unserialize($insert_data[$ptag]['taxonomy_detail']); + } + else { + $tax_detail = array(); + } + if (isset($tax_detail[$taxonomy])) { + $tax_detail[$taxonomy] += $count; + } + else { + $tax_detail[$taxonomy] = $count; + } + $insert_data[$ptag]['taxonomy_detail'] = serialize($tax_detail); + } + } + } + return $insert_data; +} + +// BEGIN added by renaissancehack +function relevanssi_update_child_posts($new_status, $old_status, $post) { +// called by 'transition_post_status' action hook when a post is edited/published/deleted +// and calls appropriate indexing function on child posts/attachments + global $wpdb; + + // Safety check, for WordPress Editorial Calendar incompatibility + if (!isset($post) || !isset($post->ID)) return; + + $index_statuses = apply_filters('relevanssi_valid_status', array('publish', 'private', 'draft', 'pending', 'future')); + if (($new_status == $old_status) + || (in_array($new_status, $index_statuses) && in_array($old_status, $index_statuses)) + || (in_array($post->post_type, array('attachment', 'revision')))) { + return; + } + $q = "SELECT * FROM $wpdb->posts WHERE post_parent=$post->ID AND post_type!='revision'"; + $child_posts = $wpdb->get_results($q); + if ($child_posts) { + if (!in_array($new_status, $index_statuses)) { + foreach ($child_posts as $post) { + relevanssi_delete($post->ID); + } + } else { + foreach ($child_posts as $post) { + relevanssi_publish($post->ID); + } + } + } +} +// END added by renaissancehack + +function relevanssi_edit($post) { + // Check if the post is public + global $wpdb; + + $post_status = get_post_status($post); + if ('auto-draft' == $post_status) return; + +// BEGIN added by renaissancehack + // if post_status is "inherit", get post_status from parent + if ($post_status == 'inherit') { + $post_type = $wpdb->get_var("SELECT post_type FROM $wpdb->posts WHERE ID=$post"); + $post_status = $wpdb->get_var("SELECT p.post_status FROM $wpdb->posts p, $wpdb->posts c WHERE c.ID=$post AND c.post_parent=p.ID"); + } +// END added by renaissancehack + + $index_statuses = apply_filters('relevanssi_valid_status', array('publish', 'private', 'draft', 'pending', 'future')); + if (!in_array($post_status, $index_statuses)) { + // The post isn't supposed to be indexed anymore, remove it from index + relevanssi_remove_doc($post); + } + else { + relevanssi_publish($post); + } +} + +function relevanssi_delete($post) { + relevanssi_remove_doc($post); +} + +function relevanssi_publish($post, $bypassglobalpost = false) { + global $relevanssi_publish_doc; + + $post_status = get_post_status($post); + if ('auto-draft' == $post_status) return; + + $custom_fields = relevanssi_get_custom_fields(); + relevanssi_index_doc($post, true, $custom_fields, $bypassglobalpost); +} + +// added by lumpysimon +// when we're using wp_insert_post to update a post, +// we don't want to use the global $post object +function relevanssi_insert_edit($post_id) { + global $wpdb; + + $post_status = get_post_status( $post_id ); + if ( 'auto-draft' == $post_status ) return; + + if ( $post_status == 'inherit' ) { + $post_type = $wpdb->get_var( "SELECT post_type FROM $wpdb->posts WHERE ID=$post_id" ); + $post_status = $wpdb->get_var( "SELECT p.post_status FROM $wpdb->posts p, $wpdb->posts c WHERE c.ID=$post_id AND c.post_parent=p.ID" ); + } + + $index_statuses = apply_filters('relevanssi_valid_status', array('publish', 'private', 'draft', 'future', 'pending')); + if ( !in_array( $post_status, $index_statuses ) ) { + // The post isn't supposed to be indexed anymore, remove it from index + relevanssi_remove_doc( $post_id ); + } + else { + $bypassglobalpost = true; + relevanssi_publish($post_id, $bypassglobalpost); + } +} + +//Added by OdditY -> +function relevanssi_comment_edit($comID) { + relevanssi_comment_index($comID,$action="update"); +} + +function relevanssi_comment_remove($comID) { + relevanssi_comment_index($comID,$action="remove"); +} + +function relevanssi_comment_index($comID,$action="add") { + global $wpdb; + $comtype = get_option("relevanssi_index_comments"); + switch ($comtype) { + case "all": + // all (incl. customs, track-&pingbacks) + break; + case "normal": + // normal (excl. customs, track-&pingbacks) + $restriction=" AND comment_type='' "; + break; + default: + // none (don't index) + return ; + } + switch ($action) { + case "update": + //(update) comment status changed: + $cpostID = $wpdb->get_var("SELECT comment_post_ID FROM $wpdb->comments WHERE comment_ID='$comID'".$restriction); + break; + case "remove": + //(remove) approved comment will be deleted (if not approved, its not in index): + $cpostID = $wpdb->get_var("SELECT comment_post_ID FROM $wpdb->comments WHERE comment_ID='$comID' AND comment_approved='1'".$restriction); + if($cpostID!=NULL) { + //empty comment_content & reindex, then let WP delete the empty comment + $wpdb->query("UPDATE $wpdb->comments SET comment_content='' WHERE comment_ID='$comID'"); + } + break; + default: + // (add) new comment: + $cpostID = $wpdb->get_var("SELECT comment_post_ID FROM $wpdb->comments WHERE comment_ID='$comID' AND comment_approved='1'".$restriction); + break; + } + if($cpostID!=NULL) relevanssi_publish($cpostID); +} +//Added by OdditY END <- + +function relevanssi_get_comments($postID) { + global $wpdb; + + if (apply_filters('relevanssi_index_comments_exclude', false, $postID)) + return ""; + + $comtype = get_option("relevanssi_index_comments"); + $restriction = ""; + $comment_string = ""; + switch ($comtype) { + case "all": + // all (incl. customs, track- & pingbacks) + break; + case "normal": + // normal (excl. customs, track- & pingbacks) + $restriction=" AND comment_type='' "; + break; + default: + // none (don't index) + return ""; + } + + $to = 20; + $from = 0; + + while ( true ) { + $sql = "SELECT comment_ID, comment_content, comment_author + FROM $wpdb->comments + WHERE comment_post_ID = '$postID' + AND comment_approved = '1' + ".$restriction." + LIMIT $from, $to"; + $comments = $wpdb->get_results($sql); + if (sizeof($comments) == 0) break; + foreach($comments as $comment) { + $comment_string .= apply_filters('relevanssi_comment_content_to_index', $comment->comment_author . ' ' . $comment->comment_content . ' ', $comment->comment_ID); + } + $from += $to; + } + + return $comment_string; +} + +?> diff --git a/mu-plugins/relevanssi/lib/init.php b/mu-plugins/relevanssi/lib/init.php new file mode 100644 index 00000000..e9a65ff5 --- /dev/null +++ b/mu-plugins/relevanssi/lib/init.php @@ -0,0 +1,250 @@ +

" + . __('You do not have an index! Remember to build the index (click the "Build the index" button), otherwise searching won\'t work.') + . "

"; + } + if ( 'options-general.php' == $pagenow and isset( $_GET['page'] ) and plugin_basename($relevanssi_variables['file']) == $_GET['page'] ) { + add_action('admin_notices', 'relevanssi_warning'); + } else { + // We always want to run this on init, if the index is finishd building. + $relevanssi_table = $relevanssi_variables['relevanssi_table']; + $D = $wpdb->get_var("SELECT COUNT(DISTINCT(relevanssi.doc)) FROM $relevanssi_table AS relevanssi"); + update_option( 'relevanssi_doc_count', $D); + } + } + + if (!function_exists('mb_internal_encoding')) { + function relevanssi_mb_warning() { + echo "

" + . "Multibyte string functions are not available. Relevanssi may not work well without them. " + . "Please install (or ask your host to install) the mbstring extension." + . "

"; + } + if ( 'options-general.php' == $pagenow and isset( $_GET['page'] ) and plugin_basename($relevanssi_variables['file']) == $_GET['page'] ) + add_action('admin_notices', 'relevanssi_mb_warning'); + } + + if (get_option('relevanssi_highlight_docs', 'off') != 'off') { + add_filter('the_content', 'relevanssi_highlight_in_docs', 11); + } + if (get_option('relevanssi_highlight_comments', 'off') != 'off') { + add_filter('comment_text', 'relevanssi_highlight_in_docs', 11); + } + + return; +} + +function relevanssi_menu() { + global $relevanssi_variables; + RELEVANSSI_PREMIUM ? $name = "Relevanssi Premium" : $name = "Relevanssi"; + add_options_page( + $name, + $name, + apply_filters('relevanssi_options_capability', 'manage_options'), + $relevanssi_variables['file'], + 'relevanssi_options' + ); + add_dashboard_page( + __('User searches', 'relevanssi'), + __('User searches', 'relevanssi'), + apply_filters('relevanssi_user_searches_capability', 'edit_pages'), + $relevanssi_variables['file'], + 'relevanssi_search_stats' + ); +} + +function relevanssi_query_vars($qv) { + $qv[] = 'cats'; + $qv[] = 'tags'; + $qv[] = 'post_types'; + $qv[] = 'by_date'; + + return $qv; +} + +function relevanssi_create_database_tables($relevanssi_db_version) { + global $wpdb; + + require_once( ABSPATH . 'wp-admin/includes/upgrade.php' ); + + $charset_collate_bin_column = ''; + $charset_collate = ''; + + if (!empty($wpdb->charset)) { + $charset_collate_bin_column = "CHARACTER SET $wpdb->charset"; + $charset_collate = "DEFAULT $charset_collate_bin_column"; + } + if (strpos($wpdb->collate, "_") > 0) { + $charset_collate_bin_column .= " COLLATE " . substr($wpdb->collate, 0, strpos($wpdb->collate, '_')) . "_bin"; + $charset_collate .= " COLLATE $wpdb->collate"; + } else { + if ($wpdb->collate == '' && $wpdb->charset == "utf8") { + $charset_collate_bin_column .= " COLLATE utf8_bin"; + } + } + + $relevanssi_table = $wpdb->prefix . "relevanssi"; + $relevanssi_stopword_table = $wpdb->prefix . "relevanssi_stopwords"; + $relevanssi_log_table = $wpdb->prefix . "relevanssi_log"; + + if(get_option('relevanssi_db_version') != $relevanssi_db_version) { + if ($relevanssi_db_version == 1) { + if($wpdb->get_var("SHOW TABLES LIKE '$relevanssi_table'") == $relevanssi_table) { + $sql = "DROP TABLE $relevanssi_table"; + $wpdb->query($sql); + } + delete_option('relevanssi_indexed'); + } + + $sql = "CREATE TABLE " . $relevanssi_table . " (doc bigint(20) NOT NULL DEFAULT '0', + term varchar(50) NOT NULL DEFAULT '0', + term_reverse varchar(50) NOT NULL DEFAULT '0', + content mediumint(9) NOT NULL DEFAULT '0', + title mediumint(9) NOT NULL DEFAULT '0', + comment mediumint(9) NOT NULL DEFAULT '0', + tag mediumint(9) NOT NULL DEFAULT '0', + link mediumint(9) NOT NULL DEFAULT '0', + author mediumint(9) NOT NULL DEFAULT '0', + category mediumint(9) NOT NULL DEFAULT '0', + excerpt mediumint(9) NOT NULL DEFAULT '0', + taxonomy mediumint(9) NOT NULL DEFAULT '0', + customfield mediumint(9) NOT NULL DEFAULT '0', + mysqlcolumn mediumint(9) NOT NULL DEFAULT '0', + taxonomy_detail longtext NOT NULL, + customfield_detail longtext NOT NULL, + mysqlcolumn_detail longtext NOT NULL, + type varchar(210) NOT NULL DEFAULT 'post', + item bigint(20) NOT NULL DEFAULT '0', + UNIQUE KEY doctermitem (doc, term, item)) $charset_collate"; + + dbDelta($sql); + + $sql = "SHOW INDEX FROM $relevanssi_table"; + $indices = $wpdb->get_results($sql); + + $terms_exists = false; + $relevanssi_term_reverse_idx_exists = false; + $docs_exists = false; + $typeitem_exists = false; + foreach ($indices as $index) { + if ($index->Key_name == 'terms') $terms_exists = true; + if ($index->Key_name == 'relevanssi_term_reverse_idx') $relevanssi_term_reverse_idx_exists = true; + if ($index->Key_name == 'docs') $docs_exists = true; + if ($index->Key_name == 'typeitem') $typeitem_exists = true; + } + + if (!$terms_exists) { + $sql = "CREATE INDEX terms ON $relevanssi_table (term(20))"; + $wpdb->query($sql); + } + + if (!$relevanssi_term_reverse_idx_exists) { + $sql = "CREATE INDEX relevanssi_term_reverse_idx ON $relevanssi_table (term_reverse(10))"; + $wpdb->query($sql); + } + + if (!$docs_exists) { + $sql = "CREATE INDEX docs ON $relevanssi_table (doc)"; + $wpdb->query($sql); + } + + if (!$typeitem_exists) { + $sql = "CREATE INDEX typeitem ON $relevanssi_table (type, item)"; + $wpdb->query($sql); + } + + $sql = "CREATE TABLE " . $relevanssi_stopword_table . " (stopword varchar(50) $charset_collate_bin_column NOT NULL, + UNIQUE KEY stopword (stopword)) $charset_collate;"; + + dbDelta($sql); + + $sql = "CREATE TABLE " . $relevanssi_log_table . " (id bigint(9) NOT NULL AUTO_INCREMENT, + query varchar(200) NOT NULL, + hits mediumint(9) NOT NULL DEFAULT '0', + time timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + user_id bigint(20) NOT NULL DEFAULT '0', + ip varchar(40) NOT NULL DEFAULT '', + UNIQUE KEY id (id)) $charset_collate;"; + + dbDelta($sql); + + if (RELEVANSSI_PREMIUM && get_option('relevanssi_db_version') < 12) { + $charset_collate_bin_column = ''; + $charset_collate = ''; + + if (!empty($wpdb->charset)) { + $charset_collate_bin_column = "CHARACTER SET $wpdb->charset"; + $charset_collate = "DEFAULT $charset_collate_bin_column"; + } + if (strpos($wpdb->collate, "_") > 0) { + $charset_collate_bin_column .= " COLLATE " . substr($wpdb->collate, 0, strpos($wpdb->collate, '_')) . "_bin"; + $charset_collate .= " COLLATE $wpdb->collate"; + } else { + if ($wpdb->collate == '' && $wpdb->charset == "utf8") { + $charset_collate_bin_column .= " COLLATE utf8_bin"; + } + } + + $sql = "ALTER TABLE $relevanssi_stopword_table MODIFY COLUMN stopword varchar(50) $charset_collate_bin_column NOT NULL"; + $wpdb->query($sql); + $sql = "ALTER TABLE $relevanssi_log_table ADD COLUMN user_id bigint(20) NOT NULL DEFAULT '0'"; + $wpdb->query($sql); + $sql = "ALTER TABLE $relevanssi_log_table ADD COLUMN ip varchar(40) NOT NULL DEFAULT ''"; + $wpdb->query($sql); + } + + if (get_option('relevanssi_db_version') < 16) { + $sql = "ALTER TABLE $relevanssi_table ADD COLUMN term_reverse VARCHAR(50);"; + $wpdb->query($sql); + $sql = "UPDATE $relevanssi_table SET term_reverse = REVERSE(term);"; + $wpdb->query($sql); + $sql = "CREATE INDEX relevanssi_term_reverse_idx ON $relevanssi_table (term_reverse(10));"; + $wpdb->query($sql); + } + + update_option('relevanssi_db_version', $relevanssi_db_version); + } + + if ($wpdb->get_var("SELECT COUNT(*) FROM $relevanssi_stopword_table WHERE 1") < 1) { + relevanssi_populate_stopwords(); + } +} +?> diff --git a/mu-plugins/relevanssi/lib/interface.php b/mu-plugins/relevanssi/lib/interface.php new file mode 100644 index 00000000..cd541d4b --- /dev/null +++ b/mu-plugins/relevanssi/lib/interface.php @@ -0,0 +1,1400 @@ +

%s

", $options_txt); + if (!empty($_POST)) { + if (isset($_REQUEST['submit'])) { + check_admin_referer(plugin_basename($relevanssi_variables['file']), 'relevanssi_options'); + update_relevanssi_options(); + } + + if (isset($_REQUEST['index'])) { + check_admin_referer(plugin_basename($relevanssi_variables['file']), 'relevanssi_options'); + update_relevanssi_options(); + relevanssi_build_index(); + } + + if (isset($_REQUEST['index_extend'])) { + check_admin_referer(plugin_basename($relevanssi_variables['file']), 'relevanssi_options'); + update_relevanssi_options(); + relevanssi_build_index(true); + } + + if (isset($_REQUEST['import_options'])) { + if (function_exists('relevanssi_import_options')) { + check_admin_referer(plugin_basename($relevanssi_variables['file']), 'relevanssi_options'); + $options = $_REQUEST['relevanssi_settings']; + relevanssi_import_options($options); + } + } + + if (isset($_REQUEST['search'])) { + relevanssi_search($_REQUEST['q']); + } + + if (isset($_REQUEST['dowhat'])) { + if ("add_stopword" == $_REQUEST['dowhat']) { + if (isset($_REQUEST['term'])) { + check_admin_referer(plugin_basename($relevanssi_variables['file']), 'relevanssi_options'); + relevanssi_add_stopword($_REQUEST['term']); + } + } + } + + if (isset($_REQUEST['addstopword'])) { + check_admin_referer(plugin_basename($relevanssi_variables['file']), 'relevanssi_options'); + relevanssi_add_stopword($_REQUEST['addstopword']); + } + + if (isset($_REQUEST['removestopword'])) { + check_admin_referer(plugin_basename($relevanssi_variables['file']), 'relevanssi_options'); + relevanssi_remove_stopword($_REQUEST['removestopword']); + } + + if (isset($_REQUEST['removeallstopwords'])) { + check_admin_referer(plugin_basename($relevanssi_variables['file']), 'relevanssi_options'); + relevanssi_remove_all_stopwords(); + } + } + relevanssi_options_form(); + + relevanssi_common_words(); + + echo "
"; + + echo ""; +} + +function relevanssi_search_stats() { + $relevanssi_hide_branding = get_option( 'relevanssi_hide_branding' ); + + if ( 'on' == $relevanssi_hide_branding ) + $options_txt = __('User Searches', 'relevanssi'); + else + $options_txt = __('Relevanssi User Searches', 'relevanssi'); + + if (isset($_REQUEST['relevanssi_reset']) and current_user_can('manage_options')) { + check_admin_referer('relevanssi_reset_logs', '_relresnonce'); + if (isset($_REQUEST['relevanssi_reset_code'])) { + if ($_REQUEST['relevanssi_reset_code'] == 'reset') { + relevanssi_truncate_logs(); + } + } + } + + wp_enqueue_style('dashboard'); + wp_print_styles('dashboard'); + wp_enqueue_script('dashboard'); + wp_print_scripts('dashboard'); + + printf("

%s

", $options_txt); + + if ( 'on' == $relevanssi_hide_branding ) + echo '
'; + else + echo '
'; + + + if ('on' == get_option('relevanssi_log_queries')) { + relevanssi_query_log(); + } + else { + echo "

Enable query logging to see stats here.

"; + } + + echo "
"; + + if ('on' != $relevanssi_hide_branding ) + relevanssi_sidebar(); +} + +function relevanssi_truncate_logs() { + global $wpdb, $relevanssi_variables; + + $query = "TRUNCATE " . $relevanssi_variables['log_table']; + $wpdb->query($query); + + echo "
Logs clear!
"; +} + +function update_relevanssi_options() { + if (isset($_REQUEST['relevanssi_title_boost'])) { + $boost = floatval($_REQUEST['relevanssi_title_boost']); + update_option('relevanssi_title_boost', $boost); + } + + if (isset($_REQUEST['relevanssi_comment_boost'])) { + $boost = floatval($_REQUEST['relevanssi_comment_boost']); + update_option('relevanssi_comment_boost', $boost); + } + + if (isset($_REQUEST['relevanssi_min_word_length'])) { + $value = intval($_REQUEST['relevanssi_min_word_length']); + if ($value == 0) $value = 3; + update_option('relevanssi_min_word_length', $value); + } + + if (!isset($_REQUEST['relevanssi_admin_search'])) { + $_REQUEST['relevanssi_admin_search'] = "off"; + } + + if (!isset($_REQUEST['relevanssi_excerpts'])) { + $_REQUEST['relevanssi_excerpts'] = "off"; + } + + if (!isset($_REQUEST['relevanssi_show_matches'])) { + $_REQUEST['relevanssi_show_matches'] = "off"; + } + + if (!isset($_REQUEST['relevanssi_throttle'])) { + $_REQUEST['relevanssi_throttle'] = "off"; + } + + if (!isset($_REQUEST['relevanssi_index_author'])) { + $_REQUEST['relevanssi_index_author'] = "off"; + } + + if (!isset($_REQUEST['relevanssi_index_excerpt'])) { + $_REQUEST['relevanssi_index_excerpt'] = "off"; + } + + if (!isset($_REQUEST['relevanssi_log_queries'])) { + $_REQUEST['relevanssi_log_queries'] = "off"; + } + + if (!isset($_REQUEST['relevanssi_log_queries_with_ip'])) { + $_REQUEST['relevanssi_log_queries_with_ip'] = "off"; + } + + if (!isset($_REQUEST['relevanssi_disable_or_fallback'])) { + $_REQUEST['relevanssi_disable_or_fallback'] = "off"; + } + + if (!isset($_REQUEST['relevanssi_hilite_title'])) { + $_REQUEST['relevanssi_hilite_title'] = "off"; + } + + if (!isset($_REQUEST['relevanssi_highlight_docs'])) { + $_REQUEST['relevanssi_highlight_docs'] = "off"; + } + + if (!isset($_REQUEST['relevanssi_highlight_comments'])) { + $_REQUEST['relevanssi_highlight_comments'] = "off"; + } + + if (!isset($_REQUEST['relevanssi_expand_shortcodes'])) { + $_REQUEST['relevanssi_expand_shortcodes'] = "off"; + } + + if (!isset($_REQUEST['relevanssi_respect_exclude'])) { + $_REQUEST['relevanssi_respect_exclude'] = "off"; + } + + if (!isset($_REQUEST['relevanssi_wpml_only_current'])) { + $_REQUEST['relevanssi_wpml_only_current'] = "off"; + } + + if (!isset($_REQUEST['relevanssi_word_boundaries'])) { + $_REQUEST['relevanssi_word_boundaries'] = "off"; + } + + if (isset($_REQUEST['relevanssi_excerpt_length'])) { + $value = intval($_REQUEST['relevanssi_excerpt_length']); + if ($value != 0) { + update_option('relevanssi_excerpt_length', $value); + } + } + + if (isset($_REQUEST['relevanssi_synonyms'])) { + $linefeeds = array("\r\n", "\n", "\r"); + $value = str_replace($linefeeds, ";", $_REQUEST['relevanssi_synonyms']); + $value = stripslashes($value); + update_option('relevanssi_synonyms', $value); + } + + if (isset($_REQUEST['relevanssi_show_matches'])) update_option('relevanssi_show_matches', $_REQUEST['relevanssi_show_matches']); + if (isset($_REQUEST['relevanssi_show_matches_text'])) { + $value = $_REQUEST['relevanssi_show_matches_text']; + $value = str_replace('"', "'", $value); + update_option('relevanssi_show_matches_text', $value); + } + + $post_type_weights = array(); + $index_post_types = array(); + $index_taxonomies_list = array(); + $index_terms_list = array(); + foreach ($_REQUEST as $key => $value) { + if (substr($key, 0, strlen('relevanssi_weight_')) == 'relevanssi_weight_') { + $type = substr($key, strlen('relevanssi_weight_')); + $post_type_weights[$type] = $value; + } + if (substr($key, 0, strlen('relevanssi_index_type_')) == 'relevanssi_index_type_') { + $type = substr($key, strlen('relevanssi_index_type_')); + if ('on' == $value) $index_post_types[$type] = true; + } + if (substr($key, 0, strlen('relevanssi_index_taxonomy_')) == 'relevanssi_index_taxonomy_') { + $type = substr($key, strlen('relevanssi_index_taxonomy_')); + if ('on' == $value) $index_taxonomies_list[$type] = true; + } + if (substr($key, 0, strlen('relevanssi_index_terms_')) == 'relevanssi_index_terms_') { + $type = substr($key, strlen('relevanssi_index_terms_')); + if ('on' == $value) $index_terms_list[$type] = true; + } + } + + if (count($post_type_weights) > 0) { + update_option('relevanssi_post_type_weights', $post_type_weights); + } + + if (count($index_post_types) > 0) { + update_option('relevanssi_index_post_types', array_keys($index_post_types)); + } + + update_option('relevanssi_index_taxonomies_list', array_keys($index_taxonomies_list)); + if (RELEVANSSI_PREMIUM) update_option('relevanssi_index_terms', array_keys($index_terms_list)); + + if (isset($_REQUEST['relevanssi_admin_search'])) update_option('relevanssi_admin_search', $_REQUEST['relevanssi_admin_search']); + if (isset($_REQUEST['relevanssi_excerpts'])) update_option('relevanssi_excerpts', $_REQUEST['relevanssi_excerpts']); + if (isset($_REQUEST['relevanssi_excerpt_type'])) update_option('relevanssi_excerpt_type', $_REQUEST['relevanssi_excerpt_type']); + if (isset($_REQUEST['relevanssi_excerpt_allowable_tags'])) update_option('relevanssi_excerpt_allowable_tags', $_REQUEST['relevanssi_excerpt_allowable_tags']); + if (isset($_REQUEST['relevanssi_log_queries'])) update_option('relevanssi_log_queries', $_REQUEST['relevanssi_log_queries']); + if (isset($_REQUEST['relevanssi_log_queries_with_ip'])) update_option('relevanssi_log_queries_with_ip', $_REQUEST['relevanssi_log_queries_with_ip']); + if (isset($_REQUEST['relevanssi_highlight'])) update_option('relevanssi_highlight', $_REQUEST['relevanssi_highlight']); + if (isset($_REQUEST['relevanssi_highlight_docs'])) update_option('relevanssi_highlight_docs', $_REQUEST['relevanssi_highlight_docs']); + if (isset($_REQUEST['relevanssi_highlight_comments'])) update_option('relevanssi_highlight_comments', $_REQUEST['relevanssi_highlight_comments']); + if (isset($_REQUEST['relevanssi_txt_col'])) update_option('relevanssi_txt_col', $_REQUEST['relevanssi_txt_col']); + if (isset($_REQUEST['relevanssi_bg_col'])) update_option('relevanssi_bg_col', $_REQUEST['relevanssi_bg_col']); + if (isset($_REQUEST['relevanssi_css'])) update_option('relevanssi_css', $_REQUEST['relevanssi_css']); + if (isset($_REQUEST['relevanssi_class'])) update_option('relevanssi_class', $_REQUEST['relevanssi_class']); + if (isset($_REQUEST['relevanssi_cat'])) update_option('relevanssi_cat', $_REQUEST['relevanssi_cat']); + if (isset($_REQUEST['relevanssi_excat'])) update_option('relevanssi_excat', $_REQUEST['relevanssi_excat']); + if (isset($_REQUEST['relevanssi_extag'])) update_option('relevanssi_extag', $_REQUEST['relevanssi_extag']); + if (isset($_REQUEST['relevanssi_index_fields'])) update_option('relevanssi_index_fields', $_REQUEST['relevanssi_index_fields']); + if (isset($_REQUEST['relevanssi_expst'])) update_option('relevanssi_exclude_posts', $_REQUEST['relevanssi_expst']); //added by OdditY + if (isset($_REQUEST['relevanssi_hilite_title'])) update_option('relevanssi_hilite_title', $_REQUEST['relevanssi_hilite_title']); //added by OdditY + if (isset($_REQUEST['relevanssi_index_comments'])) update_option('relevanssi_index_comments', $_REQUEST['relevanssi_index_comments']); //added by OdditY + if (isset($_REQUEST['relevanssi_index_author'])) update_option('relevanssi_index_author', $_REQUEST['relevanssi_index_author']); + if (isset($_REQUEST['relevanssi_index_excerpt'])) update_option('relevanssi_index_excerpt', $_REQUEST['relevanssi_index_excerpt']); + if (isset($_REQUEST['relevanssi_fuzzy'])) update_option('relevanssi_fuzzy', $_REQUEST['relevanssi_fuzzy']); + if (isset($_REQUEST['relevanssi_expand_shortcodes'])) update_option('relevanssi_expand_shortcodes', $_REQUEST['relevanssi_expand_shortcodes']); + if (isset($_REQUEST['relevanssi_implicit_operator'])) update_option('relevanssi_implicit_operator', $_REQUEST['relevanssi_implicit_operator']); + if (isset($_REQUEST['relevanssi_omit_from_logs'])) update_option('relevanssi_omit_from_logs', $_REQUEST['relevanssi_omit_from_logs']); + if (isset($_REQUEST['relevanssi_index_limit'])) update_option('relevanssi_index_limit', $_REQUEST['relevanssi_index_limit']); + if (isset($_REQUEST['relevanssi_disable_or_fallback'])) update_option('relevanssi_disable_or_fallback', $_REQUEST['relevanssi_disable_or_fallback']); + if (isset($_REQUEST['relevanssi_respect_exclude'])) update_option('relevanssi_respect_exclude', $_REQUEST['relevanssi_respect_exclude']); + if (isset($_REQUEST['relevanssi_throttle'])) update_option('relevanssi_throttle', $_REQUEST['relevanssi_throttle']); + if (isset($_REQUEST['relevanssi_throttle_limit'])) update_option('relevanssi_throttle_limit', $_REQUEST['relevanssi_throttle_limit']); + if (isset($_REQUEST['relevanssi_wpml_only_current'])) update_option('relevanssi_wpml_only_current', $_REQUEST['relevanssi_wpml_only_current']); + if (isset($_REQUEST['relevanssi_word_boundaries'])) update_option('relevanssi_word_boundaries', $_REQUEST['relevanssi_word_boundaries']); + if (isset($_REQUEST['relevanssi_default_orderby'])) update_option('relevanssi_default_orderby', $_REQUEST['relevanssi_default_orderby']); + + if (function_exists('relevanssi_update_premium_options')) { + relevanssi_update_premium_options(); + } +} + +function relevanssi_add_stopword($term) { + global $wpdb; + if ('' == $term) return; // do not add empty $term to stopwords - added by renaissancehack + + $n = 0; + $s = 0; + + $terms = explode(',', $term); + if (count($terms) > 1) { + foreach($terms as $term) { + $n++; + $term = trim($term); + $success = relevanssi_add_single_stopword($term); + if ($success) $s++; + } + printf(__("

Successfully added %d/%d terms to stopwords!

", "relevanssi"), $s, $n); + } + else { + // add to stopwords + $success = relevanssi_add_single_stopword($term); + + if ($success) { + printf(__("

Term '%s' added to stopwords!

", "relevanssi"), $term); + } + else { + printf(__("

Couldn't add term '%s' to stopwords!

", "relevanssi"), $term); + } + } +} + +function relevanssi_add_single_stopword($term) { + global $wpdb, $relevanssi_variables; + if ('' == $term) return; + + if (method_exists($wpdb, 'esc_like')) { + $term = $wpdb->esc_like(esc_sql($term)); + } + else { + // Compatibility for pre-4.0 WordPress + $term = like_escape(esc_sql($term)); + } + + $q = $wpdb->prepare("INSERT INTO " . $relevanssi_variables['stopword_table'] . " (stopword) VALUES (%s)", $term); + // Clean: escaped. + $success = $wpdb->query($q); + + if ($success) { + // remove from index + $q = $wpdb->prepare("DELETE FROM " . $relevanssi_variables['relevanssi_table'] . " WHERE term=%s", $term); + $wpdb->query($q); + return true; + } + else { + return false; + } +} + +function relevanssi_remove_all_stopwords() { + global $wpdb, $relevanssi_variables; + + $success = $wpdb->query("TRUNCATE " . $relevanssi_variables['stopword_table']); + + printf(__("

Stopwords removed! Remember to re-index.

", "relevanssi"), $term); +} + +function relevanssi_remove_stopword($term) { + global $wpdb, $relevanssi_variables; + + $q = $wpdb->prepare("DELETE FROM " . $relevanssi_variables['stopword_table'] . " WHERE stopword=%s", $term); + $success = $wpdb->query($q); + + if ($success) { + printf(__("

Term '%s' removed from stopwords! Re-index to get it back to index.

", "relevanssi"), $term); + } + else { + printf(__("

Couldn't remove term '%s' from stopwords!

", "relevanssi"), $term); + } +} + +function relevanssi_common_words() { + global $wpdb, $relevanssi_variables, $wp_version; + + RELEVANSSI_PREMIUM ? $plugin = 'relevanssi-premium' : $plugin = 'relevanssi'; + + echo "
"; + + echo "

" . __("25 most common words in the index", 'relevanssi') . "

"; + + echo "

" . __("These words are excellent stopword material. A word that appears in most of the posts in the database is quite pointless when searching. This is also an easy way to create a completely new stopword list, if one isn't available in your language. Click the icon after the word to add the word to the stopword list. The word will also be removed from the index, so rebuilding the index is not necessary.", 'relevanssi') . "

"; + + $words = $wpdb->get_results("SELECT COUNT(DISTINCT(doc)) as cnt, term + FROM " . $relevanssi_variables['relevanssi_table'] . " GROUP BY term ORDER BY cnt DESC LIMIT 25"); + +?> +
+ + +
    +' )) { + $src = plugins_url('delete.png', $relevanssi_variables['file']); + } + else { + $src = plugins_url($plugin . '/delete.png'); + } + } + else { + // We can't check, so let's assume something sensible + $src = '/wp-content/plugins/' . $plugin . '/delete.png'; + } + + foreach ($words as $word) { + $stop = __('Add to stopwords', 'relevanssi'); + printf('
  • %s (%d)
  • ', $word->term, $word->cnt, $src, $stop, $word->term); + } + echo "
\n
"; + + echo "
"; +} + +function relevanssi_query_log() { + global $wpdb; + + echo '

' . __("Total Searches", 'relevanssi') . '

'; + + echo "
"; + relevanssi_total_queries( __("Totals", 'relevanssi') ); + echo '
'; + + echo '
'; + + echo '

' . __("Common Queries", 'relevanssi') . '

'; + + $lead = __("Here you can see the 20 most common user search queries, how many times those + queries were made and how many results were found for those queries.", 'relevanssi'); + + echo "

$lead

"; + + echo "
"; + relevanssi_date_queries(1, __("Today and yesterday", 'relevanssi')); + echo '
'; + + echo "
"; + relevanssi_date_queries(7, __("Last 7 days", 'relevanssi')); + echo '
'; + + echo "
"; + relevanssi_date_queries(30, __("Last 30 days", 'relevanssi')); + echo '
'; + + echo '
'; + + echo '

' . __("Unsuccessful Queries", 'relevanssi') . '

'; + + echo "
"; + relevanssi_date_queries(1, __("Today and yesterday", 'relevanssi'), 'bad'); + echo '
'; + + echo "
"; + relevanssi_date_queries(7, __("Last 7 days", 'relevanssi'), 'bad'); + echo '
'; + + echo "
"; + relevanssi_date_queries(30, __("Last 30 days", 'relevanssi'), 'bad'); + echo '
'; + + if ( current_user_can('manage_options') ) { + + echo '
'; + $nonce = wp_nonce_field('relevanssi_reset_logs', '_relresnonce', true, false); + echo '

' . __('Reset Logs', 'relevanssi') . "

\n"; + echo "
\n$nonce"; + echo "

"; + printf(__('To reset the logs, type "reset" into the box here %s and click %s', 'relevanssi'), ' ', 'and click '); + echo "

"; + + } + + echo "
"; +} + +function relevanssi_total_queries( $title ) { + global $wpdb, $relevanssi_variables; + $log_table = $relevanssi_variables['log_table']; + + $count = array(); + + $count[__('Today and yesterday', 'relevanssi')] = $wpdb->get_var("SELECT COUNT(id) FROM $log_table WHERE TIMESTAMPDIFF(DAY, time, NOW()) <= 1;"); + $count[__('Last 7 days', 'relevanssi')] = $wpdb->get_var("SELECT COUNT(id) FROM $log_table WHERE TIMESTAMPDIFF(DAY, time, NOW()) <= 7;"); + $count[__('Last 30 days', 'relevanssi')] = $wpdb->get_var("SELECT COUNT(id) FROM $log_table WHERE TIMESTAMPDIFF(DAY, time, NOW()) <= 30;"); + $count[__('Forever', 'relevanssi')] = $wpdb->get_var("SELECT COUNT(id) FROM $log_table;"); + + echo ""; + foreach ($count as $when => $searches) { + echo ""; + } + echo "
$title
" . __('When', 'relevanssi') . "" . __('Searches', 'relevanssi') . "
$when$searches
"; + +} + +function relevanssi_date_queries($d, $title, $version = 'good') { + global $wpdb, $relevanssi_variables; + $log_table = $relevanssi_variables['log_table']; + + if ($version == 'good') + $queries = $wpdb->get_results("SELECT COUNT(DISTINCT(id)) as cnt, query, hits + FROM $log_table + WHERE TIMESTAMPDIFF(DAY, time, NOW()) <= $d + GROUP BY query + ORDER BY cnt DESC + LIMIT 20"); + + if ($version == 'bad') + $queries = $wpdb->get_results("SELECT COUNT(DISTINCT(id)) as cnt, query, hits + FROM $log_table + WHERE TIMESTAMPDIFF(DAY, time, NOW()) <= $d + AND hits = 0 + GROUP BY query + ORDER BY cnt DESC + LIMIT 20"); + + if (count($queries) > 0) { + echo ""; + foreach ($queries as $query) { + $url = get_bloginfo('url'); + $u_q = urlencode($query->query); + echo ""; + } + echo "
$title
" . __('Query', 'relevanssi') . "#" . __('Hits', 'relevanssi') . "
" . esc_attr($query->query) . "" . $query->cnt . "" . $query->hits . "
"; + } +} + +function relevanssi_options_form() { + global $relevanssi_variables, $wpdb; + + wp_enqueue_style('dashboard'); + wp_print_styles('dashboard'); + wp_enqueue_script('dashboard'); + wp_print_scripts('dashboard'); + + $docs_count = $wpdb->get_var("SELECT COUNT(DISTINCT doc) FROM " . $relevanssi_variables['relevanssi_table']); + $terms_count = $wpdb->get_var("SELECT COUNT(*) FROM " . $relevanssi_variables['relevanssi_table']); + $biggest_doc = $wpdb->get_var("SELECT doc FROM " . $relevanssi_variables['relevanssi_table'] . " ORDER BY doc DESC LIMIT 1"); + + $serialize_options = array(); + + $title_boost = get_option('relevanssi_title_boost'); + $serialize_options['relevanssi_title_boost'] = $title_boost; + $comment_boost = get_option('relevanssi_comment_boost'); + $serialize_options['relevanssi_comment_boost'] = $comment_boost; + $admin_search = get_option('relevanssi_admin_search'); + $serialize_options['relevanssi_admin_search'] = $admin_search; + if ('on' == $admin_search) { + $admin_search = 'checked="checked"'; + } + else { + $admin_search = ''; + } + + $index_limit = get_option('relevanssi_index_limit'); + $serialize_options['relevanssi_index_limit'] = $index_limit; + + $excerpts = get_option('relevanssi_excerpts'); + $serialize_options['relevanssi_excerpts'] = $excerpts; + if ('on' == $excerpts) { + $excerpts = 'checked="checked"'; + } + else { + $excerpts = ''; + } + + $excerpt_length = get_option('relevanssi_excerpt_length'); + $serialize_options['relevanssi_excerpt_length'] = $excerpt_length; + $excerpt_type = get_option('relevanssi_excerpt_type'); + $serialize_options['relevanssi_excerpt_type'] = $excerpt_type; + $excerpt_chars = ""; + $excerpt_words = ""; + switch ($excerpt_type) { + case "chars": + $excerpt_chars = 'selected="selected"'; + break; + case "words": + $excerpt_words = 'selected="selected"'; + break; + } + $excerpt_allowable_tags = get_option('relevanssi_excerpt_allowable_tags'); + $serialize_options['relevanssi_excerpt_allowable_tags'] = $excerpt_allowable_tags; + + $log_queries = get_option('relevanssi_log_queries'); + $serialize_options['relevanssi_log_queries'] = $log_queries; + if ('on' == $log_queries) { + $log_queries = 'checked="checked"'; + } + else { + $log_queries = ''; + } + + $log_queries_with_ip = get_option('relevanssi_log_queries_with_ip'); + $serialize_options['relevanssi_log_queries_with_ip'] = $log_queries_with_ip; + if ('on' == $log_queries_with_ip) { + $log_queries_with_ip = 'checked="checked"'; + } + else { + $log_queries_with_ip = ''; + } + + $hide_branding = get_option('relevanssi_hide_branding'); + $serialize_options['relevanssi_hide_branding'] = $hide_branding; + if ('on' == $hide_branding) { + $hide_branding = 'checked="checked"'; + } + else { + $hide_branding = ''; + } + + $highlight = get_option('relevanssi_highlight'); + $serialize_options['relevanssi_highlight'] = $highlight; + $highlight_none = ""; + $highlight_mark = ""; + $highlight_em = ""; + $highlight_strong = ""; + $highlight_col = ""; + $highlight_bgcol = ""; + $highlight_style = ""; + $highlight_class = ""; + switch ($highlight) { + case "no": + $highlight_none = 'selected="selected"'; + break; + case "mark": + $highlight_mark = 'selected="selected"'; + break; + case "em": + $highlight_em = 'selected="selected"'; + break; + case "strong": + $highlight_strong = 'selected="selected"'; + break; + case "col": + $highlight_col = 'selected="selected"'; + break; + case "bgcol": + $highlight_bgcol = 'selected="selected"'; + break; + case "css": + $highlight_style = 'selected="selected"'; + break; + case "class": + $highlight_class = 'selected="selected"'; + break; + } + + $index_fields = get_option('relevanssi_index_fields'); + $serialize_options['relevanssi_index_fields'] = $index_fields; + + $txt_col = get_option('relevanssi_txt_col'); + $serialize_options['relevanssi_txt_col'] = $txt_col; + $bg_col = get_option('relevanssi_bg_col'); + $serialize_options['relevanssi_bg_col'] = $bg_col; + $css = get_option('relevanssi_css'); + $serialize_options['relevanssi_css'] = $css; + $class = get_option('relevanssi_class'); + $serialize_options['relevanssi_class'] = $class; + + $cat = get_option('relevanssi_cat'); + $serialize_options['relevanssi_cat'] = $cat; + $excat = get_option('relevanssi_excat'); + $serialize_options['relevanssi_excat'] = $excat; + $extag = get_option('relevanssi_extag'); + $serialize_options['relevanssi_extag'] = $extag; + + $fuzzy = get_option('relevanssi_fuzzy'); + $serialize_options['relevanssi_fuzzy'] = $fuzzy; + $fuzzy_sometimes = ('sometimes' == $fuzzy ? 'selected="selected"' : ''); + $fuzzy_always = ('always' == $fuzzy ? 'selected="selected"' : ''); + $fuzzy_never = ('never' == $fuzzy ? 'selected="selected"' : ''); + + $implicit = get_option('relevanssi_implicit_operator'); + $serialize_options['relevanssi_implicit_operator'] = $implicit; + $implicit_and = ('AND' == $implicit ? 'selected="selected"' : ''); + $implicit_or = ('OR' == $implicit ? 'selected="selected"' : ''); + + $expand_shortcodes = ('on' == get_option('relevanssi_expand_shortcodes') ? 'checked="checked"' : ''); + $serialize_options['relevanssi_expand_shortcodes'] = get_option('relevanssi_expand_shortcodes'); + $disablefallback = ('on' == get_option('relevanssi_disable_or_fallback') ? 'checked="checked"' : ''); + $serialize_options['relevanssi_disable_or_fallback'] = get_option('relevanssi_disable_or_fallback'); + + $throttle = ('on' == get_option('relevanssi_throttle') ? 'checked="checked"' : ''); + $serialize_options['relevanssi_throttle'] = get_option('relevanssi_throttle'); + + $throttle_limit = get_option('relevanssi_throttle_limit'); + $serialize_options['relevanssi_throttle_limit'] = $throttle_limit; + + $omit_from_logs = get_option('relevanssi_omit_from_logs'); + $serialize_options['relevanssi_omit_from_logs'] = $omit_from_logs; + + $synonyms = get_option('relevanssi_synonyms'); + $serialize_options['relevanssi_synonyms'] = $synonyms; + isset($synonyms) ? $synonyms = str_replace(';', "\n", $synonyms) : $synonyms = ""; + + //Added by OdditY -> + $expst = get_option('relevanssi_exclude_posts'); + $serialize_options['relevanssi_exclude_posts'] = $expst; + $hititle = ('on' == get_option('relevanssi_hilite_title') ? 'checked="checked"' : ''); + $serialize_options['relevanssi_hilite_title'] = get_option('relevanssi_hilite_title'); + $incom_type = get_option('relevanssi_index_comments'); + $serialize_options['relevanssi_index_comments'] = $incom_type; + $incom_type_all = ""; + $incom_type_normal = ""; + $incom_type_none = ""; + switch ($incom_type) { + case "all": + $incom_type_all = 'selected="selected"'; + break; + case "normal": + $incom_type_normal = 'selected="selected"'; + break; + case "none": + $incom_type_none = 'selected="selected"'; + break; + }//added by OdditY END <- + + $highlight_docs = ('on' == get_option('relevanssi_highlight_docs') ? 'checked="checked"' : ''); + $highlight_coms = ('on' == get_option('relevanssi_highlight_comments') ? 'checked="checked"' : ''); + $serialize_options['relevanssi_highlight_docs'] = get_option('relevanssi_highlight_docs'); + $serialize_options['relevanssi_highlight_comments'] = get_option('relevanssi_highlight_comments'); + + $respect_exclude = ('on' == get_option('relevanssi_respect_exclude') ? 'checked="checked"' : ''); + $serialize_options['relevanssi_respect_exclude'] = get_option('relevanssi_respect_exclude'); + + $min_word_length = get_option('relevanssi_min_word_length'); + $serialize_options['relevanssi_min_word_length'] = $min_word_length; + + $index_author = ('on' == get_option('relevanssi_index_author') ? 'checked="checked"' : ''); + $serialize_options['relevanssi_index_author'] = get_option('relevanssi_index_author'); + $index_excerpt = ('on' == get_option('relevanssi_index_excerpt') ? 'checked="checked"' : ''); + $serialize_options['relevanssi_index_excerpt'] = get_option('relevanssi_index_excerpt'); + + $show_matches = ('on' == get_option('relevanssi_show_matches') ? 'checked="checked"' : ''); + $serialize_options['relevanssi_show_matches'] = get_option('relevanssi_show_matches'); + $show_matches_text = stripslashes(get_option('relevanssi_show_matches_text')); + $serialize_options['relevanssi_show_matches_text'] = get_option('relevanssi_show_matches_text'); + + $wpml_only_current = ('on' == get_option('relevanssi_wpml_only_current') ? 'checked="checked"' : ''); + $serialize_options['relevanssi_wpml_only_current'] = get_option('relevanssi_wpml_only_current'); + + $word_boundaries = ('on' == get_option('relevanssi_word_boundaries') ? 'checked="checked"' : ''); + $serialize_options['relevanssi_word_boundaries'] = get_option('relevanssi_word_boundaries'); + + $post_type_weights = get_option('relevanssi_post_type_weights'); + $serialize_options['relevanssi_post_type_weights'] = $post_type_weights; + + $index_post_types = get_option('relevanssi_index_post_types'); + if (empty($index_post_types)) $index_post_types = array(); + $serialize_options['relevanssi_index_post_types'] = $index_post_types; + + $index_taxonomies_list = get_option('relevanssi_index_taxonomies_list'); + if (empty($index_taxonomies_list)) $index_taxonomies_list = array(); + $serialize_options['relevanssi_index_taxonomies_list'] = $index_taxonomies_list; + + $orderby = get_option('relevanssi_default_orderby'); + $serialize_options['relevanssi_default_orderby'] = $orderby; + $orderby_relevance = ('relevance' == $orderby ? 'selected="selected"' : ''); + $orderby_date = ('post_date' == $orderby ? 'selected="selected"' : ''); + + if (RELEVANSSI_PREMIUM) { + $api_key = get_option('relevanssi_api_key'); + $serialize_options['relevanssi_api_key'] = $api_key; + + $link_boost = get_option('relevanssi_link_boost'); + $serialize_options['relevanssi_link_boost'] = $link_boost; + + $intlinks = get_option('relevanssi_internal_links'); + $serialize_options['relevanssi_internal_links'] = $intlinks; + $intlinks_strip = ('strip' == $intlinks ? 'selected="selected"' : ''); + $intlinks_nostrip = ('nostrip' == $intlinks ? 'selected="selected"' : ''); + $intlinks_noindex = ('noindex' == $intlinks ? 'selected="selected"' : ''); + + $highlight_docs_ext = ('on' == get_option('relevanssi_highlight_docs_external') ? 'checked="checked"' : ''); + $serialize_options['relevanssi_highlight_docs_external'] = get_option('relevanssi_highlight_docs_external'); + + $thousand_separator = get_option('relevanssi_thousand_separator'); + $serialize_options['relevanssi_thousand_separator'] = $thousand_separator; + + $disable_shortcodes = get_option('relevanssi_disable_shortcodes'); + $serialize_options['relevanssi_disable_shortcodes'] = $disable_shortcodes; + + $index_users = ('on' == get_option('relevanssi_index_users') ? 'checked="checked"' : ''); + $serialize_options['relevanssi_index_users'] = get_option('relevanssi_index_users'); + + $index_user_fields = get_option('relevanssi_index_user_fields'); + $serialize_options['relevanssi_index_user_fields'] = $index_user_fields; + + $index_subscribers = ('on' == get_option('relevanssi_index_subscribers') ? 'checked="checked"' : ''); + $serialize_options['relevanssi_index_subscribers'] = get_option('relevanssi_index_subscribers'); + + $index_synonyms = ('on' == get_option('relevanssi_index_synonyms') ? 'checked="checked"' : ''); + $serialize_options['relevanssi_index_synonyms'] = get_option('relevanssi_index_synonyms'); + + $index_taxonomies = ('on' == get_option('relevanssi_index_taxonomies') ? 'checked="checked"' : ''); + $serialize_options['relevanssi_index_taxonomies'] = get_option('relevanssi_index_taxonomies'); + + $index_terms = get_option('relevanssi_index_terms'); + if (empty($index_terms)) $index_terms = array(); + $serialize_options['relevanssi_index_terms'] = $index_terms; + + $hide_post_controls = ('on' == get_option('relevanssi_hide_post_controls') ? 'checked="checked"' : ''); + $serialize_options['relevanssi_hide_post_controls'] = get_option('relevanssi_hide_post_controls'); + + $recency_bonus_array = get_option('relevanssi_recency_bonus'); + $serialize_options['recency_bonus'] = $recency_bonus_array; + $recency_bonus = $recency_bonus_array['bonus']; + $recency_bonus_days = $recency_bonus_array['days']; + + $mysql_columns = get_option('relevanssi_mysql_columns'); + $serialize_options['relevanssi_mysql_columns'] = $mysql_columns; + + $serialized_options = serialize($serialize_options); + } + + echo "
"; + + if (RELEVANSSI_PREMIUM) { + echo "
"; + } + else { + echo ""; + } + + wp_nonce_field(plugin_basename($relevanssi_variables['file']), 'relevanssi_options'); ?> + +

| + | + | + | + | + | + | + | + | +' . __("Import/export options", "relevanssi") . ''; + } + else { + echo '' . __('Buy Relevanssi Premium', 'relevanssi') . ''; + } +?> +

+ +

+

+ ' class='button-primary' /> + + ,

+ +" . __("WARNING: You've chosen no post types to index. Nothing will be indexed. Choose some post types to index.", 'relevanssi') . "

"; + } +?> + +

indexing options. If you can't finish indexing with one go, use 'Continue indexing' to finish the job. You can change the number of documents to add until you find the largest amount you can add with one go. See 'State of the Index' below to find out how many documents actually go into the index.", 'relevanssi') ?>

+ +

+

+ :
+ :
+ : +

+ +

+ + + + + + +

+ +
+ + +

+ +
+ + +

+ +
+ + +

+ +
+ + +

+ + + +
+ This does not work well when sorting results by date. The throttle can end up cutting off recent posts to favour more relevant posts.", 'relevanssi'); ?> + +

+ +
+ this knowledge base entry.", 'relevanssi'), 'http://www.relevanssi.com/knowledge-base/posts-per-page/'); ?> + +

+ + + +

+ +

+ + + + + + + + + + + + + + + + + + + + + +
+ + + + + +
+ + + + + +
+ +

+ + + + +

+ + + + + + +

+ + + + +

+ + + + +

+ + + + +" . __("If you enable logs, you can see what your users are searching for. You can prevent your own searches from getting in the logs with the omit feature.", "relevanssi") . "

"; + } + else { + echo "

" . __("If you enable logs, you can see what your users are searching for. Logs are also needed to use the 'Did you mean?' feature. You can prevent your own searches from getting in the logs with the omit feature.", "relevanssi") . "

"; + } +?> + + + +

+ +
+ <input type='hidden' name='cats' value='list of cats and tags' /> in your search form. The input field will overrun this setting.", 'relevanssi'); ?> + +

+ +
+ + +

+ +
+ + +

+ +
+" . __("Enter a comma-separated list of post/page IDs that are excluded from search results. This only works here, you can't use the input field option (WordPress doesn't pass custom parameters there). You can also use a checkbox on post/page edit pages to remove posts from index.", 'relevanssi') . ""; + } + else { + echo "" . __("Enter a comma-separated list of post/page IDs that are excluded from search results. This only works here, you can't use the input field option (WordPress doesn't pass custom parameters there).", 'relevanssi') . ""; + } +?> + +

+ +
+ + +

+ +
+ + +

+ + +
+ + +

+ + +
+ + +

+ + + + +

+ + + + +

+ +
+ +
+ + + +
+ + + + +
+ + + + +
+ + + + + + +
+ + + + +

+
+ +
+ +
+ + + + +
+ + + + +
+ + + + +
+ + + + +
+ +
+
+ + ' class='button button-primary' /> + +

+ +

+ + + + + + + + + + '0')); + $pt_2 = get_post_types(array('exclude_from_search' => false)); + $public_types = array_merge($pt_1, $pt_2); + $post_types = get_post_types(); + foreach ($post_types as $type) { + if ('nav_menu_item' == $type) continue; + if ('revision' == $type) continue; + if (in_array($type, $index_post_types)) { + $checked = 'checked="checked"'; + } + else { + $checked = ''; + } + $label = sprintf(__("%s", 'relevanssi'), $type); + in_array($type, $public_types) ? $public = __('yes', 'relevanssi') : $public = __('no', 'relevanssi'); + + echo << + + + + +EOH; + } + ?> +
+ $label + + + + $public +
+ +

+ +

+ + + + + + + + + + name == 'nav_menu') continue; + if ($taxonomy->name == 'link_category') continue; + if (in_array($taxonomy->name, $index_taxonomies_list)) { + $checked = 'checked="checked"'; + } + else { + $checked = ''; + } + $label = sprintf(__("%s", 'relevanssi'), $taxonomy->name); + $taxonomy->public ? $public = __('yes', 'relevanssi') : $public = __('no', 'relevanssi'); + $type = $taxonomy->name; + + echo << + + + + +EOH; + } + ?> +
+ $label + + + + $public +
+ +

+ +

+ +
+ + +

+ + + +
+ + +

+ + + +
+ + +

+ +
+ + +

+ +
+ Remember to rebuild the index if you change this option!", 'relevanssi'); ?> + +

+ +
+ + +

+ + + + + + + + ' class='button button-primary' /> + + ' class='button' /> + +

+ +

+ +

+ + + + ' class='button' /> + +

+ + + + + +
+
+ + Enter a word here to add it to the list of stopwords. The word will automatically be removed from the index, so re-indexing is not necessary. You can enter many words at the same time, separate words with commas.

", 'relevanssi'); + +?> +Here's a list of stopwords in the database. Click a word to remove it from stopwords. Removing stopwords won't automatically return them to index, so you need to re-index all posts after removing stopwords to get those words back to index.", 'relevanssi'); + + if (function_exists("plugins_url")) { + if (version_compare($wp_version, '2.8dev', '>' )) { + $src = plugins_url('delete.png', $relevanssi_variables['file']); + } + else { + $src = plugins_url($plugin . '/delete.png'); + } + } + else { + // We can't check, so let's assume something sensible + $src = '/wp-content/plugins/' . $plugin . '/delete.png'; + } + + echo "
    "; + $results = $wpdb->get_results("SELECT * FROM " . $relevanssi_variables['stopword_table']); + $exportlist = array(); + foreach ($results as $stopword) { + $sw = $stopword->stopword; + printf('
  • ', esc_attr($sw)); + array_push($exportlist, $sw); + } + echo "
"; + +?> +

+ +

+ + + diff --git a/mu-plugins/relevanssi/lib/search.php b/mu-plugins/relevanssi/lib/search.php new file mode 100644 index 00000000..b06fc1df --- /dev/null +++ b/mu-plugins/relevanssi/lib/search.php @@ -0,0 +1,1185 @@ +is_admin instead of is_admin() to help with Ajax queries that + // use 'admin_ajax' hook (which sets is_admin() to true whether it's an admin search + // or not. + if (is_search() && $wp_query->is_admin) { + $search_ok = false; // but if this is an admin search, reconsider + if ($admin_search) $search_ok = true; // yes, we can search! + } + + if ($wp_query->is_admin && empty($wp_query->query_vars['s'])) { + $search_ok = false; + } + + // Disable search in media library search + if ($search_ok) { + if ($wp_query->query_vars['post_type'] == 'attachment' && $wp_query->query_vars['post_status'] == 'inherit,private') { + $search_ok = false; + } + } + + $search_ok = apply_filters('relevanssi_search_ok', $search_ok); + + if ($relevanssi_active) { + $search_ok = false; // Relevanssi is already in action + } + + if ($search_ok) { + $wp_query = apply_filters('relevanssi_modify_wp_query', $wp_query); + $posts = relevanssi_do_query($wp_query); + } + + return $posts; +} + +// This is my own magic working. +function relevanssi_search($args) { + global $wpdb, $relevanssi_variables; + $relevanssi_table = $relevanssi_variables['relevanssi_table']; + + $filtered_args = apply_filters( 'relevanssi_search_filters', $args ); + extract($filtered_args); + + $hits = array(); + + $query_restrictions = ""; + if (!isset($tax_query_relation)) $tax_query_relation = "or"; + $tax_query_relation = strtolower($tax_query_relation); + $term_tax_id = array(); + $term_tax_ids = array(); + $not_term_tax_ids = array(); + $and_term_tax_ids = array(); + + if (is_array($tax_query)) { + foreach ($tax_query as $row) { + if ($row['field'] == 'slug') { + $slug = $row['terms']; + $numeric_slugs = array(); + $slug_in = null; + if (is_array($slug)) { + $slugs = array(); + $term_id = array(); + foreach ($slug as $t_slug) { + $term = get_term_by('slug', $t_slug, $row['taxonomy']); + if (!$term && is_numeric($t_slug)) { + $numeric_slugs[] = "'$t_slug'"; + } + else { + $t_slug = sanitize_title($t_slug); + $term_id[] = $term->term_id; + $slugs[] = "'$t_slug'"; + } + } + if (!empty($slugs)) $slug_in = implode(',', $slugs); + } + else { + $term = get_term_by('slug', $slug, $row['taxonomy']); + if (!$term && is_numeric($slug)) { + $numeric_slugs[] = $slug; + } + else { + $term_id = $term->term_id; + $slug_in = "'$slug'"; + } + } + if (!empty($slug_in)) { + $row_taxonomy = sanitize_title($row['taxonomy']); + $tt_q = "SELECT tt.term_taxonomy_id + FROM $wpdb->term_taxonomy AS tt + LEFT JOIN $wpdb->terms AS t ON (tt.term_id=t.term_id) + WHERE tt.taxonomy = '$row_taxonomy' AND t.slug IN ($slug_in)"; + // Clean: $row_taxonomy is sanitized, each slug in $slug_in is sanitized + $term_tax_id = $wpdb->get_col($tt_q); + } + if (!empty($numeric_slugs)) $row['field'] = 'id'; + } + if ($row['field'] == 'id' || $row['field'] == 'term_id') { + $id = $row['terms']; + $term_id = $id; + if (is_array($id)) { + $numeric_values = array(); + foreach ($id as $t_id) { + if (is_numeric($t_id)) $numeric_values[] = $t_id; + } + $id = implode(',', $numeric_values); + } + $row_taxonomy = sanitize_title($row['taxonomy']); + $tt_q = "SELECT tt.term_taxonomy_id + FROM $wpdb->term_taxonomy AS tt + LEFT JOIN $wpdb->terms AS t ON (tt.term_id=t.term_id) + WHERE tt.taxonomy = '$row_taxonomy' AND t.term_id IN ($id)"; + // Clean: $row_taxonomy is sanitized, $id is checked to be numeric + $id_term_tax_id = $wpdb->get_col($tt_q); + if (!empty($term_tax_id) && is_array($term_tax_id)) { + $term_tax_id = array_unique(array_merge($term_tax_id, $id_term_tax_id)); + } + else { + $term_tax_id = $id_term_tax_id; + } + } + + if (!isset($row['include_children']) || $row['include_children'] == true) { + if (!is_array($term_id)) { + $term_id = array($term_id); + } + foreach ($term_id as $t_id) { + $kids = get_term_children($t_id, $row['taxonomy']); + foreach ($kids as $kid) { + $term = get_term_by('id', $kid, $row['taxonomy']); + $term_tax_id[] = relevanssi_get_term_tax_id('id', $kid, $row['taxonomy']); + } + } + } + + $term_tax_id = array_unique($term_tax_id); + if (!empty($term_tax_id)) { + $n = count($term_tax_id); + $term_tax_id = implode(',', $term_tax_id); + + $tq_operator = 'IN'; + if (isset($row['operator'])) $tq_operator = strtoupper($row['operator']); + if ($tq_operator != 'IN' && $tq_operator != 'NOT IN' && $tq_operator != 'AND') $tq_operator = 'IN'; + if ($tax_query_relation == 'and') { + if ($tq_operator == 'AND') { + $query_restrictions .= " AND relevanssi.doc IN ( + SELECT ID FROM $wpdb->posts WHERE 1=1 + AND ( + SELECT COUNT(1) + FROM $wpdb->term_relationships AS tr + WHERE tr.term_taxonomy_id IN ($term_tax_id) + AND tr.object_id = $wpdb->posts.ID ) = $n + )"; + // Clean: $term_tax_id and $n are Relevanssi-generated + } + else { + $query_restrictions .= " AND relevanssi.doc $tq_operator (SELECT DISTINCT(tr.object_id) FROM $wpdb->term_relationships AS tr + WHERE tr.term_taxonomy_id IN ($term_tax_id))"; + // Clean: all variables are Relevanssi-generated + } + } + else { + if ($tq_operator == 'IN') $term_tax_ids[] = $term_tax_id; + if ($tq_operator == 'NOT IN') $not_term_tax_ids[] = $term_tax_id; + if ($tq_operator == 'AND') $and_term_tax_ids[] = $term_tax_id; + } + } + else { + global $wp_query; + $wp_query->is_category = false; + } + } + if ($tax_query_relation == 'or') { + $term_tax_ids = array_unique($term_tax_ids); + if (count($term_tax_ids) > 0) { + $term_tax_ids = implode(',', $term_tax_ids); + $query_restrictions .= " AND relevanssi.doc IN (SELECT DISTINCT(tr.object_id) FROM $wpdb->term_relationships AS tr + WHERE tr.term_taxonomy_id IN ($term_tax_ids))"; + // Clean: all variables are Relevanssi-generated + } + if (count($not_term_tax_ids) > 0) { + $not_term_tax_ids = implode(',', $not_term_tax_ids); + $query_restrictions .= " AND relevanssi.doc NOT IN (SELECT DISTINCT(tr.object_id) FROM $wpdb->term_relationships AS tr + WHERE tr.term_taxonomy_id IN ($not_term_tax_ids))"; + // Clean: all variables are Relevanssi-generated + } + if (count($and_term_tax_ids) > 0) { + $and_term_tax_ids = implode(',', $and_term_tax_ids); + $n = count(explode(',', $and_term_tax_ids)); + $query_restrictions .= " AND relevanssi.doc IN ( + SELECT ID FROM $wpdb->posts WHERE 1=1 + AND ( + SELECT COUNT(1) + FROM $wpdb->term_relationships AS tr + WHERE tr.term_taxonomy_id IN ($and_term_tax_ids) + AND tr.object_id = $wpdb->posts.ID ) = $n + )"; + // Clean: all variables are Relevanssi-generated + } + } + } + + if (is_array($post_query)) { + if (!empty($post_query['in'])) { + $valid_values = array(); + foreach($post_query['in'] as $post_in_id) { + if (is_numeric($post_in_id)) $valid_values[] = $post_in_id; + } + $posts = implode(',', $valid_values); + if (!empty($posts)) $query_restrictions .= " AND relevanssi.doc IN ($posts)"; + // Clean: $posts is checked to be integers + } + if (!empty($post_query['not in'])) { + $valid_values = array(); + foreach($post_query['not in'] as $post_not_in_id) { + if (is_numeric($post_not_in_id)) $valid_values[] = $post_not_in_id; + } + $posts = implode(',', $valid_values); + if (!empty($posts)) $query_restrictions .= " AND relevanssi.doc NOT IN ($posts)"; + // Clean: $posts is checked to be integers + } + } + + if (is_array($meta_query)) { + isset($meta_query['relation']) ? $meta_relation = strtoupper($meta_query['relation']) : $meta_relation = strtoupper(apply_filters('relevanssi_default_meta_query_relation', 'AND')); + if ($meta_relation != 'AND' && $meta_relation != 'OR') $meta_relation = "AND"; + // legal values: AND and OR + + $meta_query_restrictions = ""; + foreach ($meta_query as $array_key => $meta) { + if ($array_key === 'relation') { + continue; + } + + if (!empty($meta['key'])) { + $key = "postmeta.meta_key = '" . esc_sql($meta['key']) . "'"; + } + else { + $key = ''; + } + + isset($meta['compare']) ? $compare = strtoupper($meta['compare']) : $compare = '='; + + if (isset($meta['type'])) { + if (strtoupper($meta['type']) == 'NUMERIC') $meta['type'] = "SIGNED"; + if (!in_array(strtoupper($meta['type']), array('NUMERIC', 'BINARY', 'CHAR', 'DATE', 'DATETIME', 'DECIMAL', 'SIGNED', 'TIME', 'UNSIGNED'))) { + // illegal value + $meta_value = 'postmeta.meta_value'; + } + else { + // legal value + $meta_value = "CAST(postmeta.meta_value AS " . $meta['type'] . ")"; + } + } + else { + $meta_value = 'postmeta.meta_value'; + } + + if ($compare == 'BETWEEN' || $compare == 'NOT BETWEEN') { + if (!is_array($meta['value'])) continue; + if (count($meta['value']) < 2) continue; + $compare == 'BETWEEN' ? $compare = "IN" : $compare = "NOT IN"; + $low_value = esc_sql($meta['value'][0]); + $high_value = esc_sql($meta['value'][1]); + // No need to check that low is lower than high, because the meta query + // doesn't work, if the values are wrong. + + !empty($key) ? $and = " AND " : $and = ""; + $meta_query_restrictions .= " $meta_relation relevanssi.doc $compare ( + SELECT DISTINCT(postmeta.post_id) FROM $wpdb->postmeta AS postmeta + WHERE $key $and $meta_value BETWEEN $low_value AND $high_value)"; + // Clean: values either Relevanssi-generated or escaped + } + else if ($compare == 'EXISTS' || $compare == 'NOT EXISTS') { + $compare == 'EXISTS' ? $compare = "IN" : $compare = "NOT IN"; + $meta_query_restrictions .= " $meta_relation relevanssi.doc $compare ( + SELECT DISTINCT(postmeta.post_id) FROM $wpdb->postmeta AS postmeta + WHERE $key)"; + // Clean: values either Relevanssi-generated or escaped + } + else if ($compare == 'IN' || $compare == 'NOT IN') { + if (!is_array($meta['value'])) continue; + $values = array(); + foreach ($meta['value'] as $value) { + $value = esc_sql($value); + $values[] = "'$value'"; + } + $values = implode(',', $values); + !empty($key) ? $and = " AND " : $and = ""; + $meta_query_restrictions .= " $meta_relation relevanssi.doc IN ( + SELECT DISTINCT(postmeta.post_id) FROM $wpdb->postmeta AS postmeta + WHERE $key $and $meta_value $compare ($values))"; + // Clean: values either Relevanssi-generated or escaped + } + else if ($compare == 'LIKE') { + if (method_exists($wpdb, 'esc_like')) { + $escaped_value = $wpdb->esc_like($meta['value']); + } + else { + // Compatibility for pre-4.0 WordPress + $escaped_value = like_escape($meta['value']); + } + isset($meta['value']) ? $value = " " . esc_sql($meta_value) . " " . $meta['compare'] . " '%" . $escaped_value . "%' " : $value = ''; + (!empty($key) && !empty($value)) ? $and = " AND " : $and = ""; + if (empty($key) && empty($and) && empty($value)) { + // do nothing + } + else { + $meta_query_restrictions .= " $meta_relation relevanssi.doc IN ( + SELECT DISTINCT(postmeta.post_id) FROM $wpdb->postmeta AS postmeta + WHERE $key $and $value)"; + // Clean: values either Relevanssi-generated or escaped + } + } + else { + isset($meta['value']) ? $value = " " . esc_sql($meta_value) . " " . $meta['compare'] . " '" . esc_sql($meta['value']) . "' " : $value = ''; + (!empty($key) && !empty($value)) ? $and = " AND " : $and = ""; + if (empty($key) && empty($and) && empty($value)) { + // do nothing + } + else { + $meta_query_restrictions .= " $meta_relation relevanssi.doc IN ( + SELECT DISTINCT(postmeta.post_id) FROM $wpdb->postmeta AS postmeta + WHERE $key $and $value)"; + // Clean: values either Relevanssi-generated or escaped + } + } + } + + if ($meta_relation == 'OR') { + $meta_query_restrictions = substr($meta_query_restrictions, 3); // strip the first OR + $meta_query_restrictions = "AND (" . $meta_query_restrictions . ") "; + } + $query_restrictions .= $meta_query_restrictions; + } + + if (!empty($date_query)) { + if (is_object($date_query) && method_exists($date_query, 'get_sql')) { + $sql = $date_query->get_sql(); // AND ( the query itself ) + $query_restrictions .= " AND relevanssi.doc IN ( SELECT DISTINCT(ID) FROM $wpdb->posts WHERE 1 $sql )"; + // Clean: $sql generated by $date_query->get_sql() query + } + } + + if (!$post_type && get_option('relevanssi_respect_exclude') == 'on') { + if (function_exists('get_post_types')) { + $pt_1 = get_post_types(array('exclude_from_search' => '0')); + $pt_2 = get_post_types(array('exclude_from_search' => false)); + $post_type = implode(',', array_merge($pt_1, $pt_2)); + } + } + + if ($post_type) { + if ($post_type == -1) $post_type = null; // Facetious sets post_type to -1 if not selected + if (!is_array($post_type)) { + $post_types = esc_sql(explode(',', $post_type)); + } + else { + $post_types = esc_sql($post_type); + } + $post_type = count($post_types) ? "'" . implode( "', '", $post_types) . "'" : 'NULL'; + } + + if ($post_status) { + if (!is_array($post_status)) { + $post_statuses = esc_sql(explode(',', $post_status)); + } + else { + $post_statuses = esc_sql($post_status); + } + + $post_status = count($post_statuses) ? "'" . implode( "', '", $post_statuses) . "'" : 'NULL'; + } + + //Added by OdditY: + //Exclude Post_IDs (Pages) for non-admin search -> + $postex = ''; + if (!empty($expost)) { + if ($expost != "") { + $aexpids = explode(",",$expost); + foreach ($aexpids as $exid){ + $exid = esc_sql(trim($exid, ' -')); + $postex .= " AND relevanssi.doc != '$exid'"; + // Clean: escaped + } + } + } + // <- OdditY End + + if ($expost) { //added by OdditY + $query_restrictions .= $postex; + } + + $remove_stopwords = true; + $phrases = relevanssi_recognize_phrases($q); + + if (function_exists('relevanssi_recognize_negatives')) { + $negative_terms = relevanssi_recognize_negatives($q); + } + else { + $negative_terms = false; + } + + if (function_exists('relevanssi_recognize_positives')) { + $positive_terms = relevanssi_recognize_positives($q); + } + else { + $positive_terms = false; + } + + $terms = relevanssi_tokenize($q, $remove_stopwords); + + if (count($terms) < 1) { + // Tokenizer killed all the search terms. + return $hits; + } + $terms = array_keys($terms); // don't care about tf in query + + if ($negative_terms) { + $terms = array_diff($terms, $negative_terms); + if (count($terms) < 1) { + return $hits; + } + } + + // Go get the count from the options table, but keep running the full query if it's not available + $D = get_option('relevanssi_doc_count'); + if (!$D || $D < 1) { + $D = $wpdb->get_var("SELECT COUNT(DISTINCT(relevanssi.doc)) FROM $relevanssi_table AS relevanssi"); + // Clean: no external inputs + update_option('relevanssi_doc_count', $D); + } + + $total_hits = 0; + + $title_matches = array(); + $tag_matches = array(); + $comment_matches = array(); + $link_matches = array(); + $body_matches = array(); + $scores = array(); + $term_hits = array(); + + $fuzzy = get_option('relevanssi_fuzzy'); + + if (function_exists('relevanssi_negatives_positives')) { + $query_restrictions .= relevanssi_negatives_positives($negative_terms, $positive_terms, $relevanssi_table); + // Clean: escaped in the function + } + + if (!empty($author)) { + $author_in = array(); + $author_not_in = array(); + foreach ($author as $id) { + if (!is_numeric($id)) continue; + if ($id > 0) { + $author_in[] = $id; + } + else { + $author_not_in[] = abs($id); + } + } + if (count($author_in) > 0) { + $authors = implode(',', $author_in); + $query_restrictions .= " AND relevanssi.doc IN (SELECT DISTINCT(posts.ID) FROM $wpdb->posts AS posts + WHERE posts.post_author IN ($authors))"; + // Clean: $authors is always just numbers + } + if (count($author_not_in) > 0) { + $authors = implode(',', $author_not_in); + $query_restrictions .= " AND relevanssi.doc NOT IN (SELECT DISTINCT(posts.ID) FROM $wpdb->posts AS posts + WHERE posts.post_author IN ($authors))"; + // Clean: $authors is always just numbers + } + } + + if ($post_type) { + // the -1 is there to get user profiles and category pages + $query_restrictions .= " AND ((relevanssi.doc IN (SELECT DISTINCT(posts.ID) FROM $wpdb->posts AS posts + WHERE posts.post_type IN ($post_type))) OR (doc = -1))"; + // Clean: $post_type is escaped + } + + if ($post_status) { + // the -1 is there to get user profiles and category pages + $query_restrictions .= " AND ((relevanssi.doc IN (SELECT DISTINCT(posts.ID) FROM $wpdb->posts AS posts + WHERE posts.post_status IN ($post_status))) OR (doc = -1))"; + // Clean: $post_status is escaped + } + + if ($phrases) { + $query_restrictions .= " $phrases"; + // Clean: $phrases is escaped earlier + } + + if (isset($_REQUEST['by_date'])) { + $n = $_REQUEST['by_date']; + + $u = substr($n, -1, 1); + switch ($u) { + case 'h': + $unit = "HOUR"; + break; + case 'd': + $unit = "DAY"; + break; + case 'm': + $unit = "MONTH"; + break; + case 'y': + $unit = "YEAR"; + break; + case 'w': + $unit = "WEEK"; + break; + default: + $unit = "DAY"; + } + + $n = preg_replace('/[hdmyw]/', '', $n); + + if (is_numeric($n)) { + $query_restrictions .= " AND relevanssi.doc IN (SELECT DISTINCT(posts.ID) FROM $wpdb->posts AS posts + WHERE posts.post_date > DATE_SUB(NOW(), INTERVAL $n $unit))"; + // Clean: $n is always numeric, $unit is Relevanssi-generated + } + } + + $query_restrictions = apply_filters('relevanssi_where', $query_restrictions); // Charles St-Pierre + $query_join = apply_filters('relevanssi_join', ''); + + $no_matches = true; + if ("always" == $fuzzy) { + $o_term_cond = apply_filters('relevanssi_fuzzy_query', "(relevanssi.term LIKE '#term#%' OR relevanssi.term_reverse LIKE CONCAT(REVERSE('#term#'), '%')) "); + } + else { + $o_term_cond = " relevanssi.term = '#term#' "; + } + + $post_type_weights = get_option('relevanssi_post_type_weights'); + if (function_exists('relevanssi_get_recency_bonus')) { + list($recency_bonus, $recency_cutoff_date) = relevanssi_get_recency_bonus(); + } + else { + $recency_bonus = false; + $recency_cutoff_date = false; + } + $min_length = get_option('relevanssi_min_word_length'); + $search_again = false; + + $title_boost = floatval(get_option('relevanssi_title_boost')); + $link_boost = floatval(get_option('relevanssi_link_boost')); + $comment_boost = floatval(get_option('relevanssi_comment_boost')); + + $include_these_posts = array(); + + do { + foreach ($terms as $term) { + $term = trim($term); // numeric search terms will start with a space + if (strlen($term) < $min_length) continue; + $term = esc_sql($term); + + if (strpos($o_term_cond, 'LIKE') !== false) { + // only like_escape() if necessary, otherwise _ in search terms will not work + if (method_exists($wpdb, 'esc_like')) { + $term = $wpdb->esc_like($term); + } + else { + // Compatibility for pre-4.0 WordPress + $term = like_escape($term); + } + } + + $term_cond = str_replace('#term#', $term, $o_term_cond); + + !empty($post_type_weights['post_tag']) ? $tag = $post_type_weights['post_tag'] : $tag = $relevanssi_variables['post_type_weight_defaults']['post_tag']; + !empty($post_type_weights['category']) ? $cat = $post_type_weights['category'] : $cat = $relevanssi_variables['post_type_weight_defaults']['category']; + + $query = "SELECT relevanssi.*, relevanssi.title * $title_boost + relevanssi.content + relevanssi.comment * $comment_boost + relevanssi.tag * $tag + relevanssi.link * $link_boost + relevanssi.author + relevanssi.category * $cat + relevanssi.excerpt + relevanssi.taxonomy + relevanssi.customfield + relevanssi.mysqlcolumn AS tf + FROM $relevanssi_table AS relevanssi $query_join WHERE $term_cond $query_restrictions"; + // Clean: $query_restrictions is escaped, $term_cond is escaped + + $query = apply_filters('relevanssi_query_filter', $query); + + $matches = $wpdb->get_results($query); + + if (count($matches) < 1) { + continue; + } + else { + $no_matches = false; + if (count($include_these_posts) > 0) { + $post_ids_to_add = implode(',', array_keys($include_these_posts)); + $existing_ids = array(); + foreach ($matches as $match) { + $existing_ids[] = $match->doc; + } + $existing_ids = implode(',', $existing_ids); + $query = "SELECT relevanssi.*, relevanssi.title * $title_boost + relevanssi.content + relevanssi.comment * $comment_boost + relevanssi.tag * $tag + relevanssi.link * $link_boost + relevanssi.author + relevanssi.category * $cat + relevanssi.excerpt + relevanssi.taxonomy + relevanssi.customfield + relevanssi.mysqlcolumn AS tf + FROM $relevanssi_table AS relevanssi WHERE relevanssi.doc IN ($post_ids_to_add) AND relevanssi.doc NOT IN ($existing_ids) AND $term_cond"; + // Clean: no unescaped user inputs + $matches_to_add = $wpdb->get_results($query); + $matches = array_merge($matches, $matches_to_add); + } + } + + relevanssi_populate_array($matches); + global $relevanssi_post_types; + + $total_hits += count($matches); + + $query = "SELECT COUNT(DISTINCT(relevanssi.doc)) FROM $relevanssi_table AS relevanssi $query_join WHERE $term_cond $query_restrictions"; + // Clean: $query_restrictions is escaped, $term_cond is escaped + $query = apply_filters('relevanssi_df_query_filter', $query); + + $df = $wpdb->get_var($query); + + if ($df < 1 && "sometimes" == $fuzzy) { + $query = "SELECT COUNT(DISTINCT(relevanssi.doc)) FROM $relevanssi_table AS relevanssi $query_join + WHERE (relevanssi.term LIKE '$term%' OR relevanssi.term_reverse LIKE CONCAT(REVERSE('$term), %')) $query_restrictions"; + // Clean: $query_restrictions is escaped, $term is escaped + $query = apply_filters('relevanssi_df_query_filter', $query); + $df = $wpdb->get_var($query); + } + + $idf = log($D + 1 / (1 + $df)); + $idf = $idf * $idf; + foreach ($matches as $match) { + if ('user' == $match->type) { + $match->doc = 'u_' . $match->item; + } + else if (!in_array($match->type, array('post', 'attachment'))) { + $match->doc = '**' . $match->type . '**' . $match->item; + } + + if (isset($match->taxonomy_detail)) { + $match->taxonomy_score = 0; + $match->taxonomy_detail = unserialize($match->taxonomy_detail); + if (is_array($match->taxonomy_detail)) { + foreach ($match->taxonomy_detail as $tax => $count) { + if ($tax == 'post_tag') { + $match->tag = $count; + } + if (empty($post_type_weights[$tax])) { + $match->taxonomy_score += $count * 1; + } + else { + $match->taxonomy_score += $count * $post_type_weights[$tax]; + } + } + } + } + + $match->tf = + $match->title * $title_boost + + $match->content + + $match->comment * $comment_boost + + $match->link * $link_boost + + $match->author + + $match->excerpt + + $match->taxonomy_score + + $match->customfield + + $match->mysqlcolumn; + + $term_hits[$match->doc][$term] = + $match->title + + $match->content + + $match->comment + + $match->tag + + $match->link + + $match->author + + $match->category + + $match->excerpt + + $match->taxonomy + + $match->customfield + + $match->mysqlcolumn; + + $match->weight = $match->tf * $idf; + + if ($recency_bonus) { + $post = relevanssi_get_post($match->doc); + if (strtotime($post->post_date) > $recency_cutoff_date) + $match->weight = $match->weight * $recency_bonus['bonus']; + } + + isset($body_matches[$match->doc]) ? $body_matches[$match->doc] += $match->content : $body_matches[$match->doc] = $match->content; + isset($title_matches[$match->doc]) ? $title_matches[$match->doc] += $match->title : $title_matches[$match->doc] = $match->title; + isset($link_matches[$match->doc]) ? $link_matches[$match->doc] += $match->link : $link_matches[$match->doc] = $match->link; + isset($tag_matches[$match->doc]) ? $tag_matches[$match->doc] += $match->tag : $tag_matches[$match->doc] = $match->tag; + isset($comment_matches[$match->doc]) ? $comment_matches[$match->doc] += $match->comment : $comment_matches[$match->doc] = $match->comment; + + isset($relevanssi_post_types[$match->doc]) ? $type = $relevanssi_post_types[$match->doc] : $type = null; + if (!empty($post_type_weights[$type])) { + $match->weight = $match->weight * $post_type_weights[$type]; + } + + $match = apply_filters('relevanssi_match', $match, $idf); + + if ($match->weight == 0) continue; // the filters killed the match + + $post_ok = true; + $post_ok = apply_filters('relevanssi_post_ok', $post_ok, $match->doc); + + if ($post_ok) { + $doc_terms[$match->doc][$term] = true; // count how many terms are matched to a doc + isset($doc_weight[$match->doc]) ? $doc_weight[$match->doc] += $match->weight : $doc_weight[$match->doc] = $match->weight; + isset($scores[$match->doc]) ? $scores[$match->doc] += $match->weight : $scores[$match->doc] = $match->weight; + if (is_numeric($match->doc)) { + // this is to weed out taxonomies and users (t_XXX, u_XXX) + $include_these_posts[$match->doc] = true; + } + } + } + } + + if (!isset($doc_weight)) $no_matches = true; + + if ($no_matches) { + if ($search_again) { + // no hits even with fuzzy search! + $search_again = false; + } + else { + if ("sometimes" == $fuzzy) { + $search_again = true; + $o_term_cond = "(term LIKE '%#term#' OR term LIKE '#term#%') "; + } + } + } + else { + $search_again = false; + } + } while ($search_again); + + $strip_stops = true; + $temp_terms_without_stops = array_keys(relevanssi_tokenize(implode(' ', $terms), $strip_stops)); + $terms_without_stops = array(); + foreach ($temp_terms_without_stops as $temp_term) { + if (strlen($temp_term) >= $min_length) + array_push($terms_without_stops, $temp_term); + } + $total_terms = count($terms_without_stops); + + if (isset($doc_weight)) + $doc_weight = apply_filters('relevanssi_results', $doc_weight); + + if (isset($doc_weight) && count($doc_weight) > 0) { + arsort($doc_weight); + $i = 0; + foreach ($doc_weight as $doc => $weight) { + if (count($doc_terms[$doc]) < $total_terms && $operator == "AND") { + // AND operator in action: + // doc didn't match all terms, so it's discarded + continue; + } + + $hits[intval($i)] = relevanssi_get_post($doc); + $hits[intval($i)]->relevance_score = round($weight, 2); + $i++; + } + } + + if (count($hits) < 1) { + if ($operator == "AND" AND get_option('relevanssi_disable_or_fallback') != 'on') { + $or_args = $args; + $or_args['operator'] = "OR"; + $or_args['q'] = relevanssi_add_synonyms($q); + $return = relevanssi_search($or_args); + extract($return); + } + } + + global $wp; + $default_order = get_option('relevanssi_default_orderby', 'relevance'); + if (empty($orderby)) $orderby = $default_order; + // the sorting function checks for non-existing keys, cannot whitelist here + + if (empty($order)) $order = 'desc'; + $order = strtolower($order); + $order_accepted_values = array('asc', 'desc'); + if (!in_array($order, $order_accepted_values)) $order = 'desc'; + + $orderby = apply_filters('relevanssi_orderby', $orderby); + $order = apply_filters('relevanssi_order', $order); + + if ($orderby != 'relevance') + relevanssi_object_sort($hits, $orderby, $order); + + $return = array('hits' => $hits, 'body_matches' => $body_matches, 'title_matches' => $title_matches, + 'tag_matches' => $tag_matches, 'comment_matches' => $comment_matches, 'scores' => $scores, + 'term_hits' => $term_hits, 'query' => $q, 'link_matches' => $link_matches); + + return $return; +} + +function relevanssi_do_query(&$query) { + // this all is basically lifted from Kenny Katzgrau's wpSearch + // thanks, Kenny! + global $relevanssi_active; + + $relevanssi_active = true; + $posts = array(); + + if ( function_exists( 'mb_strtolower' ) ) + $q = trim(stripslashes(mb_strtolower($query->query_vars["s"]))); + else + $q = trim(stripslashes(strtolower($query->query_vars["s"]))); + + if (isset($query->query_vars['searchblogs'])) { + $search_blogs = $query->query_vars['searchblogs']; + + $post_type = false; + if (isset($query->query_vars["post_type"]) && $query->query_vars["post_type"] != 'any') { + $post_type = $query->query_vars["post_type"]; + } + if (isset($query->query_vars["post_types"]) && $query->query_vars["post_types"] != 'any') { + $post_type = $query->query_vars["post_types"]; + } + + if (function_exists('relevanssi_search_multi')) { + $return = relevanssi_search_multi($q, $search_blogs, $post_type); + } + } + else { + $tax_query = array(); + $tax_query_relation = apply_filters('relevanssi_default_tax_query_relation', 'OR'); + if (isset($query->tax_query) && empty($query->tax_query->queries)) { + // Tax query is empty, let's get rid of it. + $query->tax_query = null; + } + if (isset($query->query_vars['tax_query'])) { + // This is user-created tax_query array as described in WP Codex + foreach ($query->query_vars['tax_query'] as $type => $item) { + if (is_string($type) && $type == 'relation') { + $tax_query_relation = $item; + } + else { + $tax_query[] = $item; + } + } + } + else if (isset($query->tax_query)) { + // This is the WP-created Tax_Query object, which is different from above + foreach ($query->tax_query as $type => $item) { + if (is_string($type) && $type == 'relation') { + $tax_query_relation = $item; + } + if (is_string($type) && $type == 'queries') { + foreach ($item as $tax_query_row) { + $tax_query[] = $tax_query_row; + } + } + } + } + else { + $cat = false; + if (isset($query->query_vars["cats"])) { + $cat = $query->query_vars["cats"]; + } + if (empty($cat)) { + $cat = get_option('relevanssi_cat'); + if (0 == $cat) { + $cat = false; + } + } + if ($cat) { + $cat = explode(',', $cat); + $tax_query[] = array('taxonomy' => 'category', 'field' => 'id', 'terms' => $cat); + } + if (!empty($query->query_vars['category_name']) && empty($query->query_vars['category__in'])) { + $cat = explode(',', $query->query_vars['category_name']); + $tax_query[] = array('taxonomy' => 'category', 'field' => 'slug', 'terms' => $cat); + } + if (!empty($query->query_vars['category__in'])) { + $tax_query[] = array('taxonomy' => 'category', 'field' => 'id', 'terms' => $query->query_vars['category__in']); + } + if (!empty($query->query_vars['category__not_in'])) { + $tax_query[] = array('taxonomy' => 'category', 'field' => 'id', 'terms' => $query->query_vars['category__not_in'], 'operator' => 'NOT IN'); + } + if (!empty($query->query_vars['category__and'])) { + $tax_query[] = array('taxonomy' => 'category', 'field' => 'id', 'terms' => $query->query_vars['category__and'], 'operator' => 'AND', 'include_children' => false); + } + $excat = get_option('relevanssi_excat'); + if (isset($excat) && $excat != 0) { + $tax_query[] = array('taxonomy' => 'category', 'field' => 'id', 'terms' => $excat, 'operator' => 'NOT IN'); + } + + $tag = false; + if (isset($query->query_vars["tags"])) { + $tag = $query->query_vars["tags"]; + } + if ($tag) { + if (strpos($tag, '+') !== false) { + $tag = explode('+', $tag); + $operator = 'and'; + } + else { + $tag = explode(',', $tag); + $operator = 'or'; + } + $tax_query[] = array('taxonomy' => 'post_tag', 'field' => 'id', 'terms' => $tag, 'operator' => $operator); + } + if (!empty($query->query_vars['tag_id'])) { + $tax_query[] = array('taxonomy' => 'post_tag', 'field' => 'id', 'terms' => $query->query_vars['tag_id']); + } + if (!empty($query->query_vars['tag_id'])) { + $tax_query[] = array('taxonomy' => 'post_tag', 'field' => 'id', 'terms' => $query->query_vars['tag_id']); + } + if (!empty($query->query_vars['tag__in'])) { + $tax_query[] = array('taxonomy' => 'post_tag', 'field' => 'id', 'terms' => $query->query_vars['tag__in']); + } + if (!empty($query->query_vars['tag__not_in'])) { + $tax_query[] = array('taxonomy' => 'post_tag', 'field' => 'id', 'terms' => $query->query_vars['tag__not_in'], 'operator' => 'NOT IN'); + } + if (!empty($query->query_vars['tag__and'])) { + $tax_query[] = array('taxonomy' => 'post_tag', 'field' => 'id', 'terms' => $query->query_vars['tag__and'], 'operator' => 'AND'); + } + if (!empty($query->query_vars['tag__not_in'])) { + $tax_query[] = array('taxonomy' => 'post_tag', 'field' => 'id', 'terms' => $query->query_vars['tag__not_in'], 'operator' => 'NOT IN'); + } + if (!empty($query->query_vars['tag_slug__in'])) { + $tax_query[] = array('taxonomy' => 'post_tag', 'field' => 'slug', 'terms' => $query->query_vars['tag_slug__in']); + } + if (!empty($query->query_vars['tag_slug__not_in'])) { + $tax_query[] = array('taxonomy' => 'post_tag', 'field' => 'slug', 'terms' => $query->query_vars['tag_slug__not_in'], 'operator' => 'NOT IN'); + } + if (!empty($query->query_vars['tag_slug__and'])) { + $tax_query[] = array('taxonomy' => 'post_tag', 'field' => 'slug', 'terms' => $query->query_vars['tag_slug__and'], 'operator' => 'AND'); + } + $extag = get_option('relevanssi_extag'); + if (isset($extag) && $extag != 0) { + $tax_query[] = array('taxonomy' => 'post_tag', 'field' => 'id', 'terms' => $extag, 'operator' => 'NOT IN'); + } + + if (isset($query->query_vars["taxonomy"])) { + if (function_exists('relevanssi_process_taxonomies')) { + $tax_query = relevanssi_process_taxonomies($query->query_vars["taxonomy"], $query->query_vars["term"], $tax_query); + } + else { + if (!empty($query->query_vars["term"])) $term = $query->query_vars["term"]; + + $tax_query[] = array('taxonomy' => $query->query_vars["taxonomy"], 'field' => 'slug', 'terms' => $term); + } + } + } + + $author = false; + if (!empty($query->query_vars["author"])) { + $author = explode(',', $query->query_vars["author"]); + } + if (!empty($query->query_vars["author_name"])) { + $author_object = get_user_by('slug', $query->query_vars["author_name"]); + $author[] = $author_object->ID; + } + + $post_query = array(); + if (!empty($query->query_vars['p'])) { + $post_query = array('in' => array($query->query_vars['p'])); + } + if (!empty($query->query_vars['page_id'])) { + $post_query = array('in' => array($query->query_vars['page_id'])); + } + if (!empty($query->query_vars['post__in'])) { + $post_query = array('in' => $query->query_vars['post__in']); + } + if (!empty($query->query_vars['post__not_in'])) { + $post_query = array('not in' => $query->query_vars['post__not_in']); + } + + $meta_query = array(); + $meta_query_relation = apply_filters('relevanssi_default_meta_query_relation', 'AND'); + + if (!empty($query->query_vars["meta_query"])) { + $meta_query = $query->query_vars["meta_query"]; + } + if (isset($query->query_vars["customfield_key"])) { + isset($query->query_vars["customfield_value"]) ? $value = $query->query_vars["customfield_value"] : $value = null; + $meta_query[] = array('key' => $query->query_vars["customfield_key"], 'value' => $value, 'compare' => '='); + } + if (!empty($query->query_vars["meta_key"]) || + !empty($query->query_vars["meta_value"]) || + !empty($query->query_vars["meta_value_num"])) { + $value = null; + if (!empty($query->query_vars["meta_value"])) $value = $query->query_vars["meta_value"]; + if (!empty($query->query_vars["meta_value_num"])) $value = $query->query_vars["meta_value_num"]; + !empty($query->query_vars["meta_compare"]) ? $compare = $query->query_vars["meta_compare"] : $compare = '='; + $meta_query[] = array('key' => $query->query_vars["meta_key"], 'value' => $value, 'compare' => $compare); + } + + $date_query = false; + if (!empty($query->date_query)) { + if (is_object($query->date_query) && get_class($query->date_query) == 'WP_Date_Query') { // there is no is_WP_Date_Query_Object() function + $date_query = $query->date_query; + } else { + $date_query = new WP_Date_Query($query->date_query); + } + } + + $search_blogs = false; + if (isset($query->query_vars["search_blogs"])) { + $search_blogs = $query->query_vars["search_blogs"]; + } + + $post_type = false; + if (isset($query->query_vars["post_type"]) && $query->query_vars["post_type"] != 'any') { + $post_type = $query->query_vars["post_type"]; + } + if (isset($query->query_vars["post_types"]) && $query->query_vars["post_types"] != 'any') { + $post_type = $query->query_vars["post_types"]; + } + + if ($post_type == -1) $post_type = false; + + $post_status = false; + if (isset($query->query_vars["post_status"]) && $query->query_vars["post_status"] != 'any') { + $post_status = $query->query_vars["post_status"]; + } + + $expost = get_option("relevanssi_exclude_posts"); + + if (is_admin()) { + // in admin search, search everything + $excat = null; + $extag = null; + $expost = null; + } + + $operator = ""; + if (function_exists('relevanssi_set_operator')) { + $operator = relevanssi_set_operator($query); + $operator = strtoupper($operator); // just in case + } + if ($operator != "OR" && $operator != "AND") $operator = get_option("relevanssi_implicit_operator"); + + isset($query->query_vars['orderby']) ? $orderby = $query->query_vars['orderby'] : $orderby = null; + isset($query->query_vars['order']) ? $order = $query->query_vars['order'] : $order = null; + + // Add synonyms + // This is done here so the new terms will get highlighting + if ("OR" == $operator) { + // Synonyms are only used in OR queries + $q = relevanssi_add_synonyms($q); + } + + $search_params = array( + 'q' => $q, + 'tax_query' => $tax_query, + 'tax_query_relation' => $tax_query_relation, + 'post_query' => $post_query, + 'meta_query' => $meta_query, + 'date_query' => $date_query, + 'expost' => $expost, + 'post_type' => $post_type, + 'post_status' => $post_status, + 'operator' => $operator, + 'search_blogs' => $search_blogs, + 'author' => $author, + 'orderby' => $orderby, + 'order' => $order); + + $return = relevanssi_search($search_params); + } + + isset($return['hits']) ? $hits = $return['hits'] : $hits = array(); + isset($return['query']) ? $q = $return['query'] : $q = ""; + + $filter_data = array($hits, $q); + $hits_filters_applied = apply_filters('relevanssi_hits_filter', $filter_data); + $hits = $hits_filters_applied[0]; + + $query->found_posts = sizeof($hits); + if ($query->query_vars["posts_per_page"] == 0) { + // assume something sensible to prevent "division by zero error"; + $query->query_vars["posts_per_page"] = -1; + } + if ($query->query_vars["posts_per_page"] == -1) { + $query->max_num_pages = sizeof($hits); + } + else { + $query->max_num_pages = ceil(sizeof($hits) / $query->query_vars["posts_per_page"]); + } + + $update_log = get_option('relevanssi_log_queries'); + if ('on' == $update_log) { + relevanssi_update_log($q, sizeof($hits)); + } + + $make_excerpts = get_option('relevanssi_excerpts'); + if ($query->is_admin) $make_excerpts = false; + + if ($query->query_vars['paged'] > 0) { + $wpSearch_low = ($query->query_vars['paged'] - 1) * $query->query_vars["posts_per_page"]; + } + else { + $wpSearch_low = 0; + } + + if ($query->query_vars["posts_per_page"] == -1) { + $wpSearch_high = sizeof($hits); + } + else { + $wpSearch_high = $wpSearch_low + $query->query_vars["posts_per_page"] - 1; + } + + if (isset($query->query_vars['offset']) && $query->query_vars['offset'] > 0) { + $wpSearch_high += $query->query_vars['offset']; + $wpSearch_low += $query->query_vars['offset']; + } + + if ($wpSearch_high > sizeof($hits)) $wpSearch_high = sizeof($hits); + + for ($i = $wpSearch_low; $i <= $wpSearch_high; $i++) { + if (isset($hits[intval($i)])) { + $post = $hits[intval($i)]; + } + else { + continue; + } + + if ($post == NULL) { + // apparently sometimes you can get a null object + continue; + } + + //Added by OdditY - Highlight Result Title too -> + if("on" == get_option('relevanssi_hilite_title')){ + if (function_exists('qtrans_useCurrentLanguageIfNotFoundUseDefaultLanguage')) { + $post->post_highlighted_title = strip_tags(qtrans_useCurrentLanguageIfNotFoundUseDefaultLanguage($post->post_title)); + } + else { + $post->post_highlighted_title = strip_tags($post->post_title); + } + $highlight = get_option('relevanssi_highlight'); + if ("none" != $highlight) { + if (!is_admin()) { + $post->post_highlighted_title = relevanssi_highlight_terms($post->post_highlighted_title, $q); + } + } + } + // OdditY end <- + + if ('on' == $make_excerpts) { + $post->original_excerpt = $post->post_excerpt; + $post->post_excerpt = relevanssi_do_excerpt($post, $q); + } + + if ('on' == get_option('relevanssi_show_matches')) { + $post->post_excerpt .= relevanssi_show_matches($return, $post->ID); + } + + if (isset($return['scores'][$post->ID])) $post->relevance_score = round($return['scores'][$post->ID], 2); + + $posts[] = $post; + } + + $query->posts = $posts; + $query->post_count = count($posts); + + return $posts; +} + +function relevanssi_limit_filter($query) { + if (get_option('relevanssi_throttle', 'on') == 'on') { + $limit = get_option('relevanssi_throttle_limit', 500); + if (!is_numeric($limit)) $limit = 500; // Backup, if the option is set to something useless. + if ($limit < 0) $limit = 500; + return $query . " ORDER BY tf DESC LIMIT $limit"; + } + else { + return $query; + } +} + +?> diff --git a/mu-plugins/relevanssi/lib/shortcodes.php b/mu-plugins/relevanssi/lib/shortcodes.php new file mode 100644 index 00000000..6ff6d505 --- /dev/null +++ b/mu-plugins/relevanssi/lib/shortcodes.php @@ -0,0 +1,40 @@ + false, 'phrase' => 'not'), $atts)); + + if ($term != false) { + $term = urlencode(strtolower($term)); + } + else { + $term = urlencode(strip_tags(strtolower($content))); + } + + if ($phrase != 'not') { + $term = '%22' . $term . '%22'; + } + + $link = get_bloginfo('url') . "/?s=$term"; + + $pre = ""; + $post = ""; + + return $pre . do_shortcode($content) . $post; +} + +function relevanssi_noindex_shortcode($atts, $content) { + // When in general use, make the shortcode disappear. + return $content; +} + +function relevanssi_noindex_shortcode_indexing($atts, $content) { + // When indexing, make the text disappear. + return ''; +} + +?> diff --git a/mu-plugins/relevanssi/lib/stopwords.php b/mu-plugins/relevanssi/lib/stopwords.php new file mode 100644 index 00000000..5408173e --- /dev/null +++ b/mu-plugins/relevanssi/lib/stopwords.php @@ -0,0 +1,40 @@ + 0) { + foreach ($stopwords as $word) { + $q = $wpdb->prepare("INSERT IGNORE INTO " . $relevanssi_variables['stopword_table'] . " (stopword) VALUES (%s)", trim($word)); + $wpdb->query($q); + } + } + } +} + +function relevanssi_fetch_stopwords() { + global $wpdb, $relevanssi_variables; + + if (!isset($relevanssi_variables['stopword_list'])) $relevanssi_variables['stopword_list'] = array(); + + if (count($relevanssi_variables['stopword_list']) < 1) { + $results = $wpdb->get_results("SELECT stopword FROM " . $relevanssi_variables['stopword_table']); + foreach ($results as $word) { + $relevanssi_variables['stopword_list'][] = $word->stopword; + } + } + + return $relevanssi_variables['stopword_list']; +} + +?> diff --git a/mu-plugins/relevanssi/lib/uninstall.php b/mu-plugins/relevanssi/lib/uninstall.php new file mode 100644 index 00000000..97fff89a --- /dev/null +++ b/mu-plugins/relevanssi/lib/uninstall.php @@ -0,0 +1,32 @@ +prefix . "relevanssi"; + $stopword_table = $wpdb->prefix . "relevanssi_stopwords"; + $log_table = $wpdb->prefix . "relevanssi_log"; + + if($wpdb->get_var("SHOW TABLES LIKE '$stopword_table'") == $stopword_table) { + $sql = "DROP TABLE $stopword_table"; + $wpdb->query($sql); + } + + if($wpdb->get_var("SHOW TABLES LIKE '$relevanssi_table'") == $relevanssi_table) { + $sql = "DROP TABLE $relevanssi_table"; + $wpdb->query($sql); + } + + if($wpdb->get_var("SHOW TABLES LIKE '$log_table'") == $log_table) { + $sql = "DROP TABLE $log_table"; + $wpdb->query($sql); + } + + echo '

' . __("Data wiped clean, you can now delete the plugin.", "relevanssi") . '

'; +} + +?> diff --git a/mu-plugins/relevanssi/readme.txt b/mu-plugins/relevanssi/readme.txt new file mode 100644 index 00000000..793ca36c --- /dev/null +++ b/mu-plugins/relevanssi/readme.txt @@ -0,0 +1,1101 @@ +=== Relevanssi - A Better Search === +Contributors: msaari +Donate link: http://www.relevanssi.com/buy-premium/ +Tags: search, relevance, better search +Requires at least: 3.3 +Tested up to: 4.1 +Stable tag: 3.3.8 +License: GPLv2 or later +License URI: http://www.gnu.org/licenses/gpl-2.0.html + +Relevanssi replaces the default search with a partial-match search that sorts results by relevance. It also indexes comments and shortcode content. + +== Description == + +Relevanssi replaces the standard WordPress search with a better search engine, with lots of features +and configurable options. You'll get better results, better presentation of results - your users +will thank you. + +This is the free version of Relevanssi. There's also Relevanssi Premium, which has added features, +including Multisite support. This free version does not work properly on Multisite. For more +information about Premium, see [Relevanssi.com](http://www.relevanssi.com/). + += Key features = +* Search results sorted in the order of relevance, not by date. +* Fuzzy matching: match partial words, if complete words don't match. +* Find documents matching either just one search term (OR query) or require all words to appear (AND query). +* Search for phrases with quotes, for example "search phrase". +* Create custom excerpts that show where the hit was made, with the search terms highlighted. +* Highlight search terms in the documents when user clicks through search results. +* Search comments, tags, categories and custom fields. + += Advanced features = +* Adjust the weighting for titles, tags and comments. +* Log queries, show most popular queries and recent queries with no hits. +* Restrict searches to categories and tags using a hidden variable or plugin settings. +* Index custom post types and custom taxonomies. +* Index the contents of shortcodes. +* Google-style "Did you mean?" suggestions based on successful user searches. +* Automatic support for [WPML multi-language plugin](http://wpml.org/). +* Automatic support for [s2member membership plugin](http://www.s2member.com/). +* Advanced filtering to help hacking the search results the way you want. +* Search result throttling to improve performance on large databases. +* Disable indexing of post content and post titles with a simple filter hook. + +Relevanssi is available in two versions, regular and Premium. Regular Relevanssi is and will remain +free to download and use. Relevanssi Premium comes with a cost, but will get all the new features. +Standard Relevanssi will be updated to fix bugs, but new features will mostly appear in Premium. +Also, support for standard Relevanssi depends very much on my mood and available time. Premium +pricing includes support. + += Premium features (only in Relevanssi Premium) = +* Improved spelling correction in "Did you mean?" suggestions. +* Multisite support. +* Search and index user profiles. +* Search and index taxonomy term pages (categories, tags, custom taxonomies). +* Search and index arbitrary columns in wp_posts MySQL table. +* Assign weights to any post types and taxonomies. +* Assign extra weight to new posts. +* Let the user choose between AND and OR searches, use + and - operator (AND and NOT). +* Highlighting search terms for visitors from external search engines. +* Export and import settings. + += Relevanssi in Facebook = +You can find [Relevanssi in Facebook](http://www.facebook.com/relevanssi). +Become a fan to follow the development of the plugin, I'll post updates on bugs, new features and +new versions to the Facebook page. + += Other search plugins = +Relevanssi owes a lot to [wpSearch](http://wordpress.org/extend/plugins/wpsearch/) by Kenny +Katzgrau. Relevanssi was built to replace wpSearch, when it started to fail. + +Search Unleashed is a popular search plugin, but it hasn't been updated since 2010. Relevanssi +is in active development and does what Search Unleashed does. + + + +== Installation == + +1. Extract all files from the ZIP file, and then upload the plugin's folder to /wp-content/plugins/. +1. If your blog is in English, skip to the next step. If your blog is in other language, rename the file *stopwords* in the plugin directory as something else or remove it. If there is *stopwords.yourlanguage*, rename it to *stopwords*. +1. Activate the plugin through the 'Plugins' menu in WordPress. +1. Go to the plugin settings and build the index following the instructions there. + +To update your installation, simply overwrite the old files with the new, activate the new +version and if the new version has changes in the indexing, rebuild the index. + += Note on updates = +If it seems the plugin doesn't work after an update, the first thing to try is deactivating and +reactivating the plugin. If there are changes in the database structure, those changes do not happen +without a deactivation, for some reason. + += Changes to templates = +None necessary! Relevanssi uses the standard search form and doesn't usually need any changes in +the search results template. + +If the search does not bring any results, your theme probably has a query_posts() call in the +search results template. That throws Relevanssi off. For more information, see [The most +important Relevanssi debugging trick](http://www.relevanssi.com/knowledge-base/query_posts/). + += How to index = +Check the options to make sure they're to your liking, then click "Save indexing options and +build the index". If everything's fine, you'll see the Relevanssi options screen again with a +message "Indexing successful!" + +If something fails, usually the result is a blank screen. The most common problem is a timeout: +server ran out of time while indexing. The solution to that is simple: just return to Relevanssi +screen (do not just try to reload the blank page) and click "Continue indexing". Indexing will +continue. Most databases will get indexed in just few clicks of "Continue indexing". You can +follow the process in the "State of the Index": if the amount of documents is growing, the +indexing is moving along. + +If the indexing gets stuck, something's wrong. I've had trouble with some plugins, for example +Flowplayer video player stopped indexing. I had to disable the plugin, index and then activate +the plugin again. Try disabling plugins, especially those that use shortcodes, to see if that +helps. Relevanssi shows the highest post ID in the index - start troubleshooting from the post +or page with the next highest ID. Server error logs may be useful, too. + += Using custom search results = +If you want to use the custom search results, make sure your search results template uses `the_excerpt()` +to display the entries, because the plugin creates the custom snippet by replacing the post excerpt. + +If you're using a plugin that affects excerpts (like Advanced Excerpt), you may run into some +problems. For those cases, I've included the function `relevanssi_the_excerpt()`, which you can +use instead of `the_excerpt()`. It prints out the excerpt, but doesn't apply `wp_trim_excerpt()` +filters (it does apply `the_content()`, `the_excerpt()`, and `get_the_excerpt()` filters). + +To avoid trouble, use the function like this: + +`` + +See Frequently Asked Questions for more instructions on what you can do with +Relevanssi. + += The advanced hacker option = +If you're doing something unusual with your search and Relevanssi doesn't work, try +using `relevanssi_do_query()`. See [Knowledge Base](http://www.relevanssi.com/knowledge-base/relevanssi_do_query/). + += Uninstalling = +To uninstall the plugin remove the plugin using the normal WordPress plugin management tools +(from the Plugins page, first Deactivate, then Delete). If you remove the plugin files manually, +the database tables and options will remain. + += Combining with other plugins = +Relevanssi doesn't work with plugins that rely on standard WP search. Those plugins want to +access the MySQL queries, for example. That won't do with Relevanssi. [Search Light](http://wordpress.org/extend/plugins/search-light/), +for example, won't work with Relevanssi. + +Some plugins cause problems when indexing documents. These are generally plugins that use shortcodes +to do something somewhat complicated. One such plugin is [MapPress Easy Google Maps](http://wordpress.org/extend/plugins/mappress-google-maps-for-wordpress/). +When indexing, you'll get a white screen. To fix the problem, disable either the offending plugin +or shortcode expansion in Relevanssi while indexing. After indexing, you can activate the plugin +again. + +== Frequently Asked Questions == + += Knowledge Base = +You can find solutions and answers at the [Relevanssi Knowledge Base](http://www.relevanssi.com/category/knowledge-base/). + += Relevanssi doesn't work = +If you the results don't change after installing and activating Relevanssi, the most likely +reason is that you have a call to `query_posts()` on your search results template. This confuses +Relevanssi. Try removing the query_posts call and see what happens. + += Searching for words with ampersands or hyphens doesn't work = +Please read [Words with punctuation can't be found](http://www.relevanssi.com/knowledge-base/words-ampersands-cant-found/). +This is a Relevanssi feature, but you can circumvent it with a simple filter function. + += Where are the user search logs? = +See the top of the admin menu. There's 'User searches'. There. If the logs are empty, please note +showing the results needs at least MySQL 5. + += Displaying the number of search results found = + +The typical solution to showing the number of search results found does not work with Relevanssi. +However, there's a solution that's much easier: the number of search results is stored in a +variable within $wp_query. Just add the following code to your search results template: + +`found_posts . ' hits'; ?>` + += Advanced search result filtering = + +If you want to add extra filters to the search results, you can add them using a hook. +Relevanssi searches for results in the _relevanssi table, where terms and post_ids are listed. +The various filtering methods work by listing either allowed or forbidden post ids in the +query WHERE clause. Using the `relevanssi_where` hook you can add your own restrictions to +the WHERE clause. + +These restrictions must be in the general format of +` AND doc IN (' . {a list of post ids, which could be a subquery} . ')` + +For more details, see where the filter is applied in the `relevanssi_search()` function. This +is stricly an advanced hacker option for those people who're used to using filters and MySQL +WHERE clauses and it is possible to break the search results completely by doing something wrong +here. + +There's another filter hook, `relevanssi_hits_filter`, which lets you modify the hits directly. +The filter passes an array, where index 0 gives the list of hits in the form of an array of +post objects and index 1 has the search query as a string. The filter expects you to return an +array containing the array of post objects in index 0 (`return array($your_processed_hit_array)`). + += Direct access to query engine = +Relevanssi can't be used in any situation, because it checks the presence of search with +the `is_search()` function. This causes some unfortunate limitations and reduces the general usability +of the plugin. + +You can now access the query engine directly. There's a new function `relevanssi_do_query()`, +which can be used to do search queries just about anywhere. The function takes a WP_Query object +as a parameter, so you need to store all the search parameters in the object (for example, put the +search terms in `$your_query_object->query_vars['s']`). Then just pass the WP_Query object to +Relevanssi with `relevanssi_do_query($your_wp_query_object);`. + +Relevanssi will process the query and insert the found posts as `$your_query_object->posts`. The +query object is passed as reference and modified directly, so there's no return value. The posts +array will contain all results that are found. + += Sorting search results = +If you want something else than relevancy ranking, you can use orderby and order parameters. Orderby +accepts $post variable attributes and order can be "asc" or "desc". The most relevant attributes +here are most likely "post_date" and "comment_count". + +If you want to give your users the ability to sort search results by date, you can just add a link +to http://www.yourblogdomain.com/?s=search-term&orderby=post_date&order=desc to your search result +page. + +Order by relevance is either orderby=relevance or no orderby parameter at all. + += Filtering results by date = +You can specify date limits on searches with `by_date` search parameter. You can use it your +search result page like this: http://www.yourblogdomain.com/?s=search-term&by_date=1d to offer +your visitor the ability to restrict their search to certain time limit (see +[RAPLIQ](http://www.rapliq.org/) for a working example). + +The date range is always back from the current date and time. Possible units are hour (h), day (d), +week (w), month (m) and year (y). So, to see only posts from past week, you could use by_date=7d +or by_date=1w. + +Using wrong letters for units or impossible date ranges will lead to either defaulting to date +or no results at all, depending on case. + +Thanks to Charles St-Pierre for the idea. + += Displaying the relevance score = +Relevanssi stores the relevance score it uses to sort results in the $post variable. Just add +something like + +`echo $post->relevance_score` + +to your search results template inside a PHP code block to display the relevance score. + += Did you mean? suggestions = +To use Google-style "did you mean?" suggestions, first enable search query logging. The +suggestions are based on logged queries, so without good base of logged queries, the +suggestions will be odd and not very useful. + +To use the suggestions, add the following line to your search result template, preferably +before the have_posts() check: + +`Did you mean: ", "?

", 5); }?>` + +The first parameter passes the search term, the second is the text before the result, +the third is the text after the result and the number is the amount of search results +necessary to not show suggestions. With the default value of 5, suggestions are not +shown if the search returns more than 5 hits. + += Search shortcode = +Relevanssi also adds a shortcode to help making links to search results. That way users +can easily find more information about a given subject from your blog. The syntax is +simple: + +`[search]John Doe[/search]` + +This will make the text John Doe a link to search results for John Doe. In case you +want to link to some other search term than the anchor text (necessary in languages +like Finnish), you can use: + +`[search term="John Doe"]Mr. John Doe[/search]` + +Now the search will be for John Doe, but the anchor says Mr. John Doe. + +One more parameter: setting `[search phrase="on"]` will wrap the search term in +quotation marks, making it a phrase. This can be useful in some cases. + += Restricting searches to categories and tags = +Relevanssi supports the hidden input field `cat` to restrict searches to certain categories (or +tags, since those are pretty much the same). Just add a hidden input field named `cat` in your +search form and list the desired category or tag IDs in the `value` field - positive numbers +include those categories and tags, negative numbers exclude them. + +This input field can only take one category or tag id (a restriction caused by WordPress, not +Relevanssi). If you need more, use `cats` and use a comma-separated list of category IDs. + +The same works with post types. The input fields are called `post_type` and `post_types`. + +You can also set the restriction from general plugin settings (and then override it in individual +search forms with the special field). This works with custom taxonomies as well, just replace `cat` +with the name of your taxonomy. + +If you want to restrict the search to categories using a dropdown box on the search form, use +a code like this: + +`
+
+ + 'All categories')); +?> + +
+
` + +This produces a search form with a dropdown box for categories. Do note that this code won't work +when placed in a Text widget: either place it directly in the template or use a PHP widget plugin +to get a widget that can execute PHP code. + += Restricting searches with taxonomies = + +You can use taxonomies to restrict search results to posts and pages tagged with a certain +taxonomy term. If you have a custom taxonomy of "People" and want to search entries tagged +"John" in this taxonomy, just use `?s=keyword&people=John` in the URL. You should be able to use +an input field in the search form to do this, as well - just name the input field with the name +of the taxonomy you want to use. + +It's also possible to do a dropdown for custom taxonomies, using the same function. Just adjust +the arguments like this: + +`wp_dropdown_categories(array('show_option_all' => 'All people', 'name' => 'people', 'taxonomy' => 'people'));` + +This would do a dropdown box for the "People" taxonomy. The 'name' must be the keyword used in +the URL, while 'taxonomy' has the name of the taxonomy. + += Automatic indexing = +Relevanssi indexes changes in documents as soon as they happen. However, changes in shortcoded +content won't be registered automatically. If you use lots of shortcodes and dynamic content, you +may want to add extra indexing. Here's how to do it: + +`if (!wp_next_scheduled('relevanssi_build_index')) { + wp_schedule_event( time(), 'daily', 'relevanssi_build_index' ); +}` + +Add the code above in your theme functions.php file so it gets executed. This will cause +WordPress to build the index once a day. This is an untested and unsupported feature that may +cause trouble and corrupt index if your database is large, so use at your own risk. This was +presented at [forum](http://wordpress.org/support/topic/plugin-relevanssi-a-better-search-relevanssi-chron-indexing?replies=2). + += Highlighting terms = +Relevanssi search term highlighting can be used outside search results. You can access the search +term highlighting function directly. This can be used for example to highlight search terms in +structured search result data that comes from custom fields and isn't normally highlighted by +Relevanssi. + +Just pass the content you want highlighted through `relevanssi_highlight_terms()` function. The +content to highlight is the first parameter, the search query the second. The content with +highlights is then returned by the function. Use it like this: + +`if (function_exists('relevanssi_highlight_terms')) { + echo relevanssi_highlight_terms($content, get_search_query()); +} +else { echo $content; }` + += What is tf * idf weighing? = + +It's the basic weighing scheme used in information retrieval. Tf stands for *term frequency* +while idf is *inverted document frequency*. Term frequency is simply the number of times the term +appears in a document, while document frequency is the number of documents in the database where +the term appears. + +Thus, the weight of the word for a document increases the more often it appears in the document and +the less often it appears in other documents. + += What are stop words? = + +Each document database is full of useless words. All the little words that appear in just about +every document are completely useless for information retrieval purposes. Basically, their +inverted document frequency is really low, so they never have much power in matching. Also, +removing those words helps to make the index smaller and searching faster. + +== Known issues and To-do's == +* Known issue: In general, multiple Loops on the search page may cause surprising results. Please make sure the actual search results are the first loop. +* Known issue: Relevanssi doesn't necessarily play nice with plugins that modify the excerpt. If you're having problems, try using relevanssi_the_excerpt() instead of the_excerpt(). + +== Thanks == +* Cristian Damm for tag indexing, comment indexing, post/page exclusion and general helpfulness. +* Marcus Dalgren for UTF-8 fixing. +* Warren Tape for 2.5.5 fixes. +* Mohib Ebrahim for relentless bug hunting. + +== Changelog == + += 3.3.8 = +* Fixed a bug that caused the results to change depending of the order of words in a multi-word search query. +* Added `product_categories` and `recent_products` from WooCommerce to the list of blocked shortcodes. +* There are improvements in excerpt-building and highlighting, especially when fuzzy search is enabled. +* Fixed a possible (if quite unlikely) XSS vulnerability. +* Improved search performance (thanks to MikeNGarrett). +* Sometimes highlights in documents make the document content disappear. I don't know why, but I've added a fix that should make the content visible (without the highlights) if a problem appears. + += 3.3.7.1 = +* Fixed bbPress compatibility. + += 3.3.7 = +* Fixed bbPress compatibility. + += 3.3.6 = +* Relevanssi handles taxonomy terms in search better. The change requires a reindexing. +* Fix in indexing: Relevanssi will now bypass the global $post when indexing. This should help with problems with the Cookie Law Info plugin, for example. +* Tax query relation setting didn't work properly. It is now fixed. +* Word-based excerpt building sometimes created too short excerpts. That is now fixed. +* Synonyms are now highlighted. +* Phrase matching had issues where searching for a too common phrase crashed the search. That has been fixed. +* LIKE operator didn't work properly in meta_queries. +* Problems with Avatar Upload plugin are fixed. +* Offset errors with mb_stripos() shouldn't happen anymore. +* A small problem in taxonomy search MySQL fixed, also a small problem with AND operator in tax_queries. +* New filter: `relevanssi_post_to_index` lets you access the post object before the post is indexed. +* New filter: `relevanssi_orderby` lets you modify the $orderby value before Relevanssi sorts posts. +* New filter: `relevanssi_order` lets you modify the $order value before Relevanssi sorts posts. +* New filter: `relevanssi_post_title_before_tokenize` lets you modify post titles before indexing. +* New filter: `relevanssi_private_cap` lets you adjust the capability setting for private posts in custom post types. +* Deprecated use of `like_escape` has been fixed. + += 3.3.5 = +* Fixed a bug where excluding posts would cause the search to fail. +* Fixed a bug causing duplicate search results in WPML searches. +* Increased plugin safety against hackers. +* There was a bug in `relevanssi_comment_content_to_index` filter. +* Some people had problems with the log entry timestamps. Fixed that. +* New filter: `relevanssi_prevent_default_request` gives you more control over where Relevanssi prevents the default query from running. +* New filter: `relevanssi_private_cap` lets you set the correct capability for finding private posts in custom post types. +* The option to exclude categories and tags from search only worked for categories, not tags. Tags have been separated to a different option. + += 3.3.4 = +* Couple of bug fixes. + += 3.3.3 = +* OR fallback had problems. +* Indexing sub pages didn't work. +* Relevanssi now automatically treats 'ß' as 'ss'. If your site has 'ß' in text, reindexing the database is a good idea. +* Query variable `post_status` is now supported. + += 3.3.2 = +* Fixed a warning on search results page. + += 3.3.1 = +* Fixed bugs related to the removal of the cache feature. + += 3.3 = +* Improvements to excerpts: excerpts with phrases work much better now, and the excerpt creation logic has been improved: the excerpts are now better. The process takes a bit more time, though. +* Allowing HTML tags in excerpts could lead to those tags being left open. Relevanssi will now try to close open HTML tags in excerpts. +* Allowed tags were not controlled in comments. They are now. +* Highlighting in documents didn't always work; it should be more reliable now. +* Non-integer values are removed from `post__in` and `post__not_in` before processing them. +* Query variables `p` and `page_id` are now supported. +* Relevanssi now understands `date_query` variables as well. +* The original post excerpt is stored in $post->original_excerpt. +* Taxonomy search works better with term id parameters (for example from `wp_category_dropdown`). +* Errors about $wpdb->prepare() missing an argument removed. +* New functions: `relevanssi_the_title()` and `relevanssi_get_the_title()` can be used to display highlighted titles in search results. +* The old title highlighting method has been disabled, because it caused highlights in wrong places. Now the highlighted title is stored in $post->highlighted_post_title, take it from there or use the Relevanssi title functions to display it. +* Polylang and WPML support was adjusted to perform better in edge cases. +* Indexing is faster, thanks to some improved code from Tom Novelli. +* MySQL injection attack vulnerability removed. +* The cache feature is now removed. Relevanssi should automatically drop the cache tables. +* New filter: `relevanssi_indexing_data` lets you modify the data before it's indexed. + += 3.2 = +* Fixed a bug in the TablePress support. +* Titles are put through the_title filter before indexing. +* New filter: `relevanssi_join` can be used to join tables in the Relevanssi search MySQL queries. Thanks to Ninos Ego. +* New filter: `relevanssi_post_content` can be used to modify post content before any Relevanssi processing. +* New filter: `relevanssi_post_content_before_tokenize` can be used to modify post content just before it's tokenized. +* New filter: `relevanssi_indexing_values` can be used to modify what Relevanssi stores in the index. +* New filter: `relevanssi_default_meta_query_relation` can be used to change the default meta query relation (default value is "AND"). +* When using a meta_query, `relation` can be set to OR now. +* Phrases are now matched to excerpts. +* Number of queries Relevanssi generates is much, much lower. +* New filter: `relevanssi_didyoumean_url` lets you modify the URL generated by the did you mean feature. +* Better set of Russian stopwords. +* Relevanssi now highlights search query synonyms as well in documents. + += 3.1.9 = +* Fix to make Relevanssi compatible with WordPress 3.7. +* Fixed a mistyped database table name. +* Relevanssi disables responsive-flipbook shortcode in indexing; it was causing problems. +* Fixed a problem with an author dropdown with no author selected. + += 3.1.8 = +* Category restriction and exclusion and couple of other category-related settings didn't work properly. +* Support for Polylang broke the support for WPML. That is now fixed. +* One deprecated `$wpdb->escape()` was still left; it's gone now. +* Shortcode `layerslider` was causing problems with Relevanssi; Relevanssi now disables it before building excerpts. +* Relevanssi won't break BBPress search anymore. +* If Relevanssi Premium is installed, deleting Relevanssi will not remove the databases and the options. + += 3.1.7 = +* New filter: `relevanssi_comment_content_to_index` lets you modify comment content before it's indexed by Relevanssi (to index comment meta, for example). +* Facetious support: if post_type is set to -1, Relevanssi will not hang up on it. +* Numerical search terms work better now. +* Excerpt-building had issues, which are now fixed. +* Punctuation removal now replaces   with a space. +* "starrater" short code from GD Star Rating is now disabled in indexing. +* Punctuation removal now replaces invisible spaces with a normal space. +* Division by zero error caused by 0 in posts_per_page is now prevented, and -1 value for posts_per_page handled better. +* Relevanssi doesn't apply `get_the_excerpt` filters to excerpts it builds any more. +* New filter: `relevanssi_excerpt` lets you modify the excerpts Relevanssi creates. +* Relevanssi now suspends WP post cache while indexing, making indexing a lot more efficient. Thanks to Julien Mession for this one. +* Deprecated function errors in 3.6 removed. +* When search included user profiles or taxonomy terms, Relevanssi would generate lots of MySQL errors. Not anymore. +* New filter: `relevanssi_valid_status` lets you modify the post statuses Relevanssi indexes. +* New filter: `relevanssi_index_taxonomies_args` lets you modify the arguments passed to get_terms() when indexing taxonomies (for example to set 'hide_empty' to false). +* Searching by taxonomy ID could confuse two taxonomies with the same term_id. The search is now checking the taxonomy as well to see it's correct. +* Basic support for Polylang plugin. +* Russian and Italian stopwords are now included, thanks to Flector and Valerio Vendrame. +* Small fix in the way user meta fields are handled. + += 3.1.6 = +* DEACTIVATE AND ACTIVATE THE PLUGIN AFTER YOU UPDATE. +* Fuzzy searches are now a lot more efficient; they were a huge resource hog before. +* Fixed a possible MySQL injection attack. +* Fixed MySQL errors from empty meta queries. +* Sort order (orderby and order variables) are now read from query variables instead of global variables. +* Relevanssi will not choke on bad values of orderby anymore. +* Limit searches is improved: when using AND search it is less likely to miss results. +* Phrase recognition read the whole post content (which it didn't need) from database, causing memory issues in some cases. Fixed that. +* Highlighting was broken, and should work much better now. + += 3.1.5 = +* OR fallback didn't actually fall back to OR, but instead got stuck in an endless loop of AND searches. +* Meta queries didn't work without a key; now they work with just meta_value or meta_value_num. +* Meta queries had problems with meta_value being set to null. +* Relevanssi now supports category__and. By default this sets include_children to false. +* When querying by slug, the term taxonomy is also taken into consideration, fixing problems when same slug appears in different taxonomies. +* Author search didn't work. +* Fixed an error message caused by all-number synonyms starting with zero, like 02. +* Synonyms are now case-insensitive. +* New filter: `relevanssi_default_tax_query_relation` can be used to change the default tax query relation from OR to AND. +* Fixed undefined variable errors when doing an OR fallback. +* New filter: `relevanssi_bots_to_not_log` makes it possible to block bots from logs. The format matches what other plugins, ie. WP-Useronline, use for bot blocking, so you can share block lists. +* New filter: `relevanssi_admin_search_ok` gives you more control when Relevanssi overrides the default WP search in admin, useful for fixing P2P_Box AJAX search. +* Ordering search results by title or date in admin search works now. +* Modified the way the highlights work; now highlighting words with apostrophes should produce more meaningful results. +* Highlighting should not highlight anything between & and ; or in or tags, thus solving some of the problems related to highlights. Reports of how well this works are welcome. +* On-post highlighting now only highlights content in the loop, so menu texts and other off-the-loop stuff should not get highlights anymore. +* New action hook: `relevanssi_pre_indexing_query` can be used to "SET OPTION SQL_BIG_SELECTS=1" if needed. +* Major indexing problems caused by shortcodes changing the post ID during the indexing of posts are now fixed. +* Relevanssi was being called twice when a post was saved, on `save_post` and `wp_insert_post`. I removed the hook on `save_post`. +* Unsuccessful searches are now ordered by count, like the successful queries are. + += 3.1.4 = +* Choosing which taxonomies to index is now done with an easy-to-use checkbox list. +* Support for WP Table Reloaded and TablePress. Tables created with these plugins will now be expanded and the content indexed by Relevanssi. +* New filter: `relevanssi_index_comments_exclude` can be used to exclude comments from indexing. The filter gets the post ID as a parameter, so you can prevent comments of particular posts being indexed, yet index those posts. +* Relevanssi now adds spaces between tags when creating excerpts to make neater excerpts from tables and other similar situations. +* Relevanssi now indexes unattached attachments, if you choose to index attachments. +* Fixed the problems with Twenty Ten and Twenty Eleven themes better. +* $match->tag now contains the number of tag hits. +* Relevanssi now adds relevance score to posts before passing them to relevanssi_hits_filter. You can find it in $post->relevance_score. +* Tags in breakdowns always showed 0, even though tags were indexed and searched correctly. That's now fixed. + += 3.1.3 = +* AND search did not work in all cases. +* Posts couldn't be found by category name. Fixed that. + += 3.1.2 = +* Exclude category option was broken. Fixed that. +* Searching for a non-existing category ID caused an error. Fixed that. +* Occasional blank screens of death occurred when multibyte string operations weren't installed. That should not happen anymore. +* Fallback to OR search was a bit broken. + += 3.1.1 = +* Small fix to prevent database errors. +* Small fix to prevent disappearing excerpts. + += 3.1 = +* Fixed the uninstalling instructions. +* Fixes a problem with Twenty Ten and Twenty Eleven themes that caused doubled "Continue Reading" links. +* Fixed a notice about undefined variable on plugin update pages. +* Small bug fixes on search to remove warning notices. +* New filter: `relevanssi_index_custom_fields` can be used to modify the list of custom fields to index. +* Deleting menus caused a warning. That is now fixed. +* Relevanssi has an option to disable IP logging (which is actually illegal in some countries). Thanks to Stefan Eufinger. +* Searching in subcategories worked sometimes, but not always. Thanks to Faebu. +* The "Limit searches" option didn't work too well in the case of strong weightings, as it didn't take note of any weights. Now it works better. +* Added a note about disabling custom excerpts when they are not needed - they can slow down the search quite a bit. +* New filter: `relevanssi_options_capability` can be used to modify the capability required to see the options page (default is `manage_options`). +* Fixed the way IDF is calculated to account some extreme cases with small databases. +* New filter: `relevanssi_index_custom_fields` gives added control over which custom fields are indexed. +* Fixed filter: `relevanssi_pre_excerpt_content` wasn't working properly. +* Relevanssi now supports tax_query, for most part. You can query multiple taxonomies, use relation AND and OR, use operators AND, IN and NOT IN and choose include_children (which defaults to true). Old `taxonomy` and `term` still work, but I recommend using tax_query for the level of control it offers. +* Relevanssi now works better with category restrictions. The extra `cats` query variable is no longer necessary, Relevanssi can now read multiple categories from `cat`. You can also use `category__and`, `category__in` and `category__not_in`. +* Same goes with tags: `tags` is now longer necessary. Relevanssi has full support for `tag`, `tag_id`, `tag__and`, `tag__in`, `tag__not_in`, `tag_slug__and`, `tag_slug__in` and `tag_slug__not_in`. For `tag`, both `term1+term2` and `term1,term2` is supported. +* Relevanssi now supports `author_name` and negative values for `author`. +* Relevanssi now supports `offset` query variable. +* Relevanssi now supports meta_query. You can use all comparisons (also EXISTS and NOT EXISTS, even if you don't have WP 3.5). You can also use the older `meta_key` and `meta_value` query variables, including all the comparisons. I have not tested all possible meta_query constructions, so bug reports of things that don't work as expected are welcome. +* New index on the database makes some database operations faster. +* Removed a bug that prevents one-character words from being indexed in titles, despite the minimum word length setting. +* Removed a warning when searching for nothing. +* Fixes a warning about $wpdb->prepare() caused by a change in WordPress 3.5. + += 3.0.5 = +* AFTER UPGRADING FROM 2.x: Make sure you deactivate and reactivate Relevanssi in order to make the database changes happen. +* Fixed a major bug that caused the searches to fail when "Limit searches" was enabled, but "Limit" was not defined. +* Modified `relevanssi_remove_punct()` to replace curly apostrophes and quotes with spaces instead of removing them, to make the index more consistent (regular apostrophes were replaced with spaces). Reindexing the database is a good idea. +* Fixed some misleading text on the options page. + += 3.0.4 = +* AFTER UPGRADING FROM 2.x: Make sure you deactivate and reactivate Relevanssi in order to make the database changes happen. +* Fixed another problem with the Jetpack Contact Form. +* Fixed an error message caused by searching for numbers. +* Phrases are now also recognized in drafts and attachments. +* You can now set `post_types` to 'any'. + += 3.0.3 = +* AFTER UPGRADING FROM 2.x: Make sure you deactivate and reactivate Relevanssi in order to make the database changes happen. +* Fixed a bug that made custom taxonomy term searches fail. +* New filter: `relevanssi_user_searches_capability` lets you modify the minimum capability required to see the User searches page. + += 3.0.2 = +* AFTER UPGRADING FROM 2.x: Make sure you deactivate and reactivate Relevanssi in order to make the database changes happen. +* Fixed the "Cannot use a scalar value as an array" bug in indexing. +* Role-Scoper users: in order to make Relevanssi work with Role-Scoper, replace the Relevanssi helper file in Role-Scoper with [this file](http://www.relevanssi.com/relevanssi-helper-front_rs.txt). +* Removed an error message about set_time_limit() under safe_mode. +* Jetpack Contact Form shortcode caused problems when indexing. Relevanssi will now simply remove the shortcode before indexing. +* Fixed errors caused by / characters in highlighting. + += 3.0.1 = +* AFTER UPGRADING FROM 2.x: Make sure you deactivate and reactivate Relevanssi in order to make the database changes happen. +* Fixed lots of problems in logging searches. +* Added an alert when user hasn't selected any post types to index (and default values). +* Custom field setting 'visible' works now. +* Searching by category title works now, and you can adjust the category weight in the settings. + += 3.0 = +* AFTER UPGRADING FROM 2.x: Make sure you deactivate and reactivate Relevanssi in order to make the database changes happen. +* WORD OF WARNING: This is a major update, with lots of changes as you can see, and since I couldn't find any beta testers to help test it out, consider this a beta release, with bugs probable. +* The database has been updated to match the more advanced structure in Relevanssi Premium. This requires a re-indexing of the database. +* The indexing process is more efficient now. +* Relevanssi now includes a throttle feature, which makes the searches more efficient. +* Relevanssi now disables the default WP search. +* The custom field search hack using `cat` set to "custom" doesn't work any more. If you wish to filter by custom field, you need Relevanssi Premium, which does it better anyway. +* Relevanssi can handle certain whitespace characters better in indexing. +* Apostrophes are now replaced with whitespace instead of being removed. +* Relevanssi now shows correct number of results when posts_per_page is set to -1. +* Fuzzy search didn't always activate when it should, if all found posts are private posts that can't be shown to user. +* Tab characters in excerpts are handled better now. +* Relevanssi search logs will now store user ID's and IP addresses for each query. +* You can now use user logins as well as numeric ID's to stop user from being logged. +* Attachments are now handled better. I'd still like to hear any complaints about attachments. +* Relevanssi now updates index for posts added with wp_update_post() function. (Thanks to Simon Blackbourn) +* Searching for pages in admin didn't work properly. Fixed that. +* Fixed warnings for undefined variables. +* Relevanssi won't mess media library searches any more. +* Search terms are no longer highlighted in titles on post pages. That caused too many problems. +* New collation rules to MySQL databases will make sure that word pairs like "pode" and "pôde" will not be considered duplicates in the stopword database. +* You can now set the "Custom fields to index" to "all" to index all custom fields and "visible" to index all visible custom fields (but not the ones with names starting with an underscore). +* Plugin now works properly without multibyte string functions. +* You can now choose to allow HTML tags in excerpts. +* New filter: `relevanssi_modify_wp_query` lets you modify $wp_query before it is passed to Relevanssi. +* New filter: `relevanssi_search_ok` lets you adjust when search is enabled. +* New filter: `relevanssi_pre_excerpt_content` lets you adjust post content before excerpt creation. +* New filter: `relevanssi_excerpt_content` lets you adjust post content before excerpt creation, but after `the_content`. +* New filter: `relevanssi_ellipsis` lets you change the default '...' in excerpts to something else. +* New filter: `relevanssi_do_not_index` is given a post ID and expects a boolean in return: should this post be indexed or not? +* New filter: `relevanssi_match` lets you meddle with the matching engine. +* New filter: `relevanssi_results` filters the result set from the search. +* New filter: `relevanssi_content_to_index` let's you add whatever content you wish to posts before they are indexed. +* New filter: `relevanssi_didyoumean_query` let's you modify the query for Did you mean? queries +* Changed filter: `relevanssi_post_ok` has different arguments, see source code for details. +* New shortcode: use shortcode `noindex` to wrap parts of posts you want to keep from the index. +* And a bunch of other changes. + += 2.9.14 = +* Relevanssi will now index pending and future posts. These posts are only shown in the admin search. + += 2.9.13 = +* Stripping shortcodes from excerpts didn't work properly. Should work now. +* Fixed a mistake in the FAQ: correct post date parameter is `post_date`, not `date`. +* New filter `relevanssi_results` added. This filter will process an array with (post->ID => document weight) pairs. +* Private and draft posts were deleted from the index when they were edited. This bug has been fixed. (Thanks to comprock.) +* When continuing indexing, Relevanssi now tells if there's more to index. (Thanks to mrose17.) +* Fixed problems with searching attachments. Indexing attachments still has some problems. When you build the index, attachments are indexed properly. +* Improved WPML support. +* The `relevanssi_index_doc()` function has a new parameter that allows you to bypass global $post and force the function to index the document given as a parameter (see 2.9.13 release notes at Relevanssi.com for more details). + += 2.9.12 = +* Scheduled cache truncate wasn't scheduled properly. It is now. +* Added support for 'author' query variable. +* Fixed a bug with indexing custom post types. + += 2.9.11 = +* Plugin now works properly without multibyte string functions. +* Fixed s2member support for s2member versions 110912 and above. (Thanks to Jason Caldwell.) +* Added support for 'tag' query variable. + += 2.9.10 = +* AND search failed, when search query included terms that are shorter than the minimum word length. +* Improved s2member support. +* Fixed errors about deprecated ereg_replace. +* Small fix to Did you mean suggestions. + += 2.9.9 = +* Removed warnings about undefined functions and missing $wpdb. +* Fixed a bug that removed 'à' from search terms. +* Phrases are recognized from custom field searches. + += 2.9.8 = +* Support for s2member membership plugin. Search won't show posts that the current user isn't allowed to see. +* New filter `relevanssi_post_ok` can be used to add support for other membership plugins. +* Post meta fields that contain arrays are now indexed properly, expanding all the arrays. + += 2.9.7 = +* Fixed a bug that causes problems when paging search results. +* Taxonomy term restrictions didn't work most of the time. +* the_content filters didn't run on excerpts. +* Style data and other extra elements created by short codes are now stripped. + += 2.9.6 = +* Fixed a problem causing "Attempt to modify property of non-object" errors. +* Fixed a warning message. + += 2.9.5 = +* Searching for private posts caused an error message. + += 2.9.4 = +* Relevanssi should now be much lighter on server. +* Post date selection didn't work properly. Fixed that. +* Stopwords can be exported. +* Restricting indexing on custom post types works better. +* Minimum word length is properly enforced in indexing. +* Punctuation removal is more efficient. +* Fixed a MySQL error that was triggered by a media upload. +* Fixed a bug that caused an error when quick editing a post. + += 2.9.3 = +* A call to a non-existing function in 2.9.2 made all sorts of mess. This release fixes all problems with broken loops. I'm sorry about the bug. + += 2.9.2 = +* It's now possible to adjust the number of search results per page. See [Changing posts_per_page](http://www.relevanssi.com/knowledge-base/posts-per-page/) for instructions. +* Somebody reported revisions appearing in the search results. Added an extra check to prevent that. +* Improved the indexing procedure to prevent MySQL errors from appearing and to streamline the process. +* Improved the way custom post types can be handled in indexing. +* Improved the method of removing nested highlights. + += 2.9.1 = +* It is now possible to change the default result order from relevance to post date. +* Fixed a bug that caused wrong $post object to be set in indexing. +* Added a new hook `relevanssi_excerpt_content`; see [Knowledge Base](http://www.relevanssi.com/category/knowledge-base/) for details. + += 2.9 = +* Fixed a bug that caused Cyrillic searches in the log to get corrupted. +* Punctuation removal function is now triggered with a filter call and can thus be replaced. +* Google Adsense caused double hits to the user search logs. That's now fixed thanks to Justin Klein. +* User search log is available to user with `edit_post` capabilities (editor role). Thanks to John Blackbourn. +* A proper database collation is now set. Thanks to John Blackbourn. +* UI looks better. Thanks to John Blackbourn. +* Lots of small fixes here and there. + += 2.8.2 = +* The `order` parameter was case sensitive. It isn't anymore. +* WordPress didn't support searching for multiple categories with the `cat` query variable. There's now new `cats` which can take multiple categories. +* Similar to `cats` vs `cat`, you can use `post_types` to restrict the search to multiple post types. + += 2.8.1 = +* Fixed two small mistakes that caused error notices. +* Custom post types, particularly those created by More Types plugin, were causing problems. + += 2.8 = +* There's now a way to truncate the cache (sorry it took so long). Expired cache data is now automatically removed from the database every day. There's also an option to clear the caches. +* Highlights didn't work properly with non-ASCII alphabets. Now there's an option to make them work. +* Title highlight option now affects external search term highlights as well. +* There were some bugs on the options page. + += 2.7.5 = +* There was a bug that caused shortcodes to fail in 2.7.4. That's fixed now. +* Category search will now include subcategories as well, both when including and excluding. + += 2.7.4 = +* Improved the fallback to fuzzy search if no hits are found with regular search. +* AND searches sometimes failed to work properly, causing unnecessary fallback to OR search. Fixed. +* When using WPML, it's now possible to choose if the searches are limited to current language. +* Adding stopwords from the list of 25 common words didn't work. It works now. +* The instructions to add a category dropdown to search form weren't quite correct. They are now. +* Small fix that makes shortcodes in posts more compatible with Relevanssi. + += 2.7.3 = +* IMPORTANT SECURITY UPDATE: Earlier versions of Relevanssi have a cross-site scripting (XSS) vulnerability. Please install this update as soon as possible. +* Added instructions of doing a category dropdown in the search form in the FAQ. + += 2.7.2 = +* A silly typo caused the caching not to work. That's fixed now. +* A new filter: `relevanssi_didyoumean_query` lets you modify the query used for 'Did you mean?' searches. + += 2.7.1 = +* Thanks to a bug in the code, the WPML support didn't work. It's fixed now. + += 2.7 = +* Caching search results is possible. If you have lots of repeated queries, caching will provide extra speed and less wear on server. +* Multilanguage plugin WPML is now supported. If WPML is active, Relevanssi will automatically restrict search results to current language. +* New filter: `relevanssi_search_filter` lets you adjust search query variables. See source code for further details. Thanks to Sam Hotchkiss. +* Got a report of synonyms not working; hopefully fixed it now. +* It is now possible to set the minimum word length to index. Default is now 3 instead of 2. +* You can now add several stopwords at one go and remove all stopwords. +* Author search didn't work properly. It works now. +* Search result highlighting functions properly now, there might've been some problems with it. + += 2.6 = +* New setting allows user to define how `exclude_from_search` is handled. It's now possible to exclude a custom post type from general searches and search for it specifically by defining post_type. +* New filter: `relevanssi_hits_filter` lets you process hits found by Relevanssi. See FAQ. + += 2.5.6 = +* Attachments are no longer automatically indexed; there's an option for it now. +* You can now exclude custom post types from index. +* When AND search fails, it falls back to OR search. It's now possible to disable this fallback. + += 2.5.5 = +* The stopword management created empty stopwords. It won't anymore. +* Faulty HTML code in the admin page has been fixed. +* Indexing shortcodes that need the global $post context is now possible. +* Relevanssi is now aware of attachments and manages post_status of "inherit". +* These fixes were provided by Warren Tape, thanks! + += 2.5.4 = +* Small bugfix relating to post types. +* Added stopword management tools: way to remove and add stopwords. +* Custom excerpts can now be created from post excerpts as well, if those are indexed. +* Added answers to some frequently asked questions to the documentation. + += 2.5.3 = +* Very small bugfix fixing the error on line 1192. + += 2.5.2 = +* Fixed a bug about `mysql_real_escape_string()` expecting a string. +* Added documentation about compatibility issues. + += 2.5.1 = +* Option to highlight search terms in comment text as well. +* Fixed a small problem in highlighting search terms. + += 2.5 = +* Better support for other search plugins like [Dave's WordPress Live Search](http://wordpress.org/extend/plugins/daves-wordpress-live-search/). +* New User searches screen that shows more data about user searches. +* Search logs can now be emptied. +* Custom fields weren't indexed on updated posts. That is now fixed. +* Once again improved the highlighting: now the highlighting will look for word boundaries and won't highlight terms inside words. +* Relevanssi query engine can now be accessed directly, making all sorts of advanced hacking easier. See FAQ. + += 2.4.1 = +* Fixed a problem where search term highlighting was changing terms to lowercase. +* Fixed a problem with highlighting breaking stuff in shortcodes. +* Made some changes to the admin interface - there's more to come here, as the admin page is a bit of a mess right now. + += 2.4 = +* Highlighting post content won't highlight inside HTML tags anymore. +* Soft hyphens inside words are now removed in indexing. They still confuse the highlighting. +* Matching engine is now able to match category titles that contain apostrophes. + += 2.3.3.1 = +* Suppressed the error messages on the correct mb_strpos() function call. If you still get mb_strpos() errors, update. +* Added a FAQ note on getting the number of search results found. + += 2.3.3 = +* Suppressed notices on one mb_strpos() call. +* Added a search variable "by_date" to filter search results, see FAQ for details. + += 2.3.2 = +* Fixed a serious bug related to taxonomy term searches that could cause strange search results. Thanks to Charles St-Pierre for finding and killing the bug. +* Spanish stopwords are now included (thanks to Miguel Mariano). + += 2.3.1 = +* I fixed the highlighting logic a bit, the highlighting didn't work properly before. + += 2.3 = +* New highlighting option: HTML5 mark tag. Thanks to Jeff Byrnes. +* Relevanssi can now highlight search term hits in the posts user views from search. Highlighting for search term hits from external searches will be added later. +* It is now possible to add custom filtering to search results, see FAQ for details. Thanks to Charles St-Pierre. +* Removed search result highlighting from admin search, where it wasn't very useful. + += 2.2 = +* Relevanssi used to index navigation menu items. It won't, anymore. +* Translation and stopwords in Brazilian Portuguese added, thanks to Pedro Padron. + += 2.1.9 = +* No changes, I'm just trying to resurrect the broken Relevanssi plugin page. + += 2.1.8 = +* Including the popular microtime_float function caused conflicts with several other plugins (whose authors are just as sloppy as I am!). Fixed that. + += 2.1.7 = +* The index categories option wasn't saved properly. Now it is. +* Fixed the %terms% breakdown option to show correct counts and added %total% to show total hit count. +* Phrases are now matched also in post titles and category titles (before they were only matched against post content). +* Post excerpts can now be indexed and searched. I would appreciate feedback from people who use this feature: do you use the excerpts in search results? If you use custom snippets created by Relevanssi, what you want them to display? +* Set the constant TIMER to true to enable timing of the search process for debugging reasons. + += 2.1.6 = +* Title highlighting caused an error. That is now fixed. I also streamlined the highlighting code a bit. + += 2.1.5 = +* You can now enter synonyms, expanding queries with synonyms when doing an OR search. This is useful to expand acronyms and abbreviations, for example. +* When doing a phrase search, highlighting will only highlight phrase hits. +* New breakdown variable %terms% will list hits by term. +* Some users reported error messages about unexpected T_OBJECT_OPERATOR. Those shouldn't happen, please let me know if they still do. +* Highlighting will now highlight only complete words. + += 2.1.4 = +* Fixed a small bug that could cause all queries by anonymous users to go unlogged. + += 2.1.3 = +* OR operator makes a comeback! The default operator is now an option, and if you choose AND and search gets no results, an OR search is also run. +* You can now give a list of user ids - any searches by those users will not be logged. List your admin user id, so your test searches won't clutter the log. + += 2.1.2 = +* Removing punctuation didn't work properly, making phrase search impossible. I'd thought I'd fix it, but for some reason I made a mistake and the fix didn't appear in the released versions. +* Search has now an implicit AND operator, which means that every search term must appear in all result documents. Please let me know if you'd prefer an implicit OR operator, like Relevanssi had before. +* Relevanssi options page now shows the amount of indexed documents, making troubleshooting indexing easier. + += 2.1.1 = +* "Did you mean" suggestions now work in blogs that are not in root directory. +* Early 2.1 downloads had faulty encodings. Update to make sure you've got a good file. + += 2.1 = +* An experimental "Did you mean" suggestion feature. Feedback is most welcome. +* Added a short code to facilitate adding links to search results. +* Fixed a small bug that in some cases caused MySQL errors. + += 2.0.3 = +* Fixed problems relating to the orderby parameter. + += 2.0.2 = +* Small bug fix: with private posts, sometimes correct amount of posts weren't displayed. + += 2.0.1 = +* Exclude posts/pages option wasn't saved on the options page. It works now. +* 2.0 included an unnecessary function that broke Relevanssi in WP 2.8.5. Fixed that. + += 2.0 = +* Post authors can now be indexed and searched. Author are indexed by their display name. +* In search results, $post->relevance_score variable will now contain the score of the search result. +* Comment authors are now included in the index, if comments are indexed. +* Search results can be sorted by any $post field and in any order, in addition of sorting them by relevancy. +* Private posts are indexed and displayed to the users capable of seeing them. This uses Role-Scoper plugin, if it's available, otherwise it goes by WordPress capabilities. +* Searches can be restricted with a taxonomy term (see FAQ for details). + += 1.9 = +* Excerpts are now better and will contain more search terms and not just the first hit. +* Fixed an error relating to shortcodes in excerpts. +* If comments are indexed, custom excerpts will show text from comments as well as post content. +* Custom post type posts are now indexed as they are edited. That didn't work before. +* Cleaned out more error notices. + += 1.8.1 = +* Sometimes empty ghost entries would appear in search results. No more. +* Added support for the WordPress' post_type argument to restrict search results to single post type. +* Relevanssi will now check for the presence of multibyte string functions and warn if they're missing. +* The category indexing option checkbox didn't work. It's now fixed. +* Small fix in the way punctuation is removed. +* Added a new indexing option to index all public post types. + += 1.8 = +* Fixed lots of error notices that popped up when E_NOTICE was on. Sorry about those. +* Custom post types can now be indexed if wanted. Default behaviour is to index all post types (posts, pages and custom types). +* Custom taxonomies can also be indexed in addition to standard post tags. Default behaviour is to index nothing. If somebody knows a way to list all custom taxonomies, that information would be appreciated. + += 1.7.3 = +* Small bug fix: code that created database indexes was broken. Say "ALTER TABLE `wp_relevanssi` ADD INDEX (doc)" and "ALTER TABLE `wp_relevanssi` ADD INDEX (term)" to your MySQL db to fix this for an existing installation. + += 1.7.2 = +* Small bug fix: public posts that are changed to private are now removed from index (password protected posts remain in index). +* An Italian translation is now included (thanks to Alessandro Fiorotto). + += 1.7.1 = +* Small fix: the hidden variable cat now accepts negative category and tag ids. Negative categories and tags are excluded in search. Mixing inclusion and exclusion is possible. + += 1.7 = +* Major bug fix: Relevanssi doesn't kill other post loops on the search result page anymore. Please let me know if Relevanssi feels too slow after the update. +* Post categories can now be indexed. + += 1.6 = +* Relevanssi is now able to expand shortcodes before indexing to include shortcode content to the index. +* Fixed a bug related to indexing, where tag stripping didn't work quite as expected. + += 1.5.3 = +* Added a way to uninstall the plugin. +* A French translation is now included (thanks to Jean-Michel Meyer). + += 1.5.2 = +* Fixed a small typo in the code, tag and comment hit count didn't work in the breakdown. If you don't use the breakdown feature, updating is not necessary. + += 1.5.1 = +* User interface update, small changes to make the plugin easier to use. +* Fixed a small bug that sometimes causes "Empty haystack" warnings. + += 1.5 = +* Comments can now be indexed and searched (thanks to Cristian Damm). +* Tags can also be indexed (thanks to Cristian Damm). +* Search term hits in the titles can be highlighted in search results (thanks to Cristian Damm). +* When using custom excerpts, it's possible to add extra information on where the hits were made. +* Fuzzy matching is now user-adjustable. +* UTF-8 support is now better (thanks to Marcus Dalgren). + += 1.4.4 = +* Added an option to exclude posts or pages from search results. This feature was requested and provided by Cristian Damm. + += 1.4.3 = +* Indexing of custom fields is now possible. Just add a list of custom field names you want to include in the index on the settings page and re-index. + += 1.4.2 = +* Users can search for specific phrases by wrapping the phase with "quotes". +* Fixed a bug that caused broken HTML in some cases of highlighted search results (search term matches in highlighting HTML tags were being highlighted). +* Improved punctuation removal. This change requires reindexing the whole database. + += 1.4.1 = +* Fixed a bug that caused empty search snippets when using word-based snippets. +* Improved support for WP 2.5. +* Added an option to exclude categories and tags from search results. +* Added an option to index only posts or pages. +* Added French stopwords. + += 1.4 = +* Added an option to restrict searches to certain categories or tags, either by plugin option or hidden input field in the search form. +* The contents of `` and other such tags are now removed from excerpts. +* When indexing, HTML tags and `[shortcodes]` are removed. +* Digits are no longer removed from terms. Re-index database to get them indexed. +* Wrapped the output of `relevanssi_the_excerpt()` in

tags. +* Stopwords are no longer removed from search queries. +* Search result snippet length can now be determined in characters or whole words. + += 1.3.3 = +* Small bug fixes, removed the error message caused by a query that is all stop words. +* Content and excerpt filters are now applied to excerpts created by Relevanssi. +* Default highlight CSS class has a unique name, `search-results` was already used by WordPress. + += 1.3.2 = +* Quicktags are now stripped from custom-created excerpts. +* Added a function `relevanssi_the_excerpt()`, which prints out the excerpt without triggering `wp_trim_excerpt()` filters. + += 1.3.1 = +* Another bug fix release. + += 1.3 = +* New query logging feature. Any feedback on query log display features would be welcome: what information you want to see? +* Added a CSS class option for search term highlighting. +* Fixed a bug in the search result excerpt generation code that caused endless loops with certain search terms. + += 1.2 = +* Added new features to display custom search result snippets and highlight the search terms in the results. + += 1.1.3 = +* Fixed a small bug, made internationalization possible (translations are welcome!). + += 1.1.2 = +* English stopword file had a problem, which is now fixed. + += 1.1.1 = +* Fixed a stupid bug introduced in the previous update. Remember always to test your code before sending files to repository! + += 1.1 = +* Fixes the problem with pages in search results. + += 1.0 = +* First published version. + +== Upgrade notice == + += 3.3.8 = +* Bug fixes, fix for a possible XSS vulnerability, improved performance. + += 3.3.7.1 = +* Improved bbPress compatibility. + += 3.3.7 = +* Fixed bbPress compatibility. + += 3.3.6 = +* Many new features, small bug fixes and WP 4.0 compatibility. + += 3.3.5 = +* Bug fixes and security updates. + += 3.3.4 = +* Bug fixes. + += 3.3.3 = +* OR fallback and indexing sub pages fixed. + += 3.3.2 = +* Fixes a warning on search page. + += 3.3.1 = +* Removing the cache feature wasn't complete, which caused problems. Those should be fixed now. + += 3.3 = +* Critical MySQL injection vulnerability fixed, better excerpts and highlights, bug fixes. This version removes the cache feature. + += 3.2 = +* New filters, better search efficiency, new features, small bug fixes. + += 3.1.9 = +* WordPress 3.7 compatibility, couple of minor bug fixes. + += 3.1.8 = +Recommended for users of WPML and BBpress. Category exclusions and restrictions are also fixed. diff --git a/mu-plugins/relevanssi/relevanssi-de_DE.po b/mu-plugins/relevanssi/relevanssi-de_DE.po new file mode 100644 index 00000000..6d8f833b --- /dev/null +++ b/mu-plugins/relevanssi/relevanssi-de_DE.po @@ -0,0 +1,988 @@ +msgid "" +msgstr "" +"Project-Id-Version: Relevanssi v3.1.8\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: \n" +"PO-Revision-Date: 2013-09-18 14:31:32+0000\n" +"Last-Translator: jlund \n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: CSL v1.x\n" +"X-Poedit-Language: German\n" +"X-Poedit-Country: GERMANY\n" +"X-Poedit-SourceCharset: utf-8\n" +"X-Poedit-KeywordsList: __;_e;__ngettext:1,2;_n:1,2;__ngettext_noop:1,2;_n_noop:1,2;_c,_nc:4c,1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2;\n" +"X-Poedit-Basepath: \n" +"X-Poedit-Bookmarks: \n" +"X-Poedit-SearchPath-0: .\n" +"X-Textdomain-Support: yes" + +#: lib/excerpts-highlights.php:11 +#@ default +msgid "There is no excerpt because this is a protected post." +msgstr "Es gibt keinen Auszug, da dies eine geschütze Seite ist." + +#: lib/init.php:40 +#, php-format +#@ default +msgid "" +"Relevanssi needs attention: Remember to build the index (you can do it at the\n" +"\t\t\t settings page), otherwise searching won't work." +msgstr "Relevanssi benötigt Ihre Aufmerksamkeit. Bitte denken Sie daran, den Index aufzubauen. (Unter Einstellungen). Andernfalls funktioniert die Suche nicht." + +#: lib/init.php:84 +#: lib/init.php:85 +#@ relevanssi +msgid "User searches" +msgstr "Suchanfragen" + +#: lib/interface.php:6 +#@ relevanssi +msgid "Relevanssi Premium Search Options" +msgstr "Relevanssi Premium Such-Einstellungen" + +#: lib/interface.php:9 +#@ relevanssi +msgid "Relevanssi Search Options" +msgstr "Relevanssi Such-Einstellungen" + +#: lib/interface.php:86 +#@ relevanssi +msgid "User Searches" +msgstr "Suchanfragen" + +#: lib/interface.php:88 +#@ relevanssi +msgid "Relevanssi User Searches" +msgstr "Relevanssi Suchanfragen" + +#: lib/interface.php:335 +#, php-format +#@ relevanssi +msgid "

Successfully added %d/%d terms to stopwords!

" +msgstr "

%d/%d erfolgreich zur Stoppwort-Liste hinzugefügt!

" + +#: lib/interface.php:342 +#, php-format +#@ relevanssi +msgid "

Term '%s' added to stopwords!

" +msgstr "

Begriff '%s' zur Stoppwort-Liste hinzugefügt!

" + +#: lib/interface.php:345 +#, php-format +#@ relevanssi +msgid "

Couldn't add term '%s' to stopwords!

" +msgstr "

Konnte Begriff '%s' nicht zur Stoppwort-Liste hinzufügen!

" + +#: lib/interface.php:374 +#@ relevanssi +msgid "

Stopwords removed! Remember to re-index.

" +msgstr "

Stoppwörter entfernt! Bitte den Index neu erstellen.

" + +#: lib/interface.php:384 +#, php-format +#@ relevanssi +msgid "

Term '%s' removed from stopwords! Re-index to get it back to index.

" +msgstr "

Begriff '%s' aus aus der Stoppwort-Liste entfernt! Bitte den Index neu erstellen, um es in den Suchindex aufzunehmen.

" + +#: lib/interface.php:387 +#, php-format +#@ relevanssi +msgid "

Couldn't remove term '%s' from stopwords!

" +msgstr "

Konnte Begriff '%s' nicht aus der Stoppwort-Liste entfernen!

" + +#: lib/interface.php:398 +#@ relevanssi +msgid "25 most common words in the index" +msgstr "Die 25 häufigsten Begriffe im Index" + +#: lib/interface.php:400 +#@ relevanssi +msgid "These words are excellent stopword material. A word that appears in most of the posts in the database is quite pointless when searching. This is also an easy way to create a completely new stopword list, if one isn't available in your language. Click the icon after the word to add the word to the stopword list. The word will also be removed from the index, so rebuilding the index is not necessary." +msgstr "Diese Wörter bilden hervorragendes Stoppwort-Material. Ein Wort, das auf den meisten Ihrer Seiten erscheint, ist für die Suche nutzlos. Auf diese Weise können Sie außerdem eine neue Stoppwort-Liste erstellen, falls in Ihrer Sprache keine solche Liste vorhanden ist. Klicken Sie auf das Icon hinter dem Wort um ein Wort in die Stoppwort-Liste aufzunehmen. Das Wort wird danach auch aus dem Index entfernt, daher müssen Sie den Such-Index nicht neu erstellen." + +#: lib/interface.php:426 +#@ relevanssi +msgid "Add to stopwords" +msgstr "Zu den Stoppwörtern hinzufügen" + +#: lib/interface.php:437 +#@ relevanssi +msgid "Total Searches" +msgstr "Alle Suchanfragen" + +#: lib/interface.php:440 +#@ relevanssi +msgid "Totals" +msgstr "Summe" + +#: lib/interface.php:445 +#@ relevanssi +msgid "Common Queries" +msgstr "Häufige Suchbegriffe" + +#: lib/interface.php:447 +#@ relevanssi +msgid "" +"Here you can see the 20 most common user search queries, how many times those \n" +"\t\tqueries were made and how many results were found for those queries." +msgstr "Hier sehen Sie die 20 häufigsten Suchanfragen Ihrer Besucher, wie oft diese ausgeführt wurden, und wieviele Ergebnisse dafür gefunden wurden." + +#: lib/interface.php:453 +#: lib/interface.php:469 +#: lib/interface.php:501 +#@ relevanssi +msgid "Today and yesterday" +msgstr "Heute und gestern" + +#: lib/interface.php:457 +#: lib/interface.php:473 +#: lib/interface.php:502 +#@ relevanssi +msgid "Last 7 days" +msgstr "Die letzten 7 Tage" + +#: lib/interface.php:461 +#: lib/interface.php:477 +#: lib/interface.php:503 +#@ relevanssi +msgid "Last 30 days" +msgstr "Die letzten 30 Tage" + +#: lib/interface.php:466 +#@ relevanssi +msgid "Unsuccessful Queries" +msgstr "Erfolglose Suchanfragen" + +#: lib/interface.php:484 +#@ relevanssi +msgid "Reset Logs" +msgstr "Protokoll zurücksetzen" + +#: lib/interface.php:487 +#, php-format +#@ relevanssi +msgid "To reset the logs, type \"reset\" into the box here %s and click %s" +msgstr "Zum Zurücksetzen der Protokolle bitte \"reset\" in dieses Textfeld %s eintragen und %s klicken." + +#: lib/interface.php:504 +#@ relevanssi +msgid "Forever" +msgstr "Für immer" + +#: lib/interface.php:506 +#@ relevanssi +msgid "When" +msgstr "Wenn" + +#: lib/interface.php:506 +#@ relevanssi +msgid "Searches" +msgstr "Suchanfragen" + +#: lib/interface.php:536 +#@ relevanssi +msgid "Query" +msgstr "Suchanfrage" + +#: lib/interface.php:536 +#@ relevanssi +msgid "Hits" +msgstr "Treffer" + +#: lib/interface.php:846 +#: lib/interface.php:891 +#@ relevanssi +msgid "Basic options" +msgstr "Grundeinstellungen" + +#: lib/interface.php:847 +#: lib/interface.php:957 +#@ relevanssi +msgid "Weights" +msgstr "Gewichtungen" + +#: lib/interface.php:848 +#: lib/interface.php:1012 +#@ relevanssi +msgid "Logs" +msgstr "Protokolle" + +#: lib/interface.php:849 +#: lib/interface.php:1041 +#@ relevanssi +msgid "Exclusions and restrictions" +msgstr "Ausschließen oder Beschränkungen" + +#: lib/interface.php:850 +#@ relevanssi +msgid "Custom excerpts" +msgstr "Eigene Zusammenfassungen" + +#: lib/interface.php:851 +#@ relevanssi +msgid "Highlighting search results" +msgstr "Suchbegriffe hervorheben" + +#: lib/interface.php:852 +#: lib/interface.php:1187 +#@ relevanssi +msgid "Indexing options" +msgstr "Indizierungs-Einstellungen" + +#: lib/interface.php:853 +#: lib/interface.php:1335 +#@ relevanssi +msgid "Caching" +msgstr "Cache" + +#: lib/interface.php:854 +#: lib/interface.php:1358 +#@ relevanssi +msgid "Synonyms" +msgstr "Synonyme" + +#: lib/interface.php:855 +#: lib/interface.php:1366 +#@ relevanssi +msgid "Stopwords" +msgstr "Stoppwörter" + +#: lib/interface.php:858 +#@ relevanssi +msgid "Import/export options" +msgstr "Einstellungen importieren/exportieren" + +#: lib/interface.php:861 +#@ relevanssi +msgid "Buy Relevanssi Premium" +msgstr "Relevanssi Premium kaufen" + +#: lib/interface.php:866 +#@ relevanssi +msgid "Quick tools" +msgstr "Quick tools" + +#: lib/interface.php:868 +#@ relevanssi +msgid "Save options" +msgstr "Einstellungen sichern" + +#: lib/interface.php:869 +#@ relevanssi +msgid "Build the index" +msgstr "Index aufbauen" + +#: lib/interface.php:870 +#: lib/interface.php:1333 +#@ relevanssi +msgid "Continue indexing" +msgstr "Weiter indizieren" + +#: lib/interface.php:870 +#@ relevanssi +msgid "add" +msgstr "hinzufügen" + +#: lib/interface.php:870 +#@ relevanssi +msgid "documents." +msgstr "Dokumente." + +#: lib/interface.php:874 +#@ relevanssi +msgid "WARNING: You've chosen no post types to index. Nothing will be indexed. Choose some post types to index." +msgstr "WARNUNG: Sie haben keine Post-Typen für die Indizierung bestimmt. Es wird nichts indiziert werden. Wählen Sie ein paar Post-Typen aus.." + +#: lib/interface.php:878 +#@ relevanssi +msgid "Use 'Build the index' to build the index with current indexing options. If you can't finish indexing with one go, use 'Continue indexing' to finish the job. You can change the number of documents to add until you find the largest amount you can add with one go. See 'State of the Index' below to find out how many documents actually go into the index." +msgstr "Klicken Sie 'Index aufbauen' um den Index mit den derzeitigen Index-Einstellungen zu erzeugen. Wenn es nicht auf Anhieb funktioniert, klicken Sie 'Weiter indizieren' um den Vorgang abzuschließen. Erhöhen Sie die Anzahl der Dokumente bis Sie die größte Anzahl an Dokumenten erreichte haben, die Sie in einem Zug indizieren können. Sehen Sie auch bei 'Zustand des Index' weiter unten nach, um herauszufinden, wie viele Dokumente sich gegenwärtig im Index befinden." + +#: lib/interface.php:880 +#@ relevanssi +msgid "" +"If Relevanssi doesn't index anything and you have upgraded from a 2.x version, it's likely the changes in\n" +"\tthe database structure haven't gone through in the upgrade. In that case all you need to do is to deactivate the\n" +"\tplugin and then activate it again." +msgstr "Falls Relevanssi nichts indiziert und Sie von einer 2.x-Version upgedated haben, sind wahrscheinlich die Änderungen in der Datenbank nicht durch das Update gegangen. In diesem Fall genügt es, wenn Sie das Plugin einmal deaktivieren, und anschließend wieder aktivieren." + +#: lib/interface.php:884 +#@ relevanssi +msgid "State of the Index" +msgstr "Zustand des Index" + +#: lib/interface.php:886 +#@ relevanssi +msgid "Documents in the index" +msgstr "Dokumente im Index" + +#: lib/interface.php:887 +#@ relevanssi +msgid "Terms in the index" +msgstr "Suchbegriffe im Index" + +#: lib/interface.php:888 +#@ relevanssi +msgid "Highest post ID indexed" +msgstr "Höchste indizierte Post-ID" + +#: lib/interface.php:897 +#@ relevanssi +msgid "Use search for admin:" +msgstr "Suchen im Admin-Bereich" + +#: lib/interface.php:899 +#@ relevanssi +msgid "If checked, Relevanssi will be used for searches in the admin interface" +msgstr "Wenn aktiviert, wird Relevanssi auch für die Suche innerhalb des Admin-Bereichs verwendet." + +#: lib/interface.php:903 +#@ relevanssi +msgid "Default operator for the search?" +msgstr "Standard-Operator für Suchanfragen?" + +#: lib/interface.php:905 +#@ relevanssi +msgid "AND - require all terms" +msgstr "AND – Alle Begriffe müssen vorkommen" + +#: lib/interface.php:906 +#@ relevanssi +msgid "OR - any term present is enough" +msgstr "OR – einer der Begriffe muß vorkommen" + +#: lib/interface.php:908 +#@ relevanssi +msgid "If you choose AND and the search finds no matches, it will automatically do an OR search." +msgstr "Wenn AND ausgewählt ist, und die Suche ergibt keine Treffer, wird automatisch auf OR umgeschaltet." + +#: lib/interface.php:912 +#@ relevanssi +msgid "Disable OR fallback:" +msgstr "OR-Fallback deaktivieren" + +#: lib/interface.php:914 +#@ relevanssi +msgid "If you don't want Relevanssi to fall back to OR search when AND search gets no hits, check this option. For most cases, leave this one unchecked." +msgstr "Wenn Sie nicht möchten, das bei einer erfolglosen AND-Suche auf OR zurückgegriffen wird, aktivieren Sie diese Option. In den meisten Fällen sollten Sie diese Option deaktiviert lassen." + +#: lib/interface.php:918 +#@ relevanssi +msgid "Default order for results:" +msgstr "Standard-Reihenfolge für Suchergebnisse:" + +#: lib/interface.php:920 +#@ relevanssi +msgid "Relevance (highly recommended)" +msgstr "Relevanz (Hochgradig empfohlen)" + +#: lib/interface.php:921 +#@ relevanssi +msgid "Post date" +msgstr "Datum des Beitrags" + +#: lib/interface.php:923 +#@ relevanssi +msgid "If you want date-based results, see the recent post bonus in the Weights section." +msgstr "Bei Datums-Basierten Suchergebnissen, see the recent post bonus im Abschnitt 'Gewichtung'." + +#: lib/interface.php:927 +#@ relevanssi +msgid "When to use fuzzy matching?" +msgstr "Wann sollen unscharfe Vergleiche benutzt werden?" + +#: lib/interface.php:929 +#@ relevanssi +msgid "When straight search gets no hits" +msgstr "Wenn die normale Suche keine Treffer ausgibt" + +#: lib/interface.php:930 +#@ relevanssi +msgid "Always" +msgstr "Immer" + +#: lib/interface.php:931 +#@ relevanssi +msgid "Don't use fuzzy search" +msgstr "Unscharfe Vergleiche nicht verwenden" + +#: lib/interface.php:933 +#@ relevanssi +msgid "Straight search matches just the term. Fuzzy search matches everything that begins or ends with the search term." +msgstr "Die normale Suche sucht nur nach direkten Übereinstimmungen mit dem Suchbegriff. Die unscharfe Suche findet alles, was mit dem Suchbegriff beginnt oder endet." + +#: lib/interface.php:941 +#@ relevanssi +msgid "Limit searches:" +msgstr "Suchergebnisse begrenzen:" + +#: lib/interface.php:943 +#@ relevanssi +msgid "If this option is checked, Relevanssi will limit search results to at most 500 results per term. This will improve performance, but may cause some relevant documents to go unfound. However, Relevanssi tries to prioritize the most relevant documents. This does not work well when sorting results by date. The throttle can end up cutting off recent posts to favour more relevant posts." +msgstr "Wenn diese Option aktiviert ist, wird Relevanssi die Suchergebnisse auf 500 Treffer pro Suchbegriff begrenzen. Dadurch wird die Leistungsfähigkeit verbessert, kann aber dazu führen, dass einige Relevante Dokumente nicht gefunden werden. Relevanssi wird trotzdem versuchen, die relevantesten Dokumente zu priorisieren. Dies funktioniert aber nicht besonders gut bei Sortierung nach Datum, und kann dazu führen dass neuere Dokumente zugunsten relevanterer Dokumente ausgelassen werden." + +#: lib/interface.php:947 +#@ relevanssi +msgid "Limit:" +msgstr "Begrenzung:" + +#: lib/interface.php:949 +#@ relevanssi +msgid "For better performance, adjust the limit to a smaller number. Adjusting the limit to 100 - or even lower - should be safe for good results, and might bring a boost in search speed." +msgstr "Zur Erhöhung der Leistungsfähigkeit tragen Sie einer kleinere Zahl ein. Ein Limit von 100 oder weniger sollte noch immer gute Suchergebnisse bringen und die Effizienz einer Suche deutlich erhöhen." + +#: lib/interface.php:959 +#@ relevanssi +msgid "These values affect the weights of the documents. These are all multipliers, so 1 means no change in weight, less than 1 means less weight, and more than 1 means more weight. Setting something to zero makes that worthless. For example, if title weight is more than 1, words in titles are more significant than words elsewhere. If title weight is 0, words in titles won't make any difference to the search results." +msgstr "Diese Werte betreffen die Gewichtung von Dokumenten. Es sind Faktoren, 1 bedeutet keine Änderung in der Gewichtung, weniger als 1 hat eine geringere Gewichtung zur Folge und mehr als 1 eine höhere. Null macht das Element irrelevant bei der Gewichtung. Wenn zum Beispiel die Gewichtung des Titels mehr als 1 beträgt, dann werden Suchwörter die im Titel auftauchen als aussagekräftiger angesehen als wenn die Wörter woanders auftauche würden. Wenn die Gewichtung des Titels 0 ist, haben Suchbegriffe im Titel keinerlei Auswirkung auf die Gewichtung der Suchergebnisse." + +#: lib/interface.php:964 +#@ relevanssi +msgid "Element" +msgstr "Element" + +#: lib/interface.php:965 +#@ relevanssi +msgid "Weight" +msgstr "Gewichtung" + +#: lib/interface.php:966 +#@ relevanssi +msgid "Default weight" +msgstr "Standard Gewichtung" + +#: lib/interface.php:971 +#@ relevanssi +msgid "Post titles" +msgstr "Beitrags-Titel" + +#: lib/interface.php:983 +#@ relevanssi +msgid "Comment text" +msgstr "Kommentar-Texte" + +#: lib/interface.php:1006 +#@ relevanssi +msgid "Limit results to current language:" +msgstr "Resultate nur auf die gegenwärtige Sprache einschränken" + +#: lib/interface.php:1008 +#@ relevanssi +msgid "If this option is checked, Relevanssi will only return results in the current active language. Otherwise results will include posts in every language." +msgstr "Wenn diese Option aktiviert ist, zeigt Relevanssi nur Ergebnisse in der aktuell gewählten Sprache an. Andernfalls werden Resultate in allen Sprachen angezeigt." + +#: lib/interface.php:1014 +#@ relevanssi +msgid "Keep a log of user queries:" +msgstr "Suchanfragen der Besucher protokollieren:" + +#: lib/interface.php:1016 +#@ relevanssi +msgid "If checked, Relevanssi will log user queries. The log appears in 'User searches' on the Dashboard admin menu." +msgstr "Wenn aktiviert wird Relevanssi die Such-Anfragen Ihrer Besucher protokollieren. Das Protokoll finden Sie unter 'Suchanfragen' im Administrations-Menu Ihres Dashboards. " + +#: lib/interface.php:1020 +#@ relevanssi +msgid "Log the user's IP with the queries:" +msgstr "Die IP-Adresse der Besucher ebenfalls Protokollieren:" + +#: lib/interface.php:1022 +#@ relevanssi +msgid "If checked, Relevanssi will log user's IP-Adress with the queries." +msgstr "Wenn aktiviert, speichert Relevanssi die IP-Adressen Ihrer Besucher zusammen mit den Suchanfragen. (Diese Option verstößt gegen mehrere Datenschutzrichtlinien, Sie sollten sie nicht aktivieren)" + +#: lib/interface.php:1026 +#@ relevanssi +msgid "Don't log queries from these users:" +msgstr "Suchanfragen von diesen Benutzern nicht protokollieren:" + +#: lib/interface.php:1028 +#@ relevanssi +msgid "Comma-separated list of numeric user IDs or user login names that will not be logged." +msgstr "Komma-getrennte Liste mit numerischen IDs oder Login-Namen der Benutzer, die nicht Protokolliert werden sollen. " + +#: lib/interface.php:1032 +#@ relevanssi +msgid "If you enable logs, you can see what your users are searching for. You can prevent your own searches from getting in the logs with the omit feature." +msgstr "Durch die Protokollierung können Sie einsehen, was Ihre Besucher auf Ihrer Seite suchen. Durch die Eingabe 'Suchanfragen von...' können Sie Suchanfragen Ihrer eigenen Benutzer von der Protokollierung ausnehmen." + +#: lib/interface.php:1035 +#@ relevanssi +msgid "If you enable logs, you can see what your users are searching for. Logs are also needed to use the 'Did you mean?' feature. You can prevent your own searches from getting in the logs with the omit feature." +msgstr "Durch die Protokollierung können Sie einsehen, was Ihre Besucher auf Ihrer Seite suchen. Die Protokolle werden ebenso für die 'meinten Sie vielleicht'-Funktion benötigt. Durch die Eingabe 'Suchanfragen von...' können Sie Suchanfragen Ihrer eigenen Benutzer von der Protokollierung ausnehmen." + +#: lib/interface.php:1043 +#@ relevanssi +msgid "Restrict search to these categories and tags:" +msgstr "Suche nur in diesen Kategorien und Schlagwörtern:" + +#: lib/interface.php:1045 +#@ relevanssi +msgid "Enter a comma-separated list of category and tag IDs to restrict search to those categories or tags. You can also use <input type='hidden' name='cats' value='list of cats and tags' /> in your search form. The input field will \toverrun this setting." +msgstr "Tragen Sie eine Komma-getrennte Liste der numerischen Kategorie- oder Schlagwort-IDs ein, auf die Sie die Suche einschränken wollen. Sie können auch <input type='hidden' name='cats' value='Liste der Kategorien und Schlagwörter' /> in Ihr Suchformular einfügen. Das Eingabefeld wird die hier getätigten Einstelllungen überschreiben." + +#: lib/interface.php:1049 +#@ relevanssi +msgid "Exclude these categories and tags from search:" +msgstr "Diese Kategorien und Schlagwörter aus der Suche ausschließen:" + +#: lib/interface.php:1051 +#@ relevanssi +msgid "Enter a comma-separated list of category and tag IDs that are excluded from search results. You can exclude categories with the 'cat' input field by using negative values." +msgstr "Tragen Sie eine Komma-getrennte Liste der numerischen Kategorie- oder Schlagwort-IDs ein, die aus der Suche ausgeschlossen werden sollen. Sie können Kategorien auch durch negative IDs unter 'Suche nur in …' ausschließen." + +#: lib/interface.php:1055 +#@ relevanssi +msgid "Exclude these posts/pages from search:" +msgstr "Diese Beiträge / Seiten aus der Suche ausschließen:" + +#: lib/interface.php:1059 +#@ relevanssi +msgid "Enter a comma-separated list of post/page IDs that are excluded from search results. This only works here, you can't use the input field option (WordPress doesn't pass custom parameters there). You can also use a checkbox on post/page edit pages to remove posts from index." +msgstr "Komma-getrennte Liste von numerischen Seiten- / Beitrags-IDs, die von der Suche ausgenommen werden sollen. Sie können auch die Checkbox beim Bearbeiten eines Beitrags / einer Seite benutzen um Dokumente aus dem Suchindex auszuschließen." + +#: lib/interface.php:1062 +#@ relevanssi +msgid "Enter a comma-separated list of post/page IDs that are excluded from search results. This only works here, you can't use the input field option (WordPress doesn't pass custom parameters there)." +msgstr "Komma-Separierte Liste von numerischen Seiten- / Beitrags-IDs, die von der Suche ausgenommen werden sollen." + +#: lib/interface.php:1068 +#@ relevanssi +msgid "Respect exclude_from_search for custom post types:" +msgstr "exclude_from_search auch auf Benutzerdefinierte Beiträge anwenden:" + +#: lib/interface.php:1070 +#@ relevanssi +msgid "If checked, Relevanssi won't display posts of custom post types that have 'exclude_from_search' set to true. If not checked, Relevanssi will display anything that is indexed." +msgstr "Wenn aktiviert wird Relevanssi keine Benutzerdefinierten Betrags-Typen anzeigen, bei denen exclude_from_search auf true gesetzt ist. Andernfalls zeigt Relevanssi alles an, was indiziert worden ist." + +#: lib/interface.php:1072 +#@ relevanssi +msgid "Custom excerpts/snippets" +msgstr "Benutzerdefinierte Auszüge/Snippets" + +#: lib/interface.php:1074 +#@ relevanssi +msgid "Create custom search result snippets:" +msgstr "Neues Benutzerdefiniertes Suchergebnis-Snippet:" + +#: lib/interface.php:1076 +#@ relevanssi +msgid "If checked, Relevanssi will create excerpts that contain the search term hits. To make them work, make sure your search result template uses the_excerpt() to display post excerpts." +msgstr "Wenn aktiviert zeigt Relevanssi Auszüge an, in denen der Suchtreffer zu sehen ist. Das funktioniert nur, wenn Ihr Theme die Funktion 'the_excerpt()' benutzt um Textauszüge anzuzeigen." + +#: lib/interface.php:1078 +#@ relevanssi +msgid "Note: Building custom excerpts can be slow. If you are not actually using the excerpts, make sure you disable the option." +msgstr "Anmerkung: Benutzerdefinierte Auszüge zu erzeugen kann ziemlich lange dauern. Wenn Sie ohnehin keine Textauszüge eintragen, sollten Sie diese Option deaktivieren." + +#: lib/interface.php:1080 +#@ relevanssi +msgid "Length of the snippet:" +msgstr "Länge des Snippets:" + +#: lib/interface.php:1083 +#@ relevanssi +msgid "characters" +msgstr "Zeichen" + +#: lib/interface.php:1084 +#@ relevanssi +msgid "words" +msgstr "Wörter" + +#: lib/interface.php:1086 +#@ relevanssi +msgid "This must be an integer." +msgstr "Bitte eine ganze Zahl eintragen" + +#: lib/interface.php:1090 +#@ relevanssi +msgid "Allowable tags in excerpts:" +msgstr "Erlaubte HTML-Tags in Auszügen:" + +#: lib/interface.php:1093 +#@ relevanssi +msgid "List all tags you want to allow in excerpts, without any whitespace. For example: '<p><a><strong>'." +msgstr "Liste alle HTML-Tags, die Sie in Auszügen erlauben wollen, ohne Leerzeichen dazwischen. Z.B.: '<p><a><strong>'." + +#: lib/interface.php:1097 +#@ relevanssi +msgid "Show breakdown of search hits in excerpts:" +msgstr "Alle Trefferstellen in den Auszügen anzeigen:" + +#: lib/interface.php:1099 +#@ relevanssi +msgid "Check this to show more information on where the search hits were made. Requires custom snippets to work." +msgstr "Zeigt mehr Informationen, an welchen Stellen die Suchbegriffe im Text gefunden wurden. Erfordert benutzerdefinierte Snippets." + +#: lib/interface.php:1103 +#@ relevanssi +msgid "The breakdown format:" +msgstr "Format der Trefferstellen:" + +#: lib/interface.php:1105 +#, php-format +#@ relevanssi +msgid "Use %body%, %title%, %tags% and %comments% to display the number of hits (in different parts of the post), %total% for total hits, %score% to display the document weight and %terms% to show how many hits each search term got. No double quotes (\") allowed!" +msgstr "Benutzen Sie %body%, %title%, %tags% und %comments% um die Anzahl der Treffen anzuzeigen (in den unterschiedlichen Stellen des Dokuments), %total% für die Gesamte Anzahl an Treffern, %score% für die Gewichtung des Dokuments, %terms% zur Anzeige, wieviele Treffer jeder Suchbegriff erbracht hat. Es sind keine Doppelten Anführungszeichen (\") erlaubt!" + +#: lib/interface.php:1107 +#@ relevanssi +msgid "Search hit highlighting" +msgstr "Suchergebnis hervorheben" + +#: lib/interface.php:1109 +#@ relevanssi +msgid "First, choose the type of highlighting used:" +msgstr "Erstens: Art der Hervorhebung auswählen:" + +#: lib/interface.php:1112 +#@ relevanssi +msgid "Highlight query terms in search results:" +msgstr "Suchbegriffe in den Ergebnissen hervorheben:" + +#: lib/interface.php:1114 +#@ relevanssi +msgid "No highlighting" +msgstr "Keine Hervorhebung" + +#: lib/interface.php:1118 +#@ relevanssi +msgid "Text color" +msgstr "Textfarbe" + +#: lib/interface.php:1119 +#@ relevanssi +msgid "Background color" +msgstr "Hintergrundfarbe" + +#: lib/interface.php:1120 +#@ relevanssi +msgid "CSS Style" +msgstr "CSS-Style" + +#: lib/interface.php:1121 +#@ relevanssi +msgid "CSS Class" +msgstr "CSS-Klasse" + +#: lib/interface.php:1123 +#@ relevanssi +msgid "Highlighting isn't available unless you use custom snippets" +msgstr "Hervorhebung ist ohne Benutzerdefinierte Snippets nicht verfügbar" + +#: lib/interface.php:1127 +#@ relevanssi +msgid "Highlight query terms in result titles too:" +msgstr "Suchbegriffe im Titel ebenfalls hervorheben:" + +#: lib/interface.php:1133 +#@ relevanssi +msgid "Highlight query terms in documents from local searches:" +msgstr "Suchbegriffe in aufgerufenen Dokumenten ebenfalls hervorheben:" + +#: lib/interface.php:1135 +#@ relevanssi +msgid "Highlights hits when user opens the post from search results. This is based on HTTP referrer, so if that's blocked, there'll be no highlights." +msgstr "Hebt die Suchbegriffe hervor, wenn der Besucher ein Dokument aus einem Suchergebnis heraus öffnet. Diese Funktion basiert auf Abfrage des HTTP-Referrers, wenn der blockiert wird, gibt es auch keine Hervorhebung." + +#: lib/interface.php:1141 +#@ relevanssi +msgid "Highlight query terms in comments:" +msgstr "Suchbegriffe in Kommentaren hervorheben:" + +#: lib/interface.php:1143 +#@ relevanssi +msgid "Highlights hits in comments when user opens the post from search results." +msgstr "Hebt die Suchbegriffe auch in den Kommentaren hervor, wenn der Besucher eine Seite aus dem Suchergebnis heraus öffnet." + +#: lib/interface.php:1147 +#@ relevanssi +msgid "Uncheck this if you use non-ASCII characters:" +msgstr "Deaktivieren, wenn Sie nicht-ASCII-Zeichen verwenden." + +#: lib/interface.php:1149 +#@ relevanssi +msgid "If you use non-ASCII characters (like Cyrillic alphabet) and the highlights don't work, uncheck this option to make highlights work." +msgstr "Wenn Sie Nicht-ASCII-Zeichen verwenden (wie z.B. im kyrillischen Alphabet) und die Hervorhebung nicht funktioniert, deaktivieren Sie diese Option bitte." + +#: lib/interface.php:1154 +#@ relevanssi +msgid "Then adjust the settings for your chosen type:" +msgstr "Dann: nehmen Sie die Einstellungen für die gewählte Hervorhebung vor" + +#: lib/interface.php:1158 +#@ relevanssi +msgid "Text color for highlights:" +msgstr "Textfarbe für Hervorhebungen:" + +#: lib/interface.php:1160 +#: lib/interface.php:1166 +#@ relevanssi +msgid "Use HTML color codes (#rgb or #rrggbb)" +msgstr "Bitte HTML-Farbcodes verwenden (#rgb oder #rrggbb)" + +#: lib/interface.php:1164 +#@ relevanssi +msgid "Background color for highlights:" +msgstr "Hintergrundfarbe für Hervorhebungen:" + +#: lib/interface.php:1170 +#@ relevanssi +msgid "CSS style for highlights:" +msgstr "CSS-Style für Hervorhebungen:" + +#: lib/interface.php:1172 +#@ relevanssi +msgid "You can use any CSS styling here, style will be inserted with a <span>" +msgstr "Sie können beliebiges CSS eintragen. Die Styles werden durch ein <span> eingefügt." + +#: lib/interface.php:1176 +#@ relevanssi +msgid "CSS class for highlights:" +msgstr "CSS-Klasse für Hervorhebungen:" + +#: lib/interface.php:1178 +#@ relevanssi +msgid "Name a class here, search results will be wrapped in a <span> with the class" +msgstr "Benennen Sie hier eine CSS-Klasse. Der Suchbegriff wird von einem <span> mit dieser Klasse umschlossen werden." + +#: lib/interface.php:1185 +#: lib/interface.php:1364 +#@ relevanssi +msgid "Save the options" +msgstr "Einstellungen sichern" + +#: lib/interface.php:1189 +#@ relevanssi +msgid "Choose post types to index:" +msgstr "Welche Beitrags-Typen sollen indiziert werden:" + +#: lib/interface.php:1194 +#@ relevanssi +msgid "Type" +msgstr "Typ" + +#: lib/interface.php:1195 +#: lib/interface.php:1241 +#@ relevanssi +msgid "Index" +msgstr "Index" + +#: lib/interface.php:1196 +#: lib/interface.php:1242 +#@ relevanssi +msgid "Public?" +msgstr "Öffentlich?" + +#: lib/interface.php:1213 +#: lib/interface.php:1256 +#, php-format +#@ relevanssi +msgid "%s" +msgstr "%s" + +#: lib/interface.php:1214 +#: lib/interface.php:1257 +#@ relevanssi +msgid "yes" +msgstr "Ja" + +#: lib/interface.php:1214 +#: lib/interface.php:1257 +#@ relevanssi +msgid "no" +msgstr "Nein" + +#: lib/interface.php:1235 +#@ relevanssi +msgid "Choose taxonomies to index:" +msgstr "Taxonomien für die Indizierung auswählen:" + +#: lib/interface.php:1240 +#@ relevanssi +msgid "Taxonomy" +msgstr "Taxonomie" + +#: lib/interface.php:1277 +#@ relevanssi +msgid "If you check a taxonomy here, the terms for that taxonomy are indexed with the posts. If you for example choose \"post_tag\", searching for tags will find all posts that have the tag." +msgstr "Wenn Sie eine Taxonomie hier aktivieren, werden all ihre Begriffe zusammen mit dem Beitrag indiziert. Wenn Sie z.B. \"post_tag\" auswählen, wird die Suche nach einem Tag auch die Beiträge finden, die diesem Tag zugeordnet sind." + +#: lib/interface.php:1281 +#@ relevanssi +msgid "Minimum word length to index" +msgstr "Mindestlänge von Wörtern im Index" + +#: lib/interface.php:1283 +#@ relevanssi +msgid "Words shorter than this number will not be indexed." +msgstr "Kürzere Wörter werden nicht indiziert." + +#: lib/interface.php:1289 +#@ relevanssi +msgid "Expand shortcodes in post content:" +msgstr "Shortcodes im Beitrags-Inhalt ausführen:" + +#: lib/interface.php:1291 +#@ relevanssi +msgid "If checked, Relevanssi will expand shortcodes in post content before indexing. Otherwise shortcodes will be stripped. If you use shortcodes to include dynamic content, Relevanssi will not keep the index updated, the index will reflect the status of the shortcode content at the moment of indexing." +msgstr "Wenn aktiviert wird Relevanssi die Shortcodes in den Beiträgen ausführen. Z.B. gelangen Bildzuschriften in Galerien dadurch in den Suchindex. Ein nachträgliches aktivieren dieser Option aktualisiert nicht den Suchindex, in dem Fall müssen Sie den Index aktualisieren. " + +#: lib/interface.php:1297 +#@ relevanssi +msgid "Index and search your posts' authors:" +msgstr "Beitrags-Autoren indizieren und suchen:" + +#: lib/interface.php:1299 +#@ relevanssi +msgid "If checked, Relevanssi will also index and search the authors of your posts. Author display name will be indexed. Remember to rebuild the index if you change this option!" +msgstr "Wenn aktiviert wird Relavanssi auch auf den Autorenseiten suchen. Die Namen der Autoren werden dabei indiziert. Bitte denken Sie daran den Index neu aufzubauen, wenn Sie diese Option aktivieren." + +#: lib/interface.php:1303 +#@ relevanssi +msgid "Index and search post excerpts:" +msgstr "Auszüge indizieren und durchsuchen:" + +#: lib/interface.php:1305 +#@ relevanssi +msgid "If checked, Relevanssi will also index and search the excerpts of your posts.Remember to rebuild the index if you change this option!" +msgstr "Wenn aktiviert wird Relavanssi auch auf den Auszügen Ihrer Beiträge. Bitte denken Sie daran den Index neu aufzubauen, wenn Sie diese Option aktivieren." + +#: lib/interface.php:1309 +#@ relevanssi +msgid "Index and search these comments:" +msgstr "Diese Kommentaren indizieren und durchsuchen:" + +#: lib/interface.php:1311 +#@ relevanssi +msgid "none" +msgstr "keine" + +#: lib/interface.php:1312 +#@ relevanssi +msgid "normal" +msgstr "Normal" + +#: lib/interface.php:1313 +#@ relevanssi +msgid "all" +msgstr "Alle" + +#: lib/interface.php:1315 +#@ relevanssi +msgid "Relevanssi will index and search ALL (all comments including track- & pingbacks and custom comment types), NONE (no comments) or NORMAL (manually posted comments on your blog).
Remember to rebuild the index if you change this option!" +msgstr "Relevanssi wird ALLE (alle Kommentare einschließlich Track- & Pingbacks und Benutzerdefinierte Kommentartype), KEINE (Keine Kommentare) der NORMAL (von Besuchern gepostete Kommentare).
Bitte denken Sie daran den Index neu aufzubauen, wenn Sie diese Option aktivieren." + +#: lib/interface.php:1319 +#@ relevanssi +msgid "Custom fields to index:" +msgstr "Benutzerdefinierte Felder indizieren:" + +#: lib/interface.php:1321 +#@ relevanssi +msgid "A comma-separated list of custom fields to include in the index. Set to 'visible' to index all visible custom fields and to 'all' to index all custom fields, also those starting with a '_' character." +msgstr "Eine Komma-getrennte Liste von Benutzerdefinierten Feldern die in den Index aufgenommen werden sollen. Wählen Sie 'Sichtbar' um alle sichtbaren Benutzerd. Felder aufzunehmen, oder 'Alle' um auch solche aufzunehmen, die mit einem '_' anfangen." + +#: lib/interface.php:1331 +#@ relevanssi +msgid "Save indexing options and build the index" +msgstr "Einstellungen sichern und Index aufbauen" + +#: lib/interface.php:1337 +#@ relevanssi +msgid "" +"Warning: In many cases caching is not useful, and in some cases can be even harmful. Do not\n" +"\tactivate cache unless you have a good reason to do so." +msgstr "Warnung: In vielen Fällen ist das Caching nicht sehr vorteilhaft und manchen Fälle sogar nachteilig. Aktivieren Sie den Cache bitte nicht ohne einen sehr guten Grund!" + +#: lib/interface.php:1340 +#@ relevanssi +msgid "Enable result and excerpt caching:" +msgstr "Ergebnis- und Auszugs-Cache aktivieren:" + +#: lib/interface.php:1342 +#@ relevanssi +msgid "If checked, Relevanssi will cache search results and post excerpts." +msgstr "Wenn aktiviert wird Relevanssi Suchergebnisse und Auszüge cachen." + +#: lib/interface.php:1346 +#@ relevanssi +msgid "Cache expire (in seconds):" +msgstr "Cache läuft ab (in Sekunden):" + +#: lib/interface.php:1348 +#@ relevanssi +msgid "86400 = day" +msgstr "86400 = 1 Tag" + +#: lib/interface.php:1352 +#@ relevanssi +msgid "Entries in the cache" +msgstr "Einträge im Cache" + +#: lib/interface.php:1356 +#@ relevanssi +msgid "Clear all caches" +msgstr "Cache löschen" + +#: lib/interface.php:1362 +#@ relevanssi +msgid "Add synonyms here in 'key = value' format. When searching with the OR operator, any search of 'key' will be expanded to include 'value' as well. Using phrases is possible. The key-value pairs work in one direction only, but you can of course repeat the same pair reversed." +msgstr "Synonyme im 'key = value' Format hinzufügen. Wenn mit dem OR-Operator gesucht wird, wird jede Suche nach 'key' auch auf 'value' ausgedehnt. Die Benutzung von Sätzen oder Phrasen ist auch möglich. Die Key-Value-Paare funktionieren nur in eine Richtung, aber Sie können natürlich weitere Paare mit vertauschten Werten eintragen." + +#: lib/interface.php:1385 +#@ relevanssi +msgid "

Enter a word here to add it to the list of stopwords. The word will automatically be removed from the index, so re-indexing is not necessary. You can enter many words at the same time, separate words with commas.

" +msgstr "

Tragen Sie ein Wort ein um der Liste der Stoppwörter anzufügen. Das Wort wird automatisch aus dem Index gelöscht, daher brauchen Sie den Index nicht erneut aufzubauen. Sie können mehrere Wörter auf einmal durch Kommata getrennt eintragen.

" + +#: lib/interface.php:1387 +#@ relevanssi +msgid "Stopword(s) to add: " +msgstr "Stoppwörter hinzufügen:" + +#: lib/interface.php:1388 +#@ relevanssi +msgid "Add" +msgstr "Hinzufügen" + +#: lib/interface.php:1391 +#@ relevanssi +msgid "

Here's a list of stopwords in the database. Click a word to remove it from stopwords. Removing stopwords won't automatically return them to index, so you need to re-index all posts after removing stopwords to get those words back to index." +msgstr "Liste der Stoppwörter in der Datenbank. Klicken Sie auf ein Wort um es aus der Stoppwort-Liste zu entfernen. Das Entfernen bringt die Stoppwörter nicht automatisch zurück in den Index, Sie müssen daher nach dem Entfernen der Stoppwörter den Index neu aufbauen.." + +#: lib/interface.php:1417 +#@ relevanssi +msgid "Remove all stopwords" +msgstr "Alle Stoppwörter entfernen" + +#: lib/interface.php:1423 +#@ relevanssi +msgid "Here's a list of stopwords you can use to export the stopwords to another blog." +msgstr "Eine Liste von Stoppwörtern zum Export in einen anderen Blog." + +#: lib/uninstall.php:41 +#@ relevanssi +msgid "Data wiped clean, you can now delete the plugin." +msgstr "Alle Daten sauber gelöscht. Sie können das Plugin jetzt löschen." + +#: relevanssi.php:296 +#@ relevanssi +msgid "Tag weight:" +msgstr "Schlüsselwort Gewichtung:" + +#: relevanssi.php:311 +#@ relevanssi +msgid "Category weight:" +msgstr "Kategorie Gewichtung:" + +#: lib/interface.php:1004 +#@ relevanssi +msgid "WPML/Polylang compatibility" +msgstr "WPML/Polylang Kompatibilität" + diff --git a/mu-plugins/relevanssi/relevanssi-fr_FR.po b/mu-plugins/relevanssi/relevanssi-fr_FR.po new file mode 100644 index 00000000..bf9df239 --- /dev/null +++ b/mu-plugins/relevanssi/relevanssi-fr_FR.po @@ -0,0 +1,1254 @@ +msgid "" +msgstr "" +"Project-Id-Version: Relevanssi v1.4\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2014-12-16 22:33+0100\n" +"PO-Revision-Date: 2014-12-16 22:34+0100\n" +"Last-Translator: Li-An \n" +"Language-Team: \n" +"Language: fr_FR\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Poedit-SourceCharset: utf-8\n" +"X-Poedit-KeywordsList: __;_e;__ngettext:1,2;_n:1,2;__ngettext_noop:1,2;" +"_n_noop:1,2;_c,_nc:4c,1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2\n" +"X-Textdomain-Support: yes\n" +"X-Generator: Poedit 1.7.1\n" +"X-Poedit-SearchPath-0: .\n" + +# @ default +#: lib/excerpts-highlights.php:11 +msgid "There is no excerpt because this is a protected post." +msgstr "Il n'y a aucun extrait car ce billet est protégé." + +# @ relevanssi +#: lib/indexing.php:118 +msgid "Indexing complete!" +msgstr "Indexation complète !" + +# @ default +#: lib/init.php:41 +msgid "" +"You do not have an index! Remember to build the index (click the \"Build the " +"index\" button), otherwise searching won't work." +msgstr "" +"Vous n'avez pas d'index! N'oubliez pas de construire l'index (cliquez sur le " +"bouton \"Construire l'index\" sinon la recherche ne fonctionnera pas." + +# @ relevanssi +#: lib/init.php:86 lib/init.php:87 +msgid "User searches" +msgstr "Recherches par les utilisateurs" + +# @ relevanssi +#: lib/interface.php:6 +msgid "Relevanssi Premium Search Options" +msgstr "Options de recherche de Relevanssi Premium" + +# @ relevanssi +#: lib/interface.php:9 +msgid "Relevanssi Search Options" +msgstr "Options de recherche de Relevanssi" + +# @ relevanssi +#: lib/interface.php:80 +msgid "User Searches" +msgstr "Recherches par les utilisateurs" + +# @ relevanssi +#: lib/interface.php:82 +msgid "Relevanssi User Searches" +msgstr "Recherches Relevanssi par les utilisateurs" + +# @ relevanssi +#: lib/interface.php:319 +#, php-format +msgid "" +"

Successfully added %d/%d terms to " +"stopwords!

" +msgstr "" +"

Ajout réussi de %d/%d termes aux " +"stopwords!

" + +# @ relevanssi +#: lib/interface.php:326 +#, php-format +msgid "" +"

Term '%s' added to stopwords!

" +msgstr "" +"

Terme '%s' ajouté aux stopwords!

" + +# @ relevanssi +#: lib/interface.php:329 +#, php-format +msgid "" +"

Couldn't add term '%s' to " +"stopwords!

" +msgstr "" +"

Impossible d'ajouter '%s' aux " +"stopwords!

" + +# @ relevanssi +#: lib/interface.php:366 +msgid "" +"

Stopwords removed! Remember to re-" +"index.

" +msgstr "" +"

Stopwords retirés ! N'oubliez pas " +"de réindexer.

" + +# @ relevanssi +#: lib/interface.php:376 +#, php-format +msgid "" +"

Term '%s' removed from stopwords! " +"Re-index to get it back to index.

" +msgstr "" +"

Terme '%s' retiré des stopwords! " +"Réindexer pour le récupérer dans l'index.

" + +# @ relevanssi +#: lib/interface.php:379 +#, php-format +msgid "" +"

Couldn't remove term '%s' from " +"stopwords!

" +msgstr "" +"

Impossible de retirer '%s' des " +"stopwords !

" + +# @ relevanssi +#: lib/interface.php:390 +msgid "25 most common words in the index" +msgstr "Les 25 mots des plus fréquents de l'index" + +# @ relevanssi +#: lib/interface.php:392 +msgid "" +"These words are excellent stopword material. A word that appears in most of " +"the posts in the database is quite pointless when searching. This is also an " +"easy way to create a completely new stopword list, if one isn't available in " +"your language. Click the icon after the word to add the word to the stopword " +"list. The word will also be removed from the index, so rebuilding the index " +"is not necessary." +msgstr "" +"Ces mots font d'excellents stopwords. Un mot qui apparait dans la plupart " +"des billets de la base de donnée ne sert pas à grand chose pour une " +"recherche. C'est aussi une manière simple de créer une nouvelle liste de " +"stopwords si celle-ci n'est pas disponible dans votre langue. Cliquez " +"l'icone après le mot pour l'ajouter dans la liste de stopwords. Le mot sera " +"retiré de l'index aussi est-il inutile de reconstruire l'index." + +# @ relevanssi +#: lib/interface.php:418 +msgid "Add to stopwords" +msgstr "Ajouter aux stopwords." + +#: lib/interface.php:429 +msgid "Total Searches" +msgstr "Nombre de recherches total" + +#: lib/interface.php:432 +msgid "Totals" +msgstr "Totaux" + +#: lib/interface.php:437 +msgid "Common Queries" +msgstr "Requêtes en commun" + +# @ relevanssi +#: lib/interface.php:439 +msgid "" +"Here you can see the 20 most common user search queries, how many times " +"those \n" +"\t\tqueries were made and how many results were found for those queries." +msgstr "" +"Vous pouvez voir ici les 20 requêtes les plus courantes, combien de fois " +"ces \n" +"\\\\\t\\\\\trequêtes ont été faites et combien de résultats ont été trouvés " +"pour ces requêtes." + +# @ relevanssi +#: lib/interface.php:445 lib/interface.php:461 lib/interface.php:493 +msgid "Today and yesterday" +msgstr "Aujourd'hui et hier" + +# @ relevanssi +#: lib/interface.php:449 lib/interface.php:465 lib/interface.php:494 +msgid "Last 7 days" +msgstr "Sept derniers jours" + +# @ relevanssi +#: lib/interface.php:453 lib/interface.php:469 lib/interface.php:495 +msgid "Last 30 days" +msgstr "Trente derniers jours" + +# @ relevanssi +#: lib/interface.php:458 +msgid "Unsuccessful Queries" +msgstr "Requêtes sans résultat" + +#: lib/interface.php:476 +msgid "Reset Logs" +msgstr "Remettre à zéro les logs" + +#: lib/interface.php:479 +#, php-format +msgid "To reset the logs, type \"reset\" into the box here %s and click %s" +msgstr "" +"Pour remettre à zéro les logs, tapez \"reset\" dans le champ ici %s et " +"cliquez %s" + +#: lib/interface.php:496 +msgid "Forever" +msgstr "Pour toujours" + +#: lib/interface.php:498 +msgid "When" +msgstr "Quand" + +# @ relevanssi +#: lib/interface.php:498 +msgid "Searches" +msgstr "Recherches" + +#: lib/interface.php:528 +msgid "Query" +msgstr "Requête" + +#: lib/interface.php:528 +msgid "Hits" +msgstr "Hits" + +# @ relevanssi +#: lib/interface.php:837 lib/interface.php:877 +msgid "Basic options" +msgstr "Options basiques" + +#: lib/interface.php:838 lib/interface.php:943 +msgid "Weights" +msgstr "Poids" + +# @ relevanssi +#: lib/interface.php:839 lib/interface.php:998 +msgid "Logs" +msgstr "Logs" + +# @ relevanssi +#: lib/interface.php:840 lib/interface.php:1027 +msgid "Exclusions and restrictions" +msgstr "Exclusions et restrictions" + +# @ relevanssi +#: lib/interface.php:841 +msgid "Custom excerpts" +msgstr "Extraits personnalisés" + +# @ relevanssi +#: lib/interface.php:842 +msgid "Highlighting search results" +msgstr "Mise en évidence des résultats de recherche" + +# @ relevanssi +#: lib/interface.php:843 lib/interface.php:1179 +msgid "Indexing options" +msgstr "Options d'indexation" + +# @ relevanssi +#: lib/interface.php:844 lib/interface.php:1327 +msgid "Synonyms" +msgstr "Synonymes" + +# @ relevanssi +#: lib/interface.php:845 lib/interface.php:1337 +msgid "Stopwords" +msgstr "Stopwords" + +#: lib/interface.php:848 +msgid "Import/export options" +msgstr "Import/export des options" + +#: lib/interface.php:851 +msgid "Buy Relevanssi Premium" +msgstr "Achetez Relevanssi Premium" + +# @ relevanssi +#: lib/interface.php:856 +msgid "Quick tools" +msgstr "Outils rapides" + +# @ relevanssi +#: lib/interface.php:858 +msgid "Save options" +msgstr "Sauvegarder les options" + +# @ relevanssi +#: lib/interface.php:859 +msgid "Build the index" +msgstr "Construire l'index" + +# @ relevanssi +#: lib/interface.php:860 lib/interface.php:1325 +msgid "Continue indexing" +msgstr "Continuer l'indexation" + +# @ relevanssi +#: lib/interface.php:860 +msgid "add" +msgstr "ajouter" + +# @ relevanssi +#: lib/interface.php:860 +msgid "documents." +msgstr "documents." + +#: lib/interface.php:864 +msgid "" +"WARNING: You've chosen no post types to index. Nothing will be indexed. Choose some post types to index." +msgstr "" +"ATTENTION: vous n'avez choisi aucun type de billet à indexer. Rien ne sera " +"indexé.Choisissez les types de billet à indexer." + +# @ relevanssi +#: lib/interface.php:868 +msgid "" +"Use 'Build the index' to build the index with current indexing options. If you can't finish indexing with one " +"go, use 'Continue indexing' to finish the job. You can change the number of " +"documents to add until you find the largest amount you can add with one go. " +"See 'State of the Index' below to find out how many documents actually go " +"into the index." +msgstr "" +"Utiliser 'Construire l'index' pour construire l'index avec les options actuelles d'indexation. Si vous ne pouvez pas " +"terminer l'indexation en une passe, utilisez 'Continuer l'indexation' pour " +"finir le travail. Vous pouvez modifier le nombre de documents à ajouter " +"jusqu'à ce que vous trouviez le maximum que vous pouvez ajouter en une " +"passe. Regardez 'État de l'indexation' ci-dessous pour déterminer le nombre " +"de documents actuellement pris en compte dans l'indexation." + +# @ relevanssi +#: lib/interface.php:870 +msgid "State of the Index" +msgstr "État de l'index" + +# @ relevanssi +#: lib/interface.php:872 +msgid "Documents in the index" +msgstr "Documents dans l'index" + +# @ relevanssi +#: lib/interface.php:873 +msgid "Terms in the index" +msgstr "Termes dans l'index" + +# @ relevanssi +#: lib/interface.php:874 +msgid "Highest post ID indexed" +msgstr "ID de billet le plus élevé indexé" + +# @ relevanssi +#: lib/interface.php:883 +msgid "Use search for admin:" +msgstr "Utiliser la recherche pour l'administration:" + +# @ relevanssi +#: lib/interface.php:885 +msgid "If checked, Relevanssi will be used for searches in the admin interface" +msgstr "" +"Si coché, Relevanssi sera utilisé pour les recherches dans l'interface " +"d'administration" + +# @ relevanssi +#: lib/interface.php:889 +msgid "Default operator for the search?" +msgstr "Opérateur logique par défaut pour la recherche ?" + +# @ relevanssi +#: lib/interface.php:891 +msgid "AND - require all terms" +msgstr "ET - nécessite tous les termes" + +# @ relevanssi +#: lib/interface.php:892 +msgid "OR - any term present is enough" +msgstr "OU - n'importe lequel des termes présents est suffisant" + +# @ relevanssi +#: lib/interface.php:894 +msgid "" +"If you choose AND and the search finds no matches, it will automatically do " +"an OR search." +msgstr "" +"Si vous choisissez ET et la recherche ne trouve rien, une recherche OU sera " +"lancée automatiquement." + +# @ relevanssi +#: lib/interface.php:898 +msgid "Disable OR fallback:" +msgstr "Désactiver le passage à OU:" + +# @ relevanssi +#: lib/interface.php:900 +msgid "" +"If you don't want Relevanssi to fall back to OR search when AND search gets " +"no hits, check this option. For most cases, leave this one unchecked." +msgstr "" +"Si vous ne désirez pas que Relevanssi ne se rabatte pas sur une recherche OU " +"quand la recherche ET ne donne aucun résultat, cochez cette option. Dans la " +"plupart des cas, laissez la décochée." + +# @ relevanssi +#: lib/interface.php:904 +msgid "Default order for results:" +msgstr "Ordre par défaut pour les résultats:" + +# @ relevanssi +#: lib/interface.php:906 +msgid "Relevance (highly recommended)" +msgstr "Pertinence (hautement recommandé)" + +# @ relevanssi +#: lib/interface.php:907 +msgid "Post date" +msgstr "Date de billet" + +#: lib/interface.php:909 +msgid "" +"If you want date-based results, see the recent post bonus in the Weights " +"section." +msgstr "" +"Si vous désirez des résultats chronologiques, veuillez consulter le nouveau " +"bonus pour billet dans la section Poids." + +# @ relevanssi +#: lib/interface.php:913 +msgid "When to use fuzzy matching?" +msgstr "Quand utiliser la correspondance approximative ?" + +# @ relevanssi +#: lib/interface.php:915 +msgid "When straight search gets no hits" +msgstr "Quand la recherche directe ne donne pas de résultat" + +# @ relevanssi +#: lib/interface.php:916 +msgid "Always" +msgstr "Toujours" + +# @ relevanssi +#: lib/interface.php:917 +msgid "Don't use fuzzy search" +msgstr "Ne pas utiliser l'approximation" + +# @ relevanssi +#: lib/interface.php:919 +msgid "" +"Straight search matches just the term. Fuzzy search matches everything that " +"begins or ends with the search term." +msgstr "" +"La recherche pure prend en compte juste le terme. La recherche approximative " +"prend en compte tout ce qui commence ou finit par le terme recherché." + +# @ relevanssi +#: lib/interface.php:927 +msgid "Limit searches:" +msgstr "Limiter les recherches:" + +#: lib/interface.php:929 +msgid "" +"If this option is checked, Relevanssi will limit search results to at most " +"500 results per term. This will improve performance, but may cause some " +"relevant documents to go unfound. However, Relevanssi tries to prioritize " +"the most relevant documents. This does not work well when sorting " +"results by date. The throttle can end up cutting off recent posts " +"to favour more relevant posts." +msgstr "" +"Si cette option est cochée, Relevanssi limitera les résultats de recherche à " +"500 résultats par terme. Ceci améliorera les performances mais peut faire en " +"forte que certains documents pertinents ne soient pas trouvés. Quoiqu'il en " +"soit, Relevanssi essaie de classer par priorité les documents les plus " +"pertinents. Ceci ne fonctionne pas bien en classant les résultats " +"par date. Le tri peut être amené à mettre de côté des billets " +"récents pour favoriser des billets plus pertinents." + +#: lib/interface.php:933 +msgid "Limit:" +msgstr "Limite:" + +#: lib/interface.php:935 +#, php-format +msgid "" +"For better performance, adjust the limit to a smaller number. Adjusting the " +"limit to 100 or 200 should be safe for good results, and might bring a boost " +"in search speed. DO NOT use this feature to limit the number of search " +"results on search results pages, as that will lead to problems. For " +"adjusting the number of search results displayed, see this " +"knowledge base entry." +msgstr "" +"Pour de meilleures performances, ajustez la limite à un nombre plus petit. " +"Ajuster la limite à 100 ou 200 devrait être sans danger pour de bons " +"résultats et pourrait apporter un boost dans la vitesse de recherche. NE PAS " +"utiliser cette fonction pour limiter le nombre de résultats de recherche sur " +"les pages de résultat, ce qui pourrait conduire à des problèmes. Pour " +"ajuster le nombre de résultats de recherche affichés, veuillez lire cette entrée de la base de connaissance." + +# @ relevanssi +#: lib/interface.php:945 +msgid "" +"These values affect the weights of the documents. These are all multipliers, " +"so 1 means no change in weight, less than 1 means less weight, and more than " +"1 means more weight. Setting something to zero makes that worthless. For " +"example, if title weight is more than 1, words in titles are more " +"significant than words elsewhere. If title weight is 0, words in titles " +"won't make any difference to the search results." +msgstr "" +"Ces valeurs affectent le poids des documents. Ce sont tous des " +"multiplicateurs, ainsi 1 signifie aucune modification du poids, moins de 1 " +"signifie moins de poids et plus de 1 signifie plus de poids. Un réglage " +"proche de zéro correspond à une partie négligeable. Par exemple, si le poids " +"du titre vaut plus que 1, les mots dans le titre sont plus significatifs que " +"les mêmes mots partout ailleurs. Si le poids du titre vaut 0, les mots dans " +"le titre n'affecteront pas les résultats de recherche." + +#: lib/interface.php:950 +msgid "Element" +msgstr "Élément" + +#: lib/interface.php:951 +msgid "Weight" +msgstr "Poids" + +# @ relevanssi +#: lib/interface.php:952 +msgid "Default weight" +msgstr "Poids par défaut" + +# @ relevanssi +#: lib/interface.php:957 +msgid "Post titles" +msgstr "Titres de billet" + +# @ relevanssi +#: lib/interface.php:969 +msgid "Comment text" +msgstr "Text de commentaire" + +# @ relevanssi +#: lib/interface.php:990 +msgid "WPML/Polylang compatibility" +msgstr "Compatibilité WPML/Polylang" + +# @ relevanssi +#: lib/interface.php:992 +msgid "Limit results to current language:" +msgstr "Limiter les résultats au langage suivant:" + +# @ relevanssi +#: lib/interface.php:994 +msgid "" +"If this option is checked, Relevanssi will only return results in the " +"current active language. Otherwise results will include posts in every " +"language." +msgstr "" +"Si cette option est cochée, Relevanssi retournera uniquement les résultats " +"dans le langage actuellement activé. Sinon, les résultats inclueront les " +"billets dans tous les langages." + +# @ relevanssi +#: lib/interface.php:1000 +msgid "Keep a log of user queries:" +msgstr "Conserver une liste des recherches des visiteurs:" + +# @ relevanssi +#: lib/interface.php:1002 +msgid "" +"If checked, Relevanssi will log user queries. The log appears in 'User " +"searches' on the Dashboard admin menu." +msgstr "" +"Si coché, Relevanssi conservera dans les stats les requêtes d'utilisateur. " +"Les stats apparaissent dans 'Recherches d'utilisateur' dans le menu du " +"tableau de bord de l'administration." + +#: lib/interface.php:1006 +msgid "Log the user's IP with the queries:" +msgstr "Enregistrer l'adresse IP de l'utilisateur avec ses requêtes:" + +# @ relevanssi +#: lib/interface.php:1008 +msgid "If checked, Relevanssi will log user's IP-Adress with the queries." +msgstr "" +"Si coché, Relevanssi enregistrera les adresses IP des utilisateurs avec " +"leurs requêtes." + +# @ relevanssi +#: lib/interface.php:1012 +msgid "Don't log queries from these users:" +msgstr "Ne conservez pas les statistiques de recherche de ces utilisateurs:" + +# @ relevanssi +#: lib/interface.php:1014 +msgid "" +"Comma-separated list of numeric user IDs or user login names that will not " +"be logged." +msgstr "" +"Liste d'ID d'utilisateurs ou de noms de login séparés par une virgule qui ne " +"seront pas pris en compte." + +# @ relevanssi +#: lib/interface.php:1018 +msgid "" +"If you enable logs, you can see what your users are searching for. You can " +"prevent your own searches from getting in the logs with the omit feature." +msgstr "" +"Si vous activez les logs, vous pouvez voir ce que les utilisateurs " +"recherchent. Vous pouvez exclure vos propres recherches des logs avec le " +"réglage d'exemption." + +# @ relevanssi +#: lib/interface.php:1021 +msgid "" +"If you enable logs, you can see what your users are searching for. Logs are " +"also needed to use the 'Did you mean?' feature. You can prevent your own " +"searches from getting in the logs with the omit feature." +msgstr "" +"Si vous activez les logs, vous pouvez voir ce que les utilisateurs " +"recherchent. Les logs sont aussi utilisés pour la fonction 'Vous vouliez " +"dire ?'. Vous pouvez empêcher vos propres recherches d'être enregistrées " +"avec la fonction d'exception." + +# @ relevanssi +#: lib/interface.php:1029 +msgid "Restrict search to these categories and tags:" +msgstr "Restreindre la recherche à ces catégories et tags:" + +# @ relevanssi +#: lib/interface.php:1031 +msgid "" +"Enter a comma-separated list of category and tag IDs to restrict search to " +"those categories or tags. You can also use <input type='hidden' " +"name='cats' value='list of cats and tags' /> in your search form. " +"The input field will \toverrun this setting." +msgstr "" +"Entrez une liste d'ID de catégories et de mots-clefs pour restreindre la " +"recherche à ces catégories et mots-clef. Vous pouvez aussi utiliser " +"<input type='hidden' name='cats' value='list of cats and tags' />" +" dans votre formulaire de recherche. Le champ inséré sera prioritaire " +"sur ce réglage." + +# @ relevanssi +#: lib/interface.php:1035 +msgid "Exclude these categories from search:" +msgstr "Exclure ces catégories de la recherche:" + +# @ relevanssi +#: lib/interface.php:1037 +msgid "" +"Enter a comma-separated list of category IDs that are excluded from search " +"results." +msgstr "" +"Entrez une liste d'ID de catégories à exclure des résultats de recherche." + +# @ relevanssi +#: lib/interface.php:1041 +msgid "Exclude these tags from search:" +msgstr "Exclure ces mots-clef de la recherche:" + +# @ relevanssi +#: lib/interface.php:1043 +msgid "" +"Enter a comma-separated list of tag IDs that are excluded from search " +"results." +msgstr "" +"Entrez une liste d'ID de mots-clef à exclure des résultats de recherche." + +# @ relevanssi +#: lib/interface.php:1047 +msgid "Exclude these posts/pages from search:" +msgstr "Exclure ces billets/pages de la recherche:" + +# @ relevanssi +#: lib/interface.php:1051 +msgid "" +"Enter a comma-separated list of post/page IDs that are excluded from search " +"results. This only works here, you can't use the input field option " +"(WordPress doesn't pass custom parameters there). You can also use a " +"checkbox on post/page edit pages to remove posts from index." +msgstr "" +"Entrez une liste d'ID de billets et de pages à exclure des résultats de " +"recherche. Cela ne fonctionne qu'ici, vous ne pouvez pas utiliser l'option " +"de champ d'insertion (Wordpress ne gèrera pas les paramètres personnalisés " +"dans ce cas). Vous pouvez aussi utiliser une case à cocher dans les pages " +"d'éditions des billets/pages pour retirer des billetx de l'index." + +# @ relevanssi +#: lib/interface.php:1054 +msgid "" +"Enter a comma-separated list of post/page IDs that are excluded from search " +"results. This only works here, you can't use the input field option " +"(WordPress doesn't pass custom parameters there)." +msgstr "" +"Entrez une liste d'ID de billets et de pages à exclure des résultats de " +"recherche. Cela ne fonctionne qu'ici, vous ne pouvez pas utiliser l'option " +"de champ d'insertion (Wordpress ne gèrera pas les paramètres personnalisés " +"dans ce cas). " + +# @ relevanssi +#: lib/interface.php:1060 +msgid "Respect exclude_from_search for custom post types:" +msgstr "Respecter exclude_from_search pour les types de billets personnalisés:" + +# @ relevanssi +#: lib/interface.php:1062 +msgid "" +"If checked, Relevanssi won't display posts of custom post types that have " +"'exclude_from_search' set to true. If not checked, Relevanssi will display " +"anything that is indexed." +msgstr "" +"Si coché, Relevanssi n'affichera aucun billet de types de billets " +"personnalisés pour lesquels 'exclude_from_search' a été indiqué. Si non " +"coché, Relevanssi affichera tout ce qui est indexé." + +# @ relevanssi +#: lib/interface.php:1064 +msgid "Custom excerpts/snippets" +msgstr "Personnaliser extraits/snippets" + +# @ relevanssi +#: lib/interface.php:1066 +msgid "Create custom search result snippets:" +msgstr "Créer des snippets personalisés de résultats de recherche:" + +# @ relevanssi +#: lib/interface.php:1068 +msgid "" +"If checked, Relevanssi will create excerpts that contain the search term " +"hits. To make them work, make sure your search result template uses " +"the_excerpt() to display post excerpts." +msgstr "" +"Si coché, Relevanssi créera des extraits qui contiennent les résultats de la " +"recherche de terme. Pour que cela fonctionne, vérifiez bien que le fichier " +"de thème de résultat de recherche utilise the_excerpt() pour afficher les " +"extraits de billet." + +#: lib/interface.php:1070 +msgid "" +"Note: Building custom excerpts can be slow. If you are not actually using " +"the excerpts, make sure you disable the option." +msgstr "" +"Remarque: construire les extraits personnalisés peut être lent. Si vous " +"n'utilisez pas les extraits, soyez certain de désactiver cette option." + +# @ relevanssi +#: lib/interface.php:1072 +msgid "Length of the snippet:" +msgstr "Longueur du snippet:" + +# @ relevanssi +#: lib/interface.php:1075 +msgid "characters" +msgstr "lettres" + +# @ relevanssi +#: lib/interface.php:1076 +msgid "words" +msgstr "mots" + +# @ relevanssi +#: lib/interface.php:1078 +msgid "This must be an integer." +msgstr "Ceci doit être un nombre entier." + +#: lib/interface.php:1082 +msgid "Allowable tags in excerpts:" +msgstr "Mots-clefs autorisés dans les extraits:" + +#: lib/interface.php:1085 +msgid "" +"List all tags you want to allow in excerpts, without any whitespace. For " +"example: '<p><a><strong>'." +msgstr "" +"Listez tous les mots-clef que vous voulez autoriser dans les extraits sans " +"aucun espace. Par exemple: '<p><a><strong>'." + +# @ relevanssi +#: lib/interface.php:1089 +msgid "Show breakdown of search hits in excerpts:" +msgstr "Montrer la répartition des résultats de recherche dans les extraits:" + +# @ relevanssi +#: lib/interface.php:1091 +msgid "" +"Check this to show more information on where the search hits were made. " +"Requires custom snippets to work." +msgstr "" +"Cochez ceci pour afficher plus d'informations sur la répartition des " +"résultats de recherche. Nécessite l'activation des snippets personnalisés " +"pour fonctionner." + +# @ relevanssi +#: lib/interface.php:1095 +msgid "The breakdown format:" +msgstr "Mise en forme des répartitions:" + +# @ relevanssi +#: lib/interface.php:1097 +msgid "" +"Use %body%, %title%, %tags% and %comments% to display the number of hits (in " +"different parts of the post), %total% for total hits, %score% to display the " +"document weight and %terms% to show how many hits each search term got. No " +"double quotes (\") allowed!" +msgstr "" +"Utilisez %body%, %title%, %tags% et %comments% pour afficher le nombre de " +"résultats trouvés (en différents endroits du billet), %total% pour le nombre " +"total de résultats affichés, %score% pour afficher le poids d'importance du " +"document et %terms% pour montrer combien de résultats affichés ont obtenu " +"chacun des termes recherché. Interdit d'utiliser des guillemets (\")!" + +# @ relevanssi +#: lib/interface.php:1099 +msgid "Search hit highlighting" +msgstr "Surbrillance des résultats de recherche" + +# @ relevanssi +#: lib/interface.php:1101 +msgid "First, choose the type of highlighting used:" +msgstr "En premier, veuillez choisir le type de surbrillance utilisée:" + +# @ relevanssi +#: lib/interface.php:1104 +msgid "Highlight query terms in search results:" +msgstr "" +"Mettre en surbrillance les termes de recherche dans les résultats de " +"recherche:" + +# @ relevanssi +#: lib/interface.php:1106 +msgid "No highlighting" +msgstr "Pas de mise en surbrillance" + +# @ relevanssi +#: lib/interface.php:1110 +msgid "Text color" +msgstr "Couleur du texte" + +# @ relevanssi +#: lib/interface.php:1111 +msgid "Background color" +msgstr "Couleur du fond" + +# @ relevanssi +#: lib/interface.php:1112 +msgid "CSS Style" +msgstr "Style CSS" + +# @ relevanssi +#: lib/interface.php:1113 +msgid "CSS Class" +msgstr "Classe CSS" + +# @ relevanssi +#: lib/interface.php:1115 +msgid "Highlighting isn't available unless you use custom snippets" +msgstr "" +"La mise en surbrillance n'est pas disponible tant que vous n'avez pas activé " +"l'utilisation de snippets personnalisés." + +# @ relevanssi +#: lib/interface.php:1119 +msgid "Highlight query terms in result titles too:" +msgstr "Mettre en surbrillance les mots recherchés dans le titre également:" + +# @ relevanssi +#: lib/interface.php:1125 +msgid "Highlight query terms in documents from local searches:" +msgstr "" +"Mettre en évidence les termes de la requête dans les documents pour les " +"recherches locales:" + +# @ relevanssi +#: lib/interface.php:1127 +msgid "" +"Highlights hits when user opens the post from search results. This is based " +"on HTTP referrer, so if that's blocked, there'll be no highlights." +msgstr "" +"Surligne les mots choisis quand l'utilisateur ouvre le billet à partir des " +"résultats de recherche. La fonction est basée sur HTTP referrer ainsi, en " +"cas de blocage, il y aura pas de surlignage." + +# @ relevanssi +#: lib/interface.php:1133 +msgid "Highlight query terms in comments:" +msgstr "Surligner les termes recherchés dans les commentaires:" + +# @ relevanssi +#: lib/interface.php:1135 +msgid "" +"Highlights hits in comments when user opens the post from search results." +msgstr "" +"Surligner les résultats affichés dans les commentaires quand l'utilisateur " +"ouvre le billet à partir des résultats de recherche." + +# @ relevanssi +#: lib/interface.php:1139 +msgid "Uncheck this if you use non-ASCII characters:" +msgstr "Décochez ceci si vous utilisez des caractères non-ASCII:" + +# @ relevanssi +#: lib/interface.php:1141 +msgid "" +"If you use non-ASCII characters (like Cyrillic alphabet) and the highlights " +"don't work, uncheck this option to make highlights work." +msgstr "" +"Si vous utilisez des caractères non-ASCII (comme l'alphabet Cyrillique) et " +"que le surlignage ne fonctionne pas, décochez cette option pour faire " +"fonctionner le surlignage." + +# @ relevanssi +#: lib/interface.php:1146 +msgid "Then adjust the settings for your chosen type:" +msgstr "Ensuite ajustez les réglages du type choisi:" + +# @ relevanssi +#: lib/interface.php:1150 +msgid "Text color for highlights:" +msgstr "Couleur du texte pour la surbrillance:" + +# @ relevanssi +#: lib/interface.php:1152 lib/interface.php:1158 +msgid "Use HTML color codes (#rgb or #rrggbb)" +msgstr "Utiliser les codes de couleurs HTML (#rgb ou #rrggbb)" + +# @ relevanssi +#: lib/interface.php:1156 +msgid "Background color for highlights:" +msgstr "Couleur du fond pour la surbrillance:" + +# @ relevanssi +#: lib/interface.php:1162 +msgid "CSS style for highlights:" +msgstr "Style CSS pour la surbrillance:" + +# @ relevanssi +#: lib/interface.php:1164 +msgid "" +"You can use any CSS styling here, style will be inserted with a <span>" +msgstr "" +"Vous pouvez utiliser tout habillage CSS ici. Le style sera inséré avec un " +"<span>" + +# @ relevanssi +#: lib/interface.php:1168 +msgid "CSS class for highlights:" +msgstr "Classe CSS pour la surbrillance:" + +# @ relevanssi +#: lib/interface.php:1170 +msgid "" +"Name a class here, search results will be wrapped in a <span> with the " +"class" +msgstr "" +"Nommez une classe ici. Les résultats seront encadrés dans un <span> " +"avec cette classe" + +# @ relevanssi +#: lib/interface.php:1177 lib/interface.php:1335 +msgid "Save the options" +msgstr "Sauvegarder les options" + +# @ relevanssi +#: lib/interface.php:1181 +msgid "Choose post types to index:" +msgstr "Veuillez choisir les types de billets personnalisés à indexer:" + +#: lib/interface.php:1186 +msgid "Type" +msgstr "Type" + +#: lib/interface.php:1187 lib/interface.php:1233 +msgid "Index" +msgstr "Index" + +#: lib/interface.php:1188 lib/interface.php:1234 +msgid "Public?" +msgstr "Publique ?" + +#: lib/interface.php:1205 lib/interface.php:1248 +#, php-format +msgid "%s" +msgstr "%s" + +#: lib/interface.php:1206 lib/interface.php:1249 +msgid "yes" +msgstr "oui" + +# @ relevanssi +#: lib/interface.php:1206 lib/interface.php:1249 +msgid "no" +msgstr "non" + +# @ relevanssi +#: lib/interface.php:1227 +msgid "Choose taxonomies to index:" +msgstr "Veuillez choisir les taxonomie à indexer:" + +#: lib/interface.php:1232 +msgid "Taxonomy" +msgstr "Taxonomie" + +#: lib/interface.php:1269 +msgid "" +"If you check a taxonomy here, the terms for that taxonomy are indexed with " +"the posts. If you for example choose \"post_tag\", searching for tags will " +"find all posts that have the tag." +msgstr "" +"Si vous cochez une taxonomie ici, les termes de cette taxonomie seront " +"indexées avec les billets. Si par exemple vous choisissez \"post_tag\", la " +"recherche pour les mots-clef affichera tous les billets qui sont associés au " +"mot-clef." + +# @ relevanssi +#: lib/interface.php:1273 +msgid "Minimum word length to index" +msgstr "Longueur minimum des mots à indexer" + +# @ relevanssi +#: lib/interface.php:1275 +msgid "Words shorter than this number will not be indexed." +msgstr "Les mots plus courts que ce nombre ne seront pas indexés." + +# @ relevanssi +#: lib/interface.php:1281 +msgid "Expand shortcodes in post content:" +msgstr "Traduire les shortcodes dans le contenu des billets:" + +# @ relevanssi +#: lib/interface.php:1283 +msgid "" +"If checked, Relevanssi will expand shortcodes in post content before " +"indexing. Otherwise shortcodes will be stripped. If you use shortcodes to " +"include dynamic content, Relevanssi will not keep the index updated, the " +"index will reflect the status of the shortcode content at the moment of " +"indexing." +msgstr "" +"Si coché, Relevanssi traduira tous les shortcodes des contenu de billets " +"avec l'indexation. Dans le cas contraire, les shortcodes seront ignorés. Si " +"vous utilisez des shortcodes pour générer du contenu dynamique, Relevanssi " +"ne mettra pas l'index à jour. Ce dernier présentera le statut du contenu du " +"shortcode au moment de l'indexation." + +# @ relevanssi +#: lib/interface.php:1289 +msgid "Index and search your posts' authors:" +msgstr "Indexer et rechercher les auteurs des billets:" + +# @ relevanssi +#: lib/interface.php:1291 +msgid "" +"If checked, Relevanssi will also index and search the authors of your posts. " +"Author display name will be indexed. Remember to rebuild the index if you " +"change this option!" +msgstr "" +"Si coché, Relevanssi indexera et cherchera aussi dans les auteurs de vos " +"billets. Le nom affiché des auteurs sera indexé. N'oubliez pas de " +"reconstruire l'index si vous modifiez cette option !" + +# @ relevanssi +#: lib/interface.php:1295 +msgid "Index and search post excerpts:" +msgstr "Indexer et rechercher dans les extraits de billets:" + +# @ relevanssi +#: lib/interface.php:1297 +msgid "" +"If checked, Relevanssi will also index and search the excerpts of your posts." +"Remember to rebuild the index if you change this option!" +msgstr "" +"Si coché, Relevanssi indexera et cherchera dans les extraits de vos billets. " +"N'oubliez pas de reconstruire l'index si vous modifiez cette option !" + +# @ relevanssi +#: lib/interface.php:1301 +msgid "Index and search these comments:" +msgstr "Indexer et rechercher ces commentaires:" + +# @ relevanssi +#: lib/interface.php:1303 +msgid "none" +msgstr "aucun" + +# @ relevanssi +#: lib/interface.php:1304 +msgid "normal" +msgstr "normal" + +# @ relevanssi +#: lib/interface.php:1305 +msgid "all" +msgstr "tout" + +# @ relevanssi +#: lib/interface.php:1307 +msgid "" +"Relevanssi will index and search ALL (all comments including track- & " +"pingbacks and custom comment types), NONE (no comments) or NORMAL (manually " +"posted comments on your blog).
Remember to rebuild the index if you " +"change this option!" +msgstr "" +"Relevanssi indexera et cherchera dans TOUT (tous les commentaires incluant " +"track- & pingbacks et types de commentaires personnalisés), AUCUN (aucun " +"commentaire) ou NORMAL (commentaires postés manuellement sur votre blog)." +"
N'oubliez pas de reconstruire l'index si vous modifiez cette option !" + +# @ relevanssi +#: lib/interface.php:1311 +msgid "Custom fields to index:" +msgstr "Champs personnalisés à indexer:" + +#: lib/interface.php:1313 +msgid "" +"A comma-separated list of custom fields to include in the index. Set to " +"'visible' to index all visible custom fields and to 'all' to index all " +"custom fields, also those starting with a '_' character." +msgstr "" +"Une liste séparée par des virgules de champs personnalisés à inclure dans " +"l'index. Utilisez 'visible' pour indexer tous les champs personnalisés " +"visibles et 'tout' pour indexer tous les champs personnalisés même ceux " +"commençant par le caractère '_' ." + +#: lib/interface.php:1323 +msgid "Save indexing options, erase index and rebuild the index" +msgstr "" +"Sauvegarder les options d'indexation, supprimer puis reconstruire l'index" + +# @ relevanssi +#: lib/interface.php:1331 +msgid "" +"Add synonyms here in 'key = value' format. When searching with the OR " +"operator, any search of 'key' will be expanded to include 'value' as well. " +"Using phrases is possible. The key-value pairs work in one direction only, " +"but you can of course repeat the same pair reversed." +msgstr "" +"Ajouter les synonymes ici au format 'clef = valeur'. Lors d'une recherche " +"avec l'opérateur logique OU, toute recherche de 'clef' sera étendue pour " +"inclure aussi 'valeur'. Il est possible d'utiliser des phrases. Les paires " +"clef-valeur ne fonctionnent que dans un sens mais, évidemment, vous pouvez " +"répéter la même clef à l'envers." + +# @ relevanssi +#: lib/interface.php:1356 +msgid "" +"

Enter a word here to add it to the list of stopwords. The word will " +"automatically be removed from the index, so re-indexing is not necessary. " +"You can enter many words at the same time, separate words with commas.

" +msgstr "" +"

Entrez un mot ici pour l'ajouter dans la liste des stopwords. Le mot sera " +"automatiquement retiré de l'index, de cette manière il est inutile de " +"réindexer. Si vous entrez plusieurs mots d'un coup, séparez les mots avec " +"une virgule.

" + +# @ relevanssi +#: lib/interface.php:1358 +msgid "Stopword(s) to add: " +msgstr "Stopword(s) à ajouter: " + +# @ relevanssi +#: lib/interface.php:1359 +msgid "Add" +msgstr "Ajouter" + +# @ relevanssi +#: lib/interface.php:1362 +msgid "" +"

Here's a list of stopwords in the database. Click a word to remove it " +"from stopwords. Removing stopwords won't automatically return them to index, " +"so you need to re-index all posts after removing stopwords to get those " +"words back to index." +msgstr "" +"

Voici une liste des stopwords de la base de données. Cliquez sur un mot " +"pour le retirer des stopwords. Retirer de la liste des stopwords ne les " +"réinjectera pas automatiquement dans l'index aussi vous devez réindexer tous " +"les billet après retrait de stopwords pour les réinjecter dans l'index." + +# @ relevanssi +#: lib/interface.php:1388 +msgid "Remove all stopwords" +msgstr "Retirer tous les stopwords" + +# @ relevanssi +#: lib/interface.php:1394 +msgid "" +"Here's a list of stopwords you can use to export the stopwords to another " +"blog." +msgstr "" +"

Voici une liste des stopwords de la base de données. Cliquez sur un mot " +"pour le retirer des stopwords. Retirer de la liste des stopwords ne les " +"réinjectera pas automatiquement dans l'index aussi vous devez réindexer tous " +"les billet après retrait de stopwords pour les réinjecter dans l'index." + +# @ relevanssi +#: lib/uninstall.php:29 +msgid "Data wiped clean, you can now delete the plugin." +msgstr "Données effacées, vous pouvez maintenant supprimer le plugin." + +# @ relevanssi +#: relevanssi.php:316 +msgid "Tag weight:" +msgstr "Poids des mots-clef:" + +# @ relevanssi +#: relevanssi.php:331 +msgid "Category weight:" +msgstr "Poids des catégories:" + +# @ relevanssi +#~ msgid "Caching" +#~ msgstr "Mise en cache" + +#~ msgid "" +#~ "For better performance, adjust the limit to a smaller number. Adjusting " +#~ "the limit to 100 - or even lower - should be safe for good results, and " +#~ "might bring a boost in search speed." +#~ msgstr "" +#~ "Pour de meilleures performances, ajustez la limite à un nombre plus " +#~ "petit. Ajuster la limite à 100 - et même en dessous - ne pose pas de " +#~ "problèmes pour de bons résultats et est susceptible de booster la vitesse " +#~ "de recherche." + +# @ relevanssi +#~ msgid "" +#~ "Warning: In many cases caching is not useful, and in some cases can be " +#~ "even harmful. Do not\n" +#~ "\tactivate cache unless you have a good reason to do so." +#~ msgstr "" +#~ "Attention: dans de nombreux cas, le cache n'est pas utile et dans " +#~ "certains cas il peut même causer du tort. Ne pas\n" +#~ "\n" +#~ "\\\tactiver le cache à moins que vous n'ayez une bonne raison." + +# @ relevanssi +#~ msgid "Enable result and excerpt caching:" +#~ msgstr "Autoriser la mise en cache des résultats et d'extraits:" + +# @ relevanssi +#~ msgid "If checked, Relevanssi will cache search results and post excerpts." +#~ msgstr "" +#~ "Si coché, Relevanssi mettra en cache les résultats et extraits de billets." + +# @ relevanssi +#~ msgid "Cache expire (in seconds):" +#~ msgstr "Expiration du coche (en secondes):" + +# @ relevanssi +#~ msgid "86400 = day" +#~ msgstr "86400 = jour" + +# @ relevanssi +#~ msgid "Entries in the cache" +#~ msgstr "Entrées dans le cache" diff --git a/mu-plugins/relevanssi/relevanssi-it_IT.po b/mu-plugins/relevanssi/relevanssi-it_IT.po new file mode 100644 index 00000000..05d811dc --- /dev/null +++ b/mu-plugins/relevanssi/relevanssi-it_IT.po @@ -0,0 +1,321 @@ +msgid "" +msgstr "" +"Project-Id-Version: Relevanssi\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2009-08-14 14:06+0200\n" +"PO-Revision-Date: \n" +"Last-Translator: Alessandro Fiorotto \n" +"Language-Team: Fiorotto \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Poedit-Language: Italian\n" +"X-Poedit-Country: ITALY\n" +"X-Poedit-SourceCharset: utf-8\n" + +#: relevanssi.php:703 +msgid "There is no excerpt because this is a protected post." +msgstr "Non c'è alcun estratto perché il post è protetto." + +#: relevanssi.php:994 +msgid "Indexing complete!" +msgstr "Indicizzazione completata!" + +#: relevanssi.php:1183 +msgid "Relevanssi Search Options" +msgstr "Opzioni per Relevanssi Search" + +#: relevanssi.php:1294 +#, php-format +msgid "

Term '%s' added to stopwords!

" +msgstr "

Termine '%s' aggiunto alle parole inutili ai fini della ricerca!

" + +#: relevanssi.php:1297 +#, php-format +msgid "

Couldn't add term '%s' to stopwords!

" +msgstr "

Non posso aggiungere il termine '%s' alle parole inutili ai fini della ricerca!

" + +#: relevanssi.php:1306 +msgid "25 most common words in the index" +msgstr "Le 25 parole più comuni nell'indice" + +#: relevanssi.php:1308 +msgid "These words are excellent stopword material. A word that appears in most of the posts in the database is quite pointless when searching. This is also an easy way to create a completely new stopword list, if one isn't available in your language. Click the icon after the word to add the word to the stopword list. The word will also be removed from the index, so rebuilding the index is not necessary." +msgstr "Queste parole possono dimostrarsi inutili ai fini della ricerca. Una parola che compare nella maggior parte dei posti nel database è piuttosto inutile ai fini di una buona ricerca. Questo è anche un modo semplice per creare un nuovo elenco di parole non significative, se non è disponibile nella tua lingua. Fare clic sull'icona dopo la parola per aggiungere la parola alla lista delle parole non significative. La parola sarà rimossa dall'indice e non sarà necessario ricostruire l'indice se si effettua una modifica." + +#: relevanssi.php:1331 +msgid "Add to stopwords" +msgstr "Aggiungi alle parole inutili ai fini della ricerca" + +#: relevanssi.php:1344 +msgid "25 most popular queries" +msgstr "25 ricerche più effettuate" + +#: relevanssi.php:1356 +msgid "Recent queries that got 0 hits" +msgstr "Recenti ricerche che non hanno dato risultati" + +#: relevanssi.php:1491 +msgid "Title boost:" +msgstr "Potenziamento dal titolo:" + +#: relevanssi.php:1492 +#, php-format +msgid "Default: %d. 0 means titles are ignored, 1 means no boost, more than 1 gives extra value." +msgstr "Predefinito %d. 0 significa che i titoli sono ignorati, 1 significa non aumentare, mentre più di 1 da un valore in più." + +#: relevanssi.php:1493 +msgid "Tag boost:" +msgstr "Potenziamento da TAG" + +#: relevanssi.php:1494 +#, php-format +msgid "Default: %d. 0 means tags are ignored, 1 means no boost, more than 1 gives extra value." +msgstr "Predefinito %d. 0 significa che i tag sono ignorati, 1 significa non aumentare, mentre più di 1 da un valore in più." + +#: relevanssi.php:1495 +msgid "Comment boost:" +msgstr "Potenziamento dai commenti:" + +#: relevanssi.php:1496 +#, php-format +msgid "Default: %d. 0 means comments are ignored, 1 means no boost, more than 1 gives extra value." +msgstr "Predefinito %d. 0 significa che i commenti sono ignorati, 1 significa non aumentare, mentre più di 1 da un valore in più." + +#: relevanssi.php:1497 +msgid "Use search for admin:" +msgstr "Usa ricerca per admin:" + +#: relevanssi.php:1498 +msgid "If checked, Relevanssi will be used for searches in the admin interface" +msgstr "Se selezionato, Relevanssi sarà usato anche per le ricerche nell'interfaccia di amministrazione" + +#: relevanssi.php:1499 +msgid "Restrict search to these categories and tags:" +msgstr "Circoscrivi la ricerca a queste categorie e tag:" + +#: relevanssi.php:1500 +msgid "Enter a comma-separated list of category and tag IDs to restrict search to those categories or tags. You can also use <input type='hidden' name='cat' value='list of cats and tags' /> in your search form. The input field will overrun this setting." +msgstr "Inserire un elenco separato da virgola, con gli id degli articoli e/o delle pagine a cui sarà circoscritto l'ambito di ricerca. Si può anche usare il codice <input type='hidden' name='cat' value='list of cats and tags' /> nel modulo di ricerca e quello che si inserirà nel modulo sovrascriverà quanto impostato qui." + +#: relevanssi.php:1501 +msgid "Exclude these categories and tags from search:" +msgstr "Escludi queste categorie e tag dalla ricerca:" + +#: relevanssi.php:1502 +msgid "Enter a comma-separated list of category and tag IDs that are excluded from search results. This only works here, you can't use the input field option (WordPress doesn't pass custom parameters there)." +msgstr "Inserire un elenco separato da virgola, con gli id delle categorie e dei tag esclusi dai risultati della ricerca. Non è possibile sovrascrivere o cambiare questa impostazione inserendo dell'apposito codice nel modulo di ricerca." + +#: relevanssi.php:1505 +msgid "Exclude these posts/pages from search:" +msgstr "Escludi questi articoli/pagine dalla ricerca:" + +#: relevanssi.php:1506 +msgid "Enter a comma-separated list of post/page IDs that are excluded from search results. This only works here, you can't use the input field option (WordPress doesn't pass custom parameters there)." +msgstr "Inserire un elenco separato da virgola, con gli id degli articoli e/o delle pagine esclusi dai risultati della ricerca. Non è possibile sovrascrivere o cambiare questa impostazione inserendo dell'apposito codice nel modulo di ricerca." + +#: relevanssi.php:1507 +msgid "Index and search your posts' tags:" +msgstr "Indicizza e cerca i tag degli articoli:" + +#: relevanssi.php:1508 +msgid "If checked, Relevanssi will also index and search the tags of your posts. Remember to rebuild the index if you change this option!" +msgstr "Se selezionato, Relevanssi indicizzerà anche i tag degli articoli. Ricordati di ricostruire l'indice se cambi questa opzione!" + +#: relevanssi.php:1509 +msgid "Index and search these comments:" +msgstr "Indicizza e ricerca questi commenti:" + +#: relevanssi.php:1510 +msgid "Relevanssi will index and search ALL (all comments including track- & pingbacks and custom comment types), NONE (no comments) or NORMAL (manually posted comments on your blog).
Remember to rebuild the index if you change this option!" +msgstr "Relevanssi consente di indicizzare e di effettuare le ricerche su TUTTO (compresi tutti i commenti, track & pingbacks e i commenti personalizzati), NESSUNO (commenti esclusi) o NORMALE (solo i commenti inseriti manualmente nel tuo blog).
Ricordati di ricostruire l'indice, se modifichi questa opzione!" + +#: relevanssi.php:1511 +msgid "all" +msgstr "tutto" + +#: relevanssi.php:1512 +msgid "normal" +msgstr "normale" + +#: relevanssi.php:1513 +msgid "none" +msgstr "nessuno" + +#: relevanssi.php:1516 +msgid "Create custom search result snippets:" +msgstr "Crea un frammento di ricerca personalizzato:" + +#: relevanssi.php:1517 +msgid "If checked, Relevanssi will create excerpts that contain the search term hits. To make them work, make sure your search result template uses the_excerpt() to display post excerpts." +msgstr "Se selezionato, Relevanssi creerà un estratto che conterrà la parola cercata. Affinché funzioni, assicurarsi che il template utilizzi la funzione the_excerpt() per visualizzare il risultato della ricerca." + +#: relevanssi.php:1518 +msgid "Length of the snippet:" +msgstr "Lunghezza del frammento:" + +#: relevanssi.php:1519 +msgid "This must be an integer." +msgstr "Deve essere un numero intero." + +#: relevanssi.php:1520 +msgid "words" +msgstr "parole" + +#: relevanssi.php:1521 +msgid "characters" +msgstr "caratteri" + +#: relevanssi.php:1522 +msgid "Keep a log of user queries:" +msgstr "Conserva un log delle ricerche:" + +#: relevanssi.php:1523 +msgid "If checked, Relevanssi will log user queries." +msgstr "Se selezionato, Relevanssi terrà traccia delle ricerche effettuate." + +#: relevanssi.php:1524 +msgid "Highlight query terms in search results:" +msgstr "Evidenzia i termini di ricerca nei risultati:" + +#: relevanssi.php:1525 +msgid "Highlighting isn't available unless you use custom snippets" +msgstr "L'evidenziazione non è disponibile se non si utilizzano degli snippet personalizzati" + +#: relevanssi.php:1526 +msgid "Highlight query terms in result titles too:" +msgstr "Evidenzia i termini di ricerca anche nei titoli dei risultati:" + +#: relevanssi.php:1529 +msgid "Save" +msgstr "Salva" + +#: relevanssi.php:1530 +msgid "Building the index and indexing options" +msgstr "Costruisci l'indice e salva le opzioni di indicizzazione" + +#: relevanssi.php:1531 +msgid "After installing the plugin, you need to build the index. This generally needs to be done once, you don't have to re-index unless something goes wrong. Indexing is a heavy task and might take more time than your servers allow. If the indexing cannot be finished - for example you get a blank screen or something like that after indexing - you can continue indexing from where you left by clicking 'Continue indexing'. Clicking 'Build the index' will delete the old index, so you can't use that." +msgstr "Dopo aver installato il plugin, è necessario costruire l'indice. Questo genere deve essere fatto una volta solo e non si deve reindicizzare fino a che qualcosa non funziona bene. L'indicizzazione è un compito pesante e potrebbe richiedere più tempo di quanto i server consentono. Se l'indicizzazione non viene completata e si ottine ad esempio una pagina bianca o qualcosa del genere, è possibile continuare l'indicizzazione dal punto in cui è stata interrotta semplicemente premendo il tasto 'Continua indicizzazione'. Cliccando invece su 'costruisci l'indice' si reinizierà da zero la creazione dell'indicie." + +#: relevanssi.php:1532 +msgid "So, if you build the index and don't get the 'Indexing complete' in the end, keep on clicking the 'Continue indexing' button until you do. On my blogs, I was able to index ~400 pages on one go, but had to continue indexing twice to index ~950 pages." +msgstr "Se si crea l'indice e alla fine non si ottiene il risultato di 'indicizzazione completa', cliccare nuovamente sul pulsante 'Continua indicizzazione' fino a quando non si otterrà tale risultato. Il mo blog ad esempio è stato in grado di indicizzare circa 400 pagine in una volta sola, ma ha dovuto continuare l'indicizzazione due volte per completare l'indice di circa 950 pagine." + +#: relevanssi.php:1533 +msgid "Save indexing options and build the index" +msgstr "Salva le opzioni di indicizzazione e costruisci l'indice" + +#: relevanssi.php:1534 +msgid "Continue indexing" +msgstr "Continua indicizzazione" + +#: relevanssi.php:1535 +msgid "No highlighting" +msgstr "No evidenziazione" + +#: relevanssi.php:1536 +msgid "Text color" +msgstr "Colore del testo" + +#: relevanssi.php:1537 +msgid "Background color" +msgstr "Colore di sfondo" + +#: relevanssi.php:1538 +msgid "CSS Style" +msgstr "Stile CSS" + +#: relevanssi.php:1539 +msgid "CSS Class" +msgstr "Classe CSS" + +#: relevanssi.php:1541 +msgid "Text color for highlights:" +msgstr "Colore del testo delle evidenziazioni:" + +#: relevanssi.php:1542 +msgid "Background color for highlights:" +msgstr "Colore di sfondo delle evidenziazioni:" + +#: relevanssi.php:1543 +msgid "CSS style for highlights:" +msgstr "Stile CSS per le evidenziazioni:" + +#: relevanssi.php:1544 +msgid "CSS class for highlights:" +msgstr "Classe CSS per le evidenziazioni:" + +#: relevanssi.php:1546 +#: relevanssi.php:1547 +msgid "Use HTML color codes (#rgb or #rrggbb)" +msgstr "Usare il codice colore HTML (#rgb o #rrggbb)" + +#: relevanssi.php:1548 +msgid "You can use any CSS styling here, style will be inserted with a <span>" +msgstr "È possibile usare qualsiasi stile CSS, lo stile sarà inserito con <span>" + +#: relevanssi.php:1549 +msgid "Name a class here, search results will be wrapped in a <span> with the class" +msgstr "Nome della classe qui. I risultati di ricerca saranno compresi in <span> con la classe" + +#: relevanssi.php:1551 +msgid "What to include in the index" +msgstr "Cosa includere nell'indice" + +#: relevanssi.php:1552 +msgid "Everything" +msgstr "Ogni cosa" + +#: relevanssi.php:1553 +msgid "Just posts" +msgstr "Solo articoli" + +#: relevanssi.php:1554 +msgid "Just pages" +msgstr "Solo pagine" + +#: relevanssi.php:1556 +msgid "Custom fields to index:" +msgstr "Campi personalizzati da indicizzare:" + +#: relevanssi.php:1557 +msgid "A comma-separated list of custom field names to include in the index." +msgstr "Una lista separata da virgola dei nomi personalizzati da includere nell'indice." + +#: relevanssi.php:1559 +msgid "Show breakdown of search hits in excerpts:" +msgstr "Viusalizza un separatore nei risultati di ricerca:" + +#: relevanssi.php:1560 +msgid "Check this to show more information on where the search hits were made. Requires custom snippets to work." +msgstr "Seleziona qui per mostrare più informazioni o per definire dove sarà effettuata la ricerca. Per attivarlo richiede uno snippet personalizzato." + +#: relevanssi.php:1561 +msgid "The breakdown format:" +msgstr "Formato dell'interruzione:" + +#: relevanssi.php:1562 +msgid "Use %body%, %title%, %tags%, %comments% and %score% to display the number of hits and the document weight." +msgstr "Usa %body%, %title%, %tags%, %comments% e %score% per visualizzare il numero di ricorrenze e il peso del documento." + +#: relevanssi.php:1564 +msgid "When to use fuzzy matching?" +msgstr "Quando usare la ricerca per parola simile?" + +#: relevanssi.php:1565 +msgid "When straight search gets no hits" +msgstr "Quando la ricerca regolare non produce risultati" + +#: relevanssi.php:1566 +msgid "Always" +msgstr "Sempre" + +#: relevanssi.php:1567 +msgid "Don't use fuzzy search" +msgstr "Non usare la ricerca per similitudini" + +#: relevanssi.php:1568 +msgid "Straight search matches just the term. Fuzzy search matches everything that begins or ends with the search term." +msgstr "La ricerca regolare cerca semplicemente un termine. La ricerca per similitudine trova anche tutti i termini che iniziano o finiscono come il termine di ricerca." + diff --git a/mu-plugins/relevanssi/relevanssi-pl_PL.po b/mu-plugins/relevanssi/relevanssi-pl_PL.po new file mode 100644 index 00000000..6a540206 --- /dev/null +++ b/mu-plugins/relevanssi/relevanssi-pl_PL.po @@ -0,0 +1,1452 @@ +msgid "" +msgstr "" +"Project-Id-Version: Relevanssi\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2012-12-12 12:11+0100\n" +"PO-Revision-Date: \n" +"Last-Translator: Bartosz Arendt \n" +"Language-Team: Digital Factory \n" +"Language: pl_PL\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Poedit-KeywordsList: __;_e\n" +"X-Poedit-Basepath: .\n" +"X-Generator: Poedit 1.5.4\n" +"X-Poedit-SourceCharset: UTF-8\n" +"X-Poedit-SearchPath-0: .\n" + +#: relevanssi.php:1233 +msgid "Options updated!" +msgstr "Ustawienia zostały zaktualizowane!" + +#: relevanssi.php:1289 +msgid "API key:" +msgstr "Klucz API:" + +#: relevanssi.php:1291 +msgid "" +"API key is required to use the automatic update feature. Get yours from " +"Relevanssi.com." +msgstr "" +"Klucz API jest wymagany aby umożliwić automatyczne aktualizacje. Zdobądź go " +"na stronie Relevanssi.com." + +#: relevanssi.php:1299 +msgid "How to index internal links:" +msgstr "Sposób indeksowania linków wewnętrznych:" + +#: relevanssi.php:1301 +msgid "No special processing for internal links" +msgstr "Bez specjalnego indeksowania linków wewnętrznych" + +#: relevanssi.php:1302 +msgid "Index internal links for target documents only" +msgstr "Indeksowanie linków wewnętrznych tylko dla dokumentów docelowych" + +#: relevanssi.php:1303 +msgid "Index internal links for both target and source" +msgstr "" +"Indeksowanie linków wewnętrznych zarówno dla źródeł jak i dokumentów " +"docelowych" + +#: relevanssi.php:1305 +msgid "" +"Internal link anchor tags can be indexed for target document (so the text " +"will match the document the link points to), both target and source or " +"source only (with no extra significance for the links). See Relevanssi " +"Knowledge Base for more details. Changing this option requires reindexing." +msgstr "" +"Linki wewnętrzne mogą być indeksowane dla dokumentów docelowych (tak aby " +"tekst pasował do dokumentu na który wskazuje), zarówno dla docelowyc jak i " +"źródeł lub tylko dla źródeł (bez dodatkowego wpływu na linki). Zobacz bazę " +"wiedzy Relevanssi aby dowiedzieć się więcej. Zmiana tego ustawienia wymaga " +"ponownego indeksowania." + +#: relevanssi.php:1313 +msgid "Hide Relevanssi on edit pages:" +msgstr "Ukryj Relevanssi na stronach edycji:" + +#: relevanssi.php:1315 +msgid "" +"If you check this option, all Relevanssi features are removed from edit " +"pages." +msgstr "" +"Jeśli zaznaczysz tę opcję, wszystkie funkcje Relevanssi zostaną usunięte z " +"ekranów edycji." + +#: relevanssi.php:1324 +msgid "Internal links" +msgstr "Linki wewnętrzne" + +#: relevanssi.php:1347 +#, php-format +msgid "Post type '%s':" +msgstr "Typ wpisu '%s':" + +#: relevanssi.php:1375 +#, php-format +msgid "Taxonomy '%s':" +msgstr "Taksonomia '%s':" + +#: relevanssi.php:1393 +msgid "Weight multiplier for new posts:" +msgstr "Mnożnik wagi dla nowych wpisów:" + +#: relevanssi.php:1395 +msgid "Assign bonus for posts newer than:" +msgstr "Przyznaj bonus dla wpisów nowszych niż:" + +#: relevanssi.php:1396 +msgid "days" +msgstr "dni" + +#: relevanssi.php:1397 +msgid "" +"Posts newer than the day cutoff specified here will have their weight " +"multiplied with the bonus above." +msgstr "" +"Wpisy nowsze niż określona tutaj liczba dni będą miały wagę pomnożoną przez " +"podaną liczbę." + +#: relevanssi.php:1403 +msgid "Don't show Relevanssi branding on the 'User Searches' screen:" +msgstr "" +"Nie wyświetlaj informacji o Relevanssi na ekranie 'Statystyk wyszukiwania':" + +#: relevanssi.php:1410 +msgid "Highlight query terms in documents from external searches:" +msgstr "Podświetl wyszukiwane frazy w dokumentach z zewnętrznych wyszukiwarek:" + +#: relevanssi.php:1412 +msgid "" +"Highlights hits when user arrives from external search. Currently supports " +"Google, Bing, Ask, Yahoo and AOL Search." +msgstr "" +"Podświetl trafienia jeśli użytkownik pochodzi z zewnętrznych wyszukiwarek. " +"Aktualnie wspierane są Google, Bing, Ask, Yahoo i AOL Search." + +#: relevanssi.php:1420 +msgid "Thousands separator" +msgstr "Separator liczb (tysięcy)" + +#: relevanssi.php:1422 +msgid "" +"If Relevanssi sees this character between numbers, it'll stick the numbers " +"together no matter how the character would otherwise be handled. Especially " +"useful if a space is used as a thousands separator." +msgstr "" +"Jeśli Relevanssi znajdzie ten znak między cyframi, zignoruje go i rozpozna " +"całą liczbę. Jest to szczególnie przydatne gdy jako separator stosowana jest " +"spacja." + +#: relevanssi.php:1438 +msgid "Custom MySQL columns to index:" +msgstr "Własne kolumny MySQL do zaindeksowania:" + +#: relevanssi.php:1440 +msgid "" +"A comma-separated list of wp_posts MySQL table columns to include in the " +"index. Following columns are available: " +msgstr "" +"Oddzielona przecinkami lista kolumn MySQL z tabeli wp_posts, które mają być " +"zaindeksowane. Dostępne są następujące kolumny:" + +#: relevanssi.php:1448 +msgid "Index and search user profiles:" +msgstr "Indeksowanie i przeszukiwanie profili użytkowników:" + +#: relevanssi.php:1450 +msgid "" +"If checked, Relevanssi will also index and search user profiles (first name, " +"last name, display name and user description). Requires changes to search " +"results template, see Relevanssi Knowledge Base." +msgstr "" +"Jeśli zostanie zaznaczone, Relevanssi będzie indeksować i przeszukiwać " +"profile użytkowników (imię, nazwisko, wyświetlana nazwa i opis użytkownika). " +"Wymaga to zmian w szablonie wyszukiwania (zobacz w bazie wiedzy Relevansii)." + +#: relevanssi.php:1454 +msgid "Index subscriber profiles:" +msgstr "Indeksowanie profili subskrybentów:" + +#: relevanssi.php:1456 +msgid "" +"If checked, Relevanssi will index subscriber profiles as well, otherwise " +"only authors, editors, contributors and admins are indexed." +msgstr "" +"Jeśli zostanie zaznaczone, Relevanssi będzie indeksować także profile " +"subskrybentów. W przeciwnym wypadku indeksowane będą tylko profile autorów, " +"redaktorów, współpracowników i administratorów." + +#: relevanssi.php:1460 +msgid "Extra user fields to index:" +msgstr "Dodatkowe pola użytkowników do zaindeksowania:" + +#: relevanssi.php:1462 +msgid "" +"A comma-separated list of user profile field names (names of the database " +"columns) to include in the index." +msgstr "" +"Oddzielona przecinkami lista nazw pól w profilach użytkownika (nazw kolumn w " +"bazie danych), które mają być zaindeksowane." + +#: relevanssi.php:1470 +msgid "Index and search taxonomy pages:" +msgstr "Indeksowanie i przeszukiwanie stron taksonomii:" + +#: relevanssi.php:1472 +msgid "" +"If checked, Relevanssi will also index and search taxonomy pages " +"(categories, tags, custom taxonomies)." +msgstr "" +"Jeśli zostanie zaznaczone, Relevanssi będzie indeksować i przeszukiwać także " +"strony taksonomii (kategorii, tagów, własnych taksonomii)." + +#: relevanssi.php:1476 +msgid "Taxonomy pages to index:" +msgstr "Strony taksonomi do zaindeksowania:" + +#: relevanssi.php:1478 +msgid "" +"A comma-separated list of taxonomies to include in the taxonomy page index " +"('all' indexes all custom taxonomies. If you don't use 'all', remember to " +"list 'category' and 'post_tag')." +msgstr "" +"Oddzielona przecinkami lista taksonomii, które mają być ujęte w indeksie " +"stron taksonomii (wpisanie 'all' spowoduje zaindeksowanie wszystkich " +"taksonomii. Jeśli nie użyjesz 'all' dodaj przynajmniej 'category' i " +"'post_tag')." + +#: relevanssi.php:1486 +msgid "Import or export options" +msgstr "Importowanie i eksportowanie ustawień" + +#: relevanssi.php:1488 +msgid "" +"Here you find the current Relevanssi Premium options in a text format. Copy " +"the contents of the text field to make a backup of your settings. You can " +"also paste new settings here to change all settings at the same time. This " +"is useful if you have default settings you want to use on every system." +msgstr "" +"Możesz tu znaleźć ustawienia Relevanssi Premium w formie tekstowej. Skopiuj " +"zawartość tego pola aby utworzyć kopię zapasową ustawień. Możesz także " +"wkleić tutaj nowe ustawienia aby je w prosty sposób zmienić. Jest to " +"przydatne jeśli masz domyślne ustawienia, któe stosujesz na wielu stronach." + +#: relevanssi.php:1492 +msgid "Import settings" +msgstr "Importuj ustawienia" + +#: relevanssi.php:1494 +msgid "" +"Note! Make sure you've got correct settings from a right version of " +"Relevanssi. Settings from a different version of Relevanssi may or may not " +"work and may or may not mess your settings." +msgstr "" +"Uwaga! Upewnij się że używasz ustawień odpowiednich dla konkretnej wersji " +"Relevansii. Ustawienia z wersji innej niż stosowana mogą nie działać i " +"powodować problemy." + +#: relevanssi.php:1513 +msgid "Thank you!" +msgstr "Dziękujemy!" + +#: relevanssi.php:1514 +msgid "" +"Thank you for buying Relevanssi Premium! Your support makes it possible for " +"me to keep working on this plugin." +msgstr "" +"Dziękujemy za wybranie Relevanssi Premium. Twoje wsparcie umożliwia dalsze " +"prace nad tą wtyczką." + +#: relevanssi.php:1515 +msgid "" +"I can do custom hacks based on Relevanssi and other WordPress development. " +"If you need someone to fix your WordPress, just ask me for a quote." +msgstr "" +"Mogę przygotować dowolną modyfikację opartą o Relevanssi i WordPress. Jeśli " +"szukasz kogoś, kto popracowałby nad Twoją stroną, wyślij zapytanie." + +#: relevanssi.php:1517 +msgid "Relevanssi on Facebook" +msgstr "Relevanssi na Facebooku" + +#: relevanssi.php:1518 +msgid "Check out the Relevanssi page on Facebook" +msgstr "Sprawdź stronę Relevanssi na Facebooku" + +#: relevanssi.php:1519 +msgid "for news and updates about your favourite plugin." +msgstr "" +"aby być na bierząco informowanym o aktualnościach i innych wydarzeniach " +"związanych z Twoją ulubioną wtyczką." + +#: relevanssi.php:1521 +msgid "Help and support" +msgstr "Pomoc" + +#: relevanssi.php:1522 +msgid "For Relevanssi support, see:" +msgstr "Aby uzyskać pomoc, zobacz:" + +#: relevanssi.php:1523 +msgid "Plugin support page" +msgstr "Strona pomocy" + +#: relevanssi.php:1524 +msgid "WordPress.org forum" +msgstr "Forum na Wordpress.com" + +#: relevanssi.php:1526 +msgid "Did you know this feature?" +msgstr "Czy znałeś tę funkcję?" + +#: relevanssi.php:1527 +msgid "" +"Wrap the parts of the posts you don't want to include in the index in " +"[noindex] shortcode." +msgstr "" +"Zaznacz fragmenty treści, których nie chcesz zaindeksować w skrót [noindex]." + +#: relevanssi.php:1528 +msgid "Use the [search] shortcode to build easy links to search results." +msgstr "" +"Użyj skrótu [search] aby w prosty sposób utworzyć linki do wyników " +"wyszukiwania." + +#: relevanssi.php:1529 +msgid "" +"Enable the English-language stemmer by adding this line in your functions." +"php:" +msgstr "" +"Włącz odmiany zwrotów w języku angielskim dodają tę linię kodu do pliku " +"functions.php:" + +#: relevanssi.php:1530 +msgid "Boolean NOT" +msgstr "Warunek boolean NOT" + +#: relevanssi.php:1531 +msgid "To get results without particular word, use the minus operator" +msgstr "Aby uzyskać wyniki bez określnoego zwrotu użyj operatora minus (-)" + +#: relevanssi.php:1532 +msgid "cats -dogs" +msgstr "koty-psy" + +#: relevanssi.php:1533 +msgid "Boolean AND" +msgstr "Warunek boolean AND" + +#: relevanssi.php:1534 +msgid "To force a particular term in an OR search, use the plus operator" +msgstr "" +"Aby wymusić określony termin w wyszukiwaniu w trybie OR, użyj operatora plus " +"(+)" + +#: relevanssi.php:1535 +msgid "+cats dogs mice" +msgstr "+koty psy myszy" + +#: relevanssi.php:1536 +msgid "" +"would require that all results include the term 'cats', and results " +"including all three terms will be favoured. The plus operator has no effect " +"in an AND search, where all terms have an implicit + before them." +msgstr "" +"będzie wymagać aby wszystkie wyniki zawierały zwrot 'cats' a wyniki " +"zawierające każdy z tych trzech zwrotów będą faworyzowane. Operator plus nie " +"ma żadnego działania w wyszukiwaniu w trybie OR, ponieważ wówczas wszystkie " +"zwroty mają taki operator." + +#: relevanssi.php:1620 +msgid "Relevanssi post controls" +msgstr "Ustawienia wyszukiwania" + +#: relevanssi.php:1639 +msgid "Exclude this post or page from the index." +msgstr "Wyklucz ten wpis lub stronę z indeksowania i wyszukiwania" + +#: lib/excerpts-highlights.php:11 +msgid "There is no excerpt because this is a protected post." +msgstr "Wypis nie istnieje, ponieważ ten wpis jest strzeżony hasłem." + +#: lib/indexing.php:83 +msgid "Indexing complete!" +msgstr "Indeksowanie zostało zakończone!" + +#: lib/init.php:41 +#, php-format +msgid "" +"Relevanssi needs attention: Remember to build the index (you can do it at the\n" +"\t\t\t settings page), otherwise searching won't work." +msgstr "" +"Relevanssi wymaga Twojej uwagi: Pamiętaj o przebudowaniu indeksu (możesz " +"zrobić to na stronie\n" +"\t\t\t ustawień), ponieważ w przeciwnym wypadku wyszukiwanie nie " +"będzie działać." + +#: lib/init.php:85 lib/init.php:86 +msgid "User searches" +msgstr "Wyszukiwania" + +#: lib/interface.php:6 +msgid "Relevanssi Premium Search Options" +msgstr "Ustawienia wyszukiwania" + +#: lib/interface.php:9 +msgid "Relevanssi Search Options" +msgstr "Ustawienia wyszukiwania" + +#: lib/interface.php:86 +msgid "User Searches" +msgstr "Statystyki wyszukiwania" + +#: lib/interface.php:88 +msgid "Relevanssi User Searches" +msgstr "Statystyki wyszukiwania" + +#: lib/interface.php:333 +#, php-format +msgid "" +"

Successfully added %d/%d terms to " +"stopwords!

" +msgstr "" +"

Zwroty %d/%d zostały dodane do " +"liczby słów pomijanych!

" + +#: lib/interface.php:340 +#, php-format +msgid "" +"

Term '%s' added to stopwords!

" +msgstr "" +"

Zwrot '%s' został dodany do liczby " +"słów pomijanych!

" + +#: lib/interface.php:343 +#, php-format +msgid "" +"

Couldn't add term '%s' to " +"stopwords!

" +msgstr "" +"

Nie udało się dodać zwrotu '%s' do " +"listy słów pomijanych!

" + +#: lib/interface.php:372 +msgid "" +"

Stopwords removed! Remember to re-" +"index.

" +msgstr "" +"

Słowa pomijane zostały usunięte! " +"Pamiętaj o przebudowaniu indeku.

" + +#: lib/interface.php:382 +#, php-format +msgid "" +"

Term '%s' removed from stopwords! " +"Re-index to get it back to index.

" +msgstr "" +"

Zwrot '%s' został usunięty z listy " +"słów pomijanych! Przebuduj indeks aby dodać je do indeksu.

" + +#: lib/interface.php:385 +#, php-format +msgid "" +"

Couldn't remove term '%s' from " +"stopwords!

" +msgstr "" +"

Nie udało się usunąć zwrotu '%s' z " +"listy słów pomijanych!

" + +#: lib/interface.php:396 +msgid "25 most common words in the index" +msgstr "25 najczęściej występujących słów w indeksie" + +#: lib/interface.php:398 +msgid "" +"These words are excellent stopword material. A word that appears in most of " +"the posts in the database is quite pointless when searching. This is also an " +"easy way to create a completely new stopword list, if one isn't available in " +"your language. Click the icon after the word to add the word to the stopword " +"list. The word will also be removed from the index, so rebuilding the index " +"is not necessary." +msgstr "" +"Te zwroty są doskonałym materiałem na słowa do pominięcia. Słowa, które w " +"bazie danych występują najczęściej są mało przydatne w wyszukiwaniu. Możesz " +"więc potraktować tę listę jako propozycję nowej listy słów do pominięcia w " +"Twoim języku. Kliknij ikonę znajdującą się za danym słowem aby dodać dany " +"zwrot do listy słów pominięcia. Taki zwrot zostanie usunięty z indeksu, więc " +"musisz go przebudować." + +#: lib/interface.php:424 +msgid "Add to stopwords" +msgstr "Dodaj do słów do pominięcia" + +#: lib/interface.php:435 +msgid "Total Searches" +msgstr "Podsumowanie wyszukiwania" + +#: lib/interface.php:438 +msgid "Totals" +msgstr "Ogółem" + +#: lib/interface.php:443 +msgid "Common Queries" +msgstr "Najczęściej wyszukiwane frazy" + +#: lib/interface.php:445 +msgid "" +"Here you can see the 20 most common user search queries, how many times " +"those \n" +"\t\tqueries were made and how many results were found for those queries." +msgstr "" +"Możesz tutaj sprawdzić listę 20 najczęściej wyszukiwanych fraz, jak wiele " +"razy \n" +"\t\tdana fraza była wyszukiwana oraz ile wyników dla danej frazy znaleziono ." + +#: lib/interface.php:451 lib/interface.php:467 lib/interface.php:499 +msgid "Today and yesterday" +msgstr "Dziś i wczoraj" + +#: lib/interface.php:455 lib/interface.php:471 lib/interface.php:500 +msgid "Last 7 days" +msgstr "W ciągu ostatnich 7 dni" + +#: lib/interface.php:459 lib/interface.php:475 lib/interface.php:501 +msgid "Last 30 days" +msgstr "W ciągu ostatnich 30 dni" + +#: lib/interface.php:464 +msgid "Unsuccessful Queries" +msgstr "Zapytania bez wyników" + +#: lib/interface.php:482 +msgid "Reset Logs" +msgstr "Resetuj dziennik" + +#: lib/interface.php:485 +#, php-format +msgid "To reset the logs, type \"reset\" into the box here %s and click %s" +msgstr "" +"Aby zresetować dziennik wpisz słowo \"reset\" w to pole %s i kliknij %s" + +#: lib/interface.php:502 +msgid "Forever" +msgstr "Zawsze" + +#: lib/interface.php:504 +msgid "When" +msgstr "Okres" + +#: lib/interface.php:504 +msgid "Searches" +msgstr "Wyszukiwania" + +#: lib/interface.php:534 +msgid "Query" +msgstr "Fraza" + +#: lib/interface.php:534 +msgid "Hits" +msgstr "Trafienia" + +#: lib/interface.php:842 lib/interface.php:887 +msgid "Basic options" +msgstr "Ustawienia podstawowe" + +#: lib/interface.php:843 lib/interface.php:953 +msgid "Weights" +msgstr "Ważenie" + +#: lib/interface.php:844 lib/interface.php:1008 +msgid "Logs" +msgstr "Dziennik" + +#: lib/interface.php:845 lib/interface.php:1037 +msgid "Exclusions and restrictions" +msgstr "Wykluczanie i ograniczenia" + +#: lib/interface.php:846 +msgid "Custom excerpts" +msgstr "Własne wypisy" + +#: lib/interface.php:847 +msgid "Highlighting search results" +msgstr "Podświetlanie wyników wyszukiwania" + +#: lib/interface.php:848 lib/interface.php:1183 +msgid "Indexing options" +msgstr "Ustawienia indeksowania" + +#: lib/interface.php:849 lib/interface.php:1301 +msgid "Caching" +msgstr "Cachowanie" + +#: lib/interface.php:850 lib/interface.php:1324 +msgid "Synonyms" +msgstr "Synonimy" + +#: lib/interface.php:851 lib/interface.php:1332 +msgid "Stopwords" +msgstr "Słowa pomijane" + +#: lib/interface.php:854 +msgid "Import/export options" +msgstr "Importowanie i eksportowanie ustawień" + +#: lib/interface.php:857 +msgid "Buy Relevanssi Premium" +msgstr "Kup Relevanssi Premium" + +#: lib/interface.php:862 +msgid "Quick tools" +msgstr "Szybkie narzędzia" + +#: lib/interface.php:864 +msgid "Save options" +msgstr "Zapisz ustawienia" + +#: lib/interface.php:865 +msgid "Build the index" +msgstr "Zbuduj indeks" + +#: lib/interface.php:866 lib/interface.php:1299 +msgid "Continue indexing" +msgstr "Kontynuuj indeksowanie" + +#: lib/interface.php:866 +msgid "add" +msgstr "dodaj" + +#: lib/interface.php:866 +msgid "documents." +msgstr "dokumentów." + +#: lib/interface.php:870 +msgid "" +"WARNING: You've chosen no post types to index. Nothing will be indexed. Choose some post types to index." +msgstr "" +"UWAGA: Jeśli nie wybrałeś do zaindeksowania żadnych typów wpisów, nic nie " +"zostanie zaindeksowane. Wybierz typy wpisów." + +#: lib/interface.php:874 +msgid "" +"Use 'Build the index' to build the index with current indexing options. If you can't finish indexing with one " +"go, use 'Continue indexing' to finish the job. You can change the number of " +"documents to add until you find the largest amount you can add with one go. " +"See 'State of the Index' below to find out how many documents actually go " +"into the index." +msgstr "" +"Użyj 'Buduj indeks' aby zbudować indeks z wykorzystaniem aktualnych ustawień indeksowania." + +#: lib/interface.php:876 +msgid "" +"If Relevanssi doesn't index anything and you have upgraded from a 2.x " +"version, it's likely the changes in\n" +"\tthe database structure haven't gone through in the upgrade. In that case " +"all you need to do is to deactivate the\n" +"\tplugin and then activate it again." +msgstr "" +"Jeśli Relevanssi niczego nie zaindeksuje a robiłeś aktualizację z wersji 2." +"x, prawdopodobnie zmiany\n" +"\tstruktury bazy danych nie zostały wykonane. W takim wypadku należy " +"deaktywować\n" +"\twtyczkę i aktywować ją ponownie." + +#: lib/interface.php:880 +msgid "State of the Index" +msgstr "Stan indeksu" + +#: lib/interface.php:882 +msgid "Documents in the index" +msgstr "Dokumenty w indeksie" + +#: lib/interface.php:883 +msgid "Terms in the index" +msgstr "Zwroty w indeksie" + +#: lib/interface.php:884 +msgid "Highest post ID indexed" +msgstr "Zaindeksowany wpis o najwyższym ID" + +#: lib/interface.php:893 +msgid "Use search for admin:" +msgstr "Wyszukiwanie w panelu administracyjnym:" + +#: lib/interface.php:895 +msgid "If checked, Relevanssi will be used for searches in the admin interface" +msgstr "" +"Jeśli zaznaczysz tę opcję, Relevanssi zostanie zastosowane do wyszukiwania w " +"panelu administracyjnym" + +#: lib/interface.php:899 +msgid "Default operator for the search?" +msgstr "Domyślny operator wyszukiwania?" + +#: lib/interface.php:901 +msgid "AND - require all terms" +msgstr "AND - szukaj wszystkich fraz" + +#: lib/interface.php:902 +msgid "OR - any term present is enough" +msgstr "OR - szukaj którejkolwiek z fraz" + +#: lib/interface.php:904 +msgid "" +"If you choose AND and the search finds no matches, it will automatically do " +"an OR search." +msgstr "" +"Jeśli wybierzez AND a wyszukiwanie nie przyniesie rezultatu, automatycznie " +"przejdzie w tryb wyszukiwania OR." + +#: lib/interface.php:908 +msgid "Disable OR fallback:" +msgstr "Przejście w tryb OR:" + +#: lib/interface.php:910 +msgid "" +"If you don't want Relevanssi to fall back to OR search when AND search gets " +"no hits, check this option. For most cases, leave this one unchecked." +msgstr "" +"Jeśli nie chcesz aby Relevanssi przechodziło w tryb OR w sytuacji gdy " +"wyszukiwanuie w trybie AND nie przyniesie rezultatu, zaznacz tę opcję. W " +"większości wypadków zaznaczanie tej opcji nie jest rekomendowane." + +#: lib/interface.php:914 +msgid "Default order for results:" +msgstr "Domyślne sortowanie wyników:" + +#: lib/interface.php:916 +msgid "Relevance (highly recommended)" +msgstr "Wg trafności (mocno rekomendowane)" + +#: lib/interface.php:917 +msgid "Post date" +msgstr "Wg daty wpisu" + +#: lib/interface.php:919 +msgid "" +"If you want date-based results, see the recent post bonus in the Weights " +"section." +msgstr "" +"Jeśli chcesz aby wyniki wyszukiwania opierały się na dacie dodania wpisu, " +"sprawdź mnożnik wagi dla nowych wpisów." + +#: lib/interface.php:923 +msgid "When to use fuzzy matching?" +msgstr "Kiedy stosować przybliżone porównywanie fraz?" + +#: lib/interface.php:925 +msgid "When straight search gets no hits" +msgstr "Kiedy brak wyników wyszukiwania" + +#: lib/interface.php:926 +msgid "Always" +msgstr "Zawsze" + +#: lib/interface.php:927 +msgid "Don't use fuzzy search" +msgstr "Nie używaj przybliżonego porównywania" + +#: lib/interface.php:929 +msgid "" +"Straight search matches just the term. Fuzzy search matches everything that " +"begins or ends with the search term." +msgstr "" +"Normalne wyszukiwanie po prostu porównuje zwroty. Porównywanie przybliżone " +"sprawdza wszystkie zwroty, które zaczynają się lub kończą wyszukiwaną frazą." + +#: lib/interface.php:937 +msgid "Limit searches:" +msgstr "Limit wyników wyszukiwania:" + +#: lib/interface.php:939 +msgid "" +"If this option is checked, Relevanssi will limit search results to at most " +"500 results per term. This will improve performance, but may cause some " +"relevant documents to go unfound. However, Relevanssi tries to prioritize " +"the most relevant documents. This does not work well when sorting " +"results by date. The throttle can end up cutting off recent posts " +"to favour more relevant posts." +msgstr "" +"Jeśli zostanie zaznaczone, Relevanssi ograniczy listę wyników wyszukiwania " +"do maksymalnie 500. Pozwala to na poprawienie wydajności wyszukiwania, " +"natomiast może spowodować, że niektóre trafienia nie zostaną wyświetlone. Z " +"drugiej strony Relevanssi udostępnia narzędzia do określania priorytetów " +"wyszukiwania, dzięki którym najbardziej trafne wyniki zostaną wyświetlone w " +"pierwszej kolejności. Niestety, nie działa to dobrze, jeżeli " +"wybierzesz sortowanie wg daty wpisu. Wówczas najnowsze wpisy mogą " +"zostać pominięte w wynikach wyszukiwania na rzecz tych, najbardziej trafnych." + +#: lib/interface.php:943 +msgid "Limit:" +msgstr "Limit:" + +#: lib/interface.php:945 +msgid "" +"For better performance, adjust the limit to a smaller number. Adjusting the " +"limit to 100 - or even lower - should be safe for good results, and might " +"bring a boost in search speed." +msgstr "" +"Aby uzyskać lepszą wydajność wyszukiwania zmień limit na mniejszy. " +"Ustawienie na 100 - lub nawet mniej - powinno być bezpieczne w kontekście " +"uzyskiwanych wyników a przyniesie znaczną poprawę szybkości wyszukiwania." + +#: lib/interface.php:955 +msgid "" +"These values affect the weights of the documents. These are all multipliers, " +"so 1 means no change in weight, less than 1 means less weight, and more than " +"1 means more weight. Setting something to zero makes that worthless. For " +"example, if title weight is more than 1, words in titles are more " +"significant than words elsewhere. If title weight is 0, words in titles " +"won't make any difference to the search results." +msgstr "" +"Poniższe wartości mają wpływ na sposób ważenia dokumentów. Te liczby " +"oznaczają wielokrotność, a więc 1 oznacza brak zmiany w wadze, mniej niż 1 " +"oznacza zmniejszenie wagi a więcej niż 1 jej zwiększenie. Ustawienie " +"wartości zbliżonej do zera powoduje że dane kryterium praktycznie przestaje " +"być brane pod uwagę. Na przykład, jeśli waga tytułu jest większa niż 1 " +"słowa zawarte w tytułach mają większe znaczenie niż te same słowa znajdujące " +"się w innych miejscach. Jeśli waga tytułu byłaby ustawiona na 0, słowa " +"zawarte w tytułach nie miałyby żadnego wpływu na wyniki wyszukiwania." + +#: lib/interface.php:960 +msgid "Element" +msgstr "Element" + +#: lib/interface.php:961 +msgid "Weight" +msgstr "Waga" + +#: lib/interface.php:962 +msgid "Default weight" +msgstr "Waga domyślna" + +#: lib/interface.php:967 +msgid "Post titles" +msgstr "Tutuły wpisów" + +#: lib/interface.php:979 +msgid "Comment text" +msgstr "Treść komentarza" + +#: lib/interface.php:1000 +msgid "WPML compatibility" +msgstr "Kompatybilność z WPML" + +#: lib/interface.php:1002 +msgid "Limit results to current language:" +msgstr "Ogranicz wyniki wyszukiwania do aktualnego języka:" + +#: lib/interface.php:1004 +msgid "" +"If this option is checked, Relevanssi will only return results in the " +"current active language. Otherwise results will include posts in every " +"language." +msgstr "" +"Jeśli ta opcja zostanie zaznaczona, Relevanssi zwróci tylko wyniki dla " +"aktualnego jezyka. W przeciwnym wypadku wyniki wyszukiwania będą zawierać w " +"wpisy w każdym języku." + +#: lib/interface.php:1010 +msgid "Keep a log of user queries:" +msgstr "Zapisywanie wyszukiwanych fraz:" + +#: lib/interface.php:1012 +msgid "" +"If checked, Relevanssi will log user queries. The log appears in 'User " +"searches' on the Dashboard admin menu." +msgstr "" +"Jeśli zostanie zaznaczone, Relevanssi będzie zapisywać frazy wyszukiwane " +"przez użytkowników. Dziennik wyszukiwanych będzie dostępny w zakładce " +"'Wyszukiwania' w Kokpicie panelu administracyjnego." + +#: lib/interface.php:1016 +msgid "Log the user's IP with the queries:" +msgstr "Zapisuj IP użytkowników" + +#: lib/interface.php:1018 +msgid "If checked, Relevanssi will log user's IP-Adress with the queries." +msgstr "" +"Jeśli zaznaczysz tę opcję, Relevanssi będzie zapisywać adresy IP " +"użytkowników wraz z zapytaniami." + +#: lib/interface.php:1022 +msgid "Don't log queries from these users:" +msgstr "Nie zapisuj fraz wyszukiwanych przez:" + +#: lib/interface.php:1024 +msgid "" +"Comma-separated list of numeric user IDs or user login names that will not " +"be logged." +msgstr "" +"Oddzielona przecinkami lista ID użytkowników lub nazw użytkowników, których " +"wyszukiwania nie będą zapisywane." + +#: lib/interface.php:1028 +msgid "" +"If you enable logs, you can see what your users are searching for. You can " +"prevent your own searches from getting in the logs with the omit feature." +msgstr "" +"Jeśli włączysz zapisywanie, możesz sprawdzić czego szukają Twoi użytkownicy. " +"Możesz także wykluczyć wyszukiwania, których sam dokonujesz na stronie." + +#: lib/interface.php:1031 +msgid "" +"If you enable logs, you can see what your users are searching for. Logs are " +"also needed to use the 'Did you mean?' feature. You can prevent your own " +"searches from getting in the logs with the omit feature." +msgstr "" +"Jeśli włączysz zapisywanie, możesz sprawdzić czego szukają Twoi użytkownicy. " +"Zapisywanie wyszukiwanych fraz jest także niezbędne, aby móc skorzystać z " +"funkcji 'Czy miałeś na myśli?'. Możesz także wykluczyć wyszukiwania, których " +"sam dokonujesz na stronie." + +#: lib/interface.php:1039 +msgid "Restrict search to these categories and tags:" +msgstr "Ogranicz wyszukiwanie do następujących kategorii i tagów:" + +#: lib/interface.php:1041 +msgid "" +"Enter a comma-separated list of category and tag IDs to restrict search to " +"those categories or tags. You can also use <input type='hidden' " +"name='cats' value='list of cats and tags' /> in your search form. " +"The input field will \toverrun this setting." +msgstr "" +"Wpisz oddzieloną przecinkami listę ID kategorii i tagów do których chcesz " +"ograniczyć wyszukiwanie. Możesz także użyć kodu <input " +"type='hidden' name='cats' value='list of cats and tags' /> w " +"formularzu wyszukiwania. Pole wyszukiwarki nadpisze te przykładowe " +"ustawienia." + +#: lib/interface.php:1045 +msgid "Exclude these categories and tags from search:" +msgstr "Wyklucz następujące kategorie i tagi z wyszukiwania:" + +#: lib/interface.php:1047 +msgid "" +"Enter a comma-separated list of category and tag IDs that are excluded from " +"search results. You can exclude categories with the 'cat' input field by " +"using negative values." +msgstr "" +"Wpisz oddzieloną przecinkami listę ID kategorii i tagów, które chcesz " +"wykluczyć z wyników wyszukiwania. Możesz także wykluczyć kategorie dodając w " +"formularzy wyszukiwania pole 'cat' i ujemne wartości ID." + +#: lib/interface.php:1051 +msgid "Exclude these posts/pages from search:" +msgstr "Wyklucz następujące wpisy/strony z wyszukiwania:" + +#: lib/interface.php:1055 +msgid "" +"Enter a comma-separated list of post/page IDs that are excluded from search " +"results. This only works here, you can't use the input field option " +"(WordPress doesn't pass custom parameters there). You can also use a " +"checkbox on post/page edit pages to remove posts from index." +msgstr "" +"Wpisz oddzieloną przecinkami listę ID wpisów/stron, któe chcesz wykluczyć z " +"wyników wyszukiwania. Działa to wyłącznie w tym miejscu, nie dodając " +"dodatkowego pola do formularza wyszukiwania (WordPress nie umożliwia " +"przesyłania w nim własnych parametrów). Aby wykluczyć poszczególne wpisy z " +"indeksowania możesz także użyć zaznaczania poszczególnych wpisów/stron w " +"bloku Ustawienia wyszukiwania dodanego przez Relevanssi do stron edycji." + +#: lib/interface.php:1058 +msgid "" +"Enter a comma-separated list of post/page IDs that are excluded from search " +"results. This only works here, you can't use the input field option " +"(WordPress doesn't pass custom parameters there)." +msgstr "" +"Wpisz oddzieloną przecinkami listę ID wpisów/stron, któe chcesz wykluczyć z " +"wyników wyszukiwania. Działa to wyłącznie w tym miejscu, nie dodając " +"dodatkowego pola do formularza wyszukiwania (WordPress nie umożliwia " +"przesyłania w nim własnych parametrów)." + +#: lib/interface.php:1064 +msgid "Respect exclude_from_search for custom post types:" +msgstr "Uwzględniaj ustawienia exclude_from_search dla własnych typów wpisów:" + +#: lib/interface.php:1066 +msgid "" +"If checked, Relevanssi won't display posts of custom post types that have " +"'exclude_from_search' set to true. If not checked, Relevanssi will display " +"anything that is indexed." +msgstr "" +"Jeśli zostanie zaznaczone, Relevanssi nie będzie wyświetlać własnych typów " +"wpisów dla których określono parametr 'exclude_from_search'. Jeśli nie " +"będzie zaznaczone, Relevanssi będzie wyświetlać wszystko co zostało " +"zaindeksowane." + +#: lib/interface.php:1068 +msgid "Custom excerpts/snippets" +msgstr "Własne wypisy" + +#: lib/interface.php:1070 +msgid "Create custom search result snippets:" +msgstr "Utwórz własne wypisy w kodzie wyników wyszukiwania:" + +#: lib/interface.php:1072 +msgid "" +"If checked, Relevanssi will create excerpts that contain the search term " +"hits. To make them work, make sure your search result template uses " +"the_excerpt() to display post excerpts." +msgstr "" +"Jeśli zostanie zaznaczone, Relevanssi utworzy własne wypisy, zawierające " +"znalezione frazy. Aby ta funkcja działała prawidłowo upewnij się, że Twój " +"szablon wyników wyszukiwania do wyświetlania wypisów używa funkcji " +"the_excerpt()." + +#: lib/interface.php:1074 +msgid "" +"Note: Building custom excerpts can be slow. If you are not actually using " +"the excerpts, make sure you disable the option." +msgstr "" +"Uwaga: Tworzenie własnych wypisów może być spowolnić stronę. Jeśli nie " +"używasz wypisów, upewnij się że wyłączyłeś tę opcję." + +#: lib/interface.php:1076 +msgid "Length of the snippet:" +msgstr "Długość wypisu:" + +#: lib/interface.php:1079 +msgid "characters" +msgstr "liter" + +#: lib/interface.php:1080 +msgid "words" +msgstr "słów" + +#: lib/interface.php:1082 +msgid "This must be an integer." +msgstr "Musi to być liczba dodatnia." + +#: lib/interface.php:1086 +msgid "Allowable tags in excerpts:" +msgstr "Znaczniki dostępne w wypisach:" + +#: lib/interface.php:1089 +msgid "" +"List all tags you want to allow in excerpts, without any whitespace. For " +"example: '<p><a><strong>'." +msgstr "" +"Wpisz listę znaczników, na które chcesz pozwolić w wypisach. Nie używaj " +"spacji, np. '<p><a><strong>'." + +#: lib/interface.php:1093 +msgid "Show breakdown of search hits in excerpts:" +msgstr "Wyświetl dodatkowe informacje w wypisie:" + +#: lib/interface.php:1095 +msgid "" +"Check this to show more information on where the search hits were made. " +"Requires custom snippets to work." +msgstr "" +"Zaznacz tę funkcję, jeśli chcesz pokazać więcej informacji na temat tego, w " +"którym miejscu znajdowała się wyszukiwana fraza. Wymaga włączenia własnych " +"wypisów." + +#: lib/interface.php:1099 +msgid "The breakdown format:" +msgstr "Format dodatkowych informacji:" + +#: lib/interface.php:1101 +msgid "" +"Use %body%, %title%, %tags% and %comments% to display the number of hits (in " +"different parts of the post), %total% for total hits, %score% to display the " +"document weight and %terms% to show how many hits each search term got. No " +"double quotes (\") allowed!" +msgstr "" +"Możesz użyć znaczników %body%, %title%, %tags% i %comments% aby wyświetlić " +"liczbę trafień (w określonych częściach wpisu), %total% dla ogólnej liczby " +"trafień, %score% aby wyświetlić wagę danego dokumentu lub %terms% aby " +"pokazać ilość trafień dla danej frazy. Podwójne myślniki (\") są zabronione!" + +#: lib/interface.php:1103 +msgid "Search hit highlighting" +msgstr "Podświetlanie trafień" + +#: lib/interface.php:1105 +msgid "First, choose the type of highlighting used:" +msgstr "Najpierw wybierz rodzaj stosowanego podświetlenia:" + +#: lib/interface.php:1108 +msgid "Highlight query terms in search results:" +msgstr "Podświetl każdą frazę w wynikach wyszukiwania:" + +#: lib/interface.php:1110 +msgid "No highlighting" +msgstr "Bez podświetlania" + +#: lib/interface.php:1114 +msgid "Text color" +msgstr "Kolor tekstu" + +#: lib/interface.php:1115 +msgid "Background color" +msgstr "Kolor tła" + +#: lib/interface.php:1116 +msgid "CSS Style" +msgstr "Styl CSS" + +#: lib/interface.php:1117 +msgid "CSS Class" +msgstr "Klasa CSS" + +#: lib/interface.php:1119 +msgid "Highlighting isn't available unless you use custom snippets" +msgstr "" +"Podświetlanie nie zawsze jest dostępne, jeśli nie używasz własnych wypisów" + +#: lib/interface.php:1123 +msgid "Highlight query terms in result titles too:" +msgstr "Podświetl wyszukiwane frazy także w tytułach:" + +#: lib/interface.php:1129 +msgid "Highlight query terms in documents from local searches:" +msgstr "Podświetl wyszukiwane frazy w dokumentach z lokalnych wyszukiwań:" + +#: lib/interface.php:1131 +msgid "" +"Highlights hits when user opens the post from search results. This is based " +"on HTTP referrer, so if that's blocked, there'll be no highlights." +msgstr "" +"Podświetla trafienia jeśli użytkownik otworzył dany wpis na stronie wyników " +"wyszukiwania. Funkcja ta bazuje na odnośnikach HTTP, więc jeśli są one " +"zablokowane, podświetlenie nie będzie działać." + +#: lib/interface.php:1137 +msgid "Highlight query terms in comments:" +msgstr "Podświetl wyszukiwane frazy w komentarzach:" + +#: lib/interface.php:1139 +msgid "" +"Highlights hits in comments when user opens the post from search results." +msgstr "" +"Podświetla trafienia w komentarzach jeśli użytkownik otworzył dany wpis ze " +"strony wyników wyszukiwania." + +#: lib/interface.php:1143 +msgid "Uncheck this if you use non-ASCII characters:" +msgstr "Odznacz tę opcję, jeśli używasz znaków spoza ASCII:" + +#: lib/interface.php:1145 +msgid "" +"If you use non-ASCII characters (like Cyrillic alphabet) and the highlights " +"don't work, uncheck this option to make highlights work." +msgstr "" +"Jeśli używasz znaków spoza ASCII (np. cyrylicy) a podświetlanie nie działa " +"poprawnie, odznacz tę opcję i wszystko powinno działać." + +#: lib/interface.php:1150 +msgid "Then adjust the settings for your chosen type:" +msgstr "Następnie dopasuj ustawienia w zależności od wybranego typu:" + +#: lib/interface.php:1154 +msgid "Text color for highlights:" +msgstr "Kolor tekstu w podświetleniu:" + +#: lib/interface.php:1156 lib/interface.php:1162 +msgid "Use HTML color codes (#rgb or #rrggbb)" +msgstr "Użyj kodów koloru jak w HTML (#rgb lub #rrggbb)" + +#: lib/interface.php:1160 +msgid "Background color for highlights:" +msgstr "Kolor tła w podświetleniu:" + +#: lib/interface.php:1166 +msgid "CSS style for highlights:" +msgstr "Styl CSS w podświetleniu:" + +#: lib/interface.php:1168 +msgid "" +"You can use any CSS styling here, style will be inserted with a <span>" +msgstr "" +"Możesz użyć dowolnego ostylowania CSS (będzie dodane wraz z <span>)" + +#: lib/interface.php:1172 +msgid "CSS class for highlights:" +msgstr "Klasa CSS w podświetleniu:" + +#: lib/interface.php:1174 +msgid "" +"Name a class here, search results will be wrapped in a <span> with the " +"class" +msgstr "" +"Jeśli podasz nazwę klasy, zostanie dodana do wyników wyszukiwania wraz z <" +"span>" + +#: lib/interface.php:1181 lib/interface.php:1330 +msgid "Save the options" +msgstr "Zapisz ustawienia" + +#: lib/interface.php:1185 +msgid "Choose post types to index:" +msgstr "Wybierz typy wpisów do zaindeksowania:" + +#: lib/interface.php:1190 +msgid "Type" +msgstr "Typ wpisu" + +#: lib/interface.php:1191 +msgid "Index" +msgstr "Indeksowany" + +#: lib/interface.php:1192 +msgid "Public?" +msgstr "Dostępny publicznie?" + +#: lib/interface.php:1209 +#, php-format +msgid "%s" +msgstr "%s" + +#: lib/interface.php:1210 +msgid "yes" +msgstr "tak" + +#: lib/interface.php:1210 +msgid "no" +msgstr "nie" + +#: lib/interface.php:1231 +msgid "Minimum word length to index" +msgstr "Minimalna długość indeksowanych słów" + +#: lib/interface.php:1233 +msgid "Words shorter than this number will not be indexed." +msgstr "Słowa o długości krótszej niż określona powyżej nie będą indeksowane." + +#: lib/interface.php:1239 +msgid "Expand shortcodes in post content:" +msgstr "Wykonywanie skrótów w treści wpisów:" + +#: lib/interface.php:1241 +msgid "" +"If checked, Relevanssi will expand shortcodes in post content before " +"indexing. Otherwise shortcodes will be stripped. If you use shortcodes to " +"include dynamic content, Relevanssi will not keep the index updated, the " +"index will reflect the status of the shortcode content at the moment of " +"indexing." +msgstr "" +"Jeśli zostanie zaznaczone, Relevanssi w trakcie indeksowania będzie " +"wykonywać skróty zawarte w treści wpisów. W przeciwnym wypadku skróty " +"zostaną pominięte. Jeśli używasz skrótów do wstawiania dynamicznie " +"generowanej treści, Relevanssi nie będzie w stanie automatycznie " +"aktualizować indeksu o tę treść a zawartość indeksu będzie zawierać treść " +"wygenerowaną przez dany skrót w momencie indeksowania." + +#: lib/interface.php:1245 +msgid "Index and search your posts' tags:" +msgstr "Indeksowanie i wyszukiwanie tagów:" + +#: lib/interface.php:1247 +msgid "" +"If checked, Relevanssi will also index and search the tags of your posts. " +"Remember to rebuild the index if you change this option!" +msgstr "" +"Jeśli zostanie zaznaczone, Relevanssi będzie także indeksować i wyszukiwać " +"tagów znajdujących się we wpisach. Pamiętaj o przebudowaniu indeksu, jeśli " +"zmienisz te ustawienia." + +#: lib/interface.php:1251 +msgid "Index and search your posts' categories:" +msgstr "Indeksowanie i wyszukiwanie kategorii:" + +#: lib/interface.php:1253 +msgid "" +"If checked, Relevanssi will also index and search the categories of your " +"posts. Category titles will pass through 'single_cat_title' filter. Remember " +"to rebuild the index if you change this option!" +msgstr "" +"Jeśli zostanie zaznaczone, Relevanssi będzie także indeksować i wyszukiwać " +"kategorie znajdujące się we wpisach. Tytuły kategorii będą przetwarzane z " +"wykorzystaniem filtru single_cat_title'. Pamiętaj o przebudowaniu indeksu, " +"jeśli zmienisz te ustawienia." + +#: lib/interface.php:1257 +msgid "Index and search your posts' authors:" +msgstr "Indeksowanie i wyszukiwanie autorów:" + +#: lib/interface.php:1259 +msgid "" +"If checked, Relevanssi will also index and search the authors of your posts. " +"Author display name will be indexed. Remember to rebuild the index if you " +"change this option!" +msgstr "" +"Jeśli zostanie zaznaczone, Relevanssi będzie także indeksować i wyszukiwać " +"autorów wpisów. Indeksowana będzie wyświetlana nazwa autora. Pamiętaj o " +"przebudowaniu indeksu, jeśli zmienisz te ustawienia." + +#: lib/interface.php:1263 +msgid "Index and search post excerpts:" +msgstr "Indeksowanie i wyszukiwanie wypisów:" + +#: lib/interface.php:1265 +msgid "" +"If checked, Relevanssi will also index and search the excerpts of your posts." +"Remember to rebuild the index if you change this option!" +msgstr "" +"Jeśli zostanie zaznaczone, Relevanssi będzie także indeksować i wyszukiwać " +"wypisy znajdujące się we wpisach. Pamiętaj o przebudowaniu indeksu, jeśli " +"zmienisz te ustawienia." + +#: lib/interface.php:1269 +msgid "Index and search these comments:" +msgstr "Indeksowanie i wyszukiwanie komentarzy:" + +#: lib/interface.php:1271 +msgid "none" +msgstr "brak" + +#: lib/interface.php:1272 +msgid "normal" +msgstr "normalne" + +#: lib/interface.php:1273 +msgid "all" +msgstr "wszystko" + +#: lib/interface.php:1275 +msgid "" +"Relevanssi will index and search ALL (all comments including track- & " +"pingbacks and custom comment types), NONE (no comments) or NORMAL (manually " +"posted comments on your blog).
Remember to rebuild the index if you " +"change this option!" +msgstr "" +"Relevanssi będzie indeksować i wyszukiwać WSZYSTKO (wszystkie komentarze, " +"trackbacki, pingbacki oraz własne typy komentarzy), BRAK (żadnych " +"komentarzy) lub NORMALNE (ręcznie dodane komentarze).
Pamiętaj o " +"przebudowaniu indeksu, jeśli zmienisz te ustawienia." + +#: lib/interface.php:1279 +msgid "Custom fields to index:" +msgstr "Indeksowanie własnych pól:" + +#: lib/interface.php:1281 +msgid "" +"A comma-separated list of custom fields to include in the index. Set to " +"'visible' to index all visible custom fields and to 'all' to index all " +"custom fields, also those starting with a '_' character." +msgstr "" +"Oddzielona przecinkami lista własnych pól, które mają być uwzględnione w " +"indeksie. Ustaw na 'visible', aby indeksować wszystkie widoczne własne pola, " +"'all' aby indeksować wszystkie własne pola, także te niewidoczne, " +"zaczynające się od znaku '_'." + +#: lib/interface.php:1285 +msgid "Custom taxonomies to index:" +msgstr "Indeksowanie własnych taksonomii:" + +#: lib/interface.php:1287 +msgid "" +"A comma-separated list of custom taxonomy names to include in the index." +msgstr "" +"Oddzielona przecinkami lista własnych taksonomii, które mają być " +"uwzględnione w indeksie." + +#: lib/interface.php:1297 +msgid "Save indexing options and build the index" +msgstr "Zapisz ustawienia indeksowania i przebuduj indeks" + +#: lib/interface.php:1303 +msgid "" +"Warning: In many cases caching is not useful, and in some cases can be even " +"harmful. Do not\n" +"\tactivate cache unless you have a good reason to do so." +msgstr "" +"Ostrzeżenie: W wielu wypadkach cachowanie nie jest przydatne, a w niektórych " +"przypadkach może być nawet szkodliwe. Nie uaktywniaj cachowania o ile nie " +"masz dobrego powodu aby to zrobić." + +#: lib/interface.php:1306 +msgid "Enable result and excerpt caching:" +msgstr "Cachowanie wyników wyszukiwania i wypisów:" + +#: lib/interface.php:1308 +msgid "If checked, Relevanssi will cache search results and post excerpts." +msgstr "" +"Jeśli zostanie zaznaczone, Relevanssi będzie cachować wyniki wyszukiwania i " +"wypisy." + +#: lib/interface.php:1312 +msgid "Cache expire (in seconds):" +msgstr "Czas trwania cache (w sekundach):" + +#: lib/interface.php:1314 +msgid "86400 = day" +msgstr "86400 = 1 dzień" + +#: lib/interface.php:1318 +msgid "Entries in the cache" +msgstr "Liczba dokumentów w cache:" + +#: lib/interface.php:1322 +msgid "Clear all caches" +msgstr "Wyczyść cache" + +#: lib/interface.php:1328 +msgid "" +"Add synonyms here in 'key = value' format. When searching with the OR " +"operator, any search of 'key' will be expanded to include 'value' as well. " +"Using phrases is possible. The key-value pairs work in one direction only, " +"but you can of course repeat the same pair reversed." +msgstr "" +"Możesz tu dodać synonimy słów używając formatu 'klucz = wartość'. Jeśli " +"stosujesz wyszukiwanie z wykorzystaniem operatora OR, każdy znaleziony " +"'klucz' spowoduje równoczesne ujęcie w wynikach każdej z odpowiadających mu " +"'wartości'. Dozwolone jest stosowanie zarówno słów jak i całych zdań. Pary " +"klucz-wartość działają tylko w jednym kierunku, ale oczywiście możesz " +"powtórzyć daną parę zamieniając klucze z wartościami." + +#: lib/interface.php:1351 +msgid "" +"

Enter a word here to add it to the list of stopwords. The word will " +"automatically be removed from the index, so re-indexing is not necessary. " +"You can enter many words at the same time, separate words with commas.

" +msgstr "" +"

Wpisz zwrot, który chcesz dodać do listy słów pomijanych. Taki zwrot " +"zostanie automatycznie usunięty z indeksu, więc konieczne będzie jego " +"przebudowanie. Możesz dodać dowolną liczbę słów, oddzielając je przecinkami." +"

" + +#: lib/interface.php:1353 +msgid "Stopword(s) to add: " +msgstr "Słowa do dodania:" + +#: lib/interface.php:1354 +msgid "Add" +msgstr "Dodaj " + +#: lib/interface.php:1357 +msgid "" +"

Here's a list of stopwords in the database. Click a word to remove it " +"from stopwords. Removing stopwords won't automatically return them to index, " +"so you need to re-index all posts after removing stopwords to get those " +"words back to index." +msgstr "" +"

Jest to lista wszystkich pomijanych słów w bazie danych. Kliknij dane " +"słowo aby je usunąć. Usuwanie słów nie powoduje automatycznego przywrócenia " +"ich do indeksu, więc konieczne jest jego przebudowanie." + +#: lib/interface.php:1383 +msgid "Remove all stopwords" +msgstr "Usuń wszystkie pomijane słowa" + +#: lib/interface.php:1389 +msgid "" +"Here's a list of stopwords you can use to export the stopwords to another " +"blog." +msgstr "" +"Jest to lista wszystkich pomijanych słów, które można wyeksportować i użyć " +"na innej stronie." + +#: lib/uninstall.php:39 +msgid "Data wiped clean, you can now delete the plugin." +msgstr "Wszystkie dane zostały usunięte, możesz teraz usunąć wtycznkę." diff --git a/mu-plugins/relevanssi/relevanssi-pt_BR.po b/mu-plugins/relevanssi/relevanssi-pt_BR.po new file mode 100644 index 00000000..dd3ebbbf --- /dev/null +++ b/mu-plugins/relevanssi/relevanssi-pt_BR.po @@ -0,0 +1,578 @@ +msgid "" +msgstr "" +"Project-Id-Version: Relevanssi\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: \n" +"PO-Revision-Date: \n" +"Last-Translator: Pedro Padron \n" +"Language-Team: W3P Projetos Web \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Poedit-Language: Portuguese\n" +"X-Poedit-Country: BRAZIL\n" +"X-Poedit-Basepath: /\n" +"X-Poedit-SearchPath-0: /home/ppadron/Projects/wordpress-vanilla/wp-content/plugins/relevanssi\n" + +#: relevanssi.php:1032 +msgid "There is no excerpt because this is a protected post." +msgstr "Não há resumo porque esse é um post protegido." + +#: relevanssi.php:1746 +msgid "Relevanssi Search Options" +msgstr "Opções de Busca do Relevanssi" + +#: relevanssi.php:1915 +msgid "25 most common words in the index" +msgstr "25 palavras mais comuns no índice" + +#: relevanssi.php:1917 +msgid "These words are excellent stopword material. A word that appears in most of the posts in the database is quite pointless when searching. This is also an easy way to create a completely new stopword list, if one isn't available in your language. Click the icon after the word to add the word to the stopword list. The word will also be removed from the index, so rebuilding the index is not necessary." +msgstr "Estas palavras são excelentes para formar uma lista de stopwords. Uma palavra que aparece na maioria dos posts é um tanto quanto inútil em uma busca. Esta também é uma maneira fácil de criar uma nova lista de stopwords, caso uma não esteja disponível em seu idioma. Clique no ícone após a palavra para adicioná-la à lista de stopwords. A palavra também será removida do índice, então não é necessário reconstruí-lo." + +#: relevanssi.php:1940 +msgid "Add to stopwords" +msgstr "Adicionar à lista de stopwords" + +#: relevanssi.php:1953 +msgid "25 most popular queries" +msgstr "25 buscas mais populares" + +#: relevanssi.php:1965 +msgid "Recent queries that got 0 hits" +msgstr "Buscas recentes que não retornaram resultados" + +#: relevanssi.php:2126 +msgid "Title boost:" +msgstr "Prioridade do Título:" + +#: relevanssi.php:2135 +msgid "Use search for admin:" +msgstr "Usar a busca para o admin:" + +#: relevanssi.php:2138 +msgid "Restrict search to these categories and tags:" +msgstr "Restringir a busca para essas categorias e tags:" + +#: relevanssi.php:2182 +msgid "Create custom search result snippets:" +msgstr "Criar resumos de resultado de busca personalizados:" + +#: relevanssi.php:2186 +msgid "Length of the snippet:" +msgstr "Tamanho do resumo:" + +#: relevanssi.php:2190 +msgid "Keep a log of user queries:" +msgstr "Manter um histórico de buscas dos usuários:" + +#: relevanssi.php:2191 +msgid "If checked, Relevanssi will log user queries." +msgstr "Se ativada, Relevanssi irá armazenar as buscas feitas pelos usuários." + +#: relevanssi.php:2195 +msgid "Highlight query terms in search results:" +msgstr "Usar efeito marca-texto nos termos da busca nos resultados:" + +#: relevanssi.php:2196 +msgid "Highlighting isn't available unless you use custom snippets" +msgstr "Esta opção só está disponível se você utilizar resumos de resultados de busca personalizados" + +#: relevanssi.php:2214 +msgid "Continue indexing" +msgstr "Continuar Indexação" + +#: relevanssi.php:2215 +msgid "No highlighting" +msgstr "Sem efeito marca-texto" + +#: relevanssi.php:2216 +msgid "Text color" +msgstr "Cor do texto" + +#: relevanssi.php:2217 +msgid "Background color" +msgstr "Cor de fundo" + +#: relevanssi.php:2218 +msgid "CSS Style" +msgstr "CSS Style" + +#: relevanssi.php:2219 +msgid "CSS Class" +msgstr "Classe CSS" + +#: relevanssi.php:2221 +msgid "Text color for highlights:" +msgstr "Cor de texto para efeito marca-texto:" + +#: relevanssi.php:2222 +msgid "Background color for highlights:" +msgstr "Cor de fundo para efeito marca-texto:" + +#: relevanssi.php:2223 +msgid "CSS style for highlights:" +msgstr "Estilo CSS para efeito marca-texto:" + +#: relevanssi.php:2224 +msgid "CSS class for highlights:" +msgstr "Classe CSS para efeito marca-texto:" + +#: relevanssi.php:2226 +#: relevanssi.php:2227 +msgid "Use HTML color codes (#rgb or #rrggbb)" +msgstr "Use cores em hexadecimal (#rgb ou #rrggbb)" + +# @ default +#: relevanssi.php:94 +#, php-format +msgid "Relevanssi needs attention: Remember to build the index (you can do it at the settings page), otherwise searching won't work." +msgstr "Relevanssi precisa de atenção: Lembre-se de construir o índice (você pode fazê-lo na página de opções), caso contrário a busca não irá funcionar." + +#: relevanssi.php:1430 +msgid "Indexing complete!" +msgstr "Indexação concluída!" + +#: relevanssi.php:1903 +#, php-format +msgid "

Term '%s' added to stopwords!

" +msgstr "

Termo '%s' adicionado à lista de stopwords!

" + +#: relevanssi.php:1906 +#, php-format +msgid "

Couldn't add term '%s' to stopwords!

" +msgstr "

Não foi possível adicionar '%s' à lista de stopwords!

" + +#: relevanssi.php:2129 +msgid "Tag boost:" +msgstr "Prioridade da Tag:" + +#: relevanssi.php:2132 +msgid "Comment boost:" +msgstr "Prioridade dos Comentários:" + +#: relevanssi.php:2143 +msgid "Exclude these categories and tags from search:" +msgstr "Excluir da busca essas categorias e tags:" + +# @ relevanssi +#: relevanssi.php:2147 +msgid "Exclusions and restrictions" +msgstr "Restrições" + +#: relevanssi.php:2150 +msgid "Exclude these posts/pages from search:" +msgstr "Excluir esses posts/páginas da busca:" + +#: relevanssi.php:2154 +msgid "Index and search your posts' tags:" +msgstr "Indexar e buscar as tags dos posts:" + +#: relevanssi.php:2157 +msgid "Index and search these comments:" +msgstr "Indexar e buscar nestes Comentários:" + +#: relevanssi.php:2162 +msgid "all" +msgstr "todos" + +#: relevanssi.php:2163 +msgid "normal" +msgstr "normal" + +#: relevanssi.php:2164 +msgid "none" +msgstr "nenhum" + +#: relevanssi.php:2181 +msgid "Custom excerpts/snippets" +msgstr "Resumos de resultado de busca personalizados" + +#: relevanssi.php:2187 +msgid "This must be an integer." +msgstr "O valor deve ser um número inteiro." + +#: relevanssi.php:2188 +msgid "words" +msgstr "palavras" + +#: relevanssi.php:2189 +msgid "characters" +msgstr "caracteres" + +#: relevanssi.php:2192 +msgid "Search hit highlighting" +msgstr "Efeito marca-texto" + +# @ relevanssi +#: relevanssi.php:2193 +msgid "First, choose the type of highlighting used:" +msgstr "Primeiramente, escolha o tipo de efeito marca-texto a ser utilizado:" + +# @ relevanssi +#: relevanssi.php:2194 +msgid "Then adjust the settings for your chosen type:" +msgstr "Ajuste as opções para o tipo escolhido:" + +#: relevanssi.php:2198 +msgid "Highlight query terms in result titles too:" +msgstr "Usar efeito marca-texto também nos títulos dos resultados:" + +# @ relevanssi +#: relevanssi.php:2201 +msgid "Save the options" +msgstr "Gravar as opções" + +#: relevanssi.php:2202 +msgid "Building the index and indexing options" +msgstr "Construindo o índice e opções de indexação" + +#: relevanssi.php:2213 +msgid "Save indexing options and build the index" +msgstr "Gravar opções de indexação e construir o índice" + +#: relevanssi.php:2233 +msgid "What to include in the index" +msgstr "O que incluir no índice" + +#: relevanssi.php:2234 +msgid "Everything" +msgstr "Tudo" + +#: relevanssi.php:2235 +msgid "Just posts" +msgstr "Apenas posts" + +#: relevanssi.php:2236 +msgid "Just pages" +msgstr "Apenas páginas" + +#: relevanssi.php:2251 +msgid "Custom fields to index:" +msgstr "Campos personalizados a serem indexados:" + +#: relevanssi.php:2259 +msgid "Show breakdown of search hits in excerpts:" +msgstr "Exibir mais informações de hits no resumo:" + +#: relevanssi.php:2262 +msgid "The breakdown format:" +msgstr "Formato das informações:" + +#: relevanssi.php:2267 +msgid "When to use fuzzy matching?" +msgstr "Quando utilizar busca fuzzy" + +#: relevanssi.php:2268 +msgid "When straight search gets no hits" +msgstr "Quando a busca direta não encontra resultados" + +#: relevanssi.php:2269 +msgid "Always" +msgstr "Sempre" + +#: relevanssi.php:2270 +msgid "Don't use fuzzy search" +msgstr "Não utilizar busca fuzzy" + +# @ relevanssi +#: relevanssi.php:311 +msgid "Data wiped clean, you can now delete the plugin." +msgstr "Dados removidos! Você pode remover o plugin agora." + +# @ relevanssi +#: relevanssi.php:2280 +msgid "Uninstall" +msgstr "Desinstalar" + +# @ relevanssi +#: relevanssi.php:2284 +msgid "Remove plugin data" +msgstr "Remover todos os dados do plugin" + +# @ relevanssi +#: relevanssi.php:2274 +msgid "Expand shortcodes in post content:" +msgstr "Converter os shortcodes " + +#: relevanssi.php:2167 +msgid "Index and search your posts' categories:" +msgstr "Indexar e buscar as categorias dos posts:" + +#: relevanssi.php:2243 +msgid "Custom post types to index" +msgstr "Tipos de Posts (custom post types) a serem indexados" + +#: relevanssi.php:2255 +msgid "Custom taxonomies to index:" +msgstr "Taxonomias personalizadas a serem indexadas:" + +#: relevanssi.php:2127 +#, php-format +msgid "" +"Default: %d. 0 means titles are ignored, 1 means no boost, more\n" +"\t\tthan 1 gives extra value." +msgstr "Padrão: %d. 0 significa que os títulos são ignorados, 1 significa nenhuma prioridade, mais de 1 aumenta a prioridade." + +#: relevanssi.php:2130 +#, php-format +msgid "" +"Default: %d. 0 means tags are ignored, 1 means no boost, more\n" +"\t\tthan 1 gives extra value." +msgstr "Padrão: %d. 0 significa que as tags são ignoradas, 1 significa nenhuma prioridade, mais de 1 aumenta a prioridade." + +#: relevanssi.php:2133 +#, php-format +msgid "" +"Default: %d. 0 means comments are ignored, 1 means no boost,\n" +"\t\tmore than 1 gives extra value." +msgstr "Padrão: %d. 0 significa que os comentários são ignorados, 1 significa nenhuma prioridade, mais de 1 aumenta a prioridade." + +#: relevanssi.php:2136 +msgid "" +"If checked, Relevanssi will be used for searches in the admin\n" +"\t\tinterface" +msgstr "Se a opção estiver marcada, Relevanssi será usado nas buscas no painel do admin" + +#: relevanssi.php:2139 +msgid "" +"Enter a comma-separated list of category and tag IDs to restrict search to\n" +"\t\tthose categories or tags. You can also use <input type='hidden' name='cat'\n" +"\t\tvalue='list of cats and tags' /> in your search form. The input field will\n" +"\t\toverrun this setting." +msgstr "Insira uma lista separada por vírgulas de categorias e IDs de tags para restringir a busca apenas nelas. Você também pode usar <input type='hidden' name='cat' value='lista de categorias e tags' /> em seu formulário. O campo no formulário tem prioridade sobre esta opção no painel." + +#: relevanssi.php:2144 +msgid "" +"Enter a comma-separated list of category and tag IDs that are excluded from\n" +"\t\tsearch results. This only works here, you can't use the input field option (WordPress\n" +"\t\tdoesn't pass custom parameters there)." +msgstr "Insira uma lista separada por vírgulas de categorias e IDs de tags que serão excluídos dos resultados da busca. Essa opção só pode ser definida aqui, você não pode usar um campo adicional no formulário (WordPress não passa parâmetros personalizados lá)." + +#: relevanssi.php:2151 +msgid "" +"Enter a comma-separated list of post/page IDs that are excluded from search\n" +"\t\tresults. This only works here, you can't use the input field option (WordPress doesn't pass\n" +"\t\tcustom parameters there)." +msgstr "Insira uma lista separada por vírgulas de IDs de posts/páginas que serão excluídos dos resultados da busca. Essa opção só pode ser definida aqui, você não pode usar um campo adicional no formulário (WordPress não passa parâmetros personalizados lá)." + +#: relevanssi.php:2155 +msgid "" +"If checked, Relevanssi will also index and search the tags of your posts.\n" +"\t\tRemember to rebuild the index if you change this option!" +msgstr "Se esta opção estiver marcada, Relevanssi irá indexar e realizar buscas nas tags de seus posts. Lembre-se de reconstruir o índice se você mudar esta opção!" + +#: relevanssi.php:2158 +msgid "" +"Relevanssi will index and search ALL (all comments including track-\n" +"\t\t& pingbacks and custom comment types), NONE (no comments) or NORMAL (manually posted\n" +"\t\tcomments on your blog).
Remember to rebuild the index if you change this option!" +msgstr "Relevanssi irá indexar e buscar em TODOS (comentários, trackbacks, pingbacks e tipos personalizados de comentários), NENHUM (nenhum comentário) ou NORMAL (comentários postados manualmente no blog).
Lembre-se de reconstruir o índice se você mudar esta opção!" + +#: relevanssi.php:2168 +msgid "" +"If checked, Relevanssi will also index and search the categories of your\n" +"\t\tposts. Category titles will pass through 'single_cat_title' filter. Remember to rebuild the\n" +"\t\tindex if you change this option!" +msgstr "Se esta opção estiver marcada, Relevanssi irá indexar e realizar buscas nas categorias de seus posts. Lembre-se de reconstruir o índice se você mudar esta opção!" + +#: relevanssi.php:2183 +msgid "" +"If checked, Relevanssi will create excerpts that contain the search term\n" +"\t\thits. To make them work, make sure your search result template uses the_excerpt() to\n" +"\t\tdisplay post excerpts." +msgstr "Se esta opção estiver marcada, Relevanssi irá criar resumos que contém o(s) termo(s) buscado(s). Para que isso funcione, certifique-se de que seu template de resultado de busca utiliza the_excerpt() para exibir resumos de posts." + +#: relevanssi.php:2203 +msgid "" +"After installing the plugin, you need to build the index. This generally needs\n" +"\t\tto be done once, you don't have to re-index unless something goes wrong. Indexing is a heavy\n" +"\t\ttask and might take more time than your servers allow. If the indexing cannot be finished -\n" +"\t\tfor example you get a blank screen or something like that after indexing - you can continue\n" +"\t\tindexing from where you left by clicking 'Continue indexing'. Clicking 'Build the index'\n" +"\t\twill delete the old index, so you can't use that." +msgstr "Após a instalação do plugin, é preciso construir o índice. Isso normalmente precisa ser feito apenas uma vez. Não é necessário reconstruir o índice a não ser que algo de errado aconteça. A indexação é uma tarefa pesada e pode levar mais tempo do que seus servidores permitam. Se a indexação não puder ser concluída - por exemplo, você encontrar uma tela branca ou algo parecido após a indexação - você pode continuar o processo a partir de onde parou ao clicar em \"Continuar Indexação\". Ao clicar em \"Construir o Índice\" o índice atual será removido, portanto não clique nele para continuar uma indexação interrompida." + +#: relevanssi.php:2209 +msgid "" +"So, if you build the index and don't get the 'Indexing complete' in the end,\n" +"\t\tkeep on clicking the 'Continue indexing' button until you do. On my blogs, I was able to\n" +"\t\tindex ~400 pages on one go, but had to continue indexing twice to index ~950 pages." +msgstr "Portanto, se você construir o índice e não receber a mensagem \"Indexação Concluída\" no final, continue clicando em \"Continuar Indexação\" até que isso aconteça. Em meus blogs consegui indexar cerca de 400 páginas de uma só vez, mas precisei continuar o processo mais duas vezes para chegar a cerca de 950 páginas." + +#: relevanssi.php:2228 +msgid "" +"You can use any CSS styling here, style will be inserted with a\n" +"\t\t<span>" +msgstr "Você pode usar qualquer estilo CSS aqui, ele será inserido com a tag <span>" + +#: relevanssi.php:2230 +msgid "" +"Name a class here, search results will be wrapped in a <span>\n" +"\t\twith the class" +msgstr "Insira aqui o nome da classe e os resultados da busca serão encapsulados por uma tag <span> com esta classe" + +# @ relevanssi +#: relevanssi.php:2237 +msgid "All public post types" +msgstr "Todos os tipos de post públicos" + +# @ relevanssi +#: relevanssi.php:2238 +msgid "" +"This determines which post types are included in the index. Choosing\n" +"\t\t'everything' will include posts, pages and all custom post types. 'All public post types'\n" +"\t\tincludes all registered post types that don't have the 'exclude_from_search' set to true.\n" +"\t\tThis includes post, page, attachment, and possible custom types. 'All public types'\n" +"\t\trequires at least WP 2.9, otherwise it's the same as 'everything'." +msgstr "Isso determina quais tipos de posts serão indexados. Ao escolher \"Tudo\" serão incluídos todos os posts, páginas e posts personalizados. \"Todos os tipos de post públicos\" inclui todos os tipos de posts públicos que não possuam o atributo \"exclude_from_search\" definido como verdadeiro, o que inclui posts, páginas, anexos e possivelmente posts personalizados. A opção \"Todos os tipos de post públicos\" requer Wordpress 2.9 ou superior, caso contrário será o mesmo que \"Tudo\"." + +# @ relevanssi +#: relevanssi.php:2244 +msgid "" +"If you don't want to index all custom post types, list here the custom\n" +"\t\tpost types you want to see indexed. List comma-separated post type names (as used in the\n" +"\t\tdatabase). You can also use a hidden field in the search form to restrict the search to a\n" +"\t\tcertain post type: <input type='hidden' name='post_type' value='comma-separated\n" +"\t\tlist of post types' />. If you choose 'All public post types' or 'Everything'\n" +"\t\tabove, this option has no effect." +msgstr "Se você não quiser indexar todos os tipos de post personalizados, liste aqui quais são os tipos que você quer indexar. Insira os nomes dos tipos de posts em uma lista separada por vírgula. Você pode também usar um campo hidden no formário de busca para restringir a busca em um determinado tipo de post: <input type='hidden' name='post_type' value='lista de tipos de posts' />. Se na opção anterior você escolheu \"Todos os tipos de posts públicos\" ou \"Tudo\", essa opção não terá efeito." + +#: relevanssi.php:2252 +msgid "" +"A comma-separated list of custom field names to include in the\n" +"\t\tindex." +msgstr "Uma lista separada por vírgula de nomes de campos personalizados a serem incluídos no índice." + +#: relevanssi.php:2256 +msgid "" +"A comma-separated list of custom taxonomies to include in the\n" +"\t\tindex." +msgstr "Uma lista separada por vírgula de nomes de taxonomias personalizadas a serem incluídos no índice." + +#: relevanssi.php:2260 +msgid "" +"Check this to show more information on where the search hits were\n" +"\t\tmade. Requires custom snippets to work." +msgstr "Marque esta opção para exibir mais informações sobre onde os termos buscados foram encontrados. Para essa opção funcionar, é preciso habilitar os resumos personalizados." + +#: relevanssi.php:2271 +msgid "" +"Straight search matches just the term. Fuzzy search matches everything\n" +"\t\tthat begins or ends with the search term." +msgstr "Busca direta encontra apenas o termo buscado. Busca fuzzy irá encontrar tudo que começa ou termina com o termo buscado." + +# @ relevanssi +#: relevanssi.php:2275 +msgid "" +"If checked, Relevanssi will expand shortcodes in post content\n" +"\t\tbefore indexing. Otherwise shortcodes will be stripped. If you use shortcodes to\n" +"\t\tinclude dynamic content, Relevanssi will not keep the index updated, the index will\n" +"\t\treflect the status of the shortcode content at the moment of indexing." +msgstr "Se esta opção estiver marcada, Relevanssi irá converter os shortcodes no conteúdo do post antes de indexar. Caso contrário, os shortcodes serão removidos. Se você utiliza shortcodes para incluir conteúdo dinâmico, Relevanssi não manterá o índice atualizado. Ou seja, será utilizado o conteúdo gerado pelo shortcode no momento da indexação." + +# @ relevanssi +#: relevanssi.php:2281 +msgid "" +"If you want to uninstall the plugin, start by clicking the button\n" +"\t\tbelow to wipe clean the options and tables created by the plugin, then remove it from\n" +"\t\tthe plugins list." +msgstr "Se quiser desinstalar o plugin, comece clicando no botão abaixo para remover todas as opções e todas as tabelas criadas pelo plugin, e então remova-o da lista de plugins." + +#: relevanssi.php:2172 +msgid "Index and search your posts' authors:" +msgstr "Indexar e buscar os autores dos posts:" + +#: relevanssi.php:2173 +msgid "" +"If checked, Relevanssi will also index and search the authors of your\n" +"\t\tposts. Author display name will be indexed. Remember to rebuild the index if you change\n" +"\t\tthis option!" +msgstr "Se esta opção estiver marcada, Relevanssi irá indexar e realizar buscas nos autores de seus posts. Lembre-se de reconstruir o índice se você mudar esta opção!" + +# @ relevanssi +#: relevanssi.php:2286 +msgid "State of the Index" +msgstr "Estatísticas do Índice" + +# @ relevanssi +#: relevanssi.php:2287 +msgid "Highest post ID indexed" +msgstr "Último ID indexado" + +#: relevanssi.php:2288 +msgid "Documents in the index" +msgstr "Registros no índice" + +# @ relevanssi +#: relevanssi.php:2289 +msgid "Basic options" +msgstr "Opções Básicas" + +# @ relevanssi +#: relevanssi.php:2291 +msgid "Default operator for the search?" +msgstr "Operador padrão para a busca?" + +# @ relevanssi +#: relevanssi.php:2292 +msgid "AND - require all terms" +msgstr "E - necessita de todos os termos" + +# @ relevanssi +#: relevanssi.php:2293 +msgid "OR - any term present is enough" +msgstr "OU - qualquer termo presente é o bastante" + +# @ relevanssi +#: relevanssi.php:2294 +msgid "If you choose AND and the search finds no matches, it will automatically do an OR search." +msgstr "Se escolher E e a busca não encontrar resultados, uma nova busca do tipo OU será feita automaticamente." + +# @ relevanssi +#: relevanssi.php:2296 +msgid "Don't log queries from these users:" +msgstr "Não armazenar registros de buscas destes usuários:" + +#: relevanssi.php:2297 +msgid "Comma-separated list of user ids that will not be logged." +msgstr "Uma lista separada por vírgula de usuários que não terão suas buscas registradas." + +# @ relevanssi +#: relevanssi.php:2299 +msgid "Synonyms" +msgstr "Sinônimos" + +# @ relevanssi +#: relevanssi.php:2300 +msgid "Add synonyms here in 'key = value' format. When searching with the OR operator, any search of 'key' will be expanded to include 'value' as well. Using phrases is possible. The key-value pairs work in one direction only, but you can of course repeat the same pair reversed." +msgstr "Adicione sinônimos no formato \"chave = valor\". Quando for feita uma busca do tipo OU, qualquer busca por \"chave\" será expandida para incluir \"valor\" também. É possível utilizar frases. Os pares chave-valor funcionam apenas em uma direção, mas claro que você pode repetir o mesmo par em ordem inversa." + +#: relevanssi.php:2177 +msgid "Index and search post excerpts:" +msgstr "Indexar e buscar os resumos dos posts:" + +#: relevanssi.php:2178 +msgid "" +"If checked, Relevanssi will also index and search the excerpts of your\n" +"\t\tposts.Remember to rebuild the index if you change this option!" +msgstr "Se esta opção estiver marcada, Relevanssi irá indexar e realizar buscas nos resumos de seus posts. Lembre-se de reconstruir o índice se você mudar esta opção!" + +# @ relevanssi +#: relevanssi.php:2263 +#, php-format +msgid "" +"Use %body%, %title%, %tags% and %comments% to display the number of\n" +"\t\thits (in different parts of the post), %total% for total hits, %score% to display the document weight and %terms% to\n" +"\t\tshow how many hits each search term got. No double quotes (\") allowed!" +msgstr "Utilize %body%, %title%, %tags% e %comments% para exibir o número de hits, %total% para o total de hits, %score% para exibir a relevância e %terms% para exibir quantas vezes cada termo buscado foi encontrado. Aspas duplas (\") não são permitidas aqui!" + +#~ msgid "Save" +#~ msgstr "Gravar" +#~ msgid "" +#~ "Use %body%, %title%, %tags%, %comments% and %score% to display the number " +#~ "of hits and the document weight." +#~ msgstr "" +#~ "Use %body%, %title%, %tags%, %comments% e %score% para exibir o número de " +#~ "hits e o peso do resultado." + diff --git a/mu-plugins/relevanssi/relevanssi-ro_RO.po b/mu-plugins/relevanssi/relevanssi-ro_RO.po new file mode 100644 index 00000000..d5259389 --- /dev/null +++ b/mu-plugins/relevanssi/relevanssi-ro_RO.po @@ -0,0 +1,1123 @@ +msgid "" +msgstr "" +"Project-Id-Version: Relevanssi Premium\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2011-08-28 16:16+0200\n" +"PO-Revision-Date: \n" +"Last-Translator: Richard Vencu \n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Poedit-KeywordsList: _e;__\n" +"X-Poedit-Basepath: .\n" +"X-Poedit-Language: English\n" +"X-Poedit-SearchPath-0: .\n" +"X-Poedit-SearchPath-1: ../relevanssi\n" + +#: relevanssi.php:114 +#: relevanssi.php:115 +#: ../relevanssi/relevanssi.php:94 +#: ../relevanssi/relevanssi.php:95 +msgid "User searches" +msgstr "Căutări utilizatori" + +#: relevanssi.php:128 +#: ../relevanssi/relevanssi.php:107 +#, php-format +msgid "Relevanssi needs attention: Remember to build the index (you can do it at the settings page), otherwise searching won't work." +msgstr "Relevanssi are nevoie de atenție: Amintiți-vă să construiți indexul (aceasta se poate face la pagina de configurație), altfel căutările nu vor funcționa." + +#: relevanssi.php:2112 +#: ../relevanssi/relevanssi.php:1480 +msgid "There is no excerpt because this is a protected post." +msgstr "Nu există rezumat pentru că acesta este un articol protejat." + +#: relevanssi.php:2871 +#: ../relevanssi/relevanssi.php:2000 +msgid "Indexing complete!" +msgstr "Indexare reușită!" + +#: relevanssi.php:3323 +msgid "Relevanssi Premium Search Options" +msgstr "Opțiuni de căutare Relevanssi Premium" + +#: relevanssi.php:3390 +msgid "Options updated!" +msgstr "Opțiuni actualizate!" + +#: relevanssi.php:3398 +msgid "User Searches" +msgstr "Căutări utilizatori" + +#: relevanssi.php:3400 +#: ../relevanssi/relevanssi.php:2458 +msgid "Relevanssi User Searches" +msgstr "Căutări utilizatori Relevanssi" + +#: relevanssi.php:3673 +#: ../relevanssi/relevanssi.php:2673 +#, php-format +msgid "

Successfully added %d/%d terms to stopwords!

" +msgstr "

Termenii %d/%d au fost adăugați cu succes la lista de cuvinte ignorate!

" + +#: relevanssi.php:3680 +#: ../relevanssi/relevanssi.php:2680 +#, php-format +msgid "

Term '%s' added to stopwords!

" +msgstr "

Termenul '%s' a fost adăugat la lista de cuvinte ignorate!

" + +#: relevanssi.php:3683 +#: ../relevanssi/relevanssi.php:2683 +#, php-format +msgid "

Couldn't add term '%s' to stopwords!

" +msgstr "

Nu am putut adăuga termenul '%s' la lista de cuvinte ignorate!

" + +#: relevanssi.php:3712 +#: ../relevanssi/relevanssi.php:2712 +msgid "

Stopwords removed! Remember to re-index.

" +msgstr "

Cuvintele ignorate au fost eliminate din listă! Amintiți-vă că trebuie să reindexați.

" + +#: relevanssi.php:3722 +#: ../relevanssi/relevanssi.php:2722 +#, php-format +msgid "

Term '%s' removed from stopwords! Re-index to get it back to index.

" +msgstr "

Termenul '%s' a fost eliminat din lista de cuvinte ignorate! Re-indexați pentru a îl reintroduce în index.

" + +#: relevanssi.php:3725 +#: ../relevanssi/relevanssi.php:2725 +#, php-format +msgid "

Couldn't remove term '%s' from stopwords!

" +msgstr "

NU am putut elimina termenul '%s' din lista de cuvinte ignorate!

" + +#: relevanssi.php:3734 +#: ../relevanssi/relevanssi.php:2734 +msgid "25 most common words in the index" +msgstr "Cele mai frecvente 25 de cuvinte din index" + +#: relevanssi.php:3736 +#: ../relevanssi/relevanssi.php:2736 +msgid "These words are excellent stopword material. A word that appears in most of the posts in the database is quite pointless when searching. This is also an easy way to create a completely new stopword list, if one isn't available in your language. Click the icon after the word to add the word to the stopword list. The word will also be removed from the index, so rebuilding the index is not necessary." +msgstr "Aceste cuvinte reprezintă candidați ideali pentru lista de cuvinte ignorate. Un cuvânt care apare în majoritatea articolelor din blog nu prea mai are sens să fie folosit ca termen de căutare. În plus aceasta este o modalitate ușoară de a construi o listă nouă de cuvinte ignorate dacă nu există deja una în limba dumneavoastră. Apăsați pe icoana de după cuvânt pentru a adăuga cuvântul la listă. Totodată cuvântul va fi eliminat și din index, așa că reindexarea nu mai este necesară." + +#: relevanssi.php:3759 +#: ../relevanssi/relevanssi.php:2759 +msgid "Add to stopwords" +msgstr "Adăugare la lista de cuvinte ignorate" + +#: relevanssi.php:3770 +msgid "Total Searches" +msgstr "Total căutări" + +#: relevanssi.php:3773 +msgid "Totals" +msgstr "Totaluri" + +#: relevanssi.php:3778 +msgid "Common Queries" +msgstr "Căutări frecvente" + +#: relevanssi.php:3780 +#: ../relevanssi/relevanssi.php:2770 +msgid "" +"Here you can see the 20 most common user search queries, how many times those \n" +"\t\tqueries were made and how many results were found for those queries." +msgstr "" +"Aici puteți vizualiza cele mai utilizate 20 de căutări ale utilizatorilor, de câte ori aceste \n" +"\t\tcăutări au fost rulate și câte rezultate au fost descoperite prin rularea lor." + +#: relevanssi.php:3786 +#: relevanssi.php:3802 +#: ../relevanssi/relevanssi.php:2776 +#: ../relevanssi/relevanssi.php:2792 +msgid "Today and yesterday" +msgstr "Astăzi și ieri" + +#: relevanssi.php:3790 +#: relevanssi.php:3806 +#: ../relevanssi/relevanssi.php:2780 +#: ../relevanssi/relevanssi.php:2796 +msgid "Last 7 days" +msgstr "Ultimele 7 zile" + +#: relevanssi.php:3794 +#: relevanssi.php:3810 +#: ../relevanssi/relevanssi.php:2784 +#: ../relevanssi/relevanssi.php:2800 +msgid "Last 30 days" +msgstr "Ultimele 30 de zile" + +#: relevanssi.php:3799 +#: ../relevanssi/relevanssi.php:2789 +msgid "Unsuccessful Queries" +msgstr "Căutări eșuate" + +#: relevanssi.php:4125 +#: relevanssi.php:4152 +#: ../relevanssi/relevanssi.php:3048 +#: ../relevanssi/relevanssi.php:3075 +msgid "Basic options" +msgstr "Opțiuni de bază" + +#: relevanssi.php:4126 +#: relevanssi.php:4214 +msgid "Weights" +msgstr "Greutăți" + +#: relevanssi.php:4127 +#: relevanssi.php:4307 +#: ../relevanssi/relevanssi.php:3049 +#: ../relevanssi/relevanssi.php:3138 +msgid "Logs" +msgstr "Jurnale" + +#: relevanssi.php:4128 +#: relevanssi.php:4324 +#: ../relevanssi/relevanssi.php:3050 +#: ../relevanssi/relevanssi.php:3152 +msgid "Exclusions and restrictions" +msgstr "Excluderi și restricții" + +#: relevanssi.php:4129 +#: ../relevanssi/relevanssi.php:3051 +msgid "Custom excerpts" +msgstr "Rezumate personalizate" + +#: relevanssi.php:4130 +#: ../relevanssi/relevanssi.php:3052 +msgid "Highlighting search results" +msgstr "Evidențierea rezultatelor căutării" + +#: relevanssi.php:4131 +#: relevanssi.php:4460 +#: ../relevanssi/relevanssi.php:3053 +#: ../relevanssi/relevanssi.php:3282 +msgid "Indexing options" +msgstr "Opțiuni de indexare" + +#: relevanssi.php:4132 +#: relevanssi.php:4607 +#: ../relevanssi/relevanssi.php:3054 +#: ../relevanssi/relevanssi.php:3381 +msgid "Caching" +msgstr "Utilizare cache" + +#: relevanssi.php:4133 +#: relevanssi.php:4630 +#: ../relevanssi/relevanssi.php:3055 +#: ../relevanssi/relevanssi.php:3404 +msgid "Synonyms" +msgstr "Sinonime" + +#: relevanssi.php:4134 +#: relevanssi.php:4638 +#: ../relevanssi/relevanssi.php:3056 +#: ../relevanssi/relevanssi.php:3412 +msgid "Stopwords" +msgstr "Cuvinte ignorate" + +#: relevanssi.php:4135 +msgid "Import/export options" +msgstr "Import/export opțiuni" + +#: relevanssi.php:4138 +#: ../relevanssi/relevanssi.php:3061 +msgid "Quick tools" +msgstr "Unelte rapide" + +#: relevanssi.php:4140 +#: ../relevanssi/relevanssi.php:3063 +msgid "Save options" +msgstr "Salvare opțiuni" + +#: relevanssi.php:4141 +#: ../relevanssi/relevanssi.php:3064 +msgid "Build the index" +msgstr "Construire index" + +#: relevanssi.php:4142 +#: relevanssi.php:4605 +#: ../relevanssi/relevanssi.php:3065 +#: ../relevanssi/relevanssi.php:3379 +msgid "Continue indexing" +msgstr "Continuare indexare" + +#: relevanssi.php:4142 +#: ../relevanssi/relevanssi.php:3065 +msgid "add" +msgstr "adăugare" + +#: relevanssi.php:4142 +#: ../relevanssi/relevanssi.php:3065 +msgid "documents." +msgstr "documente." + +#: relevanssi.php:4144 +#: ../relevanssi/relevanssi.php:3067 +msgid "Use 'Build the index' to build the index with current indexing options. If you can't finish indexing with one go, use 'Continue indexing' to finish the job. You can change the number of documents to add until you find the largest amount you can add with one go. See 'State of the Index' below to find out how many documents actually go into the index." +msgstr "Utilizați „Construire index” pentru a construi indexul folosind opțiunile curente. Dacă nu puteți finaliza indexarea dintr-o singură rulare folosiți „Continuare indexare” pentru a finaliza indexul. Puteți midifica numărul de documente care sunt adăugate până aflați numărul maxim de documente pe care îl puteți indexa la o rulare. Verificați „Starea indexului” pentru a vedea câte documente au intrat în index la orice moment de timp." + +#: relevanssi.php:4146 +#: ../relevanssi/relevanssi.php:3069 +msgid "State of the Index" +msgstr "Starea indexului" + +#: relevanssi.php:4148 +#: ../relevanssi/relevanssi.php:3071 +msgid "Documents in the index" +msgstr "Documente în index" + +#: relevanssi.php:4149 +#: ../relevanssi/relevanssi.php:3072 +msgid "Highest post ID indexed" +msgstr "Cel mai mare ID de document din index" + +#: relevanssi.php:4154 +msgid "API key:" +msgstr "Cheie API:" + +#: relevanssi.php:4156 +msgid "API key is required to use the automatic update feature. Get yours from Relevanssi.com." +msgstr "Cheia API este necesară atunci când se utilizează facilitatea de upgrade automat. Obțineți una de la Relevanssi.com." + +#: relevanssi.php:4160 +#: ../relevanssi/relevanssi.php:3092 +msgid "Use search for admin:" +msgstr "Utilizare căutări în admin:" + +#: relevanssi.php:4162 +#: ../relevanssi/relevanssi.php:3094 +msgid "If checked, Relevanssi will be used for searches in the admin interface" +msgstr "Dacă opțiunea este bifată, Relevanssi va fi folosit pentru căutări în interfața de administrare" + +#: relevanssi.php:4166 +#: ../relevanssi/relevanssi.php:3098 +msgid "Default operator for the search?" +msgstr "Operatorul implicit pentru căutare?" + +#: relevanssi.php:4168 +#: ../relevanssi/relevanssi.php:3100 +msgid "AND - require all terms" +msgstr "ȘI - toți termenii sunt necesari" + +#: relevanssi.php:4169 +#: ../relevanssi/relevanssi.php:3101 +msgid "OR - any term present is enough" +msgstr "SAU - un singur termen este suficient" + +#: relevanssi.php:4171 +#: ../relevanssi/relevanssi.php:3103 +msgid "If you choose AND and the search finds no matches, it will automatically do an OR search." +msgstr "Dacă selectați operatorul ȘI și căutarea nu produce rezultate, atunci se va efectua în mod automat o altă căutare cu operatorul SAU." + +#: relevanssi.php:4175 +#: ../relevanssi/relevanssi.php:3107 +msgid "Disable OR fallback:" +msgstr "Invalidarea folosirii lui SAU ca operator de rezervă:" + +#: relevanssi.php:4177 +#: ../relevanssi/relevanssi.php:3109 +msgid "If you don't want Relevanssi to fall back to OR search when AND search gets no hits, check this option. For most cases, leave this one unchecked." +msgstr "Dacă nu doriți ca Relevanssi să efectueze căutarea cu operatorul de rezervă SAU atunci când operatorul ȘI nu produce rezultate, bifați această opțiune. În cele mai multe cazuri această opțiune rămâne nebifată." + +#: relevanssi.php:4181 +#: ../relevanssi/relevanssi.php:3113 +msgid "Default order for results:" +msgstr "Odinea implicită pentru rezultate:" + +#: relevanssi.php:4183 +#: ../relevanssi/relevanssi.php:3115 +msgid "Relevance (highly recommended)" +msgstr "Relevanță (foarte recomandat)" + +#: relevanssi.php:4184 +#: ../relevanssi/relevanssi.php:3116 +msgid "Post date" +msgstr "Dată publicate" + +#: relevanssi.php:4186 +msgid "If you want date-based results, you really should do what this knowledge base entry says instead of changing this option." +msgstr "Dacă doriți rezultate ordonate după dată, ar trebui să citiți acest articol (în engleză)" + +#: relevanssi.php:4190 +#: ../relevanssi/relevanssi.php:3121 +msgid "When to use fuzzy matching?" +msgstr "Când să se utilizeze căutarea aproximativă?" + +#: relevanssi.php:4192 +#: ../relevanssi/relevanssi.php:3123 +msgid "When straight search gets no hits" +msgstr "Atunci când căutarea simplă nu produce nici un rezultat." + +#: relevanssi.php:4193 +#: ../relevanssi/relevanssi.php:3124 +msgid "Always" +msgstr "Întotdeauna" + +#: relevanssi.php:4194 +#: ../relevanssi/relevanssi.php:3125 +msgid "Don't use fuzzy search" +msgstr "Nu folosi căutări aproximative." + +#: relevanssi.php:4196 +#: ../relevanssi/relevanssi.php:3127 +msgid "Straight search matches just the term. Fuzzy search matches everything that begins or ends with the search term." +msgstr "Căutarea simplă identifică numai termenul căutat. Căutarea aproximativă identifică termenul căutat și orice alte cuvinte care încep sau se termină cu termenul căutat." + +#: relevanssi.php:4200 +msgid "How to index internal links:" +msgstr "Cum se indexează linkurile interne?" + +#: relevanssi.php:4202 +msgid "No special processing for internal links" +msgstr "Nu se procesează în mod special linkurile interne" + +#: relevanssi.php:4203 +msgid "Index internal links for target documents only" +msgstr "Indexare linkuri interne numai pentru documentele țintă" + +#: relevanssi.php:4204 +msgid "Index internal links for both target and source" +msgstr "Indexare linkuri interne atât pentru sursă cât și pentru țintă" + +#: relevanssi.php:4206 +msgid "Internal link anchor tags can be indexed for target document (so the text will match the document the link points to), both target and source or source only (with no extra significance for the links). See Relevanssi Knowledge Base for more details. Changing this option requires reindexing." +msgstr "Etichetele linkurilor interne pot fi folosite la indexarea documentelor țintă (textul va fi luat în considerare pentru documentul țintă), pentru ambele documente sursă și țintă sau numai pentru sursă (moment în care linkul nu mai contează). Vedeți Knowledge Base de la relevanssi.com pentru mai multe detalii. Schimbarea acestei opțiuni are efect numai după reindexare." + +#: relevanssi.php:4210 +msgid "Limit searches:" +msgstr "Limitare căutări:" + +#: relevanssi.php:4212 +msgid "If this option is checked, Relevanssi will limit search results to at most 500 results per term. This will improve performance, but may cause some relevant documents to go unfound. However, Relevanssi tries to priorize the most relevant documents." +msgstr "Dacă această opțiune este bifată, Relevanssi va limita rezultatele la cel mult 500 pentru fiecare termen de căutare. Aceasta va îmbunătăți performanța, însă multe din documentele relevante nu vor fi găsite. Cu toate acestea Relevanssi urmărește să prioritizeze cele mai relevante documente." + +#: relevanssi.php:4216 +#: ../relevanssi/relevanssi.php:3077 +msgid "These values affect the weights of the documents. These are all multipliers, so 1 means no change in weight, less than 1 means less weight, and more than 1 means more weight. Setting something to zero makes that worthless. For example, if title weight is more than 1, words in titles are more significant than words elsewhere. If title weight is 0, words in titles won't make any difference to the search results." +msgstr "Aceste valori afectează greutatea documentelor. Aceste valori sunt toate multiplicatori, prin urmare 1 înseamnă că greutatea rămâne neschimbată, o valoare mai mare decât 1 înseamnă creșterea greutății. Setând o valoare cu zero face acel criteriu nesemnificativ." + +#: relevanssi.php:4221 +msgid "Element" +msgstr "Element" + +#: relevanssi.php:4222 +msgid "Weight" +msgstr "Greutate" + +#: relevanssi.php:4223 +msgid "Default weight" +msgstr "Greutatea implicită" + +#: relevanssi.php:4228 +msgid "Post titles" +msgstr "Titlu document" + +#: relevanssi.php:4239 +msgid "Tags" +msgstr "Etichete" + +#: relevanssi.php:4250 +msgid "Internal links" +msgstr "Linkuri interne" + +#: relevanssi.php:4261 +msgid "Comment text" +msgstr "Text comentariu" + +#: relevanssi.php:4281 +#, php-format +msgid "Post type '%s':" +msgstr "Tip document '%s':" + +#: relevanssi.php:4299 +#: ../relevanssi/relevanssi.php:3130 +msgid "WPML compatibility" +msgstr "Compatibilitate WPML" + +#: relevanssi.php:4301 +#: ../relevanssi/relevanssi.php:3132 +msgid "Limit results to current language:" +msgstr "Limitare rezultate la limba curentă:" + +#: relevanssi.php:4303 +#: ../relevanssi/relevanssi.php:3134 +msgid "If this option is checked, Relevanssi will only return results in the current active language. Otherwise results will include posts in every language." +msgstr "Dacă această opțiune este bifată, Relevanssi va returna numai rezultatele în limba curentă. Altfel se vor returna rezultatele din toate limbile instalate." + +#: relevanssi.php:4309 +#: ../relevanssi/relevanssi.php:3140 +msgid "Keep a log of user queries:" +msgstr "Păstrează un jurnal cu căutările utilizatorilor:" + +#: relevanssi.php:4311 +#: ../relevanssi/relevanssi.php:3142 +msgid "If checked, Relevanssi will log user queries. The log appears in 'User searches' on the Dashboard admin menu." +msgstr "Dacă această opțiune este bifată, atunci Relevanssi va jurnaliza căutările utilizatorilor. Jurnalul va apare în meniul „Căutari utilizatori” din Panoul de control." + +#: relevanssi.php:4315 +#: ../relevanssi/relevanssi.php:3146 +msgid "Don't log queries from these users:" +msgstr "Nu jurnaliza căutările următorilor utilizatori:" + +#: relevanssi.php:4317 +#: ../relevanssi/relevanssi.php:3148 +msgid "Comma-separated list of user ids that will not be logged." +msgstr "Lisă separată cu virgule a ID-urilor utilizatorilor care nu vor fi jurnalizați." + +#: relevanssi.php:4319 +#: ../relevanssi/relevanssi.php:3150 +msgid "If you enable logs, you can see what your users are searching for. Logs are also needed to use the 'Did you mean?' feature. You can prevent your own searches from getting in the logs with the omit feature." +msgstr "Dacă permiteți jurnalizarea puteți afla ce anume caută utilizatorii. Jurnalele sunt de asemenea utilizate în funcția „Ați vrut să căutați...”. Puteți preveni ca propriile dumneavoastră căutări să fie incluse în jurnal prin folosirea funcției de excludere." + +#: relevanssi.php:4321 +msgid "Don't show Relevanssi branding on the 'User Searches' screen:" +msgstr "Nu afișa logo Relevanssi în ecranul de „Căuterile utilizatorilor”:" + +#: relevanssi.php:4326 +#: ../relevanssi/relevanssi.php:3154 +msgid "Restrict search to these categories and tags:" +msgstr "Restricționare căutări numai la aceste categorii și etichete:" + +#: relevanssi.php:4328 +#: ../relevanssi/relevanssi.php:3156 +msgid "Enter a comma-separated list of category and tag IDs to restrict search to those categories or tags. You can also use <input type='hidden' name='cat' value='list of cats and tags' /> in your search form. The input field will \toverrun this setting." +msgstr "Introduceți o listă separată prin virgule a ID-urilor categoriilor și etichetelor de restricționat la căutare. Puteți folosi și <input type='hidden' name='cat' value='listă categorii și etichete' /> în formularul de căutare. Valorile introduse aici vor suprascrie valorile din formularul de căutare." + +#: relevanssi.php:4332 +#: ../relevanssi/relevanssi.php:3160 +msgid "Exclude these categories and tags from search:" +msgstr "Excludere categorii și etichete din căutări:" + +#: relevanssi.php:4334 +msgid "Enter a comma-separated list of category and tag IDs that are excluded from search results. You can exclude categories with the 'cat' input field by using negative values." +msgstr "Introduceți o listă separată prin virgule cu ID-urile categoriilor și a etichetelor care să fie excluse din rezultatele căutării. Mai puteți exclude categorii prin listarea categoriilor de căutat în câmpul corespunzător, punând semnul minus înainte de ID-ul categoriei." + +#: relevanssi.php:4338 +#: ../relevanssi/relevanssi.php:3166 +msgid "Exclude these posts/pages from search:" +msgstr "Excludere pagini/articole din căutări:" + +#: relevanssi.php:4340 +msgid "Enter a comma-separated list of post/page IDs that are excluded from search results. This only works here, you can't use the input field option (WordPress doesn't pass custom parameters there). You can also use a checkbox on post/page edit pages to remove posts from index." +msgstr "Introduceți o listă separată prin virgule a ID-urilor documentelor care doriți să fie excluse din lista de rezultate. Puteți utiliza și opțiunea din ecranul de editare a documentelor pentru a le elimina, în mod individual, din index." + +#: relevanssi.php:4344 +#: ../relevanssi/relevanssi.php:3172 +msgid "Respect exclude_from_search for custom post types:" +msgstr "Respectă atributul exclude_from_search așa cum este definit la tipurile personalizate de articole:" + +#: relevanssi.php:4346 +#: ../relevanssi/relevanssi.php:3174 +msgid "If checked, Relevanssi won't display posts of custom post types that have 'exclude_from_search' set to true. If not checked, Relevanssi will display anything that is indexed." +msgstr "Dacă opțiunea este bifată Relevanssi nu va afișa articolele din tipurile de articole care au atributul exclude_from_search cu valoarea true. Dacă opțiunea nu este bifată, Relevanssi va afișa orice găsește în index." + +#: relevanssi.php:4348 +#: ../relevanssi/relevanssi.php:3176 +msgid "Custom excerpts/snippets" +msgstr "Rezumate/fragmente personalizate" + +#: relevanssi.php:4350 +#: ../relevanssi/relevanssi.php:3178 +msgid "Create custom search result snippets:" +msgstr "Creare fragmente personalizate pentru rezultatele căutării:" + +#: relevanssi.php:4352 +#: ../relevanssi/relevanssi.php:3180 +msgid "If checked, Relevanssi will create excerpts that contain the search term hits. To make them work, make sure your search result template uses the_excerpt() to display post excerpts." +msgstr "Dacă opțiunea este bifată Relevanssi va crea rezumate care conțin termenii de căutare găsiți în document. Pentru a funcționa verificați dacă macheta de afișare a rezultatelor căutărilor folosește funcția the_excerpt() pentru afișarea rezumatelor." + +#: relevanssi.php:4356 +#: ../relevanssi/relevanssi.php:3184 +msgid "Length of the snippet:" +msgstr "Lungimea fragmentului:" + +#: relevanssi.php:4359 +#: ../relevanssi/relevanssi.php:3187 +msgid "characters" +msgstr "caractere" + +#: relevanssi.php:4360 +#: ../relevanssi/relevanssi.php:3188 +msgid "words" +msgstr "cuvinte" + +#: relevanssi.php:4362 +#: ../relevanssi/relevanssi.php:3190 +msgid "This must be an integer." +msgstr "Această valoare trebuie să fie un număr întreg." + +#: relevanssi.php:4366 +#: ../relevanssi/relevanssi.php:3194 +msgid "Show breakdown of search hits in excerpts:" +msgstr "Afișare structură rezultate căutare în rezumate:" + +#: relevanssi.php:4368 +#: ../relevanssi/relevanssi.php:3196 +msgid "Check this to show more information on where the search hits were made. Requires custom snippets to work." +msgstr "Bifați această opțiune pentru a afișa mai multe informații în rezultatele căutărilor. Necesită fragmente personalizate pentru a funcționa." + +#: relevanssi.php:4372 +#: ../relevanssi/relevanssi.php:3200 +msgid "The breakdown format:" +msgstr "Formatul structurii:" + +#: relevanssi.php:4374 +#: ../relevanssi/relevanssi.php:3202 +msgid "Use %body%, %title%, %tags% and %comments% to display the number of hits (in different parts of the post), %total% for total hits, %score% to display the document weight and %terms% to show how many hits each search term got. No double quotes (\") allowed!" +msgstr "Utilizați %body%, %title%, %tags% și %comments% pentru a afișa numărul de rezultate (în diverse locuri ale documentului), %total% pentru numărul total de rezultate, %score% pentru afișarea greutății documentului, %terms% pentru afișarea numărului rezultatelor pentru fiecare termen de căutare. Nu se permit glilimele duble (\")!" + +#: relevanssi.php:4376 +#: ../relevanssi/relevanssi.php:3204 +msgid "Search hit highlighting" +msgstr "Evidențiere termeni căutați în rezultate" + +#: relevanssi.php:4378 +#: ../relevanssi/relevanssi.php:3206 +msgid "First, choose the type of highlighting used:" +msgstr "La început, alegeți tipul de evidențiere utilizat:" + +#: relevanssi.php:4381 +#: ../relevanssi/relevanssi.php:3209 +msgid "Highlight query terms in search results:" +msgstr "Evidențierea termenilor căutați în rezultate:" + +#: relevanssi.php:4383 +#: ../relevanssi/relevanssi.php:3211 +msgid "No highlighting" +msgstr "Fără evidențiere" + +#: relevanssi.php:4387 +#: ../relevanssi/relevanssi.php:3215 +msgid "Text color" +msgstr "Text colorat" + +#: relevanssi.php:4388 +#: ../relevanssi/relevanssi.php:3216 +msgid "Background color" +msgstr "Fundal colorat" + +#: relevanssi.php:4389 +#: ../relevanssi/relevanssi.php:3217 +msgid "CSS Style" +msgstr "Stil CSS" + +#: relevanssi.php:4390 +#: ../relevanssi/relevanssi.php:3218 +msgid "CSS Class" +msgstr "Clasa CSS" + +#: relevanssi.php:4392 +#: ../relevanssi/relevanssi.php:3220 +msgid "Highlighting isn't available unless you use custom snippets" +msgstr "Evidențierea nu este disponibilă decât dacă utilizați fragmente personalizate" + +#: relevanssi.php:4396 +#: ../relevanssi/relevanssi.php:3224 +msgid "Highlight query terms in result titles too:" +msgstr "Evidențierea termenilor de căutare și în titluri:" + +#: relevanssi.php:4402 +msgid "Highlight query terms in documents from local searches:" +msgstr "Evidențierea termenilor de căutare în documente pentru căutările locale:" + +#: relevanssi.php:4404 +#: ../relevanssi/relevanssi.php:3232 +msgid "Highlights hits when user opens the post from search results. This is based on HTTP referrer, so if that's blocked, there'll be no highlights." +msgstr "Evidențierea se face atunci când utilizatorul deschide un rezultat din lista de rezultate ale unei căutări. Această funcționalitate se bazează pe HTTP referrer, prin urmare dacă acesta este blocat nu va apare nici o evidențiere." + +#: relevanssi.php:4408 +msgid "Highlight query terms in documents from external searches:" +msgstr "Evidențierea termenilor de căutare în documente și pentru căutările externe:" + +#: relevanssi.php:4410 +msgid "Highlights hits when user arrives from external search. Currently supports Google, Bing, Ask, Yahoo and AOL Search." +msgstr "Se evidențiază termenii căutați atunci când căutarea este efectuată extern. Sunt suportate Google, Bing, Ask, Yahoo și AOL." + +#: relevanssi.php:4414 +#: ../relevanssi/relevanssi.php:3236 +msgid "Highlight query terms in comments:" +msgstr "Evidențierea termenilor de căutare în comentarii:" + +#: relevanssi.php:4416 +#: ../relevanssi/relevanssi.php:3238 +msgid "Highlights hits in comments when user opens the post from search results." +msgstr "Evidențierea în comentarii are loc atunci când utilizatorul deschide documentul din lista de rezultate ale căutării." + +#: relevanssi.php:4420 +#: ../relevanssi/relevanssi.php:3242 +msgid "Uncheck this if you use non-ASCII characters:" +msgstr "Debifați dacă utilizați caractere non-ASCII:" + +#: relevanssi.php:4422 +#: ../relevanssi/relevanssi.php:3244 +msgid "If you use non-ASCII characters (like Cyrillic alphabet) and the highlights don't work, uncheck this option to make highlights work." +msgstr "Dacă utilizați caractere non-ASCII (ex. alfabet chirilic) și doriți ca evidențierea termenilor să funcționeze trebuie să debifați această opțiune." + +#: relevanssi.php:4427 +#: ../relevanssi/relevanssi.php:3249 +msgid "Then adjust the settings for your chosen type:" +msgstr "Apoi ajustați setările pentru tipul ales:" + +#: relevanssi.php:4431 +#: ../relevanssi/relevanssi.php:3253 +msgid "Text color for highlights:" +msgstr "Culoare text pentru evidențiere:" + +#: relevanssi.php:4433 +#: relevanssi.php:4439 +#: ../relevanssi/relevanssi.php:3255 +#: ../relevanssi/relevanssi.php:3261 +msgid "Use HTML color codes (#rgb or #rrggbb)" +msgstr "Utilizare coduri de culori HTML (#rgb sau #rrggbb)" + +#: relevanssi.php:4437 +#: ../relevanssi/relevanssi.php:3259 +msgid "Background color for highlights:" +msgstr "Culoare fundal pentru evidențiere:" + +#: relevanssi.php:4443 +#: ../relevanssi/relevanssi.php:3265 +msgid "CSS style for highlights:" +msgstr "Stil CSS pentru evidențiere:" + +#: relevanssi.php:4445 +#: ../relevanssi/relevanssi.php:3267 +msgid "You can use any CSS styling here, style will be inserted with a <span>" +msgstr "Puteți utiliza orice stil CSS aici, stilurile vor fi inserate cu un <span>" + +#: relevanssi.php:4449 +#: ../relevanssi/relevanssi.php:3271 +msgid "CSS class for highlights:" +msgstr "Clasă CSS pentru evidențiere:" + +#: relevanssi.php:4451 +#: ../relevanssi/relevanssi.php:3273 +msgid "Name a class here, search results will be wrapped in a <span> with the class" +msgstr "Numiți o clasă CSS aici, rezultatele vor fi învelite într-un <span> cu clasa respectivă" + +#: relevanssi.php:4458 +#: relevanssi.php:4636 +#: ../relevanssi/relevanssi.php:3280 +#: ../relevanssi/relevanssi.php:3410 +msgid "Save the options" +msgstr "Salvare opțiuni" + +#: relevanssi.php:4462 +msgid "Choose post types to index:" +msgstr "Tipurile de documente de inclus în index:" + +#: relevanssi.php:4467 +msgid "Type" +msgstr "Tip" + +#: relevanssi.php:4468 +msgid "Index" +msgstr "Index" + +#: relevanssi.php:4469 +msgid "Public?" +msgstr "Public?" + +#: relevanssi.php:4486 +#, php-format +msgid "%s" +msgstr "%s" + +#: relevanssi.php:4487 +msgid "yes" +msgstr "da" + +#: relevanssi.php:4487 +msgid "no" +msgstr "nu" + +#: relevanssi.php:4508 +#: ../relevanssi/relevanssi.php:3313 +msgid "Minimum word length to index" +msgstr "Lungimea minimă a cuvintelor de inclus în index" + +#: relevanssi.php:4510 +#: ../relevanssi/relevanssi.php:3315 +msgid "Words shorter than this number will not be indexed." +msgstr "Cuvintele cu lungimea mai scurtă decât acest număr nu vor fi indexate." + +#: relevanssi.php:4514 +msgid "Thousands separator" +msgstr "Separator mii" + +#: relevanssi.php:4516 +msgid "If Relevanssi sees this character between numbers, it'll stick the numbers together no matter how the character would otherwise be handled. Especially useful if a space is used as a thousands separator." +msgstr "Dacă Relevanssi descoperă acest caracter între numere va menține numerele împreună, indiferent de modul în care acest caracter poate fi folosit în alt context. Este util în mod special atunci când se folosește un spațiu liber pe post de separator de mii." + +#: relevanssi.php:4520 +#: ../relevanssi/relevanssi.php:3325 +msgid "Expand shortcodes in post content:" +msgstr "Expanadare shortcode-uri în conținut:" + +#: relevanssi.php:4522 +#: ../relevanssi/relevanssi.php:3327 +msgid "If checked, Relevanssi will expand shortcodes in post content before indexing. Otherwise shortcodes will be stripped. If you use shortcodes to include dynamic content, Relevanssi will not keep the index updated, the index will reflect the status of the shortcode content at the moment of indexing." +msgstr "Dacă opțiunea este bifată Relevanssi va expanda shortcode-urile în conținutul documentelor înainte de a le indexa. În caz contrar shortcode-urile vor fi șterse înainte de indexare. Dacă utilizați shortcode-uri pentru a afișa conținut dinamic, Relevanssi nu va menține indexul actualizat în mod automat atunci când respectivul conținut se modifică, ci va reflecta starea găsită la momentul indexării." + +#: relevanssi.php:4526 +#: ../relevanssi/relevanssi.php:3331 +msgid "Index and search your posts' tags:" +msgstr "Indexare și căutare după etichete:" + +#: relevanssi.php:4528 +#: ../relevanssi/relevanssi.php:3333 +msgid "If checked, Relevanssi will also index and search the tags of your posts. Remember to rebuild the index if you change this option!" +msgstr "Dacă opțiunea este bifată Relevanssi va indexa și va căuta etichetele documentelor. Amintiți-vă să reconstruiți indexul dacă modificați această opțiune!" + +#: relevanssi.php:4532 +#: ../relevanssi/relevanssi.php:3337 +msgid "Index and search your posts' categories:" +msgstr "Indexare și căutare după categorii:" + +#: relevanssi.php:4534 +#: ../relevanssi/relevanssi.php:3339 +msgid "If checked, Relevanssi will also index and search the categories of your posts. Category titles will pass through 'single_cat_title' filter. Remember to rebuild the index if you change this option!" +msgstr "Dacă opțiunea este bifată Relevanssi va indexa și va căuta categoriile documentelor. Titlurile categoriilor vor fi trecute prin filtrul single_cat_title. Amintiți-vă să reconstruiți indexul dacă modificați această opțiune!" + +#: relevanssi.php:4538 +#: ../relevanssi/relevanssi.php:3343 +msgid "Index and search your posts' authors:" +msgstr "Indexare și căutare după autor:" + +#: relevanssi.php:4540 +#: ../relevanssi/relevanssi.php:3345 +msgid "If checked, Relevanssi will also index and search the authors of your posts. Author display name will be indexed. Remember to rebuild the index if you change this option!" +msgstr "Dacă opțiunea este bifată Relevanssi va indexa și căuta autorii documentelor. Se va indexa numele afișabil al autorului. Amintiți-vă să reconstruiți indexul dacă modificați această opțiune!" + +#: relevanssi.php:4544 +#: ../relevanssi/relevanssi.php:3349 +msgid "Index and search post excerpts:" +msgstr "Indexare și căutare după rezumate:" + +#: relevanssi.php:4546 +#: ../relevanssi/relevanssi.php:3351 +msgid "If checked, Relevanssi will also index and search the excerpts of your posts.Remember to rebuild the index if you change this option!" +msgstr "Dacă opțiunea este bifată Relevanssi va indexa și va căuta în rezumatele documentelor. Amintiți-vă să reconstruiți indexul dacă modificați această opțiune!" + +#: relevanssi.php:4550 +#: ../relevanssi/relevanssi.php:3355 +msgid "Index and search these comments:" +msgstr "Indexare și căutare în aceste comentarii:" + +#: relevanssi.php:4552 +#: ../relevanssi/relevanssi.php:3357 +msgid "none" +msgstr "nici unul" + +#: relevanssi.php:4553 +#: ../relevanssi/relevanssi.php:3358 +msgid "normal" +msgstr "normal" + +#: relevanssi.php:4554 +#: ../relevanssi/relevanssi.php:3359 +msgid "all" +msgstr "toate" + +#: relevanssi.php:4556 +#: ../relevanssi/relevanssi.php:3361 +msgid "Relevanssi will index and search ALL (all comments including track- & pingbacks and custom comment types), NONE (no comments) or NORMAL (manually posted comments on your blog).
Remember to rebuild the index if you change this option!" +msgstr "Relevanssi va indexa și va căuta TOTUL (toate comentariile inclusiv trackback-uri, pingback-uri și tipurile personalizate de comentarii), NICI UNUL (nici un comentariu) sau NORMAL (numai comentariile introduse manual în blog).
Amintiți-vă să reconstruiți indexul dacă modificați această opțiune!" + +#: relevanssi.php:4560 +#: ../relevanssi/relevanssi.php:3365 +msgid "Custom fields to index:" +msgstr "Câmpuri personalizate de indexat:" + +#: relevanssi.php:4562 +#: ../relevanssi/relevanssi.php:3367 +msgid "A comma-separated list of custom field names to include in the index." +msgstr "O listă separată prin virgule a numelor câmpurilor personalizate care să fie incluse în index." + +#: relevanssi.php:4566 +#: ../relevanssi/relevanssi.php:3371 +msgid "Custom taxonomies to index:" +msgstr "Taxonomii personalizate de indexat:" + +#: relevanssi.php:4568 +#: ../relevanssi/relevanssi.php:3373 +msgid "A comma-separated list of custom taxonomies to include in the index." +msgstr "O listă separată prin virgule a taxonomiilor personalizate care să fie incluse în index." + +#: relevanssi.php:4572 +msgid "Index and search user profiles:" +msgstr "Indexare și căutare în profilele utilizatorilor:" + +#: relevanssi.php:4574 +msgid "If checked, Relevanssi will also index and search user profiles (first name, last name, display name and user description). Requires changes to search results template, see Relevanssi Knowledge Base." +msgstr "Dacă opțiunea este bifată Relevanssi va indexa și va căuta în profilele utilizatorilor (prenume, nume, nume afișabil, descriere). Afișarea necesită modificări ale machetei de rezultate ale căutării, vedeți Knowledge Base de la relevanssi.com pentru detalii." + +#: relevanssi.php:4578 +msgid "Index subscriber profiles:" +msgstr "Indexare și căutare în profilele abonaților:" + +#: relevanssi.php:4580 +msgid "If checked, Relevanssi will index subscriber profiles as well, otherwise only authors, editors, contributors and admins are indexed." +msgstr "Dacă opțiunea este bifată Relevansii va indexa și va căuta în profilele abonaților. În caz contrar numai profilele autorilor, contributorilor și a administratorilor sunt indexate." + +#: relevanssi.php:4584 +msgid "Extra user fields to index:" +msgstr "Câmpuri profil utilizatori suplimentare de indexat:" + +#: relevanssi.php:4586 +msgid "A comma-separated list of user profile field names (names of the database columns) to include in the index." +msgstr "O listă separată prin virgule a numelor câmpurilor din profilul utilizatorilor (nume de coloane din baza de date) care să fie incluse în index." + +#: relevanssi.php:4590 +msgid "Index and search taxonomy pages:" +msgstr "Indexare și căutare după paginile taxonomiilor:" + +#: relevanssi.php:4592 +msgid "If checked, Relevanssi will also index and search taxonomy pages (categories, tags, custom taxonomies)." +msgstr "Dacă opțiunea este bifată Relevanssi va indexa și va căuta paginile taxonomiilor (categorii, etichete, taxonomii personalizate). Amintiți-vă să reconstruiți indexul dacă modificați această opțiune!" + +#: relevanssi.php:4596 +msgid "Taxonomy pages to index:" +msgstr "Pagini cu taxonomii de indexat:" + +#: relevanssi.php:4598 +msgid "A comma-separated list of taxonomies to include in the taxonomy page index ('all' indexes all custom taxonomies. If you don't use 'all', remember to list 'category' and 'post_tag')." +msgstr "O listă separată prin virgule a taxonomiilor care să fie incluse în indexul de pagini de taxonomii ('all' indexează toate taxonomiile. Dacă nu utilizați 'all', nu uitați să adăugați 'category' și 'post_tag' pentru categorii și respectiv etichete)." + +#: relevanssi.php:4603 +#: ../relevanssi/relevanssi.php:3377 +msgid "Save indexing options and build the index" +msgstr "Salvare opțiuni și construire index" + +#: relevanssi.php:4609 +#: ../relevanssi/relevanssi.php:3383 +msgid "" +"Warning: In many cases caching is not useful, and in some cases can be even harmful. Do not\n" +"\tactivate cache unless you have a good reason to do so." +msgstr "" +"Atenție: în multe cazuri memoria cache nu este utilă, iar uneori poate fi chiar dăunătoare. Nu activați\n" +"\tmemoria cache decât dacă aveți un motiv clar să o faceți." + +#: relevanssi.php:4612 +#: ../relevanssi/relevanssi.php:3386 +msgid "Enable result and excerpt caching:" +msgstr "Permite salvarea în memoria cache a rezultatelor și a rezumatelor:" + +#: relevanssi.php:4614 +#: ../relevanssi/relevanssi.php:3388 +msgid "If checked, Relevanssi will cache search results and post excerpts." +msgstr "Dacă opțiunea este bifată, Relevanssi va memora rezultatele și rezumatele în memoria cache." + +#: relevanssi.php:4618 +#: ../relevanssi/relevanssi.php:3392 +msgid "Cache expire (in seconds):" +msgstr "Memoria cache expiră în (secunde):" + +#: relevanssi.php:4620 +#: ../relevanssi/relevanssi.php:3394 +msgid "86400 = day" +msgstr "86400 = o zi" + +#: relevanssi.php:4624 +#: ../relevanssi/relevanssi.php:3398 +msgid "Entries in the cache" +msgstr "Înregistrări în memoria cache" + +#: relevanssi.php:4628 +#: ../relevanssi/relevanssi.php:3402 +msgid "Clear all caches" +msgstr "Ștergere completă cache" + +#: relevanssi.php:4634 +#: ../relevanssi/relevanssi.php:3408 +msgid "Add synonyms here in 'key = value' format. When searching with the OR operator, any search of 'key' will be expanded to include 'value' as well. Using phrases is possible. The key-value pairs work in one direction only, but you can of course repeat the same pair reversed." +msgstr "Adăugați aici sinonime în formatul „cheie = valoare”. Atunci când se folosește operatorul SAU, orice termen de căutare din lista de chei va fi expandat și cu valorile corespunzătoare. Se pot utiliza și fraze. Perechea cheie-valoare funționează unidirecțional, puteți bineînțeles să introduceți și perechea inversată în listă." + +#: relevanssi.php:4642 +msgid "Import or export options" +msgstr "Import și export opțiuni" + +#: relevanssi.php:4644 +msgid "Here you find the current Relevanssi Premium options in a text format. Copy the contents of the text field to make a backup of your settings. You can also paste new settings here to change all settings at the same time. This is useful if you have default settings you want to use on every system." +msgstr "Aici găsiți setările curente ale modulului Relevanssi Premium în format text. Puteți copia conținutul câmpului pentru a face backup setărilor. Puteți de asemenea copia setări noi în acest câmp pentru a modifica toate setările dintr-o singură mișcare. Aceasta este util când aveți un set implicit de opțiuni pe care doriți să îl replicați pe toate blogurile." + +#: relevanssi.php:4648 +msgid "Import settings" +msgstr "Import setări" + +#: relevanssi.php:4650 +msgid "Note! Make sure you've got correct settings from a right version of Relevanssi. Settings from a different version of Relevanssi may or may not work and may or may not mess your settings." +msgstr "Notă: Asigurați-vă că introduceți setările de la o versiune corectă de Relevanssi. Setările de la o altă versiune ar putea sau nu să funcționeze sau ar putea să vă strice setările curente." + +#: relevanssi.php:4663 +#: ../relevanssi/relevanssi.php:3433 +msgid "

Enter a word here to add it to the list of stopwords. The word will automatically be removed from the index, so re-indexing is not necessary. You can enter many words at the same time, separate words with commas.

" +msgstr "

Introduceți aici un cuvânt care să fie adăugat la lista de cuvinte ignorate. Cuvântul va fi eliminat automat din index, nu mai este necesară reindexarea. Pentru a introduce mai multe cuvinte simultan, separați-le cu virgule.

" + +#: relevanssi.php:4665 +#: ../relevanssi/relevanssi.php:3435 +msgid "Stopword(s) to add: " +msgstr "Cuvinte de adăugat la lista de cuvinte ignorate:" + +#: relevanssi.php:4666 +#: ../relevanssi/relevanssi.php:3436 +msgid "Add" +msgstr "Adăugare" + +#: relevanssi.php:4669 +#: ../relevanssi/relevanssi.php:3439 +msgid "

Here's a list of stopwords in the database. Click a word to remove it from stopwords. Removing stopwords won't automatically return them to index, so you need to re-index all posts after removing stopwords to get those words back to index." +msgstr "

Aceasta este o listă de cuvinte ignorate din baza de date. Apăsați pe un cuvânt pentru a-l elimina din listă. Eliminarea cuvintelor nu se va reflecta în mod automat în index, va trebui să reconstruiți indexul pentru ca modificările să aibă efect." + +#: relevanssi.php:4695 +#: ../relevanssi/relevanssi.php:3465 +msgid "Remove all stopwords" +msgstr "Eliminarea tuturor cuvintelor ignorate" + +#: relevanssi.php:4701 +#: ../relevanssi/relevanssi.php:3471 +msgid "Here's a list of stopwords you can use to export the stopwords to another blog." +msgstr "Aceasta este o listă de cuvinte de ignorat pe care o puteți exporta pentru utilizarea în alt blog." + +#: relevanssi.php:4781 +msgid "Relevanssi post controls" +msgstr "Controale articole Relevanssi" + +#: relevanssi.php:4787 +msgid "Relevanssi page controls" +msgstr "Controale pagini Relevanssi" + +#: relevanssi.php:4805 +msgid "Exclude this post or page from the index." +msgstr "Exclude acest document din index." + +#: ../relevanssi/relevanssi.php:474 +msgid "Data wiped clean, you can now delete the plugin." +msgstr "Datele modulului au fost curățate, acum se poate elimina modului." + +#: ../relevanssi/relevanssi.php:2393 +msgid "Relevanssi Search Options" +msgstr "Opțiuni de căutare Relevanssi" + +#: ../relevanssi/relevanssi.php:3057 +msgid "Uninstalling" +msgstr "Dezinastalare" + +#: ../relevanssi/relevanssi.php:3079 +msgid "Title weight:" +msgstr "Greutate titlu:" + +#: ../relevanssi/relevanssi.php:3081 +#: ../relevanssi/relevanssi.php:3085 +#: ../relevanssi/relevanssi.php:3089 +#, php-format +msgid "Default: %s" +msgstr "Implicit: %s" + +#: ../relevanssi/relevanssi.php:3083 +msgid "Tag weight:" +msgstr "Greutate etichetă:" + +#: ../relevanssi/relevanssi.php:3087 +msgid "Comment weight:" +msgstr "Greutate comentariu:" + +#: ../relevanssi/relevanssi.php:3162 +msgid "Enter a comma-separated list of category and tag IDs that are excluded from search results. This only works here, you can't use the input field option (WordPress doesn't pass custom parameters there)." +msgstr "Introduceți o listă separată prin virgule a ID-urilor categoriilor și etichetelor care doriți să fie excluse din lista de rezultate." + +#: ../relevanssi/relevanssi.php:3168 +msgid "Enter a comma-separated list of post/page IDs that are excluded from search results. This only works here, you can't use the input field option (WordPress doesn't pass custom parameters there)." +msgstr "Introduceți o listă separată prin virgule a ID-urilor documentelor care doriți să fie excluse din lista de rezultate." + +#: ../relevanssi/relevanssi.php:3230 +msgid "Highlight query terms in documents:" +msgstr "Evidențierea termenilor de căutare în documente:" + +#: ../relevanssi/relevanssi.php:3284 +msgid "What to include in the index" +msgstr "Ce să fie înclus în index" + +#: ../relevanssi/relevanssi.php:3286 +msgid "Everything" +msgstr "Totul" + +#: ../relevanssi/relevanssi.php:3287 +msgid "All public post types" +msgstr "Toate tipurile de documente publice" + +#: ../relevanssi/relevanssi.php:3288 +msgid "Posts" +msgstr "Articole" + +#: ../relevanssi/relevanssi.php:3289 +msgid "Pages" +msgstr "Pagini" + +#: ../relevanssi/relevanssi.php:3290 +msgid "Custom, set below" +msgstr "Personalizat, setați mai jos" + +#: ../relevanssi/relevanssi.php:3292 +msgid "" +"This determines which post types are included in the index. Choosing 'everything'\n" +"\twill include posts, pages and all custom post types. 'All public post types' includes all\n" +"\tregistered post types that don't have the 'exclude_from_search' set to true. This includes post,\n" +"\tpage, and possible custom types. 'All public types' requires at least WP 2.9, otherwise it's the\n" +"\tsame as 'everything'. If you choose 'Custom', only the post types listed below are indexed.\n" +"\tNote: attachments are covered with a separate option below." +msgstr "" +"Această opțiune determină ce tipuri de documente sunt incluse în index. Alegând „Totul” va include toate articolele,\n" +"\tpaginile și documentele de tip personalizat. „Toate tipurile de documente publice” va include toate tipurile de documente\n" +"\tpersonalizate care nu au atributul exclude_fom_search cu valoarea true. Aceasta va include articolele, paginile și\n" +"\tposibile tipuri de documente personalizate. „Toate tipurile de documente publice” necesită cel puțin WP 2.9, altfel setarea va\n" +"\tfuncționa la fel cu „Totul”. Dacă alegeți „Personalizat” numai tipurile de documente listate mai jos sunt indexate.\n" +"\t Notă: atașamentele sunt acoperite cu altă opțiune aflată mai jos." + +#: ../relevanssi/relevanssi.php:3301 +msgid "Custom post types to index" +msgstr "Tipurile de documente de inclus în index" + +#: ../relevanssi/relevanssi.php:3303 +msgid "" +"If you don't want to index all custom post types, list here the custom post types\n" +"\tyou want to see indexed. List comma-separated post type names (as used in the database). You can\n" +"\talso use a hidden field in the search form to restrict the search to a certain post type:\n" +"\t<input type='hidden' name='post_type' value='comma-separated list of post types'\n" +"\t/>. If you choose 'All public post types' or 'Everything' above, this option has no\n" +"\teffect. You can exclude custom post types with the minus notation, for example '-foo,bar,-baz'\n" +"\twould include 'bar' and exclude 'foo' and 'baz'." +msgstr "" +"Dacă nu doriți să indexați toate tipurile de documente personalizate, listați aici tipurile pe care doriți\n" +"\tsă le introduceți în index. Listați numele tipurilor de documente separate prin virgule. În formularul de căutare\n" +"\tse poate folosi un câmp ascuns pentru a restricționa căutarea la un singur tip de document personalizat:\n" +"\t<input type='hidden' name='post_type' value='listă separată prin virgule ale tipurilor de documente dorite' />.\n" +"\tDacă ați ales mai sus „Toate tipurile de documente publice” sau „Totul”, această opțiune nu mai are efect. Puteți exclude tipuri de documente\n" +"\tprin notare cu minus în cadrul listei, de exemplu '-foo,bar,-baz' va include 'bar' și va exclude 'foo' și 'baz'." + +#: ../relevanssi/relevanssi.php:3319 +msgid "Index and search your posts' attachments:" +msgstr "Indexare și căutare în atașamente:" + +#: ../relevanssi/relevanssi.php:3321 +msgid "If checked, Relevanssi will also index and search attachments of your posts (pictures, files and so on). Remember to rebuild the index if you change this option!" +msgstr "Dacă opțiunea este bifată Relevanssi va indexa și va căuta și atașamentele documentelor (imagini, fișiere, etc). Amintiți-vă să reconstruiți indexul dacă modificați această opțiune!" + +#: ../relevanssi/relevanssi.php:3416 +msgid "Uninstalling the plugin" +msgstr "Dezinstalarea modulului" + +#: ../relevanssi/relevanssi.php:3418 +msgid "If you want to uninstall the plugin, start by clicking the button below to wipe clean the options and tables created by the plugin, then remove it from the plugins list." +msgstr "Dacă doriți să dezinstalați modulul, începeți prin apăsarea butornului de mai jos pentru a șterge opțiunile și tabelele specifice din baza de date, apoi eliminați modulul din listă." + +#: ../relevanssi/relevanssi.php:3420 +msgid "Remove plugin data" +msgstr "Eliminarea datelor modulului" + +#~ msgid "Just posts" +#~ msgstr "Numai articolele" + +#~ msgid "Just pages" +#~ msgstr "Numai paginile" diff --git a/mu-plugins/relevanssi/relevanssi-ru_RU.po b/mu-plugins/relevanssi/relevanssi-ru_RU.po new file mode 100644 index 00000000..df55a451 --- /dev/null +++ b/mu-plugins/relevanssi/relevanssi-ru_RU.po @@ -0,0 +1,1392 @@ +msgid "" +msgstr "" +"Project-Id-Version: Relevanssi-ru_RU\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2013-07-24 16:58+0400\n" +"PO-Revision-Date: \n" +"Last-Translator: Flector \n" +"Language-Team: Flector \n" +"Language: ru_RU\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Poedit-KeywordsList: __;_e\n" +"X-Poedit-Basepath: .\n" +"X-Generator: Poedit 1.5.7\n" +"X-Poedit-SourceCharset: UTF-8\n" +"X-Poedit-SearchPath-0: .\n" + +#: relevanssi.php:296 +msgid "Tag weight:" +msgstr "Вес меток:" + +#: relevanssi.php:311 +msgid "Category weight:" +msgstr "Вес рубрик:" + +#: lib/excerpts-highlights.php:11 +msgid "There is no excerpt because this is a protected post." +msgstr "Отсутствует цитата, так как это защищенная запись." + +#: lib/indexing.php:93 +msgid "Indexing complete!" +msgstr "Индексирование завершено!" + +#: lib/init.php:40 +#, php-format +msgid "" +"Relevanssi needs attention: Remember to build the index (you can do it at the\n" +"\t\t\t settings page), otherwise searching won't work." +msgstr "" +"Relevanssi сообщает: Помните, что без построения индекса (для его создания " +"перейдите\n" +"\t\t\t на страницу настроек) поиск работать не будет." + +#: lib/init.php:84 lib/init.php:85 +msgid "User searches" +msgstr "История поиска" + +#: lib/interface.php:6 +msgid "Relevanssi Premium Search Options" +msgstr "Настройки плагина Relevanssi Premium" + +#: lib/interface.php:9 +msgid "Relevanssi Search Options" +msgstr "Настройки плагина Relevanssi" + +#: lib/interface.php:86 +msgid "User Searches" +msgstr "История поиска" + +#: lib/interface.php:88 +msgid "Relevanssi User Searches" +msgstr "Поисковые запросы" + +#: lib/interface.php:335 +#, php-format +msgid "" +"

Successfully added %d/%d terms to " +"stopwords!

" +msgstr "" +"

Слова %d из %d добавлены в черный " +"список!

" + +#: lib/interface.php:342 +#, php-format +msgid "" +"

Term '%s' added to stopwords!

" +msgstr "" +"

Слово '%s' добавлено в чёрный " +"список!

" + +#: lib/interface.php:345 +#, php-format +msgid "" +"

Couldn't add term '%s' to " +"stopwords!

" +msgstr "" +"

Не удалось добавить слово '%s' в " +"черный список!

" + +#: lib/interface.php:374 +msgid "" +"

Stopwords removed! Remember to re-" +"index.

" +msgstr "" +"

Черный список очищен. Не забудьте " +"выполнить переиндексацию!

" + +#: lib/interface.php:384 +#, php-format +msgid "" +"

Term '%s' removed from stopwords! " +"Re-index to get it back to index.

" +msgstr "" +"

Слово '%s' удалено из черного " +"списка! Выполните переиндексацию, чтобы включить его обратно в поиск.

" + +#: lib/interface.php:387 +#, php-format +msgid "" +"

Couldn't remove term '%s' from " +"stopwords!

" +msgstr "" +"

Не удалось удалить слово '%s' из " +"черного списка!

" + +#: lib/interface.php:398 +msgid "25 most common words in the index" +msgstr "25 самых частых слов в индексе" + +#: lib/interface.php:400 +msgid "" +"These words are excellent stopword material. A word that appears in most of " +"the posts in the database is quite pointless when searching. This is also an " +"easy way to create a completely new stopword list, if one isn't available in " +"your language. Click the icon after the word to add the word to the stopword " +"list. The word will also be removed from the index, so rebuilding the index " +"is not necessary." +msgstr "" +"Эти слова необходимо поместить в черный список, так как они не несут " +"смысловой нагрузки при поиске (частицы, союзы, предлоги и тому подобное). " +"Кликните на иконку рядом с выбранным словом, чтобы добавить его в черный " +"список. Переиндексацию при этом делать нет необходимости." + +#: lib/interface.php:426 +msgid "Add to stopwords" +msgstr "Добавить в черный список" + +#: lib/interface.php:437 +msgid "Total Searches" +msgstr "Общая статистика" + +#: lib/interface.php:440 +msgid "Totals" +msgstr "Всего" + +#: lib/interface.php:445 +msgid "Common Queries" +msgstr "Частые запросы" + +#: lib/interface.php:447 +msgid "" +"Here you can see the 20 most common user search queries, how many times " +"those \n" +"\t\tqueries were made and how many results were found for those queries." +msgstr "" +"Здесь выведен список из 20 наиболее частых запросов пользователей. Первая " +"колонка: поисковый запрос. Вторая колонка: сколько раз использовали данный " +"поисковый запрос. Третья колонка: количество результатов поиска по этому " +"поисковому запросу." + +#: lib/interface.php:453 lib/interface.php:469 lib/interface.php:501 +msgid "Today and yesterday" +msgstr "Сегодня и вчера" + +#: lib/interface.php:457 lib/interface.php:473 lib/interface.php:502 +msgid "Last 7 days" +msgstr "За последние 7 дней" + +#: lib/interface.php:461 lib/interface.php:477 lib/interface.php:503 +msgid "Last 30 days" +msgstr "За последние 30 дней" + +#: lib/interface.php:466 +msgid "Unsuccessful Queries" +msgstr "Неудачные запросы" + +#: lib/interface.php:484 +msgid "Reset Logs" +msgstr "Обнуление логов" + +#: lib/interface.php:487 +#, php-format +msgid "To reset the logs, type \"reset\" into the box here %s and click %s" +msgstr "Чтобы обнулить логи наберите слово \"reset\" в этом поле: %s %s" + +#: lib/interface.php:504 +msgid "Forever" +msgstr "За все время" + +#: lib/interface.php:506 +msgid "When" +msgstr "Когда" + +#: lib/interface.php:506 +msgid "Searches" +msgstr "Поиски" + +#: lib/interface.php:536 +msgid "Query" +msgstr "Запрос" + +#: lib/interface.php:536 +msgid "Hits" +msgstr "Найдено" + +#: lib/interface.php:846 lib/interface.php:891 +msgid "Basic options" +msgstr "Основные настройки" + +#: lib/interface.php:847 lib/interface.php:957 +msgid "Weights" +msgstr "Важность" + +#: lib/interface.php:848 lib/interface.php:1012 +msgid "Logs" +msgstr "Логи" + +#: lib/interface.php:849 lib/interface.php:1041 +msgid "Exclusions and restrictions" +msgstr "Исключения и ограничения" + +#: lib/interface.php:850 +msgid "Custom excerpts" +msgstr "Свои цитаты" + +#: lib/interface.php:851 +msgid "Highlighting search results" +msgstr "Подсветка результатов поиска" + +#: lib/interface.php:852 lib/interface.php:1187 +msgid "Indexing options" +msgstr "Настройки индексирования" + +#: lib/interface.php:853 lib/interface.php:1335 +msgid "Caching" +msgstr "Кэширование" + +#: lib/interface.php:854 lib/interface.php:1358 +msgid "Synonyms" +msgstr "Синонимы" + +#: lib/interface.php:855 lib/interface.php:1366 +msgid "Stopwords" +msgstr "Черный список" + +#: lib/interface.php:858 +msgid "Import/export options" +msgstr "Импорт/Экспорт настроек" + +#: lib/interface.php:861 +msgid "Buy Relevanssi Premium" +msgstr "Купить Relevanssi Premium" + +#: lib/interface.php:866 +msgid "Quick tools" +msgstr "Быстрый старт" + +#: lib/interface.php:868 +msgid "Save options" +msgstr "Сохранить настройки" + +#: lib/interface.php:869 +msgid "Build the index" +msgstr "Создать индекс" + +#: lib/interface.php:870 lib/interface.php:1333 +msgid "Continue indexing" +msgstr "Продолжить индексирование" + +#: lib/interface.php:870 +msgid "add" +msgstr "добавить" + +#: lib/interface.php:870 +msgid "documents." +msgstr "документ(ов)." + +#: lib/interface.php:874 +msgid "" +"WARNING: You've chosen no post types to index. Nothing will be indexed. Choose some post types to index." +msgstr "" +"ВНИМАНИЕ: Вы не выбрали ни один тип записей для включения в поисковый " +"индекс, поэтому нечего индексировать. Выбрать типы " +"записей для включения в индекс." + +#: lib/interface.php:878 +msgid "" +"Use 'Build the index' to build the index with current indexing options. If you can't finish indexing with one " +"go, use 'Continue indexing' to finish the job. You can change the number of " +"documents to add until you find the largest amount you can add with one go. " +"See 'State of the Index' below to find out how many documents actually go " +"into the index." +msgstr "" +"Используйте кнопку Создать индекс для построения поискового " +"индекса на основе выбранных настроек индексирования. " +"Если индексирование не будет завершено за один проход, то нажмите кнопку " +"Продолжить индексирование для завершения процесса. Вы " +"можете самостоятельно контролировать число документов, обрабатываемых за " +"один раз, указав нужное значение в текстовом поле. Состояние " +"индекса показывает, сколько документов уже проиндексировано." + +#: lib/interface.php:880 +msgid "" +"If Relevanssi doesn't index anything and you have upgraded from a 2.x " +"version, it's likely the changes in\n" +"\tthe database structure haven't gone through in the upgrade. In that case " +"all you need to do is to deactivate the\n" +"\tplugin and then activate it again." +msgstr "" +"При апгрейде с версий 2.x плагина вам необходимо деактивировать и заново " +"активировать плагин. В противном случае, плагин не сможет построить " +"поисковый индекс." + +#: lib/interface.php:884 +msgid "State of the Index" +msgstr "Состояние индекса" + +#: lib/interface.php:886 +msgid "Documents in the index" +msgstr "Документов в индексе" + +#: lib/interface.php:887 +msgid "Terms in the index" +msgstr "Слов в индексе" + +#: lib/interface.php:888 +msgid "Highest post ID indexed" +msgstr "ID последней проиндексированной записи" + +#: lib/interface.php:897 +msgid "Use search for admin:" +msgstr "Админ. панель" + +#: lib/interface.php:899 +msgid "If checked, Relevanssi will be used for searches in the admin interface" +msgstr "" +"Если выбрано, то Relevanssi заменит собой стандартный поиск в админ. панели." + +#: lib/interface.php:903 +msgid "Default operator for the search?" +msgstr "Как обрабатывать поисковый запрос?" + +#: lib/interface.php:905 +msgid "AND - require all terms" +msgstr "И - искать все слова" + +#: lib/interface.php:906 +msgid "OR - any term present is enough" +msgstr "ИЛИ - достаточно присутствия любого слова" + +#: lib/interface.php:908 +msgid "" +"If you choose AND and the search finds no matches, it will automatically do " +"an OR search." +msgstr "" +"Если поиск с условием \"И\" не даст результата, то автоматически будет " +"произведен поиск с условием \"ИЛИ\"." + +#: lib/interface.php:912 +msgid "Disable OR fallback:" +msgstr "Отключить замену на ИЛИ:" + +#: lib/interface.php:914 +msgid "" +"If you don't want Relevanssi to fall back to OR search when AND search gets " +"no hits, check this option. For most cases, leave this one unchecked." +msgstr "" +"Если поиск с оператором \"И\" не даст результатов, то плагин не будет " +"производить поиск с оператором \"ИЛИ\"." + +#: lib/interface.php:918 +msgid "Default order for results:" +msgstr "Сортировка результатов:" + +#: lib/interface.php:920 +msgid "Relevance (highly recommended)" +msgstr "По релевантности (рекомендуется)" + +#: lib/interface.php:921 +msgid "Post date" +msgstr "По дате публикации" + +#: lib/interface.php:923 +msgid "" +"If you want date-based results, see the recent post bonus in the Weights " +"section." +msgstr "" +"Если вы хотите, чтобы в результатах поиска приоритет отдавался новым " +"статьям, то задайте им нужный вес в секции Важность " +"(только в Premium версии плагина)." + +#: lib/interface.php:927 +msgid "When to use fuzzy matching?" +msgstr "Когда использовать нечеткое соответствие?" + +#: lib/interface.php:929 +msgid "When straight search gets no hits" +msgstr "Когда точные совпадения не найдены" + +#: lib/interface.php:930 +msgid "Always" +msgstr "Всегда" + +#: lib/interface.php:931 +msgid "Don't use fuzzy search" +msgstr "Не использовать" + +#: lib/interface.php:933 +msgid "" +"Straight search matches just the term. Fuzzy search matches everything that " +"begins or ends with the search term." +msgstr "" +"Точное соответствие проверяет слово целиком, а нечеткое соответствие ищет " +"совпадения в начале и конце слов." + +#: lib/interface.php:941 +msgid "Limit searches:" +msgstr "Ограничение результатов:" + +#: lib/interface.php:943 +msgid "" +"If this option is checked, Relevanssi will limit search results to at most " +"500 results per term. This will improve performance, but may cause some " +"relevant documents to go unfound. However, Relevanssi tries to prioritize " +"the most relevant documents. This does not work well when sorting " +"results by date. The throttle can end up cutting off recent posts " +"to favour more relevant posts." +msgstr "" +"При включении данной опции плагин не будет искать более 500 результатов на " +"один поисковый запрос. Включение данной опции улучшает производительность, " +"но часть релевантных документов может быть упущена." + +#: lib/interface.php:947 +msgid "Limit:" +msgstr "Лимит:" + +#: lib/interface.php:949 +msgid "" +"For better performance, adjust the limit to a smaller number. Adjusting the " +"limit to 100 - or even lower - should be safe for good results, and might " +"bring a boost in search speed." +msgstr "" +"Чем меньше число, тем выше производительность поиска. При лимите в 100 (или " +"даже меньше) результатов поиска можно сохранить приемлимые результаты выдачи " +"при хорошей скорости поиска." + +#: lib/interface.php:959 +msgid "" +"These values affect the weights of the documents. These are all multipliers, " +"so 1 means no change in weight, less than 1 means less weight, and more than " +"1 means more weight. Setting something to zero makes that worthless. For " +"example, if title weight is more than 1, words in titles are more " +"significant than words elsewhere. If title weight is 0, words in titles " +"won't make any difference to the search results." +msgstr "" +"В этом разделе вы можете указать вес (приоритет, важность) различным " +"элементам сайта. Чем выше вес - тем значимей данный элемент и тем больше " +"шансов у страницы с этим элементом оказаться среди первых результатов " +"поиска. На практике это значит, что если в заголовке записи есть искомое " +"слово, а у заголовка установлен вес в 5 единиц, то практически наверняка эта " +"запись будет первой среди других результатов поиска (если, конечно, другие " +"записи тоже не содержат в заголовке искомое слово)." + +#: lib/interface.php:964 +msgid "Element" +msgstr "Элемент" + +#: lib/interface.php:965 +msgid "Weight" +msgstr "Вес" + +#: lib/interface.php:966 +msgid "Default weight" +msgstr "Вес по умолчанию" + +#: lib/interface.php:971 +msgid "Post titles" +msgstr "Вес заголовков" + +#: lib/interface.php:983 +msgid "Comment text" +msgstr "Вес комментариев" + +#: lib/interface.php:1004 +msgid "WPML compatibility" +msgstr "WPML совместимость" + +#: lib/interface.php:1006 +msgid "Limit results to current language:" +msgstr "Ограничить результаты для текущего языка:" + +#: lib/interface.php:1008 +msgid "" +"If this option is checked, Relevanssi will only return results in the " +"current active language. Otherwise results will include posts in every " +"language." +msgstr "" +"Если опция включена, то Relevanssi будет возвращать результаты только для " +"текущего языка блога." + +#: lib/interface.php:1014 +msgid "Keep a log of user queries:" +msgstr "Записывать поисковые запросы пользователей:" + +#: lib/interface.php:1016 +msgid "" +"If checked, Relevanssi will log user queries. The log appears in 'User " +"searches' on the Dashboard admin menu." +msgstr "" +"Если опция включена, то Relevanssi будет записывать все поисковые запросы " +"пользователей. Найти их можно будет по ссылке \"История поиска\" в разделе " +"\"Консоль\" ." + +#: lib/interface.php:1020 +msgid "Log the user's IP with the queries:" +msgstr "Записывать IP пользователей" + +#: lib/interface.php:1022 +msgid "If checked, Relevanssi will log user's IP-Adress with the queries." +msgstr "" +"Если опция включена, то Relevanssi будет записывать IP пользователей вместе " +"с их поисковыми запросами." + +#: lib/interface.php:1026 +msgid "Don't log queries from these users:" +msgstr "Не записывать поисковые запросы этих пользователей:" + +#: lib/interface.php:1028 +msgid "" +"Comma-separated list of numeric user IDs or user login names that will not " +"be logged." +msgstr "" +"Введите через запятую ID или логины пользователей, чьи запросы не надо " +"записывать в журнал." + +#: lib/interface.php:1032 +msgid "" +"If you enable logs, you can see what your users are searching for. You can " +"prevent your own searches from getting in the logs with the omit feature." +msgstr "" +"Если вы включите запись поисковых запросов пользователей, то сможете " +"увидеть, что они ищут на вашем сайте. Вы можете исключить из логов свои " +"собственные поисковые запросы." + +#: lib/interface.php:1035 +msgid "" +"If you enable logs, you can see what your users are searching for. Logs are " +"also needed to use the 'Did you mean?' feature. You can prevent your own " +"searches from getting in the logs with the omit feature." +msgstr "" +"Если вы включите запись поисковых запросов пользователей, то сможете " +"увидеть, что они ищут на вашем сайте. Запись поисковых запросов также " +"необходима для использования функции \"Возможно, вы имели в виду:\". Вы " +"можете исключить из логов свои собственные поисковые запросы." + +#: lib/interface.php:1043 +msgid "Restrict search to these categories and tags:" +msgstr "Искать только среди этих рубрик и меток:" + +#: lib/interface.php:1045 +msgid "" +"Enter a comma-separated list of category and tag IDs to restrict search to " +"those categories or tags. You can also use <input type='hidden' " +"name='cats' value='list of cats and tags' /> in your search form. " +"The input field will \toverrun this setting." +msgstr "" +"Введите через запятую ID рубрик и меток, чтобы поиск велся только по ним. " + +#: lib/interface.php:1049 +msgid "Exclude these categories and tags from search:" +msgstr "Исключить из поиска эти рубрики и метки:" + +#: lib/interface.php:1051 +msgid "" +"Enter a comma-separated list of category and tag IDs that are excluded from " +"search results. You can exclude categories with the 'cat' input field by " +"using negative values." +msgstr "" +"Введите через запятую ID рубрик и меток, которые необходимо исключить из " +"результатов поиска. " + +#: lib/interface.php:1055 +msgid "Exclude these posts/pages from search:" +msgstr "Исключить эти записи/страницы из поиска:" + +#: lib/interface.php:1059 +msgid "" +"Enter a comma-separated list of post/page IDs that are excluded from search " +"results. This only works here, you can't use the input field option " +"(WordPress doesn't pass custom parameters there). You can also use a " +"checkbox on post/page edit pages to remove posts from index." +msgstr "" +"Введите через запятую ID записей/страниц, которые необходимо исключить из " +"результатов поиска. Также вы можете использовать для этого чекбокс на " +"странице редактирования записи/страницы." + +#: lib/interface.php:1062 +msgid "" +"Enter a comma-separated list of post/page IDs that are excluded from search " +"results. This only works here, you can't use the input field option " +"(WordPress doesn't pass custom parameters there)." +msgstr "" +"Введите через запятую ID записей/страниц, которые необходимо исключить из " +"результатов поиска." + +#: lib/interface.php:1068 +msgid "Respect exclude_from_search for custom post types:" +msgstr "Учитывать exclude_from_search в произвольных типах записей:" + +#: lib/interface.php:1070 +msgid "" +"If checked, Relevanssi won't display posts of custom post types that have " +"'exclude_from_search' set to true. If not checked, Relevanssi will display " +"anything that is indexed." +msgstr "" +"Если опция включена, то Relevanssi не будет показывать записи произвольных " +"типов, в которых значение 'exclude_from_search' равно true. Если опция " +"отключена, то Relevanssi будет показывать все проиндексированные записи." + +#: lib/interface.php:1072 +msgid "Custom excerpts/snippets" +msgstr "Свои цитаты/сниппеты " + +#: lib/interface.php:1074 +msgid "Create custom search result snippets:" +msgstr "Создавать свои цитаты для результатов поиска:" + +#: lib/interface.php:1076 +msgid "" +"If checked, Relevanssi will create excerpts that contain the search term " +"hits. To make them work, make sure your search result template uses " +"the_excerpt() to display post excerpts." +msgstr "" +"Если опция включена, то Relevanssi будет создавать свои цитаты, содержащие " +"искомый запрос. Данная опция будет работать только, если в теме блога в " +"файле search.php используется функция the_excerpt для вывода цитат записей." + +#: lib/interface.php:1078 +msgid "" +"Note: Building custom excerpts can be slow. If you are not actually using " +"the excerpts, make sure you disable the option." +msgstr "" +"Примечание: создание своих цитат может быть очень медленным. Если вы в своей " +"теме блога не используете вывод цитат, то вам лучше отключить данную опцию." + +#: lib/interface.php:1080 +msgid "Length of the snippet:" +msgstr "Длина цитаты:" + +#: lib/interface.php:1083 +msgid "characters" +msgstr "символов" + +#: lib/interface.php:1084 +msgid "words" +msgstr "слов" + +#: lib/interface.php:1086 +msgid "This must be an integer." +msgstr "Значение должно быть целым числом." + +#: lib/interface.php:1090 +msgid "Allowable tags in excerpts:" +msgstr "Разрешенные теги:" + +#: lib/interface.php:1093 +msgid "" +"List all tags you want to allow in excerpts, without any whitespace. For " +"example: '<p><a><strong>'." +msgstr "" +"Список тегов, которые не будут вырезаться парсером из цитат. Указывать без " +"пробелов и запятых, например: '<p><a><strong>'." + +#: lib/interface.php:1097 +msgid "Show breakdown of search hits in excerpts:" +msgstr "Показывать выдержку с числом совпадений: " + +#: lib/interface.php:1099 +msgid "" +"Check this to show more information on where the search hits were made. " +"Requires custom snippets to work." +msgstr "" +"Включите эту опцию, чтобы вывести в своей цитате выдержку с числом поисковых " +"совпадений." + +#: lib/interface.php:1103 +msgid "The breakdown format:" +msgstr "Шаблон выдержки:" + +#: lib/interface.php:1105 +msgid "" +"Use %body%, %title%, %tags% and %comments% to display the number of hits (in " +"different parts of the post), %total% for total hits, %score% to display the " +"document weight and %terms% to show how many hits each search term got. No " +"double quotes (\") allowed!" +msgstr "" +"Используйте %body%, %title%, %tags% и %comments% для вывода числа поисковых " +"совпадений (в различных частях записи), %total% для общего числа поисковых " +"совпадений, %score% для отображения веса элемента и %terms% для вывода числа " +"переходов на каждое поисковое слово. Нельзя использовать кавычки вида " +"\" (знаки дюйма)!" + +#: lib/interface.php:1107 +msgid "Search hit highlighting" +msgstr "Подсветка совпадений в результатах поиска" + +#: lib/interface.php:1109 +msgid "First, choose the type of highlighting used:" +msgstr "Сначала выберите используемый тип подсветки:" + +#: lib/interface.php:1112 +msgid "Highlight query terms in search results:" +msgstr "Тип подсветки:" + +#: lib/interface.php:1114 +msgid "No highlighting" +msgstr "Без подсветки" + +#: lib/interface.php:1118 +msgid "Text color" +msgstr "Цвет текста" + +#: lib/interface.php:1119 +msgid "Background color" +msgstr "Цвет фона" + +#: lib/interface.php:1120 +msgid "CSS Style" +msgstr "Стиль CSS" + +#: lib/interface.php:1121 +msgid "CSS Class" +msgstr "Класс CSS" + +#: lib/interface.php:1123 +msgid "Highlighting isn't available unless you use custom snippets" +msgstr "" +"Подсветка в тексте цитат будет работать только при использовании своих цитат." + +#: lib/interface.php:1127 +msgid "Highlight query terms in result titles too:" +msgstr "Подсвечивать совпадения в заголовках записей:" + +#: lib/interface.php:1133 +msgid "Highlight query terms in documents from local searches:" +msgstr "Подсвечивать совпадения в записях:" + +#: lib/interface.php:1135 +msgid "" +"Highlights hits when user opens the post from search results. This is based " +"on HTTP referrer, so if that's blocked, there'll be no highlights." +msgstr "" +"Подсвечивать совпадения, если пользователь открывает запись со страницы с " +"результатами поиска. Не будет работать, если передача HTTP referrer у " +"пользователя запрещена." + +#: lib/interface.php:1141 +msgid "Highlight query terms in comments:" +msgstr "Подсвечивать совпадения в комментариях:" + +#: lib/interface.php:1143 +msgid "" +"Highlights hits in comments when user opens the post from search results." +msgstr "" +"Подсвечивать совпадения в комментариях, если пользователь открывает запись " +"со страницы с результатами поиска. Не будет работать, если передача HTTP " +"referrer у пользователя запрещена." + +#: lib/interface.php:1147 +msgid "Uncheck this if you use non-ASCII characters:" +msgstr "Снимите галку, если вы используете не ASCII символы." + +#: lib/interface.php:1149 +msgid "" +"If you use non-ASCII characters (like Cyrillic alphabet) and the highlights " +"don't work, uncheck this option to make highlights work." +msgstr "Для русского языка отключение данной опции обязательно!" + +#: lib/interface.php:1154 +msgid "Then adjust the settings for your chosen type:" +msgstr "Теперь укажите параметры выбранного типа подсветки:" + +#: lib/interface.php:1158 +msgid "Text color for highlights:" +msgstr "Цвет текста для подсветки:" + +#: lib/interface.php:1160 lib/interface.php:1166 +msgid "Use HTML color codes (#rgb or #rrggbb)" +msgstr "Используйте цвета в кодах HTML (#rgb или #rrggbb)" + +#: lib/interface.php:1164 +msgid "Background color for highlights:" +msgstr "Цвет фона подсветки:" + +#: lib/interface.php:1170 +msgid "CSS style for highlights:" +msgstr "Стиль CSS для подсветки:" + +#: lib/interface.php:1172 +msgid "" +"You can use any CSS styling here, style will be inserted with a <span>" +msgstr "" +"Вы можете использовать любую CSS-стилизацию. Стиль будет обернут с помощью " +"тегов <span>." + +#: lib/interface.php:1176 +msgid "CSS class for highlights:" +msgstr "Класс CSS для подсветки:" + +#: lib/interface.php:1178 +msgid "" +"Name a class here, search results will be wrapped in a <span> with the " +"class" +msgstr "" +"Укажите имя класса CSS для элемента <span>, который будет " +"использоваться для подсветки результата поиска." + +#: lib/interface.php:1185 lib/interface.php:1364 +msgid "Save the options" +msgstr "Сохранить настройки" + +#: lib/interface.php:1189 +msgid "Choose post types to index:" +msgstr "Выберите типы записей для индексирования:" + +#: lib/interface.php:1194 +msgid "Type" +msgstr "Тип" + +#: lib/interface.php:1195 lib/interface.php:1241 +msgid "Index" +msgstr "Индекс" + +#: lib/interface.php:1196 lib/interface.php:1242 +msgid "Public?" +msgstr "Открыт?" + +#: lib/interface.php:1213 lib/interface.php:1256 +#, php-format +msgid "%s" +msgstr "%s" + +#: lib/interface.php:1214 lib/interface.php:1257 +msgid "yes" +msgstr "да" + +#: lib/interface.php:1214 lib/interface.php:1257 +msgid "no" +msgstr "нет" + +#: lib/interface.php:1235 +msgid "Choose taxonomies to index:" +msgstr "Выберите таксономии для индексирования:" + +#: lib/interface.php:1240 +msgid "Taxonomy" +msgstr "Таксономия" + +#: lib/interface.php:1277 +msgid "" +"If you check a taxonomy here, the terms for that taxonomy are indexed with " +"the posts. If you for example choose \"post_tag\", searching for tags will " +"find all posts that have the tag." +msgstr "" +"Если вы выбрали таксономии, то термины этих таксономий будут " +"проиндексированы вместе с записями. Например, при поиске \"метка_записи\" " +"будут найдены все записи с данной меткой." + +#: lib/interface.php:1281 +msgid "Minimum word length to index" +msgstr "Минимальная длина слов для включения в индекс" + +#: lib/interface.php:1283 +msgid "Words shorter than this number will not be indexed." +msgstr "" +"Слова, которые короче указанного значения будут проигнорированы при " +"построении индекса. Для русского языка (UTF-8) необходимо увеличить данное " +"число в 2 раза (из-за особенностей кодировки)." + +#: lib/interface.php:1289 +msgid "Expand shortcodes in post content:" +msgstr "Выполнять шорткоды в тексте записей:" + +#: lib/interface.php:1291 +msgid "" +"If checked, Relevanssi will expand shortcodes in post content before " +"indexing. Otherwise shortcodes will be stripped. If you use shortcodes to " +"include dynamic content, Relevanssi will not keep the index updated, the " +"index will reflect the status of the shortcode content at the moment of " +"indexing." +msgstr "" +"Если опция включена, то Relevanssi будет выполнять выполнять шорткоды в " +"тексте записей перед тем, как провести индексирование. В противном случае " +"содержимое шорткодов будет исключено из поискового индекса. Если вы " +"используете шорткоды с динамическим контентом, то Relevanssi сохранит в " +"индексе только ту информацию, которая была там в момент индексирования." + +#: lib/interface.php:1297 +msgid "Index and search your posts' authors:" +msgstr "Индексировать и искать авторов:" + +#: lib/interface.php:1299 +msgid "" +"If checked, Relevanssi will also index and search the authors of your posts. " +"Author display name will be indexed. Remember to rebuild the index if you " +"change this option!" +msgstr "" +"Если опция включена, то Relevanssi будет индексировать и искать авторов " +"записей (будут проиндексированы отображаемые имена авторов). Не забудьте " +"произвести переиндексацию при изменении данной опции!" + +#: lib/interface.php:1303 +msgid "Index and search post excerpts:" +msgstr "Индексировать и искать в цитатах:" + +#: lib/interface.php:1305 +msgid "" +"If checked, Relevanssi will also index and search the excerpts of your posts." +"Remember to rebuild the index if you change this option!" +msgstr "" +"Если опция включена, то Relevanssi будет индексировать и искать в цитатах " +"записей. Не забудьте произвести переиндексацию при изменении данной опции!" + +#: lib/interface.php:1309 +msgid "Index and search these comments:" +msgstr "Индексировать и искать в комментариях:" + +#: lib/interface.php:1311 +msgid "none" +msgstr "нет" + +#: lib/interface.php:1312 +msgid "normal" +msgstr "обычно" + +#: lib/interface.php:1313 +msgid "all" +msgstr "все" + +#: lib/interface.php:1315 +msgid "" +"Relevanssi will index and search ALL (all comments including track- & " +"pingbacks and custom comment types), NONE (no comments) or NORMAL (manually " +"posted comments on your blog).
Remember to rebuild the index if you " +"change this option!" +msgstr "" +"Relevanssi будет индексировать и искать по комментариям в зависимости от " +"выбранной опции: НЕТ (не искать), ОБЫЧНО (учитываются только комментарии от " +"пользователей), ВСЕ (учитываются все комментарии, включая обратные ссылки и " +"уведомления). Не забудьте произвести переиндексацию при изменении данной " +"опции!" + +#: lib/interface.php:1319 +msgid "Custom fields to index:" +msgstr "Произвольные поля для индексирования:" + +#: lib/interface.php:1321 +msgid "" +"A comma-separated list of custom fields to include in the index. Set to " +"'visible' to index all visible custom fields and to 'all' to index all " +"custom fields, also those starting with a '_' character." +msgstr "" +"Перечислите через запятую произвольные поля, которые необходимо " +"проиндексировать. Введите 'visible' для индексирования всех видимых " +"произвольных полей или 'all' - для индексирования всех полей, включая " +"невидимые (начинающиеся с символа '_')." + +#: lib/interface.php:1331 +msgid "Save indexing options and build the index" +msgstr "Сохранить настройки и создать индекс" + +#: lib/interface.php:1337 +msgid "" +"Warning: In many cases caching is not useful, and in some cases can be even " +"harmful. Do not\n" +"\tactivate cache unless you have a good reason to do so." +msgstr "" +"Внимание: в большинстве случаев кэширование может работать некорректно. Не " +"используйте его без серьезных на то причин." + +#: lib/interface.php:1340 +msgid "Enable result and excerpt caching:" +msgstr "Включить кэширование:" + +#: lib/interface.php:1342 +msgid "If checked, Relevanssi will cache search results and post excerpts." +msgstr "" +"Если опция включена, то Relevanssi будет будет кэшировать результаты " +"поисковых запросов." + +#: lib/interface.php:1346 +msgid "Cache expire (in seconds):" +msgstr "Время жизни кэша (в секундах):" + +#: lib/interface.php:1348 +msgid "86400 = day" +msgstr "86400 = день" + +#: lib/interface.php:1352 +msgid "Entries in the cache" +msgstr "Записей в кэше" + +#: lib/interface.php:1356 +msgid "Clear all caches" +msgstr "Очистить кэш" + +#: lib/interface.php:1362 +msgid "" +"Add synonyms here in 'key = value' format. When searching with the OR " +"operator, any search of 'key' will be expanded to include 'value' as well. " +"Using phrases is possible. The key-value pairs work in one direction only, " +"but you can of course repeat the same pair reversed." +msgstr "" +"Добавьте синонимы в формате 'ключ = значение' (один на строку). При поиске с " +"условием 'ИЛИ' результаты поиска будут учитывать значение ключа. Можно " +"использовать фразы. Пары \"ключ-значение\" работают только в одну сторону, " +"поэтому не забывайте (при необходимости) добавлять обратные пары ('значение-" +"ключ')." + +#: lib/interface.php:1385 +msgid "" +"

Enter a word here to add it to the list of stopwords. The word will " +"automatically be removed from the index, so re-indexing is not necessary. " +"You can enter many words at the same time, separate words with commas.

" +msgstr "" +"

Введите слово, чтобы добавить его в черный список. Несколько слов " +"необходимо разделить запятыми. Из поискового индекса они будут исключены " +"автоматически и проводить переиндексирование нет нужды.

" + +#: lib/interface.php:1387 +msgid "Stopword(s) to add: " +msgstr "Добавить в черный список:" + +#: lib/interface.php:1388 +msgid "Add" +msgstr "Добавить" + +#: lib/interface.php:1391 +msgid "" +"

Here's a list of stopwords in the database. Click a word to remove it " +"from stopwords. Removing stopwords won't automatically return them to index, " +"so you need to re-index all posts after removing stopwords to get those " +"words back to index." +msgstr "" +"

Здесь указаны все слова, находящиеся в черном списке. Кликните на слово, " +"чтобы удалить его из черного списка. Удаление слов из черного списка не " +"означает, что оно автоматически вернется в индекс, а поэтому вам необходимо " +"будет произвести переиндексацию." + +#: lib/interface.php:1417 +msgid "Remove all stopwords" +msgstr "Очистить черный список" + +#: lib/interface.php:1423 +msgid "" +"Here's a list of stopwords you can use to export the stopwords to another " +"blog." +msgstr "Данный черный список можно использовать для экспорта в другой блог." + +#: lib/uninstall.php:39 +msgid "Data wiped clean, you can now delete the plugin." +msgstr "Информация плагина была очищена, тперь вы можете удалить плагин." + +#~ msgid "Options updated!" +#~ msgstr "Ustawienia zostały zaktualizowane!" + +#~ msgid "API key:" +#~ msgstr "Klucz API:" + +#~ msgid "" +#~ "API key is required to use the automatic update feature. Get yours from " +#~ "Relevanssi.com." +#~ msgstr "" +#~ "Klucz API jest wymagany aby umożliwić automatyczne aktualizacje. Zdobądź " +#~ "go na stronie Relevanssi.com." + +#~ msgid "How to index internal links:" +#~ msgstr "Sposób indeksowania linków wewnętrznych:" + +#~ msgid "No special processing for internal links" +#~ msgstr "Bez specjalnego indeksowania linków wewnętrznych" + +#~ msgid "Index internal links for target documents only" +#~ msgstr "Indeksowanie linków wewnętrznych tylko dla dokumentów docelowych" + +#~ msgid "Index internal links for both target and source" +#~ msgstr "" +#~ "Indeksowanie linków wewnętrznych zarówno dla źródeł jak i dokumentów " +#~ "docelowych" + +#~ msgid "" +#~ "Internal link anchor tags can be indexed for target document (so the text " +#~ "will match the document the link points to), both target and source or " +#~ "source only (with no extra significance for the links). See Relevanssi " +#~ "Knowledge Base for more details. Changing this option requires reindexing." +#~ msgstr "" +#~ "Linki wewnętrzne mogą być indeksowane dla dokumentów docelowych (tak aby " +#~ "tekst pasował do dokumentu na który wskazuje), zarówno dla docelowyc jak " +#~ "i źródeł lub tylko dla źródeł (bez dodatkowego wpływu na linki). Zobacz " +#~ "bazę wiedzy Relevanssi aby dowiedzieć się więcej. Zmiana tego ustawienia " +#~ "wymaga ponownego indeksowania." + +#~ msgid "Hide Relevanssi on edit pages:" +#~ msgstr "Ukryj Relevanssi na stronach edycji:" + +#~ msgid "" +#~ "If you check this option, all Relevanssi features are removed from edit " +#~ "pages." +#~ msgstr "" +#~ "Jeśli zaznaczysz tę opcję, wszystkie funkcje Relevanssi zostaną usunięte " +#~ "z ekranów edycji." + +#~ msgid "Internal links" +#~ msgstr "Linki wewnętrzne" + +#~ msgid "Post type '%s':" +#~ msgstr "Typ wpisu '%s':" + +#~ msgid "Weight multiplier for new posts:" +#~ msgstr "Mnożnik wagi dla nowych wpisów:" + +#~ msgid "Assign bonus for posts newer than:" +#~ msgstr "Przyznaj bonus dla wpisów nowszych niż:" + +#~ msgid "days" +#~ msgstr "dni" + +#~ msgid "" +#~ "Posts newer than the day cutoff specified here will have their weight " +#~ "multiplied with the bonus above." +#~ msgstr "" +#~ "Wpisy nowsze niż określona tutaj liczba dni będą miały wagę pomnożoną " +#~ "przez podaną liczbę." + +#~ msgid "Don't show Relevanssi branding on the 'User Searches' screen:" +#~ msgstr "" +#~ "Nie wyświetlaj informacji o Relevanssi na ekranie 'Statystyk " +#~ "wyszukiwania':" + +#~ msgid "Highlight query terms in documents from external searches:" +#~ msgstr "" +#~ "Podświetl wyszukiwane frazy w dokumentach z zewnętrznych wyszukiwarek:" + +#~ msgid "" +#~ "Highlights hits when user arrives from external search. Currently " +#~ "supports Google, Bing, Ask, Yahoo and AOL Search." +#~ msgstr "" +#~ "Podświetl trafienia jeśli użytkownik pochodzi z zewnętrznych " +#~ "wyszukiwarek. Aktualnie wspierane są Google, Bing, Ask, Yahoo i AOL " +#~ "Search." + +#~ msgid "Thousands separator" +#~ msgstr "Separator liczb (tysięcy)" + +#~ msgid "" +#~ "If Relevanssi sees this character between numbers, it'll stick the " +#~ "numbers together no matter how the character would otherwise be handled. " +#~ "Especially useful if a space is used as a thousands separator." +#~ msgstr "" +#~ "Jeśli Relevanssi znajdzie ten znak między cyframi, zignoruje go i " +#~ "rozpozna całą liczbę. Jest to szczególnie przydatne gdy jako separator " +#~ "stosowana jest spacja." + +#~ msgid "Custom MySQL columns to index:" +#~ msgstr "Własne kolumny MySQL do zaindeksowania:" + +#~ msgid "" +#~ "A comma-separated list of wp_posts MySQL table columns to include in the " +#~ "index. Following columns are available: " +#~ msgstr "" +#~ "Oddzielona przecinkami lista kolumn MySQL z tabeli wp_posts, które mają " +#~ "być zaindeksowane. Dostępne są następujące kolumny:" + +#~ msgid "Index and search user profiles:" +#~ msgstr "Indeksowanie i przeszukiwanie profili użytkowników:" + +#~ msgid "" +#~ "If checked, Relevanssi will also index and search user profiles (first " +#~ "name, last name, display name and user description). Requires changes to " +#~ "search results template, see Relevanssi Knowledge Base." +#~ msgstr "" +#~ "Jeśli zostanie zaznaczone, Relevanssi będzie indeksować i przeszukiwać " +#~ "profile użytkowników (imię, nazwisko, wyświetlana nazwa i opis " +#~ "użytkownika). Wymaga to zmian w szablonie wyszukiwania (zobacz w bazie " +#~ "wiedzy Relevansii)." + +#~ msgid "Index subscriber profiles:" +#~ msgstr "Indeksowanie profili subskrybentów:" + +#~ msgid "" +#~ "If checked, Relevanssi will index subscriber profiles as well, otherwise " +#~ "only authors, editors, contributors and admins are indexed." +#~ msgstr "" +#~ "Jeśli zostanie zaznaczone, Relevanssi będzie indeksować także profile " +#~ "subskrybentów. W przeciwnym wypadku indeksowane będą tylko profile " +#~ "autorów, redaktorów, współpracowników i administratorów." + +#~ msgid "Extra user fields to index:" +#~ msgstr "Dodatkowe pola użytkowników do zaindeksowania:" + +#~ msgid "" +#~ "A comma-separated list of user profile field names (names of the database " +#~ "columns) to include in the index." +#~ msgstr "" +#~ "Oddzielona przecinkami lista nazw pól w profilach użytkownika (nazw " +#~ "kolumn w bazie danych), które mają być zaindeksowane." + +#~ msgid "Index and search taxonomy pages:" +#~ msgstr "Indeksowanie i przeszukiwanie stron taksonomii:" + +#~ msgid "" +#~ "If checked, Relevanssi will also index and search taxonomy pages " +#~ "(categories, tags, custom taxonomies)." +#~ msgstr "" +#~ "Jeśli zostanie zaznaczone, Relevanssi będzie indeksować i przeszukiwać " +#~ "także strony taksonomii (kategorii, tagów, własnych taksonomii)." + +#~ msgid "Taxonomy pages to index:" +#~ msgstr "Strony taksonomi do zaindeksowania:" + +#~ msgid "" +#~ "A comma-separated list of taxonomies to include in the taxonomy page " +#~ "index ('all' indexes all custom taxonomies. If you don't use 'all', " +#~ "remember to list 'category' and 'post_tag')." +#~ msgstr "" +#~ "Oddzielona przecinkami lista taksonomii, które mają być ujęte w indeksie " +#~ "stron taksonomii (wpisanie 'all' spowoduje zaindeksowanie wszystkich " +#~ "taksonomii. Jeśli nie użyjesz 'all' dodaj przynajmniej 'category' i " +#~ "'post_tag')." + +#~ msgid "Import or export options" +#~ msgstr "Importowanie i eksportowanie ustawień" + +#~ msgid "" +#~ "Here you find the current Relevanssi Premium options in a text format. " +#~ "Copy the contents of the text field to make a backup of your settings. " +#~ "You can also paste new settings here to change all settings at the same " +#~ "time. This is useful if you have default settings you want to use on " +#~ "every system." +#~ msgstr "" +#~ "Możesz tu znaleźć ustawienia Relevanssi Premium w formie tekstowej. " +#~ "Skopiuj zawartość tego pola aby utworzyć kopię zapasową ustawień. Możesz " +#~ "także wkleić tutaj nowe ustawienia aby je w prosty sposób zmienić. Jest " +#~ "to przydatne jeśli masz domyślne ustawienia, któe stosujesz na wielu " +#~ "stronach." + +#~ msgid "Import settings" +#~ msgstr "Importuj ustawienia" + +#~ msgid "" +#~ "Note! Make sure you've got correct settings from a right version of " +#~ "Relevanssi. Settings from a different version of Relevanssi may or may " +#~ "not work and may or may not mess your settings." +#~ msgstr "" +#~ "Uwaga! Upewnij się że używasz ustawień odpowiednich dla konkretnej wersji " +#~ "Relevansii. Ustawienia z wersji innej niż stosowana mogą nie działać i " +#~ "powodować problemy." + +#~ msgid "Thank you!" +#~ msgstr "Dziękujemy!" + +#~ msgid "" +#~ "Thank you for buying Relevanssi Premium! Your support makes it possible " +#~ "for me to keep working on this plugin." +#~ msgstr "" +#~ "Dziękujemy za wybranie Relevanssi Premium. Twoje wsparcie umożliwia " +#~ "dalsze prace nad tą wtyczką." + +#~ msgid "" +#~ "I can do custom hacks based on Relevanssi and other WordPress " +#~ "development. If you need someone to fix your WordPress, just ask me for a " +#~ "quote." +#~ msgstr "" +#~ "Mogę przygotować dowolną modyfikację opartą o Relevanssi i WordPress. " +#~ "Jeśli szukasz kogoś, kto popracowałby nad Twoją stroną, wyślij zapytanie." + +#~ msgid "Relevanssi on Facebook" +#~ msgstr "Relevanssi na Facebooku" + +#~ msgid "Check out the Relevanssi page on Facebook" +#~ msgstr "Sprawdź stronę Relevanssi na Facebooku" + +#~ msgid "for news and updates about your favourite plugin." +#~ msgstr "" +#~ "aby być na bierząco informowanym o aktualnościach i innych wydarzeniach " +#~ "związanych z Twoją ulubioną wtyczką." + +#~ msgid "Help and support" +#~ msgstr "Pomoc" + +#~ msgid "For Relevanssi support, see:" +#~ msgstr "Aby uzyskać pomoc, zobacz:" + +#~ msgid "Plugin support page" +#~ msgstr "Strona pomocy" + +#~ msgid "WordPress.org forum" +#~ msgstr "Forum na Wordpress.com" + +#~ msgid "Did you know this feature?" +#~ msgstr "Czy znałeś tę funkcję?" + +#~ msgid "" +#~ "Wrap the parts of the posts you don't want to include in the index in " +#~ "[noindex] shortcode." +#~ msgstr "" +#~ "Zaznacz fragmenty treści, których nie chcesz zaindeksować w skrót " +#~ "[noindex]." + +#~ msgid "Use the [search] shortcode to build easy links to search results." +#~ msgstr "" +#~ "Użyj skrótu [search] aby w prosty sposób utworzyć linki do wyników " +#~ "wyszukiwania." + +#~ msgid "" +#~ "Enable the English-language stemmer by adding this line in your functions." +#~ "php:" +#~ msgstr "" +#~ "Włącz odmiany zwrotów w języku angielskim dodają tę linię kodu do pliku " +#~ "functions.php:" + +#~ msgid "Boolean NOT" +#~ msgstr "Warunek boolean NOT" + +#~ msgid "To get results without particular word, use the minus operator" +#~ msgstr "Aby uzyskać wyniki bez określnoego zwrotu użyj operatora minus (-)" + +#~ msgid "cats -dogs" +#~ msgstr "koty-psy" + +#~ msgid "Boolean AND" +#~ msgstr "Warunek boolean AND" + +#~ msgid "To force a particular term in an OR search, use the plus operator" +#~ msgstr "" +#~ "Aby wymusić określony termin w wyszukiwaniu w trybie OR, użyj operatora " +#~ "plus (+)" + +#~ msgid "+cats dogs mice" +#~ msgstr "+koty psy myszy" + +#~ msgid "" +#~ "would require that all results include the term 'cats', and results " +#~ "including all three terms will be favoured. The plus operator has no " +#~ "effect in an AND search, where all terms have an implicit + before them." +#~ msgstr "" +#~ "będzie wymagać aby wszystkie wyniki zawierały zwrot 'cats' a wyniki " +#~ "zawierające każdy z tych trzech zwrotów będą faworyzowane. Operator plus " +#~ "nie ma żadnego działania w wyszukiwaniu w trybie OR, ponieważ wówczas " +#~ "wszystkie zwroty mają taki operator." + +#~ msgid "Relevanssi post controls" +#~ msgstr "Ustawienia wyszukiwania" + +#~ msgid "Exclude this post or page from the index." +#~ msgstr "Wyklucz ten wpis lub stronę z indeksowania i wyszukiwania" + +#~ msgid "Index and search your posts' tags:" +#~ msgstr "Indeksowanie i wyszukiwanie tagów:" + +#~ msgid "" +#~ "If checked, Relevanssi will also index and search the tags of your posts. " +#~ "Remember to rebuild the index if you change this option!" +#~ msgstr "" +#~ "Jeśli zostanie zaznaczone, Relevanssi będzie także indeksować i " +#~ "wyszukiwać tagów znajdujących się we wpisach. Pamiętaj o przebudowaniu " +#~ "indeksu, jeśli zmienisz te ustawienia." + +#~ msgid "Index and search your posts' categories:" +#~ msgstr "Indeksowanie i wyszukiwanie kategorii:" + +#~ msgid "" +#~ "If checked, Relevanssi will also index and search the categories of your " +#~ "posts. Category titles will pass through 'single_cat_title' filter. " +#~ "Remember to rebuild the index if you change this option!" +#~ msgstr "" +#~ "Jeśli zostanie zaznaczone, Relevanssi będzie także indeksować i " +#~ "wyszukiwać kategorie znajdujące się we wpisach. Tytuły kategorii będą " +#~ "przetwarzane z wykorzystaniem filtru single_cat_title'. Pamiętaj o " +#~ "przebudowaniu indeksu, jeśli zmienisz te ustawienia." + +#~ msgid "" +#~ "A comma-separated list of custom taxonomy names to include in the index." +#~ msgstr "" +#~ "Oddzielona przecinkami lista własnych taksonomii, które mają być " +#~ "uwzględnione w indeksie." diff --git a/mu-plugins/relevanssi/relevanssi.php b/mu-plugins/relevanssi/relevanssi.php new file mode 100644 index 00000000..26a15fe2 --- /dev/null +++ b/mu-plugins/relevanssi/relevanssi.php @@ -0,0 +1,438 @@ +. +*/ + +// For debugging purposes +//error_reporting(E_ALL); +//ini_set("display_errors", 1); +//define('WP-DEBUG', true); +global $wpdb; +//$wpdb->show_errors(); + +define('RELEVANSSI_PREMIUM', false); + +global $relevanssi_variables; + +$relevanssi_variables['relevanssi_table'] = $wpdb->prefix . "relevanssi"; +$relevanssi_variables['stopword_table'] = $wpdb->prefix . "relevanssi_stopwords"; +$relevanssi_variables['log_table'] = $wpdb->prefix . "relevanssi_log"; +$relevanssi_variables['title_boost_default'] = 5; +$relevanssi_variables['comment_boost_default'] = 0.75; +$relevanssi_variables['post_type_weight_defaults']['post_tag'] = 0.75; +$relevanssi_variables['post_type_weight_defaults']['category'] = 0.75; +$relevanssi_variables['post_type_index_defaults'] = array('post', 'page'); +$relevanssi_variables['database_version'] = 5; +$relevanssi_variables['file'] = __FILE__; +$relevanssi_variables['plugin_dir'] = plugin_dir_path(__FILE__); + +require_once( 'lib/init.php' ); +require_once( 'lib/interface.php' ); +require_once( 'lib/indexing.php' ); +require_once( 'lib/stopwords.php' ); +require_once( 'lib/search.php' ); +require_once( 'lib/excerpts-highlights.php' ); +require_once( 'lib/shortcodes.php' ); +require_once( 'lib/common.php' ); + +function relevanssi_didyoumean($query, $pre, $post, $n = 5) { + global $wpdb, $relevanssi_variables, $wp_query; + + $total_results = $wp_query->found_posts; + + if ($total_results > $n) return; + + $q = "SELECT query, count(query) as c, AVG(hits) as a FROM " . $relevanssi_variables['log_table'] . " WHERE hits > 1 GROUP BY query ORDER BY count(query) DESC"; + $q = apply_filters('relevanssi_didyoumean_query', $q); + + $data = $wpdb->get_results($q); + + $distance = -1; + $closest = ""; + + foreach ($data as $row) { + if ($row->c < 2) break; + $lev = levenshtein($query, $row->query); + + if ($lev < $distance || $distance < 0) { + if ($row->a > 0) { + $distance = $lev; + $closest = $row->query; + if ($lev == 1) break; // get the first with distance of 1 and go + } + } + } + + if ($distance > 0) { + + $url = get_bloginfo('url'); + $url = esc_attr(add_query_arg(array( + 's' => urlencode($closest) + + ), $url )); + $url = apply_filters('relevanssi_didyoumean_url', $url); + echo "$pre$closest$post"; + } + + +} + +function relevanssi_check_old_data() { + if (is_admin()) { + // Version 3.3 removes the cache feature + $cache = get_option('relevanssi_enable_cache', 'nothing'); + if ($cache != 'nothing') { + global $wpdb; + $relevanssi_cache = $wpdb->prefix . "relevanssi_cache"; + $relevanssi_excerpt_cache = $wpdb->prefix . "relevanssi_excerpt_cache"; + + $wpdb->query("DROP TABLE $relevanssi_cache"); + $wpdb->query("DROP TABLE $relevanssi_excerpt_cache"); + + delete_option('relevanssi_enable_cache'); + delete_option('relevanssi_cache_seconds'); + wp_clear_scheduled_hook('relevanssi_truncate_cache'); + } + + // Version 3.1.4 combined taxonomy indexing options + $inctags = get_option('relevanssi_include_tags', 'nothing'); + if ($inctags == 'on') { + $taxonomies = get_option('relevanssi_index_taxonomies_list'); + if (!is_array($taxonomies)) $taxonomies = array(); + $taxonomies[] = 'post_tag'; + update_option('relevanssi_index_taxonomies_list', $taxonomies); + delete_option('relevanssi_include_tags'); + } + $inccats = get_option('relevanssi_include_cats', 'nothing'); + if ($inccats == 'on') { + $taxonomies = get_option('relevanssi_index_taxonomies_list'); + if (!is_array($taxonomies)) $taxonomies = array(); + $taxonomies[] = 'category'; + update_option('relevanssi_index_taxonomies_list', $taxonomies); + delete_option('relevanssi_include_cats'); + } + $custom = get_option('relevanssi_custom_taxonomies', 'nothing'); + if ($custom != 'nothing') { + $cts = explode(",", $custom); + $taxonomies = get_option('relevanssi_index_taxonomies_list'); + if (!is_array($taxonomies)) $taxonomies = array(); + foreach ($cts as $taxonomy) { + $taxonomy = trim($taxonomy); + $taxonomies[] = $taxonomy; + } + update_option('relevanssi_index_taxonomies_list', $taxonomies); + delete_option('relevanssi_custom_taxonomies'); + } + + $limit = get_option('relevanssi_throttle_limit'); + if (empty($limit)) update_option('relevanssi_throttle_limit', 500); + + global $wpdb, $relevanssi_variables; + + if ($relevanssi_variables['database_version'] == 3) { + $res = $wpdb->query("SHOW INDEX FROM " . $relevanssi_variables['relevanssi_table'] . " WHERE Key_name = 'typeitem'"); + if ($res == 0) $wpdb->query("ALTER TABLE " . $relevanssi_variables['relevanssi_table'] . " ADD INDEX `typeitem` (`type`, `item`)"); + } + + // Version 3.0 removed relevanssi_tag_boost + $tag_boost = get_option('relevanssi_tag_boost', 'nothing'); + if ($tag_boost != 'nothing') { + $post_type_weights = get_option('relevanssi_post_type_weights'); + if (!is_array($post_type_weights)) { + $post_type_weights = array(); + } + $post_type_weights['post_tag'] = $tag_boost; + delete_option('relevanssi_tag_boost'); + update_option('relevanssi_post_type_weights', $post_type_weights); + } + + $index_type = get_option('relevanssi_index_type', 'nothing'); + if ($index_type != 'nothing') { + // Delete unused options from versions < 3 + $post_types = get_option('relevanssi_index_post_types'); + + if (!is_array($post_types)) $post_types = array(); + + switch ($index_type) { + case "posts": + array_push($post_types, 'post'); + break; + case "pages": + array_push($post_types, 'page'); + break; + case 'public': + if (function_exists('get_post_types')) { + $pt_1 = get_post_types(array('exclude_from_search' => '0')); + $pt_2 = get_post_types(array('exclude_from_search' => false)); + foreach (array_merge($pt_1, $pt_2) as $type) { + array_push($post_types, $type); + } + } + break; + case "both": // really should be "everything" + $pt = get_post_types(); + foreach ($pt as $type) { + array_push($post_types, $type); + } + break; + } + + $attachments = get_option('relevanssi_index_attachments'); + if ('on' == $attachments) array_push($post_types, 'attachment'); + + $custom_types = get_option('relevanssi_custom_types'); + $custom_types = explode(',', $custom_types); + if (is_array($custom_types)) { + foreach ($custom_types as $type) { + $type = trim($type); + if (substr($type, 0, 1) != '-') { + array_push($post_types, $type); + } + } + } + + update_option('relevanssi_index_post_types', $post_types); + + delete_option('relevanssi_index_type'); + delete_option('relevanssi_index_attachments'); + delete_option('relevanssi_custom_types'); + } + } +} + +function _relevanssi_install() { + global $relevanssi_variables; + + add_option('relevanssi_title_boost', $relevanssi_variables['title_boost_default']); + add_option('relevanssi_comment_boost', $relevanssi_variables['comment_boost_default']); + add_option('relevanssi_admin_search', 'off'); + add_option('relevanssi_highlight', 'strong'); + add_option('relevanssi_txt_col', '#ff0000'); + add_option('relevanssi_bg_col', '#ffaf75'); + add_option('relevanssi_css', 'text-decoration: underline; text-color: #ff0000'); + add_option('relevanssi_class', 'relevanssi-query-term'); + add_option('relevanssi_excerpts', 'on'); + add_option('relevanssi_excerpt_length', '30'); + add_option('relevanssi_excerpt_type', 'words'); + add_option('relevanssi_excerpt_allowable_tags', ''); + add_option('relevanssi_log_queries', 'off'); + add_option('relevanssi_log_queries_with_ip', 'off'); + add_option('relevanssi_cat', '0'); + add_option('relevanssi_excat', '0'); + add_option('relevanssi_extag', '0'); + add_option('relevanssi_index_fields', ''); + add_option('relevanssi_exclude_posts', ''); //added by OdditY + add_option('relevanssi_hilite_title', ''); //added by OdditY + add_option('relevanssi_highlight_docs', 'off'); + add_option('relevanssi_highlight_comments', 'off'); + add_option('relevanssi_index_comments', 'none'); //added by OdditY + add_option('relevanssi_show_matches', ''); + add_option('relevanssi_show_matches_text', '(Search hits: %body% in body, %title% in title, %tags% in tags, %comments% in comments. Score: %score%)'); + add_option('relevanssi_fuzzy', 'sometimes'); + add_option('relevanssi_indexed', ''); + add_option('relevanssi_expand_shortcodes', 'on'); + add_option('relevanssi_custom_taxonomies', ''); + add_option('relevanssi_index_author', ''); + add_option('relevanssi_implicit_operator', 'OR'); + add_option('relevanssi_omit_from_logs', ''); + add_option('relevanssi_synonyms', ''); + add_option('relevanssi_index_excerpt', 'off'); + add_option('relevanssi_index_limit', '500'); + add_option('relevanssi_disable_or_fallback', 'off'); + add_option('relevanssi_respect_exclude', 'on'); + add_option('relevanssi_min_word_length', '3'); + add_option('relevanssi_wpml_only_current', 'on'); + add_option('relevanssi_word_boundaries', 'on'); + add_option('relevanssi_default_orderby', 'relevance'); + add_option('relevanssi_db_version', '0'); + add_option('relevanssi_post_type_weights', $relevanssi_variables['post_type_weight_defaults']); + add_option('relevanssi_throttle', 'on'); + add_option('relevanssi_throttle_limit', '500'); + add_option('relevanssi_index_post_types', $relevanssi_variables['post_type_index_defaults']); + add_option('relevanssi_index_taxonomies_list', array()); + + relevanssi_create_database_tables($relevanssi_variables['database_version']); +} + +if (function_exists('register_uninstall_hook')) { + register_uninstall_hook(__FILE__, 'relevanssi_uninstall'); + // this doesn't seem to work +} + +function relevanssi_get_post($id) { + global $relevanssi_post_array; + + if (isset($relevanssi_post_array[$id])) { + $post = $relevanssi_post_array[$id]; + } + else { + $post = get_post($id); + } + return $post; +} + +function relevanssi_remove_doc($id) { + global $wpdb, $relevanssi_variables; + + $D = get_option( 'relevanssi_doc_count'); + + $q = "DELETE FROM " . $relevanssi_variables['relevanssi_table'] . " WHERE doc=$id"; + $wpdb->query($q); + $rows_updated = $wpdb->query($q); + + if($rows_updated && $rows_updated > 0) { + update_option('relevanssi_doc_count', $D - $rows_updated); + } +} + +/***** + * Interface functions + */ + +function relevanssi_form_tag_weight($post_type_weights) { + $label = __("Tag weight:", 'relevanssi'); + $value = $post_type_weights['post_tag']; + + echo << + + $label + + + + +   + +EOH; + + $label = __("Category weight:", 'relevanssi'); + $value = $post_type_weights['category']; + + echo << + + $label + + + + +   + +EOH; +} + +function relevanssi_sidebar() { + $tweet = 'http://twitter.com/home?status=' . urlencode("I'm using Relevanssi, a better search for WordPress. http://wordpress.org/extend/plugins/relevanssi/ #relevanssi #wordpress"); + if (function_exists("plugins_url")) { + global $wp_version; + if (version_compare($wp_version, '2.8dev', '>' )) { + $facebooklogo = plugins_url('facebooklogo.jpg', __FILE__); + } + else { + $facebooklogo = plugins_url('relevanssi/facebooklogo.jpg'); + } + } + else { + // We can't check, so let's assume something sensible + $facebooklogo = '/wp-content/plugins/relevanssi/facebooklogo.jpg'; + } + + echo <<

+
+
+
+

Buy Relevanssi Premium!

+
+

Do you want more features? Support Relevanssi development? Get a +better search experience for your users?

+ +

Go Premium! Buy Relevanssi Premium. See feature +comparison and license prices.

+ +

Buy Premium here »

+
+
+
+ +
+
+

Sample Premium features

+
+

With Relevanssi Premium, you would have more options:

+ +

- Internal link anchors are search terms for the target posts, if you wish
+- Hiding Relevanssi branding from the User Searches page on a client installation
+- Adjust weights separately for each post type and taxonomy
+- Give extra weight to recent posts
+- Highlight search terms for visitors from Google and other external search sources
+- Make Relevanssi understand thousand separators to handle big numbers better
+- Index and search any columns in the wp_posts database
+- Index and search user profile pages
+- Index and search taxonomy term pages
+- Import and export options
+- And more! +

+
+
+
+ +
+
+

Relevanssi on Facebook

+
+
Facebook
+

Check + out the Relevanssi page on Facebook for news and updates about your favourite plugin.

+
+
+
+ +
+
+

Help and support

+
+

For Relevanssi support, see:

+ +

- WordPress.org forum
+ - Knowledge base

+
+
+
+ +
+
+EOH; +} + +/** + * Wrapper function for Premium compatibility. + */ +function relevanssi_install() { + _relevanssi_install(); +} + +?> diff --git a/mu-plugins/relevanssi/relevanssi.po b/mu-plugins/relevanssi/relevanssi.po new file mode 100644 index 00000000..f69a9ff4 --- /dev/null +++ b/mu-plugins/relevanssi/relevanssi.po @@ -0,0 +1,321 @@ +msgid "" +msgstr "" +"Project-Id-Version: Relevanssi\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2009-08-14 14:06+0200\n" +"PO-Revision-Date: \n" +"Last-Translator: Mikko Saari \n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Poedit-KeywordsList: __\n" +"X-Poedit-Basepath: .\n" +"X-Poedit-SearchPath-0: .\n" + +#: relevanssi.php:703 +msgid "There is no excerpt because this is a protected post." +msgstr "" + +#: relevanssi.php:994 +msgid "Indexing complete!" +msgstr "" + +#: relevanssi.php:1183 +msgid "Relevanssi Search Options" +msgstr "" + +#: relevanssi.php:1294 +#, php-format +msgid "

Term '%s' added to stopwords!

" +msgstr "" + +#: relevanssi.php:1297 +#, php-format +msgid "

Couldn't add term '%s' to stopwords!

" +msgstr "" + +#: relevanssi.php:1306 +msgid "25 most common words in the index" +msgstr "" + +#: relevanssi.php:1308 +msgid "These words are excellent stopword material. A word that appears in most of the posts in the database is quite pointless when searching. This is also an easy way to create a completely new stopword list, if one isn't available in your language. Click the icon after the word to add the word to the stopword list. The word will also be removed from the index, so rebuilding the index is not necessary." +msgstr "" + +#: relevanssi.php:1331 +msgid "Add to stopwords" +msgstr "" + +#: relevanssi.php:1344 +msgid "25 most popular queries" +msgstr "" + +#: relevanssi.php:1356 +msgid "Recent queries that got 0 hits" +msgstr "" + +#: relevanssi.php:1491 +msgid "Title boost:" +msgstr "" + +#: relevanssi.php:1492 +#, php-format +msgid "Default: %d. 0 means titles are ignored, 1 means no boost, more than 1 gives extra value." +msgstr "" + +#: relevanssi.php:1493 +msgid "Tag boost:" +msgstr "" + +#: relevanssi.php:1494 +#, php-format +msgid "Default: %d. 0 means tags are ignored, 1 means no boost, more than 1 gives extra value." +msgstr "" + +#: relevanssi.php:1495 +msgid "Comment boost:" +msgstr "" + +#: relevanssi.php:1496 +#, php-format +msgid "Default: %d. 0 means comments are ignored, 1 means no boost, more than 1 gives extra value." +msgstr "" + +#: relevanssi.php:1497 +msgid "Use search for admin:" +msgstr "" + +#: relevanssi.php:1498 +msgid "If checked, Relevanssi will be used for searches in the admin interface" +msgstr "" + +#: relevanssi.php:1499 +msgid "Restrict search to these categories and tags:" +msgstr "" + +#: relevanssi.php:1500 +msgid "Enter a comma-separated list of category and tag IDs to restrict search to those categories or tags. You can also use <input type='hidden' name='cat' value='list of cats and tags' /> in your search form. The input field will overrun this setting." +msgstr "" + +#: relevanssi.php:1501 +msgid "Exclude these categories and tags from search:" +msgstr "" + +#: relevanssi.php:1502 +msgid "Enter a comma-separated list of category and tag IDs that are excluded from search results. This only works here, you can't use the input field option (WordPress doesn't pass custom parameters there)." +msgstr "" + +#: relevanssi.php:1505 +msgid "Exclude these posts/pages from search:" +msgstr "" + +#: relevanssi.php:1506 +msgid "Enter a comma-separated list of post/page IDs that are excluded from search results. This only works here, you can't use the input field option (WordPress doesn't pass custom parameters there)." +msgstr "" + +#: relevanssi.php:1507 +msgid "Index and search your posts' tags:" +msgstr "" + +#: relevanssi.php:1508 +msgid "If checked, Relevanssi will also index and search the tags of your posts. Remember to rebuild the index if you change this option!" +msgstr "" + +#: relevanssi.php:1509 +msgid "Index and search these comments:" +msgstr "" + +#: relevanssi.php:1510 +msgid "Relevanssi will index and search ALL (all comments including track- & pingbacks and custom comment types), NONE (no comments) or NORMAL (manually posted comments on your blog).
Remember to rebuild the index if you change this option!" +msgstr "" + +#: relevanssi.php:1511 +msgid "all" +msgstr "" + +#: relevanssi.php:1512 +msgid "normal" +msgstr "" + +#: relevanssi.php:1513 +msgid "none" +msgstr "" + +#: relevanssi.php:1516 +msgid "Create custom search result snippets:" +msgstr "" + +#: relevanssi.php:1517 +msgid "If checked, Relevanssi will create excerpts that contain the search term hits. To make them work, make sure your search result template uses the_excerpt() to display post excerpts." +msgstr "" + +#: relevanssi.php:1518 +msgid "Length of the snippet:" +msgstr "" + +#: relevanssi.php:1519 +msgid "This must be an integer." +msgstr "" + +#: relevanssi.php:1520 +msgid "words" +msgstr "" + +#: relevanssi.php:1521 +msgid "characters" +msgstr "" + +#: relevanssi.php:1522 +msgid "Keep a log of user queries:" +msgstr "" + +#: relevanssi.php:1523 +msgid "If checked, Relevanssi will log user queries." +msgstr "" + +#: relevanssi.php:1524 +msgid "Highlight query terms in search results:" +msgstr "" + +#: relevanssi.php:1525 +msgid "Highlighting isn't available unless you use custom snippets" +msgstr "" + +#: relevanssi.php:1526 +msgid "Highlight query terms in result titles too:" +msgstr "" + +#: relevanssi.php:1529 +msgid "Save" +msgstr "" + +#: relevanssi.php:1530 +msgid "Building the index and indexing options" +msgstr "" + +#: relevanssi.php:1531 +msgid "After installing the plugin, you need to build the index. This generally needs to be done once, you don't have to re-index unless something goes wrong. Indexing is a heavy task and might take more time than your servers allow. If the indexing cannot be finished - for example you get a blank screen or something like that after indexing - you can continue indexing from where you left by clicking 'Continue indexing'. Clicking 'Build the index' will delete the old index, so you can't use that." +msgstr "" + +#: relevanssi.php:1532 +msgid "So, if you build the index and don't get the 'Indexing complete' in the end, keep on clicking the 'Continue indexing' button until you do. On my blogs, I was able to index ~400 pages on one go, but had to continue indexing twice to index ~950 pages." +msgstr "" + +#: relevanssi.php:1533 +msgid "Save indexing options and build the index" +msgstr "" + +#: relevanssi.php:1534 +msgid "Continue indexing" +msgstr "" + +#: relevanssi.php:1535 +msgid "No highlighting" +msgstr "" + +#: relevanssi.php:1536 +msgid "Text color" +msgstr "" + +#: relevanssi.php:1537 +msgid "Background color" +msgstr "" + +#: relevanssi.php:1538 +msgid "CSS Style" +msgstr "" + +#: relevanssi.php:1539 +msgid "CSS Class" +msgstr "" + +#: relevanssi.php:1541 +msgid "Text color for highlights:" +msgstr "" + +#: relevanssi.php:1542 +msgid "Background color for highlights:" +msgstr "" + +#: relevanssi.php:1543 +msgid "CSS style for highlights:" +msgstr "" + +#: relevanssi.php:1544 +msgid "CSS class for highlights:" +msgstr "" + +#: relevanssi.php:1546 +#: relevanssi.php:1547 +msgid "Use HTML color codes (#rgb or #rrggbb)" +msgstr "" + +#: relevanssi.php:1548 +msgid "You can use any CSS styling here, style will be inserted with a <span>" +msgstr "" + +#: relevanssi.php:1549 +msgid "Name a class here, search results will be wrapped in a <span> with the class" +msgstr "" + +#: relevanssi.php:1551 +msgid "What to include in the index" +msgstr "" + +#: relevanssi.php:1552 +msgid "Everything" +msgstr "" + +#: relevanssi.php:1553 +msgid "Just posts" +msgstr "" + +#: relevanssi.php:1554 +msgid "Just pages" +msgstr "" + +#: relevanssi.php:1556 +msgid "Custom fields to index:" +msgstr "" + +#: relevanssi.php:1557 +msgid "A comma-separated list of custom field names to include in the index." +msgstr "" + +#: relevanssi.php:1559 +msgid "Show breakdown of search hits in excerpts:" +msgstr "" + +#: relevanssi.php:1560 +msgid "Check this to show more information on where the search hits were made. Requires custom snippets to work." +msgstr "" + +#: relevanssi.php:1561 +msgid "The breakdown format:" +msgstr "" + +#: relevanssi.php:1562 +msgid "Use %body%, %title%, %tags%, %comments% and %score% to display the number of hits and the document weight." +msgstr "" + +#: relevanssi.php:1564 +msgid "When to use fuzzy matching?" +msgstr "" + +#: relevanssi.php:1565 +msgid "When straight search gets no hits" +msgstr "" + +#: relevanssi.php:1566 +msgid "Always" +msgstr "" + +#: relevanssi.php:1567 +msgid "Don't use fuzzy search" +msgstr "" + +#: relevanssi.php:1568 +msgid "Straight search matches just the term. Fuzzy search matches everything that begins or ends with the search term." +msgstr "" + diff --git a/mu-plugins/relevanssi/stopwords/stopwords.de_DE b/mu-plugins/relevanssi/stopwords/stopwords.de_DE new file mode 100644 index 00000000..8e8bb57b --- /dev/null +++ b/mu-plugins/relevanssi/stopwords/stopwords.de_DE @@ -0,0 +1,1037 @@ + diff --git a/mu-plugins/relevanssi/stopwords/stopwords.en_GB b/mu-plugins/relevanssi/stopwords/stopwords.en_GB new file mode 100644 index 00000000..a7cd35ae --- /dev/null +++ b/mu-plugins/relevanssi/stopwords/stopwords.en_GB @@ -0,0 +1,323 @@ + diff --git a/mu-plugins/relevanssi/stopwords/stopwords.en_US b/mu-plugins/relevanssi/stopwords/stopwords.en_US new file mode 100644 index 00000000..a7cd35ae --- /dev/null +++ b/mu-plugins/relevanssi/stopwords/stopwords.en_US @@ -0,0 +1,323 @@ + diff --git a/mu-plugins/relevanssi/stopwords/stopwords.es_ES b/mu-plugins/relevanssi/stopwords/stopwords.es_ES new file mode 100644 index 00000000..4dbeea01 --- /dev/null +++ b/mu-plugins/relevanssi/stopwords/stopwords.es_ES @@ -0,0 +1,386 @@ + diff --git a/mu-plugins/relevanssi/stopwords/stopwords.fi b/mu-plugins/relevanssi/stopwords/stopwords.fi new file mode 100644 index 00000000..7f84d970 --- /dev/null +++ b/mu-plugins/relevanssi/stopwords/stopwords.fi @@ -0,0 +1,365 @@ + diff --git a/mu-plugins/relevanssi/stopwords/stopwords.fr_FR b/mu-plugins/relevanssi/stopwords/stopwords.fr_FR new file mode 100644 index 00000000..bbf42c17 --- /dev/null +++ b/mu-plugins/relevanssi/stopwords/stopwords.fr_FR @@ -0,0 +1,72 @@ + diff --git a/mu-plugins/relevanssi/stopwords/stopwords.pl_PL b/mu-plugins/relevanssi/stopwords/stopwords.pl_PL new file mode 100644 index 00000000..4da7fa1c --- /dev/null +++ b/mu-plugins/relevanssi/stopwords/stopwords.pl_PL @@ -0,0 +1,210 @@ + diff --git a/mu-plugins/relevanssi/stopwords/stopwords.pt_BR b/mu-plugins/relevanssi/stopwords/stopwords.pt_BR new file mode 100644 index 00000000..b0798a02 --- /dev/null +++ b/mu-plugins/relevanssi/stopwords/stopwords.pt_BR @@ -0,0 +1,173 @@ + diff --git a/mu-plugins/relevanssi/uninstall.php b/mu-plugins/relevanssi/uninstall.php new file mode 100644 index 00000000..42249bbc --- /dev/null +++ b/mu-plugins/relevanssi/uninstall.php @@ -0,0 +1,80 @@ +