X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=plugins%2FAutocomplete%2FAutocompletePlugin.php;h=380ab5a5dc58bc2d444ea791acb395b5a0ef37fd;hb=34ad355cd71c465e91f845e532a07d796c0fbb34;hp=1479ead602995935018cdbaa7093ccc4aa7bf670;hpb=4915b0cb9ef71e9efadea26ada7a3a936f48cccc;p=quix0rs-gnu-social.git diff --git a/plugins/Autocomplete/AutocompletePlugin.php b/plugins/Autocomplete/AutocompletePlugin.php index 1479ead602..380ab5a5dc 100644 --- a/plugins/Autocomplete/AutocompletePlugin.php +++ b/plugins/Autocomplete/AutocompletePlugin.php @@ -39,47 +39,28 @@ class AutocompletePlugin extends Plugin parent::__construct(); } - function onAutoload($cls) - { - switch ($cls) - { - case 'AutocompleteAction': - require_once(INSTALLDIR.'/plugins/Autocomplete/autocomplete.php'); - return false; - } - } - function onEndShowScripts($action){ if (common_logged_in()) { $action->element('span', array('id' => 'autocomplete-api', 'data-url' => common_local_url('autocomplete'))); - $action->script($this->path('jquery-autocomplete/jquery.autocomplete.pack.js')); - $action->script($this->path('Autocomplete.js')); + $action->script($this->path('js/autocomplete.go.js')); } } - function onEndShowStatusNetStyles($action) + function onRouterInitialized(URLMapper $m) { - if (common_logged_in()) { - $action->cssLink($this->path('jquery-autocomplete/jquery.autocomplete.css')); - } - } - - function onRouterInitialized($m) - { - if (common_logged_in()) { - $m->connect('main/autocomplete/suggest', array('action'=>'autocomplete')); - } + $m->connect('main/autocomplete/suggest', array('action'=>'autocomplete')); } - function onPluginVersion(&$versions) + function onPluginVersion(array &$versions) { $versions[] = array('name' => 'Autocomplete', - 'version' => STATUSNET_VERSION, + 'version' => GNUSOCIAL_VERSION, 'author' => 'Craig Andrews', 'homepage' => 'http://status.net/wiki/Plugin:Autocomplete', 'rawdescription' => - _m('The autocomplete plugin allows users to autocomplete screen names in @ replies. When an "@" is typed into the notice text area, an autocomplete box is displayed populated with the user\'s friend\' screen names.')); + // TRANS: Plugin description. + _m('The autocomplete plugin adds autocompletion for @ replies.')); return true; } }