Merge branch 'master' of git://github.com/rWatcher/gallery3-contrib
This commit is contained in:
commit
0295510a18
@ -1,6 +0,0 @@
|
||||
Copy "ico-view-downloadfullsize.png" into your "themes/CURRENTTHEME/images" folder.
|
||||
|
||||
Edit the file "themes/CURRENTTHEME/css/screen.css" to include the following lines:
|
||||
#gViewMenu #gDownloadFullsizeLink {
|
||||
background-image: url('../images/ico-view-downloadfullsize.png');
|
||||
}
|
@ -35,6 +35,7 @@ class Admin_DownloadFullsize_Controller extends Admin_Controller {
|
||||
$dlLinks_array = Input::instance()->post("DownloadLinkOptions");
|
||||
$tButton = false;
|
||||
$fButton = false;
|
||||
$download_original_button = false;
|
||||
for ($i = 0; $i < count($dlLinks_array); $i++) {
|
||||
if ($dlLinks_array[$i] == "tButton") {
|
||||
$tButton = true;
|
||||
@ -44,6 +45,16 @@ class Admin_DownloadFullsize_Controller extends Admin_Controller {
|
||||
}
|
||||
}
|
||||
|
||||
if (module::is_active("keeporiginal")) {
|
||||
$keeporiginal_array = Input::instance()->post("DownloadOriginalOptions");
|
||||
for ($i = 0; $i < count($keeporiginal_array); $i++) {
|
||||
if ($keeporiginal_array[$i] == "DownloadOriginalImage") {
|
||||
$download_original_button = true;
|
||||
}
|
||||
}
|
||||
module::set_var("downloadfullsize", "DownloadOriginalImage", $download_original_button);
|
||||
}
|
||||
|
||||
// Save Settings.
|
||||
module::set_var("downloadfullsize", "tButton", $tButton);
|
||||
module::set_var("downloadfullsize", "fButton", $fButton);
|
||||
@ -63,16 +74,24 @@ class Admin_DownloadFullsize_Controller extends Admin_Controller {
|
||||
array("id" => "gDownloadFullsizeAdminForm"));
|
||||
|
||||
// Make an array for the different types of download links.
|
||||
$linkOptions["fButton"] = array("Show Floppy Disk Link", module::get_var("downloadfullsize", "fButton"));
|
||||
$linkOptions["tButton"] = array("Show Text Download Text Link", module::get_var("downloadfullsize", "tButton"));
|
||||
$linkOptions["fButton"] = array(t("Show Floppy Disk Link"), module::get_var("downloadfullsize", "fButton"));
|
||||
$linkOptions["tButton"] = array(t("Show Text Download Text Link"), module::get_var("downloadfullsize", "tButton"));
|
||||
|
||||
// Setup a few checkboxes on the form.
|
||||
$add_links = $form->group("DownloadLinks");
|
||||
$add_links->checklist("DownloadLinkOptions")
|
||||
->options($linkOptions);
|
||||
|
||||
if (module::is_active("keeporiginal")) {
|
||||
$KeepOriginalOptions["DownloadOriginalImage"] = array(t("Allow visitors to download the original image when available?"), module::get_var("downloadfullsize", "DownloadOriginalImage"));
|
||||
$keeporiginal_group = $form->group("KeepOriginalPrefs")
|
||||
->label(t("KeepOriginal Preferences"));
|
||||
$keeporiginal_group->checklist("DownloadOriginalOptions")
|
||||
->options($KeepOriginalOptions);
|
||||
}
|
||||
|
||||
// Add a save button to the form.
|
||||
$add_links->submit("SaveLinks")->value(t("Save"));
|
||||
$form->submit("SaveLinks")->value(t("Save"));
|
||||
|
||||
// Return the newly generated form.
|
||||
return $form;
|
||||
|
@ -22,6 +22,16 @@ class downloadfullsize_Controller extends Controller {
|
||||
public function send($id) {
|
||||
$item = ORM::factory("item", $id);
|
||||
access::required("view_full", $item);
|
||||
download::force($item->file_path());
|
||||
|
||||
if (module::is_active("keeporiginal") && $item->is_photo() && module::get_var("downloadfullsize", "DownloadOriginalImage")) {
|
||||
$original_image = VARPATH . "original/" . str_replace(VARPATH . "albums/", "", $item->file_path());
|
||||
if (file_exists($original_image)) {
|
||||
download::force($original_image);
|
||||
} else {
|
||||
download::force($item->file_path());
|
||||
}
|
||||
} else {
|
||||
download::force($item->file_path());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
3
modules/downloadfullsize/css/downloadfullsize_menu.css
Normal file
3
modules/downloadfullsize/css/downloadfullsize_menu.css
Normal file
@ -0,0 +1,3 @@
|
||||
#gViewMenu #gDownloadFullsizeLink {
|
||||
background-image: url('../images/ico-view-downloadfullsize.png');
|
||||
}
|
@ -32,6 +32,20 @@ class downloadfullsize_event_Core {
|
||||
}
|
||||
}
|
||||
|
||||
static function movie_menu($menu, $theme) {
|
||||
if (access::can("view_full", $theme->item)) {
|
||||
if (module::get_var("downloadfullsize", "fButton")) {
|
||||
$downloadLink = url::site("downloadfullsize/send/$theme->item");
|
||||
$menu
|
||||
->append(Menu::factory("link")
|
||||
->id("downloadfullsize")
|
||||
->label(t("Download Video"))
|
||||
->url($downloadLink)
|
||||
->css_id("gDownloadFullsizeLink"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static function admin_menu($menu, $theme) {
|
||||
$menu->get("settings_menu")
|
||||
->append(Menu::factory("link")
|
||||
|
@ -18,8 +18,29 @@
|
||||
* Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
class downloadfullsize_theme {
|
||||
static function head($theme) {
|
||||
if (!$theme->item()) {
|
||||
return;
|
||||
}
|
||||
|
||||
return new View("downloadfullsize_header_block.html");
|
||||
}
|
||||
|
||||
static function sidebar_blocks($theme) {
|
||||
$item = $theme->item();
|
||||
if ($item && $item->is_movie() && access::can("view_full", $item)) {
|
||||
if (module::get_var("downloadfullsize", "tButton")) {
|
||||
$block = new Block();
|
||||
$block->css_id = "gDownloadFullsize";
|
||||
$block->title = t("Download");
|
||||
$block->content = new View("downloadfullsize_block.html");
|
||||
|
||||
$block->content->item = ORM::factory("item", 1);
|
||||
|
||||
return $block;
|
||||
}
|
||||
}
|
||||
|
||||
if ($item && $item->is_photo() && access::can("view_full", $item)) {
|
||||
if (module::get_var("downloadfullsize", "tButton")) {
|
||||
$block = new Block();
|
||||
|
Before Width: | Height: | Size: 4.0 KiB After Width: | Height: | Size: 4.0 KiB |
@ -1,7 +1,18 @@
|
||||
<?php defined("SYSPATH") or die("No direct script access.") ?>
|
||||
|
||||
<? if ($theme->item->is_photo()) { ?>
|
||||
<div class="gDownloadFullsizeBlock">
|
||||
<a href="<?= url::site("downloadfullsize/send/$theme->item") ?>"
|
||||
title="<?= t("Download Photo") ?>"
|
||||
class="gButtonLink ui-icon-left ui-state-default ui-corner-all"><?= t("Download Fullsize Image") ?></a>
|
||||
</div>
|
||||
<? } ?>
|
||||
|
||||
<? if ($theme->item->is_movie()) { ?>
|
||||
<div class="gDownloadFullsizeBlock">
|
||||
<a href="<?= url::site("downloadfullsize/send/$theme->item") ?>"
|
||||
title="<?= t("Download Video") ?>"
|
||||
class="gButtonLink ui-icon-left ui-state-default ui-corner-all"><?= t("Download Video") ?></a>
|
||||
</div>
|
||||
<? } ?>
|
||||
|
||||
|
@ -0,0 +1,3 @@
|
||||
<?php defined("SYSPATH") or die("No direct script access.") ?>
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="<?= url::file("modules/downloadfullsize/css/downloadfullsize_menu.css") ?>" />
|
@ -1,6 +0,0 @@
|
||||
Copy "ico-view-minislideshow.png" into your "themes/CURRENTTHEME/images" folder.
|
||||
|
||||
Edit the file "themes/CURRENTTHEME/css/screen.css" to include the following lines:
|
||||
#gViewMenu #gMiniSlideshowLink {
|
||||
background-image: url('../images/ico-view-minislideshow.png');
|
||||
}
|
@ -17,6 +17,7 @@
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
class MiniSlideShow_Controller extends Controller {
|
||||
public function showslideshow($item_id) {
|
||||
// Generate the Dialog Box to display the slideshow in.
|
||||
|
4
modules/minislideshow/css/minislideshow_menu.css
Normal file
4
modules/minislideshow/css/minislideshow_menu.css
Normal file
@ -0,0 +1,4 @@
|
||||
#gViewMenu #gMiniSlideshowLink {
|
||||
background-image: url('../images/ico-view-minislideshow.png');
|
||||
}
|
||||
|
@ -17,6 +17,7 @@
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
class minislideshow_event_Core {
|
||||
static function admin_menu($menu, $theme) {
|
||||
// Add a menu option to the admin screen for configuring the slideshow.
|
||||
|
@ -17,6 +17,7 @@
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
class minislideshow_installer {
|
||||
static function deactivate() {
|
||||
site_status::clear("minislideshow_needs_rss");
|
||||
|
29
modules/minislideshow/helpers/minislideshow_theme.php
Normal file
29
modules/minislideshow/helpers/minislideshow_theme.php
Normal file
@ -0,0 +1,29 @@
|
||||
<?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 minislideshow_theme_Core {
|
||||
static function head($theme) {
|
||||
if (!$theme->item()) {
|
||||
return;
|
||||
}
|
||||
|
||||
return new View("minislideshow_header_block.html");
|
||||
}
|
||||
}
|
Before Width: | Height: | Size: 3.3 KiB After Width: | Height: | Size: 3.3 KiB |
@ -0,0 +1,5 @@
|
||||
<?php defined("SYSPATH") or die("No direct script access.") ?>
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="<?= url::file("modules/minislideshow/css/minislideshow_menu.css") ?>" />
|
||||
|
||||
|
@ -26,7 +26,15 @@ class rwinfo_theme_Core {
|
||||
|
||||
$block = new Block();
|
||||
$block->css_id = "gMetadata";
|
||||
$block->title = $theme->item()->is_album() ? t("Album Info") : t("Photo Info");
|
||||
$block_title = "";
|
||||
if ($theme->item->is_album()) {
|
||||
$block_title = t("Album Info");
|
||||
} else if ($theme->item->is_movie()) {
|
||||
$block_title = t("Movie Info");
|
||||
} else {
|
||||
$block_title = t("Photo Info");
|
||||
}
|
||||
$block->title = $block_title;
|
||||
$block->content = new View("rwinfo_block.html");
|
||||
return $block;
|
||||
}
|
||||
|
@ -3,3 +3,6 @@ Hide the info sidebar for the root album (without title and description there re
|
||||
Display date created for albums only (and continue to display the capture date for everything else)
|
||||
Display tags in the info sidebar (if the tags module is active).
|
||||
Display tags when mousing over the thumbnails (if tags module is active).
|
||||
Display "Movie Info" on movies instead of "Photo Info" like the Gallery Info module does.
|
||||
Use long month instead of short month on the album display.
|
||||
Change Date/Time format to "F j, Y h:i:s a" for photos.
|
@ -12,7 +12,7 @@
|
||||
<? if ($item->is_album()): ?>
|
||||
<li>
|
||||
<strong class="caption"><?= t("Date:") ?></strong>
|
||||
<?= date("M j, Y", $item->created)?>
|
||||
<?= date("F j, Y", $item->created)?>
|
||||
</li>
|
||||
<? endif ?>
|
||||
<? endif ?>
|
||||
@ -27,7 +27,7 @@
|
||||
<? if ($item->captured): ?>
|
||||
<li>
|
||||
<strong class="caption"><?= t("Date:") ?></strong>
|
||||
<?= date("M j, Y H:i:s", $item->captured)?>
|
||||
<?= date("F j, Y h:i:s a", $item->captured)?>
|
||||
</li>
|
||||
<? endif ?>
|
||||
|
||||
|
Reference in New Issue
Block a user