goldsky / FileDownload-R

FileDownload snippet for MODX revolution
12 stars 7 forks source link

relative path #14

Closed MacKlaud closed 9 years ago

MacKlaud commented 11 years ago

Hi. Sorry for the translation of google. How do I get the relative path without the hash? & DirectLink = 1 - shows the full path.

goldsky commented 11 years ago

I assume the file is web accessible, so you might want to edit the chunk (the default is tpl-row-file.chunk.tpl), and use output modifier like:

[[+fd.url:replace=`[[++base_path]]==`]]
MacKlaud commented 11 years ago

I explained wrong. The path is not valid. Full path: c :/ folder / site.ru / www / images Relative path: www.site.ru / images DownloadR displays: www.site.ru / folder / site.ru / www / images How to make a relative path?

goldsky commented 11 years ago

depends on your snippet call. what was it?

MacKlaud commented 11 years ago

[[!FileDownload? &tplWrapper=tplWrap &tplFile=tplFile &cssFile=fileprog &chkDesc=fDescription &countDownloads=0 &cssAltRow=`&getDir=files/program/&extHidden=rar,cab,exe,apk,sis&directLink=1`]]

goldsky commented 11 years ago

Is the database made from copying database? because actually I've make the full path filter.

If it is not, what's your server environment?

MacKlaud commented 11 years ago

Sorry. I do not understand what to check

goldsky commented 11 years ago

Apache? nginx? XAMPP?

MacKlaud commented 11 years ago

Apache

goldsky commented 9 years ago

you need to provide absolute path, eg:

&getDir=`[[++assets_path]]files/program/`

or

&getDir=`[[++core_path]]files/program/`