Advanced search  

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Pages: [1] 2   Go Down

Author Topic: Add a Download Link for the full-size image v1.1 - v1.4  (Read 53957 times)

0 Members and 1 Guest are viewing this topic.

Joe Carver

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 1543
  • aka 'i-imagine'
    • Home Page
Add a Download Link for the full-size image v1.1 - v1.4
« on: July 05, 2010, 11:23:06 pm »

This plugin will add a Download Link for visitors to download the full-size image, A link will show at the bottom of the info. table or a button will appear below the title or caption. Clicking the button will open the image in a new window.

Config options - Show to logged users and location of link on page.

Note: If used with the LightBox plugin: LightBox must be below this plugin on the "Installed plugins" listing in Plugin manager. Or use option to show link in info. table.

v1.4 contribution by 1aB - Read the posts below for more information.
« Last Edit: March 12, 2011, 12:23:19 am by Joe Carver »
Logged

kboutelle

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 4
    • The Boutelle Photo Gallery
Re: Add a Download Link for the full-size image v1.0
« Reply #1 on: July 19, 2010, 03:56:04 pm »

I installed this and the Facebook Sharer add-in and this link disabled or overwrote the Facebook Sharer button. :-(

Both work fine, just not together unfortunately.

My Gallery
Logged
~~~~~~~~~~~~~~~~~~~~~~~~~~~
 *Link Removed*
 *Link Removed*
 *Link Removed*

Plazik

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Gender: Male
  • Posts: 99
  • Rihanna fan
    • Фотографии Рианны - Rihanna Photos
Re: Add a Download Link for the full-size image v1.0
« Reply #2 on: July 19, 2010, 04:13:06 pm »

kboutelle in Plugin Manager put this plugin first and Facebook Sharer second.
(Like in my gallery http://rihanna1photos.ru/displayimage-1082-22818.html#top_display_media)
Logged

kboutelle

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 4
    • The Boutelle Photo Gallery
Re: Add a Download Link for the full-size image v1.0
« Reply #3 on: July 19, 2010, 04:17:46 pm »

kboutelle in Plugin Manager put this plugin first and Facebook Sharer second.
(Like in my gallery http://rihanna1photos.ru/displayimage-1082-22818.html#top_display_media)

That worked! Thanks!
Logged
~~~~~~~~~~~~~~~~~~~~~~~~~~~
 *Link Removed*
 *Link Removed*
 *Link Removed*

Joe Carver

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 1543
  • aka 'i-imagine'
    • Home Page
Re: Add a Download Link for the full-size image v1.0
« Reply #4 on: August 09, 2010, 01:21:14 am »

Release of Version 1.1

    Changelog
    • Add config. feature - show link to logged users only
    • Add config option to show link in pic. info. table

    New version attached to first post.

    Zitrone

    • Coppermine regular visitor
    • **
    • Offline Offline
    • Gender: Male
    • Posts: 73
    Re: Add a Download Link for the full-size image v1.1
    « Reply #5 on: September 03, 2010, 12:33:30 pm »

    Hey Joe, i have a question of the download_link_addon...

    Its a nice addon and i use it, but maybe we can configure something that it works how i like :D

    I want that, if i click on the Button "Download-Link" that comes a Pop-Up how ask me where i want to save the picture, but on this Addon it only opens the Picture in FullView.
    I hope you know what i mean.



    Best Regards,
    Zitrone
    Logged
    CPG-Version 1.5.8 (Up-to-date)
    FTP : 2 GB Traffic
    MySQL-Version: 5.0.51a

    Αndré

    • Administrator
    • Coppermine addict
    • *****
    • Country: de
    • Offline Offline
    • Gender: Male
    • Posts: 15764
    Re: Add a Download Link for the full-size image v1.1
    « Reply #6 on: September 03, 2010, 12:37:44 pm »

    Afaik it's a browser feature if it opens the file directly in the browser or asks you to save the file. Maybe there's a solution that forces a download dialog I'm not aware of.
    Logged

    Joe Carver

    • Dev Team member
    • Coppermine addict
    • ****
    • Country: us
    • Offline Offline
    • Gender: Male
    • Posts: 1543
    • aka 'i-imagine'
      • Home Page
    Re: Add a Download Link for the full-size image v1.1
    « Reply #7 on: September 04, 2010, 03:08:46 am »

    Maybe there's a solution that forces a download dialog I'm not aware of.
    Looking at: function download_file in archive.php 
    Code: [Select]
    $header = "Content-Disposition: attachment; filename=\"";Tells the browser what to do with the file. Of course there is more to it than just one line.


     
    ..... maybe we can configure something that it works how i like
    At the moment "we" would have to be you. This would take more time than I would care to spend. The above pageheader + filename + filetype needs to be set into codebase.php and tested for different image types. There needs to be a config. option with corresponding - help + admin. + lang. file updates.

    It can be done, but the next update on this plugin might take some time.

    1aB

    • Contributor
    • Coppermine novice
    • ***
    • Country: de
    • Offline Offline
    • Posts: 29
      • Home Page
    Re: Add a Download Link for the full-size image v1.1
    « Reply #8 on: December 29, 2010, 05:25:27 pm »

    Hi,

    I hope you do not mind that I implemented the Content-Disposition feature in order for the browser to do a "real" Save As (this should work with all modern browsers). Actually it had been done before in a cpg1.4 plugin called "alternate file loading", so I just had to put it together with your great stuff, and I called it v1.2. There is now also a German translation.

    Note the new config option "Use Content-Disposition to Save As" in order to activate it. (Just in case someone is liking the opening-in-separate window so much, it is still possible and still default.)

    And have a new idea, maybe "someone" could fancy to implement this? ;)
    Per-album configuration for the Download Link. I.e. I would like the download link only on some albums but not on all. (Is that possible at all?)

    Thanks to all who work on the great Coppermine, the great plugins and have great ideas for both...

    Best regards,
    Roland
    Logged

    Joe Carver

    • Dev Team member
    • Coppermine addict
    • ****
    • Country: us
    • Offline Offline
    • Gender: Male
    • Posts: 1543
    • aka 'i-imagine'
      • Home Page
    Re: Add a Download Link for the full-size image v1.1
    « Reply #9 on: December 29, 2010, 11:56:12 pm »

    I hope you do not mind that I implemented the Content-Disposition feature.......

    Not at all, actually it is great that new features can be contributed.
    Nice work.  :)
    I hope to have some time to try it soon.

    I would like the download link only on some albums but not on all. (Is that possible at all?)

    You can try to make it conditional on:
    Code: [Select]
         $CURRENT_ALBUM_DATA['aid']
    The global:
    Code: [Select]
         $CURRENT_ALBUM_DATAshould also be added.

    Αndré

    • Administrator
    • Coppermine addict
    • *****
    • Country: de
    • Offline Offline
    • Gender: Male
    • Posts: 15764
    Re: Add a Download Link for the full-size image v1.1
    « Reply #10 on: December 30, 2010, 09:46:31 am »

    Per-album configuration for the Download Link. I.e. I would like the download link only on some albums but not on all. (Is that possible at all?)
    The main task is to create the user interface where the admin/album owner can determine if he want to enable the link or not.
    Logged

    1aB

    • Contributor
    • Coppermine novice
    • ***
    • Country: de
    • Offline Offline
    • Posts: 29
      • Home Page
    Re: Add a Download Link for the full-size image v1.1
    « Reply #11 on: December 30, 2010, 11:28:56 am »

    The main task is to create the user interface where the admin/album owner can determine if he want to enable the link or not.

    Indeed. Ideal configurability would hook into the album configuration page and probably need an extra db table ...sounds complicated.

    So when I think it through, I notice that for my own purposes, granularity at category level would probably suffice, and then maybe just to have a plugin setting with a regex, defaulting to '.*' , so that admin could set it to '(Events|Public|Fine Work)' in order to enable only for those categories and not for the others.

    Suppose I could then use
    Code: [Select]
        $CURRENT_CAT_NAME in order to decide?

    That would be not as nifty as full per-album configurability, but for me as a "Coppermine Newbie" ;) sounds doable if I find one or two more days to actually do it.
    Logged

    1aB

    • Contributor
    • Coppermine novice
    • ***
    • Country: de
    • Offline Offline
    • Posts: 29
      • Home Page
    Re: Add a Download Link for the full-size image v1.1
    « Reply #12 on: December 30, 2010, 04:48:12 pm »

    Oops, that was easier than I thought: the biggest problem is actually to properly sanitize the regex string from the input field ...that could probably still be improved.
    Otherwise, it would be nice if this place:
    http://sourceforge.net/projects/coppermine/files/Plugins/1.5.x/
    could be updated with a newer version than v1.0 ;)

    v1.3
    • Configure option to show link only for certain categories
    v1.2
    • German translation
    • Content-Disposition -> Save As box in the browser
    Logged

    epula

    • Coppermine newbie
    • Offline Offline
    • Posts: 6
    Re: Add a Download Link for the full-size image v1.1
    « Reply #13 on: February 07, 2011, 10:49:03 pm »

    good plug in
    but i would like the link under the picture not in info picture. how to modify the code ?
    thank you
    Logged

    Αndré

    • Administrator
    • Coppermine addict
    • *****
    • Country: de
    • Offline Offline
    • Gender: Male
    • Posts: 15764
    Re: Add a Download Link for the full-size image v1.1
    « Reply #14 on: February 08, 2011, 09:17:46 am »

    it would be nice if this place:
    http://sourceforge.net/projects/coppermine/files/Plugins/1.5.x/
    could be updated with a newer version than v1.0 ;)
    Done as suggested. It would also be nice if you would add the latest version to your initial post, so users don't have to search the whole thread for the latest release ;)
    Logged

    epula

    • Coppermine newbie
    • Offline Offline
    • Posts: 6
    Re: Add a Download Link for the full-size image v1.1
    « Reply #15 on: February 08, 2011, 10:22:58 am »

    Thank You
    it's exactly that I want do with this version of plugin.
    sorry for the localisation of my first post but my english is not perfect and is not easy for me to make the things in order
    Logged

    Mimer

    • Translator
    • Coppermine frequent poster
    • **
    • Offline Offline
    • Gender: Male
    • Posts: 129
      • Fjotte
    Re: Add a Download Link for the full-size image v1.1
    « Reply #16 on: March 04, 2011, 11:30:08 pm »

    Hi

    Danish languagefiles for Joe Carvers v1.1 and 1aBs v1.3

    Mimer  8)
    « Last Edit: March 05, 2011, 01:08:58 am by Mimer »
    Logged

    Mimer

    • Translator
    • Coppermine frequent poster
    • **
    • Offline Offline
    • Gender: Male
    • Posts: 129
      • Fjotte
    Re: Add a Download Link for the full-size image v1.1
    « Reply #17 on: March 04, 2011, 11:36:44 pm »

    How can I change/add to the plugin to download the intermediet picture instead of Full Size piture?

    Mimer  8)
    Logged

    Joe Carver

    • Dev Team member
    • Coppermine addict
    • ****
    • Country: us
    • Offline Offline
    • Gender: Male
    • Posts: 1543
    • aka 'i-imagine'
      • Home Page
    Re: Add a Download Link for the full-size image v1.1
    « Reply #18 on: March 05, 2011, 01:06:34 am »

    Danish languagefiles for Joe Carvers v1.1 and 1aBs v1.3

    Thank you for the contribution.
    It might be a while before I release a newer version. Before then users should download your contribution above.

    How can I change/add to the plugin to download the intermediet picture instead of Full Size piture?

    In my version 1.1 find in codebase.php:

    Code: [Select]
        $pics_link = 'albums/' . $CURRENT_PIC_DATA['filepath'] . $CURRENT_PIC_DATA['filename'];
    Change to:

    Code: [Select]
        $pics_link = get_pic_url($CURRENT_PIC_DATA, 'normal');

    Mimer

    • Translator
    • Coppermine frequent poster
    • **
    • Offline Offline
    • Gender: Male
    • Posts: 129
      • Fjotte
    Re: Add a Download Link for the full-size image v1.1
    « Reply #19 on: March 05, 2011, 01:10:40 am »

    Tnx, I'll look into it and post back.

    Mimer 8)
    Logged
    Pages: [1] 2   Go Up
     

    Page created in 0.03 seconds with 20 queries.