[pmwiki-users] pmwiki-2.0.beta31 released
    Patrick R. Michaud 
    pmichaud at pobox.com
       
    Fri Apr 15 16:34:01 CDT 2005
    
    
  
On Fri, Apr 15, 2005 at 11:03:45PM +0200, Pierre Rouzeau wrote:
> Hello,
> I will favor modification to $UploadUrlFmt which may help the minimage 
> recipe (http://www.pmwiki.org/wiki/Cookbook/ImagesAutoResizing) to work 
> properly with this functionality with minimal (or no) modifications.
> 
> Though, I don't clearly see how that will marry with the 
> $UploadPrefixFmt string
I'm not certain either.  There may be another variable that folds
in $UploadPrefixFmt depending on the setting of $EnableDirectDownloads,
and we would use that to FmtPageName().  $UploadPrefixFmt isn't needed 
in ?action=download links.
Maybe something like:
   SDV($UploadPrefixFmt, '/$Group');
   if (IsEnabled($EnableDirectDownloads, 1)) {
     SDV($UploadUrlFmt, '...url to $UploadsDir...');
     SDV($UploadPrefixedNameFmt, '$UploadPrefixFmt$UploadName');
   } else {
     SDV($UploadUrlFmt, '$PageUrl?action=download&upname=');
     SDV($UploadPrefixedNameFmt, '$UploadName');
   }
then later, to generate the url:
   $FmtV['$UploadName'] = $im;
   $urlimg = FmtPageName("$UploadUrlFmt$UploadPrefixedNameFmt", $pagename);
Pm
    
    
More information about the pmwiki-users
mailing list