download button next to the slideshow, fullsize buttons

cowlemon

Joined: 2009-06-18
Posts: 13
Posted: Thu, 2009-06-18 16:09

a download button to download the full size image would be great. button would appear only if fullsize image is available for that user.

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Fri, 2009-06-19 01:11

In the latest code you can right-click the image (or the full-size link) and get the link to the original. But this would be a fine feature to write a module for.
---
Problems: Check gallery3/var/logs first!
file a bug or feature request | upgrade to the latest code | use git

 
rWatcher
rWatcher's picture

Joined: 2005-09-06
Posts: 722
Posted: Fri, 2009-06-19 04:41
cowlemon wrote:
a download button to download the full size image would be great. button would appear only if fullsize image is available for that user.

I'm not sure how to add another button up there, but this will put a download link onto the sidebar (is there a way to add extra buttons to that menu?).

 
vallu

Joined: 2009-06-04
Posts: 25
Posted: Fri, 2009-06-19 09:11

That is pretty nice, but is it possible to create a download link/button that forces Save As prompt? That would be very nice. I know that there is this kind of module for Gallery2, but I don’t know yet how to make it work with Gallery3.
You have done really good work with Gallery3, thanks for that!!

 
rWatcher
rWatcher's picture

Joined: 2005-09-06
Posts: 722
Posted: Fri, 2009-06-19 16:44
vallu wrote:
That is pretty nice, but is it possible to create a download link/button that forces Save As prompt? That would be very nice. I know that there is this kind of module for Gallery2, but I don’t know yet how to make it work with Gallery3.
You have done really good work with Gallery3, thanks for that!!

Do you know what the name of the Galery2 module is? I'll take a look at it and see if I can figure out how it works.

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Fri, 2009-06-19 16:48

@rWatcher: nice. To put it in the menu, you need to create downloadfullsize_menu::photo() and put your link there. Check out slideshow_menu (and other menu callback classes) for examples.

To force the file to be downloaded is a little trickier. You can't just generate a URL to make that happen, you have to actually serve the file yourself. This is not that difficult, though because there's a Kohana lib for it. You should create a url like "/downloadfullsize/send/$item->id" in the theme callback, then create a controller in modules/downloadfullsize/controllers/downloadfullsize.php which looks like this:

class DownloadFullSize_Controller extends Controller {
  function send($id) {
    $item = ORM::factory("item", $id);
    access::required("view_full", $item);
    download::force($item->file_path());
  }
}

This is off the top of my head so you'll probably have to tweak it a little. Get this into GitHub and I'll pull it into contrib!
---
Problems: Check gallery3/var/logs first!
file a bug or feature request | upgrade to the latest code | use git

 
vallu

Joined: 2009-06-04
Posts: 25
Posted: Fri, 2009-06-19 17:40
rWatcher wrote:
Do you know what the name of the Galery2 module is? I'll take a look at it and see if I can figure out how it works.

Here is link http://codex.gallery2.org/Gallery2:Modules:downloadlink
Thanks if you try to figure this out! I and I think many else really need this kind of module. Let us know if you get it to work with G3.

 
rWatcher
rWatcher's picture

Joined: 2005-09-06
Posts: 722
Posted: Sat, 2009-06-20 20:55

Done.
- I reworked the download code to cause a "Save As" dialog to appear (instead of just direct-linking to the photo).
- I added in a menu option to display a Floppy Disk image (which I stole from that download link up above) that can be clicked on instead of the text link.
- I also added an admin page where you can select if you want to display the old text link or the new floppy disk link (or both).

The attached zip file contains two folders:
- "downloadfullsize" which can be copied into the modules folder.
- "theme files" which contains instructions / files for modifying your default theme to display the floppy disk image. There's an image file which goes into your THEME/images folder and some CSS code that needs to be copied into your THEME/css/screen.css file.

The updated module is attached to this post and up on my github: http://github.com/rWatcher/gallery3-contrib/tree/master

I've also set up a wiki page for it: http://codex.gallery2.org/Gallery3:Modules:downloadfullsize

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Sat, 2009-06-20 23:30

Nice! I pulled this into the contrib repo and cleaned up a few issues in this change:
http://github.com/gallery/gallery3-contrib/commit/bcf7aee864e021038bf9441d0fd7eb7d666f1dcb

