Version Description
Download this release
Release Info
Developer | dancameron |
Plugin | Search Everything |
Version | 6 |
Comparing to | |
See all releases |
Code changes from version 5.0 to 6
- SE-Admin.php +0 -220
- lang/SE4-zh_CN.mo +0 -0
- lang/SE4-zh_CN.po +120 -0
- lang/SE4-zh_TW.mo +0 -0
- lang/SE4-zh_TW.po +119 -0
- readme-JAPANESE.txt +0 -43
- readme.txt +9 -12
- screenshot-1.jpg +0 -0
- search-everything.php +607 -0
- search_everything.php +0 -414
- views/options.php +349 -0
SE-Admin.php
DELETED
@@ -1,220 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
Class SearchEverythingAdmin {
|
4 |
-
|
5 |
-
var $version = '5';
|
6 |
-
|
7 |
-
function SearchEverythingAdmin() {
|
8 |
-
|
9 |
-
// Load language file
|
10 |
-
$locale = get_locale();
|
11 |
-
if ( !empty($locale) )
|
12 |
-
load_textdomain('SearchEverything', SE_ABSPATH .'lang/SE4-'.$locale.'.mo');
|
13 |
-
|
14 |
-
|
15 |
-
add_action('admin_head', array(&$this, 'SE5_options_style'));
|
16 |
-
add_action('admin_menu', array(&$this, 'SE5_add_options_panel'));
|
17 |
-
|
18 |
-
}
|
19 |
-
|
20 |
-
function SE5_add_options_panel() {
|
21 |
-
add_options_page('Search', 'Search Everything', 7, 'manage_search', array(&$this, 'SE5_option_page'));
|
22 |
-
}
|
23 |
-
|
24 |
-
//build admin interface
|
25 |
-
function SE5_option_page() {
|
26 |
-
global $wpdb, $table_prefix, $wp_version;
|
27 |
-
|
28 |
-
if($_POST['action'] == "save") {
|
29 |
-
echo "<div class=\"updated fade\" id=\"limitcatsupdatenotice\"><p>" . __("Search Everything Options <strong>Updated</strong>.") . "</p></div>";
|
30 |
-
|
31 |
-
$new_options = array(
|
32 |
-
'SE5_exclude_categories' => $_POST["exclude_categories"],
|
33 |
-
'SE5_exclude_categories_list' => $_POST["exclude_categories_list"],
|
34 |
-
'SE5_exclude_posts' => $_POST["exclude_posts"],
|
35 |
-
'SE5_exclude_posts_list' => $_POST["exclude_posts_list"],
|
36 |
-
'SE5_use_page_search' => $_POST["search_pages"],
|
37 |
-
'SE5_use_comment_search' => $_POST["search_comments"],
|
38 |
-
'SE5_use_tag_search' => $_POST["search_tags"],
|
39 |
-
'SE5_use_category_search' => $_POST["search_categories"],
|
40 |
-
'SE5_approved_comments_only' => $_POST["appvd_comments"],
|
41 |
-
'SE5_approved_pages_only' => $_POST["appvd_pages"],
|
42 |
-
'SE5_use_excerpt_search' => $_POST["search_excerpt"],
|
43 |
-
'SE5_use_draft_search' => $_POST["search_drafts"],
|
44 |
-
'SE5_use_attachment_search' => $_POST["search_attachments"],
|
45 |
-
'SE5_use_authors' => $_POST['search_authors'],
|
46 |
-
'SE5_use_metadata_search' => $_POST["search_metadata"]
|
47 |
-
|
48 |
-
);
|
49 |
-
|
50 |
-
update_option("search_tag", $_POST["SE5_use_tag_search"]);
|
51 |
-
update_option("SE5_options", $new_options);
|
52 |
-
|
53 |
-
}
|
54 |
-
|
55 |
-
$options = get_option('SE5_options');
|
56 |
-
$search_tag = get_option('search_tag');
|
57 |
-
|
58 |
-
?>
|
59 |
-
|
60 |
-
<div class="wrap">
|
61 |
-
<h2>Search Everything (SE) Version: <?php echo $this->version; ?></h2>
|
62 |
-
|
63 |
-
<table class="form-table">
|
64 |
-
<tr valign="top">
|
65 |
-
<td colspan="4" bgcolor="#DDD"><?php _e('Use this form to configure your search options.', 'SearchEverything'); ?><br />
|
66 |
-
<?php _e('The options selected below will be used in every search query on this site; in addition to the built-in post search.','SearchEverything'); ?></td>
|
67 |
-
</tr>
|
68 |
-
<tr>
|
69 |
-
<td>
|
70 |
-
<form method="post">
|
71 |
-
<legend><?php _e('Search Options Form', 'SearchEverything'); ?></legend>
|
72 |
-
<p><input type="checkbox" id="exclude_posts" name="exclude_posts" value="true" <?php if($options['SE5_exclude_posts'] == 'true') { echo 'checked="true"'; } ?> />
|
73 |
-
<label for="exclude_posts"><?php _e('Exclude some post or page IDs','SearchEverything'); ?></label><br />
|
74 |
-
<label for="exclude_posts_list" class="SE_text_label"><?php _e('Comma separated Post IDs (example: 1, 5, 9)','SearchEverything'); ?></label><br />
|
75 |
-
<input type="text" size="50" class="SE_text_input" id="exclude_posts_list" name="exclude_posts_list" value="<?php echo $options['SE5_exclude_posts_list'];?>" /></p>
|
76 |
-
|
77 |
-
<p><input type="checkbox" id="exclude_categories" name="exclude_categories" value="true" <?php if($options['SE5_exclude_categories'] == 'true') { echo 'checked="true"'; } ?> />
|
78 |
-
<label for="exclude_categories"><?php _e('Exclude Categories','SearchEverything'); ?></label><br />
|
79 |
-
<label for="exclude_categories_list" class="SE_text_label"><?php _e('Comma separated category IDs (example: 1, 4)','SearchEverything'); ?></label><br />
|
80 |
-
<input type="text" size="50" class="SE_text_input" id="exclude_categories_list" name="exclude_categories_list" value="<?php echo $options['SE5_exclude_categories_list'];?>" /></p>
|
81 |
-
|
82 |
-
<p><input type="checkbox" id="search_pages" name="search_pages" value="true" <?php if($options['SE5_use_page_search'] == 'true') { echo 'checked="true"'; } ?> />
|
83 |
-
<label for="search_pages"><?php _e('Search every page (non-password protected)','SearchEverything'); ?></label></p>
|
84 |
-
<p> <input type="checkbox" class="SE_text_input" id="appvd_pages" name="appvd_pages" value="true" <?php if($options['SE5_approved_pages_only'] == 'true') { echo 'checked="true"'; } ?>
|
85 |
-
<label for="appvd_pages"><?php _e('Search approved pages only?','SearchEverything'); ?></label></p>
|
86 |
-
|
87 |
-
<?php
|
88 |
-
// Show tags only for WP 2.3+
|
89 |
-
If ($wp_version >= '2.3') { ?>
|
90 |
-
<p><input type="checkbox" id="search_tags" name="search_tags" value="true" <?php if($options['SE5_use_tag_search'] == 'true') { echo 'checked="true"'; } ?> />
|
91 |
-
<label for="search_tags"><?php _e('Search every tag name','SearchEverything'); ?></label></p>
|
92 |
-
<?php } ?>
|
93 |
-
|
94 |
-
<?php
|
95 |
-
// Show categories only for WP 2.5+
|
96 |
-
If ($wp_version >= '2.5') { ?>
|
97 |
-
<p><input type="checkbox" id="search_categories" name="search_categories" value="true" <?php if($options['SE5_use_category_search'] == 'true') { echo 'checked="true"'; } ?> />
|
98 |
-
<label for="search_categories"><?php _e('Search every category name','SearchEverything'); ?></label></p>
|
99 |
-
<?php } ?>
|
100 |
-
|
101 |
-
<p><input type="checkbox" id="search_comments" name="search_comments" value="true" <?php if($options['SE5_use_comment_search'] == 'true') { echo 'checked="true"'; } ?> />
|
102 |
-
<label for="search_comments"><?php _e('Search every comment','SearchEverything'); ?></label></p>
|
103 |
-
|
104 |
-
<p> <input type="checkbox" class="SE_text_input" id="appvd_comments" name="appvd_comments" value="true" <?php if($options['SE5_approved_comments_only'] == 'true') { echo 'checked="true"'; } ?> />
|
105 |
-
<label for="appvd_comments"><?php _e('Search approved comments only?','SearchEverything'); ?></label></p>
|
106 |
-
|
107 |
-
<p><input type="checkbox" id="search_excerpt" name="search_excerpt" value="true" <?php if($options['SE5_use_excerpt_search'] == 'true') { echo 'checked="true"'; } ?> />
|
108 |
-
<label for="search_excerpt"><?php _e('Search every excerpt','SearchEverything'); ?></label></p>
|
109 |
-
<?php
|
110 |
-
// Show drafts only for WP 2.3+
|
111 |
-
If ($wp_version < '2.5') { ?>
|
112 |
-
<p><input type="checkbox" id="search_drafts" name="search_drafts" value="true" <?php if($options['SE5_use_draft_search'] == 'true') { echo 'checked="true"'; } ?> />
|
113 |
-
<label for="search_drafts"><?php _e('Search every draft','SearchEverything'); ?></label></p>
|
114 |
-
<?php } ?>
|
115 |
-
<p><input type="checkbox" id="search_attachments" name="search_attachments" value="true" <?php if($options['SE5_use_attachment_search'] == 'true') { echo 'checked="true"'; } ?> />
|
116 |
-
<label for="search_attachments"><?php _e('Search every attachment','SearchEverything'); ?></label></p>
|
117 |
-
<p><input type="checkbox" id="search_authors" name="search_authors" value="true" <?php if($options['SE5_use_authors'] == 'true') { echo 'checked="true"'; } ?> />
|
118 |
-
<label for="search_authors"><?php _e('Search every author','SearchEverything'); ?></label></p>
|
119 |
-
<p><input type="checkbox" id="search_metadata" name="search_metadata" value="true" <?php if($options['SE5_use_metadata_search'] == 'true') { echo 'checked="true"'; } ?> />
|
120 |
-
<label for="search_metadata"><?php _e('Search every custom field (metadata)','SearchEverything'); ?></label></p>
|
121 |
-
|
122 |
-
</td>
|
123 |
-
</tr>
|
124 |
-
</table>
|
125 |
-
<div class="submit">
|
126 |
-
<input type="hidden" name="action" value="save" />
|
127 |
-
<input type="submit" value="<?php _e('Update Options', 'SearchEverything') ?>" />
|
128 |
-
</div>
|
129 |
-
</form>
|
130 |
-
</div>
|
131 |
-
|
132 |
-
<div class="wrap">
|
133 |
-
<h2><?php _e('SE Search Form', 'SearchEverything'); ?></h2>
|
134 |
-
<table class="form-table">
|
135 |
-
<tr valign="top">
|
136 |
-
<td colspan="4" bgcolor="#DDD"><?php _e('Use this search form to run a live search test.', 'SearchEverything'); ?></td>
|
137 |
-
</tr>
|
138 |
-
<tr>
|
139 |
-
<td>
|
140 |
-
<legend><?php _e('Site Search', 'SearchEverything'); ?></legend>
|
141 |
-
<form method="get" id="searchform" action="<?php bloginfo('home'); ?>"><p class="srch submit">
|
142 |
-
<label for="s"><?php _e('Enter search terms', 'SearchEverything'); ?><br /></label>
|
143 |
-
<input type="text" class="srch-txt" value="<?php echo wp_specialchars($s, 1); ?>" name="s" id="s" size="30" />
|
144 |
-
<input type="submit" class="SE5_btn" id="searchsubmit" value="<?php _e('Run Test Search', 'SearchEverything'); ?>" /></p>
|
145 |
-
</form>
|
146 |
-
</td>
|
147 |
-
</tr>
|
148 |
-
</table>
|
149 |
-
</div>
|
150 |
-
|
151 |
-
<div class="wrap">
|
152 |
-
<h2>SE Project Information</h2>
|
153 |
-
<table class="form-table">
|
154 |
-
<tr valign="top">
|
155 |
-
<td colspan="4" bgcolor="#DDD">
|
156 |
-
The development since Version One has primarily come from the WordPress community and as a Search Everything user myself, I’m grateful for their dedicated and continued support:
|
157 |
-
<ul class="SE_lists">
|
158 |
-
<li><a href="http://codium.co.nz">Matias Gertel</a></li>
|
159 |
-
<li><a href="http://striderweb.com/">Stephen Rider</a></li>
|
160 |
-
<li><a href="http://chrismeller.com/">Chris Meller</a></li>
|
161 |
-
<li>jdleung</li>
|
162 |
-
<li>Alakhnor</li>
|
163 |
-
<li><a href="http://kinrowan.net/">Cori Schlegel</a></li>
|
164 |
-
<li><a href="http://green-beast.com/">Mike Cherim</a></li>
|
165 |
-
<li><a href="http://blog.saddey.net/">Saddy</a></li>
|
166 |
-
<li><a href="http://www.reaper-x.com/">Reaper</a></li>
|
167 |
-
<li><a href="http://beyn.org/">Barış Ünver</a> (localization support)</li>
|
168 |
-
<li><a href="http://www.alohastone.com">alohastone</a> (localization support)</li>
|
169 |
-
<li><a href="http://cinelover.wordpress.com/">Emanuel Righetto</a></li>
|
170 |
-
<li><a href="http://meandmymac.net">Arnan de Gans</a> (Options panel)</li>
|
171 |
-
<li>Uli Iserloh</li>
|
172 |
-
</ul>
|
173 |
-
</td>
|
174 |
-
</tr>
|
175 |
-
<tr>
|
176 |
-
<td bgcolor="#DDD">
|
177 |
-
If you’d like to contribute there’s a lot to do:
|
178 |
-
<ul class="SE_lists">
|
179 |
-
<strong><li>Search Options for Visitor.</li></strong>
|
180 |
-
<li>More meta data functions.</li>
|
181 |
-
<li>Search Bookmarks.</li>
|
182 |
-
<li>…anything else you want to add.</li>
|
183 |
-
</ul>
|
184 |
-
</td>
|
185 |
-
</tr>
|
186 |
-
<tr>
|
187 |
-
<td bgcolor="#DDD">
|
188 |
-
The current project home is at <a href="http://scatter3d.com/">scatter3d.com</a>. If you want to contribute <a href="mailto:dancameron+se@gmail.com">e-mail me</a> your modifications.<br />
|
189 |
-
Respectfully,<br />
|
190 |
-
<a href="http://dancameron.org/">Dan Cameron</a>
|
191 |
-
</td>
|
192 |
-
</tr>
|
193 |
-
</table>
|
194 |
-
</div>
|
195 |
-
|
196 |
-
<?php
|
197 |
-
} //end SE5_option_page
|
198 |
-
|
199 |
-
//styling options page
|
200 |
-
function SE5_options_style() {
|
201 |
-
?>
|
202 |
-
<style type="text/css" media="screen">
|
203 |
-
div.SE5 p.submit, div.SE5 form p.submit, div.SE5 p.submit input { text-align:left; }
|
204 |
-
#SE5_options_panel p.submit { text-align:left; }
|
205 |
-
form#searchform label, form#searchform input, form#SE_form label, form#SE_form input { margin-left:10px; }
|
206 |
-
input.SE5_btn { cursor:pointer; margin-left:5px; }
|
207 |
-
p.srch { margin:0; margin-bottom:20px; }
|
208 |
-
p.submit input.srch-txt { background-color:#f4f4f4; background-image:none; border:1px solid #999; padding:6px; }
|
209 |
-
p.submit input.srch-txt:focus, p.submit input.srch-txt:active { background-color:#fff; background-image:none; border:1px solid #111; padding:6px; }
|
210 |
-
p.sig { margin-left:25px; }
|
211 |
-
span.SE_notice { color:#cd0000; font-weight:bold; padding-left:10px; }
|
212 |
-
label.SE_text_label { cursor:text; }
|
213 |
-
form#SE_form label.SE_text_label, form#SE_form input.SE_text_input { margin-left:38px; }
|
214 |
-
ul.SE_lists li { list-style-type:square; }
|
215 |
-
</style>
|
216 |
-
<?php
|
217 |
-
}
|
218 |
-
|
219 |
-
}
|
220 |
-
?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
lang/SE4-zh_CN.mo
ADDED
Binary file
|
lang/SE4-zh_CN.po
ADDED
@@ -0,0 +1,120 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
msgid ""
|
2 |
+
msgstr ""
|
3 |
+
"Project-Id-Version: Search Everything 5\n"
|
4 |
+
"Report-Msgid-Bugs-To: \n"
|
5 |
+
"POT-Creation-Date: 2009-03-06 11:22+0800\n"
|
6 |
+
"PO-Revision-Date: 2009-03-06 11:35+0800\n"
|
7 |
+
"Last-Translator: hit1205 <hit1205 DOT tw AT gmail DOT com>\n"
|
8 |
+
"Language-Team: hit1205 <hit1205 DOT tw AT gmail DOT com>\n"
|
9 |
+
"MIME-Version: 1.0\n"
|
10 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
+
"Content-Transfer-Encoding: 8bit\n"
|
12 |
+
"X-Poedit-Language: Chinese\n"
|
13 |
+
"X-Poedit-Country: CHINA\n"
|
14 |
+
"X-Poedit-KeywordsList: __;_e\n"
|
15 |
+
"X-Poedit-Basepath: ..\\..\\\n"
|
16 |
+
"X-Poedit-SearchPath-0: search-everything\n"
|
17 |
+
|
18 |
+
#: search-everything/SE-Admin.php:29
|
19 |
+
msgid "Search Everything Options <strong>Updated</strong>."
|
20 |
+
msgstr "Search Everything 设置 <strong>已更新</strong>。"
|
21 |
+
|
22 |
+
#: search-everything/SE-Admin.php:65
|
23 |
+
msgid "Use this form to configure your search options."
|
24 |
+
msgstr "使用以下表单配置您的搜索设置。"
|
25 |
+
|
26 |
+
#: search-everything/SE-Admin.php:66
|
27 |
+
msgid "The options selected below will be used in every search query on this site; in addition to the built-in post search."
|
28 |
+
msgstr "以下设置会被加到内置的文章搜索中,用在本站的每次搜索里。"
|
29 |
+
|
30 |
+
#: search-everything/SE-Admin.php:71
|
31 |
+
msgid "Search Options Form"
|
32 |
+
msgstr "搜索设置表单"
|
33 |
+
|
34 |
+
#: search-everything/SE-Admin.php:73
|
35 |
+
msgid "Exclude some post or page IDs"
|
36 |
+
msgstr "设置要排除的文章或页面 ID"
|
37 |
+
|
38 |
+
#: search-everything/SE-Admin.php:74
|
39 |
+
msgid "Comma separated Post IDs (example: 1, 5, 9)"
|
40 |
+
msgstr "文章 ID 使用半形逗号分隔(例如:1, 5, 9)"
|
41 |
+
|
42 |
+
#: search-everything/SE-Admin.php:78
|
43 |
+
msgid "Exclude Categories"
|
44 |
+
msgstr "设置要排除的分类"
|
45 |
+
|
46 |
+
#: search-everything/SE-Admin.php:79
|
47 |
+
msgid "Comma separated category IDs (example: 1, 4)"
|
48 |
+
msgstr "分类 ID 使用半形逗号分隔(例如:1, 4)"
|
49 |
+
|
50 |
+
#: search-everything/SE-Admin.php:83
|
51 |
+
msgid "Search every page (non-password protected)"
|
52 |
+
msgstr "搜索未受密码保护的页面"
|
53 |
+
|
54 |
+
#: search-everything/SE-Admin.php:85
|
55 |
+
msgid "Search approved pages only?"
|
56 |
+
msgstr "只搜索公开发表的页面"
|
57 |
+
|
58 |
+
#: search-everything/SE-Admin.php:91
|
59 |
+
msgid "Search every tag name"
|
60 |
+
msgstr "搜索标签名称"
|
61 |
+
|
62 |
+
#: search-everything/SE-Admin.php:98
|
63 |
+
msgid "Search every category name"
|
64 |
+
msgstr "搜索分类名称"
|
65 |
+
|
66 |
+
#: search-everything/SE-Admin.php:102
|
67 |
+
msgid "Search every comment"
|
68 |
+
msgstr "搜索评论"
|
69 |
+
|
70 |
+
#: search-everything/SE-Admin.php:105
|
71 |
+
msgid "Search approved comments only?"
|
72 |
+
msgstr "只搜索通过审核的评论"
|
73 |
+
|
74 |
+
#: search-everything/SE-Admin.php:108
|
75 |
+
msgid "Search every excerpt"
|
76 |
+
msgstr "搜索摘要"
|
77 |
+
|
78 |
+
#: search-everything/SE-Admin.php:113
|
79 |
+
msgid "Search every draft"
|
80 |
+
msgstr "搜索草稿"
|
81 |
+
|
82 |
+
#: search-everything/SE-Admin.php:116
|
83 |
+
msgid "Search every attachment"
|
84 |
+
msgstr "搜索附件"
|
85 |
+
|
86 |
+
#: search-everything/SE-Admin.php:118
|
87 |
+
msgid "Search every author"
|
88 |
+
msgstr "搜索作者"
|
89 |
+
|
90 |
+
#: search-everything/SE-Admin.php:120
|
91 |
+
msgid "Search every custom field (metadata)"
|
92 |
+
msgstr "搜索自定义字段(metadata, 元数据)"
|
93 |
+
|
94 |
+
#: search-everything/SE-Admin.php:127
|
95 |
+
msgid "Update Options"
|
96 |
+
msgstr "更新设置"
|
97 |
+
|
98 |
+
#: search-everything/SE-Admin.php:133
|
99 |
+
msgid "SE Search Form"
|
100 |
+
msgstr "SE 搜索表单"
|
101 |
+
|
102 |
+
#: search-everything/SE-Admin.php:136
|
103 |
+
msgid "Use this search form to run a live search test."
|
104 |
+
msgstr "使用以下表单测试搜索结果。"
|
105 |
+
|
106 |
+
#: search-everything/SE-Admin.php:140
|
107 |
+
msgid "Site Search"
|
108 |
+
msgstr "网站搜索"
|
109 |
+
|
110 |
+
#: search-everything/SE-Admin.php:142
|
111 |
+
msgid "Enter search terms"
|
112 |
+
msgstr "输入搜索字词"
|
113 |
+
|
114 |
+
#: search-everything/SE-Admin.php:144
|
115 |
+
msgid "Run Test Search"
|
116 |
+
msgstr "运行搜索测试"
|
117 |
+
|
118 |
+
#~ msgid "SE Search Options"
|
119 |
+
#~ msgstr "SE 搜索设置"
|
120 |
+
|
lang/SE4-zh_TW.mo
ADDED
Binary file
|
lang/SE4-zh_TW.po
ADDED
@@ -0,0 +1,119 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
msgid ""
|
2 |
+
msgstr ""
|
3 |
+
"Project-Id-Version: Search Everything 5\n"
|
4 |
+
"POT-Creation-Date: 2009-03-06 11:17+0800\n"
|
5 |
+
"PO-Revision-Date: 2009-03-06 11:35+0800\n"
|
6 |
+
"Last-Translator: hit1205 <hit1205 DOT tw AT gmail DOT com>\n"
|
7 |
+
"Language-Team: hit1205 <hit1205 DOT tw AT gmail DOT com>\n"
|
8 |
+
"MIME-Version: 1.0\n"
|
9 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
10 |
+
"Content-Transfer-Encoding: 8bit\n"
|
11 |
+
"X-Poedit-Language: Chinese\n"
|
12 |
+
"X-Poedit-Country: TAIWAN\n"
|
13 |
+
"X-Poedit-KeywordsList: __;_e\n"
|
14 |
+
"X-Poedit-Basepath: ..\\..\\\n"
|
15 |
+
"X-Poedit-SearchPath-0: search-everything\n"
|
16 |
+
|
17 |
+
#: search-everything/SE-Admin.php:29
|
18 |
+
msgid "Search Everything Options <strong>Updated</strong>."
|
19 |
+
msgstr "Search Everything 設定 <strong>已更新</strong>。"
|
20 |
+
|
21 |
+
#: search-everything/SE-Admin.php:65
|
22 |
+
msgid "Use this form to configure your search options."
|
23 |
+
msgstr "使用以下表單變更您的搜尋設定。"
|
24 |
+
|
25 |
+
#: search-everything/SE-Admin.php:66
|
26 |
+
msgid "The options selected below will be used in every search query on this site; in addition to the built-in post search."
|
27 |
+
msgstr "以下設定會被加到內建的文章搜尋裡,用在本站的每次搜尋中。"
|
28 |
+
|
29 |
+
#: search-everything/SE-Admin.php:71
|
30 |
+
msgid "Search Options Form"
|
31 |
+
msgstr "搜尋設定表單"
|
32 |
+
|
33 |
+
#: search-everything/SE-Admin.php:73
|
34 |
+
msgid "Exclude some post or page IDs"
|
35 |
+
msgstr "設定要排除的文章或分頁 ID"
|
36 |
+
|
37 |
+
#: search-everything/SE-Admin.php:74
|
38 |
+
msgid "Comma separated Post IDs (example: 1, 5, 9)"
|
39 |
+
msgstr "以半形逗號分隔「文章 ID」(例如:1, 5, 9)"
|
40 |
+
|
41 |
+
#: search-everything/SE-Admin.php:78
|
42 |
+
msgid "Exclude Categories"
|
43 |
+
msgstr "設定要排除的分類"
|
44 |
+
|
45 |
+
#: search-everything/SE-Admin.php:79
|
46 |
+
msgid "Comma separated category IDs (example: 1, 4)"
|
47 |
+
msgstr "以半形逗號分隔「分類 ID」(例如:1, 4)"
|
48 |
+
|
49 |
+
#: search-everything/SE-Admin.php:83
|
50 |
+
msgid "Search every page (non-password protected)"
|
51 |
+
msgstr "搜尋未受密碼保護的分頁"
|
52 |
+
|
53 |
+
#: search-everything/SE-Admin.php:85
|
54 |
+
msgid "Search approved pages only?"
|
55 |
+
msgstr "只搜尋公開發表的分頁"
|
56 |
+
|
57 |
+
#: search-everything/SE-Admin.php:91
|
58 |
+
msgid "Search every tag name"
|
59 |
+
msgstr "搜尋標籤名稱"
|
60 |
+
|
61 |
+
#: search-everything/SE-Admin.php:98
|
62 |
+
msgid "Search every category name"
|
63 |
+
msgstr "搜尋分類名稱"
|
64 |
+
|
65 |
+
#: search-everything/SE-Admin.php:102
|
66 |
+
msgid "Search every comment"
|
67 |
+
msgstr "搜尋迴響"
|
68 |
+
|
69 |
+
#: search-everything/SE-Admin.php:105
|
70 |
+
msgid "Search approved comments only?"
|
71 |
+
msgstr "只搜尋通過審核的迴響"
|
72 |
+
|
73 |
+
#: search-everything/SE-Admin.php:108
|
74 |
+
msgid "Search every excerpt"
|
75 |
+
msgstr "搜尋摘要"
|
76 |
+
|
77 |
+
#: search-everything/SE-Admin.php:113
|
78 |
+
msgid "Search every draft"
|
79 |
+
msgstr "搜尋草稿"
|
80 |
+
|
81 |
+
#: search-everything/SE-Admin.php:116
|
82 |
+
msgid "Search every attachment"
|
83 |
+
msgstr "搜尋附件"
|
84 |
+
|
85 |
+
#: search-everything/SE-Admin.php:118
|
86 |
+
msgid "Search every author"
|
87 |
+
msgstr "搜尋作者"
|
88 |
+
|
89 |
+
#: search-everything/SE-Admin.php:120
|
90 |
+
msgid "Search every custom field (metadata)"
|
91 |
+
msgstr "搜尋自訂欄位(metadata, 後設資料)"
|
92 |
+
|
93 |
+
#: search-everything/SE-Admin.php:127
|
94 |
+
msgid "Update Options"
|
95 |
+
msgstr "更新設定"
|
96 |
+
|
97 |
+
#: search-everything/SE-Admin.php:133
|
98 |
+
msgid "SE Search Form"
|
99 |
+
msgstr "SE 搜尋表單"
|
100 |
+
|
101 |
+
#: search-everything/SE-Admin.php:136
|
102 |
+
msgid "Use this search form to run a live search test."
|
103 |
+
msgstr "使用以下表單測試搜尋結果。"
|
104 |
+
|
105 |
+
#: search-everything/SE-Admin.php:140
|
106 |
+
msgid "Site Search"
|
107 |
+
msgstr "網站搜尋"
|
108 |
+
|
109 |
+
#: search-everything/SE-Admin.php:142
|
110 |
+
msgid "Enter search terms"
|
111 |
+
msgstr "輸入搜尋字詞"
|
112 |
+
|
113 |
+
#: search-everything/SE-Admin.php:144
|
114 |
+
msgid "Run Test Search"
|
115 |
+
msgstr "執行搜尋測試"
|
116 |
+
|
117 |
+
#~ msgid "SE Search Options"
|
118 |
+
#~ msgstr "SE 搜尋設定"
|
119 |
+
|
readme-JAPANESE.txt
DELETED
@@ -1,43 +0,0 @@
|
|
1 |
-
Search Everything (SE) v4.7 - 検索対象にするコンテンツを追加するプラグイン
|
2 |
-
GNU General Public License
|
3 |
-
Developed by Daniel Cameron http://dancameron.org/
|
4 |
-
Translation by Naoko McCracken http://detlog.org/
|
5 |
-
対応テスト済みのWordPressバージョン: 2.1〜2.6(日本語タグ未対応)
|
6 |
-
|
7 |
-
このプラグインの翻訳版配布ページ: http://wppluginsj.sourceforge.jp/i18n-ja_jp/search-everything/
|
8 |
-
このプラグインに関する追加情報(英語): http://wordpress.org/extend/plugins/search-everything/
|
9 |
-
|
10 |
-
◆はじめに
|
11 |
-
------------------------
|
12 |
-
デフォルトの状態のWordPressでは、公開したと投稿の本文のみが検索されます。このプラグインを使って、検索対象にするコンテンツを追加することができます。
|
13 |
-
|
14 |
-
- ページ作成機能で追加した全ページ
|
15 |
-
- パスワード保護されていない全ページ
|
16 |
-
- タグ(ただし現時点では日本語はうまく行かないようです)
|
17 |
-
- すべてのコメント
|
18 |
-
- 承認済みのコメントのみ
|
19 |
-
- 未公開の草稿記事
|
20 |
-
- 投稿の要約
|
21 |
-
- アタッチメント(記事内で使用中のアップロードファイル)
|
22 |
-
- カスタムフィールドで追加した記事のメタデータ
|
23 |
-
- カテゴリー
|
24 |
-
- ID指定した以外の全ページ
|
25 |
-
- ID指定した以外の全カテゴリー
|
26 |
-
|
27 |
-
◆インストール
|
28 |
-
------------------------
|
29 |
-
1. ZIPファイルを解凍します。
|
30 |
-
|
31 |
-
2. search-everythingフォルダをそのままプラグインディレクトリ(/wp-content/plugins/)に移動します。
|
32 |
-
|
33 |
-
- wp-content
|
34 |
-
- plugins
|
35 |
-
- search-everything
|
36 |
-
| search_everything.php
|
37 |
-
| SE-Admin.php
|
38 |
-
- lang
|
39 |
-
| SE5-ja.mo
|
40 |
-
|
41 |
-
2. プラグイン管理画面にログインし、「Search Everything」を有効化します。
|
42 |
-
|
43 |
-
3. 「設定」メニューのサブメニューとして現れる、「Search Everything」管理パネルへ移動し、設定を変更します。検索したいコンテンツにチェックを入れ、「設定を更新」ボタンをクリックします。
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
readme.txt
CHANGED
@@ -1,10 +1,10 @@
|
|
1 |
=== Plugin Name ===
|
2 |
-
Contributors: dancameron
|
3 |
-
Donate link: http://www.amazon.com/
|
4 |
Tags: search, tag search, category search, category exclusion, comment search, page search, admin, seo
|
5 |
Requires at least: 2.1
|
6 |
-
Tested up to: 2.
|
7 |
-
Stable tag:
|
8 |
|
9 |
Increases Wordpress' default search functionality through an options panel. Options include searching pages, excerpts, attachments, drafts, comments and custom fields (metadata).
|
10 |
|
@@ -25,18 +25,16 @@ Search Everything increases the ability of the default Wordpress Search, options
|
|
25 |
* Exclude Posts from search
|
26 |
* Exclude Categories from search
|
27 |
|
28 |
-
... I'm still looking for some help so please contact me if you'd like to contribute.
|
29 |
-
|
30 |
-
|
31 |
== Update Log ==
|
32 |
|
|
|
33 |
*5 - Bug Release, Extend Author Search to comments (props to Joshua Bettigole), Tag Fix, Meta Fix
|
34 |
*4.7.7 - New conditions to fix plugin from breaking with certain option selections. props Matias Gertel
|
35 |
*4.7.6.2 - Bug fix, some people returning no results. Matching release number with WP version.
|
36 |
*4.7.5 - Post Revision Update for Wordpress 2.6 (necessary update for 2.6 users), removed future posts from results
|
37 |
*4.7.1 - Swedish, Spanish and Dutch
|
38 |
*4.7 - Wordpress 2.6 updates and more
|
39 |
-
*4.6.2 - REQUIRED UPDATE from 4.6 release. Admin panel bug fixes (proper wp_version checks, disabled draft support for 2.5 and fixed the options from not updating); Russian and Italian language
|
40 |
*4.6 - Admin refresh and Excerpt Fix
|
41 |
*4.5 - Japanese Language Support, Category Fix for Wordpress 2.5, Tag search fix (name) other minors
|
42 |
* 4.2.2 - Localization PO and MO updates, German Translation
|
@@ -47,7 +45,7 @@ Search Everything increases the ability of the default Wordpress Search, options
|
|
47 |
* 4.0.1 - Bug fix~Extraneous 's' in options panel
|
48 |
* 4.0.0 - Wordpress 2.3 Support, Password protected pages option, Overhaul of Admin area
|
49 |
|
50 |
-
[SVN Browser](https://redmine.sproutventure.com/
|
51 |
|
52 |
== Installation ==
|
53 |
|
@@ -56,9 +54,8 @@ Installation Instructions:
|
|
56 |
1. Download the plugin and unzip it (didn't you already do this?).
|
57 |
2. Put the 'search-everything' directory into your wp-content/plugins/ directory.
|
58 |
3. Go to the Plugins page in your WordPress Administration area and click 'Activate' next to Search Everything.
|
59 |
-
4. Go to the Options > Search Everything and configure your
|
60 |
-
5. That's it. Have fun and if you can contribute (see notes)
|
61 |
-
|
62 |
|
63 |
|
64 |
== Frequently Asked Questions ==
|
1 |
=== Plugin Name ===
|
2 |
+
Contributors: dancameron, sproutventure
|
3 |
+
Donate link: http://www.amazon.com/wishlist/3EM84J7FVHE6S
|
4 |
Tags: search, tag search, category search, category exclusion, comment search, page search, admin, seo
|
5 |
Requires at least: 2.1
|
6 |
+
Tested up to: 2.8
|
7 |
+
Stable tag: 6
|
8 |
|
9 |
Increases Wordpress' default search functionality through an options panel. Options include searching pages, excerpts, attachments, drafts, comments and custom fields (metadata).
|
10 |
|
25 |
* Exclude Posts from search
|
26 |
* Exclude Categories from search
|
27 |
|
|
|
|
|
|
|
28 |
== Update Log ==
|
29 |
|
30 |
+
*6 - New Options Panel!!, Multi-Word fix! #44, Exclude Bug Fix, Admin search fix.
|
31 |
*5 - Bug Release, Extend Author Search to comments (props to Joshua Bettigole), Tag Fix, Meta Fix
|
32 |
*4.7.7 - New conditions to fix plugin from breaking with certain option selections. props Matias Gertel
|
33 |
*4.7.6.2 - Bug fix, some people returning no results. Matching release number with WP version.
|
34 |
*4.7.5 - Post Revision Update for Wordpress 2.6 (necessary update for 2.6 users), removed future posts from results
|
35 |
*4.7.1 - Swedish, Spanish and Dutch
|
36 |
*4.7 - Wordpress 2.6 updates and more
|
37 |
+
*4.6.2 - REQUIRED UPDATE from 4.6 release. Admin panel bug fixes (proper wp_version checks, disabled draft support for 2.5 and fixed the options from not updating); Russian and Italian language support.
|
38 |
*4.6 - Admin refresh and Excerpt Fix
|
39 |
*4.5 - Japanese Language Support, Category Fix for Wordpress 2.5, Tag search fix (name) other minors
|
40 |
* 4.2.2 - Localization PO and MO updates, German Translation
|
45 |
* 4.0.1 - Bug fix~Extraneous 's' in options panel
|
46 |
* 4.0.0 - Wordpress 2.3 Support, Password protected pages option, Overhaul of Admin area
|
47 |
|
48 |
+
[SVN Browser](https://redmine.sproutventure.com/repositories/show/search-everything "Project Home and SVN Browser")
|
49 |
|
50 |
== Installation ==
|
51 |
|
54 |
1. Download the plugin and unzip it (didn't you already do this?).
|
55 |
2. Put the 'search-everything' directory into your wp-content/plugins/ directory.
|
56 |
3. Go to the Plugins page in your WordPress Administration area and click 'Activate' next to Search Everything.
|
57 |
+
4. Go to the Options > Search Everything and configure your settings.
|
58 |
+
5. That's it. Have fun and if you can contribute (see notes).
|
|
|
59 |
|
60 |
|
61 |
== Frequently Asked Questions ==
|
screenshot-1.jpg
CHANGED
Binary file
|
search-everything.php
ADDED
@@ -0,0 +1,607 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
Plugin Name: Search Everything
|
4 |
+
Plugin URI: https://redmine.sproutventure.com/projects/show/search-everything
|
5 |
+
Description: Adds search functionality without modifying template pages: Activate, Configure and Search. Options Include: search pages, excerpts, attachments, drafts, comments, tags and custom fields (metadata). Also offers the ability to exclude specific pages and posts. Does not search password-protected content.
|
6 |
+
Version: 6
|
7 |
+
Author: Dan Cameron of Sprout Venture
|
8 |
+
Author URI: http://sproutventure.com/
|
9 |
+
*/
|
10 |
+
|
11 |
+
/*
|
12 |
+
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
|
13 |
+
|
14 |
+
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
15 |
+
*/
|
16 |
+
|
17 |
+
if ( !defined('WP_CONTENT_DIR') )
|
18 |
+
define( 'WP_CONTENT_DIR', ABSPATH . 'wp-content' );
|
19 |
+
define('SE_ABSPATH', WP_CONTENT_DIR.'/plugins/' . dirname(plugin_basename(__FILE__)) . '/');
|
20 |
+
|
21 |
+
$SE = new SearchEverything();
|
22 |
+
//add filters based upon option settings
|
23 |
+
|
24 |
+
Class SearchEverything {
|
25 |
+
|
26 |
+
var $login = false;
|
27 |
+
var $options;
|
28 |
+
var $wp_ver23;
|
29 |
+
var $wp_ver25;
|
30 |
+
|
31 |
+
function SearchEverything(){
|
32 |
+
global $wp_version;
|
33 |
+
$this->wp_ver23 = ($wp_version >= '2.3');
|
34 |
+
$this->wp_ver25 = ($wp_version >= '2.5');
|
35 |
+
$this->options = get_option('se_options');
|
36 |
+
|
37 |
+
if (is_admin()) {
|
38 |
+
include ( SE_ABSPATH . 'views/options.php' );
|
39 |
+
$SEAdmin = new se_admin();
|
40 |
+
}
|
41 |
+
//add filters based upon option settings
|
42 |
+
if ("Yes" == $this->options['se_use_tag_search'])
|
43 |
+
{
|
44 |
+
add_filter('posts_join', array(&$this, 'se_terms_join'));
|
45 |
+
$this->se_log("searching tags");
|
46 |
+
}
|
47 |
+
|
48 |
+
if ("Yes" == $this->options['se_use_category_search'])
|
49 |
+
{
|
50 |
+
add_filter('posts_join', array(&$this, 'se_terms_join'));
|
51 |
+
$this->se_log("searching categories");
|
52 |
+
}
|
53 |
+
|
54 |
+
if ("Yes" == $this->options['se_use_page_search'])
|
55 |
+
{
|
56 |
+
add_filter('posts_where', array(&$this, 'se_search_pages'));
|
57 |
+
$this->se_log("searching pages");
|
58 |
+
}
|
59 |
+
|
60 |
+
if ("Yes" == $this->options['se_use_excerpt_search'])
|
61 |
+
{
|
62 |
+
$this->se_log("searching excerpts");
|
63 |
+
}
|
64 |
+
|
65 |
+
if ("Yes" == $this->options['se_use_comment_search'])
|
66 |
+
{
|
67 |
+
add_filter('posts_where', array(&$this, 'se_search_comments'));
|
68 |
+
add_filter('posts_join', array(&$this, 'se_comments_join'));
|
69 |
+
$this->se_log("searching comments");
|
70 |
+
}
|
71 |
+
|
72 |
+
if ("Yes" == $this->options['se_use_draft_search'])
|
73 |
+
{
|
74 |
+
add_filter('posts_where', array(&$this, 'se_search_draft_posts'));
|
75 |
+
$this->se_log("searching drafts");
|
76 |
+
}
|
77 |
+
|
78 |
+
if ("Yes" == $this->options['se_use_attachment_search'])
|
79 |
+
{
|
80 |
+
add_filter('posts_where', array(&$this, 'se_search_attachments'));
|
81 |
+
$this->se_log("searching attachments");
|
82 |
+
}
|
83 |
+
|
84 |
+
if ("Yes" == $this->options['se_use_metadata_search'])
|
85 |
+
{
|
86 |
+
add_filter('posts_join', array(&$this, 'se_search_metadata_join'));
|
87 |
+
$this->se_log("searching metadata");
|
88 |
+
}
|
89 |
+
|
90 |
+
if ($this->options['se_exclude_posts_list'] != '')
|
91 |
+
{
|
92 |
+
add_filter('posts_where', array(&$this, 'se_exclude_posts'));
|
93 |
+
$this->se_log("searching excluding posts");
|
94 |
+
}
|
95 |
+
|
96 |
+
if ($this->options['se_exclude_categories_list'] != '')
|
97 |
+
{
|
98 |
+
add_filter('posts_where', array(&$this, 'se_exclude_categories'));
|
99 |
+
add_filter('posts_join', array(&$this, 'se_exclude_categories_join'));
|
100 |
+
$this->se_log("searching excluding categories");
|
101 |
+
}
|
102 |
+
|
103 |
+
if ("Yes" == $this->options['se_use_authors'])
|
104 |
+
{
|
105 |
+
add_filter('posts_where', array(&$this, 'se_search_authors'));
|
106 |
+
add_filter('posts_join', array(&$this, 'se_search_authors_join'));
|
107 |
+
$this->se_log("searching authors");
|
108 |
+
}
|
109 |
+
|
110 |
+
add_filter('posts_where', array(&$this, 'se_search_where'));
|
111 |
+
|
112 |
+
add_filter('posts_where', array(&$this, 'se_no_revisions'));
|
113 |
+
|
114 |
+
add_filter('posts_request', array(&$this, 'se_distinct'));
|
115 |
+
}
|
116 |
+
|
117 |
+
|
118 |
+
// creates the list of search keywords from the 's' parameters.
|
119 |
+
function se_get_search_terms()
|
120 |
+
{
|
121 |
+
global $wp_query;
|
122 |
+
$s = $wp_query->query_vars['s'];
|
123 |
+
$sentence = $wp_query->query_vars['sentence'];
|
124 |
+
$search_terms = array();
|
125 |
+
|
126 |
+
if ( !empty($s) )
|
127 |
+
{
|
128 |
+
// added slashes screw with quote grouping when done early, so done later
|
129 |
+
$s = stripslashes($s);
|
130 |
+
if ($sentence)
|
131 |
+
{
|
132 |
+
$search_terms = array($s);
|
133 |
+
}
|
134 |
+
else
|
135 |
+
{
|
136 |
+
preg_match_all('/".*?("|$)|((?<=[\\s",+])|^)[^\\s",+]+/', $s, $matches);
|
137 |
+
$search_terms = array_map(create_function('$a', 'return trim($a, "\\"\'\\n\\r ");'), $matches[0]);
|
138 |
+
}
|
139 |
+
}
|
140 |
+
|
141 |
+
return $search_terms;
|
142 |
+
}
|
143 |
+
|
144 |
+
// add where clause to the search query
|
145 |
+
function se_search_where($where)
|
146 |
+
{
|
147 |
+
global $wp_query, $wpdb;
|
148 |
+
$searchQuery = '';
|
149 |
+
|
150 |
+
//add filters based upon option settings
|
151 |
+
if ("Yes" == $this->options['se_use_tag_search'])
|
152 |
+
{
|
153 |
+
$searchQuery .= $this->se_build_search_tag();
|
154 |
+
}
|
155 |
+
if ("Yes" == $this->options['se_use_category_search'])
|
156 |
+
{
|
157 |
+
$searchQuery .= $this->se_build_search_categories();
|
158 |
+
}
|
159 |
+
if ("Yes" == $this->options['se_use_metadata_search'])
|
160 |
+
{
|
161 |
+
$searchQuery .= $this->se_build_search_metadata();
|
162 |
+
}
|
163 |
+
if ("Yes" == $this->options['se_use_excerpt_search'])
|
164 |
+
{
|
165 |
+
$searchQuery .= $this->se_build_search_excerpt();
|
166 |
+
}
|
167 |
+
if ($searchQuery != '')
|
168 |
+
{
|
169 |
+
$index1 = strpos($where, '((');
|
170 |
+
$index2 = strrpos($where, ')) ');
|
171 |
+
$firstPart = substr($where, 0, $index1);
|
172 |
+
$secondPart = substr($where, $index1, $index2-1);
|
173 |
+
$lastPart = substr($where, $index2-1+3);
|
174 |
+
$where = $firstPart."(".$secondPart.$searchQuery.")".$lastPart;
|
175 |
+
|
176 |
+
}
|
177 |
+
$this->se_log("metadata where: ".$where);
|
178 |
+
return $where;
|
179 |
+
}
|
180 |
+
|
181 |
+
// Exclude post revisions
|
182 |
+
function se_no_revisions($where)
|
183 |
+
{
|
184 |
+
global $wp_query;
|
185 |
+
if (!empty($wp_query->query_vars['s']))
|
186 |
+
{
|
187 |
+
$where = 'AND (' . substr($where, strpos($where, 'AND')+3) . ') AND post_type != \'revision\'';
|
188 |
+
}
|
189 |
+
return $where;
|
190 |
+
}
|
191 |
+
|
192 |
+
// Logs search into a file
|
193 |
+
function se_log($msg)
|
194 |
+
{
|
195 |
+
|
196 |
+
if ($this->logging)
|
197 |
+
{
|
198 |
+
$fp = fopen("logfile.log","a+");
|
199 |
+
if ( !$fp )
|
200 |
+
{
|
201 |
+
echo 'unable to write to log file!';
|
202 |
+
}
|
203 |
+
$date = date("Y-m-d H:i:s ");
|
204 |
+
$source = "search_everything plugin: ";
|
205 |
+
fwrite($fp, "\n\n".$date."\n".$source."\n".$msg);
|
206 |
+
fclose($fp);
|
207 |
+
}
|
208 |
+
return true;
|
209 |
+
}
|
210 |
+
|
211 |
+
//Duplicate fix provided by Tiago.Pocinho
|
212 |
+
function se_distinct($query)
|
213 |
+
{
|
214 |
+
global $wp_query;
|
215 |
+
if (!empty($wp_query->query_vars['s']))
|
216 |
+
{
|
217 |
+
if (strstr($where, 'DISTINCT'))
|
218 |
+
{}
|
219 |
+
else
|
220 |
+
{
|
221 |
+
$query = str_replace('SELECT', 'SELECT DISTINCT', $query);
|
222 |
+
}
|
223 |
+
}
|
224 |
+
return $query;
|
225 |
+
}
|
226 |
+
|
227 |
+
|
228 |
+
function se_exclude_posts($where)
|
229 |
+
{
|
230 |
+
global $wp_query;
|
231 |
+
if (!empty($wp_query->query_vars['s']))
|
232 |
+
{
|
233 |
+
if (trim($this->options['se_exclude_posts_list']) != '')
|
234 |
+
{
|
235 |
+
$excl_list = implode(',', explode(',',
|
236 |
+
trim($this->options['se_exclude_posts_list'])));
|
237 |
+
$where = str_replace('"', '\'', $where);
|
238 |
+
$where = 'AND ('.substr($where, strpos($where, 'AND')+3).' )';
|
239 |
+
$where .= ' AND (wp_posts.ID NOT IN ( '.$excl_list.' ))';
|
240 |
+
}
|
241 |
+
}
|
242 |
+
$this->se_log("ex posts where: ".$where);
|
243 |
+
return $where;
|
244 |
+
}
|
245 |
+
|
246 |
+
|
247 |
+
//search pages (except password protected pages provided by loops)
|
248 |
+
function se_search_pages($where)
|
249 |
+
{
|
250 |
+
global $wp_query;
|
251 |
+
if (!empty($wp_query->query_vars['s']))
|
252 |
+
{
|
253 |
+
|
254 |
+
$where = str_replace('"', '\'', $where);
|
255 |
+
if ('true' == $this->options['se_approved_pages_only'])
|
256 |
+
{
|
257 |
+
$where = str_replace('post_type = \'post\' AND ', 'post_password = \'\' AND ', $where);
|
258 |
+
} else { // < v 2.1
|
259 |
+
$where = str_replace('post_type = \'post\' AND ', '', $where);
|
260 |
+
}
|
261 |
+
}
|
262 |
+
$this->se_log("pages where: ".$where);
|
263 |
+
return $where;
|
264 |
+
}
|
265 |
+
|
266 |
+
// create the search excerpts query
|
267 |
+
function se_build_search_excerpt()
|
268 |
+
{
|
269 |
+
global $wp_query, $wpdb;
|
270 |
+
$s = $wp_query->query_vars['s'];
|
271 |
+
$search_terms = $this->se_get_search_terms();
|
272 |
+
$exact = $wp_query->query_vars['exact'];
|
273 |
+
$search = '';
|
274 |
+
|
275 |
+
if ( !empty($search_terms) ) {
|
276 |
+
// Building search query
|
277 |
+
$n = ($exact) ? '' : '%';
|
278 |
+
$searchand = '';
|
279 |
+
foreach($search_terms as $term) {
|
280 |
+
$term = addslashes_gpc($term);
|
281 |
+
$search .= "{$searchand}($wpdb->posts.post_excerpt LIKE '{$n}{$term}{$n}')";
|
282 |
+
$searchand = ' AND ';
|
283 |
+
}
|
284 |
+
$term = $wpdb->escape($s);
|
285 |
+
if (!$sentence && count($search_terms) > 1 && $search_terms[0] != $s )
|
286 |
+
{
|
287 |
+
$search = "($search) OR ($wpdb->posts.post_excerpt LIKE '{$n}{$s}{$n}')";
|
288 |
+
}
|
289 |
+
if ( !empty($search) )
|
290 |
+
$search = " OR ({$search}) ";
|
291 |
+
}
|
292 |
+
$this->se_log("excerpt where: ".$where);
|
293 |
+
return $search;
|
294 |
+
}
|
295 |
+
|
296 |
+
|
297 |
+
//search drafts
|
298 |
+
function se_search_draft_posts($where)
|
299 |
+
{
|
300 |
+
global $wp_query;
|
301 |
+
if (!empty($wp_query->query_vars['s']))
|
302 |
+
{
|
303 |
+
$where = str_replace('"', '\'', $where);
|
304 |
+
$where = str_replace(' AND (post_status = \'publish\'', ' AND (post_status = \'publish\' or post_status = \'draft\'', $where);
|
305 |
+
}
|
306 |
+
$this->se_log("drafts where: ".$where);
|
307 |
+
return $where;
|
308 |
+
}
|
309 |
+
|
310 |
+
//search attachments
|
311 |
+
function se_search_attachments($where)
|
312 |
+
{
|
313 |
+
global $wp_query;
|
314 |
+
if (!empty($wp_query->query_vars['s']))
|
315 |
+
{
|
316 |
+
$where = str_replace('"', '\'', $where);
|
317 |
+
$where = str_replace(' AND (post_status = \'publish\'', ' AND (post_status = \'publish\' or post_status = \'attachment\'', $where);
|
318 |
+
$where = str_replace('AND post_status != \'attachment\'','',$where);
|
319 |
+
}
|
320 |
+
$this->se_log("attachments where: ".$where);
|
321 |
+
return $where;
|
322 |
+
}
|
323 |
+
|
324 |
+
//search comments
|
325 |
+
function se_search_comments($where)
|
326 |
+
{
|
327 |
+
global $wp_query, $wpdb;
|
328 |
+
if (!empty($wp_query->query_vars['s']))
|
329 |
+
{
|
330 |
+
if ('true' == $this->options['se_approved_comments_only'])
|
331 |
+
{
|
332 |
+
$comment_approved = " AND c.comment_approved = '1'";
|
333 |
+
} else {
|
334 |
+
$comment_approved = '';
|
335 |
+
}
|
336 |
+
|
337 |
+
if($this->options['se_use_authors'] == 'true')
|
338 |
+
{
|
339 |
+
$comment_author = " OR c.comment_author LIKE '%" . $wpdb->escape($wp_query->query_vars['s']) . "%' ";
|
340 |
+
}
|
341 |
+
|
342 |
+
if ($this->wp_ver23) {
|
343 |
+
$where .= " OR ( c.comment_post_ID = ".$wpdb->posts . ".ID " . $comment_approved . " AND c.comment_content LIKE '%" . $wpdb->escape($wp_query->query_vars['s']) . "%') ";
|
344 |
+
|
345 |
+
|
346 |
+
}
|
347 |
+
}
|
348 |
+
$this->se_log("comments where: ".$where);
|
349 |
+
return $where;
|
350 |
+
|
351 |
+
}
|
352 |
+
|
353 |
+
// create the search meta data query
|
354 |
+
function se_build_search_metadata()
|
355 |
+
{
|
356 |
+
global $wp_query, $wpdb;
|
357 |
+
$s = $wp_query->query_vars['s'];
|
358 |
+
$search_terms = $this->se_get_search_terms();
|
359 |
+
$exact = $wp_query->query_vars['exact'];
|
360 |
+
$search = '';
|
361 |
+
|
362 |
+
if ( !empty($search_terms) ) {
|
363 |
+
// Building search query
|
364 |
+
$n = ($exact) ? '' : '%';
|
365 |
+
$searchand = '';
|
366 |
+
foreach($search_terms as $term) {
|
367 |
+
$term = addslashes_gpc($term);
|
368 |
+
if ($this->wp_ver23)
|
369 |
+
{
|
370 |
+
$search .= "{$searchand}(m.meta_value LIKE '{$n}{$term}{$n}')";
|
371 |
+
} else {
|
372 |
+
$search .= "{$searchand}(meta_value LIKE '{$n}{$term}{$n}')";
|
373 |
+
}
|
374 |
+
$searchand = ' AND ';
|
375 |
+
}
|
376 |
+
$term = $wpdb->escape($s);
|
377 |
+
if (!$sentence && count($search_terms) > 1 && $search_terms[0] != $s )
|
378 |
+
{
|
379 |
+
if ($this->wp_ver23)
|
380 |
+
{
|
381 |
+
$search = "($search) OR (m.meta_value LIKE '{$n}{$s}{$n}')";
|
382 |
+
} else {
|
383 |
+
$search = "($search) OR (meta_value LIKE '{$n}{$s}{$n}')";
|
384 |
+
}
|
385 |
+
}
|
386 |
+
|
387 |
+
if ( !empty($search) )
|
388 |
+
$search = " OR ({$search}) ";
|
389 |
+
|
390 |
+
}
|
391 |
+
$this->se_log("meta where: ".$where);
|
392 |
+
return $search;
|
393 |
+
}
|
394 |
+
|
395 |
+
// create the search tag query
|
396 |
+
function se_build_search_tag()
|
397 |
+
{
|
398 |
+
global $wp_query, $wpdb;
|
399 |
+
$s = $wp_query->query_vars['s'];
|
400 |
+
$search_terms = $this->se_get_search_terms();
|
401 |
+
$exact = $wp_query->query_vars['exact'];
|
402 |
+
$search = '';
|
403 |
+
|
404 |
+
if ( !empty($search_terms) )
|
405 |
+
{
|
406 |
+
// Building search query
|
407 |
+
$n = ($exact) ? '' : '%';
|
408 |
+
$searchand = '';
|
409 |
+
foreach($search_terms as $term)
|
410 |
+
{
|
411 |
+
$term = addslashes_gpc($term);
|
412 |
+
if ($this->wp_ver23)
|
413 |
+
{
|
414 |
+
$search .= "{$searchand}(tter.name LIKE '{$n}{$term}{$n}')";
|
415 |
+
}
|
416 |
+
$searchand = ' AND ';
|
417 |
+
}
|
418 |
+
$term = $wpdb->escape($s);
|
419 |
+
if (!$sentence && count($search_terms) > 1 && $search_terms[0] != $s )
|
420 |
+
{
|
421 |
+
if ($this->wp_ver23)
|
422 |
+
{
|
423 |
+
$search = "($search) OR (tter.name LIKE '{$n}{$s}{$n}')";
|
424 |
+
}
|
425 |
+
}
|
426 |
+
if ( !empty($search) )
|
427 |
+
$search = " OR ({$search}) ";
|
428 |
+
}
|
429 |
+
$this->se_log("tag where: ".$where);
|
430 |
+
return $search;
|
431 |
+
}
|
432 |
+
|
433 |
+
// create the search categories query
|
434 |
+
function se_build_search_categories()
|
435 |
+
{
|
436 |
+
global $wp_query, $wpdb;
|
437 |
+
$s = $wp_query->query_vars['s'];
|
438 |
+
$search_terms = $this->se_get_search_terms();
|
439 |
+
$exact = $wp_query->query_vars['exact'];
|
440 |
+
$search = '';
|
441 |
+
|
442 |
+
if ( !empty($search_terms) )
|
443 |
+
{
|
444 |
+
// Building search query
|
445 |
+
$n = ($exact) ? '' : '%';
|
446 |
+
$searchand = '';
|
447 |
+
foreach($search_terms as $term)
|
448 |
+
{
|
449 |
+
$term = addslashes_gpc($term);
|
450 |
+
$search .= "{$searchand}(tter.slug LIKE '{$n}".sanitize_title_with_dashes($term)."{$n}')";
|
451 |
+
$searchand = ' AND ';
|
452 |
+
}
|
453 |
+
$term = $wpdb->escape($s);
|
454 |
+
if (!$sentence && count($search_terms) > 1 && $search_terms[0] != $s )
|
455 |
+
{
|
456 |
+
$search = "($search) OR (tter.slug LIKE '{$n}".sanitize_title_with_dashes($s)."{$n}')";
|
457 |
+
}
|
458 |
+
if ( !empty($search) )
|
459 |
+
$search = " OR ({$search}) ";
|
460 |
+
}
|
461 |
+
$this->se_log("categories where: ".$where);
|
462 |
+
return $search;
|
463 |
+
}
|
464 |
+
|
465 |
+
//exlude some categories from search
|
466 |
+
function se_exclude_categories($where)
|
467 |
+
{
|
468 |
+
global $wp_query, $wpdb;
|
469 |
+
if (!empty($wp_query->query_vars['s']))
|
470 |
+
{
|
471 |
+
if (trim($this->options['se_exclude_categories_list']) != '')
|
472 |
+
{
|
473 |
+
$excl_list = implode("','", explode(',', "'".trim($this->options['se_exclude_categories_list'])."'" ));
|
474 |
+
$where = str_replace('"', '\'', $where);
|
475 |
+
$where = 'AND ('.substr($where, strpos($where, 'AND')+3).' )';
|
476 |
+
if ($this->wp_ver23)
|
477 |
+
$where .= " AND ( ctax.term_id NOT IN ( ".$excl_list." ))";
|
478 |
+
else
|
479 |
+
$where .= ' AND (c.category_id NOT IN ( '.$excl_list.' ))';
|
480 |
+
}
|
481 |
+
}
|
482 |
+
$this->se_log("ex cats where: ".$where);
|
483 |
+
return $where;
|
484 |
+
}
|
485 |
+
|
486 |
+
//join for excluding categories - Deprecated in 2.3
|
487 |
+
function se_exclude_categories_join($join)
|
488 |
+
{
|
489 |
+
global $wp_query, $wpdb;
|
490 |
+
|
491 |
+
if (!empty($wp_query->query_vars['s']))
|
492 |
+
{
|
493 |
+
|
494 |
+
if ($this->wp_ver23)
|
495 |
+
{
|
496 |
+
$join .= " LEFT JOIN $wpdb->term_relationships AS crel ON ($wpdb->posts.ID = crel.object_id) LEFT JOIN $wpdb->term_taxonomy AS ctax ON (ctax.taxonomy = 'category' AND crel.term_taxonomy_id = ctax.term_taxonomy_id) LEFT JOIN $wpdb->terms AS cter ON (ctax.term_id = cter.term_id) ";
|
497 |
+
} else {
|
498 |
+
$join .= "LEFT JOIN $wpdb->post2cat AS c ON $wpdb->posts.ID = c.post_id";
|
499 |
+
}
|
500 |
+
}
|
501 |
+
$this->se_log("category join: ".$join);
|
502 |
+
return $join;
|
503 |
+
}
|
504 |
+
|
505 |
+
//join for searching comments
|
506 |
+
function se_comments_join($join)
|
507 |
+
{
|
508 |
+
global $wp_query, $wpdb;
|
509 |
+
|
510 |
+
if (!empty($wp_query->query_vars['s']))
|
511 |
+
{
|
512 |
+
if ($this->wp_ver23)
|
513 |
+
{
|
514 |
+
$join .= " LEFT JOIN $wpdb->comments AS c ON ( comment_post_ID = ID " . $comment_approved . ") ";
|
515 |
+
|
516 |
+
} else {
|
517 |
+
|
518 |
+
if ('true' == $this->options['se_approved_comments_only'])
|
519 |
+
{
|
520 |
+
$comment_approved = " AND comment_approved = '1'";
|
521 |
+
} else {
|
522 |
+
$comment_approved = '';
|
523 |
+
}
|
524 |
+
$join .= "LEFT JOIN $wpdb->comments ON ( comment_post_ID = ID " . $comment_approved . ") ";
|
525 |
+
}
|
526 |
+
|
527 |
+
}
|
528 |
+
$this->se_log("comments join: ".$join);
|
529 |
+
return $join;
|
530 |
+
}
|
531 |
+
|
532 |
+
//join for searching authors
|
533 |
+
function se_search_authors($where)
|
534 |
+
{
|
535 |
+
global $wp_query, $wpdb;
|
536 |
+
|
537 |
+
if (!empty($wp_query->query_vars['s']))
|
538 |
+
{
|
539 |
+
$or = " OR (u.user_nicename LIKE '%" . $wpdb->escape($wp_query->query_vars['s']) . "%') ";
|
540 |
+
}
|
541 |
+
$where = preg_replace("/\bor\b/i",$or." OR",$where,1);
|
542 |
+
$this->se_log("user where: ".$where);
|
543 |
+
return $where;
|
544 |
+
}
|
545 |
+
|
546 |
+
|
547 |
+
function se_search_authors_join($join)
|
548 |
+
{
|
549 |
+
global $wp_query, $wpdb;
|
550 |
+
|
551 |
+
if (!empty($wp_query->query_vars['s']))
|
552 |
+
{
|
553 |
+
$join .= " LEFT JOIN $wpdb->users AS u ON ($wpdb->posts.post_author = u.ID) ";
|
554 |
+
}
|
555 |
+
$this->se_log("authors join: ".$join);
|
556 |
+
return $join;
|
557 |
+
}
|
558 |
+
|
559 |
+
//join for searching metadata
|
560 |
+
function se_search_metadata_join($join)
|
561 |
+
{
|
562 |
+
global $wp_query, $wpdb;
|
563 |
+
|
564 |
+
if (!empty($wp_query->query_vars['s']))
|
565 |
+
{
|
566 |
+
|
567 |
+
if ($this->wp_ver23)
|
568 |
+
$join .= " LEFT JOIN $wpdb->postmeta AS m ON ($wpdb->posts.ID = m.post_id) ";
|
569 |
+
else
|
570 |
+
$join .= " LEFT JOIN $wpdb->postmeta ON $wpdb->posts.ID = $wpdb->postmeta.post_id ";
|
571 |
+
}
|
572 |
+
$this->se_log("metadata join: ".$join);
|
573 |
+
return $join;
|
574 |
+
}
|
575 |
+
|
576 |
+
//join for searching tags
|
577 |
+
function se_terms_join($join)
|
578 |
+
{
|
579 |
+
global $wp_query, $wpdb;
|
580 |
+
|
581 |
+
if (!empty($wp_query->query_vars['s']))
|
582 |
+
{
|
583 |
+
|
584 |
+
// if we're searching for categories
|
585 |
+
if ( $this->options['se_use_category_search'] )
|
586 |
+
{
|
587 |
+
$on[] = "ttax.taxonomy = 'category'";
|
588 |
+
}
|
589 |
+
|
590 |
+
// if we're searching for tags
|
591 |
+
if ( $this->options['se_use_tag_search'] )
|
592 |
+
{
|
593 |
+
$on[] = "ttax.taxonomy = 'post_tag'";
|
594 |
+
}
|
595 |
+
|
596 |
+
// build our final string
|
597 |
+
$on = ' ( ' . implode( ' OR ', $on ) . ' ) ';
|
598 |
+
|
599 |
+
$join .= " LEFT JOIN $wpdb->term_relationships AS trel ON ($wpdb->posts.ID = trel.object_id) LEFT JOIN $wpdb->term_taxonomy AS ttax ON ( " . $on . " AND trel.term_taxonomy_id = ttax.term_taxonomy_id) LEFT JOIN $wpdb->terms AS tter ON (ttax.term_id = tter.term_id) ";
|
600 |
+
}
|
601 |
+
$this->se_log("tags join: ".$join);
|
602 |
+
return $join;
|
603 |
+
}
|
604 |
+
|
605 |
+
} // END
|
606 |
+
|
607 |
+
?>
|
search_everything.php
DELETED
@@ -1,414 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/*
|
3 |
-
Plugin Name: Search Everything
|
4 |
-
Plugin URI: http://dancameron.org/wordpress/
|
5 |
-
Description: Adds search functionality with little setup. Including options to search pages, excerpts, attachments, drafts, comments, tags and custom fields (metadata). Also offers the ability to exclude specific pages and posts. Does not search password-protected content.
|
6 |
-
Version: 5
|
7 |
-
Author: Dan Cameron
|
8 |
-
Author URI: http://dancameron.org/
|
9 |
-
*/
|
10 |
-
|
11 |
-
/*
|
12 |
-
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
|
13 |
-
|
14 |
-
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
15 |
-
*/
|
16 |
-
|
17 |
-
if ( !defined('WP_CONTENT_DIR') )
|
18 |
-
define( 'WP_CONTENT_DIR', ABSPATH . 'wp-content' );
|
19 |
-
define('SE_ABSPATH', WP_CONTENT_DIR.'/plugins/' . dirname(plugin_basename(__FILE__)) . '/');
|
20 |
-
|
21 |
-
$SE = new SearchEverything();
|
22 |
-
//add filters based upon option settings
|
23 |
-
|
24 |
-
Class SearchEverything {
|
25 |
-
|
26 |
-
var $login = false;
|
27 |
-
var $options;
|
28 |
-
var $wp_ver23;
|
29 |
-
var $wp_ver25;
|
30 |
-
|
31 |
-
function SearchEverything(){
|
32 |
-
global $wp_version;
|
33 |
-
$this->wp_ver23 = ($wp_version >= '2.3');
|
34 |
-
$this->wp_ver25 = ($wp_version >= '2.5');
|
35 |
-
$this->options = get_option('SE5_options');
|
36 |
-
|
37 |
-
if (is_admin()) {
|
38 |
-
include ( SE_ABSPATH . 'SE-Admin.php' );
|
39 |
-
$SEAdmin = new SearchEverythingAdmin();
|
40 |
-
}
|
41 |
-
//add filters based upon option settings
|
42 |
-
if ("true" == $this->options['SE5_use_tag_search']) {
|
43 |
-
add_filter('posts_where', array(&$this, 'SE5_search_tags'));
|
44 |
-
add_filter('posts_join', array(&$this, 'SE5_terms_join'));
|
45 |
-
$this->SE5_log("searching tags");
|
46 |
-
}
|
47 |
-
|
48 |
-
if ("true" == $this->options['SE5_use_category_search']) {
|
49 |
-
add_filter('posts_where', array(&$this, 'SE5_search_categories'));
|
50 |
-
add_filter('posts_join', array(&$this, 'SE5_terms_join'));
|
51 |
-
$this->SE5_log("searching categories");
|
52 |
-
}
|
53 |
-
|
54 |
-
if ("true" == $this->options['SE5_use_page_search']) {
|
55 |
-
add_filter('posts_where', array(&$this, 'SE5_search_pages'));
|
56 |
-
$this->SE5_log("searching pages");
|
57 |
-
}
|
58 |
-
|
59 |
-
if ("true" == $this->options['SE5_use_excerpt_search']) {
|
60 |
-
add_filter('posts_where', array(&$this, 'SE5_search_excerpt'));
|
61 |
-
$this->SE5_log("searching excerpts");
|
62 |
-
}
|
63 |
-
|
64 |
-
if ("true" == $this->options['SE5_use_comment_search']) {
|
65 |
-
add_filter('posts_where', array(&$this, 'SE5_search_comments'));
|
66 |
-
add_filter('posts_join', array(&$this, 'SE5_comments_join'));
|
67 |
-
$this->SE5_log("searching comments");
|
68 |
-
}
|
69 |
-
|
70 |
-
if ("true" == $this->options['SE5_use_draft_search']) {
|
71 |
-
add_filter('posts_where', array(&$this, 'SE5_search_draft_posts'));
|
72 |
-
$this->SE5_log("searching drafts");
|
73 |
-
}
|
74 |
-
|
75 |
-
if ("true" == $this->options['SE5_use_attachment_search']) {
|
76 |
-
add_filter('posts_where', array(&$this, 'SE5_search_attachments'));
|
77 |
-
$this->SE5_log("searching attachments");
|
78 |
-
}
|
79 |
-
|
80 |
-
if ("true" == $this->options['SE5_use_metadata_search']) {
|
81 |
-
add_filter('posts_where', array(&$this, 'SE5_search_metadata'));
|
82 |
-
add_filter('posts_join', array(&$this, 'SE5_search_metadata_join'));
|
83 |
-
$this->SE5_log("searching metadata");
|
84 |
-
}
|
85 |
-
|
86 |
-
if ("true" == $this->options['SE5_exclude_posts']) {
|
87 |
-
add_filter('posts_where', array(&$this, 'SE5_exclude_posts'));
|
88 |
-
$this->SE5_log("searching excluding posts");
|
89 |
-
}
|
90 |
-
|
91 |
-
if ("true" == $this->options['SE5_exclude_categories']) {
|
92 |
-
add_filter('posts_where', array(&$this, 'SE5_exclude_categories'));
|
93 |
-
add_filter('posts_join', array(&$this, 'SE5_exclude_categories_join'));
|
94 |
-
$this->SE5_log("searching excluding categories");
|
95 |
-
}
|
96 |
-
|
97 |
-
if ("true" == $this->options['SE5_use_authors']) {
|
98 |
-
add_filter('posts_where', array(&$this, 'SE5_search_authors'));
|
99 |
-
add_filter('posts_join', array(&$this, 'SE5_search_authors_join'));
|
100 |
-
$this->SE5_log("searching authors");
|
101 |
-
}
|
102 |
-
|
103 |
-
// Add registration of bo_revisions hook handler
|
104 |
-
// right before the following line already existant
|
105 |
-
add_filter('posts_where', array(&$this, 'SE5_no_revisions'));
|
106 |
-
|
107 |
-
|
108 |
-
//Duplicate fix provided by Tiago.Pocinho
|
109 |
-
add_filter('posts_request', array(&$this, 'SE5_distinct'));
|
110 |
-
}
|
111 |
-
|
112 |
-
// Exclude post revisions
|
113 |
-
function SE5_no_revisions($where) {
|
114 |
-
global $wp_query;
|
115 |
-
if (!empty($wp_query->query_vars['s'])) {
|
116 |
-
$where = 'AND (' . substr($where, strpos($where, 'AND')+3) . ') AND post_type != \'revision\'';
|
117 |
-
}
|
118 |
-
return $where;
|
119 |
-
}
|
120 |
-
|
121 |
-
// Logs search into a file
|
122 |
-
function SE5_log($msg) {
|
123 |
-
|
124 |
-
if ($this->logging) {
|
125 |
-
$fp = fopen("logfile.log","a+");
|
126 |
-
if ( !$fp ) { echo 'unable to write to log file!'; }
|
127 |
-
$date = date("Y-m-d H:i:s ");
|
128 |
-
$source = "search_everything plugin: ";
|
129 |
-
fwrite($fp, "\n\n".$date."\n".$source."\n".$msg);
|
130 |
-
fclose($fp);
|
131 |
-
}
|
132 |
-
return true;
|
133 |
-
}
|
134 |
-
|
135 |
-
//Duplicate fix provided by Tiago.Pocinho
|
136 |
-
function SE5_distinct($query){
|
137 |
-
global $wp_query;
|
138 |
-
if (!empty($wp_query->query_vars['s'])) {
|
139 |
-
if (strstr($where, 'DISTINCT')) {
|
140 |
-
} else {
|
141 |
-
$query = str_replace('SELECT', 'SELECT DISTINCT', $query);
|
142 |
-
}
|
143 |
-
}
|
144 |
-
return $query;
|
145 |
-
}
|
146 |
-
|
147 |
-
function SE5_exclude_posts($where) {
|
148 |
-
global $wp_query;
|
149 |
-
if (!empty($wp_query->query_vars['s'])) {
|
150 |
-
$excl_list = implode(',', explode(',', trim($this->options['SE5_exclude_posts_list'])));
|
151 |
-
$where = str_replace('"', '\'', $where);
|
152 |
-
$where = 'AND ('.substr($where, strpos($where, 'AND')+3).' )';
|
153 |
-
$where .= ' AND (ID NOT IN ( '.$excl_list.' ))';
|
154 |
-
}
|
155 |
-
|
156 |
-
$this->SE5_log("ex posts where: ".$where);
|
157 |
-
return $where;
|
158 |
-
}
|
159 |
-
|
160 |
-
//search pages (except password protected pages provided by loops)
|
161 |
-
function SE5_search_pages($where) {
|
162 |
-
global $wp_query;
|
163 |
-
if (!empty($wp_query->query_vars['s'])) {
|
164 |
-
|
165 |
-
$where = str_replace('"', '\'', $where);
|
166 |
-
if ('true' == $this->options['SE5_approved_pages_only']) {
|
167 |
-
$where = str_replace('post_type = \'post\' AND ', 'post_password = \'\' AND ', $where);
|
168 |
-
}
|
169 |
-
else { // < v 2.1
|
170 |
-
$where = str_replace('post_type = \'post\' AND ', '', $where);
|
171 |
-
}
|
172 |
-
}
|
173 |
-
|
174 |
-
$this->SE5_log("pages where: ".$where);
|
175 |
-
return $where;
|
176 |
-
}
|
177 |
-
|
178 |
-
//search excerpts provided by Dennis Turner, fixed by GvA
|
179 |
-
function SE5_search_excerpt($where) {
|
180 |
-
global $wp_query;
|
181 |
-
if (!empty($wp_query->query_vars['s'])) {
|
182 |
-
$where = str_replace('"', '\'', $where);
|
183 |
-
$where = str_replace(' OR (wp_posts.post_content LIKE \'%' .
|
184 |
-
$wp_query->query_vars['s'] . '%\'', ' OR (wp_posts.post_content LIKE \'%' .
|
185 |
-
$wp_query->query_vars['s'] . '%\') OR (wp_posts.post_excerpt LIKE \'%' .
|
186 |
-
$wp_query->query_vars['s'] . '%\'', $where);
|
187 |
-
}
|
188 |
-
|
189 |
-
$this->SE5_log("excerpts where: ".$where);
|
190 |
-
return $where;
|
191 |
-
}
|
192 |
-
|
193 |
-
|
194 |
-
//search drafts
|
195 |
-
function SE5_search_draft_posts($where) {
|
196 |
-
global $wp_query;
|
197 |
-
if (!empty($wp_query->query_vars['s'])) {
|
198 |
-
$where = str_replace('"', '\'', $where);
|
199 |
-
$where = str_replace(' AND (post_status = \'publish\'', ' AND (post_status = \'publish\' or post_status = \'draft\'', $where);
|
200 |
-
}
|
201 |
-
|
202 |
-
$this->SE5_log("drafts where: ".$where);
|
203 |
-
return $where;
|
204 |
-
}
|
205 |
-
|
206 |
-
//search attachments
|
207 |
-
function SE5_search_attachments($where) {
|
208 |
-
global $wp_query;
|
209 |
-
if (!empty($wp_query->query_vars['s'])) {
|
210 |
-
$where = str_replace('"', '\'', $where);
|
211 |
-
$where = str_replace(' AND (post_status = \'publish\'', ' AND (post_status = \'publish\' or post_status = \'attachment\'', $where);
|
212 |
-
$where = str_replace('AND post_status != \'attachment\'','',$where);
|
213 |
-
}
|
214 |
-
|
215 |
-
$this->SE5_log("attachments where: ".$where);
|
216 |
-
return $where;
|
217 |
-
}
|
218 |
-
|
219 |
-
//search comments
|
220 |
-
function SE5_search_comments($where) {
|
221 |
-
global $wp_query, $wpdb;
|
222 |
-
if (!empty($wp_query->query_vars['s'])) {
|
223 |
-
if ('true' == $this->options['SE5_approved_comments_only']) {
|
224 |
-
$comment_approved = " AND c.comment_approved = '1'";
|
225 |
-
} else {
|
226 |
-
$comment_approved = '';
|
227 |
-
}
|
228 |
-
|
229 |
-
if($this->options['SE5_use_authors'] == 'true')
|
230 |
-
{
|
231 |
-
$comment_author = " OR c.comment_author LIKE '%" . $wpdb->escape($wp_query->query_vars['s']) . "%' ";
|
232 |
-
}
|
233 |
-
|
234 |
-
if ($this->wp_ver23) {
|
235 |
-
$where .= " OR ( c.comment_post_ID = ".$wpdb->posts . ".ID " . $comment_approved . " AND c.comment_content LIKE '%" . $wpdb->escape($wp_query->query_vars['s']) . "%') ";
|
236 |
-
|
237 |
-
|
238 |
-
}
|
239 |
-
}
|
240 |
-
$this->SE5_log("comments where: ".$where);
|
241 |
-
|
242 |
-
return $where;
|
243 |
-
}
|
244 |
-
|
245 |
-
//search metadata
|
246 |
-
function SE5_search_metadata($where) {
|
247 |
-
global $wp_query, $wpdb;
|
248 |
-
if (!empty($wp_query->query_vars['s'])) {
|
249 |
-
if ($this->wp_ver23)
|
250 |
-
$where .= " OR (m.meta_value LIKE '%" . $wpdb->escape($wp_query->query_vars['s']) . "%') ";
|
251 |
-
else
|
252 |
-
$where .= " OR meta_value LIKE '%" . $wpdb->escape($wp_query->query_vars['s']) . "%' ";
|
253 |
-
}
|
254 |
-
$this->SE5_log("metadata where: ".$where);
|
255 |
-
|
256 |
-
return $where;
|
257 |
-
}
|
258 |
-
|
259 |
-
//search tags
|
260 |
-
function SE5_search_tags($where) {
|
261 |
-
global $wp_query, $wpdb;
|
262 |
-
if (!empty($wp_query->query_vars['s'])) {
|
263 |
-
$where .= " OR ( tter.name LIKE '%" . $wpdb->escape($wp_query->query_vars['s']) . "%') ";
|
264 |
-
}
|
265 |
-
|
266 |
-
$this->SE5_log("tags where: ".$where);
|
267 |
-
|
268 |
-
return $where;
|
269 |
-
}
|
270 |
-
|
271 |
-
//search categories
|
272 |
-
function SE5_search_categories ( $where ) {
|
273 |
-
|
274 |
-
global $wp_query, $wpdb;
|
275 |
-
|
276 |
-
if ( ! empty($wp_query->query_vars['s']) ) {
|
277 |
-
$or = " OR ( tter.slug LIKE '%" . sanitize_title_with_dashes( $wp_query->query_vars['s'] ) . "%') ";
|
278 |
-
$where = preg_replace("/\bor\b/i",$or." OR",$where,1);
|
279 |
-
}
|
280 |
-
|
281 |
-
$this->SE5_log("categories where: ".$where);
|
282 |
-
|
283 |
-
return $where;
|
284 |
-
|
285 |
-
}
|
286 |
-
|
287 |
-
//exlude some categories from search
|
288 |
-
function SE5_exclude_categories($where) {
|
289 |
-
global $wp_query, $wpdb;
|
290 |
-
if (!empty($wp_query->query_vars['s'])) {
|
291 |
-
if (trim($this->options['SE5_exclude_categories_list']) != '') {
|
292 |
-
$excl_list = implode("','", explode(',', "'".trim($this->options['SE5_exclude_categories_list'])."'" ));
|
293 |
-
$where = str_replace('"', '\'', $where);
|
294 |
-
$where = 'AND ('.substr($where, strpos($where, 'AND')+3).' )';
|
295 |
-
if ($this->wp_ver23)
|
296 |
-
$where .= " AND ( ctax.term_id NOT IN ( ".$excl_list." ))";
|
297 |
-
else
|
298 |
-
$where .= ' AND (c.category_id NOT IN ( '.$excl_list.' ))';
|
299 |
-
}
|
300 |
-
}
|
301 |
-
|
302 |
-
$this->SE5_log("ex cats where: ".$where);
|
303 |
-
return $where;
|
304 |
-
}
|
305 |
-
|
306 |
-
//join for excluding categories - Deprecated in 2.3
|
307 |
-
function SE5_exclude_categories_join($join) {
|
308 |
-
global $wp_query, $wpdb;
|
309 |
-
|
310 |
-
if (!empty($wp_query->query_vars['s'])) {
|
311 |
-
|
312 |
-
if ($this->wp_ver23) {
|
313 |
-
$join .= " LEFT JOIN $wpdb->term_relationships AS crel ON ($wpdb->posts.ID = crel.object_id) LEFT JOIN $wpdb->term_taxonomy AS ctax ON (ctax.taxonomy = 'category' AND crel.term_taxonomy_id = ctax.term_taxonomy_id) LEFT JOIN $wpdb->terms AS cter ON (ctax.term_id = cter.term_id) ";
|
314 |
-
} else {
|
315 |
-
$join .= "LEFT JOIN $wpdb->post2cat AS c ON $wpdb->posts.ID = c.post_id";
|
316 |
-
}
|
317 |
-
}
|
318 |
-
$this->SE5_log("category join: ".$join);
|
319 |
-
return $join;
|
320 |
-
}
|
321 |
-
|
322 |
-
//join for searching comments
|
323 |
-
function SE5_comments_join($join) {
|
324 |
-
global $wp_query, $wpdb;
|
325 |
-
|
326 |
-
if (!empty($wp_query->query_vars['s'])) {
|
327 |
-
|
328 |
-
if ($this->wp_ver23) {
|
329 |
-
$join .= " LEFT JOIN $wpdb->comments AS c ON ( comment_post_ID = ID " . $comment_approved . ") ";
|
330 |
-
} else {
|
331 |
-
|
332 |
-
if ('true' == $this->options['SE5_approved_comments_only']) {
|
333 |
-
$comment_approved = " AND comment_approved = '1'";
|
334 |
-
} else {
|
335 |
-
$comment_approved = '';
|
336 |
-
}
|
337 |
-
|
338 |
-
$join .= "LEFT JOIN $wpdb->comments ON ( comment_post_ID = ID " . $comment_approved . ") ";
|
339 |
-
|
340 |
-
}
|
341 |
-
}
|
342 |
-
|
343 |
-
$this->SE5_log("comments join: ".$join);
|
344 |
-
return $join;
|
345 |
-
}
|
346 |
-
|
347 |
-
//join for searching authors
|
348 |
-
function SE5_search_authors($where) {
|
349 |
-
global $wp_query, $wpdb;
|
350 |
-
|
351 |
-
if (!empty($wp_query->query_vars['s'])) {
|
352 |
-
$or = " OR (u.user_nicename LIKE '%" . $wpdb->escape($wp_query->query_vars['s']) . "%') ";
|
353 |
-
|
354 |
-
}
|
355 |
-
$where = preg_replace("/\bor\b/i",$or." OR",$where,1);
|
356 |
-
$this->SE5_log("user where: ".$where);
|
357 |
-
|
358 |
-
return $where;
|
359 |
-
}
|
360 |
-
|
361 |
-
|
362 |
-
function SE5_search_authors_join($join) {
|
363 |
-
global $wp_query, $wpdb;
|
364 |
-
|
365 |
-
if (!empty($wp_query->query_vars['s'])) {
|
366 |
-
$join .= " LEFT JOIN $wpdb->users AS u ON ($wpdb->posts.post_author = u.ID) ";
|
367 |
-
|
368 |
-
}
|
369 |
-
$this->SE5_log("authors join: ".$join);
|
370 |
-
return $join;
|
371 |
-
}
|
372 |
-
//join for searching metadata
|
373 |
-
function SE5_search_metadata_join($join) {
|
374 |
-
global $wp_query, $wpdb;
|
375 |
-
|
376 |
-
if (!empty($wp_query->query_vars['s'])) {
|
377 |
-
|
378 |
-
if ($this->wp_ver23)
|
379 |
-
$join .= " LEFT JOIN $wpdb->postmeta AS m ON ($wpdb->posts.ID = m.post_id) ";
|
380 |
-
else
|
381 |
-
$join .= " LEFT JOIN $wpdb->postmeta ON $wpdb->posts.ID = $wpdb->postmeta.post_id ";
|
382 |
-
}
|
383 |
-
$this->SE5_log("metadata join: ".$join);
|
384 |
-
return $join;
|
385 |
-
}
|
386 |
-
|
387 |
-
//join for searching tags
|
388 |
-
function SE5_terms_join($join) {
|
389 |
-
global $wp_query, $wpdb;
|
390 |
-
|
391 |
-
if (!empty($wp_query->query_vars['s'])) {
|
392 |
-
|
393 |
-
// if we're searching for categories
|
394 |
-
if ( $this->options['SE5_use_category_search'] ) {
|
395 |
-
$on[] = "ttax.taxonomy = 'category'";
|
396 |
-
}
|
397 |
-
|
398 |
-
// if we're searching for tags
|
399 |
-
if ( $this->options['SE5_use_tag_search'] ) {
|
400 |
-
$on[] = "ttax.taxonomy = 'post_tag'";
|
401 |
-
}
|
402 |
-
|
403 |
-
// build our final string
|
404 |
-
$on = ' ( ' . implode( ' OR ', $on ) . ' ) ';
|
405 |
-
|
406 |
-
$join .= " LEFT JOIN $wpdb->term_relationships AS trel ON ($wpdb->posts.ID = trel.object_id) LEFT JOIN $wpdb->term_taxonomy AS ttax ON ( " . $on . " AND trel.term_taxonomy_id = ttax.term_taxonomy_id) LEFT JOIN $wpdb->terms AS tter ON (ttax.term_id = tter.term_id) ";
|
407 |
-
}
|
408 |
-
|
409 |
-
$this->SE5_log("tags join: ".$join);
|
410 |
-
return $join;
|
411 |
-
}
|
412 |
-
}
|
413 |
-
|
414 |
-
?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
views/options.php
ADDED
@@ -0,0 +1,349 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
Class se_admin {
|
4 |
+
|
5 |
+
var $version = '6';
|
6 |
+
|
7 |
+
function se_admin() {
|
8 |
+
|
9 |
+
// Load language file
|
10 |
+
$locale = get_locale();
|
11 |
+
if ( !empty($locale) )
|
12 |
+
load_textdomain('SearchEverything', SE_ABSPATH .'lang/SE4-'.$locale.'.mo');
|
13 |
+
|
14 |
+
|
15 |
+
add_action('admin_head', array(&$this, 'se_options_style'));
|
16 |
+
add_action('admin_menu', array(&$this, 'se_add_options_panel'));
|
17 |
+
|
18 |
+
}
|
19 |
+
|
20 |
+
function se_add_options_panel() {
|
21 |
+
add_options_page('Search', 'Search Everything', 7, 'extend_search', array(&$this, 'se_option_page'));
|
22 |
+
}
|
23 |
+
|
24 |
+
//build admin interface
|
25 |
+
function se_option_page()
|
26 |
+
{
|
27 |
+
global $wpdb, $table_prefix, $wp_version;
|
28 |
+
|
29 |
+
$new_options = array(
|
30 |
+
'se_exclude_categories' => $_POST["exclude_categories"],
|
31 |
+
'se_exclude_categories_list' => $_POST["exclude_categories_list"],
|
32 |
+
'se_exclude_posts' => $_POST["exclude_posts"],
|
33 |
+
'se_exclude_posts_list' => $_POST["exclude_posts_list"],
|
34 |
+
'se_use_page_search' => $_POST["search_pages"],
|
35 |
+
'se_use_comment_search' => $_POST["search_comments"],
|
36 |
+
'se_use_tag_search' => $_POST["search_tags"],
|
37 |
+
'se_use_category_search' => $_POST["search_categories"],
|
38 |
+
'se_approved_comments_only' => $_POST["appvd_comments"],
|
39 |
+
'se_approved_pages_only' => $_POST["appvd_pages"],
|
40 |
+
'se_use_excerpt_search' => $_POST["search_excerpt"],
|
41 |
+
'se_use_draft_search' => $_POST["search_drafts"],
|
42 |
+
'se_use_attachment_search' => $_POST["search_attachments"],
|
43 |
+
'se_use_authors' => $_POST['search_authors'],
|
44 |
+
'se_use_metadata_search' => $_POST["search_metadata"]
|
45 |
+
|
46 |
+
);
|
47 |
+
|
48 |
+
if($_POST['action'] == "save")
|
49 |
+
{
|
50 |
+
echo "<div class=\"updated fade\" id=\"limitcatsupdatenotice\"><p>" . __("Your default search settings have been <strong>updated</strong> by Search Everything. </p><p> What are you waiting for? Go check out the new search results!") . "</p></div>";
|
51 |
+
update_option("se_options", $new_options);
|
52 |
+
|
53 |
+
}
|
54 |
+
|
55 |
+
if($_POST['action'] == "reset")
|
56 |
+
{
|
57 |
+
echo '<div id="message" class="updated fade"><p><strong>Your settings have been reset.</strong></p></div>';
|
58 |
+
delete_option("se_options", $new_options);
|
59 |
+
}
|
60 |
+
|
61 |
+
|
62 |
+
$options = get_option('se_options');
|
63 |
+
|
64 |
+
?>
|
65 |
+
|
66 |
+
<div class="wrap">
|
67 |
+
<h2><?php _e('Search Everything Version:') ?> <?php echo $this->version; ?></h2>
|
68 |
+
<form method="post">
|
69 |
+
|
70 |
+
<div style="float: right; margin-bottom:10px; padding:0; " id="top-update" class="submit">
|
71 |
+
<input type="hidden" name="action" value="save" />
|
72 |
+
<input type="submit" value="<?php _e('Update Options', 'SearchEverything') ?>" />
|
73 |
+
</div>
|
74 |
+
|
75 |
+
|
76 |
+
<table style="margin-bottom: 20px;"></table>
|
77 |
+
<table class="widefat fixed">
|
78 |
+
<thead>
|
79 |
+
<tr class="title">
|
80 |
+
<th scope="col" class="manage-column"><?php _e('Basic Configuration') ?></th>
|
81 |
+
<th scope="col" class="manage-column"></th>
|
82 |
+
</tr>
|
83 |
+
</thead>
|
84 |
+
|
85 |
+
<tr class="mainrow">
|
86 |
+
<td class="titledesc"><?php _e('Search every page','SearchEverything'); ?>:<br/><small><?php _e('(non-password protected)','SearchEverything'); ?></small></td>
|
87 |
+
<td class="forminp">
|
88 |
+
<select id="search_pages" name="search_pages">
|
89 |
+
<option<?php if ($options['se_use_page_search'] == 'No') { echo ' selected="selected"'; } ?>> </option>
|
90 |
+
<option<?php if ($options['se_use_page_search'] == 'Yes') { echo ' selected="selected"'; } ?>>Yes</option>
|
91 |
+
</select>
|
92 |
+
|
93 |
+
</td>
|
94 |
+
</tr>
|
95 |
+
|
96 |
+
<tr class="mainrow">
|
97 |
+
<td class="titledesc"> <?php _e('Search approved pages only','SearchEverything'); ?>:</td>
|
98 |
+
<td class="forminp">
|
99 |
+
<select id="appvd_pages" name="appvd_pages">
|
100 |
+
<option<?php if ($options['se_approved_pages_only'] == 'No') { echo ' selected="selected"'; } ?>> </option>
|
101 |
+
<option<?php if ($options['se_approved_pages_only'] == 'Yes') { echo ' selected="selected"'; } ?>>Yes</option>
|
102 |
+
</select>
|
103 |
+
<br/><small></small>
|
104 |
+
</td>
|
105 |
+
</tr>
|
106 |
+
<?php
|
107 |
+
// Show tags only for WP 2.3+
|
108 |
+
if ($wp_version >= '2.3') : ?>
|
109 |
+
<tr class="mainrow">
|
110 |
+
<td class="titledesc"><?php _e('Search every tag name','SearchEverything'); ?>:</td>
|
111 |
+
<td class="forminp">
|
112 |
+
<select id="search_tags" name="search_tags" >
|
113 |
+
<option<?php if ($options['se_use_tag_search'] == 'No') { echo ' selected="selected"'; } ?>> </option>
|
114 |
+
<option<?php if ($options['se_use_tag_search'] == 'Yes') { echo ' selected="selected"'; } ?>>Yes</option>
|
115 |
+
</select>
|
116 |
+
<br/><small></small>
|
117 |
+
</td>
|
118 |
+
</tr>
|
119 |
+
<?php endif; ?>
|
120 |
+
<?php
|
121 |
+
// Show categories only for WP 2.5+
|
122 |
+
if ($wp_version >= '2.5') : ?>
|
123 |
+
<tr class="mainrow">
|
124 |
+
<td class="titledesc"><?php _e('Search every category name','SearchEverything'); ?>:</td>
|
125 |
+
<td class="forminp">
|
126 |
+
<select id="search_categories" name="search_categories">
|
127 |
+
<option<?php if ($options['se_use_category_search'] == 'No') { echo ' selected="selected"'; } ?>> </option>
|
128 |
+
<option<?php if ($options['se_use_category_search'] == 'Yes') { echo ' selected="selected"'; } ?>>Yes</option>
|
129 |
+
</select>
|
130 |
+
<br/><small></small>
|
131 |
+
</td>
|
132 |
+
</tr>
|
133 |
+
<?php endif; ?>
|
134 |
+
<tr class="mainrow">
|
135 |
+
<td class="titledesc"><?php _e('Search every comment','SearchEverything'); ?>:</td>
|
136 |
+
<td class="forminp">
|
137 |
+
<select name="search_comments" id="search_comments">
|
138 |
+
<option<?php if ($options['se_use_comment_search'] == 'No') { echo ' selected="selected"'; } ?>> </option>
|
139 |
+
<option<?php if ($options['se_use_comment_search'] == 'Yes') { echo ' selected="selected"'; } ?>>Yes</option>
|
140 |
+
</select>
|
141 |
+
<br/><small></small>
|
142 |
+
</td>
|
143 |
+
</tr>
|
144 |
+
<tr class="mainrow">
|
145 |
+
<td class="titledesc"> <?php _e('Search approved comments only','SearchEverything'); ?>:</td>
|
146 |
+
<td class="forminp">
|
147 |
+
<select id="appvd_comments" name="appvd_comments">
|
148 |
+
<option<?php if ($options['se_approved_comments_only'] == 'No') { echo ' selected="selected"'; } ?>> </option>
|
149 |
+
<option<?php if ($options['se_approved_comments_only'] == 'Yes') { echo ' selected="selected"'; } ?>>Yes</option>
|
150 |
+
</select>
|
151 |
+
<br/><small></small>
|
152 |
+
</td>
|
153 |
+
</tr>
|
154 |
+
<tr class="mainrow">
|
155 |
+
<td class="titledesc"><?php _e('Search every excerpt','SearchEverything'); ?>:</td>
|
156 |
+
<td class="forminp">
|
157 |
+
<select id="search_excerpt" name="search_excerpt">
|
158 |
+
<option<?php if ($options['se_use_excerpt_search'] == 'No') { echo ' selected="selected"'; } ?>> </option>
|
159 |
+
<option<?php if ($options['se_use_excerpt_search'] == 'Yes') { echo ' selected="selected"'; } ?>>Yes</option>
|
160 |
+
</select>
|
161 |
+
<br/><small></small>
|
162 |
+
</td>
|
163 |
+
</tr>
|
164 |
+
<?php
|
165 |
+
// Show categories only for WP 2.5+
|
166 |
+
if ($wp_version >= '2.5') : ?>
|
167 |
+
<tr class="mainrow">
|
168 |
+
<td class="titledesc"><?php _e('Search every draft','SearchEverything'); ?>:</td>
|
169 |
+
<td class="forminp">
|
170 |
+
<select id="search_drafts" name="search_drafts">
|
171 |
+
<option<?php if ($options['se_use_draft_search'] == 'No') { echo ' selected="selected"'; } ?>> </option>
|
172 |
+
<option<?php if ($options['se_use_draft_search'] == 'Yes') { echo ' selected="selected"'; } ?>>Yes</option>
|
173 |
+
</select>
|
174 |
+
<br/><small></small>
|
175 |
+
</td>
|
176 |
+
</tr>
|
177 |
+
<?php endif; ?>
|
178 |
+
<tr class="mainrow">
|
179 |
+
<td class="titledesc"><?php _e('Search every attachment','SearchEverything'); ?>:</td>
|
180 |
+
<td class="forminp">
|
181 |
+
<select id="search_authors" name="search_authors">
|
182 |
+
<option<?php if ($options['se_use_attachment_search'] == 'No') { echo ' selected="selected"'; } ?>> </option>
|
183 |
+
<option<?php if ($options['se_use_attachment_search'] == 'Yes') { echo ' selected="selected"'; } ?>>Yes</option>
|
184 |
+
</select>
|
185 |
+
<br/><small></small>
|
186 |
+
</td>
|
187 |
+
</tr>
|
188 |
+
<tr class="mainrow">
|
189 |
+
<td class="titledesc"><?php _e('Search every custom field','SearchEverything'); ?>:<br/><small><?php _e('(metadata)','SearchEverything'); ?></small></td>
|
190 |
+
<td class="forminp">
|
191 |
+
<select id="search_metadata" name="search_metadata">
|
192 |
+
<option<?php if ($options['se_use_metadata_search'] == 'No') { echo ' selected="selected"'; } ?>> </option>
|
193 |
+
<option<?php if ($options['se_use_metadata_search'] == 'Yes') { echo ' selected="selected"'; } ?>>Yes</option>
|
194 |
+
</select>
|
195 |
+
|
196 |
+
</td>
|
197 |
+
</tr>
|
198 |
+
<tr class="mainrow">
|
199 |
+
<td class="titledesc"><?php _e('Search every author','SearchEverything'); ?>:</td>
|
200 |
+
<td class="forminp">
|
201 |
+
<select id="search_authors" name="search_authors">
|
202 |
+
<option<?php if ($options['se_use_authors'] == 'No') { echo ' selected="selected"'; } ?>> </option>
|
203 |
+
<option<?php if ($options['se_use_authors'] == 'Yes') { echo ' selected="selected"'; } ?>>Yes</option>
|
204 |
+
</select>
|
205 |
+
<br/><small></small>
|
206 |
+
</td>
|
207 |
+
</tr>
|
208 |
+
</table>
|
209 |
+
<table style="margin-bottom: 20px;"></table>
|
210 |
+
|
211 |
+
<table class="widefat">
|
212 |
+
<thead>
|
213 |
+
<tr class="title">
|
214 |
+
<th scope="col" class="manage-column"><?php _e('Advanced Configuration - Exclusion') ?></th>
|
215 |
+
<th scope="col" class="manage-column"></th>
|
216 |
+
</tr>
|
217 |
+
</thead>
|
218 |
+
|
219 |
+
<tr class="mainrow">
|
220 |
+
<td class="titledesc"><?php _e('Exclude some post or page IDs','SearchEverything'); ?>:</td>
|
221 |
+
<td class="forminp">
|
222 |
+
<input type="text" id="exclude_posts_list" name="exclude_posts_list" value="<?php echo $options['se_exclude_posts_list'];?>" />
|
223 |
+
<br/><small><?php _e('Comma separated Post IDs (example: 1, 5, 9)','SearchEverything'); ?></small>
|
224 |
+
</td>
|
225 |
+
</tr>
|
226 |
+
<tr class="mainrow">
|
227 |
+
<td class="titledesc"><?php _e('Exclude Categories','SearchEverything'); ?>:</td>
|
228 |
+
<td class="forminp">
|
229 |
+
<input type="text" id="exclude_categories_list" name="exclude_categories_list" value="<?php echo $options['se_exclude_categories_list'];?>" />
|
230 |
+
<br/><small><?php _e('Comma separated category IDs (example: 1, 4)','SearchEverything'); ?></small>
|
231 |
+
</td>
|
232 |
+
</tr>
|
233 |
+
|
234 |
+
</table>
|
235 |
+
|
236 |
+
|
237 |
+
<p class="submit">
|
238 |
+
<input type="hidden" name="action" value="save" />
|
239 |
+
<input type="submit" value="<?php _e('Update Options', 'SearchEverything') ?>" />
|
240 |
+
</p>
|
241 |
+
</form>
|
242 |
+
|
243 |
+
<div class="info">
|
244 |
+
<div style="float: left; padding-top:4px;"><?php _e('Developed by Dan Cameron of') ?> <a href="http://sproutventure.com" title="custom WordPress development"><?php _e('Sprout Venture') ?></a>. <?php _e('We Provide custom WordPress Plugins and Themes and a whole lot more.', 'SearchEverything') ?>
|
245 |
+
</div>
|
246 |
+
<div style="float: right; margin:0; padding:0; " class="submit">
|
247 |
+
<form method="post">
|
248 |
+
<input name="reset" type="submit" value="Reset Button" />
|
249 |
+
<input type="hidden" name="action" value="reset" />
|
250 |
+
</form>
|
251 |
+
<div style="clear:both;"></div>
|
252 |
+
</div>
|
253 |
+
|
254 |
+
<div style="clear: both;"></div>
|
255 |
+
|
256 |
+
<small><?php _e('Find a bug?') ?> <a href="https://redmine.sproutventure.com/projects/search-everything/issues" target="blank"><?php _e('Post it as a new issue','SearchEverything')?></a>.</small>
|
257 |
+
</div>
|
258 |
+
|
259 |
+
<table style="margin-bottom: 20px;"></table>
|
260 |
+
<table class="widefat">
|
261 |
+
<thead>
|
262 |
+
<tr class="title">
|
263 |
+
<th scope="col" class="manage-column"><?php _e('Test Search Form', 'SearchEverything'); ?></th>
|
264 |
+
<th scope="col" class="manage-column"></th>
|
265 |
+
</tr>
|
266 |
+
</thead>
|
267 |
+
|
268 |
+
<tr class="mainrow">
|
269 |
+
<td class="thanks">
|
270 |
+
<p><?php _e('Use this search form to run a live search test.', 'SearchEverything'); ?></p>
|
271 |
+
</td>
|
272 |
+
<td>
|
273 |
+
<form method="get" id="searchform" action="<?php bloginfo('home'); ?>">
|
274 |
+
<p class="srch submit">
|
275 |
+
<input type="text" class="srch-txt" value="<?php echo wp_specialchars($s, 1); ?>" name="s" id="s" size="30" />
|
276 |
+
<input type="submit" class="SE5_btn" id="searchsubmit" value="<?php _e('Run Test Search', 'SearchEverything'); ?>" />
|
277 |
+
</p>
|
278 |
+
</form>
|
279 |
+
</td>
|
280 |
+
</tr>
|
281 |
+
</table>
|
282 |
+
|
283 |
+
<table style="margin-bottom: 20px;"></table>
|
284 |
+
<table class="widefat">
|
285 |
+
<thead>
|
286 |
+
<tr class="title">
|
287 |
+
<th scope="col" class="manage-column"><?php _e('Thank You!') ?></th>
|
288 |
+
<th scope="col" class="manage-column"><?php _e('Development Support') ?></th>
|
289 |
+
<th scope="col" class="manage-column"><?php _e('Localization Support') ?></th>
|
290 |
+
</tr>
|
291 |
+
</thead>
|
292 |
+
|
293 |
+
<tr class="mainrow">
|
294 |
+
<td class="thanks">
|
295 |
+
<p><?php _e('The development of Search Everything since Version one has primarily come from the WordPress community, I’m grateful for their dedicated and continued support.') ?></p>
|
296 |
+
</td>
|
297 |
+
<td>
|
298 |
+
<ul class="SE_lists">
|
299 |
+
<li><a href="#">Gary Traffanstedt</a> (<a href="https://redmine.sproutventure.com/projects/search-everything/issues" target="blank">#43</a>)</li>
|
300 |
+
<li><a href="#">Eric Le Bail</a> (<a href="https://redmine.sproutventure.com/projects/search-everything/issues" target="blank">#44 and #60</a>)</li>
|
301 |
+
<li><a href="#">Gary Traffanstedt</a> (<a href="https://redmine.sproutventure.com/projects/search-everything/issues" target="blank">#43</a>)</li>
|
302 |
+
<li><a href="http://codium.co.nz" target="blank">Matias Gertel</a></li>
|
303 |
+
<li><a href="http://striderweb.com/" target="blank">Stephen Rider</a></li>
|
304 |
+
<li><a href="http://chrismeller.com/" target="blank">Chris Meller</a></li>
|
305 |
+
<li><a href="http://kinrowan.net/" target="blank">Cori Schlegel</a></li>
|
306 |
+
<li>and many more...<a href="https://redmine.sproutventure.com/projects/search-everything/issues" target="blank">how about you?</a></li>
|
307 |
+
</ul>
|
308 |
+
</td>
|
309 |
+
<td>
|
310 |
+
<ul class="SE_lists">
|
311 |
+
<li><a href="#">hit1205 (CN and TW)</a></li>
|
312 |
+
<li><a href="#">Silver Ghost (RU)</a></li>
|
313 |
+
<li><a href="http://beyn.org/" target="blank">Barış Ünver (FR)</a></li>
|
314 |
+
<li><a href="http://www.alohastone.com" target="blank">alohastone (DE)</a></li>
|
315 |
+
<li><a href="http://gidibao.net/" target="blank">Gianni Diurno (ES)</a></li>
|
316 |
+
<li><a href="#">János Csárdi-Braunstein (HU)</a></li>
|
317 |
+
<li><a href="http://gidibao.net/" target="blank">Gianni Diurno (IT)</a></li>
|
318 |
+
<li><a href="http://wppluginsj.sourceforge.jp/i18n-ja_jp/" target="blank">Naoko McCracken (JA)</a></li>
|
319 |
+
<li><a href="http://idimensie.nl" target="blank">Joeke-Remkus de Vries (NL)</a></li>
|
320 |
+
<li><a href="#">Silver Ghost (RU)</a></li>
|
321 |
+
<li><a href="http://mishkin.se" target="blank">Mikael Jorhult (RU)</a></li>
|
322 |
+
<li><a href="#">Baris Unver (TR)</a></li>
|
323 |
+
</ul>
|
324 |
+
</td>
|
325 |
+
|
326 |
+
</tr>
|
327 |
+
</table>
|
328 |
+
</div>
|
329 |
+
|
330 |
+
|
331 |
+
<?php
|
332 |
+
} //end se_option_page
|
333 |
+
|
334 |
+
//styling options page
|
335 |
+
function se_options_style() {
|
336 |
+
?>
|
337 |
+
<style type="text/css" media="screen">
|
338 |
+
.titledesc {width:300px;}
|
339 |
+
.thanks {width:400px; }
|
340 |
+
.thanks p {padding-left:20px; padding-right:20px;}
|
341 |
+
.info { background: #FFFFCC; border: 1px dotted #D8D2A9; padding: 10px; color: #333; }
|
342 |
+
.info a { color: #333; text-decoration: none; border-bottom: 1px dotted #333 }
|
343 |
+
.info a:hover { color: #666; border-bottom: 1px dotted #666; }
|
344 |
+
</style>
|
345 |
+
<?php
|
346 |
+
}
|
347 |
+
|
348 |
+
}
|
349 |
+
?>
|