e2interactive forums » (E)2 Photo Gallery FAQ

Search:

How to Download Images

(6 posts)
  • Started 2 months ago by Esteban89
  • Latest reply from Burgundy

  1. Esteban89
    Member

    I want my visitors to be able to download the images to their hard drives, any way of doing this?

    Thanks

    Posted 2 months ago #
  2. Open up the index.php file and create a div and place it where you would like the "Download Image" link to be. and give it on id="download" like so:

    <div id="download"></div>

    Save. Now open up js/e2photos.js file and go to line 62 and paste the folowing after myloadedimage[imgindex]=1;:

    var downloadfile=document.getElementById(download);
    downloadfile.innnerHTML = "<a href="+tempgallery[img_id][0]+" >Download Image</a>";

    Save the file and test.

    Posted 2 months ago #
  3. Esteban89
    Member

    done both things but nothing happened, I rechecked several times and I wrote everything correctly. Any idea?

    Posted 2 months ago #
  4. K, sorry I tested it and figure out a better way, and it works.

    Step One: <div id="download"></div> (paste where you want it to show)

    Step Two: $("download").setHTML("<a href='"+tempgallery[img_id][0]+"'>Download Image</a>"); (Paste after line 62 on e2photo.js)

    Step Three: $("download").setHTML("<a href='"+imggallery[startimgnumber][0]+"'>Download Image</a>"); (Paste after line 73 in e2photo2.js file)

    Posted 2 months ago #
  5. Burgundy
    Member

    I have a problem with this. The first image, doesn't had the link to download.
    And... Can't I do the image begins download with a click? without instance a new HTML with the image?
    Thanks... and sorry for my English!

    Posted 2 months ago #
  6. Burgundy
    Member

    Here is the solution!!!
    Step Three: $("download").setHTML("Download Image"); (Paste after line 73)

    Posted 2 months ago #

RSS feed for this topic

Reply

You must log in to post.