Great work.
---
Problems? Check gallery3/var/logs
bugs/feature req's | upgrade to the latest code | use git | help! vote!

 
vallu

Joined: 2009-06-04
Posts: 25
Posted: Sun, 2009-06-21 10:42

Thank you very much! You have done great work. This is awesome module! Thanks again :)

 
rWatcher
rWatcher's picture

Joined: 2005-09-06
Posts: 722
Posted: Wed, 2009-09-16 23:23
bharat wrote:
Nice! I pulled this into the contrib repo and cleaned up a few issues in this change:
http://github.com/gallery/gallery3-contrib/commit/bcf7aee864e021038bf9441d0fd7eb7d666f1dcb

Great work.

Thanks. I'm reading threw your changes and importing them back into my github account.

vallu wrote:
Thank you very much! You have done great work. This is awesome module! Thanks again :)

Your welcome :)

In case anyone is downloading the module from this page instead of from github, I've attached an updated .zip file with bharat's changes to this post.

Edit:
I've attached a second version, which includes bharat's changes for the recent API update. If you're running Beta 2 use the -fixed.zip version. If you're using the latest version from Git use -git.zip instead.

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Sun, 2009-06-21 20:44

I removed the other attachments from your prior posts so that there's no confusion over which one is the latest version.
---
Problems? Check gallery3/var/logs
bugs/feature req's | upgrade to the latest code | use git | help! vote!

 
cowlemon

Joined: 2009-06-18
Posts: 13
Posted: Tue, 2009-06-23 19:55

thanks everyone!

 
cowlemon

Joined: 2009-06-18
Posts: 13
Posted: Fri, 2009-06-26 18:37

i updated the icon so the color scheme matches the default theme.

 
chrisss

Joined: 2009-09-13
Posts: 8
Posted: Wed, 2009-09-16 15:47

Hi,

It seems like the module is broken in beta3, can someone please update the script?

Christian

 
rWatcher
rWatcher's picture

Joined: 2005-09-06
Posts: 722
Posted: Wed, 2009-09-16 18:46

The version from github is working fine for me with beta 3. What part of it isn't working for you?

 
rWatcher
rWatcher's picture

Joined: 2005-09-06
Posts: 722
Posted: Wed, 2009-12-30 06:49

I have updated the downloadfullsize module. This version has been tested against Gallery 3, Beta 3 and includes the following changes:
- I've re-worked some of the code to no longer require modifying the default theme.
- In the event that my KeepOriginal module is also installed, an additional admin option will appear to allow visitors to download the original image instead of the rotated image, if available.
- If you're using the "sidebar text" download link, a download link will appear on video pages. I haven't been able to figure out how to do the same for the "floppy disk" download link yet.

The updated module is attached to this post, and available on my github.

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Thu, 2009-09-17 05:29

@rWatcher: I pulled all of your stuff into the contrib repo. For some reason, github's fork queue page is *way* behind so I didn't realize you had new stuff pending. Sorry about that!
---
Problems? Check gallery3/var/logs
bugs/feature req's | upgrade to the latest code | use git

 
rWatcher
rWatcher's picture

Joined: 2005-09-06
Posts: 722
Posted: Thu, 2009-09-17 05:42

Cool, thanks!

bharat wrote:
For some reason, github's fork queue page is *way* behind

Probably has something to do with that DDoS attack they got hit with earlier.

 
chrisss

Joined: 2009-09-13
Posts: 8
Posted: Thu, 2009-09-17 09:19

Working now :)

Thanks for an insane fast fix to an already genious project ^^

 
dreamkiller

Joined: 2008-01-28
Posts: 46
Posted: Mon, 2009-09-21 09:27

Hi, Don't sure it's the right place for that but since the beggining I have a problem with the Download Full Size button (and other module button in general).
It have a strange apparence:

[img]http://free0.hiboox.com/vignettes/3909/8081d6d4ba1c6d0a3e591d450093a9c6.jpg[/img]

 
rWatcher
rWatcher's picture

Joined: 2005-09-06
Posts: 722
Posted: Mon, 2009-09-21 16:09

Are you using the Beta 3 version of Gallery and the Beta 3 version of the module? It looks like the CSS isn't loading properly, but that shouldn't be an issue with the current Gallery and module code (it was an issue with older revisions of the code though).

 
dreamkiller

