-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathplugin.php
49 lines (36 loc) · 1.61 KB
/
plugin.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
<?php
/**
This is the SearchWidget plugin.
This file contains the SearchWidget plugin. It provides a widget that prints
a search form.
@package urlaube\searchwidget
@version 0.1a4
@author Yahe <[email protected]>
@since 0.1a0
*/
// ===== DO NOT EDIT HERE =====
// prevent script from getting called directly
if (!defined("URLAUBE")) { die(""); }
class SearchWidget extends BaseSingleton implements Plugin {
// RUNTIME FUNCTIONS
public static function plugin() {
$result = new Content();
$result->set(CONTENT, fhtml("<form action=\"%s\" id=\"searchwidget\" method=\"post\">".NL.
" <div class=\"input-group\">".NL.
" <input class=\"form-control\" name=\"search\" type=\"text\">".NL.
" <span class=\"input-group-btn\">".NL.
" <button class=\"btn btn-default\" type=\"submit\">".NL.
" <span class=\"glyphicon glyphicon-search\"></span>".NL.
" </button>".NL.
" </span>".NL.
" </div>".NL.
"</form>",
SearchHandler::getUriPost(new Content())));
$result->set(TITLE, t("Suche", static::class));
return $result;
}
}
// register plugin
Plugins::register(SearchWidget::class, "plugin", ON_WIDGETS);
// register translation
Translate::register(__DIR__.DS."lang".DS, SearchWidget::class);