Version Description
Download this release
Release Info
Developer | wpdreams |
Plugin | Ajax Search Lite |
Version | 3.10 |
Comparing to | |
See all releases |
Code changes from version 3.05 to 3.10
- ajax-search-lite.php +6 -3
- backend/analytics.php +6 -6
- backend/settings.php +14 -14
- backend/settings/class/customfields.class.php +2 -2
- backend/settings/class/customposttypes.class.php +2 -2
- backend/tabs/instance/advanced_options.php +5 -5
- backend/tabs/instance/frontend_options.php +14 -14
- backend/tabs/instance/general_options.php +18 -18
- backend/tabs/instance/image_options.php +11 -11
- backend/tabs/instance/layout_options.php +5 -5
- css/style.basic.css +3 -21
- functions.php +10 -0
- includes/asl_init.class.php +8 -5
- includes/bfi_thumb.php +839 -0
- includes/cache/timthumb_int_924fd749b06d87972550ce2462181116.timthumb.txt +0 -0
- includes/cache/timthumb_int_ad6f2bfa65b8bde7a5b2840f7fbc3e8e.timthumb.txt +0 -0
- includes/cache/timthumb_int_c85b341bfdcfa5f2c4847db20d8b52d1.timthumb.txt +0 -0
- includes/cache/timthumb_int_decd49cb06bfb5b66187e1919079ba6d.timthumb.txt +0 -0
- includes/cache/timthumb_int_f12d4dd7b87d24f6c7cfacf3f36a9231.timthumb.txt +0 -0
- includes/search_content.class.php +57 -14
- includes/views/asl.shortcode.php +1 -1
- languages/ajax-search-lite-en_EN.mo +0 -0
- languages/ajax-search-lite-en_EN.po +319 -0
- languages/ajax-search-lite-en_EN.pot +319 -0
- languages/ajax-search-lite-hu_HU.mo +0 -0
- languages/ajax-search-lite-hu_HU.po +324 -0
- readme.txt +20 -7
- search.php +1 -0
ajax-search-lite.php
CHANGED
@@ -3,9 +3,11 @@
|
|
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 |
*/
|
10 |
?>
|
11 |
<?php
|
@@ -16,7 +18,7 @@ define('ASL_CACHE_PATH', plugin_dir_path(__FILE__)."/cache/");
|
|
16 |
define('ASL_TT_CACHE_PATH', plugin_dir_path(__FILE__)."/includes/cache/");
|
17 |
define('ASL_DIR', 'ajax-search-lite');
|
18 |
define('ASL_URL', plugin_dir_url(__FILE__));
|
19 |
-
define('ASL_CURRENT_VERSION',
|
20 |
define('ASL_DEBUG', 0);
|
21 |
|
22 |
global $asl_admin_pages;
|
@@ -42,9 +44,10 @@ if (isset($_POST) && isset($_POST['action']) &&
|
|
42 |
return;
|
43 |
}
|
44 |
|
45 |
-
|
46 |
$funcs = new aslInit();
|
47 |
|
|
|
|
|
48 |
/* Includes only on ASP admin pages */
|
49 |
if (wpdreams_on_backend_page($asl_admin_pages) == true) {
|
50 |
require_once(ASL_PATH . "/backend/settings/types.inc.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.10
|
7 |
Author: Ernest Marcinko
|
8 |
Author URI: http://wp-dreams.com
|
9 |
+
Text Domain: ajax-search-lite
|
10 |
+
Domain Path: /languages/
|
11 |
*/
|
12 |
?>
|
13 |
<?php
|
18 |
define('ASL_TT_CACHE_PATH', plugin_dir_path(__FILE__)."/includes/cache/");
|
19 |
define('ASL_DIR', 'ajax-search-lite');
|
20 |
define('ASL_URL', plugin_dir_url(__FILE__));
|
21 |
+
define('ASL_CURRENT_VERSION', 310);
|
22 |
define('ASL_DEBUG', 0);
|
23 |
|
24 |
global $asl_admin_pages;
|
44 |
return;
|
45 |
}
|
46 |
|
|
|
47 |
$funcs = new aslInit();
|
48 |
|
49 |
+
add_action('init', array($funcs, 'asl_init') );
|
50 |
+
|
51 |
/* Includes only on ASP admin pages */
|
52 |
if (wpdreams_on_backend_page($asl_admin_pages) == true) {
|
53 |
require_once(ASL_PATH . "/backend/settings/types.inc.php");
|
backend/analytics.php
CHANGED
@@ -4,16 +4,16 @@
|
|
4 |
<div class="wpdreams-box">
|
5 |
<?php ob_start(); ?>
|
6 |
<div class="item">
|
7 |
-
<?php $o = new wpdreamsYesNo("analytics", "Enable search Google Analytics integration?",
|
8 |
wpdreams_setval_or_getoption($ana_options, 'analytics', 'asl_analytics_def')
|
9 |
); ?>
|
10 |
</div>
|
11 |
<div class="item">
|
12 |
-
<?php $o = new wpdreamsText("analytics_string", "Google analytics pageview string",
|
13 |
wpdreams_setval_or_getoption($ana_options, "analytics_string", 'asl_analytics_def')
|
14 |
); ?>
|
15 |
<p class='infoMsg'>
|
16 |
-
This is how the pageview will look like on the google analytics website. Use the {asl_term} variable to add the search term to the pageview.
|
17 |
</p>
|
18 |
</div>
|
19 |
<div class="item">
|
@@ -37,14 +37,14 @@
|
|
37 |
<form name='asl_analytics1' method='post'>
|
38 |
<?php if($updated): ?><div class='successMsg'>Analytics options successfuly updated!</div><?php endif; ?>
|
39 |
<fieldset>
|
40 |
-
<legend
|
41 |
<?php print $_r; ?>
|
42 |
<input type='hidden' name='asl_analytics' value='1' />
|
43 |
</fieldset>
|
44 |
<fieldset>
|
45 |
-
<legend
|
46 |
<p class='infoMsg'>
|
47 |
-
After some time you should be able to see the hits on your analytics board.
|
48 |
</p>
|
49 |
<img src="http://i.imgur.com/s7BXiPV.png">
|
50 |
</fieldset>
|
4 |
<div class="wpdreams-box">
|
5 |
<?php ob_start(); ?>
|
6 |
<div class="item">
|
7 |
+
<?php $o = new wpdreamsYesNo("analytics", __("Enable search Google Analytics integration?", "ajax-search-lite"),
|
8 |
wpdreams_setval_or_getoption($ana_options, 'analytics', 'asl_analytics_def')
|
9 |
); ?>
|
10 |
</div>
|
11 |
<div class="item">
|
12 |
+
<?php $o = new wpdreamsText("analytics_string", __("Google analytics pageview string", "ajax-search-lite"),
|
13 |
wpdreams_setval_or_getoption($ana_options, "analytics_string", 'asl_analytics_def')
|
14 |
); ?>
|
15 |
<p class='infoMsg'>
|
16 |
+
<?php _e("This is how the pageview will look like on the google analytics website. Use the {asl_term} variable to add the search term to the pageview.", "ajax-search-lite"); ?>
|
17 |
</p>
|
18 |
</div>
|
19 |
<div class="item">
|
37 |
<form name='asl_analytics1' method='post'>
|
38 |
<?php if($updated): ?><div class='successMsg'>Analytics options successfuly updated!</div><?php endif; ?>
|
39 |
<fieldset>
|
40 |
+
<legend><?php _e("Analytics options", "ajax-search-lite"); ?></legend>
|
41 |
<?php print $_r; ?>
|
42 |
<input type='hidden' name='asl_analytics' value='1' />
|
43 |
</fieldset>
|
44 |
<fieldset>
|
45 |
+
<legend><?php _e("Result", "ajax-search-lite"); ?></legend>
|
46 |
<p class='infoMsg'>
|
47 |
+
<?php _e("After some time you should be able to see the hits on your analytics board.", "ajax-search-lite"); ?>
|
48 |
</p>
|
49 |
<img src="http://i.imgur.com/s7BXiPV.png">
|
50 |
</fieldset>
|
backend/settings.php
CHANGED
@@ -41,12 +41,12 @@ $_dk = 'asl_defaults';
|
|
41 |
<?php ob_start(); ?>
|
42 |
<div class="wpdreams-box">
|
43 |
|
44 |
-
<label class="shortcode"
|
45 |
<input type="text" class="shortcode" value="[wpdreams_ajaxsearchlite]"
|
46 |
readonly="readonly"/>
|
47 |
-
<label class="shortcode"
|
48 |
<input type="text" class="shortcode"
|
49 |
-
value="<?php echo do_shortcode('[wpdreams_ajaxsearchlite'); ?>"
|
50 |
readonly="readonly"/>
|
51 |
</div>
|
52 |
<div class="wpdreams-box">
|
@@ -55,16 +55,16 @@ $_dk = 'asl_defaults';
|
|
55 |
|
56 |
<form action='' method='POST' name='asl_data'>
|
57 |
<ul id="tabs" class='tabs'>
|
58 |
-
<li><a tabid="1" class='current general'
|
59 |
-
<li><a tabid="2" class='multisite'
|
60 |
-
<li><a tabid="3" class='frontend'
|
61 |
-
<li><a tabid="4" class='layout'
|
62 |
-
<li><a tabid="7" class='advanced'
|
63 |
</ul>
|
64 |
<div id="content" class='tabscontent'>
|
65 |
<div tabid="1">
|
66 |
<fieldset>
|
67 |
-
<legend
|
68 |
|
69 |
<?php include(ASL_PATH . "backend/tabs/instance/general_options.php"); ?>
|
70 |
|
@@ -72,7 +72,7 @@ $_dk = 'asl_defaults';
|
|
72 |
</div>
|
73 |
<div tabid="2">
|
74 |
<fieldset>
|
75 |
-
<legend
|
76 |
|
77 |
<?php include(ASL_PATH . "backend/tabs/instance/image_options.php"); ?>
|
78 |
|
@@ -80,7 +80,7 @@ $_dk = 'asl_defaults';
|
|
80 |
</div>
|
81 |
<div tabid="3">
|
82 |
<fieldset>
|
83 |
-
<legend
|
84 |
|
85 |
<?php include(ASL_PATH . "backend/tabs/instance/frontend_options.php"); ?>
|
86 |
|
@@ -88,7 +88,7 @@ $_dk = 'asl_defaults';
|
|
88 |
</div>
|
89 |
<div tabid="4">
|
90 |
<fieldset>
|
91 |
-
<legend
|
92 |
|
93 |
<?php include(ASL_PATH . "backend/tabs/instance/layout_options.php"); ?>
|
94 |
|
@@ -96,7 +96,7 @@ $_dk = 'asl_defaults';
|
|
96 |
</div>
|
97 |
<div tabid="7">
|
98 |
<fieldset>
|
99 |
-
<legend
|
100 |
|
101 |
<?php include(ASL_PATH . "backend/tabs/instance/advanced_options.php"); ?>
|
102 |
|
@@ -116,7 +116,7 @@ $_dk = 'asl_defaults';
|
|
116 |
|
117 |
update_option('asl_options', $_asl_options);
|
118 |
|
119 |
-
$messages .= "<div class='infoMsg'>Ajax Search Lite settings saved
|
120 |
}
|
121 |
|
122 |
echo str_replace("{--messages--}", $messages, $output);
|
41 |
<?php ob_start(); ?>
|
42 |
<div class="wpdreams-box">
|
43 |
|
44 |
+
<label class="shortcode"><?php _e("Search shortcode:", "ajax-search-lite"); ?></label>
|
45 |
<input type="text" class="shortcode" value="[wpdreams_ajaxsearchlite]"
|
46 |
readonly="readonly"/>
|
47 |
+
<label class="shortcode"><?php _e("Search shortcode for templates:", "ajax-search-lite"); ?></label>
|
48 |
<input type="text" class="shortcode"
|
49 |
+
value="<?php echo do_shortcode('[wpdreams_ajaxsearchlite]'); ?>"
|
50 |
readonly="readonly"/>
|
51 |
</div>
|
52 |
<div class="wpdreams-box">
|
55 |
|
56 |
<form action='' method='POST' name='asl_data'>
|
57 |
<ul id="tabs" class='tabs'>
|
58 |
+
<li><a tabid="1" class='current general'><?php _e("General Options", "ajax-search-lite"); ?></a></li>
|
59 |
+
<li><a tabid="2" class='multisite'><?php _e("Image Options", "ajax-search-lite"); ?></a></li>
|
60 |
+
<li><a tabid="3" class='frontend'><?php _e("Frontend Options", "ajax-search-lite"); ?></a></li>
|
61 |
+
<li><a tabid="4" class='layout'><?php _e("Layout options", "ajax-search-lite"); ?></a></li>
|
62 |
+
<li><a tabid="7" class='advanced'><?php _e("Advanced", "ajax-search-lite"); ?></a></li>
|
63 |
</ul>
|
64 |
<div id="content" class='tabscontent'>
|
65 |
<div tabid="1">
|
66 |
<fieldset>
|
67 |
+
<legend><?php _e("Genearal Options", "ajax-search-lite"); ?></legend>
|
68 |
|
69 |
<?php include(ASL_PATH . "backend/tabs/instance/general_options.php"); ?>
|
70 |
|
72 |
</div>
|
73 |
<div tabid="2">
|
74 |
<fieldset>
|
75 |
+
<legend><?php _e("Image Options", "ajax-search-lite"); ?></legend>
|
76 |
|
77 |
<?php include(ASL_PATH . "backend/tabs/instance/image_options.php"); ?>
|
78 |
|
80 |
</div>
|
81 |
<div tabid="3">
|
82 |
<fieldset>
|
83 |
+
<legend><?php _e("Frontend Search Settings", "ajax-search-lite"); ?></legend>
|
84 |
|
85 |
<?php include(ASL_PATH . "backend/tabs/instance/frontend_options.php"); ?>
|
86 |
|
88 |
</div>
|
89 |
<div tabid="4">
|
90 |
<fieldset>
|
91 |
+
<legend><?php _e("Layout Options", "ajax-search-lite"); ?></legend>
|
92 |
|
93 |
<?php include(ASL_PATH . "backend/tabs/instance/layout_options.php"); ?>
|
94 |
|
96 |
</div>
|
97 |
<div tabid="7">
|
98 |
<fieldset>
|
99 |
+
<legend><?php _e("Advanced Options", "ajax-search-lite"); ?></legend>
|
100 |
|
101 |
<?php include(ASL_PATH . "backend/tabs/instance/advanced_options.php"); ?>
|
102 |
|
116 |
|
117 |
update_option('asl_options', $_asl_options);
|
118 |
|
119 |
+
$messages .= "<div class='infoMsg'>" . __("Ajax Search Lite settings saved!", "ajax-search-lite") . "</div>";
|
120 |
}
|
121 |
|
122 |
echo str_replace("{--messages--}", $messages, $output);
|
backend/settings/class/customfields.class.php
CHANGED
@@ -19,7 +19,7 @@ if (!class_exists("wpdreamsCustomFields")) {
|
|
19 |
<div class='wpdreamsCustomFields'>
|
20 |
<fieldset>
|
21 |
<legend>" . $this->label . "</legend>";
|
22 |
-
echo '<div class="sortablecontainer"><p>Available public custom fields types</p><ul id="sortable' . self::$_instancenumber . '" class="connectedSortable">';
|
23 |
if ($this->types != null && is_array($this->types)) {
|
24 |
foreach ($this->types as $k => $v) {
|
25 |
if ($this->selected == null || !in_array($v['meta_key'], $this->selected)) {
|
@@ -28,7 +28,7 @@ if (!class_exists("wpdreamsCustomFields")) {
|
|
28 |
}
|
29 |
}
|
30 |
echo "</ul></div>";
|
31 |
-
echo '<div class="sortablecontainer"><p>Drag here the custom fields you want to use
|
32 |
if ($this->selected != null && is_array($this->selected)) {
|
33 |
foreach ($this->selected as $k => $v) {
|
34 |
echo '<li class="ui-state-default">' . $v . '</li>';
|
19 |
<div class='wpdreamsCustomFields'>
|
20 |
<fieldset>
|
21 |
<legend>" . $this->label . "</legend>";
|
22 |
+
echo '<div class="sortablecontainer"><p>'.__("Available public custom fields types", "ajax-search-lite").'</p><ul id="sortable' . self::$_instancenumber . '" class="connectedSortable">';
|
23 |
if ($this->types != null && is_array($this->types)) {
|
24 |
foreach ($this->types as $k => $v) {
|
25 |
if ($this->selected == null || !in_array($v['meta_key'], $this->selected)) {
|
28 |
}
|
29 |
}
|
30 |
echo "</ul></div>";
|
31 |
+
echo '<div class="sortablecontainer"><p>'. __("Drag here the custom fields you want to use!", "ajax-search-lite").'</p><ul id="sortable_conn' . self::$_instancenumber . '" class="connectedSortable">';
|
32 |
if ($this->selected != null && is_array($this->selected)) {
|
33 |
foreach ($this->selected as $k => $v) {
|
34 |
echo '<li class="ui-state-default">' . $v . '</li>';
|
backend/settings/class/customposttypes.class.php
CHANGED
@@ -20,7 +20,7 @@ if (!class_exists("wpdreamsCustomPostTypes")) {
|
|
20 |
<div class='wpdreamsCustomPostTypes'>
|
21 |
<fieldset>
|
22 |
<legend>" . $this->label . "</legend>";
|
23 |
-
echo '<div class="sortablecontainer"><p>Available post types</p><ul id="sortable' . self::$_instancenumber . '" class="connectedSortable">';
|
24 |
if ($this->types != null && is_array($this->types)) {
|
25 |
foreach ($this->types as $k => $v) {
|
26 |
if ($this->selected == null || !in_array($v, $this->selected)) {
|
@@ -29,7 +29,7 @@ if (!class_exists("wpdreamsCustomPostTypes")) {
|
|
29 |
}
|
30 |
}
|
31 |
echo "</ul></div>";
|
32 |
-
echo '<div class="sortablecontainer"><p>Drag here the post types you want to use
|
33 |
if ($this->selected != null && is_array($this->selected)) {
|
34 |
foreach ($this->selected as $k => $v) {
|
35 |
echo '<li class="ui-state-default">' . $v . '</li>';
|
20 |
<div class='wpdreamsCustomPostTypes'>
|
21 |
<fieldset>
|
22 |
<legend>" . $this->label . "</legend>";
|
23 |
+
echo '<div class="sortablecontainer"><p>'. __("Available post types", "ajax-search-lite", "ajax-search-lite") . '</p><ul id="sortable' . self::$_instancenumber . '" class="connectedSortable">';
|
24 |
if ($this->types != null && is_array($this->types)) {
|
25 |
foreach ($this->types as $k => $v) {
|
26 |
if ($this->selected == null || !in_array($v, $this->selected)) {
|
29 |
}
|
30 |
}
|
31 |
echo "</ul></div>";
|
32 |
+
echo '<div class="sortablecontainer"><p>'. __("Drag here the post types you want to use!", "ajax-search-lite") . '</p><ul id="sortable_conn' . self::$_instancenumber . '" class="connectedSortable">';
|
33 |
if ($this->selected != null && is_array($this->selected)) {
|
34 |
foreach ($this->selected as $k => $v) {
|
35 |
echo '<li class="ui-state-default">' . $v . '</li>';
|
backend/tabs/instance/advanced_options.php
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
<div class="item">
|
2 |
<?php
|
3 |
-
$o = new wpdreamsCustomFSelect("titlefield", "Title Field", array(
|
4 |
'selects'=>wpdreams_setval_or_getoption($sd, 'titlefield_def', $_dk),
|
5 |
'value'=>wpdreams_setval_or_getoption($sd, 'titlefield', $_dk)
|
6 |
));
|
@@ -9,7 +9,7 @@
|
|
9 |
</div>
|
10 |
<div class="item">
|
11 |
<?php
|
12 |
-
$o = new wpdreamsCustomFSelect("descriptionfield", "Description Field", array(
|
13 |
'selects'=>wpdreams_setval_or_getoption($sd, 'descriptionfield_def', $_dk),
|
14 |
'value'=>wpdreams_setval_or_getoption($sd, 'descriptionfield', $_dk)
|
15 |
));
|
@@ -18,20 +18,20 @@
|
|
18 |
</div>
|
19 |
<div class="item">
|
20 |
<?php
|
21 |
-
$o = new wpdreamsCategories("excludecategories", "Exclude categories", wpdreams_setval_or_getoption($sd, 'excludecategories', $_dk));
|
22 |
$params[$o->getName()] = $o->getData();
|
23 |
$params['selected-'.$o->getName()] = $o->getSelected();
|
24 |
?>
|
25 |
</div>
|
26 |
<div class="item">
|
27 |
<?php
|
28 |
-
$o = new wpdreamsTextarea("excludeposts", "Exclude Posts by ID's (comma separated post ID-s)", wpdreams_setval_or_getoption($sd, 'excludeposts', $_dk));
|
29 |
$params[$o->getName()] = $o->getData();
|
30 |
?>
|
31 |
</div>
|
32 |
<div class="item">
|
33 |
<?php
|
34 |
-
$o = new wpdreamsYesNo("wpml_compatibility", "WPML compatibility", wpdreams_setval_or_getoption($sd, 'wpml_compatibility', $_dk));
|
35 |
$params[$o->getName()] = $o->getData();
|
36 |
?>
|
37 |
</div>
|
1 |
<div class="item">
|
2 |
<?php
|
3 |
+
$o = new wpdreamsCustomFSelect("titlefield", __("Title Field", "ajax-search-lite"), array(
|
4 |
'selects'=>wpdreams_setval_or_getoption($sd, 'titlefield_def', $_dk),
|
5 |
'value'=>wpdreams_setval_or_getoption($sd, 'titlefield', $_dk)
|
6 |
));
|
9 |
</div>
|
10 |
<div class="item">
|
11 |
<?php
|
12 |
+
$o = new wpdreamsCustomFSelect("descriptionfield", __("Description Field", "ajax-search-lite"), array(
|
13 |
'selects'=>wpdreams_setval_or_getoption($sd, 'descriptionfield_def', $_dk),
|
14 |
'value'=>wpdreams_setval_or_getoption($sd, 'descriptionfield', $_dk)
|
15 |
));
|
18 |
</div>
|
19 |
<div class="item">
|
20 |
<?php
|
21 |
+
$o = new wpdreamsCategories("excludecategories", __("Exclude categories", "ajax-search-lite"), wpdreams_setval_or_getoption($sd, 'excludecategories', $_dk));
|
22 |
$params[$o->getName()] = $o->getData();
|
23 |
$params['selected-'.$o->getName()] = $o->getSelected();
|
24 |
?>
|
25 |
</div>
|
26 |
<div class="item">
|
27 |
<?php
|
28 |
+
$o = new wpdreamsTextarea("excludeposts", __("Exclude Posts by ID's (comma separated post ID-s)", "ajax-search-lite"), wpdreams_setval_or_getoption($sd, 'excludeposts', $_dk));
|
29 |
$params[$o->getName()] = $o->getData();
|
30 |
?>
|
31 |
</div>
|
32 |
<div class="item">
|
33 |
<?php
|
34 |
+
$o = new wpdreamsYesNo("wpml_compatibility", __("WPML compatibility", "ajax-search-lite"), wpdreams_setval_or_getoption($sd, 'wpml_compatibility', $_dk));
|
35 |
$params[$o->getName()] = $o->getData();
|
36 |
?>
|
37 |
</div>
|
backend/tabs/instance/frontend_options.php
CHANGED
@@ -1,15 +1,15 @@
|
|
1 |
<div class="item">
|
2 |
<?php
|
3 |
-
$o = new wpdreamsYesNo("show_frontend_search_settings", "Show search settings on the frontend?", wpdreams_setval_or_getoption($sd, 'show_frontend_search_settings', $_dk));
|
4 |
$params[$o->getName()] = $o->getData();
|
5 |
?>
|
6 |
</div>
|
7 |
<div class="item" style="text-align:center;">
|
8 |
-
The default values of the checkboxes on the frontend are the values set above.
|
9 |
</div>
|
10 |
<div class="item">
|
11 |
<?php
|
12 |
-
$o = new wpdreamsYesNo("showexactmatches", "Show exact matches selector?", wpdreams_setval_or_getoption($sd, 'showexactmatches', $_dk));
|
13 |
$params[$o->getName()] = $o->getData();
|
14 |
$o = new wpdreamsText("exactmatchestext", "Text", wpdreams_setval_or_getoption($sd, 'exactmatchestext', $_dk));
|
15 |
$params[$o->getName()] = $o->getData();
|
@@ -17,61 +17,61 @@
|
|
17 |
</div>
|
18 |
<div class="item">
|
19 |
<?php
|
20 |
-
$o = new wpdreamsYesNo("showsearchinposts", "Show search in posts selector?", wpdreams_setval_or_getoption($sd, 'showsearchinposts', $_dk));
|
21 |
$params[$o->getName()] = $o->getData();
|
22 |
$o = new wpdreamsText("searchinpoststext", "Text", wpdreams_setval_or_getoption($sd, 'searchinpoststext', $_dk));
|
23 |
$params[$o->getName()] = $o->getData();
|
24 |
?></div>
|
25 |
<div class="item">
|
26 |
<?php
|
27 |
-
$o = new wpdreamsYesNo("showsearchinpages", "Show search in pages selector?", wpdreams_setval_or_getoption($sd, 'showsearchinpages', $_dk));
|
28 |
$params[$o->getName()] = $o->getData();
|
29 |
$o = new wpdreamsText("searchinpagestext", "Text", wpdreams_setval_or_getoption($sd, 'searchinpagestext', $_dk));
|
30 |
$params[$o->getName()] = $o->getData();
|
31 |
?></div>
|
32 |
<div class="item">
|
33 |
<?php
|
34 |
-
$o = new wpdreamsYesNo("showsearchintitle", "Show search in title selector?", wpdreams_setval_or_getoption($sd, 'showsearchintitle', $_dk));
|
35 |
$params[$o->getName()] = $o->getData();
|
36 |
$o = new wpdreamsText("searchintitletext", "Text", wpdreams_setval_or_getoption($sd, 'searchintitletext', $_dk));
|
37 |
$params[$o->getName()] = $o->getData();
|
38 |
?></div>
|
39 |
<div class="item">
|
40 |
<?php
|
41 |
-
$o = new wpdreamsYesNo("showsearchincontent", "Show search in content selector?", wpdreams_setval_or_getoption($sd, 'showsearchincontent', $_dk));
|
42 |
$params[$o->getName()] = $o->getData();
|
43 |
$o = new wpdreamsText("searchincontenttext", "Text", wpdreams_setval_or_getoption($sd, 'searchincontenttext', $_dk));
|
44 |
$params[$o->getName()] = $o->getData();
|
45 |
?></div>
|
46 |
<div class="item"><?php
|
47 |
-
$o = new wpdreamsCustomPostTypesEditable("showcustomtypes", "Show search in custom post types selectors", wpdreams_setval_or_getoption($sd, 'showcustomtypes', $_dk));
|
48 |
$params[$o->getName()] = $o->getData();
|
49 |
$params['selected-'.$o->getName()] = $o->getSelected();
|
50 |
?></div>
|
51 |
<div class="item">
|
52 |
-
<p class='infoMsg'
|
53 |
<?php
|
54 |
-
$o = new wpdreamsYesNo("showsearchincategories", "Show the categories selectors?", wpdreams_setval_or_getoption($sd, 'showsearchincategories', $_dk));
|
55 |
$params[$o->getName()] = $o->getData();
|
56 |
?></div>
|
57 |
<div class="item">
|
58 |
<?php
|
59 |
-
$o = new wpdreamsYesNo("showuncategorised", "Show the uncategorised category?", wpdreams_setval_or_getoption($sd, 'showuncategorised', $_dk));
|
60 |
$params[$o->getName()] = $o->getData();
|
61 |
?></div>
|
62 |
<div class="item"><?php
|
63 |
-
$o = new wpdreamsCategories("exsearchincategories", "Select which categories exclude", wpdreams_setval_or_getoption($sd, 'exsearchincategories', $_dk));
|
64 |
$params[$o->getName()] = $o->getData();
|
65 |
$params['selected-'.$o->getName()] = $o->getSelected();
|
66 |
?>
|
67 |
</div>
|
68 |
<div class="item">
|
69 |
<?php
|
70 |
-
$o = new wpdreamsText("exsearchincategoriestext", "Categories filter box header text", wpdreams_setval_or_getoption($sd, 'exsearchincategoriestext', $_dk));
|
71 |
$params[$o->getName()] = $o->getData();
|
72 |
?>
|
73 |
</div>
|
74 |
<div class="item">
|
75 |
<input type="hidden" name='asl_submit' value=1 />
|
76 |
-
<input name="submit_asl" type="submit" value="Save options!" />
|
77 |
</div>
|
1 |
<div class="item">
|
2 |
<?php
|
3 |
+
$o = new wpdreamsYesNo("show_frontend_search_settings", __("Show search settings on the frontend?", "ajax-search-lite"), wpdreams_setval_or_getoption($sd, 'show_frontend_search_settings', $_dk));
|
4 |
$params[$o->getName()] = $o->getData();
|
5 |
?>
|
6 |
</div>
|
7 |
<div class="item" style="text-align:center;">
|
8 |
+
<?php _e("The default values of the checkboxes on the frontend are the values set above.", "ajax-search-lite"); ?>
|
9 |
</div>
|
10 |
<div class="item">
|
11 |
<?php
|
12 |
+
$o = new wpdreamsYesNo("showexactmatches", __("Show exact matches selector?", "ajax-search-lite"), wpdreams_setval_or_getoption($sd, 'showexactmatches', $_dk));
|
13 |
$params[$o->getName()] = $o->getData();
|
14 |
$o = new wpdreamsText("exactmatchestext", "Text", wpdreams_setval_or_getoption($sd, 'exactmatchestext', $_dk));
|
15 |
$params[$o->getName()] = $o->getData();
|
17 |
</div>
|
18 |
<div class="item">
|
19 |
<?php
|
20 |
+
$o = new wpdreamsYesNo("showsearchinposts", __("Show search in posts selector?", "ajax-search-lite"), wpdreams_setval_or_getoption($sd, 'showsearchinposts', $_dk));
|
21 |
$params[$o->getName()] = $o->getData();
|
22 |
$o = new wpdreamsText("searchinpoststext", "Text", wpdreams_setval_or_getoption($sd, 'searchinpoststext', $_dk));
|
23 |
$params[$o->getName()] = $o->getData();
|
24 |
?></div>
|
25 |
<div class="item">
|
26 |
<?php
|
27 |
+
$o = new wpdreamsYesNo("showsearchinpages", __("Show search in pages selector?", "ajax-search-lite"), wpdreams_setval_or_getoption($sd, 'showsearchinpages', $_dk));
|
28 |
$params[$o->getName()] = $o->getData();
|
29 |
$o = new wpdreamsText("searchinpagestext", "Text", wpdreams_setval_or_getoption($sd, 'searchinpagestext', $_dk));
|
30 |
$params[$o->getName()] = $o->getData();
|
31 |
?></div>
|
32 |
<div class="item">
|
33 |
<?php
|
34 |
+
$o = new wpdreamsYesNo("showsearchintitle", __("Show search in title selector?", "ajax-search-lite"), wpdreams_setval_or_getoption($sd, 'showsearchintitle', $_dk));
|
35 |
$params[$o->getName()] = $o->getData();
|
36 |
$o = new wpdreamsText("searchintitletext", "Text", wpdreams_setval_or_getoption($sd, 'searchintitletext', $_dk));
|
37 |
$params[$o->getName()] = $o->getData();
|
38 |
?></div>
|
39 |
<div class="item">
|
40 |
<?php
|
41 |
+
$o = new wpdreamsYesNo("showsearchincontent", __("Show search in content selector?", "ajax-search-lite"), wpdreams_setval_or_getoption($sd, 'showsearchincontent', $_dk));
|
42 |
$params[$o->getName()] = $o->getData();
|
43 |
$o = new wpdreamsText("searchincontenttext", "Text", wpdreams_setval_or_getoption($sd, 'searchincontenttext', $_dk));
|
44 |
$params[$o->getName()] = $o->getData();
|
45 |
?></div>
|
46 |
<div class="item"><?php
|
47 |
+
$o = new wpdreamsCustomPostTypesEditable("showcustomtypes", __("Show search in custom post types selectors", "ajax-search-lite"), wpdreams_setval_or_getoption($sd, 'showcustomtypes', $_dk));
|
48 |
$params[$o->getName()] = $o->getData();
|
49 |
$params['selected-'.$o->getName()] = $o->getSelected();
|
50 |
?></div>
|
51 |
<div class="item">
|
52 |
+
<p class='infoMsg'><?php _e("Nor recommended if you have more than 500 categories! (the HTML output will get too big)", "ajax-search-lite"); ?></p>
|
53 |
<?php
|
54 |
+
$o = new wpdreamsYesNo("showsearchincategories", __("Show the categories selectors?", "ajax-search-lite"), wpdreams_setval_or_getoption($sd, 'showsearchincategories', $_dk));
|
55 |
$params[$o->getName()] = $o->getData();
|
56 |
?></div>
|
57 |
<div class="item">
|
58 |
<?php
|
59 |
+
$o = new wpdreamsYesNo("showuncategorised", __("Show the uncategorised category?", "ajax-search-lite"), wpdreams_setval_or_getoption($sd, 'showuncategorised', $_dk));
|
60 |
$params[$o->getName()] = $o->getData();
|
61 |
?></div>
|
62 |
<div class="item"><?php
|
63 |
+
$o = new wpdreamsCategories("exsearchincategories", __("Select which categories exclude", "ajax-search-lite"), wpdreams_setval_or_getoption($sd, 'exsearchincategories', $_dk));
|
64 |
$params[$o->getName()] = $o->getData();
|
65 |
$params['selected-'.$o->getName()] = $o->getSelected();
|
66 |
?>
|
67 |
</div>
|
68 |
<div class="item">
|
69 |
<?php
|
70 |
+
$o = new wpdreamsText("exsearchincategoriestext", __("Categories filter box header text", "ajax-search-lite"), wpdreams_setval_or_getoption($sd, 'exsearchincategoriestext', $_dk));
|
71 |
$params[$o->getName()] = $o->getData();
|
72 |
?>
|
73 |
</div>
|
74 |
<div class="item">
|
75 |
<input type="hidden" name='asl_submit' value=1 />
|
76 |
+
<input name="submit_asl" type="submit" value="<?php _e("Save options!", "ajax-search-lite"); ?>" />
|
77 |
</div>
|
backend/tabs/instance/general_options.php
CHANGED
@@ -9,7 +9,7 @@ $themes = array(
|
|
9 |
?>
|
10 |
<div class="item">
|
11 |
<?php
|
12 |
-
$o = new wpdreamsCustomSelect("theme", "Theme", array(
|
13 |
'selects'=>$themes,
|
14 |
'value'=>wpdreams_setval_or_getoption($sd, 'theme', $_dk)
|
15 |
));
|
@@ -18,47 +18,47 @@ $themes = array(
|
|
18 |
</div>
|
19 |
<div class="item">
|
20 |
<?php
|
21 |
-
$o = new wpdreamsYesNo("searchinposts", "Search in posts?",
|
22 |
wpdreams_setval_or_getoption($sd, "searchinposts", $_dk));
|
23 |
$params[$o->getName()] = $o->getData();
|
24 |
?>
|
25 |
</div>
|
26 |
<div class="item">
|
27 |
<?php
|
28 |
-
$o = new wpdreamsYesNo("searchinpages", "Search in pages?",
|
29 |
wpdreams_setval_or_getoption($sd, 'searchinpages', $_dk));
|
30 |
$params[$o->getName()] = $o->getData();
|
31 |
?>
|
32 |
</div>
|
33 |
<div class="item"><?php
|
34 |
-
$o = new wpdreamsCustomPostTypes("customtypes", "Search in custom post types",
|
35 |
wpdreams_setval_or_getoption($sd, 'customtypes', $_dk));
|
36 |
$params[$o->getName()] = $o->getData();
|
37 |
$params['selected-'.$o->getName()] = $o->getSelected();
|
38 |
?></div>
|
39 |
<div class="item">
|
40 |
<?php
|
41 |
-
$o = new wpdreamsYesNo("searchintitle", "Search in title?",
|
42 |
wpdreams_setval_or_getoption($sd, 'searchintitle', $_dk));
|
43 |
$params[$o->getName()] = $o->getData();
|
44 |
?>
|
45 |
</div>
|
46 |
<div class="item">
|
47 |
<?php
|
48 |
-
$o = new wpdreamsYesNo("searchincontent", "Search in content?",
|
49 |
wpdreams_setval_or_getoption($sd, 'searchincontent', $_dk));
|
50 |
$params[$o->getName()] = $o->getData();
|
51 |
?>
|
52 |
</div>
|
53 |
<div class="item">
|
54 |
<?php
|
55 |
-
$o = new wpdreamsYesNo("searchinexcerpt", "Search in post excerpts?",
|
56 |
wpdreams_setval_or_getoption($sd, 'searchinexcerpt', $_dk));
|
57 |
$params[$o->getName()] = $o->getData();
|
58 |
?>
|
59 |
</div>
|
60 |
<div class="item"><?php
|
61 |
-
$o = new wpdreamsCustomFields("customfields", "Search in custom fields",
|
62 |
wpdreams_setval_or_getoption($sd, 'customfields', $_dk));
|
63 |
$params[$o->getName()] = $o->getData();
|
64 |
$params['selected-'.$o->getName()] = $o->getSelected();
|
@@ -66,20 +66,20 @@ $themes = array(
|
|
66 |
</div>
|
67 |
<div class="item">
|
68 |
<?php
|
69 |
-
$o = new wpdreamsYesNo("exactonly", "Show exact matches only?",
|
70 |
wpdreams_setval_or_getoption($sd, 'exactonly', $_dk));
|
71 |
$params[$o->getName()] = $o->getData();
|
72 |
?>
|
73 |
</div>
|
74 |
<div class="item">
|
75 |
<?php
|
76 |
-
$o = new wpdreamsYesNo("searchinterms", "Search in terms? (categories, tags)",
|
77 |
wpdreams_setval_or_getoption($sd, 'searchinterms', $_dk));
|
78 |
$params[$o->getName()] = $o->getData();
|
79 |
?>
|
80 |
</div>
|
81 |
<div class="item"><?php
|
82 |
-
$o = new wpdreamsCustomSelect("orderby", "Result ordering",
|
83 |
array(
|
84 |
'selects' => wpdreams_setval_or_getoption($sd, 'orderby_def', $_dk),
|
85 |
'value' => wpdreams_setval_or_getoption($sd, 'orderby', $_dk)
|
@@ -88,44 +88,44 @@ $themes = array(
|
|
88 |
?></div>
|
89 |
<div class="item">
|
90 |
<?php
|
91 |
-
$o = new wpdreamsYesNo("triggeronclick", "Trigger search when clicking on search icon?",
|
92 |
wpdreams_setval_or_getoption($sd, 'triggeronclick', $_dk));
|
93 |
$params[$o->getName()] = $o->getData();
|
94 |
?>
|
95 |
</div>
|
96 |
<div class="item">
|
97 |
<?php
|
98 |
-
$o = new wpdreamsYesNo("redirectonclick", "
|
99 |
wpdreams_setval_or_getoption($sd, 'redirectonclick', $_dk));
|
100 |
$params[$o->getName()] = $o->getData();
|
101 |
?>
|
102 |
</div>
|
103 |
<div class="item">
|
104 |
<?php
|
105 |
-
$o = new wpdreamsYesNo("triggerontype", "Trigger search when typing?",
|
106 |
wpdreams_setval_or_getoption($sd, 'triggerontype', $_dk));
|
107 |
$params[$o->getName()] = $o->getData();
|
108 |
?>
|
109 |
</div>
|
110 |
<div class="item">
|
111 |
<?php
|
112 |
-
$o = new wpdreamsTextSmall("charcount", "Minimal character count to trigger search",
|
113 |
wpdreams_setval_or_getoption($sd, 'charcount', $_dk), array(array("func" => "ctype_digit", "op" => "eq", "val" => true)));
|
114 |
$params[$o->getName()] = $o->getData();
|
115 |
?>
|
116 |
</div>
|
117 |
<div class="item">
|
118 |
<?php
|
119 |
-
$o = new wpdreamsTextSmall("maxresults", "Max. results", wpdreams_setval_or_getoption($sd, 'maxresults', $_dk), array(array("func" => "ctype_digit", "op" => "eq", "val" => true)));
|
120 |
$params[$o->getName()] = $o->getData();
|
121 |
?>
|
122 |
</div>
|
123 |
<div class="item"><?php
|
124 |
-
$o = new wpdreamsTextSmall("itemscount", "Results box viewport (in item numbers)", wpdreams_setval_or_getoption($sd, 'itemscount', $_dk), array(array("func" => "ctype_digit", "op" => "eq", "val" => true)));
|
125 |
$params[$o->getName()] = $o->getData();
|
126 |
?>
|
127 |
</div>
|
128 |
<div class="item">
|
129 |
<input type="hidden" name='asl_submit' value=1 />
|
130 |
-
<input name="submit_asl" type="submit" value="Save options!" />
|
131 |
</div>
|
9 |
?>
|
10 |
<div class="item">
|
11 |
<?php
|
12 |
+
$o = new wpdreamsCustomSelect("theme", __("Theme", "ajax-search-lite"), array(
|
13 |
'selects'=>$themes,
|
14 |
'value'=>wpdreams_setval_or_getoption($sd, 'theme', $_dk)
|
15 |
));
|
18 |
</div>
|
19 |
<div class="item">
|
20 |
<?php
|
21 |
+
$o = new wpdreamsYesNo("searchinposts", __("Search in posts?", "ajax-search-lite"),
|
22 |
wpdreams_setval_or_getoption($sd, "searchinposts", $_dk));
|
23 |
$params[$o->getName()] = $o->getData();
|
24 |
?>
|
25 |
</div>
|
26 |
<div class="item">
|
27 |
<?php
|
28 |
+
$o = new wpdreamsYesNo("searchinpages", __("Search in pages?", "ajax-search-lite"),
|
29 |
wpdreams_setval_or_getoption($sd, 'searchinpages', $_dk));
|
30 |
$params[$o->getName()] = $o->getData();
|
31 |
?>
|
32 |
</div>
|
33 |
<div class="item"><?php
|
34 |
+
$o = new wpdreamsCustomPostTypes("customtypes", __("Search in custom post types", "ajax-search-lite"),
|
35 |
wpdreams_setval_or_getoption($sd, 'customtypes', $_dk));
|
36 |
$params[$o->getName()] = $o->getData();
|
37 |
$params['selected-'.$o->getName()] = $o->getSelected();
|
38 |
?></div>
|
39 |
<div class="item">
|
40 |
<?php
|
41 |
+
$o = new wpdreamsYesNo("searchintitle", __("Search in title?", "ajax-search-lite"),
|
42 |
wpdreams_setval_or_getoption($sd, 'searchintitle', $_dk));
|
43 |
$params[$o->getName()] = $o->getData();
|
44 |
?>
|
45 |
</div>
|
46 |
<div class="item">
|
47 |
<?php
|
48 |
+
$o = new wpdreamsYesNo("searchincontent", __("Search in content?", "ajax-search-lite"),
|
49 |
wpdreams_setval_or_getoption($sd, 'searchincontent', $_dk));
|
50 |
$params[$o->getName()] = $o->getData();
|
51 |
?>
|
52 |
</div>
|
53 |
<div class="item">
|
54 |
<?php
|
55 |
+
$o = new wpdreamsYesNo("searchinexcerpt", __("Search in post excerpts?", "ajax-search-lite"),
|
56 |
wpdreams_setval_or_getoption($sd, 'searchinexcerpt', $_dk));
|
57 |
$params[$o->getName()] = $o->getData();
|
58 |
?>
|
59 |
</div>
|
60 |
<div class="item"><?php
|
61 |
+
$o = new wpdreamsCustomFields("customfields", __("Search in custom fields", "ajax-search-lite"),
|
62 |
wpdreams_setval_or_getoption($sd, 'customfields', $_dk));
|
63 |
$params[$o->getName()] = $o->getData();
|
64 |
$params['selected-'.$o->getName()] = $o->getSelected();
|
66 |
</div>
|
67 |
<div class="item">
|
68 |
<?php
|
69 |
+
$o = new wpdreamsYesNo("exactonly", __("Show exact matches only?", "ajax-search-lite"),
|
70 |
wpdreams_setval_or_getoption($sd, 'exactonly', $_dk));
|
71 |
$params[$o->getName()] = $o->getData();
|
72 |
?>
|
73 |
</div>
|
74 |
<div class="item">
|
75 |
<?php
|
76 |
+
$o = new wpdreamsYesNo("searchinterms", __("Search in terms? (categories, tags)", "ajax-search-lite"),
|
77 |
wpdreams_setval_or_getoption($sd, 'searchinterms', $_dk));
|
78 |
$params[$o->getName()] = $o->getData();
|
79 |
?>
|
80 |
</div>
|
81 |
<div class="item"><?php
|
82 |
+
$o = new wpdreamsCustomSelect("orderby", __("Result ordering", "ajax-search-lite"),
|
83 |
array(
|
84 |
'selects' => wpdreams_setval_or_getoption($sd, 'orderby_def', $_dk),
|
85 |
'value' => wpdreams_setval_or_getoption($sd, 'orderby', $_dk)
|
88 |
?></div>
|
89 |
<div class="item">
|
90 |
<?php
|
91 |
+
$o = new wpdreamsYesNo("triggeronclick", __("Trigger search when clicking on search icon?", "ajax-search-lite"),
|
92 |
wpdreams_setval_or_getoption($sd, 'triggeronclick', $_dk));
|
93 |
$params[$o->getName()] = $o->getData();
|
94 |
?>
|
95 |
</div>
|
96 |
<div class="item">
|
97 |
<?php
|
98 |
+
$o = new wpdreamsYesNo("redirectonclick", __("Redirect to search results page when clicking on search icon?", "ajax-search-lite"),
|
99 |
wpdreams_setval_or_getoption($sd, 'redirectonclick', $_dk));
|
100 |
$params[$o->getName()] = $o->getData();
|
101 |
?>
|
102 |
</div>
|
103 |
<div class="item">
|
104 |
<?php
|
105 |
+
$o = new wpdreamsYesNo("triggerontype", __("Trigger search when typing?", "ajax-search-lite"),
|
106 |
wpdreams_setval_or_getoption($sd, 'triggerontype', $_dk));
|
107 |
$params[$o->getName()] = $o->getData();
|
108 |
?>
|
109 |
</div>
|
110 |
<div class="item">
|
111 |
<?php
|
112 |
+
$o = new wpdreamsTextSmall("charcount", __("Minimal character count to trigger search", "ajax-search-lite"),
|
113 |
wpdreams_setval_or_getoption($sd, 'charcount', $_dk), array(array("func" => "ctype_digit", "op" => "eq", "val" => true)));
|
114 |
$params[$o->getName()] = $o->getData();
|
115 |
?>
|
116 |
</div>
|
117 |
<div class="item">
|
118 |
<?php
|
119 |
+
$o = new wpdreamsTextSmall("maxresults", __("Max. results", "ajax-search-lite"), wpdreams_setval_or_getoption($sd, 'maxresults', $_dk), array(array("func" => "ctype_digit", "op" => "eq", "val" => true)));
|
120 |
$params[$o->getName()] = $o->getData();
|
121 |
?>
|
122 |
</div>
|
123 |
<div class="item"><?php
|
124 |
+
$o = new wpdreamsTextSmall("itemscount", __("Results box viewport (in item numbers)", "ajax-search-lite"), wpdreams_setval_or_getoption($sd, 'itemscount', $_dk), array(array("func" => "ctype_digit", "op" => "eq", "val" => true)));
|
125 |
$params[$o->getName()] = $o->getData();
|
126 |
?>
|
127 |
</div>
|
128 |
<div class="item">
|
129 |
<input type="hidden" name='asl_submit' value=1 />
|
130 |
+
<input name="submit_asl" type="submit" value="<?php _e("Save options!", "ajax-search-lite"); ?>" />
|
131 |
</div>
|
backend/tabs/instance/image_options.php
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<div class="item">
|
2 |
<?php
|
3 |
$option_name = "show_images";
|
4 |
-
$option_desc = "Show images in results?";
|
5 |
$o = new wpdreamsYesNo($option_name, $option_desc,
|
6 |
wpdreams_setval_or_getoption($sd, $option_name, $_dk));
|
7 |
$params[$o->getName()] = $o->getData();
|
@@ -10,7 +10,7 @@
|
|
10 |
<div class="item">
|
11 |
<?php
|
12 |
$option_name = "image_width";
|
13 |
-
$option_desc = "Image width";
|
14 |
$o = new wpdreamsTextSmall($option_name, $option_desc,
|
15 |
wpdreams_setval_or_getoption($sd, $option_name, $_dk));
|
16 |
$params[$o->getName()] = $o->getData();
|
@@ -19,7 +19,7 @@
|
|
19 |
<div class="item">
|
20 |
<?php
|
21 |
$option_name = "image_height";
|
22 |
-
$option_desc = "Image height";
|
23 |
$o = new wpdreamsTextSmall($option_name, $option_desc,
|
24 |
wpdreams_setval_or_getoption($sd, $option_name, $_dk));
|
25 |
$params[$o->getName()] = $o->getData();
|
@@ -30,7 +30,7 @@
|
|
30 |
<div class="item">
|
31 |
<?php
|
32 |
$option_name = "image_source1";
|
33 |
-
$option_desc = "Primary image source";
|
34 |
$o = new wpdreamsCustomSelect($option_name, $option_desc, array(
|
35 |
'selects'=>wpdreams_setval_or_getoption($sd, 'image_sources', $_dk),
|
36 |
'value'=>wpdreams_setval_or_getoption($sd, $option_name, $_dk)
|
@@ -41,7 +41,7 @@
|
|
41 |
<div class="item">
|
42 |
<?php
|
43 |
$option_name = "image_source2";
|
44 |
-
$option_desc = "Alternative image source 1";
|
45 |
$o = new wpdreamsCustomSelect($option_name, $option_desc, array(
|
46 |
'selects'=>wpdreams_setval_or_getoption($sd, 'image_sources', $_dk),
|
47 |
'value'=>wpdreams_setval_or_getoption($sd, $option_name, $_dk)
|
@@ -52,7 +52,7 @@
|
|
52 |
<div class="item">
|
53 |
<?php
|
54 |
$option_name = "image_source3";
|
55 |
-
$option_desc = "Alternative image source 2";
|
56 |
$o = new wpdreamsCustomSelect($option_name, $option_desc, array(
|
57 |
'selects'=>wpdreams_setval_or_getoption($sd, 'image_sources', $_dk),
|
58 |
'value'=>wpdreams_setval_or_getoption($sd, $option_name, $_dk)
|
@@ -63,7 +63,7 @@
|
|
63 |
<div class="item">
|
64 |
<?php
|
65 |
$option_name = "image_source4";
|
66 |
-
$option_desc = "Alternative image source 3";
|
67 |
$o = new wpdreamsCustomSelect($option_name, $option_desc, array(
|
68 |
'selects'=>wpdreams_setval_or_getoption($sd, 'image_sources', $_dk),
|
69 |
'value'=>wpdreams_setval_or_getoption($sd, $option_name, $_dk)
|
@@ -74,7 +74,7 @@
|
|
74 |
<div class="item">
|
75 |
<?php
|
76 |
$option_name = "image_source5";
|
77 |
-
$option_desc = "Alternative image source 4";
|
78 |
$o = new wpdreamsCustomSelect($option_name, $option_desc, array(
|
79 |
'selects'=>wpdreams_setval_or_getoption($sd, 'image_sources', $_dk),
|
80 |
'value'=>wpdreams_setval_or_getoption($sd, $option_name, $_dk)
|
@@ -85,7 +85,7 @@
|
|
85 |
<div class="item">
|
86 |
<?php
|
87 |
$option_name = "image_default";
|
88 |
-
$option_desc = "Default image url";
|
89 |
$o = new wpdreamsUpload($option_name, $option_desc,
|
90 |
wpdreams_setval_or_getoption($sd, $option_name, $_dk));
|
91 |
$params[$o->getName()] = $o->getData();
|
@@ -94,7 +94,7 @@
|
|
94 |
<div class="item">
|
95 |
<?php
|
96 |
$option_name = "image_custom_field";
|
97 |
-
$option_desc = "Custom field containing the image";
|
98 |
$o = new wpdreamsText($option_name, $option_desc,
|
99 |
wpdreams_setval_or_getoption($sd, $option_name, $_dk));
|
100 |
$params[$o->getName()] = $o->getData();
|
@@ -103,5 +103,5 @@
|
|
103 |
</fieldset>
|
104 |
<div class="item">
|
105 |
<input type="hidden" name='asl_submit' value=1 />
|
106 |
-
<input name="submit_asl" type="submit" value="Save options!" />
|
107 |
</div>
|
1 |
<div class="item">
|
2 |
<?php
|
3 |
$option_name = "show_images";
|
4 |
+
$option_desc = __("Show images in results?", "ajax-search-lite");
|
5 |
$o = new wpdreamsYesNo($option_name, $option_desc,
|
6 |
wpdreams_setval_or_getoption($sd, $option_name, $_dk));
|
7 |
$params[$o->getName()] = $o->getData();
|
10 |
<div class="item">
|
11 |
<?php
|
12 |
$option_name = "image_width";
|
13 |
+
$option_desc = __("Image width", "ajax-search-lite");
|
14 |
$o = new wpdreamsTextSmall($option_name, $option_desc,
|
15 |
wpdreams_setval_or_getoption($sd, $option_name, $_dk));
|
16 |
$params[$o->getName()] = $o->getData();
|
19 |
<div class="item">
|
20 |
<?php
|
21 |
$option_name = "image_height";
|
22 |
+
$option_desc = __("Image height", "ajax-search-lite");
|
23 |
$o = new wpdreamsTextSmall($option_name, $option_desc,
|
24 |
wpdreams_setval_or_getoption($sd, $option_name, $_dk));
|
25 |
$params[$o->getName()] = $o->getData();
|
30 |
<div class="item">
|
31 |
<?php
|
32 |
$option_name = "image_source1";
|
33 |
+
$option_desc = __("Primary image source", "ajax-search-lite");
|
34 |
$o = new wpdreamsCustomSelect($option_name, $option_desc, array(
|
35 |
'selects'=>wpdreams_setval_or_getoption($sd, 'image_sources', $_dk),
|
36 |
'value'=>wpdreams_setval_or_getoption($sd, $option_name, $_dk)
|
41 |
<div class="item">
|
42 |
<?php
|
43 |
$option_name = "image_source2";
|
44 |
+
$option_desc = __("Alternative image source 1", "ajax-search-lite");
|
45 |
$o = new wpdreamsCustomSelect($option_name, $option_desc, array(
|
46 |
'selects'=>wpdreams_setval_or_getoption($sd, 'image_sources', $_dk),
|
47 |
'value'=>wpdreams_setval_or_getoption($sd, $option_name, $_dk)
|
52 |
<div class="item">
|
53 |
<?php
|
54 |
$option_name = "image_source3";
|
55 |
+
$option_desc = __("Alternative image source 2", "ajax-search-lite");
|
56 |
$o = new wpdreamsCustomSelect($option_name, $option_desc, array(
|
57 |
'selects'=>wpdreams_setval_or_getoption($sd, 'image_sources', $_dk),
|
58 |
'value'=>wpdreams_setval_or_getoption($sd, $option_name, $_dk)
|
63 |
<div class="item">
|
64 |
<?php
|
65 |
$option_name = "image_source4";
|
66 |
+
$option_desc = __("Alternative image source 3", "ajax-search-lite");
|
67 |
$o = new wpdreamsCustomSelect($option_name, $option_desc, array(
|
68 |
'selects'=>wpdreams_setval_or_getoption($sd, 'image_sources', $_dk),
|
69 |
'value'=>wpdreams_setval_or_getoption($sd, $option_name, $_dk)
|
74 |
<div class="item">
|
75 |
<?php
|
76 |
$option_name = "image_source5";
|
77 |
+
$option_desc = __("Alternative image source 4", "ajax-search-lite");
|
78 |
$o = new wpdreamsCustomSelect($option_name, $option_desc, array(
|
79 |
'selects'=>wpdreams_setval_or_getoption($sd, 'image_sources', $_dk),
|
80 |
'value'=>wpdreams_setval_or_getoption($sd, $option_name, $_dk)
|
85 |
<div class="item">
|
86 |
<?php
|
87 |
$option_name = "image_default";
|
88 |
+
$option_desc = __("Default image url", "ajax-search-lite");
|
89 |
$o = new wpdreamsUpload($option_name, $option_desc,
|
90 |
wpdreams_setval_or_getoption($sd, $option_name, $_dk));
|
91 |
$params[$o->getName()] = $o->getData();
|
94 |
<div class="item">
|
95 |
<?php
|
96 |
$option_name = "image_custom_field";
|
97 |
+
$option_desc = __("Custom field containing the image", "ajax-search-lite");
|
98 |
$o = new wpdreamsText($option_name, $option_desc,
|
99 |
wpdreams_setval_or_getoption($sd, $option_name, $_dk));
|
100 |
$params[$o->getName()] = $o->getData();
|
103 |
</fieldset>
|
104 |
<div class="item">
|
105 |
<input type="hidden" name='asl_submit' value=1 />
|
106 |
+
<input name="submit_asl" type="submit" value="<?php _e("Save options!", "ajax-search-lite"); ?>" />
|
107 |
</div>
|
backend/tabs/instance/layout_options.php
CHANGED
@@ -1,22 +1,22 @@
|
|
1 |
<ul id="subtabs" class='tabs'>
|
2 |
-
<li><a tabid="201" class='subtheme current'
|
3 |
-
<li><a tabid="202" class='subtheme'
|
4 |
</ul>
|
5 |
<div class='tabscontent'>
|
6 |
<div tabid="201">
|
7 |
<fieldset>
|
8 |
-
<legend
|
9 |
<?php include(ASL_PATH."backend/tabs/instance/layout/results_layout.php"); ?>
|
10 |
</fieldset>
|
11 |
</div>
|
12 |
<div tabid="202">
|
13 |
<fieldset>
|
14 |
-
<legend
|
15 |
<?php include(ASL_PATH."backend/tabs/instance/layout/results_behaviour.php"); ?>
|
16 |
</fieldset>
|
17 |
</div>
|
18 |
</div>
|
19 |
<div class="item">
|
20 |
<input type="hidden" name='asl_submit' value=1 />
|
21 |
-
<input name="submit_asl" type="submit" value="Save options!" />
|
22 |
</div>
|
1 |
<ul id="subtabs" class='tabs'>
|
2 |
+
<li><a tabid="201" class='subtheme current'><?php _e("Results layout", "ajax-search-lite"); ?></a></li>
|
3 |
+
<li><a tabid="202" class='subtheme'><?php _e("Results Behaviour", "ajax-search-lite"); ?></a></li>
|
4 |
</ul>
|
5 |
<div class='tabscontent'>
|
6 |
<div tabid="201">
|
7 |
<fieldset>
|
8 |
+
<legend><?php _e("Results layout", "ajax-search-lite"); ?></legend>
|
9 |
<?php include(ASL_PATH."backend/tabs/instance/layout/results_layout.php"); ?>
|
10 |
</fieldset>
|
11 |
</div>
|
12 |
<div tabid="202">
|
13 |
<fieldset>
|
14 |
+
<legend><?php _e("Results Behaviour", "ajax-search-lite"); ?></legend>
|
15 |
<?php include(ASL_PATH."backend/tabs/instance/layout/results_behaviour.php"); ?>
|
16 |
</fieldset>
|
17 |
</div>
|
18 |
</div>
|
19 |
<div class="item">
|
20 |
<input type="hidden" name='asl_submit' value=1 />
|
21 |
+
<input name="submit_asl" type="submit" value="<?php _e("Save options!", "ajax-search-lite"); ?>" />
|
22 |
</div>
|
css/style.basic.css
CHANGED
@@ -584,7 +584,7 @@ div[id*='ajaxsearchlitesettings'].searchsettings.ie78 .option {
|
|
584 |
|
585 |
div[id*='ajaxsearchlitesettings'].searchsettings .label {
|
586 |
font-size: 14px;
|
587 |
-
line-height:
|
588 |
margin: -29px 10px 0 38px;
|
589 |
width: 150px;
|
590 |
text-shadow: none;
|
@@ -592,7 +592,7 @@ div[id*='ajaxsearchlitesettings'].searchsettings .label {
|
|
592 |
min-height: 20px;
|
593 |
border: none;
|
594 |
background: transparent;
|
595 |
-
float:
|
596 |
}
|
597 |
|
598 |
/* SQUARED THREE */
|
@@ -686,6 +686,7 @@ div[id*='ajaxsearchlitesettings'].searchsettings fieldset {
|
|
686 |
|
687 |
div[id*='ajaxsearchlitesettings'].searchsettings fieldset .label {
|
688 |
width: 130px;
|
|
|
689 |
}
|
690 |
|
691 |
/* basic scrollbar styling */
|
@@ -1259,25 +1260,6 @@ div[id*='ajaxsearchliteres'] .photostack nav span:last-child {
|
|
1259 |
margin-right: 0;
|
1260 |
}
|
1261 |
|
1262 |
-
div[id*='ajaxsearchliteres'] .photostack nav span::after {
|
1263 |
-
content: "\e600";
|
1264 |
-
font-family: 'icons';
|
1265 |
-
font-size: 80%;
|
1266 |
-
speak: none;
|
1267 |
-
display: inline-block;
|
1268 |
-
vertical-align: top;
|
1269 |
-
font-style: normal;
|
1270 |
-
font-weight: normal;
|
1271 |
-
font-variant: normal;
|
1272 |
-
text-transform: none;
|
1273 |
-
line-height: 30px;
|
1274 |
-
color: #fff;
|
1275 |
-
opacity: 0;
|
1276 |
-
-webkit-font-smoothing: antialiased;
|
1277 |
-
-moz-osx-font-smoothing: grayscale;
|
1278 |
-
-webkit-transition: opacity 0.3s;
|
1279 |
-
transition: opacity 0.3s;
|
1280 |
-
}
|
1281 |
|
1282 |
div[id*='ajaxsearchliteres'] .photostack nav span.current {
|
1283 |
background: #888;
|
584 |
|
585 |
div[id*='ajaxsearchlitesettings'].searchsettings .label {
|
586 |
font-size: 14px;
|
587 |
+
line-height: 20px !important;
|
588 |
margin: -29px 10px 0 38px;
|
589 |
width: 150px;
|
590 |
text-shadow: none;
|
592 |
min-height: 20px;
|
593 |
border: none;
|
594 |
background: transparent;
|
595 |
+
float: none;
|
596 |
}
|
597 |
|
598 |
/* SQUARED THREE */
|
686 |
|
687 |
div[id*='ajaxsearchlitesettings'].searchsettings fieldset .label {
|
688 |
width: 130px;
|
689 |
+
display: block;
|
690 |
}
|
691 |
|
692 |
/* basic scrollbar styling */
|
1260 |
margin-right: 0;
|
1261 |
}
|
1262 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1263 |
|
1264 |
div[id*='ajaxsearchliteres'] .photostack nav span.current {
|
1265 |
background: #888;
|
functions.php
CHANGED
@@ -24,6 +24,16 @@ if (!function_exists("in_array_r")) {
|
|
24 |
}
|
25 |
}
|
26 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
27 |
if (!function_exists("wpdreams_ismobile")) {
|
28 |
function wpdreams_ismobile() {
|
29 |
$is_mobile = '0';
|
24 |
}
|
25 |
}
|
26 |
|
27 |
+
if (!function_exists("wd_substr_at_word")) {
|
28 |
+
function wd_substr_at_word($text, $length) {
|
29 |
+
if (strlen($text) <= $length) return $text;
|
30 |
+
$blogCharset = get_bloginfo('charset');
|
31 |
+
$charset = $blogCharset !== '' ? $blogCharset : 'UTF-8';
|
32 |
+
$s = mb_substr($text, 0, $length, $charset);
|
33 |
+
return mb_substr($s, 0, strrpos($s, ' '), $charset);
|
34 |
+
}
|
35 |
+
}
|
36 |
+
|
37 |
if (!function_exists("wpdreams_ismobile")) {
|
38 |
function wpdreams_ismobile() {
|
39 |
$is_mobile = '0';
|
includes/asl_init.class.php
CHANGED
@@ -5,12 +5,15 @@ class aslInit {
|
|
5 |
$this->chmod();
|
6 |
}
|
7 |
|
|
|
|
|
|
|
|
|
8 |
function navigation_menu() {
|
9 |
if (current_user_can('manage_options')) {
|
10 |
-
if (!defined("EMU2_I18N_DOMAIN")) define('EMU2_I18N_DOMAIN', "");
|
11 |
add_menu_page(
|
12 |
-
__('Ajax Search Lite',
|
13 |
-
__('Ajax Search Lite',
|
14 |
'manage_options',
|
15 |
ASL_DIR.'/backend/settings.php',
|
16 |
'',
|
@@ -19,8 +22,8 @@ class aslInit {
|
|
19 |
);
|
20 |
add_submenu_page(
|
21 |
ASL_DIR.'/backend/settings.php',
|
22 |
-
__("Ajax Search Lite",
|
23 |
-
__("Analytics Integration",
|
24 |
'manage_options',
|
25 |
ASL_DIR.'/backend/analytics.php'
|
26 |
);
|
5 |
$this->chmod();
|
6 |
}
|
7 |
|
8 |
+
function asl_init() {
|
9 |
+
load_plugin_textdomain( 'ajax-search-lite', false, ASL_DIR . '/languages' );
|
10 |
+
}
|
11 |
+
|
12 |
function navigation_menu() {
|
13 |
if (current_user_can('manage_options')) {
|
|
|
14 |
add_menu_page(
|
15 |
+
__('Ajax Search Lite', 'ajax-search-lite'),
|
16 |
+
__('Ajax Search Lite', 'ajax-search-lite'),
|
17 |
'manage_options',
|
18 |
ASL_DIR.'/backend/settings.php',
|
19 |
'',
|
22 |
);
|
23 |
add_submenu_page(
|
24 |
ASL_DIR.'/backend/settings.php',
|
25 |
+
__("Ajax Search Lite", 'ajax-search-lite'),
|
26 |
+
__("Analytics Integration", 'ajax-search-lite'),
|
27 |
'manage_options',
|
28 |
ASL_DIR.'/backend/analytics.php'
|
29 |
);
|
includes/bfi_thumb.php
ADDED
@@ -0,0 +1,839 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
* bfi_thumb - WP Image Resizer v1.3
|
4 |
+
*
|
5 |
+
* (c) 2013 Benjamin F. Intal / Gambit
|
6 |
+
*
|
7 |
+
* This program is free software: you can redistribute it and/or modify
|
8 |
+
* it under the terms of the GNU General Public License as published by
|
9 |
+
* the Free Software Foundation, either version 3 of the License, or
|
10 |
+
* (at your option) any later version.
|
11 |
+
*
|
12 |
+
* This program is distributed in the hope that it will be useful,
|
13 |
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
14 |
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
15 |
+
* GNU General Public License for more details.
|
16 |
+
*
|
17 |
+
* You should have received a copy of the GNU General Public License
|
18 |
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
19 |
+
*/
|
20 |
+
|
21 |
+
/** Uses WP's Image Editor Class to resize and filter images
|
22 |
+
*
|
23 |
+
* @param $url string the local image URL to manipulate
|
24 |
+
* @param $params array the options to perform on the image. Keys and values supported:
|
25 |
+
* 'width' int pixels
|
26 |
+
* 'height' int pixels
|
27 |
+
* 'opacity' int 0-100
|
28 |
+
* 'color' string hex-color #000000-#ffffff
|
29 |
+
* 'grayscale' bool
|
30 |
+
* 'negate' bool
|
31 |
+
* 'crop' bool
|
32 |
+
* 'crop_only' bool
|
33 |
+
* 'crop_x' bool string
|
34 |
+
* 'crop_y' bool string
|
35 |
+
* 'crop_width' bool string
|
36 |
+
* 'crop_height' bool string
|
37 |
+
* 'quality' int 1-100
|
38 |
+
* @param $single boolean, if false then an array of data will be returned
|
39 |
+
* @return string|array containing the url of the resized modified image
|
40 |
+
*/
|
41 |
+
|
42 |
+
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
43 |
+
|
44 |
+
if ( ! function_exists( 'bfi_thumb' ) ) {
|
45 |
+
|
46 |
+
function bfi_thumb( $url, $params = array(), $single = true ) {
|
47 |
+
$class = BFI_Class_Factory::getNewestVersion( 'BFI_Thumb' );
|
48 |
+
return call_user_func( array( $class, 'thumb' ), $url, $params, $single );
|
49 |
+
}
|
50 |
+
|
51 |
+
}
|
52 |
+
|
53 |
+
|
54 |
+
/**
|
55 |
+
* Class factory, this is to make sure that when multiple bfi_thumb scripts
|
56 |
+
* are used (e.g. a plugin and a theme both use it), we always use the
|
57 |
+
* latest version.
|
58 |
+
*/
|
59 |
+
if ( ! class_exists( 'BFI_Class_Factory' ) ) {
|
60 |
+
|
61 |
+
class BFI_Class_Factory {
|
62 |
+
|
63 |
+
public static $versions = array();
|
64 |
+
public static $latestClass = array();
|
65 |
+
|
66 |
+
|
67 |
+
public static function addClassVersion( $baseClassName, $className, $version ) {
|
68 |
+
if ( empty( self::$versions[ $baseClassName ] ) ) {
|
69 |
+
self::$versions[ $baseClassName ] = array();
|
70 |
+
}
|
71 |
+
self::$versions[ $baseClassName ][] = array(
|
72 |
+
'class' => $className,
|
73 |
+
'version' => $version
|
74 |
+
);
|
75 |
+
}
|
76 |
+
|
77 |
+
|
78 |
+
public static function getNewestVersion( $baseClassName ) {
|
79 |
+
if ( empty( self::$latestClass[ $baseClassName ] ) ) {
|
80 |
+
usort( self::$versions[ $baseClassName ], array( __CLASS__, "versionCompare" ) );
|
81 |
+
self::$latestClass[ $baseClassName ] = self::$versions[ $baseClassName ][0]['class'];
|
82 |
+
unset( self::$versions[ $baseClassName ] );
|
83 |
+
}
|
84 |
+
return self::$latestClass[ $baseClassName ];
|
85 |
+
}
|
86 |
+
|
87 |
+
|
88 |
+
public static function versionCompare( $a, $b ) {
|
89 |
+
return version_compare( $a['version'], $b['version'] ) == 1 ? -1 : 1;
|
90 |
+
}
|
91 |
+
}
|
92 |
+
|
93 |
+
}
|
94 |
+
|
95 |
+
|
96 |
+
|
97 |
+
/*
|
98 |
+
* Change the default image editors
|
99 |
+
*/
|
100 |
+
add_filter( 'wp_image_editors', 'bfi_wp_image_editor' );
|
101 |
+
|
102 |
+
// Instead of using the default image editors, use our extended ones
|
103 |
+
if ( ! function_exists( 'bfi_wp_image_editor' ) ) {
|
104 |
+
|
105 |
+
function bfi_wp_image_editor( $editorArray ) {
|
106 |
+
// Make sure that we use the latest versions
|
107 |
+
return array(
|
108 |
+
BFI_Class_Factory::getNewestVersion( 'BFI_Image_Editor_GD' ),
|
109 |
+
BFI_Class_Factory::getNewestVersion( 'BFI_Image_Editor_Imagick' ),
|
110 |
+
);
|
111 |
+
}
|
112 |
+
|
113 |
+
}
|
114 |
+
|
115 |
+
|
116 |
+
/*
|
117 |
+
* Include the WP Image classes
|
118 |
+
*/
|
119 |
+
|
120 |
+
require_once ABSPATH . WPINC . '/class-wp-image-editor.php';
|
121 |
+
require_once ABSPATH . WPINC . '/class-wp-image-editor-imagick.php';
|
122 |
+
require_once ABSPATH . WPINC . '/class-wp-image-editor-gd.php';
|
123 |
+
|
124 |
+
|
125 |
+
/**
|
126 |
+
* check for ImageMagick or GD
|
127 |
+
*/
|
128 |
+
|
129 |
+
|
130 |
+
add_action( 'admin_init', 'bfi_wp_image_editor_check' );
|
131 |
+
if ( ! function_exists( 'bfi_wp_image_editor_check' ) ) {
|
132 |
+
|
133 |
+
function bfi_wp_image_editor_check() {
|
134 |
+
$arg = array( 'mime_type' => 'image/jpeg' );
|
135 |
+
if ( wp_image_editor_supports( $arg ) !== true ) {
|
136 |
+
add_filter( 'admin_notices', 'bfi_wp_image_editor_check_notice' );
|
137 |
+
}
|
138 |
+
}
|
139 |
+
|
140 |
+
}
|
141 |
+
|
142 |
+
if ( ! function_exists( 'bfi_wp_image_editor_check_notice' ) ) {
|
143 |
+
function bfi_wp_image_editor_check_notice() {
|
144 |
+
printf( "<div class='error'><p>%s</div>",
|
145 |
+
__( "The server does not have ImageMagick or GD installed and/or enabled! Any of these libraries are required for WordPress to be able to resize images. Please contact your server administrator to enable this before continuing.", "default" ) );
|
146 |
+
}
|
147 |
+
}
|
148 |
+
|
149 |
+
|
150 |
+
/*
|
151 |
+
* Enhanced Imagemagick Image Editor
|
152 |
+
*/
|
153 |
+
|
154 |
+
|
155 |
+
if ( ! class_exists( 'BFI_Image_Editor_Imagick_1_3' ) ) {
|
156 |
+
|
157 |
+
BFI_Class_Factory::addClassVersion( 'BFI_Image_Editor_Imagick', 'BFI_Image_Editor_Imagick_1_3', '1.3' );
|
158 |
+
|
159 |
+
|
160 |
+
class BFI_Image_Editor_Imagick_1_3 extends WP_Image_Editor_Imagick {
|
161 |
+
|
162 |
+
/** Changes the opacity of the image
|
163 |
+
*
|
164 |
+
* @supports 3.5.1
|
165 |
+
* @access public
|
166 |
+
*
|
167 |
+
* @param float $opacity (0.0-1.0)
|
168 |
+
* @return boolean|WP_Error
|
169 |
+
*/
|
170 |
+
public function opacity( $opacity ) {
|
171 |
+
$opacity /= 100;
|
172 |
+
|
173 |
+
try {
|
174 |
+
// From: http://stackoverflow.com/questions/3538851/php-imagick-setimageopacity-destroys-transparency-and-does-nothing
|
175 |
+
// preserves transparency
|
176 |
+
//$this->image->setImageOpacity($opacity);
|
177 |
+
return $this->image->evaluateImage( Imagick::EVALUATE_MULTIPLY, $opacity, Imagick::CHANNEL_ALPHA );
|
178 |
+
|
179 |
+
} catch ( Exception $e ) {
|
180 |
+
return new WP_Error( 'image_opacity_error', $e->getMessage() );
|
181 |
+
}
|
182 |
+
}
|
183 |
+
|
184 |
+
|
185 |
+
/** Tints the image a different color
|
186 |
+
*
|
187 |
+
* @supports 3.5.1
|
188 |
+
* @access public
|
189 |
+
*
|
190 |
+
* @param string hex color e.g. #ff00ff
|
191 |
+
* @return boolean|WP_Error
|
192 |
+
*/
|
193 |
+
public function colorize( $hexColor ) {
|
194 |
+
try {
|
195 |
+
return $this->image->colorizeImage( $hexColor, 1.0 );
|
196 |
+
} catch ( Exception $e ) {
|
197 |
+
return new WP_Error( 'image_colorize_error', $e->getMessage() );
|
198 |
+
}
|
199 |
+
}
|
200 |
+
|
201 |
+
|
202 |
+
/** Makes the image grayscale
|
203 |
+
*
|
204 |
+
* @supports 3.5.1
|
205 |
+
* @access public
|
206 |
+
*
|
207 |
+
* @return boolean|WP_Error
|
208 |
+
*/
|
209 |
+
public function grayscale() {
|
210 |
+
try {
|
211 |
+
return $this->image->modulateImage( 100, 0, 100 );
|
212 |
+
} catch ( Exception $e ) {
|
213 |
+
return new WP_Error( 'image_grayscale_error', $e->getMessage() );
|
214 |
+
}
|
215 |
+
}
|
216 |
+
|
217 |
+
|
218 |
+
/** Negates the image
|
219 |
+
*
|
220 |
+
* @supports 3.5.1
|
221 |
+
* @access public
|
222 |
+
*
|
223 |
+
* @return boolean|WP_Error
|
224 |
+
*/
|
225 |
+
public function negate() {
|
226 |
+
try {
|
227 |
+
return $this->image->negateImage( false );
|
228 |
+
} catch ( Exception $e ) {
|
229 |
+
return new WP_Error( 'image_negate_error', $e->getMessage() );
|
230 |
+
}
|
231 |
+
}
|
232 |
+
}
|
233 |
+
}
|
234 |
+
|
235 |
+
|
236 |
+
/*
|
237 |
+
* Enhanced GD Image Editor
|
238 |
+
*/
|
239 |
+
|
240 |
+
|
241 |
+
if ( ! class_exists( 'BFI_Image_Editor_GD_1_3' ) ) {
|
242 |
+
|
243 |
+
BFI_Class_Factory::addClassVersion( 'BFI_Image_Editor_GD', 'BFI_Image_Editor_GD_1_3', '1.3' );
|
244 |
+
|
245 |
+
class BFI_Image_Editor_GD_1_3 extends WP_Image_Editor_GD {
|
246 |
+
|
247 |
+
/** Rotates current image counter-clockwise by $angle.
|
248 |
+
* Ported from image-edit.php
|
249 |
+
* Added presevation of alpha channels
|
250 |
+
*
|
251 |
+
* @since 3.5.0
|
252 |
+
* @access public
|
253 |
+
*
|
254 |
+
* @param float $angle
|
255 |
+
* @return boolean|WP_Error
|
256 |
+
*/
|
257 |
+
public function rotate( $angle ) {
|
258 |
+
if ( function_exists('imagerotate') ) {
|
259 |
+
$rotated = imagerotate( $this->image, $angle, 0 );
|
260 |
+
|
261 |
+
// Add alpha blending
|
262 |
+
imagealphablending( $rotated, true );
|
263 |
+
imagesavealpha( $rotated, true );
|
264 |
+
|
265 |
+
if ( is_resource( $rotated ) ) {
|
266 |
+
imagedestroy( $this->image );
|
267 |
+
$this->image = $rotated;
|
268 |
+
$this->update_size();
|
269 |
+
return true;
|
270 |
+
}
|
271 |
+
}
|
272 |
+
|
273 |
+
return new WP_Error( 'image_rotate_error', __( 'Image rotate failed.', 'default' ), $this->file );
|
274 |
+
}
|
275 |
+
|
276 |
+
|
277 |
+
/** Changes the opacity of the image
|
278 |
+
*
|
279 |
+
* @supports 3.5.1
|
280 |
+
* @access public
|
281 |
+
*
|
282 |
+
* @param float $opacity (0.0-1.0)
|
283 |
+
* @return boolean|WP_Error
|
284 |
+
*/
|
285 |
+
public function opacity( $opacity ) {
|
286 |
+
$opacity /= 100;
|
287 |
+
|
288 |
+
$filtered = $this->_opacity( $this->image, $opacity );
|
289 |
+
|
290 |
+
if ( is_resource( $filtered ) ) {
|
291 |
+
// imagedestroy($this->image);
|
292 |
+
$this->image = $filtered;
|
293 |
+
return true;
|
294 |
+
}
|
295 |
+
|
296 |
+
return new WP_Error( 'image_opacity_error', __('Image opacity change failed.', 'default' ), $this->file );
|
297 |
+
}
|
298 |
+
|
299 |
+
|
300 |
+
// from: http://php.net/manual/en/function.imagefilter.php
|
301 |
+
// params: image resource id, opacity (eg. 0.0-1.0)
|
302 |
+
protected function _opacity( $image, $opacity ) {
|
303 |
+
if ( ! function_exists( 'imagealphablending' ) ||
|
304 |
+
! function_exists( 'imagecolorat' ) ||
|
305 |
+
! function_exists( 'imagecolorallocatealpha' ) ||
|
306 |
+
! function_exists( 'imagesetpixel' ) ) {
|
307 |
+
return false;
|
308 |
+
}
|
309 |
+
|
310 |
+
// get image width and height
|
311 |
+
$w = imagesx( $image );
|
312 |
+
$h = imagesy( $image );
|
313 |
+
|
314 |
+
// turn alpha blending off
|
315 |
+
imagealphablending( $image, false );
|
316 |
+
|
317 |
+
// find the most opaque pixel in the image (the one with the smallest alpha value)
|
318 |
+
$minalpha = 127;
|
319 |
+
for ( $x = 0; $x < $w; $x++ ) {
|
320 |
+
for ( $y = 0; $y < $h; $y++ ) {
|
321 |
+
$alpha = ( imagecolorat( $image, $x, $y ) >> 24 ) & 0xFF;
|
322 |
+
if ( $alpha < $minalpha ) {
|
323 |
+
$minalpha = $alpha;
|
324 |
+
}
|
325 |
+
}
|
326 |
+
}
|
327 |
+
|
328 |
+
// loop through image pixels and modify alpha for each
|
329 |
+
for ( $x = 0; $x < $w; $x++ ) {
|
330 |
+
for ( $y = 0; $y < $h; $y++ ) {
|
331 |
+
|
332 |
+
// get current alpha value (represents the TANSPARENCY!)
|
333 |
+
$colorxy = imagecolorat( $image, $x, $y );
|
334 |
+
$alpha = ( $colorxy >> 24 ) & 0xFF;
|
335 |
+
|
336 |
+
// calculate new alpha
|
337 |
+
if ( $minalpha !== 127 ) {
|
338 |
+
$alpha = 127 + 127 * $opacity * ( $alpha - 127 ) / ( 127 - $minalpha );
|
339 |
+
} else {
|
340 |
+
$alpha += 127 * $opacity;
|
341 |
+
}
|
342 |
+
|
343 |
+
// get the color index with new alpha
|
344 |
+
$alphacolorxy = imagecolorallocatealpha( $image, ( $colorxy >> 16 ) & 0xFF, ( $colorxy >> 8 ) & 0xFF, $colorxy & 0xFF, $alpha );
|
345 |
+
|
346 |
+
// set pixel with the new color + opacity
|
347 |
+
if( ! imagesetpixel( $image, $x, $y, $alphacolorxy ) ) {
|
348 |
+
return false;
|
349 |
+
}
|
350 |
+
}
|
351 |
+
}
|
352 |
+
|
353 |
+
imagesavealpha( $image, true );
|
354 |
+
|
355 |
+
return $image;
|
356 |
+
}
|
357 |
+
|
358 |
+
|
359 |
+
/** Tints the image a different color
|
360 |
+
*
|
361 |
+
* @supports 3.5.1
|
362 |
+
* @access public
|
363 |
+
*
|
364 |
+
* @param string hex color e.g. #ff00ff
|
365 |
+
* @return boolean|WP_Error
|
366 |
+
*/
|
367 |
+
public function colorize( $hexColor ) {
|
368 |
+
if ( function_exists( 'imagefilter' ) &&
|
369 |
+
function_exists( 'imagesavealpha' ) &&
|
370 |
+
function_exists( 'imagealphablending' ) ) {
|
371 |
+
|
372 |
+
$hexColor = preg_replace( '#^\##', '', $hexColor );
|
373 |
+
$r = hexdec( substr( $hexColor, 0, 2 ) );
|
374 |
+
$g = hexdec( substr( $hexColor, 2, 2 ) );
|
375 |
+
$b = hexdec( substr( $hexColor, 2, 2 ) );
|
376 |
+
|
377 |
+
imagealphablending( $this->image, false );
|
378 |
+
if ( imagefilter( $this->image, IMG_FILTER_COLORIZE, $r, $g, $b, 0 ) ) {
|
379 |
+
imagesavealpha( $this->image, true );
|
380 |
+
return true;
|
381 |
+
}
|
382 |
+
}
|
383 |
+
return new WP_Error( 'image_colorize_error', __( 'Image color change failed.', 'default' ), $this->file );
|
384 |
+
}
|
385 |
+
|
386 |
+
|
387 |
+
/** Makes the image grayscale
|
388 |
+
*
|
389 |
+
* @supports 3.5.1
|
390 |
+
* @access public
|
391 |
+
*
|
392 |
+
* @return boolean|WP_Error
|
393 |
+
*/
|
394 |
+
public function grayscale() {
|
395 |
+
if ( function_exists( 'imagefilter' ) ) {
|
396 |
+
if ( imagefilter( $this->image, IMG_FILTER_GRAYSCALE ) ) {
|
397 |
+
return true;
|
398 |
+
}
|
399 |
+
}
|
400 |
+
return new WP_Error( 'image_grayscale_error', __( 'Image grayscale failed.', 'default' ), $this->file );
|
401 |
+
}
|
402 |
+
|
403 |
+
|
404 |
+
/** Negates the image
|
405 |
+
*
|
406 |
+
* @supports 3.5.1
|
407 |
+
* @access public
|
408 |
+
*
|
409 |
+
* @return boolean|WP_Error
|
410 |
+
*/
|
411 |
+
public function negate() {
|
412 |
+
if ( function_exists( 'imagefilter' ) ) {
|
413 |
+
if ( imagefilter( $this->image, IMG_FILTER_NEGATE ) ) {
|
414 |
+
return true;
|
415 |
+
}
|
416 |
+
}
|
417 |
+
return new WP_Error( 'image_negate_error', __( 'Image negate failed.', 'default' ), $this->file );
|
418 |
+
}
|
419 |
+
}
|
420 |
+
}
|
421 |
+
|
422 |
+
|
423 |
+
/*
|
424 |
+
* Main Class
|
425 |
+
*/
|
426 |
+
if ( ! class_exists( 'BFI_Thumb_1_3' ) ) {
|
427 |
+
|
428 |
+
BFI_Class_Factory::addClassVersion( 'BFI_Thumb', 'BFI_Thumb_1_3', '1.3' );
|
429 |
+
|
430 |
+
class BFI_Thumb_1_3 {
|
431 |
+
|
432 |
+
/** Uses WP's Image Editor Class to resize and filter images
|
433 |
+
* Inspired by: https://github.com/sy4mil/Aqua-Resizer/blob/master/aq_resizer.php
|
434 |
+
*
|
435 |
+
* @param $url string the local image URL to manipulate
|
436 |
+
* @param $params array the options to perform on the image. Keys and values supported:
|
437 |
+
* 'width' int pixels
|
438 |
+
* 'height' int pixels
|
439 |
+
* 'opacity' int 0-100
|
440 |
+
* 'color' string hex-color #000000-#ffffff
|
441 |
+
* 'grayscale' bool
|
442 |
+
* 'crop' bool
|
443 |
+
* 'negate' bool
|
444 |
+
* 'crop_only' bool
|
445 |
+
* 'crop_x' bool string
|
446 |
+
* 'crop_y' bool string
|
447 |
+
* 'crop_width' bool string
|
448 |
+
* 'crop_height' bool string
|
449 |
+
* 'quality' int 1-100
|
450 |
+
* @param $single boolean, if false then an array of data will be returned
|
451 |
+
* @return string|array
|
452 |
+
*/
|
453 |
+
public static function thumb( $url, $params = array(), $single = true ) {
|
454 |
+
extract( $params );
|
455 |
+
|
456 |
+
//validate inputs
|
457 |
+
if ( ! $url ) {
|
458 |
+
return false;
|
459 |
+
}
|
460 |
+
|
461 |
+
$crop_only = isset( $crop_only ) ? $crop_only : false;
|
462 |
+
|
463 |
+
//define upload path & dir
|
464 |
+
$upload_info = wp_upload_dir();
|
465 |
+
$upload_dir = $upload_info['basedir'];
|
466 |
+
$upload_url = $upload_info['baseurl'];
|
467 |
+
$theme_url = get_template_directory_uri();
|
468 |
+
$theme_dir = get_template_directory();
|
469 |
+
|
470 |
+
// find the path of the image. Perform 2 checks:
|
471 |
+
// #1 check if the image is in the uploads folder
|
472 |
+
if ( strpos( $url, $upload_url ) !== false ) {
|
473 |
+
$rel_path = str_replace( $upload_url, '', $url );
|
474 |
+
$img_path = $upload_dir . $rel_path;
|
475 |
+
|
476 |
+
// #2 check if the image is in the current theme folder
|
477 |
+
} else if ( strpos( $url, $theme_url ) !== false ) {
|
478 |
+
$rel_path = str_replace( $theme_url, '', $url );
|
479 |
+
$img_path = $theme_dir . $rel_path;
|
480 |
+
}
|
481 |
+
|
482 |
+
// Fail if we can't find the image in our WP local directory
|
483 |
+
if ( empty( $img_path ) ) {
|
484 |
+
return $url;
|
485 |
+
}
|
486 |
+
|
487 |
+
// check if img path exists, and is an image indeed
|
488 |
+
if( ! @file_exists( $img_path ) || ! getimagesize( $img_path ) ) {
|
489 |
+
return $url;
|
490 |
+
}
|
491 |
+
|
492 |
+
// This is the filename
|
493 |
+
$basename = basename( $img_path );
|
494 |
+
|
495 |
+
//get image info
|
496 |
+
$info = pathinfo( $img_path );
|
497 |
+
$ext = $info['extension'];
|
498 |
+
list( $orig_w, $orig_h ) = getimagesize( $img_path );
|
499 |
+
|
500 |
+
// support percentage dimensions. compute percentage based on
|
501 |
+
// the original dimensions
|
502 |
+
if ( isset( $width ) ) {
|
503 |
+
if ( stripos( $width, '%' ) !== false ) {
|
504 |
+
$width = (int) ( (float) str_replace( '%', '', $width ) / 100 * $orig_w );
|
505 |
+
}
|
506 |
+
}
|
507 |
+
if ( isset( $height ) ) {
|
508 |
+
if ( stripos( $height, '%' ) !== false ) {
|
509 |
+
$height = (int) ( (float) str_replace( '%', '', $height ) / 100 * $orig_h );
|
510 |
+
}
|
511 |
+
}
|
512 |
+
// The only purpose of this is to determine the final width and height
|
513 |
+
// without performing any actual image manipulation, which will be used
|
514 |
+
// to check whether a resize was previously done.
|
515 |
+
if ( isset( $width ) && $crop_only === false ) {
|
516 |
+
//get image size after cropping
|
517 |
+
$dims = image_resize_dimensions( $orig_w, $orig_h, $width, isset( $height ) ? $height : null, isset( $crop ) ? $crop : false );
|
518 |
+
$dst_w = $dims[4];
|
519 |
+
$dst_h = $dims[5];
|
520 |
+
|
521 |
+
} else if ( $crop_only === true ) {
|
522 |
+
// we don't want a resize,
|
523 |
+
// but only a crop in the image
|
524 |
+
|
525 |
+
// get x position to start croping
|
526 |
+
$src_x = ( isset( $crop_x ) ) ? $crop_x : 0;
|
527 |
+
|
528 |
+
// get y position to start croping
|
529 |
+
$src_y = ( isset( $crop_y ) ) ? $crop_y : 0;
|
530 |
+
|
531 |
+
// width of the crop
|
532 |
+
if ( isset( $crop_width ) ) {
|
533 |
+
$src_w = $crop_width;
|
534 |
+
} else if ( isset( $width ) ) {
|
535 |
+
$src_w = $width;
|
536 |
+
} else {
|
537 |
+
$src_w = $orig_w;
|
538 |
+
}
|
539 |
+
|
540 |
+
// height of the crop
|
541 |
+
if ( isset( $crop_height ) ) {
|
542 |
+
$src_h = $crop_height;
|
543 |
+
} else if ( isset( $height ) ) {
|
544 |
+
$src_h = $height;
|
545 |
+
} else {
|
546 |
+
$src_h = $orig_h;
|
547 |
+
}
|
548 |
+
|
549 |
+
// set the width resize with the crop
|
550 |
+
if ( isset( $crop_width ) && isset( $width ) ) {
|
551 |
+
$dst_w = $width;
|
552 |
+
} else {
|
553 |
+
$dst_w = null;
|
554 |
+
}
|
555 |
+
|
556 |
+
// set the height resize with the crop
|
557 |
+
if ( isset( $crop_height ) && isset( $height ) ) {
|
558 |
+
$dst_h = $height;
|
559 |
+
} else {
|
560 |
+
$dst_h = null;
|
561 |
+
}
|
562 |
+
|
563 |
+
// allow percentages
|
564 |
+
if ( isset( $dst_w ) ) {
|
565 |
+
if ( stripos( $dst_w, '%' ) !== false ) {
|
566 |
+
$dst_w = (int) ( (float) str_replace( '%', '', $dst_w ) / 100 * $orig_w );
|
567 |
+
}
|
568 |
+
}
|
569 |
+
if ( isset( $dst_h ) ) {
|
570 |
+
if ( stripos( $dst_h, '%' ) !== false ) {
|
571 |
+
$dst_h = (int) ( (float) str_replace( '%', '', $dst_h ) / 100 * $orig_h );
|
572 |
+
}
|
573 |
+
}
|
574 |
+
|
575 |
+
$dims = image_resize_dimensions( $src_w, $src_h, $dst_w, $dst_h, false );
|
576 |
+
$dst_w = $dims[4];
|
577 |
+
$dst_h = $dims[5];
|
578 |
+
|
579 |
+
// Make the pos x and pos y work with percentages
|
580 |
+
if ( stripos( $src_x, '%' ) !== false ) {
|
581 |
+
$src_x = (int) ( (float) str_replace( '%', '', $width ) / 100 * $orig_w );
|
582 |
+
}
|
583 |
+
if ( stripos( $src_y, '%' ) !== false ) {
|
584 |
+
$src_y = (int) ( (float) str_replace( '%', '', $height ) / 100 * $orig_h );
|
585 |
+
}
|
586 |
+
|
587 |
+
// allow center to position crop start
|
588 |
+
if ( $src_x === 'center' ) {
|
589 |
+
$src_x = ( $orig_w - $src_w ) / 2;
|
590 |
+
}
|
591 |
+
if ( $src_y === 'center' ) {
|
592 |
+
$src_y = ( $orig_h - $src_h ) / 2;
|
593 |
+
}
|
594 |
+
}
|
595 |
+
|
596 |
+
// create the suffix for the saved file
|
597 |
+
// we can use this to check whether we need to create a new file or just use an existing one.
|
598 |
+
$suffix = (string) filemtime( $img_path ) .
|
599 |
+
( isset( $width ) ? str_pad( (string) $width, 5, '0', STR_PAD_LEFT ) : '00000' ) .
|
600 |
+
( isset( $height ) ? str_pad( (string) $height, 5, '0', STR_PAD_LEFT ) : '00000' ) .
|
601 |
+
( isset( $opacity ) ? str_pad( (string) $opacity, 3, '0', STR_PAD_LEFT ) : '100' ) .
|
602 |
+
( isset( $color ) ? str_pad( preg_replace( '#^\##', '', $color ), 8, '0', STR_PAD_LEFT ) : '00000000' ) .
|
603 |
+
( isset( $grayscale ) ? ( $grayscale ? '1' : '0' ) : '0' ) .
|
604 |
+
( isset( $crop ) ? ( $crop ? '1' : '0' ) : '0' ) .
|
605 |
+
( isset( $negate ) ? ( $negate ? '1' : '0' ) : '0' ) .
|
606 |
+
( isset( $crop_only ) ? ( $crop_only ? '1' : '0' ) : '0' ) .
|
607 |
+
( isset( $src_x ) ? str_pad( (string) $src_x, 5, '0', STR_PAD_LEFT ) : '00000' ) .
|
608 |
+
( isset( $src_y ) ? str_pad( (string) $src_y, 5, '0', STR_PAD_LEFT ) : '00000' ) .
|
609 |
+
( isset( $src_w ) ? str_pad( (string) $src_w, 5, '0', STR_PAD_LEFT ) : '00000' ) .
|
610 |
+
( isset( $src_h ) ? str_pad( (string) $src_h, 5, '0', STR_PAD_LEFT ) : '00000' ) .
|
611 |
+
( isset( $dst_w ) ? str_pad( (string) $dst_w, 5, '0', STR_PAD_LEFT ) : '00000' ) .
|
612 |
+
( isset( $dst_h ) ? str_pad( (string) $dst_h, 5, '0', STR_PAD_LEFT ) : '00000' ) .
|
613 |
+
( ( isset ( $quality ) && $quality > 0 && $quality <= 100 ) ? ( $quality ? (string) $quality : '0' ) : '0' );
|
614 |
+
$suffix = self::base_convert_arbitrary( $suffix, 10, 36 );
|
615 |
+
|
616 |
+
// use this to check if cropped image already exists, so we can return that instead
|
617 |
+
$dst_rel_path = str_replace( '.' . $ext, '', basename( $img_path ) );
|
618 |
+
|
619 |
+
// If opacity is set, change the image type to png
|
620 |
+
if ( isset( $opacity ) ) {
|
621 |
+
$ext = 'png';
|
622 |
+
}
|
623 |
+
|
624 |
+
|
625 |
+
// Create the upload subdirectory, this is where
|
626 |
+
// we store all our generated images
|
627 |
+
if ( defined( 'BFITHUMB_UPLOAD_DIR' ) ) {
|
628 |
+
$upload_dir .= "/" . BFITHUMB_UPLOAD_DIR;
|
629 |
+
$upload_url .= "/" . BFITHUMB_UPLOAD_DIR;
|
630 |
+
} else {
|
631 |
+
$upload_dir .= "/bfi_thumb";
|
632 |
+
$upload_url .= "/bfi_thumb";
|
633 |
+
}
|
634 |
+
if ( ! is_dir( $upload_dir ) ) {
|
635 |
+
wp_mkdir_p( $upload_dir );
|
636 |
+
}
|
637 |
+
|
638 |
+
|
639 |
+
// desination paths and urls
|
640 |
+
$destfilename = "{$upload_dir}/{$dst_rel_path}-{$suffix}.{$ext}";
|
641 |
+
|
642 |
+
// The urls generated have lower case extensions regardless of the original case
|
643 |
+
$ext = strtolower( $ext );
|
644 |
+
$img_url = "{$upload_url}/{$dst_rel_path}-{$suffix}.{$ext}";
|
645 |
+
|
646 |
+
// if file exists, just return it
|
647 |
+
if ( @file_exists( $destfilename ) && getimagesize( $destfilename ) ) {
|
648 |
+
} else {
|
649 |
+
// perform resizing and other filters
|
650 |
+
$editor = wp_get_image_editor( $img_path );
|
651 |
+
|
652 |
+
if ( is_wp_error( $editor ) ) return false;
|
653 |
+
|
654 |
+
/*
|
655 |
+
* Perform image manipulations
|
656 |
+
*/
|
657 |
+
if ( $crop_only === false ) {
|
658 |
+
if ( ( isset( $width ) && $width ) || ( isset( $height ) && $height ) ) {
|
659 |
+
if ( is_wp_error( $editor->resize( isset( $width ) ? $width : null, isset( $height ) ? $height : null, isset( $crop ) ? $crop : false ) ) ) {
|
660 |
+
return false;
|
661 |
+
}
|
662 |
+
}
|
663 |
+
} else {
|
664 |
+
if ( is_wp_error( $editor->crop( $src_x, $src_y, $src_w, $src_h, $dst_w, $dst_h ) ) ) {
|
665 |
+
return false;
|
666 |
+
}
|
667 |
+
}
|
668 |
+
|
669 |
+
if ( isset( $negate ) ) {
|
670 |
+
if ( $negate ) {
|
671 |
+
if ( is_wp_error( $editor->negate() ) ) {
|
672 |
+
return false;
|
673 |
+
}
|
674 |
+
}
|
675 |
+
}
|
676 |
+
|
677 |
+
if ( isset( $opacity ) ) {
|
678 |
+
if ( is_wp_error( $editor->opacity( $opacity ) ) ) {
|
679 |
+
return false;
|
680 |
+
}
|
681 |
+
}
|
682 |
+
|
683 |
+
if ( isset( $grayscale ) ) {
|
684 |
+
if ( $grayscale ) {
|
685 |
+
if ( is_wp_error( $editor->grayscale() ) ) {
|
686 |
+
return false;
|
687 |
+
}
|
688 |
+
}
|
689 |
+
}
|
690 |
+
|
691 |
+
if ( isset( $color ) ) {
|
692 |
+
if ( is_wp_error( $editor->colorize( $color ) ) ) {
|
693 |
+
return false;
|
694 |
+
}
|
695 |
+
}
|
696 |
+
|
697 |
+
// set the image quality (1-100) to save this image at
|
698 |
+
if ( isset( $quality ) && $quality > 0 && $quality <= 100 && $ext != 'png' ) {
|
699 |
+
$editor->set_quality( $quality );
|
700 |
+
}
|
701 |
+
|
702 |
+
// save our new image
|
703 |
+
$mime_type = isset( $opacity ) ? 'image/png' : null;
|
704 |
+
$resized_file = $editor->save( $destfilename, $mime_type );
|
705 |
+
}
|
706 |
+
|
707 |
+
//return the output
|
708 |
+
if ( $single ) {
|
709 |
+
$image = $img_url;
|
710 |
+
} else {
|
711 |
+
//array return
|
712 |
+
$image = array (
|
713 |
+
0 => $img_url,
|
714 |
+
1 => isset( $dst_w ) ? $dst_w : $orig_w,
|
715 |
+
2 => isset( $dst_h ) ? $dst_h : $orig_h,
|
716 |
+
);
|
717 |
+
}
|
718 |
+
|
719 |
+
return $image;
|
720 |
+
}
|
721 |
+
|
722 |
+
|
723 |
+
/** Shortens a number into a base 36 string
|
724 |
+
*
|
725 |
+
* @param $number string a string of numbers to convert
|
726 |
+
* @param $fromBase starting base
|
727 |
+
* @param $toBase base to convert the number to
|
728 |
+
* @return string base converted characters
|
729 |
+
*/
|
730 |
+
protected static function base_convert_arbitrary( $number, $fromBase, $toBase ) {
|
731 |
+
$digits = '0123456789abcdefghijklmnopqrstuvwxyz';
|
732 |
+
$length = strlen( $number );
|
733 |
+
$result = '';
|
734 |
+
|
735 |
+
$nibbles = array();
|
736 |
+
for ( $i = 0; $i < $length; ++$i ) {
|
737 |
+
$nibbles[ $i ] = strpos( $digits, $number[ $i ] );
|
738 |
+
}
|
739 |
+
|
740 |
+
do {
|
741 |
+
$value = 0;
|
742 |
+
$newlen = 0;
|
743 |
+
|
744 |
+
for ( $i = 0; $i < $length; ++$i ) {
|
745 |
+
|
746 |
+
$value = $value * $fromBase + $nibbles[ $i ];
|
747 |
+
|
748 |
+
if ( $value >= $toBase ) {
|
749 |
+
$nibbles[ $newlen++ ] = (int) ( $value / $toBase );
|
750 |
+
$value %= $toBase;
|
751 |
+
|
752 |
+
} else if ( $newlen > 0 ) {
|
753 |
+
$nibbles[ $newlen++ ] = 0;
|
754 |
+
}
|
755 |
+
}
|
756 |
+
|
757 |
+
$length = $newlen;
|
758 |
+
$result = $digits[ $value ] . $result;
|
759 |
+
}
|
760 |
+
while ( $newlen != 0 );
|
761 |
+
|
762 |
+
return $result;
|
763 |
+
}
|
764 |
+
}
|
765 |
+
}
|
766 |
+
|
767 |
+
|
768 |
+
|
769 |
+
// don't use the default resizer since we want to allow resizing to larger sizes (than the original one)
|
770 |
+
// Parts are copied from media.php
|
771 |
+
// Crop is always applied (just like timthumb)
|
772 |
+
// Don't use this inside the admin since sometimes images in the media library get resized
|
773 |
+
if ( ! is_admin() || (defined( 'DOING_AJAX' ) && DOING_AJAX) ) {
|
774 |
+
add_filter( 'image_resize_dimensions', 'bfi_image_resize_dimensions', 10, 5 );
|
775 |
+
}
|
776 |
+
|
777 |
+
if ( ! function_exists( 'bfi_image_resize_dimensions' ) ) {
|
778 |
+
function bfi_image_resize_dimensions( $payload, $orig_w, $orig_h, $dest_w, $dest_h, $crop = false ) {
|
779 |
+
$aspect_ratio = $orig_w / $orig_h;
|
780 |
+
$d_aspect_ratio = $dest_w / $dest_h;
|
781 |
+
|
782 |
+
$new_w = $dest_w;
|
783 |
+
$new_h = $dest_h;
|
784 |
+
|
785 |
+
if ( ! $new_w ) {
|
786 |
+
$new_w = intval( $new_h * $aspect_ratio );
|
787 |
+
}
|
788 |
+
|
789 |
+
if ( ! $new_h ) {
|
790 |
+
$new_h = intval( $new_w / $aspect_ratio );
|
791 |
+
}
|
792 |
+
|
793 |
+
$size_ratio = max( $new_w / $orig_w, $new_h / $orig_h );
|
794 |
+
|
795 |
+
$crop_w = round( $new_w / $size_ratio );
|
796 |
+
$crop_h = round( $new_h / $size_ratio );
|
797 |
+
$s_x = floor( ( $orig_w - $crop_w ) / 2 );
|
798 |
+
$s_y = floor( ( $orig_h - $crop_h ) / 2 );
|
799 |
+
|
800 |
+
// the return array matches the parameters to imagecopyresampled()
|
801 |
+
// int dst_x, int dst_y, int src_x, int src_y, int dst_w, int dst_h, int src_w, int src_h
|
802 |
+
return array( 0, 0, (int) $s_x, (int) $s_y, (int) $new_w, (int) $new_h, (int) $crop_w, (int) $crop_h );
|
803 |
+
}
|
804 |
+
}
|
805 |
+
|
806 |
+
|
807 |
+
// This function allows us to latch on WP image functions such as
|
808 |
+
// the_post_thumbnail, get_image_tag and wp_get_attachment_image_src
|
809 |
+
// so that you won't have to use the function bfi_thumb in order to do resizing.
|
810 |
+
// To make this work, in the WP image functions, when specifying an
|
811 |
+
// array for the image dimensions, add a 'bfi_thumb' => true to
|
812 |
+
// the array, then add your normal $params arguments.
|
813 |
+
//
|
814 |
+
// e.g. the_post_thumbnail( array( 1024, 400, 'bfi_thumb' => true, 'grayscale' => true ) );
|
815 |
+
add_filter( 'image_downsize', 'bfi_image_downsize', 1, 3 );
|
816 |
+
|
817 |
+
if ( ! function_exists( 'bfi_image_downsize' ) ) {
|
818 |
+
function bfi_image_downsize( $out, $id, $size ) {
|
819 |
+
if ( ! is_array( $size ) ) {
|
820 |
+
return false;
|
821 |
+
}
|
822 |
+
if ( ! array_key_exists( 'bfi_thumb', $size ) ) {
|
823 |
+
return false;
|
824 |
+
}
|
825 |
+
if ( empty( $size['bfi_thumb'] ) ) {
|
826 |
+
return false;
|
827 |
+
}
|
828 |
+
|
829 |
+
$img_url = wp_get_attachment_url( $id );
|
830 |
+
|
831 |
+
$params = $size;
|
832 |
+
$params['width'] = $size[0];
|
833 |
+
$params['height'] = $size[1];
|
834 |
+
|
835 |
+
$resized_img_url = bfi_thumb( $img_url, $params );
|
836 |
+
|
837 |
+
return array( $resized_img_url, $size[0], $size[1], false );
|
838 |
+
}
|
839 |
+
}
|
includes/cache/timthumb_int_924fd749b06d87972550ce2462181116.timthumb.txt
ADDED
Binary file
|
includes/cache/timthumb_int_ad6f2bfa65b8bde7a5b2840f7fbc3e8e.timthumb.txt
DELETED
Binary file
|
includes/cache/timthumb_int_c85b341bfdcfa5f2c4847db20d8b52d1.timthumb.txt
ADDED
Binary file
|
includes/cache/timthumb_int_decd49cb06bfb5b66187e1919079ba6d.timthumb.txt
ADDED
Binary file
|
includes/cache/timthumb_int_f12d4dd7b87d24f6c7cfacf3f36a9231.timthumb.txt
ADDED
Binary file
|
includes/search_content.class.php
CHANGED
@@ -41,15 +41,23 @@ if (!class_exists('wpdreams_searchContent')) {
|
|
41 |
if (count($types) < 1) {
|
42 |
return '';
|
43 |
} else {
|
44 |
-
$words = implode('|', $types);
|
45 |
-
$post_types = "($wpdb->posts.post_type REGEXP '
|
46 |
}
|
47 |
/*---------------------------------------------------------------*/
|
48 |
|
49 |
/*----------------------- Title query ---------------------------*/
|
50 |
if ($options['set_intitle']) {
|
51 |
-
$words = $options['set_exactonly']==1
|
52 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
53 |
$relevance_parts[] = "(case when
|
54 |
(lower($wpdb->posts.post_title) REGEXP '$words')
|
55 |
then 10 else 0 end)";
|
@@ -61,8 +69,16 @@ if (!class_exists('wpdreams_searchContent')) {
|
|
61 |
|
62 |
/*---------------------- Content query --------------------------*/
|
63 |
if ($options['set_incontent']) {
|
64 |
-
$words = $options['set_exactonly']==1
|
65 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
66 |
$relevance_parts[] = "(case when
|
67 |
(lower($wpdb->posts.post_content) REGEXP '$words')
|
68 |
then 7 else 0 end)";
|
@@ -74,8 +90,16 @@ if (!class_exists('wpdreams_searchContent')) {
|
|
74 |
|
75 |
/*---------------------- Excerpt query --------------------------*/
|
76 |
if ($options['set_inexcerpt']) {
|
77 |
-
$words = $options['set_exactonly']==1
|
78 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
79 |
$relevance_parts[] = "(case when
|
80 |
(lower($wpdb->posts.post_excerpt) REGEXP '$words')
|
81 |
then 7 else 0 end)";
|
@@ -87,8 +111,16 @@ if (!class_exists('wpdreams_searchContent')) {
|
|
87 |
|
88 |
/*------------------------ Term query ---------------------------*/
|
89 |
if ($options['searchinterms']) {
|
90 |
-
$words = $options['set_exactonly']==1
|
91 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
92 |
$relevance_parts[] = "(case when
|
93 |
(lower($wpdb->terms.name) REGEXP '$words')
|
94 |
then 5 else 0 end)";
|
@@ -269,16 +301,27 @@ if (!class_exists('wpdreams_searchContent')) {
|
|
269 |
|
270 |
$r->link = get_permalink($v->id);
|
271 |
|
272 |
-
$use_timthumb = w_isset_def($caching_options['usetimthumb'], 1);
|
273 |
-
|
274 |
$image_settings = $searchData['image_options'];
|
275 |
|
276 |
if ($image_settings['show_images'] != 0) {
|
|
|
277 |
$im = $this->getTimThumbImage($r);
|
278 |
if ($im != '' && strpos($im, "mshots/v1") === false)
|
279 |
$r->image = $home_url . '/wp-content/plugins/ajax-search-lite/includes/timthumb.php' . '?ct=' . $image_settings['image_transparency'] . '&cc=' . str_replace('#', '', wpdreams_rgb2hex($image_settings['image_bg_color'])) . '&q=95&w=' . $image_settings['image_width'] . '&h=' . $image_settings['image_height']. '&a=' . $image_settings['image_crop_location'] . '&src=' . rawurlencode($im);
|
280 |
else
|
281 |
$r->image = $im;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
282 |
}
|
283 |
|
284 |
|
@@ -351,9 +394,9 @@ if (!class_exists('wpdreams_searchContent')) {
|
|
351 |
return $this->results;
|
352 |
}
|
353 |
/**
|
354 |
-
* Fetches an image for
|
355 |
*/
|
356 |
-
function
|
357 |
if (!isset($post->image) || $post->image == null) {
|
358 |
$home_url = network_home_url();
|
359 |
$home_url = home_url();
|
41 |
if (count($types) < 1) {
|
42 |
return '';
|
43 |
} else {
|
44 |
+
$words = implode('[[:>:]]|[[:<:]]', $types);
|
45 |
+
$post_types = "($wpdb->posts.post_type REGEXP '[[:<:]]".$words."[[:>:]]')";
|
46 |
}
|
47 |
/*---------------------------------------------------------------*/
|
48 |
|
49 |
/*----------------------- Title query ---------------------------*/
|
50 |
if ($options['set_intitle']) {
|
51 |
+
$words = $options['set_exactonly']==1 ? array($s) : $_s;
|
52 |
+
//$parts[] = "(lower($wpdb->posts.post_title) REGEXP '$words')";
|
53 |
+
|
54 |
+
$op = 'OR';
|
55 |
+
if (count($_s)>0)
|
56 |
+
$_like = implode("%' ".$op." lower($wpdb->posts.post_title) LIKE '%", $words);
|
57 |
+
else
|
58 |
+
$_like = $s;
|
59 |
+
$parts[] = "( lower($wpdb->posts.post_title) LIKE '%".$_like."%' )";
|
60 |
+
|
61 |
$relevance_parts[] = "(case when
|
62 |
(lower($wpdb->posts.post_title) REGEXP '$words')
|
63 |
then 10 else 0 end)";
|
69 |
|
70 |
/*---------------------- Content query --------------------------*/
|
71 |
if ($options['set_incontent']) {
|
72 |
+
$words = $options['set_exactonly']==1 ? array($s) : $_s;
|
73 |
+
//$parts[] = "(lower($wpdb->posts.post_content) REGEXP '$words')";
|
74 |
+
|
75 |
+
$op = 'OR';
|
76 |
+
if (count($_s)>0)
|
77 |
+
$_like = implode("%' ".$op." lower($wpdb->posts.post_content) LIKE '%", $words);
|
78 |
+
else
|
79 |
+
$_like = $s;
|
80 |
+
$parts[] = "( lower($wpdb->posts.post_content) LIKE '%".$_like."%' )";
|
81 |
+
|
82 |
$relevance_parts[] = "(case when
|
83 |
(lower($wpdb->posts.post_content) REGEXP '$words')
|
84 |
then 7 else 0 end)";
|
90 |
|
91 |
/*---------------------- Excerpt query --------------------------*/
|
92 |
if ($options['set_inexcerpt']) {
|
93 |
+
$words = $options['set_exactonly']==1 ? array($s) : $_s;
|
94 |
+
//$parts[] = "(lower($wpdb->posts.post_excerpt) REGEXP '$words')";
|
95 |
+
|
96 |
+
$op = 'OR';
|
97 |
+
if (count($_s)>0)
|
98 |
+
$_like = implode("%' ".$op." lower($wpdb->posts.post_excerpt) LIKE '%", $words);
|
99 |
+
else
|
100 |
+
$_like = $s;
|
101 |
+
$parts[] = "( lower($wpdb->posts.post_excerpt) LIKE '%".$_like."%' )";
|
102 |
+
|
103 |
$relevance_parts[] = "(case when
|
104 |
(lower($wpdb->posts.post_excerpt) REGEXP '$words')
|
105 |
then 7 else 0 end)";
|
111 |
|
112 |
/*------------------------ Term query ---------------------------*/
|
113 |
if ($options['searchinterms']) {
|
114 |
+
$words = $options['set_exactonly']==1 ? array($s) : $_s;
|
115 |
+
//$parts[] = "(lower($wpdb->terms.name) REGEXP '$words')";
|
116 |
+
|
117 |
+
$op = 'OR';
|
118 |
+
if (count($_s)>0)
|
119 |
+
$_like = implode("%' ".$op." lower($wpdb->terms.name) LIKE '%", $words);
|
120 |
+
else
|
121 |
+
$_like = $s;
|
122 |
+
$parts[] = "( lower($wpdb->terms.name) LIKE '%".$_like."%' )";
|
123 |
+
|
124 |
$relevance_parts[] = "(case when
|
125 |
(lower($wpdb->terms.name) REGEXP '$words')
|
126 |
then 5 else 0 end)";
|
301 |
|
302 |
$r->link = get_permalink($v->id);
|
303 |
|
|
|
|
|
304 |
$image_settings = $searchData['image_options'];
|
305 |
|
306 |
if ($image_settings['show_images'] != 0) {
|
307 |
+
/*
|
308 |
$im = $this->getTimThumbImage($r);
|
309 |
if ($im != '' && strpos($im, "mshots/v1") === false)
|
310 |
$r->image = $home_url . '/wp-content/plugins/ajax-search-lite/includes/timthumb.php' . '?ct=' . $image_settings['image_transparency'] . '&cc=' . str_replace('#', '', wpdreams_rgb2hex($image_settings['image_bg_color'])) . '&q=95&w=' . $image_settings['image_width'] . '&h=' . $image_settings['image_height']. '&a=' . $image_settings['image_crop_location'] . '&src=' . rawurlencode($im);
|
311 |
else
|
312 |
$r->image = $im;
|
313 |
+
*/
|
314 |
+
$im = $this->getBFIimage($r);
|
315 |
+
if ($im != '' && strpos($im, "mshots/v1") === false) {
|
316 |
+
if (w_isset_def($image_settings['image_transparency'], 1) == 1)
|
317 |
+
$bfi_params = array( 'width' => $image_settings['image_width'], 'height' => $image_settings['image_height'], 'crop' => true );
|
318 |
+
else
|
319 |
+
$bfi_params = array( 'width' => $image_settings['image_width'], 'height' => $image_settings['image_height'], 'crop' => true, 'color' => wpdreams_rgb2hex($image_settings['image_bg_color']) );
|
320 |
+
|
321 |
+
$r->image = bfi_thumb( $im, $bfi_params );
|
322 |
+
} else {
|
323 |
+
$r->image = $im;
|
324 |
+
}
|
325 |
}
|
326 |
|
327 |
|
394 |
return $this->results;
|
395 |
}
|
396 |
/**
|
397 |
+
* Fetches an image for BFI class
|
398 |
*/
|
399 |
+
function getBFIimage($post) {
|
400 |
if (!isset($post->image) || $post->image == null) {
|
401 |
$home_url = network_home_url();
|
402 |
$home_url = home_url();
|
includes/views/asl.shortcode.php
CHANGED
@@ -198,7 +198,7 @@
|
|
198 |
$style['selected-exsearchincategories'] = array();
|
199 |
if (!isset($style['selected-excludecategories']) || !is_array($style['selected-excludecategories']))
|
200 |
$style['selected-excludecategories'] = array();
|
201 |
-
$_all_cat =
|
202 |
$_needed_cat = array_diff($_all_cat, $style['selected-exsearchincategories']);
|
203 |
foreach ($_needed_cat as $k => $v) {
|
204 |
$selected = !in_array($v, $style['selected-excludecategories']);
|
198 |
$style['selected-exsearchincategories'] = array();
|
199 |
if (!isset($style['selected-excludecategories']) || !is_array($style['selected-excludecategories']))
|
200 |
$style['selected-excludecategories'] = array();
|
201 |
+
$_all_cat = get_terms('category', array('fields'=>'ids'));
|
202 |
$_needed_cat = array_diff($_all_cat, $style['selected-exsearchincategories']);
|
203 |
foreach ($_needed_cat as $k => $v) {
|
204 |
$selected = !in_array($v, $style['selected-excludecategories']);
|
languages/ajax-search-lite-en_EN.mo
ADDED
Binary file
|
languages/ajax-search-lite-en_EN.po
ADDED
@@ -0,0 +1,319 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
msgid ""
|
2 |
+
msgstr ""
|
3 |
+
"Project-Id-Version: Ajax Search Lite\n"
|
4 |
+
"POT-Creation-Date: 2014-12-10 20:42+0100\n"
|
5 |
+
"PO-Revision-Date: 2014-12-10 20:42+0100\n"
|
6 |
+
"Last-Translator: \n"
|
7 |
+
"Language-Team: \n"
|
8 |
+
"Language: en\n"
|
9 |
+
"MIME-Version: 1.0\n"
|
10 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
+
"Content-Transfer-Encoding: 8bit\n"
|
12 |
+
"X-Generator: Poedit 1.7.1\n"
|
13 |
+
"X-Poedit-Basepath: .\n"
|
14 |
+
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
15 |
+
"X-Poedit-KeywordsList: __;_e\n"
|
16 |
+
"X-Poedit-SearchPath-0: ..\n"
|
17 |
+
"X-Poedit-SearchPathExcluded-0: ../js\n"
|
18 |
+
"X-Poedit-SearchPathExcluded-1: ../backend/settings/assets\n"
|
19 |
+
|
20 |
+
#: ../backend/analytics.php:7
|
21 |
+
msgid "Enable search Google Analytics integration?"
|
22 |
+
msgstr ""
|
23 |
+
|
24 |
+
#: ../backend/analytics.php:12
|
25 |
+
msgid "Google analytics pageview string"
|
26 |
+
msgstr ""
|
27 |
+
|
28 |
+
#: ../backend/analytics.php:16
|
29 |
+
msgid ""
|
30 |
+
"This is how the pageview will look like on the google analytics website. Use "
|
31 |
+
"the {asl_term} variable to add the search term to the pageview."
|
32 |
+
msgstr ""
|
33 |
+
|
34 |
+
#: ../backend/analytics.php:40
|
35 |
+
msgid "Analytics options"
|
36 |
+
msgstr ""
|
37 |
+
|
38 |
+
#: ../backend/analytics.php:45
|
39 |
+
msgid "Result"
|
40 |
+
msgstr ""
|
41 |
+
|
42 |
+
#: ../backend/analytics.php:47
|
43 |
+
msgid ""
|
44 |
+
"After some time you should be able to see the hits on your analytics board."
|
45 |
+
msgstr ""
|
46 |
+
|
47 |
+
#: ../backend/settings.php:44
|
48 |
+
msgid "Search shortcode:"
|
49 |
+
msgstr ""
|
50 |
+
|
51 |
+
#: ../backend/settings.php:47
|
52 |
+
msgid "Search shortcode for templates:"
|
53 |
+
msgstr ""
|
54 |
+
|
55 |
+
#: ../backend/settings.php:58
|
56 |
+
msgid "General Options"
|
57 |
+
msgstr ""
|
58 |
+
|
59 |
+
#: ../backend/settings.php:59 ../backend/settings.php:75
|
60 |
+
msgid "Image Options"
|
61 |
+
msgstr ""
|
62 |
+
|
63 |
+
#: ../backend/settings.php:60
|
64 |
+
msgid "Frontend Options"
|
65 |
+
msgstr ""
|
66 |
+
|
67 |
+
#: ../backend/settings.php:61
|
68 |
+
msgid "Layout options"
|
69 |
+
msgstr ""
|
70 |
+
|
71 |
+
#: ../backend/settings.php:62
|
72 |
+
msgid "Advanced"
|
73 |
+
msgstr ""
|
74 |
+
|
75 |
+
#: ../backend/settings.php:67
|
76 |
+
msgid "Genearal Options"
|
77 |
+
msgstr ""
|
78 |
+
|
79 |
+
#: ../backend/settings.php:83
|
80 |
+
msgid "Frontend Search Settings"
|
81 |
+
msgstr ""
|
82 |
+
|
83 |
+
#: ../backend/settings.php:91
|
84 |
+
msgid "Layout Options"
|
85 |
+
msgstr ""
|
86 |
+
|
87 |
+
#: ../backend/settings.php:99
|
88 |
+
msgid "Advanced Options"
|
89 |
+
msgstr ""
|
90 |
+
|
91 |
+
#: ../backend/settings.php:119
|
92 |
+
msgid "Ajax Search Lite settings saved!"
|
93 |
+
msgstr ""
|
94 |
+
|
95 |
+
#: ../backend/settings/class/customfields.class.php:22
|
96 |
+
msgid "Available public custom fields types"
|
97 |
+
msgstr ""
|
98 |
+
|
99 |
+
#: ../backend/settings/class/customfields.class.php:31
|
100 |
+
msgid "Drag here the custom fields you want to use!"
|
101 |
+
msgstr ""
|
102 |
+
|
103 |
+
#: ../backend/settings/class/customposttypes.class.php:23
|
104 |
+
msgid "Available post types"
|
105 |
+
msgstr ""
|
106 |
+
|
107 |
+
#: ../backend/settings/class/customposttypes.class.php:32
|
108 |
+
msgid "Drag here the post types you want to use!"
|
109 |
+
msgstr ""
|
110 |
+
|
111 |
+
#: ../backend/tabs/instance/advanced_options.php:3
|
112 |
+
msgid "Title Field"
|
113 |
+
msgstr ""
|
114 |
+
|
115 |
+
#: ../backend/tabs/instance/advanced_options.php:12
|
116 |
+
msgid "Description Field"
|
117 |
+
msgstr ""
|
118 |
+
|
119 |
+
#: ../backend/tabs/instance/advanced_options.php:21
|
120 |
+
msgid "Exclude categories"
|
121 |
+
msgstr ""
|
122 |
+
|
123 |
+
#: ../backend/tabs/instance/advanced_options.php:28
|
124 |
+
msgid "Exclude Posts by ID's (comma separated post ID-s)"
|
125 |
+
msgstr ""
|
126 |
+
|
127 |
+
#: ../backend/tabs/instance/advanced_options.php:34
|
128 |
+
msgid "WPML compatibility"
|
129 |
+
msgstr ""
|
130 |
+
|
131 |
+
#: ../backend/tabs/instance/frontend_options.php:3
|
132 |
+
msgid "Show search settings on the frontend?"
|
133 |
+
msgstr ""
|
134 |
+
|
135 |
+
#: ../backend/tabs/instance/frontend_options.php:8
|
136 |
+
msgid ""
|
137 |
+
"The default values of the checkboxes on the frontend are the values set "
|
138 |
+
"above."
|
139 |
+
msgstr ""
|
140 |
+
|
141 |
+
#: ../backend/tabs/instance/frontend_options.php:12
|
142 |
+
msgid "Show exact matches selector?"
|
143 |
+
msgstr ""
|
144 |
+
|
145 |
+
#: ../backend/tabs/instance/frontend_options.php:20
|
146 |
+
msgid "Show search in posts selector?"
|
147 |
+
msgstr ""
|
148 |
+
|
149 |
+
#: ../backend/tabs/instance/frontend_options.php:27
|
150 |
+
msgid "Show search in pages selector?"
|
151 |
+
msgstr ""
|
152 |
+
|
153 |
+
#: ../backend/tabs/instance/frontend_options.php:34
|
154 |
+
msgid "Show search in title selector?"
|
155 |
+
msgstr ""
|
156 |
+
|
157 |
+
#: ../backend/tabs/instance/frontend_options.php:41
|
158 |
+
msgid "Show search in content selector?"
|
159 |
+
msgstr ""
|
160 |
+
|
161 |
+
#: ../backend/tabs/instance/frontend_options.php:47
|
162 |
+
msgid "Show search in custom post types selectors"
|
163 |
+
msgstr ""
|
164 |
+
|
165 |
+
#: ../backend/tabs/instance/frontend_options.php:52
|
166 |
+
msgid ""
|
167 |
+
"Nor recommended if you have more than 500 categories! (the HTML output will "
|
168 |
+
"get too big)"
|
169 |
+
msgstr ""
|
170 |
+
|
171 |
+
#: ../backend/tabs/instance/frontend_options.php:54
|
172 |
+
msgid "Show the categories selectors?"
|
173 |
+
msgstr ""
|
174 |
+
|
175 |
+
#: ../backend/tabs/instance/frontend_options.php:59
|
176 |
+
msgid "Show the uncategorised category?"
|
177 |
+
msgstr ""
|
178 |
+
|
179 |
+
#: ../backend/tabs/instance/frontend_options.php:63
|
180 |
+
msgid "Select which categories exclude"
|
181 |
+
msgstr ""
|
182 |
+
|
183 |
+
#: ../backend/tabs/instance/frontend_options.php:70
|
184 |
+
msgid "Categories filter box header text"
|
185 |
+
msgstr ""
|
186 |
+
|
187 |
+
#: ../backend/tabs/instance/frontend_options.php:76
|
188 |
+
#: ../backend/tabs/instance/general_options.php:130
|
189 |
+
#: ../backend/tabs/instance/image_options.php:106
|
190 |
+
#: ../backend/tabs/instance/layout_options.php:21
|
191 |
+
msgid "Save options!"
|
192 |
+
msgstr ""
|
193 |
+
|
194 |
+
#: ../backend/tabs/instance/general_options.php:12
|
195 |
+
msgid "Theme"
|
196 |
+
msgstr ""
|
197 |
+
|
198 |
+
#: ../backend/tabs/instance/general_options.php:21
|
199 |
+
msgid "Search in posts?"
|
200 |
+
msgstr ""
|
201 |
+
|
202 |
+
#: ../backend/tabs/instance/general_options.php:28
|
203 |
+
msgid "Search in pages?"
|
204 |
+
msgstr ""
|
205 |
+
|
206 |
+
#: ../backend/tabs/instance/general_options.php:34
|
207 |
+
msgid "Search in custom post types"
|
208 |
+
msgstr ""
|
209 |
+
|
210 |
+
#: ../backend/tabs/instance/general_options.php:41
|
211 |
+
msgid "Search in title?"
|
212 |
+
msgstr ""
|
213 |
+
|
214 |
+
#: ../backend/tabs/instance/general_options.php:48
|
215 |
+
msgid "Search in content?"
|
216 |
+
msgstr ""
|
217 |
+
|
218 |
+
#: ../backend/tabs/instance/general_options.php:55
|
219 |
+
msgid "Search in post excerpts?"
|
220 |
+
msgstr ""
|
221 |
+
|
222 |
+
#: ../backend/tabs/instance/general_options.php:61
|
223 |
+
msgid "Search in custom fields"
|
224 |
+
msgstr ""
|
225 |
+
|
226 |
+
#: ../backend/tabs/instance/general_options.php:69
|
227 |
+
msgid "Show exact matches only?"
|
228 |
+
msgstr ""
|
229 |
+
|
230 |
+
#: ../backend/tabs/instance/general_options.php:76
|
231 |
+
msgid "Search in terms? (categories, tags)"
|
232 |
+
msgstr ""
|
233 |
+
|
234 |
+
#: ../backend/tabs/instance/general_options.php:82
|
235 |
+
msgid "Result ordering"
|
236 |
+
msgstr ""
|
237 |
+
|
238 |
+
#: ../backend/tabs/instance/general_options.php:91
|
239 |
+
msgid "Trigger search when clicking on search icon?"
|
240 |
+
msgstr ""
|
241 |
+
|
242 |
+
#: ../backend/tabs/instance/general_options.php:98
|
243 |
+
msgid "Redirect to search results page when clicking on search icon?"
|
244 |
+
msgstr ""
|
245 |
+
|
246 |
+
#: ../backend/tabs/instance/general_options.php:105
|
247 |
+
msgid "Trigger search when typing?"
|
248 |
+
msgstr ""
|
249 |
+
|
250 |
+
#: ../backend/tabs/instance/general_options.php:112
|
251 |
+
msgid "Minimal character count to trigger search"
|
252 |
+
msgstr ""
|
253 |
+
|
254 |
+
#: ../backend/tabs/instance/general_options.php:119
|
255 |
+
msgid "Max. results"
|
256 |
+
msgstr ""
|
257 |
+
|
258 |
+
#: ../backend/tabs/instance/general_options.php:124
|
259 |
+
msgid "Results box viewport (in item numbers)"
|
260 |
+
msgstr ""
|
261 |
+
|
262 |
+
#: ../backend/tabs/instance/image_options.php:4
|
263 |
+
msgid "Show images in results?"
|
264 |
+
msgstr ""
|
265 |
+
|
266 |
+
#: ../backend/tabs/instance/image_options.php:13
|
267 |
+
msgid "Image width"
|
268 |
+
msgstr ""
|
269 |
+
|
270 |
+
#: ../backend/tabs/instance/image_options.php:22
|
271 |
+
msgid "Image height"
|
272 |
+
msgstr ""
|
273 |
+
|
274 |
+
#: ../backend/tabs/instance/image_options.php:33
|
275 |
+
msgid "Primary image source"
|
276 |
+
msgstr ""
|
277 |
+
|
278 |
+
#: ../backend/tabs/instance/image_options.php:44
|
279 |
+
msgid "Alternative image source 1"
|
280 |
+
msgstr ""
|
281 |
+
|
282 |
+
#: ../backend/tabs/instance/image_options.php:55
|
283 |
+
msgid "Alternative image source 2"
|
284 |
+
msgstr ""
|
285 |
+
|
286 |
+
#: ../backend/tabs/instance/image_options.php:66
|
287 |
+
msgid "Alternative image source 3"
|
288 |
+
msgstr ""
|
289 |
+
|
290 |
+
#: ../backend/tabs/instance/image_options.php:77
|
291 |
+
msgid "Alternative image source 4"
|
292 |
+
msgstr ""
|
293 |
+
|
294 |
+
#: ../backend/tabs/instance/image_options.php:88
|
295 |
+
msgid "Default image url"
|
296 |
+
msgstr ""
|
297 |
+
|
298 |
+
#: ../backend/tabs/instance/image_options.php:97
|
299 |
+
msgid "Custom field containing the image"
|
300 |
+
msgstr ""
|
301 |
+
|
302 |
+
#: ../backend/tabs/instance/layout_options.php:2
|
303 |
+
#: ../backend/tabs/instance/layout_options.php:8
|
304 |
+
msgid "Results layout"
|
305 |
+
msgstr ""
|
306 |
+
|
307 |
+
#: ../backend/tabs/instance/layout_options.php:3
|
308 |
+
#: ../backend/tabs/instance/layout_options.php:14
|
309 |
+
msgid "Results Behaviour"
|
310 |
+
msgstr ""
|
311 |
+
|
312 |
+
#: ../includes/asl_init.class.php:12 ../includes/asl_init.class.php:13
|
313 |
+
#: ../includes/asl_init.class.php:22
|
314 |
+
msgid "Ajax Search Lite"
|
315 |
+
msgstr ""
|
316 |
+
|
317 |
+
#: ../includes/asl_init.class.php:23
|
318 |
+
msgid "Analytics Integration"
|
319 |
+
msgstr ""
|
languages/ajax-search-lite-en_EN.pot
ADDED
@@ -0,0 +1,319 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
msgid ""
|
2 |
+
msgstr ""
|
3 |
+
"Project-Id-Version: Ajax Search Lite\n"
|
4 |
+
"POT-Creation-Date: 2014-12-10 21:19+0100\n"
|
5 |
+
"PO-Revision-Date: 2014-12-10 21:20+0100\n"
|
6 |
+
"Last-Translator: \n"
|
7 |
+
"Language-Team: \n"
|
8 |
+
"Language: en\n"
|
9 |
+
"MIME-Version: 1.0\n"
|
10 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
+
"Content-Transfer-Encoding: 8bit\n"
|
12 |
+
"X-Generator: Poedit 1.7.1\n"
|
13 |
+
"X-Poedit-Basepath: .\n"
|
14 |
+
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
15 |
+
"X-Poedit-KeywordsList: __;_e\n"
|
16 |
+
"X-Poedit-SearchPath-0: ..\n"
|
17 |
+
"X-Poedit-SearchPathExcluded-0: ../js\n"
|
18 |
+
"X-Poedit-SearchPathExcluded-1: ../backend/settings/assets\n"
|
19 |
+
|
20 |
+
#: ../backend/analytics.php:7
|
21 |
+
msgid "Enable search Google Analytics integration?"
|
22 |
+
msgstr ""
|
23 |
+
|
24 |
+
#: ../backend/analytics.php:12
|
25 |
+
msgid "Google analytics pageview string"
|
26 |
+
msgstr ""
|
27 |
+
|
28 |
+
#: ../backend/analytics.php:16
|
29 |
+
msgid ""
|
30 |
+
"This is how the pageview will look like on the google analytics website. Use "
|
31 |
+
"the {asl_term} variable to add the search term to the pageview."
|
32 |
+
msgstr ""
|
33 |
+
|
34 |
+
#: ../backend/analytics.php:40
|
35 |
+
msgid "Analytics options"
|
36 |
+
msgstr ""
|
37 |
+
|
38 |
+
#: ../backend/analytics.php:45
|
39 |
+
msgid "Result"
|
40 |
+
msgstr ""
|
41 |
+
|
42 |
+
#: ../backend/analytics.php:47
|
43 |
+
msgid ""
|
44 |
+
"After some time you should be able to see the hits on your analytics board."
|
45 |
+
msgstr ""
|
46 |
+
|
47 |
+
#: ../backend/settings.php:44
|
48 |
+
msgid "Search shortcode:"
|
49 |
+
msgstr ""
|
50 |
+
|
51 |
+
#: ../backend/settings.php:47
|
52 |
+
msgid "Search shortcode for templates:"
|
53 |
+
msgstr ""
|
54 |
+
|
55 |
+
#: ../backend/settings.php:58
|
56 |
+
msgid "General Options"
|
57 |
+
msgstr ""
|
58 |
+
|
59 |
+
#: ../backend/settings.php:59 ../backend/settings.php:75
|
60 |
+
msgid "Image Options"
|
61 |
+
msgstr ""
|
62 |
+
|
63 |
+
#: ../backend/settings.php:60
|
64 |
+
msgid "Frontend Options"
|
65 |
+
msgstr ""
|
66 |
+
|
67 |
+
#: ../backend/settings.php:61
|
68 |
+
msgid "Layout options"
|
69 |
+
msgstr ""
|
70 |
+
|
71 |
+
#: ../backend/settings.php:62
|
72 |
+
msgid "Advanced"
|
73 |
+
msgstr ""
|
74 |
+
|
75 |
+
#: ../backend/settings.php:67
|
76 |
+
msgid "Genearal Options"
|
77 |
+
msgstr ""
|
78 |
+
|
79 |
+
#: ../backend/settings.php:83
|
80 |
+
msgid "Frontend Search Settings"
|
81 |
+
msgstr ""
|
82 |
+
|
83 |
+
#: ../backend/settings.php:91
|
84 |
+
msgid "Layout Options"
|
85 |
+
msgstr ""
|
86 |
+
|
87 |
+
#: ../backend/settings.php:99
|
88 |
+
msgid "Advanced Options"
|
89 |
+
msgstr ""
|
90 |
+
|
91 |
+
#: ../backend/settings.php:119
|
92 |
+
msgid "Ajax Search Lite settings saved!"
|
93 |
+
msgstr ""
|
94 |
+
|
95 |
+
#: ../backend/settings/class/customfields.class.php:22
|
96 |
+
msgid "Available public custom fields types"
|
97 |
+
msgstr ""
|
98 |
+
|
99 |
+
#: ../backend/settings/class/customfields.class.php:31
|
100 |
+
msgid "Drag here the custom fields you want to use!"
|
101 |
+
msgstr ""
|
102 |
+
|
103 |
+
#: ../backend/settings/class/customposttypes.class.php:23
|
104 |
+
msgid "Available post types"
|
105 |
+
msgstr ""
|
106 |
+
|
107 |
+
#: ../backend/settings/class/customposttypes.class.php:32
|
108 |
+
msgid "Drag here the post types you want to use!"
|
109 |
+
msgstr ""
|
110 |
+
|
111 |
+
#: ../backend/tabs/instance/advanced_options.php:3
|
112 |
+
msgid "Title Field"
|
113 |
+
msgstr ""
|
114 |
+
|
115 |
+
#: ../backend/tabs/instance/advanced_options.php:12
|
116 |
+
msgid "Description Field"
|
117 |
+
msgstr ""
|
118 |
+
|
119 |
+
#: ../backend/tabs/instance/advanced_options.php:21
|
120 |
+
msgid "Exclude categories"
|
121 |
+
msgstr ""
|
122 |
+
|
123 |
+
#: ../backend/tabs/instance/advanced_options.php:28
|
124 |
+
msgid "Exclude Posts by ID's (comma separated post ID-s)"
|
125 |
+
msgstr ""
|
126 |
+
|
127 |
+
#: ../backend/tabs/instance/advanced_options.php:34
|
128 |
+
msgid "WPML compatibility"
|
129 |
+
msgstr ""
|
130 |
+
|
131 |
+
#: ../backend/tabs/instance/frontend_options.php:3
|
132 |
+
msgid "Show search settings on the frontend?"
|
133 |
+
msgstr ""
|
134 |
+
|
135 |
+
#: ../backend/tabs/instance/frontend_options.php:8
|
136 |
+
msgid ""
|
137 |
+
"The default values of the checkboxes on the frontend are the values set "
|
138 |
+
"above."
|
139 |
+
msgstr ""
|
140 |
+
|
141 |
+
#: ../backend/tabs/instance/frontend_options.php:12
|
142 |
+
msgid "Show exact matches selector?"
|
143 |
+
msgstr ""
|
144 |
+
|
145 |
+
#: ../backend/tabs/instance/frontend_options.php:20
|
146 |
+
msgid "Show search in posts selector?"
|
147 |
+
msgstr ""
|
148 |
+
|
149 |
+
#: ../backend/tabs/instance/frontend_options.php:27
|
150 |
+
msgid "Show search in pages selector?"
|
151 |
+
msgstr ""
|
152 |
+
|
153 |
+
#: ../backend/tabs/instance/frontend_options.php:34
|
154 |
+
msgid "Show search in title selector?"
|
155 |
+
msgstr ""
|
156 |
+
|
157 |
+
#: ../backend/tabs/instance/frontend_options.php:41
|
158 |
+
msgid "Show search in content selector?"
|
159 |
+
msgstr ""
|
160 |
+
|
161 |
+
#: ../backend/tabs/instance/frontend_options.php:47
|
162 |
+
msgid "Show search in custom post types selectors"
|
163 |
+
msgstr ""
|
164 |
+
|
165 |
+
#: ../backend/tabs/instance/frontend_options.php:52
|
166 |
+
msgid ""
|
167 |
+
"Nor recommended if you have more than 500 categories! (the HTML output will "
|
168 |
+
"get too big)"
|
169 |
+
msgstr ""
|
170 |
+
|
171 |
+
#: ../backend/tabs/instance/frontend_options.php:54
|
172 |
+
msgid "Show the categories selectors?"
|
173 |
+
msgstr ""
|
174 |
+
|
175 |
+
#: ../backend/tabs/instance/frontend_options.php:59
|
176 |
+
msgid "Show the uncategorised category?"
|
177 |
+
msgstr ""
|
178 |
+
|
179 |
+
#: ../backend/tabs/instance/frontend_options.php:63
|
180 |
+
msgid "Select which categories exclude"
|
181 |
+
msgstr ""
|
182 |
+
|
183 |
+
#: ../backend/tabs/instance/frontend_options.php:70
|
184 |
+
msgid "Categories filter box header text"
|
185 |
+
msgstr ""
|
186 |
+
|
187 |
+
#: ../backend/tabs/instance/frontend_options.php:76
|
188 |
+
#: ../backend/tabs/instance/general_options.php:130
|
189 |
+
#: ../backend/tabs/instance/image_options.php:106
|
190 |
+
#: ../backend/tabs/instance/layout_options.php:21
|
191 |
+
msgid "Save options!"
|
192 |
+
msgstr ""
|
193 |
+
|
194 |
+
#: ../backend/tabs/instance/general_options.php:12
|
195 |
+
msgid "Theme"
|
196 |
+
msgstr ""
|
197 |
+
|
198 |
+
#: ../backend/tabs/instance/general_options.php:21
|
199 |
+
msgid "Search in posts?"
|
200 |
+
msgstr ""
|
201 |
+
|
202 |
+
#: ../backend/tabs/instance/general_options.php:28
|
203 |
+
msgid "Search in pages?"
|
204 |
+
msgstr ""
|
205 |
+
|
206 |
+
#: ../backend/tabs/instance/general_options.php:34
|
207 |
+
msgid "Search in custom post types"
|
208 |
+
msgstr ""
|
209 |
+
|
210 |
+
#: ../backend/tabs/instance/general_options.php:41
|
211 |
+
msgid "Search in title?"
|
212 |
+
msgstr ""
|
213 |
+
|
214 |
+
#: ../backend/tabs/instance/general_options.php:48
|
215 |
+
msgid "Search in content?"
|
216 |
+
msgstr ""
|
217 |
+
|
218 |
+
#: ../backend/tabs/instance/general_options.php:55
|
219 |
+
msgid "Search in post excerpts?"
|
220 |
+
msgstr ""
|
221 |
+
|
222 |
+
#: ../backend/tabs/instance/general_options.php:61
|
223 |
+
msgid "Search in custom fields"
|
224 |
+
msgstr ""
|
225 |
+
|
226 |
+
#: ../backend/tabs/instance/general_options.php:69
|
227 |
+
msgid "Show exact matches only?"
|
228 |
+
msgstr ""
|
229 |
+
|
230 |
+
#: ../backend/tabs/instance/general_options.php:76
|
231 |
+
msgid "Search in terms? (categories, tags)"
|
232 |
+
msgstr ""
|
233 |
+
|
234 |
+
#: ../backend/tabs/instance/general_options.php:82
|
235 |
+
msgid "Result ordering"
|
236 |
+
msgstr ""
|
237 |
+
|
238 |
+
#: ../backend/tabs/instance/general_options.php:91
|
239 |
+
msgid "Trigger search when clicking on search icon?"
|
240 |
+
msgstr ""
|
241 |
+
|
242 |
+
#: ../backend/tabs/instance/general_options.php:98
|
243 |
+
msgid "Redirect to search results page when clicking on search icon?"
|
244 |
+
msgstr ""
|
245 |
+
|
246 |
+
#: ../backend/tabs/instance/general_options.php:105
|
247 |
+
msgid "Trigger search when typing?"
|
248 |
+
msgstr ""
|
249 |
+
|
250 |
+
#: ../backend/tabs/instance/general_options.php:112
|
251 |
+
msgid "Minimal character count to trigger search"
|
252 |
+
msgstr ""
|
253 |
+
|
254 |
+
#: ../backend/tabs/instance/general_options.php:119
|
255 |
+
msgid "Max. results"
|
256 |
+
msgstr ""
|
257 |
+
|
258 |
+
#: ../backend/tabs/instance/general_options.php:124
|
259 |
+
msgid "Results box viewport (in item numbers)"
|
260 |
+
msgstr ""
|
261 |
+
|
262 |
+
#: ../backend/tabs/instance/image_options.php:4
|
263 |
+
msgid "Show images in results?"
|
264 |
+
msgstr ""
|
265 |
+
|
266 |
+
#: ../backend/tabs/instance/image_options.php:13
|
267 |
+
msgid "Image width"
|
268 |
+
msgstr ""
|
269 |
+
|
270 |
+
#: ../backend/tabs/instance/image_options.php:22
|
271 |
+
msgid "Image height"
|
272 |
+
msgstr ""
|
273 |
+
|
274 |
+
#: ../backend/tabs/instance/image_options.php:33
|
275 |
+
msgid "Primary image source"
|
276 |
+
msgstr ""
|
277 |
+
|
278 |
+
#: ../backend/tabs/instance/image_options.php:44
|
279 |
+
msgid "Alternative image source 1"
|
280 |
+
msgstr ""
|
281 |
+
|
282 |
+
#: ../backend/tabs/instance/image_options.php:55
|
283 |
+
msgid "Alternative image source 2"
|
284 |
+
msgstr ""
|
285 |
+
|
286 |
+
#: ../backend/tabs/instance/image_options.php:66
|
287 |
+
msgid "Alternative image source 3"
|
288 |
+
msgstr ""
|
289 |
+
|
290 |
+
#: ../backend/tabs/instance/image_options.php:77
|
291 |
+
msgid "Alternative image source 4"
|
292 |
+
msgstr ""
|
293 |
+
|
294 |
+
#: ../backend/tabs/instance/image_options.php:88
|
295 |
+
msgid "Default image url"
|
296 |
+
msgstr ""
|
297 |
+
|
298 |
+
#: ../backend/tabs/instance/image_options.php:97
|
299 |
+
msgid "Custom field containing the image"
|
300 |
+
msgstr ""
|
301 |
+
|
302 |
+
#: ../backend/tabs/instance/layout_options.php:2
|
303 |
+
#: ../backend/tabs/instance/layout_options.php:8
|
304 |
+
msgid "Results layout"
|
305 |
+
msgstr ""
|
306 |
+
|
307 |
+
#: ../backend/tabs/instance/layout_options.php:3
|
308 |
+
#: ../backend/tabs/instance/layout_options.php:14
|
309 |
+
msgid "Results Behaviour"
|
310 |
+
msgstr ""
|
311 |
+
|
312 |
+
#: ../includes/asl_init.class.php:15 ../includes/asl_init.class.php:16
|
313 |
+
#: ../includes/asl_init.class.php:25
|
314 |
+
msgid "Ajax Search Lite"
|
315 |
+
msgstr ""
|
316 |
+
|
317 |
+
#: ../includes/asl_init.class.php:26
|
318 |
+
msgid "Analytics Integration"
|
319 |
+
msgstr ""
|
languages/ajax-search-lite-hu_HU.mo
ADDED
Binary file
|
languages/ajax-search-lite-hu_HU.po
ADDED
@@ -0,0 +1,324 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
msgid ""
|
2 |
+
msgstr ""
|
3 |
+
"Project-Id-Version: Ajax Search Lite\n"
|
4 |
+
"POT-Creation-Date: 2014-12-10 21:20+0100\n"
|
5 |
+
"PO-Revision-Date: 2014-12-10 21:33+0100\n"
|
6 |
+
"Last-Translator: \n"
|
7 |
+
"Language-Team: \n"
|
8 |
+
"Language: hu\n"
|
9 |
+
"MIME-Version: 1.0\n"
|
10 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
+
"Content-Transfer-Encoding: 8bit\n"
|
12 |
+
"X-Generator: Poedit 1.7.1\n"
|
13 |
+
"X-Poedit-Basepath: .\n"
|
14 |
+
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
15 |
+
"X-Poedit-KeywordsList: __;_e\n"
|
16 |
+
"X-Poedit-SearchPath-0: ..\n"
|
17 |
+
"X-Poedit-SearchPathExcluded-0: ../js\n"
|
18 |
+
"X-Poedit-SearchPathExcluded-1: ../backend/settings/assets\n"
|
19 |
+
|
20 |
+
#: ../backend/analytics.php:7
|
21 |
+
msgid "Enable search Google Analytics integration?"
|
22 |
+
msgstr "Google Analytics integráció engedélyezése"
|
23 |
+
|
24 |
+
#: ../backend/analytics.php:12
|
25 |
+
msgid "Google analytics pageview string"
|
26 |
+
msgstr "Google analytics oldal-megtekintés szövege"
|
27 |
+
|
28 |
+
#: ../backend/analytics.php:16
|
29 |
+
msgid ""
|
30 |
+
"This is how the pageview will look like on the google analytics website. Use "
|
31 |
+
"the {asl_term} variable to add the search term to the pageview."
|
32 |
+
msgstr ""
|
33 |
+
"Így fog kinézni egy oldalmegjelenés a google analytics panelen. Használd az "
|
34 |
+
"{asl_term} változót a kulcsszó megjelöléséhez. "
|
35 |
+
|
36 |
+
#: ../backend/analytics.php:40
|
37 |
+
msgid "Analytics options"
|
38 |
+
msgstr "Analytics beállítások"
|
39 |
+
|
40 |
+
#: ../backend/analytics.php:45
|
41 |
+
msgid "Result"
|
42 |
+
msgstr "Eredmény"
|
43 |
+
|
44 |
+
#: ../backend/analytics.php:47
|
45 |
+
msgid ""
|
46 |
+
"After some time you should be able to see the hits on your analytics board."
|
47 |
+
msgstr ""
|
48 |
+
"Rövid idő elteltvével látni fogod a kereséseket az analytics weblapján."
|
49 |
+
|
50 |
+
#: ../backend/settings.php:44
|
51 |
+
msgid "Search shortcode:"
|
52 |
+
msgstr "Kereső shortkód"
|
53 |
+
|
54 |
+
#: ../backend/settings.php:47
|
55 |
+
msgid "Search shortcode for templates:"
|
56 |
+
msgstr "Kereső sortkód témákhoz (php)"
|
57 |
+
|
58 |
+
#: ../backend/settings.php:58
|
59 |
+
msgid "General Options"
|
60 |
+
msgstr "Általános Beállítások"
|
61 |
+
|
62 |
+
#: ../backend/settings.php:59 ../backend/settings.php:75
|
63 |
+
msgid "Image Options"
|
64 |
+
msgstr "Képbeállítások"
|
65 |
+
|
66 |
+
#: ../backend/settings.php:60
|
67 |
+
msgid "Frontend Options"
|
68 |
+
msgstr "Front-end beállítások"
|
69 |
+
|
70 |
+
#: ../backend/settings.php:61
|
71 |
+
msgid "Layout options"
|
72 |
+
msgstr "Megjelenés"
|
73 |
+
|
74 |
+
#: ../backend/settings.php:62
|
75 |
+
msgid "Advanced"
|
76 |
+
msgstr "Haladó"
|
77 |
+
|
78 |
+
#: ../backend/settings.php:67
|
79 |
+
msgid "Genearal Options"
|
80 |
+
msgstr "Általános"
|
81 |
+
|
82 |
+
#: ../backend/settings.php:83
|
83 |
+
msgid "Frontend Search Settings"
|
84 |
+
msgstr "Front-end beállítások"
|
85 |
+
|
86 |
+
#: ../backend/settings.php:91
|
87 |
+
msgid "Layout Options"
|
88 |
+
msgstr "Megjelenés"
|
89 |
+
|
90 |
+
#: ../backend/settings.php:99
|
91 |
+
msgid "Advanced Options"
|
92 |
+
msgstr "Haladó"
|
93 |
+
|
94 |
+
#: ../backend/settings.php:119
|
95 |
+
msgid "Ajax Search Lite settings saved!"
|
96 |
+
msgstr "Beállítások mentve!"
|
97 |
+
|
98 |
+
#: ../backend/settings/class/customfields.class.php:22
|
99 |
+
msgid "Available public custom fields types"
|
100 |
+
msgstr "Elérhető Egyedi Mezők"
|
101 |
+
|
102 |
+
#: ../backend/settings/class/customfields.class.php:31
|
103 |
+
msgid "Drag here the custom fields you want to use!"
|
104 |
+
msgstr "Húzd ide az Egyedi Mezőket, amelyeket használni szeretnél"
|
105 |
+
|
106 |
+
#: ../backend/settings/class/customposttypes.class.php:23
|
107 |
+
msgid "Available post types"
|
108 |
+
msgstr "Elérhető Bejegyzés Típusok"
|
109 |
+
|
110 |
+
#: ../backend/settings/class/customposttypes.class.php:32
|
111 |
+
msgid "Drag here the post types you want to use!"
|
112 |
+
msgstr "Húzd ide a Bejegyzés Típusokat, amiket használni szeretnél"
|
113 |
+
|
114 |
+
#: ../backend/tabs/instance/advanced_options.php:3
|
115 |
+
msgid "Title Field"
|
116 |
+
msgstr "Cím mező"
|
117 |
+
|
118 |
+
#: ../backend/tabs/instance/advanced_options.php:12
|
119 |
+
msgid "Description Field"
|
120 |
+
msgstr "Leírás mező"
|
121 |
+
|
122 |
+
#: ../backend/tabs/instance/advanced_options.php:21
|
123 |
+
msgid "Exclude categories"
|
124 |
+
msgstr "Kihagyandó kategóriák"
|
125 |
+
|
126 |
+
#: ../backend/tabs/instance/advanced_options.php:28
|
127 |
+
msgid "Exclude Posts by ID's (comma separated post ID-s)"
|
128 |
+
msgstr "Kihagyandó Bejegyzések (vesszővel elválaszott ID számok)"
|
129 |
+
|
130 |
+
#: ../backend/tabs/instance/advanced_options.php:34
|
131 |
+
msgid "WPML compatibility"
|
132 |
+
msgstr "WPML kompatibilitás"
|
133 |
+
|
134 |
+
#: ../backend/tabs/instance/frontend_options.php:3
|
135 |
+
msgid "Show search settings on the frontend?"
|
136 |
+
msgstr "Beállítások mutatása front-enden?"
|
137 |
+
|
138 |
+
#: ../backend/tabs/instance/frontend_options.php:8
|
139 |
+
msgid ""
|
140 |
+
"The default values of the checkboxes on the frontend are the values set "
|
141 |
+
"above."
|
142 |
+
msgstr "A jelölőnégyzetek alapértékei az itt beállított értékek lesznek"
|
143 |
+
|
144 |
+
#: ../backend/tabs/instance/frontend_options.php:12
|
145 |
+
msgid "Show exact matches selector?"
|
146 |
+
msgstr "Csak teljesen egyező találatok jelölő mutatása"
|
147 |
+
|
148 |
+
#: ../backend/tabs/instance/frontend_options.php:20
|
149 |
+
msgid "Show search in posts selector?"
|
150 |
+
msgstr "Bejegyzés jelölőnégyzet mutatása"
|
151 |
+
|
152 |
+
#: ../backend/tabs/instance/frontend_options.php:27
|
153 |
+
msgid "Show search in pages selector?"
|
154 |
+
msgstr "Oldal jelölőnégyzet mutatása"
|
155 |
+
|
156 |
+
#: ../backend/tabs/instance/frontend_options.php:34
|
157 |
+
msgid "Show search in title selector?"
|
158 |
+
msgstr "Keresés a címben jelölőnégyzet mutatása"
|
159 |
+
|
160 |
+
#: ../backend/tabs/instance/frontend_options.php:41
|
161 |
+
msgid "Show search in content selector?"
|
162 |
+
msgstr "Keresés a tartalomban jelölőnégyzet mutatása"
|
163 |
+
|
164 |
+
#: ../backend/tabs/instance/frontend_options.php:47
|
165 |
+
msgid "Show search in custom post types selectors"
|
166 |
+
msgstr "Keresés más bejegyzés típusokban jelölőnégyzet mutatása"
|
167 |
+
|
168 |
+
#: ../backend/tabs/instance/frontend_options.php:52
|
169 |
+
msgid ""
|
170 |
+
"Nor recommended if you have more than 500 categories! (the HTML output will "
|
171 |
+
"get too big)"
|
172 |
+
msgstr "Nem ajánlott ha több, mint 500 kategória található a blogodon"
|
173 |
+
|
174 |
+
#: ../backend/tabs/instance/frontend_options.php:54
|
175 |
+
msgid "Show the categories selectors?"
|
176 |
+
msgstr "Kategória jelölőnégyzetek mutatása"
|
177 |
+
|
178 |
+
#: ../backend/tabs/instance/frontend_options.php:59
|
179 |
+
msgid "Show the uncategorised category?"
|
180 |
+
msgstr "Mutassa a Kategorizálatlan jelölőt"
|
181 |
+
|
182 |
+
#: ../backend/tabs/instance/frontend_options.php:63
|
183 |
+
msgid "Select which categories exclude"
|
184 |
+
msgstr "Válaszd ki, mely kategóriák ne jelenjenek meg"
|
185 |
+
|
186 |
+
#: ../backend/tabs/instance/frontend_options.php:70
|
187 |
+
msgid "Categories filter box header text"
|
188 |
+
msgstr "A kategória doboz fejléc szövege"
|
189 |
+
|
190 |
+
#: ../backend/tabs/instance/frontend_options.php:76
|
191 |
+
#: ../backend/tabs/instance/general_options.php:130
|
192 |
+
#: ../backend/tabs/instance/image_options.php:106
|
193 |
+
#: ../backend/tabs/instance/layout_options.php:21
|
194 |
+
msgid "Save options!"
|
195 |
+
msgstr "Beállítások mentése!"
|
196 |
+
|
197 |
+
#: ../backend/tabs/instance/general_options.php:12
|
198 |
+
msgid "Theme"
|
199 |
+
msgstr "Téma"
|
200 |
+
|
201 |
+
#: ../backend/tabs/instance/general_options.php:21
|
202 |
+
msgid "Search in posts?"
|
203 |
+
msgstr "Keresés bejegyzésekben?"
|
204 |
+
|
205 |
+
#: ../backend/tabs/instance/general_options.php:28
|
206 |
+
msgid "Search in pages?"
|
207 |
+
msgstr "Keresés oldalakon?"
|
208 |
+
|
209 |
+
#: ../backend/tabs/instance/general_options.php:34
|
210 |
+
msgid "Search in custom post types"
|
211 |
+
msgstr "Keresés más típusokban"
|
212 |
+
|
213 |
+
#: ../backend/tabs/instance/general_options.php:41
|
214 |
+
msgid "Search in title?"
|
215 |
+
msgstr "Keresés a címben?"
|
216 |
+
|
217 |
+
#: ../backend/tabs/instance/general_options.php:48
|
218 |
+
msgid "Search in content?"
|
219 |
+
msgstr "Keresés a tartalomban?"
|
220 |
+
|
221 |
+
#: ../backend/tabs/instance/general_options.php:55
|
222 |
+
msgid "Search in post excerpts?"
|
223 |
+
msgstr "Keresés a kivonatokban?"
|
224 |
+
|
225 |
+
#: ../backend/tabs/instance/general_options.php:61
|
226 |
+
msgid "Search in custom fields"
|
227 |
+
msgstr "Keresés az Egyedi mezőkben?"
|
228 |
+
|
229 |
+
#: ../backend/tabs/instance/general_options.php:69
|
230 |
+
msgid "Show exact matches only?"
|
231 |
+
msgstr "Csak teljesen egyező találatok mutatása?"
|
232 |
+
|
233 |
+
#: ../backend/tabs/instance/general_options.php:76
|
234 |
+
msgid "Search in terms? (categories, tags)"
|
235 |
+
msgstr "Keresés kifejezésekben (kategória, tag, stb..)"
|
236 |
+
|
237 |
+
#: ../backend/tabs/instance/general_options.php:82
|
238 |
+
msgid "Result ordering"
|
239 |
+
msgstr "Eredmények elrendezése"
|
240 |
+
|
241 |
+
#: ../backend/tabs/instance/general_options.php:91
|
242 |
+
msgid "Trigger search when clicking on search icon?"
|
243 |
+
msgstr "A keresés indítása a kereső ikonra való kattintáskor"
|
244 |
+
|
245 |
+
#: ../backend/tabs/instance/general_options.php:98
|
246 |
+
msgid "Redirect to search results page when clicking on search icon?"
|
247 |
+
msgstr ""
|
248 |
+
"Átirányítás az alapértelmezett keresési eredményekhez ikonra való "
|
249 |
+
"kattintáskor?"
|
250 |
+
|
251 |
+
#: ../backend/tabs/instance/general_options.php:105
|
252 |
+
msgid "Trigger search when typing?"
|
253 |
+
msgstr "Keresés indítása gépelés közben?"
|
254 |
+
|
255 |
+
#: ../backend/tabs/instance/general_options.php:112
|
256 |
+
msgid "Minimal character count to trigger search"
|
257 |
+
msgstr "Minimális karakterszám a keresés indításához"
|
258 |
+
|
259 |
+
#: ../backend/tabs/instance/general_options.php:119
|
260 |
+
msgid "Max. results"
|
261 |
+
msgstr "Eredmények maximális száma"
|
262 |
+
|
263 |
+
#: ../backend/tabs/instance/general_options.php:124
|
264 |
+
msgid "Results box viewport (in item numbers)"
|
265 |
+
msgstr "Eredménydoboz mérete (elemszám)"
|
266 |
+
|
267 |
+
#: ../backend/tabs/instance/image_options.php:4
|
268 |
+
msgid "Show images in results?"
|
269 |
+
msgstr "Képek mutatása"
|
270 |
+
|
271 |
+
#: ../backend/tabs/instance/image_options.php:13
|
272 |
+
msgid "Image width"
|
273 |
+
msgstr "Képszélesség"
|
274 |
+
|
275 |
+
#: ../backend/tabs/instance/image_options.php:22
|
276 |
+
msgid "Image height"
|
277 |
+
msgstr "Képmagasság"
|
278 |
+
|
279 |
+
#: ../backend/tabs/instance/image_options.php:33
|
280 |
+
msgid "Primary image source"
|
281 |
+
msgstr "Elsődleges képforrás"
|
282 |
+
|
283 |
+
#: ../backend/tabs/instance/image_options.php:44
|
284 |
+
msgid "Alternative image source 1"
|
285 |
+
msgstr "Alternatív képforrás 1"
|
286 |
+
|
287 |
+
#: ../backend/tabs/instance/image_options.php:55
|
288 |
+
msgid "Alternative image source 2"
|
289 |
+
msgstr "Alternatív képforrás 2"
|
290 |
+
|
291 |
+
#: ../backend/tabs/instance/image_options.php:66
|
292 |
+
msgid "Alternative image source 3"
|
293 |
+
msgstr "Alternatív képforrás 3"
|
294 |
+
|
295 |
+
#: ../backend/tabs/instance/image_options.php:77
|
296 |
+
msgid "Alternative image source 4"
|
297 |
+
msgstr "Alternatív képforrás 4"
|
298 |
+
|
299 |
+
#: ../backend/tabs/instance/image_options.php:88
|
300 |
+
msgid "Default image url"
|
301 |
+
msgstr "Alapértelmezett kép URL"
|
302 |
+
|
303 |
+
#: ../backend/tabs/instance/image_options.php:97
|
304 |
+
msgid "Custom field containing the image"
|
305 |
+
msgstr "Egyedi mező, amely a képet tartalmazza"
|
306 |
+
|
307 |
+
#: ../backend/tabs/instance/layout_options.php:2
|
308 |
+
#: ../backend/tabs/instance/layout_options.php:8
|
309 |
+
msgid "Results layout"
|
310 |
+
msgstr "Megjelenés"
|
311 |
+
|
312 |
+
#: ../backend/tabs/instance/layout_options.php:3
|
313 |
+
#: ../backend/tabs/instance/layout_options.php:14
|
314 |
+
msgid "Results Behaviour"
|
315 |
+
msgstr "Viselkedés"
|
316 |
+
|
317 |
+
#: ../includes/asl_init.class.php:15 ../includes/asl_init.class.php:16
|
318 |
+
#: ../includes/asl_init.class.php:25
|
319 |
+
msgid "Ajax Search Lite"
|
320 |
+
msgstr "Ajax Search Lite"
|
321 |
+
|
322 |
+
#: ../includes/asl_init.class.php:26
|
323 |
+
msgid "Analytics Integration"
|
324 |
+
msgstr "Analytics integráció"
|
readme.txt
CHANGED
@@ -1,10 +1,10 @@
|
|
1 |
-
|
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,
|
5 |
Requires at least: 3.5
|
6 |
-
Tested up to: 4.
|
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 |
-
|
16 |
-
|
17 |
|
18 |
Facebook: https://www.facebook.com/pages/WPDreams/383702515034741
|
19 |
|
@@ -39,10 +39,12 @@ Homepage: [wp-dreams.com](http://wp-dreams.com)
|
|
39 |
|
40 |
Pro version Demo: [Ajax Search Pro](http://demo.wp-dreams.com/?product=ajax_search_pro)
|
41 |
|
42 |
-
**New In pro version 3.
|
43 |
|
44 |
* Frontend Demo: [Ajax Search Pro](http://demo.wp-dreams.com/?product=ajax_search_pro)
|
|
|
45 |
* Search in BuddyPress, BBPress, JigoShop, Woocommerce
|
|
|
46 |
* Search result grouping by categories or post types
|
47 |
* Responsive design
|
48 |
* Search in custom fields
|
@@ -98,6 +100,17 @@ and will let you know what to do.
|
|
98 |
|
99 |
== Changelog ==
|
100 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
101 |
= 3.05 =
|
102 |
* Hotfix for disabled categories
|
103 |
|
1 |
+
=== Ajax Search Lite ===
|
2 |
Contributors: wpdreams
|
3 |
Donate link: http://wp-dreams.com
|
4 |
+
Tags: search, better wordpress search, search plugin, relevance search, better search plugin, ajax search, wp ajax search, custom fields search, better search, ajax search plugin, wp search, wp search plugin, relevant search plugin, search plugin, wordpress search, live search
|
5 |
Requires at least: 3.5
|
6 |
+
Tested up to: 4.1
|
7 |
+
Stable tag: 3.10
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
12 |
|
13 |
== Description ==
|
14 |
|
15 |
+
Ajax Search Lite - is a live search plugin for WordPress. This responsive live 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 and regular updates.
|
16 |
+
Fine-tune 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. Boost your site search engine with this custom built live search engine.
|
17 |
|
18 |
Facebook: https://www.facebook.com/pages/WPDreams/383702515034741
|
19 |
|
39 |
|
40 |
Pro version Demo: [Ajax Search Pro](http://demo.wp-dreams.com/?product=ajax_search_pro)
|
41 |
|
42 |
+
**New In pro version 3.1 (2014.09.19):**
|
43 |
|
44 |
* Frontend Demo: [Ajax Search Pro](http://demo.wp-dreams.com/?product=ajax_search_pro)
|
45 |
+
* The search now can affect the default WordPress search results
|
46 |
* Search in BuddyPress, BBPress, JigoShop, Woocommerce
|
47 |
+
* Search in BuddyPress activity feed, users and group names
|
48 |
* Search result grouping by categories or post types
|
49 |
* Responsive design
|
50 |
* Search in custom fields
|
100 |
|
101 |
== Changelog ==
|
102 |
|
103 |
+
= 3.1 =
|
104 |
+
* Updated engine with full UTF8 charset support
|
105 |
+
* Languages like chinese, persian are now searchable
|
106 |
+
* Language files added
|
107 |
+
|
108 |
+
= 3.06 =
|
109 |
+
* Fixed long label names in frontend settings dropdown
|
110 |
+
* Title and description substrings at word endings
|
111 |
+
* Removed an unneccessary CSS rule
|
112 |
+
* Fixed a bug with custom post type names
|
113 |
+
|
114 |
= 3.05 =
|
115 |
* Hotfix for disabled categories
|
116 |
|
search.php
CHANGED
@@ -3,6 +3,7 @@ add_action('wp_ajax_nopriv_ajaxsearchlite_search', 'ajaxsearchlite_search');
|
|
3 |
add_action('wp_ajax_ajaxsearchlite_search', 'ajaxsearchlite_search');
|
4 |
|
5 |
require_once(ASL_PATH . "/includes/imagecache.class.php");
|
|
|
6 |
require_once(ASL_PATH . "/includes/suggest.class.php");
|
7 |
|
8 |
require_once(ASL_PATH . "/includes/search.class.php");
|
3 |
add_action('wp_ajax_ajaxsearchlite_search', 'ajaxsearchlite_search');
|
4 |
|
5 |
require_once(ASL_PATH . "/includes/imagecache.class.php");
|
6 |
+
require_once(ASL_PATH . "/includes/bfi_thumb.php");
|
7 |
require_once(ASL_PATH . "/includes/suggest.class.php");
|
8 |
|
9 |
require_once(ASL_PATH . "/includes/search.class.php");
|