Version Description
- Hotfix for disabled categories
Download this release
Release Info
Developer | wpdreams |
Plugin | Ajax Search Lite |
Version | 3.05 |
Comparing to | |
See all releases |
Code changes from version 3.0 to 3.05
- ajax-search-lite.php +2 -6
- includes/cache/timthumb_int_ad6f2bfa65b8bde7a5b2840f7fbc3e8e.timthumb.txt +0 -0
- includes/search.class.php +1 -1
- includes/search_content.class.php +42 -33
- includes/timthumb.php +1 -1
- includes/views/asl.shortcode.php +2 -0
- readme.txt +9 -6
- search.php +2 -2
ajax-search-lite.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: Ajax Search Lite
|
4 |
Plugin URI: http://wp-dreams.com
|
5 |
Description: The lite version of the most powerful ajax powered search engine for WordPress.
|
6 |
-
Version: 3.
|
7 |
Author: Ernest Marcinko
|
8 |
Author URI: http://wp-dreams.com
|
9 |
*/
|
@@ -66,9 +66,5 @@ if (is_admin() || (!is_admin() && !isset($_POST['action_']))) {
|
|
66 |
}
|
67 |
|
68 |
/* Includes on Post/Page/Custom post type edit pages */
|
69 |
-
if (wpdreams_on_backend_post_editor()) {
|
70 |
-
require_once(ASL_PATH . "/backend/settings/types.inc.php");
|
71 |
-
require_once(ASL_PATH . "/backend/tinymce/buttons.php");
|
72 |
-
}
|
73 |
|
74 |
-
require_once(ASL_PATH . "/includes/widgets.php");
|
3 |
Plugin Name: Ajax Search Lite
|
4 |
Plugin URI: http://wp-dreams.com
|
5 |
Description: The lite version of the most powerful ajax powered search engine for WordPress.
|
6 |
+
Version: 3.05
|
7 |
Author: Ernest Marcinko
|
8 |
Author URI: http://wp-dreams.com
|
9 |
*/
|
66 |
}
|
67 |
|
68 |
/* Includes on Post/Page/Custom post type edit pages */
|
|
|
|
|
|
|
|
|
69 |
|
70 |
+
require_once(ASL_PATH . "/includes/widgets.php");
|
includes/cache/timthumb_int_ad6f2bfa65b8bde7a5b2840f7fbc3e8e.timthumb.txt
ADDED
Binary file
|
includes/search.class.php
CHANGED
@@ -38,7 +38,7 @@ if (!class_exists('wpdreams_search')) {
|
|
38 |
}
|
39 |
|
40 |
public function search($keyword) {
|
41 |
-
$this->s = $keyword;
|
42 |
$this->_s = explode(" ", $this->s);
|
43 |
|
44 |
$this->do_search();
|
38 |
}
|
39 |
|
40 |
public function search($keyword) {
|
41 |
+
$this->s = mb_convert_case($keyword, MB_CASE_LOWER, "UTF-8");
|
42 |
$this->_s = explode(" ", $this->s);
|
43 |
|
44 |
$this->do_search();
|
includes/search_content.class.php
CHANGED
@@ -111,38 +111,47 @@ if (!class_exists('wpdreams_searchContent')) {
|
|
111 |
}
|
112 |
/*---------------------------------------------------------------*/
|
113 |
|
|
|
114 |
// ------------------------ Categories/taxonomies ----------------------
|
115 |
-
if (
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
146 |
}
|
147 |
// ---------------------------------------------------------------------
|
148 |
|
@@ -278,7 +287,7 @@ if (!class_exists('wpdreams_searchContent')) {
|
|
278 |
} else {
|
279 |
if ($searchData['titlefield'] == "1") {
|
280 |
if (strlen($r->excerpt) >= 200)
|
281 |
-
$r->title =
|
282 |
else
|
283 |
$r->title = $r->excerpt;
|
284 |
} else {
|
@@ -320,7 +329,7 @@ if (!class_exists('wpdreams_searchContent')) {
|
|
320 |
$_content = strip_tags($_content, "<abbr><span>");
|
321 |
|
322 |
if ($_content != '' && (strlen($_content) > $searchData['descriptionlength']))
|
323 |
-
$r->content =
|
324 |
else
|
325 |
$r->content = $_content . "...";
|
326 |
|
111 |
}
|
112 |
/*---------------------------------------------------------------*/
|
113 |
|
114 |
+
|
115 |
// ------------------------ Categories/taxonomies ----------------------
|
116 |
+
if (w_isset_def($searchData['showsearchincategories'], 0) == 1) {
|
117 |
+
if (!isset($options['categoryset']) || $options['categoryset'] == "")
|
118 |
+
$options['categoryset'] = array();
|
119 |
+
if (!isset($options['termset']) || $options['termset'] == "")
|
120 |
+
$options['termset'] = array();
|
121 |
+
|
122 |
+
$exclude_categories = array();
|
123 |
+
$searchData['selected-exsearchincategories'] = w_isset_def($searchData['selected-exsearchincategories'], array());
|
124 |
+
$searchData['selected-excludecategories'] = w_isset_def($searchData['selected-excludecategories'], array());
|
125 |
+
$_all_cat = get_all_category_ids();
|
126 |
+
$_needed_cat = array_diff($_all_cat, $searchData['selected-exsearchincategories']);
|
127 |
+
$_needed_cat = !is_array($_needed_cat)?array():$_needed_cat;
|
128 |
+
$exclude_categories = array_diff(array_merge($_needed_cat, $searchData['selected-excludecategories']), $options['categoryset']);
|
129 |
+
|
130 |
+
$exclude_terms = array();
|
131 |
+
$exclude_showterms = array();
|
132 |
+
$searchData['selected-showterms'] = w_isset_def($searchData['selected-showterms'], array());
|
133 |
+
$searchData['selected-excludeterms'] = w_isset_def($searchData['selected-excludeterms'], array());
|
134 |
+
foreach ($searchData['selected-excludeterms'] as $tax=>$terms) {
|
135 |
+
$exclude_terms = array_merge($exclude_terms, $terms);
|
136 |
+
}
|
137 |
+
foreach ($searchData['selected-showterms'] as $tax=>$terms) {
|
138 |
+
$exclude_showterms = array_merge($exclude_showterms, $terms);
|
139 |
+
}
|
140 |
+
|
141 |
+
$exclude_terms = array_diff(array_merge($exclude_terms, $exclude_showterms), $options['termset']);
|
142 |
+
|
143 |
+
$all_terms = array();
|
144 |
+
$all_terms = array_merge($exclude_categories, $exclude_terms);
|
145 |
+
if (count($all_terms) > 0) {
|
146 |
+
$words = '--'.implode('--|--', $all_terms).'--';
|
147 |
+
$term_query = "HAVING (ttid NOT REGEXP '$words')";
|
148 |
+
}
|
149 |
+
} else {
|
150 |
+
$ex_cat = w_isset_def($searchData['selected-excludecategories'], array());
|
151 |
+
if (count($ex_cat) > 0) {
|
152 |
+
$words = '--'.implode('--|--', $ex_cat).'--';
|
153 |
+
$term_query = "HAVING (ttid NOT REGEXP '$words')";
|
154 |
+
}
|
155 |
}
|
156 |
// ---------------------------------------------------------------------
|
157 |
|
287 |
} else {
|
288 |
if ($searchData['titlefield'] == "1") {
|
289 |
if (strlen($r->excerpt) >= 200)
|
290 |
+
$r->title = wd_substr_at_word($r->excerpt, 200);
|
291 |
else
|
292 |
$r->title = $r->excerpt;
|
293 |
} else {
|
329 |
$_content = strip_tags($_content, "<abbr><span>");
|
330 |
|
331 |
if ($_content != '' && (strlen($_content) > $searchData['descriptionlength']))
|
332 |
+
$r->content = wd_substr_at_word($_content, $searchData['descriptionlength']) . "...";
|
333 |
else
|
334 |
$r->content = $_content . "...";
|
335 |
|
includes/timthumb.php
CHANGED
@@ -30,7 +30,7 @@ if(! defined('BLOCK_EXTERNAL_LEECHERS') ) define ('BLOCK_EXTERNAL_LEECHERS', fa
|
|
30 |
if(! defined('DISPLAY_ERROR_MESSAGES') ) define ('DISPLAY_ERROR_MESSAGES', true); // Display error messages. Set to false to turn off errors (good for production websites)
|
31 |
//Image fetching and caching
|
32 |
if(! defined('ALLOW_EXTERNAL') ) define ('ALLOW_EXTERNAL', TRUE); // Allow image fetching from external websites. Will check against ALLOWED_SITES if ALLOW_ALL_EXTERNAL_SITES is false
|
33 |
-
if(! defined('ALLOW_ALL_EXTERNAL_SITES') ) define ('ALLOW_ALL_EXTERNAL_SITES',
|
34 |
if(! defined('FILE_CACHE_ENABLED') ) define ('FILE_CACHE_ENABLED', TRUE); // Should we store resized/modified images on disk to speed things up?
|
35 |
if(! defined('FILE_CACHE_TIME_BETWEEN_CLEANS')) define ('FILE_CACHE_TIME_BETWEEN_CLEANS', 86400); // How often the cache is cleaned
|
36 |
|
30 |
if(! defined('DISPLAY_ERROR_MESSAGES') ) define ('DISPLAY_ERROR_MESSAGES', true); // Display error messages. Set to false to turn off errors (good for production websites)
|
31 |
//Image fetching and caching
|
32 |
if(! defined('ALLOW_EXTERNAL') ) define ('ALLOW_EXTERNAL', TRUE); // Allow image fetching from external websites. Will check against ALLOWED_SITES if ALLOW_ALL_EXTERNAL_SITES is false
|
33 |
+
if(! defined('ALLOW_ALL_EXTERNAL_SITES') ) define ('ALLOW_ALL_EXTERNAL_SITES', TRUE); // Less secure.
|
34 |
if(! defined('FILE_CACHE_ENABLED') ) define ('FILE_CACHE_ENABLED', TRUE); // Should we store resized/modified images on disk to speed things up?
|
35 |
if(! defined('FILE_CACHE_TIME_BETWEEN_CLEANS')) define ('FILE_CACHE_TIME_BETWEEN_CLEANS', 86400); // How often the cache is cleaned
|
36 |
|
includes/views/asl.shortcode.php
CHANGED
@@ -77,6 +77,8 @@
|
|
77 |
<?php do_action('asl_layout_after_loading', $id); ?>
|
78 |
|
79 |
</div>
|
|
|
|
|
80 |
<div id='ajaxsearchlitesettings<?php echo $id; ?>' class="searchsettings">
|
81 |
<form name='options'>
|
82 |
|
77 |
<?php do_action('asl_layout_after_loading', $id); ?>
|
78 |
|
79 |
</div>
|
80 |
+
</div>
|
81 |
+
|
82 |
<div id='ajaxsearchlitesettings<?php echo $id; ?>' class="searchsettings">
|
83 |
<form name='options'>
|
84 |
|
readme.txt
CHANGED
@@ -1,10 +1,10 @@
|
|
1 |
-
=== Ajax Search Lite ===
|
2 |
Contributors: wpdreams
|
3 |
Donate link: http://wp-dreams.com
|
4 |
-
Tags: search, better wordpress search, better search plugin, ajax search, better search, wp search, wp search plugin, relevant search plugin, search plugin, wordpress search, advanced search, best wordpress search, ajax wordpress search, ajax search pro
|
5 |
Requires at least: 3.5
|
6 |
-
Tested up to:
|
7 |
-
Stable tag: 3.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -12,8 +12,8 @@ A powerful ajax search engine for WordPress.
|
|
12 |
|
13 |
== Description ==
|
14 |
|
15 |
-
A resonsive search engine, which will boost your user experience by providing a user friendly ajax powered search form. Very smooth animations with mobile device support.
|
16 |
-
Boost the user experience by providing a powerful ajax search plugin to your visitors. It will rock your site!
|
17 |
|
18 |
Facebook: https://www.facebook.com/pages/WPDreams/383702515034741
|
19 |
|
@@ -98,6 +98,9 @@ and will let you know what to do.
|
|
98 |
|
99 |
== Changelog ==
|
100 |
|
|
|
|
|
|
|
101 |
= 3.0 =
|
102 |
* Fully reworked from version 1.7
|
103 |
* Added 30+ more options & much nicer options panel
|
1 |
+
=== Ajax Search Lite ===
|
2 |
Contributors: wpdreams
|
3 |
Donate link: http://wp-dreams.com
|
4 |
+
Tags: search, better wordpress search, better search plugin, ajax search, wp ajax search, custom fields search, custom field ajax, better search, wp search, wp search plugin, relevant search plugin, search plugin, wordpress search, advanced search, best wordpress search, ajax wordpress search, ajax search pro
|
5 |
Requires at least: 3.5
|
6 |
+
Tested up to: 4.0
|
7 |
+
Stable tag: 3.05
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
12 |
|
13 |
== Description ==
|
14 |
|
15 |
+
A resonsive search engine, which will boost your user experience by providing a user friendly ajax powered search form - an ajax live search. Very smooth animations with mobile device support.
|
16 |
+
Boost the user experience by providing a powerful ajax search plugin to your visitors. It will rock your site! Supports custom post types and custom fields as well.
|
17 |
|
18 |
Facebook: https://www.facebook.com/pages/WPDreams/383702515034741
|
19 |
|
98 |
|
99 |
== Changelog ==
|
100 |
|
101 |
+
= 3.05 =
|
102 |
+
* Hotfix for disabled categories
|
103 |
+
|
104 |
= 3.0 =
|
105 |
* Fully reworked from version 1.7
|
106 |
* Added 30+ more options & much nicer options panel
|
search.php
CHANGED
@@ -109,7 +109,7 @@ function ajaxsearchlite_search() {
|
|
109 |
);
|
110 |
|
111 |
|
112 |
-
if (count($results) <= 0) {
|
113 |
$t = new keywordSuggest($search['data']['keywordsuggestionslang']);
|
114 |
$keywords = $t->getKeywords($s);
|
115 |
if ($keywords != false) {
|
@@ -117,7 +117,7 @@ function ajaxsearchlite_search() {
|
|
117 |
$results['nores'] = 1;
|
118 |
$results = apply_filters('asl_only_keyword_results', $results);
|
119 |
}
|
120 |
-
}
|
121 |
|
122 |
$results = apply_filters('asl_results', $results);
|
123 |
|
109 |
);
|
110 |
|
111 |
|
112 |
+
/*if (count($results) <= 0) {
|
113 |
$t = new keywordSuggest($search['data']['keywordsuggestionslang']);
|
114 |
$keywords = $t->getKeywords($s);
|
115 |
if ($keywords != false) {
|
117 |
$results['nores'] = 1;
|
118 |
$results = apply_filters('asl_only_keyword_results', $results);
|
119 |
}
|
120 |
+
}*/
|
121 |
|
122 |
$results = apply_filters('asl_results', $results);
|
123 |
|