diff options
author | andi <andi@splitbrain.org> | 2005-06-07 21:44:56 +0200 |
---|---|---|
committer | andi <andi@splitbrain.org> | 2005-06-07 21:44:56 +0200 |
commit | dc57ef04af4d12bb589c98e7457a22c44a091815 (patch) | |
tree | 8364d81819ec7745ce4e05c149256c40704f19da /lib/exe/ajax.php | |
parent | 50d915fed681509e84e625a5bfd4e3602dfe98d2 (diff) | |
download | rpg-dc57ef04af4d12bb589c98e7457a22c44a091815.tar.gz rpg-dc57ef04af4d12bb589c98e7457a22c44a091815.tar.bz2 |
AJAX spellchecker #29
This is nearly a complete rewrite of the gmail like AJAX spellchecker
from http://www.broken-notebook.com/spell_checker/index.php
Here are the differences and features
* seemless integrated into DokuWiki
* no need for the pspell extension
* needs GNU aspell installed (not sure about the version I guess
0.60+ for UTF8)
* needs PHP 4.3.0+
* uses SACK for AJAX
* gets errors and suggestions in one transfer
So far only tested in Firefox. It should work in IE, Safari and
Opera 8, too. Please test and report back.
darcs-hash:20050607194456-9977f-f699144d1fd28359742b2ce0f28c839a1f4cefbb.gz
Diffstat (limited to 'lib/exe/ajax.php')
-rw-r--r-- | lib/exe/ajax.php | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/lib/exe/ajax.php b/lib/exe/ajax.php index dfe0d2ceb..02911b858 100644 --- a/lib/exe/ajax.php +++ b/lib/exe/ajax.php @@ -20,7 +20,7 @@ require_once(DOKU_INC.'inc/auth.php'); //call the requested function $call = 'ajax_'.$_POST['call']; if(function_exists($call)){ - $call(); + $call(); }else{ print "The called function does not exist!"; } @@ -34,20 +34,21 @@ function ajax_qsearch(){ global $conf; global $lang; - $query = cleanID($_POST['q']); - if(empty($query)) return; + $query = cleanID($_POST['q']); + if(empty($query)) return; - $nsdir = str_replace(':','/',getNS($query)); - require_once(DOKU_INC.'inc/search.php'); - require_once(DOKU_INC.'inc/html.php'); + $nsdir = str_replace(':','/',getNS($query)); + require_once(DOKU_INC.'inc/search.php'); + require_once(DOKU_INC.'inc/html.php'); $data = array(); search($data,$conf['datadir'],'search_qsearch',array(query => $query),$nsdir); - if(!count($data)) return; + if(!count($data)) return; - print '<b>'.$lang['quickhits'].'</b>'; + print '<b>'.$lang['quickhits'].'</b>'; print html_buildlist($data,'qsearch','html_list_index'); } +//Setup VIM: ex: et ts=2 enc=utf-8 : ?> |