From 153248b48230a342648577480e36224eaee85535 Mon Sep 17 00:00:00 2001 From: Craig Andrews Date: Thu, 6 Aug 2009 14:39:59 -0400 Subject: Added the Autocomplete plugin --- plugins/Autocomplete/AutocompletePlugin.php | 58 +++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 plugins/Autocomplete/AutocompletePlugin.php (limited to 'plugins/Autocomplete/AutocompletePlugin.php') diff --git a/plugins/Autocomplete/AutocompletePlugin.php b/plugins/Autocomplete/AutocompletePlugin.php new file mode 100644 index 000000000..ddb0dea32 --- /dev/null +++ b/plugins/Autocomplete/AutocompletePlugin.php @@ -0,0 +1,58 @@ +. + * + * @category Plugin + * @package Laconica + * @author Craig Andrews + * @copyright 2009 Craig Andrews http://candrews.integralblue.com + * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0 + * @link http://laconi.ca/ + */ + +if (!defined('LACONICA')) { + exit(1); +} + +class AutocompletePlugin extends Plugin +{ + function __construct() + { + parent::__construct(); + } + + function onEndShowScripts($action){ + $js_string = << +var current_user = { screen_name: 'CANDREWS', id: '1' }; + +EOT; + $action->raw($js_string); + $action->script('plugins/Autocomplete/jquery-autocomplete/jquery.autocomplete.pack.js'); + $action->script('plugins/Autocomplete/Autocomplete.js'); + } + + function onEndShowLaconicaStyles($action) + { + $action->cssLink('plugins/Autocomplete/jquery-autocomplete/jquery.autocomplete.css'); + } + +} +?> -- cgit v1.2.3-54-g00ecf