From 8abf48dd79561fd6605604de8714d4eaf4870942 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Sun, 15 Mar 2009 22:23:04 +0000 Subject: Move atom, developer, polar_rose and gmaps modules into gallery-contrib --- modules/atom/helpers/atom.php | 36 ----- modules/atom/libraries/Atom_Author.php | 36 ----- modules/atom/libraries/Atom_Base.php | 76 ---------- modules/atom/libraries/Atom_Entry.php | 52 ------- modules/atom/libraries/Atom_Feed.php | 47 ------ modules/atom/libraries/Atom_Link.php | 41 ----- modules/atom/libraries/Gallery_Atom_Entry.php | 39 ----- modules/atom/libraries/Gallery_Atom_Feed.php | 39 ----- modules/atom/libraries/Gallery_Atom_Link.php | 45 ------ modules/developer/config/developer.php | 69 --------- modules/developer/controllers/admin_developer.php | 127 ---------------- modules/developer/helpers/developer_installer.php | 35 ----- modules/developer/helpers/developer_menu.php | 56 ------- modules/developer/helpers/developer_task.php | 148 ------------------ modules/developer/js/developer.js | 39 ----- modules/developer/module.info | 3 - modules/developer/views/admin_controller.txt.php | 57 ------- modules/developer/views/admin_developer.html.php | 15 -- modules/developer/views/admin_html.txt.php | 10 -- modules/developer/views/block.txt.php | 38 ----- modules/developer/views/block_html.txt.php | 10 -- modules/developer/views/controller.txt.php | 53 ------- modules/developer/views/developer_module.html.php | 49 ------ modules/developer/views/event.txt.php | 96 ------------ modules/developer/views/installer.txt.php | 34 ----- modules/developer/views/menu.txt.php | 51 ------- modules/developer/views/module_info.txt.php | 5 - modules/developer/views/theme.txt.php | 168 --------------------- modules/gmaps/helpers/gmaps_installer.php | 31 ---- modules/gmaps/helpers/gmaps_theme.php | 30 ---- modules/gmaps/module.info | 3 - modules/gmaps/views/gmaps_block.html.php | 2 - .../polar_rose/helpers/polar_rose_installer.php | 32 ---- modules/polar_rose/helpers/polar_rose_theme.php | 50 ------ modules/polar_rose/module.info | 3 - 35 files changed, 1625 deletions(-) delete mode 100644 modules/atom/helpers/atom.php delete mode 100644 modules/atom/libraries/Atom_Author.php delete mode 100644 modules/atom/libraries/Atom_Base.php delete mode 100644 modules/atom/libraries/Atom_Entry.php delete mode 100644 modules/atom/libraries/Atom_Feed.php delete mode 100644 modules/atom/libraries/Atom_Link.php delete mode 100644 modules/atom/libraries/Gallery_Atom_Entry.php delete mode 100644 modules/atom/libraries/Gallery_Atom_Feed.php delete mode 100644 modules/atom/libraries/Gallery_Atom_Link.php delete mode 100644 modules/developer/config/developer.php delete mode 100644 modules/developer/controllers/admin_developer.php delete mode 100644 modules/developer/helpers/developer_installer.php delete mode 100644 modules/developer/helpers/developer_menu.php delete mode 100644 modules/developer/helpers/developer_task.php delete mode 100644 modules/developer/js/developer.js delete mode 100644 modules/developer/module.info delete mode 100644 modules/developer/views/admin_controller.txt.php delete mode 100644 modules/developer/views/admin_developer.html.php delete mode 100644 modules/developer/views/admin_html.txt.php delete mode 100644 modules/developer/views/block.txt.php delete mode 100644 modules/developer/views/block_html.txt.php delete mode 100644 modules/developer/views/controller.txt.php delete mode 100644 modules/developer/views/developer_module.html.php delete mode 100644 modules/developer/views/event.txt.php delete mode 100644 modules/developer/views/installer.txt.php delete mode 100644 modules/developer/views/menu.txt.php delete mode 100644 modules/developer/views/module_info.txt.php delete mode 100644 modules/developer/views/theme.txt.php delete mode 100644 modules/gmaps/helpers/gmaps_installer.php delete mode 100644 modules/gmaps/helpers/gmaps_theme.php delete mode 100644 modules/gmaps/module.info delete mode 100644 modules/gmaps/views/gmaps_block.html.php delete mode 100644 modules/polar_rose/helpers/polar_rose_installer.php delete mode 100644 modules/polar_rose/helpers/polar_rose_theme.php delete mode 100644 modules/polar_rose/module.info (limited to 'modules') diff --git a/modules/atom/helpers/atom.php b/modules/atom/helpers/atom.php deleted file mode 100644 index e2f2d9ce..00000000 --- a/modules/atom/helpers/atom.php +++ /dev/null @@ -1,36 +0,0 @@ -element->appendChild($this->dom->createElement("name", $name)); - return $this; - } - - public function email($email) { - $this->element->appendChild($this->dom->createElement("email", $email)); - return $this; - } - - public function uri($uri) { - $this->element->appendChild($this->dom->createElement("uri", $uri)); - return $this; - } -} diff --git a/modules/atom/libraries/Atom_Base.php b/modules/atom/libraries/Atom_Base.php deleted file mode 100644 index 0cb33b0b..00000000 --- a/modules/atom/libraries/Atom_Base.php +++ /dev/null @@ -1,76 +0,0 @@ -dom = $dom; - $this->element = $dom->createElement($element_name); - } else { - $this->dom = new DOMDocument('1.0', 'utf-8'); - $this->element = $this->dom->createElementNS("http://www.w3.org/2005/Atom", $element_name); - } - $this->dom->appendChild($this->element); - $this->element_name = $element_name; - return $this; - } - - public function get_element() { - $this->add_children_to_base_element(); - return $this->element; - } - - public function as_xml() { - $this->add_children_to_base_element(); - $this->dom->formatOutput = true; - return $this->dom->saveXML(); - } - - public function as_json() { - $this->add_children_to_base_element(); - /* Both Google and Yahoo generate their JSON from XML. We could do that, too. */ - return null; - } - - public function load_xml($xml) { - /* Load XML into our DOM. We can also validate against the RELAX NG schema from the Atom RFC. */ - } - - protected function add_child($element_type, $element_name) { - // @todo check if element_type is of Atom_Base; this can also be done with no magic - $element = new $element_type($element_name, $this->dom); - $this->children[$element_name][] = $element; - return end($this->children[$element_name]); - } - - protected function add_children_to_base_element() { - foreach ($this->children as $element_type => $elements) { - $base_element = $this->element; - foreach ($elements as $id => $element) { - $base_element->appendChild($element->get_element()); - } - } - } -} \ No newline at end of file diff --git a/modules/atom/libraries/Atom_Entry.php b/modules/atom/libraries/Atom_Entry.php deleted file mode 100644 index 70bc6e3a..00000000 --- a/modules/atom/libraries/Atom_Entry.php +++ /dev/null @@ -1,52 +0,0 @@ -element->appendChild($this->dom->createElement("id", $id)); - return $this; - } - - public function updated($timestamp) { - $this->element->appendChild( - $this->dom->createElement("updated", atom::unix_to_internet_timestamp($timestamp))); - return $this; - } - - public function title($title) { - $this->element->appendChild($this->dom->createElement("title", $title)); - return $this; - } - - public function content($text, $type="html") { - $content = $this->dom->createElement("content", html::specialchars($text)); - $content->setAttribute("type", $type); - $this->element->appendChild($content); - return $this; - } - - public function author() { - return $this->add_child("Atom_Author", "author"); - } - - public function link() { - return $this->add_child("Atom_Link", "link"); - } -} diff --git a/modules/atom/libraries/Atom_Feed.php b/modules/atom/libraries/Atom_Feed.php deleted file mode 100644 index 9625f951..00000000 --- a/modules/atom/libraries/Atom_Feed.php +++ /dev/null @@ -1,47 +0,0 @@ -element->appendChild($this->dom->createElement("id", $id)); - return $this; - } - - public function title($title) { - /* @todo Add optional type argument that defaults to "text" */ - $this->element->appendChild($this->dom->createElement("title", $title)); - return $this; - } - - public function updated($timestamp) { - $this->element->appendChild( - $this->dom->createElement("updated", atom::unix_to_internet_timestamp($timestamp))); - return $this; - } - - public function link() { - return $this->add_child("Atom_Link", "link"); - } - - public function entry() { - /* Create new empty entry. */ - return $this->add_child("Atom_Entry", "entry"); - } -} diff --git a/modules/atom/libraries/Atom_Link.php b/modules/atom/libraries/Atom_Link.php deleted file mode 100644 index 723675c1..00000000 --- a/modules/atom/libraries/Atom_Link.php +++ /dev/null @@ -1,41 +0,0 @@ -element->setAttribute("rel", $rel); - return $this; - } - - public function type($type) { - $this->element->setAttribute("type", $type); - return $this; - } - - public function title($title) { - $this->element->setAttribute("title", $title); - return $this; - } - - public function href($href) { - $this->element->setAttribute("href", $href); - return $this; - } -} diff --git a/modules/atom/libraries/Gallery_Atom_Entry.php b/modules/atom/libraries/Gallery_Atom_Entry.php deleted file mode 100644 index ee5abd07..00000000 --- a/modules/atom/libraries/Gallery_Atom_Entry.php +++ /dev/null @@ -1,39 +0,0 @@ -id(html::specialchars(url::abs_current())); - $this->link() - ->rel("self") - ->href(url::abs_current()); - } - - public function link() { - return $this->add_child("Gallery_Atom_Link", "link"); - } -} diff --git a/modules/atom/libraries/Gallery_Atom_Feed.php b/modules/atom/libraries/Gallery_Atom_Feed.php deleted file mode 100644 index ba44f15a..00000000 --- a/modules/atom/libraries/Gallery_Atom_Feed.php +++ /dev/null @@ -1,39 +0,0 @@ -id(html::specialchars(url::abs_current())); - $this->link() - ->rel("self") - ->href(url::abs_current()); - } - - public function link() { - return $this->add_child("Gallery_Atom_Link", "link"); - } -} diff --git a/modules/atom/libraries/Gallery_Atom_Link.php b/modules/atom/libraries/Gallery_Atom_Link.php deleted file mode 100644 index def0d497..00000000 --- a/modules/atom/libraries/Gallery_Atom_Link.php +++ /dev/null @@ -1,45 +0,0 @@ -rel("related") - ->type(rest::ATOM) - ->title($title) - ->href(sprintf("%s%s", url::base(true, "http"), $relative_uri)); - return $this; - } - - public function related_image($relative_uri, $title="", $image_type="jpeg") { - if (empty($title)) { - $title = t("Get related image"); - } - - $this->rel("related") - ->type("image/" . $image_type) - ->title($title) - ->href(sprintf("%s%s", url::base(true, "http"), $relative_uri)); - return $this; - } -} diff --git a/modules/developer/config/developer.php b/modules/developer/config/developer.php deleted file mode 100644 index 9f5919b3..00000000 --- a/modules/developer/config/developer.php +++ /dev/null @@ -1,69 +0,0 @@ - array("album_blocks" => t("Album block"), - "album_bottom" => t("Bottom of album content"), - "album_top" => t("Top of Album content"), - "admin_credits" => t("Administration page credits"), - "admin_footer" => t("Adminsitration page footer"), - "admin_header_top" => t("Top of administration page header"), - "admin_header_bottom" => t("Bottom of administration page header"), - "admin_page_bottom" => t("Bottom of administration page"), - "admin_page_top" => t("Top of administration page"), - "admin_head" => t("Adminstration page head"), - "credits" => t("Album or photo page credits"), - "dynamic_bottom" => t("Bottom of dynamic page content"), - "dynamic_top" => t("Top of dynamic page content"), - "footer" => t("Album or photo page footer"), - "head" => t("Album or photo page head"), - "header_bottom" => t("Album or photo header bottom"), - "header_top" => t("Album or photo header top"), - "page_bottom" => t("Album or photo bottom"), - "page_top" => t("Album or photo top"), - "photo_blocks" => t("Photo block"), - "photo_bottom" => t("Bottom of photo content"), - "photo_top" => t("Top of photo content"), - "sidebar_bottom" => t("Bottom of sidebar"), - "sidebar_top" => t("Top of sidebar"), - "thumb_bottom" => t("Bottom of thumbnail"), - "thumb_info" => t("Thumbnail information"), - "thumb_top" => t("Top of thumbnail display")), - "menu" => array("album" => t("Add an album menu element"), - "photo" => t("Add an photo menu element")), - "event" => array("batch_complete" => t("Batch completion"), - "comment_add_form" => t("Comment add form creation"), - "comment_created" => t("Comment created"), - "comment_updated" => t("Comment updated"), - "group_before_delete" => t("Before delete group"), - "group_created" => t("Group created"), - "item_before_delete" => t("Before album or photo deletion"), - "item_created" => t("Album or photo created"), - "item_related_update" => t("Photo meta data update"), - "item_related_update_batch" => t("Photo meta data update"), - "item_updated" => t("Album or photo update"), - "user_before_delete" => t("Before user deletion"), - "user_created" => t("User created"), - "user_login" => t("User login"), - "user_logout" => t("User logout"))); - \ No newline at end of file diff --git a/modules/developer/controllers/admin_developer.php b/modules/developer/controllers/admin_developer.php deleted file mode 100644 index b961959a..00000000 --- a/modules/developer/controllers/admin_developer.php +++ /dev/null @@ -1,127 +0,0 @@ -content = new View("admin_developer.html"); - if (!is_writable(MODPATH)) { - message::warning( - t("The module directory is not writable. Please insure that it is writable by the web server")); - } - list ($form, $errors) = $this->_get_module_form(); - $view->content->module_create = $this->_get_module_create_content($form, $errors); - print $view; - } - - public function module_create() { - access::verify_csrf(); - - list ($form, $errors) = $this->_get_module_form(); - - $post = new Validation($_POST); - $post->add_rules("name", "required"); - $post->add_rules("description", "required"); - $post->add_callbacks("name", array($this, "_is_module_defined")); - - if ($post->validate()) { - $task_def = Task_Definition::factory() - ->callback("developer_task::create_module") - ->description(t("Create a new module")) - ->name(t("Create Module")); - $task = task::create($task_def, array_merge(array("step" => 0), $post->as_array())); - - print json_encode(array("result" => "started", - "url" => url::site("admin/developer/run_create/{$task->id}?csrf=" . - access::csrf_token()), - "task" => $task->as_array())); - } else { - $v = $this->_get_module_create_content(arr::overwrite($form, $post->as_array()), - arr::overwrite($errors, $post->errors())); - print json_encode(array("result" => "error", - "form" => $v->__toString())); - } - } - - public function run_create($task_id) { - access::verify_csrf(); - - $task = task::run($task_id); - - if ($task->done) { - $context = unserialize($task->context); - switch ($task->state) { - case "success": - message::success(t("Generation of %module completed successfully", - array("module" => $context["name"]))); - break; - - case "error": - message::success(t("Generation of %module failed.", - array("module" => $context["name"]))); - break; - } - print json_encode(array("result" => "success", - "task" => $task->as_array())); - - } else { - print json_encode(array("result" => "in_progress", - "task" => $task->as_array())); - } - } - - public function session($key) { - if (!(user::active()->admin)) { - throw new Exception("@todo UNAUTHORIZED", 401); - } - - Session::instance()->set($key, $this->input->get("value", false)); - $this->auto_render = false; - url::redirect($_SERVER["HTTP_REFERER"]); - } - - private function _get_module_create_content($form, $errors) { - $config = Kohana::config("developer.methods"); - - $v = new View("developer_module.html"); - $v->action = "admin/developer/module_create"; - $v->hidden = array("csrf" => access::csrf_token()); - $v->theme = $config["theme"]; - $v->event = $config["event"]; - $v->menu = $config["menu"]; - $v->form = $form; - $v->errors = $errors; - return $v; - } - - public function _is_module_defined(Validation $post, $field) { - $module_name = $post[$field]; - if (file_exists(MODPATH . "$module_name/module.info")) { - $post->add_error($field, "module_exists"); - } - } - - private function _get_module_form($name="", $description="") { - $form = array("name" => "", "description" => "", "theme[]" => array(), "menu[]" => array(), - "event[]" => array()); - $errors = array_fill_keys(array_keys($form), ""); - - return array($form, $errors); - } -} diff --git a/modules/developer/helpers/developer_installer.php b/modules/developer/helpers/developer_installer.php deleted file mode 100644 index 8a49ffa6..00000000 --- a/modules/developer/helpers/developer_installer.php +++ /dev/null @@ -1,35 +0,0 @@ -id("developer_menu") - ->label(t("Developer Tools")); - $menu->append($developer_menu); - - $developer_menu - ->append(Menu::factory("link") - ->id("generate_menu") - ->label(t("Generate")) - ->url(url::site("admin/developer"))); - if (Session::instance()->get("profiler", false)) { - $developer_menu->append(Menu::factory("link") - ->id("scaffold_profiler") - ->label("Profiling off") - ->url(url::site("admin/developer/session/profiler?value=0"))); - } else { - $developer_menu->append(Menu::factory("link") - ->id("scaffold_profiler") - ->label("Profiling on") - ->url(url::site("admin/developer/session/profiler?value=1"))); - } - - if (Session::instance()->get("debug", false)) { - $developer_menu->append(Menu::factory("link") - ->id("scaffold_debugger") - ->label("Debugging off") - ->url(url::site("admin/developer/session/debug?value=0"))); - } else { - $developer_menu->append(Menu::factory("link") - ->id("scaffold_debugger") - ->label("Debugging on") - ->url(url::site("admin/developer/session/debug?value=1"))); - } - } -} diff --git a/modules/developer/helpers/developer_task.php b/modules/developer/helpers/developer_task.php deleted file mode 100644 index 5f5c6d7e..00000000 --- a/modules/developer/helpers/developer_task.php +++ /dev/null @@ -1,148 +0,0 @@ -context); - - if (empty($context["module"])) { - $context["class_name"] = strtr($context["name"], " ", "_"); - $context["module"] = strtolower($context["class_name"]); - $context["module_path"] = (MODPATH . $context["module"]); - } - - switch ($context["step"]) { - case 0: // Create directory tree - Kohana::log("debug", Kohana::debug($context)); - foreach (array("", "controllers", "helpers", "js", "views") as $dir) { - $path = "{$context['module_path']}/$dir"; - if (!file_exists($path)) { - mkdir($path); - chmod($path, 0774); - } - } - break; - case 1: // Generate installer - $context["installer"] = 1; - self::_render_helper_file($context, "installer"); - break; - case 2: // Generate theme helper - $context["theme"] = 1; - self::_render_helper_file($context, "theme"); - break; - case 3: // Generate block helper - $context["block"] = 1; - self::_render_helper_file($context, "block"); - break; - case 4: // Generate menu helper - $context["menu"] = empty($context["menu"]) ? 1 : $context["menu"]; - self::_render_helper_file($context, "menu"); - break; - case 5: // Generate event helper - self::_render_helper_file($context, "event"); - break; - case 6: // Generate admin controller - $file = "{$context['module_path']}/controllers/admin_{$context['module']}.php"; - ob_start(); - $v = new View("admin_controller.txt"); - $v->name = $context["name"]; - $v->module = $context["module"]; - $v->class_name = $context["class_name"]; - print $v->render(); - file_put_contents($file, ob_get_contents()); - ob_end_clean(); - break; - case 7: // Generate admin form - $file = "{$context['module_path']}/views/admin_{$context['module']}.html.php"; - ob_start(); - $v = new View("admin_html.txt"); - $v->name = $context["name"]; - $v->module = $context["module"]; - $v->css_id = preg_replace("#\s+#", "", $context["name"]); - print $v->render(); - file_put_contents($file, ob_get_contents()); - ob_end_clean(); - break; - case 8: // Generate controller - $file = "{$context['module_path']}/controllers/{$context['module']}.php"; - ob_start(); - $v = new View("controller.txt"); - $v->name = $context["name"]; - $v->module = $context["module"]; - $v->class_name = $context["class_name"]; - $v->css_id = preg_replace("#\s+#", "", $context["name"]); - print $v->render(); - file_put_contents($file, ob_get_contents()); - ob_end_clean(); - break; - case 9: // Generate sidebar block view - $file = "{$context['module_path']}/views/{$context['module']}_block.html.php"; - ob_start(); - $v = new View("block_html.txt"); - $v->name = $context["name"]; - $v->module = $context["module"]; - $v->class_name = $context["class_name"]; - $v->css_id = preg_replace("#\s+#", "", $context["name"]); - print $v->render(); - file_put_contents($file, ob_get_contents()); - ob_end_clean(); - break; - case 10: // Generate module.info (do last) - $file = "{$context["module_path"]}/module.info"; - ob_start(); - $v = new View("module_info.txt"); - $v->module_name = $context["name"]; - $v->module_description = $context["description"]; - print $v->render(); - file_put_contents($file, ob_get_contents()); - ob_end_clean(); - break; - } - $task->done = (++$context["step"]) >= 11; - $task->context = serialize($context); - $task->state = "success"; - $task->percent_complete = ($context["step"] / 11.0) * 100; - } - - private static function _render_helper_file($context, $helper) { - if (!empty($context[$helper])) { - $config = Kohana::config("developer.methods"); - $file = "{$context["module_path"]}/helpers/{$context["module"]}_{$helper}.php"; - touch($file); - chmod($file, 0772); - ob_start(); - $v = new View("$helper.txt"); - $v->helper = $helper; - $v->name = $context["name"]; - $v->module = $context["module"]; - $v->module_name = $context["name"]; - $v->css_id = strtr($context["name"], " ", ""); - $v->css_id = preg_replace("#\s#", "", $context["name"]); - $v->callbacks = empty($context[$helper]) ? array() : array_fill_keys($context[$helper], 1); - print $v->render(); - file_put_contents($file, ob_get_contents()); - ob_end_clean(); - } - } -} \ No newline at end of file diff --git a/modules/developer/js/developer.js b/modules/developer/js/developer.js deleted file mode 100644 index 78a95af4..00000000 --- a/modules/developer/js/developer.js +++ /dev/null @@ -1,39 +0,0 @@ -$("#gDeveloperTools").ready(function() { - $("#gDeveloperTools").tabs(); -}); - -var module_success = function(data) { - $("#gGenerateModule").after('
'); - $("#moduleProgress").progressbar(); - - var task = data.task; - var url = data.url; - var done = false; - while (!done) { - $.ajax({async: false, - success: function(data, textStatus) { - $("#moduleProgress").progressbar("value", data.task.percent_complete); - done = data.task.done; - }, - dataType: "json", - type: "POST", - url: url - }); - } - document.location.reload(); -}; - -function ajaxify_developer_form(selector, success) { - $(selector).ajaxForm({ - dataType: "json", - success: function(data) { - if (data.form && data.result != "started") { - $(selector).replaceWith(data.form); - ajaxify_developer_form(selector, success); - } - if (data.result == "started") { - success(data); - } - } - }); -} diff --git a/modules/developer/module.info b/modules/developer/module.info deleted file mode 100644 index 4a8adef7..00000000 --- a/modules/developer/module.info +++ /dev/null @@ -1,3 +0,0 @@ -name = Developer -description = Tools to assist module and theme developers -version = 1 diff --git a/modules/developer/views/admin_controller.txt.php b/modules/developer/views/admin_controller.txt.php deleted file mode 100644 index 7f741378..00000000 --- a/modules/developer/views/admin_controller.txt.php +++ /dev/null @@ -1,57 +0,0 @@ - - -/** - * 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__Controller extends Admin_Controller { - public function index() { - print $this->_get_view(); - } - - public function handler() { - access::verify_csrf(); - - $form = $this->_get_form(); - if ($form->validate()) { - // @todo process the admin form - - message::success(t(" Adminstration Complete Successfully")); - - url::redirect("admin/"); - } - - print $this->_get_view($form); - } - - private function _get_view($form=null) { - $v = new Admin_View("admin.html"); - $v->content = new View("admin_.html"); - $v->content->form = empty($form) ? $this->_get_form() : $form; - return $v; - } - - private function _get_form() { - $form = new Forge("admin//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_developer.html.php b/modules/developer/views/admin_developer.html.php deleted file mode 100644 index eeebaa03..00000000 --- a/modules/developer/views/admin_developer.html.php +++ /dev/null @@ -1,15 +0,0 @@ - - -
-

- -

-
-
    -
  • -
-
- -
-
-
diff --git a/modules/developer/views/admin_html.txt.php b/modules/developer/views/admin_html.txt.php deleted file mode 100644 index 5408cdab..00000000 --- a/modules/developer/views/admin_html.txt.php +++ /dev/null @@ -1,10 +0,0 @@ - -" ?> - -
-

- " ?> -

- " ?> - -
diff --git a/modules/developer/views/block.txt.php b/modules/developer/views/block.txt.php deleted file mode 100644 index 56c0bf8c..00000000 --- a/modules/developer/views/block.txt.php +++ /dev/null @@ -1,38 +0,0 @@ - - -/** - * 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 _block { - static function get($block_id) { - $block = new Block(); - if ($block_id == "") { - $block->css_id = "gAdmin"; - $block->title = t(" Dashboard Block"); - $block->content = new View("block.html"); - - $block->content->item = ORM::factory("item", 1); - } - return $block; - } - - static function get_list() { - return array( - "" => t(" Dashboard Block")); - } -} diff --git a/modules/developer/views/block_html.txt.php b/modules/developer/views/block_html.txt.php deleted file mode 100644 index b0e07a1a..00000000 --- a/modules/developer/views/block_html.txt.php +++ /dev/null @@ -1,10 +0,0 @@ - -" ?> - -
- url() ?>\">" ?> - - thumb_tag(array(\"class\" => \"gThumbnail\")) ?>" ?> - - -
diff --git a/modules/developer/views/controller.txt.php b/modules/developer/views/controller.txt.php deleted file mode 100644 index b11fa5f3..00000000 --- a/modules/developer/views/controller.txt.php +++ /dev/null @@ -1,53 +0,0 @@ - - -/** - * 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 _Controller extends Controller { - public function index() { - print $this->_get_form(); - } - - public function handler() { - access::verify_csrf(); - - $form = $this->_get_form(); - if ($form->validate()) { - // @todo process the admin form - - message::success(t(" Processing Successfully")); - - print json_encode( - array("result" => "success")); - } else { - print json_encode( - array("result" => "error", - "form" => $form->__toString())); - } - } - - private function _get_form() { - $form = new Forge("/handler", "", "post", - array("id" => "gForm")); - $group = $form->group("group")->label(t(" Handler")); - $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/developer_module.html.php b/modules/developer/views/developer_module.html.php deleted file mode 100644 index 4ce28ff7..00000000 --- a/modules/developer/views/developer_module.html.php +++ /dev/null @@ -1,49 +0,0 @@ - - -
- "post"), $hidden) ?> - - -
diff --git a/modules/developer/views/event.txt.php b/modules/developer/views/event.txt.php deleted file mode 100644 index e2731f96..00000000 --- a/modules/developer/views/event.txt.php +++ /dev/null @@ -1,96 +0,0 @@ - - -/** - * 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 _event { - - static function batch_complete() { - } - - - - static function comment_add_form($form) { - } - - - - static function comment_created($theme, $args) { - } - - - - static function comment_updated($old, $new) { - } - - - - static function group_before_delete($group) { - } - - - - static function group_created($group) { - } - - - - static function item_before_delete($item) { - } - - - - static function item_created($item) { - } - - - - static function item_related_update($item) { - } - - - - static function item_related_update_batch($sql) { - } - - - - static function item_updated($old, $new) { - } - - - - static function user_before_delete($user) { - } - - - - static function user_created($user) { - } - - - - static function user_login($user) { - } - - - - static function user_logout($user) { - } - -} diff --git a/modules/developer/views/installer.txt.php b/modules/developer/views/installer.txt.php deleted file mode 100644 index 1ccc3327..00000000 --- a/modules/developer/views/installer.txt.php +++ /dev/null @@ -1,34 +0,0 @@ - - -/** - * 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 _installer { - static function install() { - $version = module::get_version(""); - if ($version == 0) { - /* @todo Put database creation here */ - module::set_version("", 1); - } - } - - static function uninstall() { - /* @todo Put database table drops here */ - module::delete(""); - } -} diff --git a/modules/developer/views/menu.txt.php b/modules/developer/views/menu.txt.php deleted file mode 100644 index dd315972..00000000 --- a/modules/developer/views/menu.txt.php +++ /dev/null @@ -1,51 +0,0 @@ - - -/** - * 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 _menu { - static function admin($menu, $theme) { - $menu->get("settings_menu") - ->append(Menu::factory("link") - ->id("_menu") - ->label(t(" Administration")) - ->url(url::site("admin/"))); - } - - - static function album($menu, $theme) { - } - - - - static function photo($menu, $theme) { - } - - - static function site($menu, $theme) { - $item = $theme->item(); - - if ($item && access::can("edit", $item)) { - $options_menu = $menu->get("options_menu") - ->append(Menu::factory("dialog") - ->id("") - ->label(t("Peform Processing")) - ->url(url::site("/index/$item->id"))); - } - } -} diff --git a/modules/developer/views/module_info.txt.php b/modules/developer/views/module_info.txt.php deleted file mode 100644 index 4c4b4280..00000000 --- a/modules/developer/views/module_info.txt.php +++ /dev/null @@ -1,5 +0,0 @@ -name = - -description = - -version = 1 diff --git a/modules/developer/views/theme.txt.php b/modules/developer/views/theme.txt.php deleted file mode 100644 index 339a7553..00000000 --- a/modules/developer/views/theme.txt.php +++ /dev/null @@ -1,168 +0,0 @@ - - -/** - * 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 _theme { - static function sidebar_blocks($theme) { - $block = new Block(); - $block->css_id = "g"; - $block->title = t(""); - $block->content = new View("_block.html"); - - $block->content->item = ORM::factory("item", 1); - - return $block; - } - - - static function album_blocks($theme) { - } - - - - static function album_bottom($theme) { - } - - - - static function album_top($theme) { - } - - - - static function admin_credits($theme) { - } - - - - static function admin_footer($theme) { - } - - - - static function admin_header_top($theme) { - } - - - - static function admin_header_bottom($theme) { - } - - - - static function admin_page_bottom($theme) { - } - - - - static function admin_page_top($theme) { - } - - - - static function admin_head($theme) { - } - - - - static function credits($theme) { - } - - - - static function dynamic_bottom($theme) { - } - - - - static function dynamic_top($theme) { - } - - - - static function footer($theme) { - } - - - - static function head($theme) { - } - - - - static function header_bottom($theme) { - } - - - - static function header_top($theme) { - } - - - - static function page_bottom($theme) { - } - - - - static function page_top($theme) { - } - - - - static function photo_blocks($theme) { - } - - - - static function photo_bottom($theme) { - } - - - - static function photo_top($theme) { - } - - - - static function sidebar_bottom($theme) { - } - - - - static function sidebar_top($theme) { - } - - - - static function thumb_bottom($theme, $child) { - } - - - - static function thumb_info($theme, $child) { - } - - - - static function thumb_top($theme, $child) { - } - - -} diff --git a/modules/gmaps/helpers/gmaps_installer.php b/modules/gmaps/helpers/gmaps_installer.php deleted file mode 100644 index 747f84f7..00000000 --- a/modules/gmaps/helpers/gmaps_installer.php +++ /dev/null @@ -1,31 +0,0 @@ -item()) { - $block = new Block(); - $block->css_id = "gMaps"; - $block->title = t("Location"); - $block->content = new View("gmaps_block.html"); - return $block; - } - } -} \ No newline at end of file diff --git a/modules/gmaps/module.info b/modules/gmaps/module.info deleted file mode 100644 index 32d7570f..00000000 --- a/modules/gmaps/module.info +++ /dev/null @@ -1,3 +0,0 @@ -name = Google Maps -description = Integrate with the Google Maps service -version = 1 diff --git a/modules/gmaps/views/gmaps_block.html.php b/modules/gmaps/views/gmaps_block.html.php deleted file mode 100644 index 48b37600..00000000 --- a/modules/gmaps/views/gmaps_block.html.php +++ /dev/null @@ -1,2 +0,0 @@ - -
View Larger Map \ No newline at end of file diff --git a/modules/polar_rose/helpers/polar_rose_installer.php b/modules/polar_rose/helpers/polar_rose_installer.php deleted file mode 100644 index d8e779f4..00000000 --- a/modules/polar_rose/helpers/polar_rose_installer.php +++ /dev/null @@ -1,32 +0,0 @@ -item()) { - $url = rss::item_feed($theme->item()); - } else if ($theme->tag()) { - $url = rss::tag_feed($theme->tag()); - } - - // Polar Rose doesn't understand relative URLs. Hack around that until they fix it. - $url = url::abs_site(substr($url, strpos($url, "index.php") + 10)); - - return "" . - ""; - } - } - - static function page_bottom($theme) { - return "
"; - } -} diff --git a/modules/polar_rose/module.info b/modules/polar_rose/module.info deleted file mode 100644 index 45d02421..00000000 --- a/modules/polar_rose/module.info +++ /dev/null @@ -1,3 +0,0 @@ -name = Polar Rose -description = Integrate Gallery with the Polar Rose facial recognition service. -version = 1 -- cgit v1.2.3