Skip to content

Commit

Permalink
Merge branch 'master' of github.com:gallery/gallery3-contrib
Browse files Browse the repository at this point in the history
  • Loading branch information
bharat committed Apr 10, 2010
2 parents a75547c + 39bd689 commit 8fa3381
Show file tree
Hide file tree
Showing 476 changed files with 15,863 additions and 14,214 deletions.
2 changes: 1 addition & 1 deletion client/Gallery3.php
@@ -1,7 +1,7 @@
<?php
/**
* Gallery - a web based photo album viewer and editor
* Copyright (C) 2000-2009 Bharat Mediratta
* Copyright (C) 2000-2010 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
Expand Down
4 changes: 2 additions & 2 deletions client/example.php
Expand Up @@ -37,9 +37,9 @@

$photo = Gallery3::factory()
->set("type", "photo")
->set("name", "Sample Photo.jpg")
->set("name", "Sample Photo.png")
->set("title", "Sample Photo")
->set_file("/tmp/foo.jpg")
->set_file("gallery.png")
->create($album->url, $auth);
alert("Uploaded photo: <b>{$photo->url}</b>");
alert("Album members: <b>" . join(", ", $album->data->members) . "</b>");
Expand Down
Binary file added client/gallery.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion modules/basket/controllers/admin_configure.php
@@ -1,7 +1,7 @@
<?php defined("SYSPATH") or die("No direct script access.");
/**
* Gallery - a web based photo album viewer and editor
* Copyright (C) 2000-2009 Bharat Mediratta
* Copyright (C) 2000-2010 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
Expand Down
2 changes: 1 addition & 1 deletion modules/basket/controllers/admin_postage_bands.php
@@ -1,7 +1,7 @@
<?php defined("SYSPATH") or die("No direct script access.");
/**
* Gallery - a web based photo album viewer and editor
* Copyright (C) 2000-2009 Bharat Mediratta
* Copyright (C) 2000-2010 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
Expand Down
2 changes: 1 addition & 1 deletion modules/basket/controllers/admin_product_lines.php
@@ -1,7 +1,7 @@
<?php defined("SYSPATH") or die("No direct script access.");
/**
* Gallery - a web based photo album viewer and editor
* Copyright (C) 2000-2009 Bharat Mediratta
* Copyright (C) 2000-2010 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
Expand Down
2 changes: 1 addition & 1 deletion modules/basket/controllers/basket.php
@@ -1,7 +1,7 @@
<?php defined("SYSPATH") or die("No direct script access.");
/**
* Gallery - a web based photo album viewer and editor
* Copyright (C) 2000-2009 Bharat Mediratta
* Copyright (C) 2000-2010 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
Expand Down
2 changes: 1 addition & 1 deletion modules/basket/helpers/basket.php
@@ -1,7 +1,7 @@
<?php
/**
* Gallery - a web based photo album viewer and editor
* Copyright (C) 2000-2009 Bharat Mediratta
* Copyright (C) 2000-2010 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
Expand Down
2 changes: 1 addition & 1 deletion modules/basket/helpers/basket_event.php
@@ -1,7 +1,7 @@
<?php defined("SYSPATH") or die("No direct script access.");
/**
* Gallery - a web based photo album viewer and editor
* Copyright (C) 2000-2009 Bharat Mediratta
* Copyright (C) 2000-2010 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
Expand Down
2 changes: 1 addition & 1 deletion modules/basket/helpers/basket_installer.php
@@ -1,7 +1,7 @@
<?php defined("SYSPATH") or die("No direct script access.");
/**
* Gallery - a web based photo album viewer and editor
* Copyright (C) 2000-2009 Bharat Mediratta
* Copyright (C) 2000-2010 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
Expand Down
2 changes: 1 addition & 1 deletion modules/basket/helpers/basket_theme.php
@@ -1,7 +1,7 @@
<?php defined("SYSPATH") or die("No direct script access.");
/**
* Gallery - a web based photo album viewer and editor
* Copyright (C) 2000-2009 Bharat Mediratta
* Copyright (C) 2000-2010 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
Expand Down
2 changes: 1 addition & 1 deletion modules/basket/helpers/postage_band.php
@@ -1,7 +1,7 @@
<?php defined("SYSPATH") or die("No direct script access.");
/**
* Gallery - a web based photo album viewer and editor
* Copyright (C) 2000-2009 Bharat Mediratta
* Copyright (C) 2000-2010 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
Expand Down
2 changes: 1 addition & 1 deletion modules/basket/helpers/product.php
@@ -1,7 +1,7 @@
<?php defined("SYSPATH") or die("No direct script access.");
/**
* Gallery - a web based photo album viewer and editor
* Copyright (C) 2000-2009 Bharat Mediratta
* Copyright (C) 2000-2010 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
Expand Down
2 changes: 1 addition & 1 deletion modules/basket/libraries/Session_Basket.php
@@ -1,7 +1,7 @@
<?php defined("SYSPATH") or die("No direct script access.");
/**
* Gallery - a web based photo album viewer and editor
* Copyright (C) 2000-2009 Bharat Mediratta
* Copyright (C) 2000-2010 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
Expand Down
2 changes: 1 addition & 1 deletion modules/basket/models/item_product.php
@@ -1,7 +1,7 @@
d<?php defined("SYSPATH") or die("No direct script access.");
/**
* Gallery - a web based photo album viewer and editor
* Copyright (C) 2000-2009 Bharat Mediratta
* Copyright (C) 2000-2010 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
Expand Down
2 changes: 1 addition & 1 deletion modules/basket/models/postage_band.php
@@ -1,7 +1,7 @@
<?php defined("SYSPATH") or die("No direct script access.");
/**
* Gallery - a web based photo album viewer and editor
* Copyright (C) 2000-2009 Bharat Mediratta
* Copyright (C) 2000-2010 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
Expand Down
2 changes: 1 addition & 1 deletion modules/basket/models/product.php
@@ -1,7 +1,7 @@
<?php defined("SYSPATH") or die("No direct script access.");
/**
* Gallery - a web based photo album viewer and editor
* Copyright (C) 2000-2009 Bharat Mediratta
* Copyright (C) 2000-2010 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
Expand Down
2 changes: 1 addition & 1 deletion modules/basket/models/product_override.php
@@ -1,7 +1,7 @@
<?php defined("SYSPATH") or die("No direct script access.");
/**
* Gallery - a web based photo album viewer and editor
* Copyright (C) 2000-2009 Bharat Mediratta
* Copyright (C) 2000-2010 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
Expand Down
2 changes: 1 addition & 1 deletion modules/basket/views/admin_postage_bands.html.php
@@ -1,7 +1,7 @@
<?php defined("SYSPATH") or die("No direct script access.")
/**
* Gallery - a web based photo album viewer and editor
* Copyright (C) 2000-2009 Bharat Mediratta
* Copyright (C) 2000-2010 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
Expand Down
2 changes: 1 addition & 1 deletion modules/basket/views/admin_product_lines.html.php
@@ -1,7 +1,7 @@
<?php defined("SYSPATH") or die("No direct script access.")
/**
* Gallery - a web based photo album viewer and editor
* Copyright (C) 2000-2009 Bharat Mediratta
* Copyright (C) 2000-2010 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
Expand Down
2 changes: 1 addition & 1 deletion modules/basket/views/basket.html.php
@@ -1,7 +1,7 @@
<?php defined("SYSPATH") or die("No direct script access.")
/**
* Gallery - a web based photo album viewer and editor
* Copyright (C) 2000-2009 Bharat Mediratta
* Copyright (C) 2000-2010 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
Expand Down
2 changes: 1 addition & 1 deletion modules/basket/views/checkout.html.php
@@ -1,7 +1,7 @@
<?php defined("SYSPATH") or die("No direct script access.")
/**
* Gallery - a web based photo album viewer and editor
* Copyright (C) 2000-2009 Bharat Mediratta
* Copyright (C) 2000-2010 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
Expand Down
2 changes: 1 addition & 1 deletion modules/basket/views/confirm_order.html.php
@@ -1,7 +1,7 @@
<?php defined("SYSPATH") or die("No direct script access.")
/**
* Gallery - a web based photo album viewer and editor
* Copyright (C) 2000-2009 Bharat Mediratta
* Copyright (C) 2000-2010 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
Expand Down
2 changes: 1 addition & 1 deletion modules/basket/views/order_complete.html.php
@@ -1,7 +1,7 @@
<?php defined("SYSPATH") or die("No direct script access.")
/**
* Gallery - a web based photo album viewer and editor
* Copyright (C) 2000-2009 Bharat Mediratta
* Copyright (C) 2000-2010 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
Expand Down
2 changes: 1 addition & 1 deletion modules/basket/views/view_basket.html.php
@@ -1,7 +1,7 @@
<?php defined("SYSPATH") or die("No direct script access.")
/**
* Gallery - a web based photo album viewer and editor
* Copyright (C) 2000-2009 Bharat Mediratta
* Copyright (C) 2000-2010 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
Expand Down
2 changes: 1 addition & 1 deletion modules/batchtag/controllers/batchtag.php
@@ -1,7 +1,7 @@
<?php defined("SYSPATH") or die("No direct script access.");
/**
* Gallery - a web based photo album viewer and editor
* Copyright (C) 2000-2009 Bharat Mediratta
* Copyright (C) 2000-2010 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
Expand Down
2 changes: 1 addition & 1 deletion modules/batchtag/helpers/batchtag_block.php
@@ -1,7 +1,7 @@
<?php defined("SYSPATH") or die("No direct script access.");
/**
* Gallery - a web based photo album viewer and editor
* Copyright (C) 2000-2009 Bharat Mediratta
* Copyright (C) 2000-2010 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
Expand Down
2 changes: 1 addition & 1 deletion modules/batchtag/helpers/batchtag_event.php
@@ -1,7 +1,7 @@
<?php defined("SYSPATH") or die("No direct script access.");
/**
* Gallery - a web based photo album viewer and editor
* Copyright (C) 2000-2009 Bharat Mediratta
* Copyright (C) 2000-2010 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
Expand Down
2 changes: 1 addition & 1 deletion modules/batchtag/helpers/batchtag_installer.php
@@ -1,7 +1,7 @@
<?php defined("SYSPATH") or die("No direct script access.");
/**
* Gallery - a web based photo album viewer and editor
* Copyright (C) 2000-2009 Bharat Mediratta
* Copyright (C) 2000-2010 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
Expand Down
42 changes: 24 additions & 18 deletions modules/calendarview/controllers/calendarview.php
@@ -1,7 +1,7 @@
<?php defined("SYSPATH") or die("No direct script access.");
/**
* Gallery - a web based photo album viewer and editor
* Copyright (C) 2000-2009 Bharat Mediratta
* Copyright (C) 2000-2010 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
Expand Down Expand Up @@ -31,14 +31,19 @@ public function calendar($display_year="", $display_user="") {
}

// Draw the page.
$template = new Theme_View("page.html", "other", "CalendarView");
$template = new Theme_View("calpage.html", "other", "CalendarView");
$template->css("calendarview_calendar.css");
$template->set_global("calendar_user", $display_user);
$template->page_title = t("Gallery :: Calendar");
$template->content = new View("calendarview_year.html");
$template->content->calendar_year = $display_year;
$template->content->calendar_user = $display_user;
$template->content->calendar_user_year_form = $this->_get_calenderprefs_form($display_year, $display_user);
$template->content->title = t("Calendar") . ": " . $display_year;
// Set up breadcrumbs
$calendar_breadcrumbs[0] = new Calendar_Breadcrumb(item::root()->title, item::root()->url());
$calendar_breadcrumbs[1] = new Calendar_Breadcrumb($display_year, "");
$template->set_global("breadcrumbs", $calendar_breadcrumbs);
print $template;
}

Expand Down Expand Up @@ -78,7 +83,7 @@ public function day($display_year, $display_user, $display_month, $display_day)
}

// Set up the page.
$template = new Theme_View("page.html", "collection", "CalendarDayView");
$template = new Theme_View("calpage.html", "collection", "CalendarDayView");
$template->set_global("page", $page);
$template->set_global("max_pages", $max_pages);
$template->set_global("page_size", $page_size);
Expand All @@ -105,11 +110,11 @@ public function day($display_year, $display_user, $display_month, $display_day)
}

// Set up breadcrumbs
$calendar_breadcrumbs[0] = new Calendar_Breadcrumb($display_year, url::site("calendarview/calendar/" . $display_year . "/" . $display_user));
$calendar_breadcrumbs[1] = new Calendar_Breadcrumb(t(date("F", mktime(0, 0, 0, $display_month, $display_day, $display_year))), url::site("calendarview/month/" . $display_year . "/" . $display_user . "/" . $display_month));
$fake_item = new Calendar_Breadcrumb($display_day, "");
$template->set_global("item", $fake_item);
$template->set_global("parents", $calendar_breadcrumbs);
$calendar_breadcrumbs[0] = new Calendar_Breadcrumb(item::root()->title, item::root()->url());
$calendar_breadcrumbs[1] = new Calendar_Breadcrumb($display_year, url::site("calendarview/calendar/" . $display_year . "/" . $display_user));
$calendar_breadcrumbs[2] = new Calendar_Breadcrumb(t(date("F", mktime(0, 0, 0, $display_month, $display_day, $display_year))), url::site("calendarview/month/" . $display_year . "/" . $display_user . "/" . $display_month));
$calendar_breadcrumbs[3] = new Calendar_Breadcrumb($display_day, "");
$template->set_global("breadcrumbs", $calendar_breadcrumbs);

// Finish setting up and then display the page.
$template->set_global("children_count", $day_count);
Expand Down Expand Up @@ -154,7 +159,7 @@ public function month($display_year, $display_user, $display_month) {
}

// Set up the page.
$template = new Theme_View("page.html", "collection", "CalendarMonthView");
$template = new Theme_View("calpage.html", "collection", "CalendarMonthView");
$template->set_global("page", $page);
$template->set_global("max_pages", $max_pages);
$template->set_global("page_size", $page_size);
Expand All @@ -180,11 +185,11 @@ public function month($display_year, $display_user, $display_month) {
->find_all($page_size, $offset));
}

// Set up breadcrumbs for this page.
$calendar_breadcrumbs[0] = new Calendar_Breadcrumb($display_year, url::site("calendarview/calendar/" . $display_year . "/" . $display_user));
$fake_item = new Calendar_Breadcrumb(t(date("F", mktime(0, 0, 0, $display_month, 1, $display_year))), "");
$template->set_global("item", $fake_item);
$template->set_global("parents", $calendar_breadcrumbs);
// Set up breadcrumbs
$calendar_breadcrumbs[0] = new Calendar_Breadcrumb(item::root()->title, item::root()->url());
$calendar_breadcrumbs[1] = new Calendar_Breadcrumb($display_year, url::site("calendarview/calendar/" . $display_year . "/" . $display_user));
$calendar_breadcrumbs[2] = new Calendar_Breadcrumb(t(date("F", mktime(0, 0, 0, $display_month, 1, $display_year))), "");
$template->set_global("breadcrumbs", $calendar_breadcrumbs);

// Finish setting up and then display the page.
$template->set_global("children_count", $day_count);
Expand All @@ -195,7 +200,7 @@ public function month($display_year, $display_user, $display_month) {

private function _get_calenderprefs_form($display_year, $display_user) {
// Generate a form to allow the visitor to select a year and a gallery photo owner.
$form = new Forge("calendarview/setprefs", "", "post",
$calendar_group = new Forge("calendarview/setprefs", "", "post",
array("id" => "g-view-calendar-form"));

// Generate a list of all Gallery users who have uploaded photos.
Expand Down Expand Up @@ -231,21 +236,22 @@ private function _get_calenderprefs_form($display_year, $display_user) {
}

// Create the form.
$calendar_group = $form->group("CalendarPrefs");
$calendar_group->dropdown('cal_user')
->label(t("Display Photos From User: "))
->id('cal_user')
->options($valid_users)
->selected($display_user);
$calendar_group->dropdown('cal_year')
->label(t("For Year: "))
->id('cal_year')
->options($valid_years)
->selected($display_year);

// Add a save button to the form.
$calendar_group->submit("SaveSettings")->value(t("Go"));
$calendar_group->submit("SaveSettings")->value(t("Go"))->id('cal_go');

// Return the newly generated form.
return $form;
return $calendar_group;
}

public function setprefs() {
Expand Down

0 comments on commit 8fa3381

Please sign in to comment.