[pmwiki-users] Custom Pagelist Templates and site URL path?

tamouse mailing lists tamouse.lists at gmail.com
Wed Dec 19 20:30:54 CST 2012

On Tue, Dec 18, 2012 at 10:32 AM, LernAway <lernaway at gmail.com> 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}
> 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.

More information about the pmwiki-users mailing list