Version Description
Download this release
Release Info
Developer | dancameron |
Plugin | Search Everything |
Version | 4.6 |
Comparing to | |
See all releases |
Code changes from version 4.5 to 4.6
- SE-Admin.php +122 -103
- screenshot-1.jpg +0 -0
- search_everything.php +10 -9
SE-Admin.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
|
3 |
Class SearchEverythingAdmin {
|
4 |
|
5 |
-
var $version = '4.
|
6 |
|
7 |
function SearchEverythingAdmin() {
|
8 |
|
@@ -55,115 +55,134 @@ Class SearchEverythingAdmin {
|
|
55 |
|
56 |
?>
|
57 |
|
58 |
-
<div class="wrap"
|
59 |
<h2>Search Everything (SE) Version: <?php echo $this->version; ?></h2>
|
60 |
-
<p><?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'); ?></p>
|
61 |
-
</div>
|
62 |
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
</form>
|
127 |
</div>
|
128 |
-
|
|
|
129 |
<h2><?php _e('SE Search Form', 'SearchEverything'); ?></h2>
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
<
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
|
|
|
|
|
|
|
|
|
|
140 |
</div>
|
|
|
141 |
<div class="wrap">
|
142 |
<h2>SE Project Information</h2>
|
143 |
-
|
144 |
-
|
145 |
-
<
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
167 |
</div>
|
168 |
|
169 |
<?php
|
2 |
|
3 |
Class SearchEverythingAdmin {
|
4 |
|
5 |
+
var $version = '4.6';
|
6 |
|
7 |
function SearchEverythingAdmin() {
|
8 |
|
55 |
|
56 |
?>
|
57 |
|
58 |
+
<div class="wrap">
|
59 |
<h2>Search Everything (SE) Version: <?php echo $this->version; ?></h2>
|
|
|
|
|
60 |
|
61 |
+
<table class="form-table">
|
62 |
+
<tr valign="top">
|
63 |
+
<td colspan="4" bgcolor="#DDD"><?php _e('Use this form to configure your search options.', 'SearchEverything'); ?><br />
|
64 |
+
<?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>
|
65 |
+
</tr>
|
66 |
+
<tr>
|
67 |
+
<td>
|
68 |
+
<form method="post">
|
69 |
+
<legend><?php _e('Search Options Form', 'SearchEverything'); ?></legend>
|
70 |
+
<p><input type="checkbox" id="exclude_posts" name="exclude_posts" value="true" <?php if($options['SE4_exclude_posts'] == 'true') { echo 'checked="true"'; } ?> />
|
71 |
+
<label for="exclude_posts"><?php _e('Exclude some post or page IDs','SearchEverything'); ?></label><br />
|
72 |
+
<label for="exclude_posts_list" class="SE_text_label"><?php _e('Comma separated Post IDs (example: 1, 5, 9)','SearchEverything'); ?></label><br />
|
73 |
+
<input type="text" size="50" class="SE_text_input" id="exclude_posts_list" name="exclude_posts_list" value="<?php echo $options['SE4_exclude_posts_list'];?>" /></p>
|
74 |
+
|
75 |
+
<p><input type="checkbox" id="exclude_categories" name="exclude_categories" value="true" <?php if($options['SE4_exclude_categories'] == 'true') { echo 'checked="true"'; } ?> />
|
76 |
+
<label for="exclude_categories"><?php _e('Exclude Categories','SearchEverything'); ?></label><br />
|
77 |
+
<label for="exclude_categories_list" class="SE_text_label"><?php _e('Comma separated category IDs (example: 1, 4)','SearchEverything'); ?></label><br />
|
78 |
+
<input type="text" size="50" class="SE_text_input" id="exclude_categories_list" name="exclude_categories_list" value="<?php echo $options['SE4_exclude_categories_list'];?>" /></p>
|
79 |
+
|
80 |
+
<p><input type="checkbox" id="search_pages" name="search_pages" value="true" <?php if($options['SE4_use_page_search'] == 'true') { echo 'checked="true"'; } ?> />
|
81 |
+
<label for="search_pages"><?php _e('Search every page (non-password protected)','SearchEverything'); ?></label></p>
|
82 |
+
<p> <input type="checkbox" class="SE_text_input" id="appvd_pages" name="appvd_pages" value="true" <?php if($options['SE4_approved_pages_only'] == 'true') { echo 'checked="true"'; } ?>
|
83 |
+
<label for="appvd_pages"><?php _e('Search approved pages only?','SearchEverything'); ?></label></p>
|
84 |
+
|
85 |
+
<?php
|
86 |
+
// Show tags only for WP 2.3+
|
87 |
+
If ($wp_version >= '2.3') { ?>
|
88 |
+
<p><input type="checkbox" id="search_tags" name="search_tags" value="true" <?php if($options['SE4_use_tag_search'] == 'true') { echo 'checked="true"'; } ?> />
|
89 |
+
<label for="search_tags"><?php _e('Search every tag','SearchEverything'); ?></label></p>
|
90 |
+
<?php } ?>
|
91 |
+
|
92 |
+
<?php
|
93 |
+
// Show categories only for WP 2.5+
|
94 |
+
If ($wp_version >= '2.5') { ?>
|
95 |
+
<p><input type="checkbox" id="search_categories" name="search_categories" value="true" <?php if($options['SE4_use_category_search'] == 'true') { echo 'checked="true"'; } ?> />
|
96 |
+
<label for="search_categories"><?php _e('Search every category','SearchEverything'); ?></label></p>
|
97 |
+
<?php } ?>
|
98 |
+
|
99 |
+
<p><input type="checkbox" id="search_comments" name="search_comments" value="true" <?php if($options['SE4_use_comment_search'] == 'true') { echo 'checked="true"'; } ?> />
|
100 |
+
<label for="search_comments"><?php _e('Search every comment','SearchEverything'); ?></label></p>
|
101 |
+
|
102 |
+
<p> <input type="checkbox" class="SE_text_input" id="appvd_comments" name="appvd_comments" value="true" <?php if($options['SE4_approved_comments_only'] == 'true') { echo 'checked="true"'; } ?>
|
103 |
+
<label for="appvd_comments"><?php _e('Search approved comments only?','SearchEverything'); ?></label></p>
|
104 |
+
|
105 |
+
<p><input type="checkbox" id="search_excerpt" name="search_excerpt" value="true" <?php if($options['SE4_use_excerpt_search'] == 'true') { echo 'checked="true"'; } ?> />
|
106 |
+
<label for="search_excerpt"><?php _e('Search every excerpt','SearchEverything'); ?></label></p>
|
107 |
+
|
108 |
+
<p><input type="checkbox" id="search_drafts" name="search_drafts" value="true" <?php if($options['SE4_use_draft_search'] == 'true') { echo 'checked="true"'; } ?>
|
109 |
+
<label for="search_drafts"><?php _e('Search every draft','SearchEverything'); ?></label></p>
|
110 |
+
|
111 |
+
<p><input type="checkbox" id="search_attachments" name="search_attachments" value="true" <?php if($options['SE4_use_attachment_search'] == 'true') { echo 'checked="true"'; } ?> />
|
112 |
+
<label for="search_attachments"><?php _e('Search every attachment','SearchEverything'); ?></label></p>
|
113 |
+
|
114 |
+
<p><input type="checkbox" id="search_metadata" name="search_metadata" value="true" <?php if($options['SE4_use_metadata_search'] == 'true') { echo 'checked="true"'; } ?> />
|
115 |
+
<label for="search_metadata"><?php _e('Search every custom field (metadata)','SearchEverything'); ?></label></p>
|
116 |
+
</form>
|
117 |
+
</td>
|
118 |
+
</tr>
|
119 |
+
</table>
|
120 |
+
<div class="submit">
|
121 |
+
<input type="hidden" name="action" value="save" />
|
122 |
+
<input type="submit" value="<?php _e('Update Options', 'SearchEverything') ?>" />
|
123 |
+
</div>
|
|
|
124 |
</div>
|
125 |
+
|
126 |
+
<div class="wrap">
|
127 |
<h2><?php _e('SE Search Form', 'SearchEverything'); ?></h2>
|
128 |
+
<table class="form-table">
|
129 |
+
<tr valign="top">
|
130 |
+
<td colspan="4" bgcolor="#DDD"><?php _e('Use this search form to run a live search test.', 'SearchEverything'); ?></td>
|
131 |
+
</tr>
|
132 |
+
<tr>
|
133 |
+
<td>
|
134 |
+
<legend><?php _e('Site Search', 'SearchEverything'); ?></legend>
|
135 |
+
<form method="get" id="searchform" action="<?php bloginfo('home'); ?>"><p class="srch submit">
|
136 |
+
<label for="s"><?php _e('Enter search terms', 'SearchEverything'); ?><br /></label>
|
137 |
+
<input type="text" class="srch-txt" value="<?php echo wp_specialchars($s, 1); ?>" name="s" id="s" size="30" />
|
138 |
+
<input type="submit" class="SE4_btn" id="searchsubmit" value="<?php _e('Run Test Search', 'SearchEverything'); ?>" /></p>
|
139 |
+
</form>
|
140 |
+
</td>
|
141 |
+
</tr>
|
142 |
+
</table>
|
143 |
</div>
|
144 |
+
|
145 |
<div class="wrap">
|
146 |
<h2>SE Project Information</h2>
|
147 |
+
<table class="form-table">
|
148 |
+
<tr valign="top">
|
149 |
+
<td colspan="4" bgcolor="#DDD">
|
150 |
+
As of 2.5 I'm taking a hiatus from SE development; however I'm still accepting and committing feature updates and fixes from the community.<br/>
|
151 |
+
You should not fret, 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:
|
152 |
+
<ul class="SE_lists">
|
153 |
+
<li><a href="http://chrismeller.com/">Chris Meller</a></li>
|
154 |
+
<li>jdleung</li>
|
155 |
+
<li>Alakhnor</li>
|
156 |
+
<li><a href="http://kinrowan.net/">Cori Schlegel</a></li>
|
157 |
+
<li><a href="http://green-beast.com/">Mike Cherim</a></li>
|
158 |
+
<li><a href="http://blog.saddey.net/">Saddy</a></li>
|
159 |
+
<li><a href="http://www.reaper-x.com/">Reaper</a></li>
|
160 |
+
<li><a href="http://beyn.org/">Barış Ünver</a> (localization support)</li>
|
161 |
+
<li><a href="http://www.alohastone.com">alohastone</a> (localization support)</li>
|
162 |
+
<li><a href="http://www.fratelliditalia.eu">Domiziano Galia</a></li>
|
163 |
+
<li><a href="http://meandmymac.net">Arnan de Gans</a> (Options panel)</li>
|
164 |
+
<li>Uli Iserloh</li>
|
165 |
+
</ul>
|
166 |
+
</td>
|
167 |
+
</tr>
|
168 |
+
<tr>
|
169 |
+
<td bgcolor="#DDD">
|
170 |
+
If you’d like to contribute there’s a lot to do:
|
171 |
+
<ul class="SE_lists">
|
172 |
+
<li>More meta data functions.</li>
|
173 |
+
<li>Search Bookmarks.</li>
|
174 |
+
<li>…anything else you want to add.</li>
|
175 |
+
</ul>
|
176 |
+
</td>
|
177 |
+
</tr>
|
178 |
+
<tr>
|
179 |
+
<td bgcolor="#DDD">
|
180 |
+
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 />
|
181 |
+
Respectfully,<br />
|
182 |
+
<a href="http://dancameron.org/">Dan Cameron</a>
|
183 |
+
</td>
|
184 |
+
</tr>
|
185 |
+
</table>
|
186 |
</div>
|
187 |
|
188 |
<?php
|
screenshot-1.jpg
CHANGED
Binary file
|
search_everything.php
CHANGED
@@ -3,7 +3,7 @@
|
|
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: 4.
|
7 |
Author: Dan Cameron
|
8 |
Author URI: http://dancameron.org/
|
9 |
*/
|
@@ -153,21 +153,22 @@ Class SearchEverything {
|
|
153 |
return $where;
|
154 |
}
|
155 |
|
156 |
-
//search excerpts provided by Dennis Turner
|
157 |
function SE4_search_excerpt($where) {
|
158 |
global $wp_query;
|
159 |
if (!empty($wp_query->query_vars['s'])) {
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
|
167 |
$this->SE4_log("excerpts where: ".$where);
|
168 |
return $where;
|
169 |
}
|
170 |
-
|
|
|
171 |
//search drafts
|
172 |
function SE4_search_draft_posts($where) {
|
173 |
global $wp_query;
|
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: 4.6
|
7 |
Author: Dan Cameron
|
8 |
Author URI: http://dancameron.org/
|
9 |
*/
|
153 |
return $where;
|
154 |
}
|
155 |
|
156 |
+
//search excerpts provided by Dennis Turner, fixed by GvA
|
157 |
function SE4_search_excerpt($where) {
|
158 |
global $wp_query;
|
159 |
if (!empty($wp_query->query_vars['s'])) {
|
160 |
+
$where = str_replace('"', '\'', $where);
|
161 |
+
$where = str_replace(' OR (wp_posts.post_content LIKE \'%' .
|
162 |
+
$wp_query->query_vars['s'] . '%\'', ' OR (wp_posts.post_content LIKE \'%' .
|
163 |
+
$wp_query->query_vars['s'] . '%\') OR (wp_posts.post_excerpt LIKE \'%' .
|
164 |
+
$wp_query->query_vars['s'] . '%\'', $where);
|
165 |
+
}
|
166 |
|
167 |
$this->SE4_log("excerpts where: ".$where);
|
168 |
return $where;
|
169 |
}
|
170 |
+
|
171 |
+
|
172 |
//search drafts
|
173 |
function SE4_search_draft_posts($where) {
|
174 |
global $wp_query;
|