DownloadManager-Talk

Summary: Talk page for DownloadManager.
Maintainer:
Users: (View? / Edit)

This space is for User-contributed commentary and notes. Please include your name and a date along with your comment.

Comments

Summary page for downloads

A summary page for all downloads is now possible with TotalCounter. Micha April 25, 2007, 01:37 PM

Integration of "Attach:" markup?

I have just installed the recipe, and it seems that only attachments with the "Download:" markup are counted. Is it possible to configure the script so that the existing (thousands of) attachments using the "Attach:" markup are counted, too? I'd prefer 'silent' counting without display because the layout of existing pages might be affected. --Henning June 06, 2006, at 08:11 AM

adding the following code in config.php before you include downloadman.php allows files using Attach: get logged through DownloadManager as well. note that in adding this, Download: still gets logged:
         SDV($IMap['Attach:'], '$1');
         SDV($LinkFunctions['Attach:'], 'LinkDownloadManager');
overtones99 July 18, 2008, at 09:58 PM
actually, after some experimentation, i found that the above method only sort-of works -- yes, Attach: does act now like Download:, however the tradeoff is that images don't show up on the page anymore - instead they're just links: Attach:mypic.jpg (!!) overtones99 July 19, 2008, at 06:51 AM

DownloadList?

Is there a way to modify the (:attachlist:) directive to give a quick list all the attached files using the DownloadMan style? Paul? October 16, 2006, at 02:39 PM

Problem with filenames that have spaces

As currently coded, [[Download:My File With Spaces.pdf]] when clicked upon results in the correct file being downloaded, but the file itself is named "My" -- everything after the first space has been dropped! DownloadManager is opening the file by calling an fopen command; I discovered that if you instead substitute a Redirect() command, you get the file you want, with the title you want. Below is both the code that I commented out and added:

   /*	// Fix for Internet Explorer 6.0 or prior bug.
	header('Cache-Control: maxage=3600'); //Adjust maxage appropriately
	header('Pragma: public'); 

	//echo "filepath: $filepath";

	preg_match('/\\.([^.]+)$/',$filepath,$match);
	if ($UploadExts[@$match[1]]) 
		header("Content-Type: {$UploadExts[@$match[1]]}");
	header("Content-Length: ".filesize($filepath));
	header("Content-disposition: $DownloadDisposition; filename=$upname");
	$fp = fopen($filepath, "r");

	if ($fp) {
		while (!feof($fp)) echo fread($fp, 4096);
		fclose($fp);
	}
	umask($oldumask);

	exit();
     */		
	//Redirect($pagename, "$filepath");
	Redirect($pagename, "$PmWikiDir/$filepath");
        ## $PmWikiDir is basically: http://mysite.com/pmwiki -- $filepath contains 'uploads/$Group/$upname'
        ## be sure to include $PmWikiDir in your globals at the top of the function
overtones99 July 19, 2008, at 06:51 AM

Talk page for the DownloadManager recipe (users?).