12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667 |
- <?php
- if (!defined('STATUSNET') && !defined('LACONICA')) {
- exit(1);
- }
- class AutocompletePlugin extends Plugin
- {
- function __construct()
- {
- parent::__construct();
- }
- function onEndShowScripts($action){
- if (common_logged_in()) {
- $action->element('span', array('id' => 'autocomplete-api',
- 'data-url' => common_local_url('autocomplete')));
- $action->script($this->path('js/autocomplete.go.js'));
- }
- }
- function onRouterInitialized($m)
- {
- $m->connect('main/autocomplete/suggest', array('action'=>'autocomplete'));
- }
- function onPluginVersion(array &$versions)
- {
- $versions[] = array('name' => 'Autocomplete',
- 'version' => GNUSOCIAL_VERSION,
- 'author' => 'Craig Andrews',
- 'homepage' => 'http://status.net/wiki/Plugin:Autocomplete',
- 'rawdescription' =>
-
- _m('The autocomplete plugin adds autocompletion for @ replies.'));
- return true;
- }
- }
|