On Tue, Dec 18, 2012 at 10:32 AM, LernAway <[email protected]> wrote: > I'm looking for a way to avoid using http://My_Domain.com/uploads/ as show in > the below example. > > [@ > [[#thumblist5]] > (:if equal {<$Group}:) >>>lframe width=130pct<< > (:if:)\ > <div id="thumb"> > [[http://My_Domain.com/uploads/{=$Group}/{=$Name}/{=$:image}"{=$Title}" -> > {=$FullName}]] > </div> > (:if equal {>$Group}:) >>><< > [[#thumblist5]] > @] > > I attempted to use with no luck... > > {=$SiteUrl} > {=$ScriptUrl} > .$_SERVER['HTTP_HOST']. > > and > > {=$UploadDir}
You may want to look at using $UploadUrlFmt as described on http://www.pmwiki.org/wiki/PmWiki/UploadsAdmin -- I think it does exactly what you need... $UploadDir = '/path/to/where/your/uploads/live'; $UploadUrlFmt = 'http://My_Domain.com/uploads'; $UploadPrefixFmt = '/$Group/$Name'; in config.php. Note the use of single quotes to avoid immediate interpolation. With this set up, while your uploads can live outside your pmwiki directory, they must still be available for your HTTPD server. To avoid this, you need to look at http://www.pmwiki.org/wiki/Cookbook/SecureAttachments in the area about disabling direct downloads. _______________________________________________ pmwiki-users mailing list [email protected] http://www.pmichaud.com/mailman/listinfo/pmwiki-users
