From c3342635f7c4d0408648ffbb31e4041d93ee4888 Mon Sep 17 00:00:00 2001 From: Andreas Unterkircher Date: Sat, 29 Mar 2008 07:55:25 +0100 Subject: issue111, auto-completion can now be enabled/disabled via config option Signed-off-by: Andreas Unterkircher --- phpfspot_cfg.php.dist | 5 +++++ phpfspot_tmpl.php | 2 ++ themes/default/templates/header.tpl | 2 +- themes/default/templates/search.tpl | 2 +- 4 files changed, 9 insertions(+), 2 deletions(-) diff --git a/phpfspot_cfg.php.dist b/phpfspot_cfg.php.dist index 3583560..f002aeb 100644 --- a/phpfspot_cfg.php.dist +++ b/phpfspot_cfg.php.dist @@ -89,6 +89,11 @@ class PHPFSPOT_CFG { */ var $use_lightbox = true; + /* Use Ajax Auto Completion for tag search. Maybe, if you have a slow + connectivity for the server, it's a good idea to turn it off. + */ + var $use_autocomplete = true; + /* logging = display || errorlog || logfile */ var $logging = "display"; diff --git a/phpfspot_tmpl.php b/phpfspot_tmpl.php index 52c983e..3fdf2ac 100644 --- a/phpfspot_tmpl.php +++ b/phpfspot_tmpl.php @@ -40,6 +40,8 @@ class PHPFSPOT_TMPL extends Smarty { if(isset($parent->cfg->use_lightbox) && $parent->cfg->use_lightbox == true) $this->assign('use_lightbox', 'true'); + if(isset($parent->cfg->use_autocomplete) && $parent->cfg->use_autocomplete == true) + $this->assign('use_autocomplete', 'true'); } // __construct() diff --git a/themes/default/templates/header.tpl b/themes/default/templates/header.tpl index 72257df..e946a5b 100644 --- a/themes/default/templates/header.tpl +++ b/themes/default/templates/header.tpl @@ -14,7 +14,7 @@ { /if } - { if ! $use_autocomplete } + { if $use_autocomplete } { /if } diff --git a/themes/default/templates/search.tpl b/themes/default/templates/search.tpl index ee9a7e1..f983c40 100644 --- a/themes/default/templates/search.tpl +++ b/themes/default/templates/search.tpl @@ -7,7 +7,7 @@ Tag: - { if ! $use_autocomplete } + { if $use_autocomplete } { literal }