Options configuration panel Version: 4.1 Author: AskApache Author URI: http://www.askapache.com */ /* == Installation == 1. Upload askapache-google-404.zip to the /wp-content/plugins/ directory 2. Unzip into its own folder /wp-content/plugins/askapache-google-404/askapache-google-404.php 3. Activate the plugin through the 'Plugins' menu in WordPress by clicking "AskApache Google 404" 4. Go to your Options Panel and open the "AskApache Google 404" submenu. /wp-admin/options-general.php?page=askapache-google-404.php 5. Enter in your google Ajax API Key and hit "Update" Button. 6. Add the code to your 404.php template page by including in your main content area. */ /* /--------------------------------------------------------------------\ | | | License: GPL | | | | AskApache Google 404 Plugin - Adds Ajax Powered Search to 404 Page | | Copyright (C) 2007, AskApache, www.askapache.com | | All rights reserved. | | | | 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; either version 2 | | of the License, or (at your option) any later version. | | | | 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. | | | | You should have received a copy of the GNU General Public License | | along with this program; if not, write to the | | Free Software Foundation, Inc. | | 51 Franklin Street, Fifth Floor | | Boston, MA 02110-1301, USA | | | \--------------------------------------------------------------------/ */ $aa_disallowed_words=array('about','after','ago','all','almost','along','alot','test','also','and','answer','any','anybody','anybodys','anywhere','are','arent','around','askd','because','been','before','being','best','better','between','big','btw','but','can','come','could','couldnt','did','didnt','does','doesnt','dont','etc','either','ever','everybody','everybodys','everyone','far','for','found','game','going','good','got','gotten','had','has','have','havent','having','her','here','hers','him','his','how','hows','ive','isnt','its','just','know','large','less','like','liked','little','looking','look','looked','looking','lot','maybe','many','more','most','much','must','mustnt','near','need','never','new','news','none','not','nothing','now','off','often','old','once','only','oops','other','our','ours','out','over','please','put','question','questions','questioned','quote','rather','really','recent','said','saw','say','says','she','see','sees','should','small','some','something','sometime','somewhere','soon','take','than','thank','that','thatd','thats','the','their','theirs','theres','theirs','them','then','there','these','they','theyll','theyd','theyre','this','those','though','through','thus','too','under','until','untrue','upon','very','via','want','was','way','well','went','were','werent','what','when','where','which','whom','whose','why','wide','will','with','within','without','wont','world','worse','worst','would','wrote','yes','yet','you','youd','youll','your','youre','yours'); // aa_google_404_options_setup //--------------------------- function aa_google_404_options_setup() { global $aa_G404; add_options_page($aa_G404['Name'], 'AA Google 404', 8, basename(__FILE__), 'aa_google_404_page'); }//===================================================================================== // aa_google_404 //--------------------------- function aa_google_404(){ $aa_google_404_code_html = get_option('aa_google_404_code_html'); echo $aa_google_404_code_html; }//===================================================================================== // aa_google_404_page //--------------------------- function aa_google_404_page() { global $aa_G404,$aa_google_404_api_key,$aa_google_404_code_js,$aa_google_404_code_css,$aa_google_404_code_html,$aa_status; if (! user_can_access_admin_page()) wp_die( __('You do not have sufficient permissions to access this page.') ); if ( !file_exists(TEMPLATEPATH.'/404.php')){ if (!copy(dirname(__FILE__).'/404.php', TEMPLATEPATH.'/404.php'))$aa_status.='
ERROR:Attempt to create 404.php FAILED!
Message:Attempt to create 404.php SUCCESS!
[ : - : - : ]
Successfully Updated Code.
'; if(isset($_POST['aaresetgooglecode'])) { aa_google_404_activate(); $aa_status = 'Successfully Reset Plugin Options.
Warning: You need to get a free Google API Key before this plugin will fully work.