• I couldn’t find any plugin that could do this (but perhaps I didn’t use the right keywords to search).

    I’ve tried “Easy Media Download”, but those pages are static and do not download the file when it’s loaded. The user still needs to hit the download button. I would want the page to download a given file and present a donation form while the file is being downloaded.

    So, in short this is what I need:

        Users can download a file (.iso).
        The link directs to a page that downloads the actual file.
        This page shows a donation form (while the file is downloading).

    Does anybody know of such a plugin or do I have to build the page myself?

Viewing 2 replies - 1 through 2 (of 2 total)
  • You should be able to do it yourself with jQuery and the download plugin https://jqueryfiledownload.apphb.com/ if you feel comfortable working with javascript.

    Thread Starter Schoelje

    (@schoelje)

    Thanks!
    I found and adapted some plain old JavaScript (which I can understand) that does almost what I’d like it to do. It’s good enough for now.

    For reference, here’s the code I use in a WordPress page:

    <div onload="download()"></div>
    <p>Your download will start in <span id="cd">9</span> seconds. Click here to download manually: <a id="dl" href="url_to_my_file">Download my file</a>.</p>
    <script type="text/javascript">
    (function download() {
    	var seconds = 9;
    	var cd = document.getElementById('cd');
    	cd.innerHTML = seconds;
    	goint = setInterval(function() {
    		seconds--;
    		cd.innerHTML = seconds;
    		if (seconds == 0) {
    			clearInterval(goint);
    			document.getElementById('dl').click();
    		}
    	}, 1000);
    })()
    </script>

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Donate while downloading page – does it exist?’ is closed to new replies.