'q',
'google.de' => 'q',
'go.google.cn' => 'q',
'google.it' => 'q',
'google.be' => 'q',
'google.at' => 'q',
'google.ch' => 'q',
'google.nl' => 'q',
'go.google.com' => 'q',
'maps.google.com' => 'q',
'local.google.com' => 'q',
'google.cn' => 'q',
'go.google.cn' => 'q',
'blogsearch.google.com' => 'q',
'blogsearch.google.cn' => 'q',
'blogsearch.google.ch' => 'q',
'blogsearch.google.at' => 'q',
'images.google.com' => 'q',
'groups.google.com' => 'q',
'translate.google.com' => 'u',
'search.blogger.com' => 'q',
'de.search.yahoo.com' => 'p',
'cn.search.yahoo.com' => 'p',
'ch.search.yahoo.com' => 'p',
'at.search.yahoo.com' => 'p',
'search.virgilio.it' => 'qs',
'arianna.libero.it' => 'query',
'abcsearch.com' => 'terms',
'alexa.com' => 'q',
'clusty.com' => 'query',
'partner.exalead.com' => 'q',
'search.abacho.com' => 'q',
'gmx.net' => 'search',
'search.seznam.cz' => 'w',
'startgoogle.startpagina.nl' => 'q',
'search.platformaonline.com' => 'q',
'hispeed.ch' => 'q',
'answers.com' => 's',
'altavista.com' => 'q',
'aol.com' => 'query',
'dmoz.org' => 'search',
'dogpile.com' => 'q',
'excite.com' => 'q',
'godago.com' => 'keywords',
'ixquick.com' => 'query',
'mysearch.com' => 'searchfor',
'myway.com' => 'searchfor',
'teoma.com' => 'q',
'voila.fr' => 'kw',
'clarence.com' => 'q',
'italiapuntonet.net' => 'search',
'search.com' => 'q',
'goodsearch.com' => 'Keywords',
'baidu.com' => 'wd',
'search.live.com' => 'q',
'search.yahoo.com' => 'p',
'fr.search.yahoo.com' => 'p',
'search.msn.com' => 'q',
'msxml.excite.com' => 'qkw',
'search.lycos.com' => 'query',
'alltheweb.com' => 'q',
'search.aol.com' => 'query',
'search.iwon.com' => 'searchfor',
'de.ask.com' => 'q',
'ask.com' => 'q',
'ask.co.uk' => 'ask',
'search.cometsystems.com' => 'qry',
'hotbot.com' => 'query',
'overture.com' => 'Keywords',
'metacrawler.com' => 'qkw',
'search.netscape.com' => 'query',
'looksmart.com' => 'key',
'dpxml.webcrawler.com' => 'qkw',
'search.earthlink.net' => 'q',
'search.viewpoint.com' => 'k',
'suche.t-online.de' => 'q',
'de.altavista.com' => 'q',
'fireball.de' => 'q',
'freenet.de' => 'q',
'suche.freenet.de' => 'query',
'dmoz.de' => 'q',
'fastbot.de' => 'q',
'allesklar.de' => 'q',
'web.de' => 'q',
'infoseeker.de' => 'q',
'127.0.0.1' => 'q',
'mamma.com' => 'query');
$mycss= '
';
function whattheywantmore()
{
global $mycss;
$terms = $searchingstring = null;
$searchingstring = theyaresearching();
if (!isset($searchingstring) or strlen($searchingstring) <= 0) return false;
if($searchingstring)
{
$terms = helpthemfindout($searchingstring);
}
echo $mycss;
echo '
';
echo '
';
?>
10)
{
$limit = 8;
}
$searchingstring = theyaresearching();
if($searchingstring)
{
$terms = helpthemfindout($searchingstring);
$time_difference = get_option('gmt_offset');
$now = gmdate("Y-m-d H:i:s",(time()+($time_difference*3600)));
if ('yes_fulltext' == get_option('makefun_fulltext'))
{
$sql = "SELECT ID, post_title, post_content,"
. "MATCH (post_name, post_content) "
. "AGAINST ('$terms') AS score "
. "FROM $wpdb->posts WHERE "
. "MATCH (post_name, post_content) "
. "AGAINST ('$terms') "
. "AND post_date <= '$now' "
. "AND (post_status IN ( 'publish', 'static' )) "
. "ORDER BY score DESC LIMIT $limit" ;
}
else
{
$sql = "SELECT ID, post_title, post_content "
. "FROM $wpdb->posts WHERE "
. "post_content like '%" . $terms ."%' "
. "AND post_date <= '$now' "
. "AND (post_status IN ( 'publish', 'static' )) "
. "ORDER BY post_date DESC LIMIT $limit";
}
$permalink = $results = $title = $temppermalink = null;
$results = $wpdb->get_results($sql);
$output = $sql = '';
if ($results) {
echo $mycss;
echo '';
echo '
- Maybe you are looking for: "',$terms,'",There's something about it:
';
foreach ($results as $result)
{
$title = stripslashes(apply_filters('the_title', $result->post_title));
if ('yes_optimize' == get_option('makefun_optimize'))
{
$sql = "SELECT guid FROM $wpdb->posts WHERE ID = '".$result->ID . "' AND post_date <= '" . $now . "' AND (post_status IN ( 'publish', 'static' )) AND (post_type IN ('post','page'))";
$temppermalink = $wpdb->get_results($sql);
if ($temppermalink)
{
foreach ($temppermalink as $temppermalink)
{
$permalink = $temppermalink->guid;
}
}
else
{
continue;
}
}
else
{
$permalink = get_permalink($result->ID);
}
$output .= '- ' . $title . '
';
}
echo $output ;
echo '
';
}
}
}
function makefun_active()
{
add_options_page("What they want", 'What they want', 8, basename(__FILE__), 'makefun_setup');
}
function makefun_setup()
{
if (!user_can_access_admin_page()) wp_die(__('You do not have sufficient permissions to access this page.'));
?>
Fulltext index finished";
}
function makefun_finish_optimize()
{
echo "You selected optimize your query
";
}
function makefun_optimize()
{
global $wpdb;
global $table_prefix;
$sql_result = null;
if('POST' === $_SERVER['REQUEST_METHOD'])
{
check_admin_referer('dont-theft-me');
if (isset($_POST['makefun_optimize']))
{
if ('full_index' == $_POST['makefun_optimize'])
{
$sql = 'ALTER TABLE `'.$table_prefix.'posts` ADD FULLTEXT `post_related` ( `post_name` ,' . ' `post_content` )';
$wpdb->hide_errors();
$sql_result = $wpdb->query($sql);
$wpdb->show_errors();
update_option('makefun_fulltext','yes_fulltext');
update_option('makefun_optimize','no_optimize');
add_action('admin_notices', 'makefun_finish_fulltext');
}
if ('optimize_query' == $_POST['makefun_optimize'])
{
update_option('makefun_optimize','yes_optimize');
update_option('makefun_fulltext','no_fulltext');
add_action('admin_notices', 'makefun_finish_optimize');
}
}
}
}
add_action('admin_menu', 'makefun_active');
if(false!==($safe_admin=strpos($_SERVER['REQUEST_URI'], basename(__FILE__))))add_action('admin_head', 'makefun_optimize');