Merge branch 'master' of git@github.com:gallery/gallery3

This commit is contained in:
Tim Almdal
2009-07-28 20:49:50 -07:00
30 changed files with 301 additions and 588 deletions

View File

@@ -51,4 +51,20 @@ class akismet_event_Core {
akismet::submit_ham($new);
}
}
static function admin_menu($menu, $theme) {
$menu->get("settings_menu")
->append(Menu::factory("link")
->id("akismet")
->label(t("Akismet"))
->url(url::site("admin/akismet")));
if (module::get_var("akismet", "api_key")) {
$menu->get("statistics_menu")
->append(Menu::factory("link")
->id("akismet")
->label(t("Akismet"))
->url(url::site("admin/akismet/stats")));
}
}
}

View File

@@ -1,36 +0,0 @@
<?php defined("SYSPATH") or die("No direct script access.");
/**
* Gallery - a web based photo album viewer and editor
* Copyright (C) 2000-2009 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 akismet_menu_Core {
static function admin($menu, $theme) {
$menu->get("settings_menu")
->append(Menu::factory("link")
->id("akismet")
->label(t("Akismet"))
->url(url::site("admin/akismet")));
if (module::get_var("akismet", "api_key")) {
$menu->get("statistics_menu")
->append(Menu::factory("link")
->id("akismet")
->label(t("Akismet"))
->url(url::site("admin/akismet/stats")));
}
}
}

View File

@@ -21,4 +21,32 @@ class comment_event_Core {
static function item_deleted($item) {
Database::instance()->delete("comments", array("item_id" => $item->id));
}
static function admin_menu($menu, $theme) {
$menu->get("content_menu")
->append(Menu::factory("link")
->id("comments")
->label(t("Comments"))
->url(url::site("admin/comments")));
}
static function photo_menu($menu, $theme) {
$menu
->append(Menu::factory("link")
->id("comments")
->label(t("View comments on this item"))
->url("#comments")
->css_id("gCommentsLink"));
}
static function item_index_data($item, $data) {
foreach (Database::instance()
->select("text")
->from("comments")
->where("item_id", $item->id)
->get()
->as_array() as $row) {
$data[] = $row->text;
}
}
}

View File

@@ -1,37 +0,0 @@
<?php defined("SYSPATH") or die("No direct script access.");
/**
* Gallery - a web based photo album viewer and editor
* Copyright (C) 2000-2009 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 comment_menu_Core {
static function admin($menu, $theme) {
$menu->get("content_menu")
->append(Menu::factory("link")
->id("comments")
->label(t("Comments"))
->url(url::site("admin/comments")));
}
static function photo($menu, $theme) {
$menu
->append(Menu::factory("link")
->id("comments")
->label(t("View comments on this item"))
->url("#comments")
->css_id("gCommentsLink"));
}
}

View File

@@ -1,34 +0,0 @@
<?php defined("SYSPATH") or die("No direct script access.");
/**
* Gallery - a web based photo album viewer and editor
* Copyright (C) 2000-2009 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 Comment_Search_Core {
static function item_index_data($item) {
$data = array();
foreach (Database::instance()
->select("text")
->from("comments")
->where("item_id", $item->id)
->get()
->as_array() as $row) {
$data[] = $row->text;
}
return join(" ", $data);
}
}

View File

@@ -17,8 +17,8 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
*/
class digibug_menu {
static function admin($menu, $theme) {
class digibug_event_Core {
static function admin_menu($menu, $theme) {
$menu->get("settings_menu")
->append(Menu::factory("link")
->id("digibug_menu")
@@ -26,7 +26,7 @@ class digibug_menu {
->url(url::site("admin/digibug")));
}
static function photo($menu, $theme) {
static function photo_menu($menu, $theme) {
$item = $theme->item();
$menu->append(
Menu::factory("link")
@@ -36,7 +36,7 @@ class digibug_menu {
->css_id("gDigibugLink"));
}
static function thumb($menu, $theme, $item) {
static function thumb_menu($menu, $theme, $item) {
if ($item->type == "photo") {
$menu->get("options_menu")
->append(

View File

@@ -25,4 +25,13 @@ class g2_import_event_Core {
static function item_created($item) {
g2_import::copy_matching_thumbnails_and_resizes($item);
}
static function admin_menu($menu, $theme) {
$menu
->get("settings_menu")
->append(Menu::factory("link")
->id("g2_import")
->label(t("Gallery 2 Import"))
->url(url::site("admin/g2_import")));
}
}

View File

@@ -1,29 +0,0 @@
<?php defined("SYSPATH") or die("No direct script access.");
/**
* Gallery - a web based photo album viewer and editor
* Copyright (C) 2000-2009 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 g2_import_menu_Core {
static function admin($menu, $theme) {
$menu
->get("settings_menu")
->append(Menu::factory("link")
->id("g2_import")
->label(t("Gallery 2 Import"))
->url(url::site("admin/g2_import")));
}
}

View File

@@ -78,4 +78,122 @@ class gallery_Core {
static function time($timestamp) {
return date(module::get_var("gallery", "time_format", "H:i:s"), $timestamp);
}
static function site_menu($menu, $theme) {
if ($theme->page_type != "login") {
$menu->append(Menu::factory("link")
->id("home")
->label(t("Home"))
->url(url::site("albums/1")));
$item = $theme->item();
$can_edit = $item && access::can("edit", $item);
$can_add = $item && access::can("add", $item);
if ($can_add) {
$menu->append(Menu::factory("dialog")
->id("add_photos_item")
->label(t("Add photos"))
->url(url::site("simple_uploader/app/$item->id")));
}
$menu->append($options_menu = Menu::factory("submenu")
->id("options_menu")
->label(t("Options")));
if ($item && ($can_edit || $can_add)) {
if ($can_edit) {
$options_menu
->append(Menu::factory("dialog")
->id("edit_item")
->label($item->is_album() ? t("Edit album") : t("Edit photo"))
->url(url::site("form/edit/{$item->type}s/$item->id")));
}
// @todo Move album options menu to the album quick edit pane
if ($item->is_album()) {
if ($can_add) {
$options_menu
->append(Menu::factory("dialog")
->id("add_album")
->label(t("Add an album"))
->url(url::site("form/add/albums/$item->id?type=album")));
}
if ($can_edit) {
$options_menu
->append(Menu::factory("dialog")
->id("edit_permissions")
->label(t("Edit permissions"))
->url(url::site("permissions/browse/$item->id")));
}
}
}
if (user::active()->admin) {
$menu->append($admin_menu = Menu::factory("submenu")
->id("admin_menu")
->label(t("Admin")));
gallery::admin_menu($admin_menu, $theme);
module::event("admin_menu", $admin_menu, $theme);
}
module::event("site_menu", $menu, $theme);
}
}
static function admin_menu($menu, $theme) {
$menu
->append(Menu::factory("link")
->id("dashboard")
->label(t("Dashboard"))
->url(url::site("admin")))
->append(Menu::factory("submenu")
->id("settings_menu")
->label(t("Settings"))
->append(Menu::factory("link")
->id("graphics_toolkits")
->label(t("Graphics"))
->url(url::site("admin/graphics")))
->append(Menu::factory("link")
->id("languages")
->label(t("Languages"))
->url(url::site("admin/languages")))
->append(Menu::factory("link")
->id("l10n_mode")
->label(Session::instance()->get("l10n_mode", false)
? t("Stop translating") : t("Start translating"))
->url(url::site("l10n_client/toggle_l10n_mode?csrf=" .
access::csrf_token())))
->append(Menu::factory("link")
->id("advanced")
->label(t("Advanced"))
->url(url::site("admin/advanced_settings"))))
->append(Menu::factory("link")
->id("modules")
->label(t("Modules"))
->url(url::site("admin/modules")))
->append(Menu::factory("submenu")
->id("content_menu")
->label(t("Content")))
->append(Menu::factory("submenu")
->id("appearance_menu")
->label(t("Appearance"))
->append(Menu::factory("link")
->id("themes")
->label(t("Theme Choice"))
->url(url::site("admin/themes")))
->append(Menu::factory("link")
->id("theme_options")
->label(t("Theme Options"))
->url(url::site("admin/theme_options"))))
->append(Menu::factory("submenu")
->id("statistics_menu")
->label(t("Statistics")))
->append(Menu::factory("link")
->id("maintenance")
->label(t("Maintenance"))
->url(url::site("admin/maintenance")));
return $menu;
}
}

View File

@@ -47,4 +47,10 @@ class gallery_event_Core {
module::clear_var("gallery", "choose_default_tookit");
}
}
static function item_index_data($item, $data) {
$data[] = $item->description;
$data[] = $item->name;
$data[] = $item->title;
}
}

View File

@@ -1,164 +0,0 @@
<?php defined("SYSPATH") or die("No direct script access.");
/**
* Gallery - a web based photo album viewer and editor
* Copyright (C) 2000-2009 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 gallery_menu_Core {
static function site($menu, $theme) {
$menu->append(Menu::factory("link")
->id("home")
->label(t("Home"))
->url(url::site("albums/1")));
$item = $theme->item();
$can_edit = $item && access::can("edit", $item);
$can_add = $item && access::can("add", $item);
if ($can_add) {
$menu->append(Menu::factory("dialog")
->id("add_photos_item")
->label(t("Add photos"))
->url(url::site("simple_uploader/app/$item->id")));
}
$menu->append($options_menu = Menu::factory("submenu")
->id("options_menu")
->label(t("Options")));
if ($item && ($can_edit || $can_add)) {
if ($can_edit) {
$options_menu
->append(Menu::factory("dialog")
->id("edit_item")
->label($item->is_album() ? t("Edit album") : t("Edit photo"))
->url(url::site("form/edit/{$item->type}s/$item->id")));
}
// @todo Move album options menu to the album quick edit pane
if ($item->is_album()) {
if ($can_add) {
$options_menu
->append(Menu::factory("dialog")
->id("add_album")
->label(t("Add an album"))
->url(url::site("form/add/albums/$item->id?type=album")));
}
if ($can_edit) {
$options_menu
->append(Menu::factory("dialog")
->id("edit_permissions")
->label(t("Edit permissions"))
->url(url::site("permissions/browse/$item->id")));
}
}
}
if (user::active()->admin) {
$menu->append($admin_menu = Menu::factory("submenu")
->id("admin_menu")
->label(t("Admin")));
self::admin($admin_menu, $theme);
foreach (module::active() as $module) {
if ($module->name == "gallery") {
continue;
}
$class = "{$module->name}_menu";
if (method_exists($class, "admin")) {
call_user_func_array(array($class, "admin"), array(&$admin_menu, $theme));
}
}
}
}
static function album($menu, $theme) {
}
static function tag($menu, $theme) {
}
static function thumb($menu, $theme, $item) {
$menu->append(Menu::factory("submenu")
->id("options_menu")
->label(t("Options"))
->css_class("gThumbMenu"));
}
static function photo($menu, $theme) {
if (access::can("view_full", $theme->item())) {
$menu->append(Menu::factory("link")
->id("fullsize")
->label(t("View full size"))
->url($theme->item()->file_url())
->css_class("gFullSizeLink"));
}
}
static function admin($menu, $theme) {
$menu
->append(Menu::factory("link")
->id("dashboard")
->label(t("Dashboard"))
->url(url::site("admin")))
->append(Menu::factory("submenu")
->id("settings_menu")
->label(t("Settings"))
->append(Menu::factory("link")
->id("graphics_toolkits")
->label(t("Graphics"))
->url(url::site("admin/graphics")))
->append(Menu::factory("link")
->id("languages")
->label(t("Languages"))
->url(url::site("admin/languages")))
->append(Menu::factory("link")
->id("l10n_mode")
->label(Session::instance()->get("l10n_mode", false)
? t("Stop translating") : t("Start translating"))
->url(url::site("l10n_client/toggle_l10n_mode?csrf=" .
access::csrf_token())))
->append(Menu::factory("link")
->id("advanced")
->label(t("Advanced"))
->url(url::site("admin/advanced_settings"))))
->append(Menu::factory("link")
->id("modules")
->label(t("Modules"))
->url(url::site("admin/modules")))
->append(Menu::factory("submenu")
->id("content_menu")
->label(t("Content")))
->append(Menu::factory("submenu")
->id("appearance_menu")
->label(t("Appearance"))
->append(Menu::factory("link")
->id("themes")
->label(t("Theme Choice"))
->url(url::site("admin/themes")))
->append(Menu::factory("link")
->id("theme_options")
->label(t("Theme Options"))
->url(url::site("admin/theme_options"))))
->append(Menu::factory("submenu")
->id("statistics_menu")
->label(t("Statistics")))
->append(Menu::factory("link")
->id("maintenance")
->label(t("Maintenance"))
->url(url::site("admin/maintenance")));
}
}

View File

@@ -1,24 +0,0 @@
<?php defined("SYSPATH") or die("No direct script access.");
/**
* Gallery - a web based photo album viewer and editor
* Copyright (C) 2000-2009 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 gallery_search_Core {
static function item_index_data($item) {
return join(" ", array($item->description, $item->name, $item->title));
}
}

View File

@@ -46,20 +46,10 @@ class Admin_View_Core extends Gallery_View {
public function admin_menu() {
$menu = Menu::factory("root");
gallery_menu::admin($menu, $this);
foreach (module::active() as $module) {
if ($module->name == "gallery") {
continue;
}
$class = "{$module->name}_menu";
if (method_exists($class, "admin")) {
call_user_func_array(array($class, "admin"), array(&$menu, $this));
}
}
gallery::admin_menu($menu, $this);
module::event("admin_menu", $menu, $this);
$menu->compact();
print $menu;
return $menu;
}
/**

View File

@@ -80,53 +80,45 @@ class Theme_View_Core extends Gallery_View {
public function site_menu() {
$menu = Menu::factory("root");
if ($this->page_type != "login") {
gallery_menu::site($menu, $this);
foreach (module::active() as $module) {
if ($module->name == "gallery") {
continue;
}
$class = "{$module->name}_menu";
if (method_exists($class, "site")) {
call_user_func_array(array($class, "site"), array(&$menu, $this));
}
}
}
$menu->compact();
print $menu;
gallery::site_menu($menu, $this);
module::event("site_menu", $menu, $this);
return $menu->compact();
}
public function album_menu() {
print $this->_menu("album");
$menu = Menu::factory("root");
module::event("album_menu", $menu, $this);
return $menu->compact();
}
public function tag_menu() {
print $this->_menu("tag");
$menu = Menu::factory("root");
module::event("tag_menu", $menu, $this);
return $menu->compact();
}
public function photo_menu() {
print $this->_menu("photo");
$menu = Menu::factory("root");
if (access::can("view_full", $this->item())) {
$menu->append(Menu::factory("link")
->id("fullsize")
->label(t("View full size"))
->url($this->item()->file_url())
->css_class("gFullSizeLink"));
}
module::event("photo_menu", $menu, $this);
return $menu->compact();
}
public function thumb_menu($item) {
print $this->_menu("thumb", $item)->css_class("gThumbMenu");
}
private function _menu($type, $item=null) {
$menu = Menu::factory("root");
call_user_func_array(array("gallery_menu", $type), array(&$menu, $this, $item));
foreach (module::active() as $module) {
if ($module->name == "gallery") {
continue;
}
$class = "{$module->name}_menu";
if (method_exists($class, $type)) {
call_user_func_array(array($class, $type), array(&$menu, $this, $item));
}
}
$menu = Menu::factory("root")
->append(Menu::factory("submenu")
->id("options_menu")
->label(t("Options")))
->css_class("gThumbMenu");
module::event("thumb_menu", $menu, $this, $item);
return $menu->compact();
}

View File

@@ -10,6 +10,9 @@
if (target_value - current_value > delta) {
delta += .075;
}
if (target_value == 100) {
new_value = 100;
}
$(".gProgressBar").progressbar("value", new_value);
animation = setTimeout(function() { animate_progress_bar(target_value); }, 100);
} else {

View File

@@ -55,4 +55,23 @@ class notification_event_Core {
static function batch_complete() {
notification::send_pending_notifications();
}
static function site_menu($menu, $theme) {
if (!user::active()->guest) {
$item = $theme->item();
if ($item && $item->is_album() && access::can("view", $item)) {
$watching = notification::is_watching($item);
$label = $watching ? t("Remove notifications") : t("Enable notifications");
$menu->get("options_menu")
->append(Menu::factory("link")
->id("watch")
->label($label)
->css_id("gNotifyLink")
->url(url::site("notification/watch/$item->id?csrf=" . access::csrf_token())));
}
}
}
}

View File

@@ -1,39 +0,0 @@
<?php defined("SYSPATH") or die("No direct script access.");
/**
* Gallery - a web based photo album viewer and editor
* Copyright (C) 2000-2009 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 notification_menu_Core {
static function site($menu, $theme) {
if (!user::active()->guest) {
$item = $theme->item();
if ($item && $item->is_album() && access::can("view", $item)) {
$watching = notification::is_watching($item);
$label = $watching ? t("Remove notifications") : t("Enable notifications");
$menu->get("options_menu")
->append(Menu::factory("link")
->id("watch")
->label($label)
->css_id("gNotifyLink")
->url(url::site("notification/watch/$item->id?csrf=" . access::csrf_token())));
}
}
}
}

View File

@@ -17,8 +17,8 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
*/
class organize_menu {
static function site($menu, $theme) {
class organize_event_Core {
static function site_menu($menu, $theme) {
$item = $theme->item();
if ($item && access::can("edit", $item) && $item->is_album()) {

View File

@@ -23,4 +23,12 @@ class recaptcha_event_Core {
$form->add_comment->recaptcha("recaptcha")->label("")->id("gRecaptcha");
}
}
static function admin_menu($menu, $theme) {
$menu->get("settings_menu")
->append(Menu::factory("link")
->id("recaptcha")
->label(t("reCAPTCHA"))
->url(url::site("admin/recaptcha")));
}
}

View File

@@ -1,28 +0,0 @@
<?php defined("SYSPATH") or die("No direct script access.");
/**
* Gallery - a web based photo album viewer and editor
* Copyright (C) 2000-2009 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 recaptcha_menu_Core {
static function admin($menu, $theme) {
$menu->get("settings_menu")
->append(Menu::factory("link")
->id("recaptcha")
->label(t("reCAPTCHA"))
->url(url::site("admin/recaptcha")));
}
}

View File

@@ -64,19 +64,15 @@ class search_Core {
}
static function update($item) {
$data = array();
$data = new ArrayObject();
$record = ORM::factory("search_record")->where("item_id", $item->id)->find();
if (!$record->loaded) {
$record->item_id = $item->id;
}
foreach (module::active() as $module) {
$class_name = "{$module->name}_search";
if (method_exists($class_name, "item_index_data")) {
$data[] = call_user_func(array($class_name, "item_index_data"), $record->item());
}
}
$record->data = join(" ", $data);
module::event("item_index_data", $record->item(), $data);
Kohana::log("alert",print_r($data,1));
$record->data = join(" ", (array)$data);
$record->dirty = 0;
$record->save();
}

View File

@@ -17,8 +17,8 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
*/
class server_add_menu_Core {
static function admin($menu, $theme) {
class server_add_event_Core {
static function admin_menu($menu, $theme) {
$menu->get("settings_menu")
->append(Menu::factory("link")
->id("server_add")
@@ -26,7 +26,7 @@ class server_add_menu_Core {
->url(url::site("admin/server_add")));
}
static function site($menu, $theme) {
static function site_menu($menu, $theme) {
$item = $theme->item();
$paths = unserialize(module::get_var("server_add", "authorized_paths"));

View File

@@ -29,4 +29,34 @@ class slideshow_event_Core {
site_status::clear("slideshow_needs_rss");
}
}
static function album_menu($menu, $theme) {
$menu
->append(Menu::factory("link")
->id("slideshow")
->label(t("View slideshow"))
->url("javascript:PicLensLite.start(" .
"{maxScale:0,feedUrl:PicLensLite.indexFeeds()[0].url})")
->css_id("gSlideshowLink"));
}
static function photo_menu($menu, $theme) {
$menu
->append(Menu::factory("link")
->id("slideshow")
->label(t("View slideshow"))
->url("javascript:PicLensLite.start(" .
"{maxScale:0,feedUrl:PicLensLite.indexFeeds()[0].url})")
->css_id("gSlideshowLink"));
}
static function tag_menu($menu, $theme) {
$menu
->append(Menu::factory("link")
->id("slideshow")
->label(t("View slideshow"))
->url("javascript:PicLensLite.start(" .
"{maxScale:0,feedUrl:PicLensLite.indexFeeds()[0].url})")
->css_id("gSlideshowLink"));
}
}

View File

@@ -1,51 +0,0 @@
<?php defined("SYSPATH") or die("No direct script access.");
/**
* Gallery - a web based photo album viewer and editor
* Copyright (C) 2000-2009 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 slideshow_menu_Core {
static function album($menu, $theme) {
$menu
->append(Menu::factory("link")
->id("slideshow")
->label(t("View slideshow"))
->url("javascript:PicLensLite.start(" .
"{maxScale:0,feedUrl:PicLensLite.indexFeeds()[0].url})")
->css_id("gSlideshowLink"));
}
static function photo($menu, $theme) {
$menu
->append(Menu::factory("link")
->id("slideshow")
->label(t("View slideshow"))
->url("javascript:PicLensLite.start(" .
"{maxScale:0,feedUrl:PicLensLite.indexFeeds()[0].url})")
->css_id("gSlideshowLink"));
}
static function tag($menu, $theme) {
$menu
->append(Menu::factory("link")
->id("slideshow")
->label(t("View slideshow"))
->url("javascript:PicLensLite.start(" .
"{maxScale:0,feedUrl:PicLensLite.indexFeeds()[0].url})")
->css_id("gSlideshowLink"));
}
}

View File

@@ -85,4 +85,16 @@ class tag_event_Core {
}
tag::compact();
}
static function admin_menu($menu, $theme) {
$menu->get("content_menu")
->append(Menu::factory("link")
->id("tags")
->label(t("Tags"))
->url(url::site("admin/tags")));
}
static function item_index_data($item, $data) {
$data[] = join(" ", tag::item_tags($item));
}
}

View File

@@ -1,28 +0,0 @@
<?php defined("SYSPATH") or die("No direct script access.");
/**
* Gallery - a web based photo album viewer and editor
* Copyright (C) 2000-2009 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 tag_menu_Core {
static function admin($menu, $theme) {
$menu->get("content_menu")
->append(Menu::factory("link")
->id("tags")
->label(t("Tags"))
->url(url::site("admin/tags")));
}
}

View File

@@ -1,24 +0,0 @@
<?php defined("SYSPATH") or die("No direct script access.");
/**
* Gallery - a web based photo album viewer and editor
* Copyright (C) 2000-2009 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 tag_search_Core {
static function item_index_data($item) {
return join(" ", tag::item_tags($item));
}
}

View File

@@ -30,4 +30,12 @@ class user_event_Core {
I18n::instance()->locale($locale);
}
}
static function admin_menu($menu, $theme) {
$menu->add_after("appearance_menu",
Menu::factory("link")
->id("users_groups")
->label(t("Users/Groups"))
->url(url::site("admin/users")));
}
}

View File

@@ -1,28 +0,0 @@
<?php defined("SYSPATH") or die("No direct script access.");
/**
* Gallery - a web based photo album viewer and editor
* Copyright (C) 2000-2009 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 user_menu_Core {
static function admin($menu, $theme) {
$menu->add_after("appearance_menu",
Menu::factory("link")
->id("users_groups")
->label(t("Users/Groups"))
->url(url::site("admin/users")));
}
}

View File

@@ -17,8 +17,8 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
*/
class watermark_menu_Core {
static function admin($menu, $theme) {
class watermark_event_Core {
static function admin_menu($menu, $theme) {
$menu->get("content_menu")
->append(
Menu::factory("link")