Joined: 2008-01-28
Posts: 46
Posted: Mon, 2009-09-21 20:17

module and gallery are up to date (pre-RC1 version)

 
dreamkiller

Joined: 2008-01-28
Posts: 46
Posted: Tue, 2009-09-22 08:05

All is fine after the update from git from this morning

 
rWatcher
rWatcher's picture

Joined: 2005-09-06
Posts: 722
Posted: Wed, 2009-12-30 06:49

I've created an updated version of DownloadFullsize:
- Merged in ckieffer's CSS changes for Gallery 3 Git
- Re-worked how the CSS code is being inserted (which should make it easy for theme developers to override)
- Tested everything against current git (as of commit b6c1ba7ea6416630b2a44b3df8400a2d48460b0a)

It is attached here, and has been uploaded to my github account.

 
thebrandons

Joined: 2008-11-08
Posts: 28
Posted: Sun, 2009-11-08 05:07

The beautiful Full Download Disk icon and feature is gone. I have the latest git gallery3. For the downloadfullsize module I tried the lateset galley3-contrib and gallery3-contrib-rWatcher but the feature has disappeared? I disabled/enabled it in the admin/user section of gallery3 to no avail.

 
rWatcher
rWatcher's picture

Joined: 2005-09-06
Posts: 722
Posted: Sun, 2009-11-08 06:24

@thebrandons:
It works fine for me, as of git commit 95ffb393d3d2af0d18af23a27ce4400b54128197. Perhaps there was a bug in the version you downloaded?

 
thebrandons

Joined: 2008-11-08
Posts: 28
Posted: Mon, 2009-11-09 03:00

I just upgrading everything gallery3/gallery3-contrib and the icon is still gone. I can disable/enable the module but it does not help.

I could PM you admin privileges if you would not mind helping? My primary objective for Gallery3 is allow family to download pictures so this is a deal breaker...

Thanks,

 
rWatcher
rWatcher's picture

Joined: 2005-09-06
Posts: 722
Posted: Mon, 2009-11-09 05:29

Sure you can PM me.

Have you checked the album permissions? "View Full Size" needs to be granted (green check mark) in order for this module to work. The module will automatically "hide" the floppy disk icon if the current user can't view the full size image.

 
thebrandons

Joined: 2008-11-08
Posts: 28
Posted: Mon, 2009-11-09 16:48

I granted every possible permission to one of my folders to try and get it working. Thanks for you help and I have already PM you with my site information.

 
thebrandons

Joined: 2008-11-08
Posts: 28
Posted: Mon, 2009-11-09 22:57

Thanks rWatcher for your help! - A checkbox within in Settings->"Download Photo Links" was not set.

Since I have your attention I now tried the "show text link" but did not see any links in my gallery?

Also are there any plans to provide a means of downloading a set of pictures. Perhaps allowing an entire album to be downloaded by the grandparents (Maybe album.zip). I might consider doing this in the future if required. From my perspective these download capabilities you started seem essential...

Thanks again,

 
rWatcher
rWatcher's picture

Joined: 2005-09-06
Posts: 722
Posted: Tue, 2009-11-10 05:33
thebrandons wrote:
Thanks rWatcher for your help! - A checkbox within in Settings->"Download Photo Links" was not set.

Since I have your attention I now tried the "show text link" but did not see any links in my gallery?

You'll probably need to manually place it on the sidebar via the "Admin -> Appearance -> Manage Sidebar" menu. At some point I'm probably going to remove that check box as it's no longer necessary now that the manage sidebar feature exists.

thebrandons wrote:
Also are there any plans to provide a means of downloading a set of pictures. Perhaps allowing an entire album to be downloaded by the grandparents (Maybe album.zip). I might consider doing this in the future if required. From my perspective these download capabilities you started seem essential...

Thanks again,

I wasn't planning on writing a module for that, although there is an open ticket for this feature:
http://sourceforge.net/apps/trac/gallery/ticket/415

 
rWatcher
rWatcher's picture

Joined: 2005-09-06
Posts: 722
Posted: Wed, 2009-12-30 06:51

I've posted an updated version of this module. This zip file contains the changes bharat posted to github for recent changes in Gallery 3. I've also removed the checkbox for enabling / disabling the sidebar download link and reworked the code so that this link can be fully controlled using Gallery's dynamic sidebar feature. This has been tested against the current Gallery 3 code on github (as of commit 38f2784fbbb0661dc57627d2878cb640bbffe271) and works fine for me.

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Thu, 2009-12-31 01:52

