summaryrefslogtreecommitdiff
path: root/inc/template.php
diff options
context:
space:
mode:
authorandi <andi@splitbrain.org>2005-06-07 21:44:56 +0200
committerandi <andi@splitbrain.org>2005-06-07 21:44:56 +0200
commitdc57ef04af4d12bb589c98e7457a22c44a091815 (patch)
tree8364d81819ec7745ce4e05c149256c40704f19da /inc/template.php
parent50d915fed681509e84e625a5bfd4e3602dfe98d2 (diff)
downloadrpg-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 'inc/template.php')
-rw-r--r--inc/template.php7
1 files changed, 7 insertions, 0 deletions
diff --git a/inc/template.php b/inc/template.php
index 43c224926..035bfbdc1 100644
--- a/inc/template.php
+++ b/inc/template.php
@@ -135,6 +135,7 @@ function tpl_metaheaders(){
global $INFO;
global $ACT;
global $lang;
+ global $conf;
$it=2;
// the usual stuff
@@ -179,6 +180,12 @@ function tpl_metaheaders(){
ptln('<script language="JavaScript" type="text/javascript" src="'.
DOKU_BASE.'lib/scripts/ajax.js"></script>',$it);
+ // load spellchecker script if wanted
+ if($conf['spellchecker'] && ($ACT=='edit' || $ACT=='preview')){
+ ptln('<script language="JavaScript" type="text/javascript" src="'.
+ DOKU_BASE.'lib/scripts/spellcheck.js"></script>',$it);
+ }
+
//FIXME include some default CSS ? IE FIX?
}