diff options
Diffstat (limited to 'modules/developer/views')
-rw-r--r-- | modules/developer/views/admin_controller.txt.php | 60 | ||||
-rw-r--r-- | modules/developer/views/admin_html.txt.php | 10 | ||||
-rw-r--r-- | modules/developer/views/block.txt.php | 26 | ||||
-rw-r--r-- | modules/developer/views/developer_module.html.php | 6 | ||||
-rw-r--r-- | modules/developer/views/event.txt.php | 96 | ||||
-rw-r--r-- | modules/developer/views/installer.txt.php | 9 | ||||
-rw-r--r-- | modules/developer/views/menu.txt.php | 42 | ||||
-rw-r--r-- | modules/developer/views/theme.txt.php | 163 |
8 files changed, 403 insertions, 9 deletions
diff --git a/modules/developer/views/admin_controller.txt.php b/modules/developer/views/admin_controller.txt.php new file mode 100644 index 00000000..42b5ff38 --- /dev/null +++ b/modules/developer/views/admin_controller.txt.php @@ -0,0 +1,60 @@ +<?php defined("SYSPATH") or die("No direct script access."); ?> +<?= "<?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 Admin_<?= $class_name ?>_Controller extends Admin_Controller { + public function index() { + $view = new Admin_View("admin.html"); + $view->content = new View("admin_<?=$module ?>.html"); + $view->content->form = $this->_get_admin_form(); + + print $view; + } + + public function handler() { + access::verify_csrf(); + + $form = $this->_get_admin_form(); + if ($form->validate()) { + // @todo process the admin form + + message::success(t("<?= $name ?> Adminstration Complete Successfully")); + + url::redirect("admin/<?= $module ?>"); + } + $view = new Admin_View("admin.html"); + $view->content = new View("admin_<?=$module ?>.html"); + $view->content->form = $form; + + print $view; + } + + private function _get_admin_view($form=null) { + } + + private function _get_admin_form() { + $form = new Forge("admin/<?= $module ?>/handler", "", "post", + array("id" => "gAdminForm")); + $group = $form->group("group"); + $group->input("text")->label(t("Text"))->rules("required"); + $group->submit("submit")->value(t("Submit")); + + return $form; + } +}
\ No newline at end of file diff --git a/modules/developer/views/admin_html.txt.php b/modules/developer/views/admin_html.txt.php new file mode 100644 index 00000000..34b699d7 --- /dev/null +++ b/modules/developer/views/admin_html.txt.php @@ -0,0 +1,10 @@ +<?php defined("SYSPATH") or die("No direct script access.") ?> +<?= "<?php defined(\"SYSPATH\") or die(\"No direct script access.\") ?>" ?> + +<div id="gAdmin<?= $class ?>"> + <h2> + <?= "<?= t(\"$name Adminstration\") ?>" ?> + </h2> + <?= "<?= \$form ?>" ?> + +</div> diff --git a/modules/developer/views/block.txt.php b/modules/developer/views/block.txt.php new file mode 100644 index 00000000..b8a96da0 --- /dev/null +++ b/modules/developer/views/block.txt.php @@ -0,0 +1,26 @@ +<?php defined("SYSPATH") or die("No direct script access."); ?> +<?= "<?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 <?= $module ?>_block { + static function get($block_id) { + } + static function get_list() { + } +} diff --git a/modules/developer/views/developer_module.html.php b/modules/developer/views/developer_module.html.php index d572ecfb..4ce28ff7 100644 --- a/modules/developer/views/developer_module.html.php +++ b/modules/developer/views/developer_module.html.php @@ -32,12 +32,8 @@ $("#gModuleCreateForm").ready(function() { <?= form::dropdown(array("name" => "theme[]", "multiple" => true, "size" => 6), $theme, $form["theme[]"]) ?> </li> <li> - <?= form::label("block[]", t("Block Callbacks")) ?> - <?= form::dropdown(array("name" => "block[]", "multiple" => true, "size" => 6), $block, $form["block[]"]) ?> - </li> - <li> <?= form::label("menu[]", t("Menu Callback")) ?> - <?= form::dropdown(array("name" => "menu[]", "multiple" => true, "size" => 6), $menu, $form["block[]"]) ?> + <?= form::dropdown(array("name" => "menu[]", "multiple" => true, "size" => 6), $menu, $form["menu[]"]) ?> </li> <li> <?= form::label("event[]", t("Gallery Event Handlers")) ?> diff --git a/modules/developer/views/event.txt.php b/modules/developer/views/event.txt.php new file mode 100644 index 00000000..e2731f96 --- /dev/null +++ b/modules/developer/views/event.txt.php @@ -0,0 +1,96 @@ +<?php defined("SYSPATH") or die("No direct script access."); ?> +<?= "<?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 <?= $module ?>_event { +<? if (!empty($callbacks["batch_complete"])): ?> + static function batch_complete() { + } + +<? endif ?> +<? if (!empty($callbacks["comment_add_form"])): ?> + static function comment_add_form($form) { + } + +<? endif ?> +<? if (!empty($callbacks["comment_created"])): ?> + static function comment_created($theme, $args) { + } + +<? endif ?> +<? if (!empty($callbacks["comment_updated"])): ?> + static function comment_updated($old, $new) { + } + +<? endif ?> +<? if (!empty($callbacks["group_before_delete"])): ?> + static function group_before_delete($group) { + } + +<? endif ?> +<? if (!empty($callbacks["group_created"])): ?> + static function group_created($group) { + } + +<? endif ?> +<? if (!empty($callbacks["item_before_delete"])): ?> + static function item_before_delete($item) { + } + +<? endif ?> +<? if (!empty($callbacks["item_created"])): ?> + static function item_created($item) { + } + +<? endif ?> +<? if (!empty($callbacks["item_related_update"])): ?> + static function item_related_update($item) { + } + +<? endif ?> +<? if (!empty($callbacks["item_related_update_batch"])): ?> + static function item_related_update_batch($sql) { + } + +<? endif ?> +<? if (!empty($callbacks["item_updated"])): ?> + static function item_updated($old, $new) { + } + +<? endif ?> +<? if (!empty($callbacks["user_before_delete"])): ?> + static function user_before_delete($user) { + } + +<? endif ?> +<? if (!empty($callbacks["user_created"])): ?> + static function user_created($user) { + } + +<? endif ?> +<? if (!empty($callbacks["user_login"])): ?> + static function user_login($user) { + } + +<? endif ?> +<? if (!empty($callbacks["user_logout"])): ?> + static function user_logout($user) { + } +<? endif ?> +} diff --git a/modules/developer/views/installer.txt.php b/modules/developer/views/installer.txt.php index 81d6d795..1ccc3327 100644 --- a/modules/developer/views/installer.txt.php +++ b/modules/developer/views/installer.txt.php @@ -18,16 +18,17 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ -class <?= $module_name ?>_installer { +class <?= $module ?>_installer { static function install() { - $version = module::get_version("<?= $module_name ?>"); + $version = module::get_version("<?= $module ?>"); if ($version == 0) { /* @todo Put database creation here */ - module::set_version("<?= $module_name ?>", 1); + module::set_version("<?= $module ?>", 1); } } static function uninstall() { - module::delete("<?= $module_name ?>"); + /* @todo Put database table drops here */ + module::delete("<?= $module ?>"); } } diff --git a/modules/developer/views/menu.txt.php b/modules/developer/views/menu.txt.php new file mode 100644 index 00000000..5404f6c5 --- /dev/null +++ b/modules/developer/views/menu.txt.php @@ -0,0 +1,42 @@ +<?php defined("SYSPATH") or die("No direct script access."); ?> +<?= "<?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 <?= $module ?>_menu { + static function admin($menu, $theme) { + $menu->get("settings_menu") + ->append(Menu::factory("link") + ->id("<?= $module ?>_menu") + ->label(t("<?= $module_name ?> Administration")) + ->url(url::site("admin/<?= $module ?>"))); + } + +<? if (!empty($callbacks["album"])): ?> + static function album($menu, $theme) { + } + +<? endif ?> +<? if (!empty($callbacks["photo"])): ?> + static function photo($menu, $theme) { + } + +<? endif ?> + static function site($menu, $theme) { + } +} diff --git a/modules/developer/views/theme.txt.php b/modules/developer/views/theme.txt.php new file mode 100644 index 00000000..df7b18e0 --- /dev/null +++ b/modules/developer/views/theme.txt.php @@ -0,0 +1,163 @@ +<?php defined("SYSPATH") or die("No direct script access."); ?> +<?= "<?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 <?= $module ?>_theme { + +<? if (!empty($callbacks["album_blocks"])): ?> + static function album_blocks() { + } + +<? endif ?> +<? if (!empty($callbacks["album_bottom"])): ?> + static function album_bottom() { + } + +<? endif ?> +<? if (!empty($callbacks["album_top"])): ?> + static function album_top() { + } + +<? endif ?> +<? if (!empty($callbacks["admin_credits"])): ?> + static function admin_credits() { + } + +<? endif ?> +<? if (!empty($callbacks["photo"])): ?> + static function admin_footer() { + } + +<? endif ?> +<? if (!empty($callbacks["admin_header_top"])): ?> + static function admin_header_top() { + } + +<? endif ?> +<? if (!empty($callbacks["admin_header_bottom"])): ?> + static function admin_header_bottom() { + } + +<? endif ?> +<? if (!empty($callbacks["admin_page_bottom"])): ?> + static function admin_page_bottom() { + } + +<? endif ?> +<? if (!empty($callbacks["admin_page_top"])): ?> + static function admin_page_top() { + } + +<? endif ?> +<? if (!empty($callbacks["admin_head"])): ?> + static function admin_head() { + } + +<? endif ?> +<? if (!empty($callbacks["credits"])): ?> + static function credits() { + } + +<? endif ?> +<? if (!empty($callbacks["dynamic_bottom"])): ?> + static function dynamic_bottom() { + } + +<? endif ?> +<? if (!empty($callbacks["dynamic_top"])): ?> + static function dynamic_top() { + } + +<? endif ?> +<? if (!empty($callbacks["footer"])): ?> + static function footer() { + } + +<? endif ?> +<? if (!empty($callbacks["head"])): ?> + static function head() { + } + +<? endif ?> +<? if (!empty($callbacks["header_bottom"])): ?> + static function header_bottom() { + } + +<? endif ?> +<? if (!empty($callbacks["header_top"])): ?> + static function header_top() { + } + +<? endif ?> +<? if (!empty($callbacks["page_bottom"])): ?> + static function page_bottom() { + } + +<? endif ?> +<? if (!empty($callbacks["pae_top"])): ?> + static function page_top() { + } + +<? endif ?> +<? if (!empty($callbacks["photo_blocks"])): ?> + static function photo_blocks() { + } + +<? endif ?> +<? if (!empty($callbacks["photo_bottom"])): ?> + static function photo_bottom() { + } + +<? endif ?> +<? if (!empty($callbacks["photo_top"])): ?> + static function photo_top() { + } + +<? endif ?> +<? if (!empty($callbacks["sidebar_blocks"])): ?> + static function sidebar_blocks() { + } + +<? endif ?> +<? if (!empty($callbacks["sidebar_bottom"])): ?> + static function sidebar_bottom() { + } + +<? endif ?> +<? if (!empty($callbacks["sidebar_top"])): ?> + static function sidebar_top() { + } + +<? endif ?> +<? if (!empty($callbacks["thumb_bottom"])): ?> + static function thumb_bottom($child) { + } + +<? endif ?> +<? if (!empty($callbacks["thumb_info"])): ?> + static function thumb_info($child) { + } + +<? endif ?> +<? if (!empty($callbacks["thumb_top"])): ?> + static function thumb_top($child) { + } + +<? endif ?> +} |