I've pulled all your changes, rWatcher. Thanks!
---
Problems? Check gallery3/var/logs
bugs/feature req's | upgrade to the latest code | use git

 
EotS

Joined: 2008-03-22
Posts: 25
Posted: Wed, 2010-02-10 17:07

nice work rWatcher - this is a big plus for me as well for a family site that I want to provide easy access to full size copies.

I am having problems with the image icon as well - it looks like what dreamcatcher posted on 2008-01-28.

I have the "show floppy disk picture link" box checked. Both G3 Beta 3 and the plugin were downloaded just yesterday, so everything should be the latest. Any clues?

Thanks!

 
rWatcher
rWatcher's picture

Joined: 2005-09-06
Posts: 722
Posted: Wed, 2010-02-10 20:13
EotS wrote:
Both G3 Beta 3 and the plugin were downloaded just yesterday, so everything should be the latest. Any clues?

It doesn't work properly with Beta 3, you'll need to upgrade to the "Gallery 3.0 git (pre-RC1)" version.
FAQ: How do I upgrade?

 
dmolavi
dmolavi's picture

Joined: 2002-12-05
Posts: 573
Posted: Wed, 2010-08-18 17:47

Nice addition to G3. Can you tweak it (similar to the way I've done w/ my ecard module), so that the user can choose to show either the floppy icon, or the button in the sidebar, instead of both? I tried tweaking on my site, but the placement of the "location" dropdown on the admin page was screwed up and wouldn't line up properly with the rest of the options.

--
For PHPNuke, phpBB2, and phpBB3 integration help, please visit NukedGallery.net.
[img]http://www.nukedgallery.net/signature.jpg[/img]

 
K_Magnus_Larsson

Joined: 2010-11-02
Posts: 12
Posted: Sat, 2010-12-11 22:07

Hello rWatcher

Thank you for the module Gallery3:Modules:downloadfullsize.

The module does not work for me when the client uses IE8 and https on Windws XP or Vista.

Regular http, port 80 is not a problem. The module works well for IE8 and other web browsers.

Test:
IE8 and https on Windws XP or Vista.
I log on as admin. I select an album. I select a picture.
I click on the Download Fullsize Image Button.
IE8 states "..receiving file information, <number> from <base url>. The <number> varies from file to file, but it is not the jpg picture file name.
The IE8 states "Internet Explorer can not fetch <number> from <base url>".

However:
The module does work when Firefox and https is used (on Win XP and Vista). The same thing with Safari and OSX 10.4 on the server, http and https works well. The problem seems to be related to IE8+https+module.

Host name: Magnus-iMac-G5.local
Operating system: Darwin 8.11.0, OSX 10.4 Tiger on PPC G5
Apache: Apache 2.2.14
PHP: 5.2.4
MySQL: 5.0.51b
Server load: Unavailable
Graphics toolkit: imagemagick

I have nothing in /var/logs, besides
<?php defined('SYSPATH') or die('No direct script access.'); ?>

Has someone else had this problem as well?

Best regards

Magnus Larsson

 
K_Magnus_Larsson

Joined: 2010-11-02
Posts: 12
Posted: Sun, 2010-12-12 07:36

Hello again rWatcher

Adding to the previous post, some more detail in the test and comparison of https and http IE8 output.

Test:
IE8 and https on Windws XP or Vista.
I log on as admin. I select an album. I select a picture.
I click on the Download Fullsize Image Button.
IE8 states "Do you want to open or save this file?", Name "12", Type: HTML-document, From : <url>
I click save.
IE8 states "..receiving file information, "12", from <url> The number varies from file to file, but it is not the jpg picture file name.
The IE8 states "Internet Explorer can not fetch "12" from <base url>".

Test: (no https), same image file as above
IE8 and http (port 80) on Windows XP or Vista.
I log on as admin. I select an album. I select a picture.
I click on the Download Fullsize Image Button.
IE8 states "Do you want to open or save this file?", Name "IMG_8279.JPG", Type: JPEG-image, From : <url>
I click save.
IE8 downloads the file.

I notice that the name and the type changes, as reported by the download window, when comparing the https and http cases.

Best regards

Magnus Larsson