diff options
Diffstat (limited to 'modules')
-rw-r--r-- | modules/search/helpers/search_block.php | 25 | ||||
-rw-r--r-- | modules/search/helpers/search_installer.php | 36 | ||||
-rw-r--r-- | modules/search/views/search_link.html.php | 12 |
3 files changed, 73 insertions, 0 deletions
diff --git a/modules/search/helpers/search_block.php b/modules/search/helpers/search_block.php new file mode 100644 index 00000000..b6450b4d --- /dev/null +++ b/modules/search/helpers/search_block.php @@ -0,0 +1,25 @@ +<?php defined("SYSPATH") or die("No direct script access."); +/** + * Gallery - a web based photo album viewer and editor + * Copyright (C) 2000-2008 Bharat Mediratta + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. + */ +class search_block_Core { + public static function header_bottom($theme) { + $view = new View("search_link.html"); + return $view->render(); + } +}
\ No newline at end of file diff --git a/modules/search/helpers/search_installer.php b/modules/search/helpers/search_installer.php new file mode 100644 index 00000000..ebcab43b --- /dev/null +++ b/modules/search/helpers/search_installer.php @@ -0,0 +1,36 @@ +<?php defined("SYSPATH") or die("No direct script access."); +/** + * Gallery - a web based photo album viewer and editor + * Copyright (C) 2000-2008 Bharat Mediratta + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. + */ +class search_installer { + public static function install() { + Kohana::log("debug", "search_installer::install"); + $db = Database::instance(); + $version = module::get_version("search"); + Kohana::log("debug", "version: $version"); + + if ($version == 0) { + module::set_version("search", 1); + } + } + + public static function uninstall() { + $db = Database::instance(); + module::delete("search"); + } +} diff --git a/modules/search/views/search_link.html.php b/modules/search/views/search_link.html.php new file mode 100644 index 00000000..983742a3 --- /dev/null +++ b/modules/search/views/search_link.html.php @@ -0,0 +1,12 @@ +<? defined("SYSPATH") or die("No direct script access."); ?> +<form id="gSearchForm"> + <ul> + <li> + <label for="search"><?= _("Search") ?></label> + <input type="text" name="search" value="<?= _("Search Gallery ...") ?>"/> + </li> + <li> + <input type="submit" value="<?= _("search") ?>" /> + </li> + </ul> +</form> |