Direct File-Link[SOLVED...now really :)]
Direct File-Link[SOLVED...now really :)]
Hi,
I want to upload a file in the File-Section in phpwcms and want to link directly to it from different Articles. Is it possible to link directly to a file without having it on a link-page or something? They got an id?
Milan
I want to upload a file in the File-Section in phpwcms and want to link directly to it from different Articles. Is it possible to link directly to a file without having it on a link-page or something? They got an id?
Milan
Last edited by milan on Wed 27. Apr 2005, 11:56, edited 3 times in total.
For example:
I got a pdf-Document named Test.pdf. I have uploaded it in my directory in phpwcms and made it public and active. Now I got serveral pages where I want to make this pdf downloadable. For example in a normal text "And here you can *download* the pdf" I want to make the word download to a link which links to the pdf.
I got a pdf-Document named Test.pdf. I have uploaded it in my directory in phpwcms and made it public and active. Now I got serveral pages where I want to make this pdf downloadable. For example in a normal text "And here you can *download* the pdf" I want to make the word download to a link which links to the pdf.
It seems that I am not able to explain my problem right.
- I uploaded a file and want to link to it. When I now want to make a link with the Wysiwg-Editor, I need a url or an id or something. And I don`t know with which Url/Id I can link to that file. Sure, thats not problem with a "Dateiliste", but the file I`m talking about only is uploaded and is available in the Filemanager of phpwcms.
- I uploaded a file and want to link to it. When I now want to make a link with the Wysiwg-Editor, I need a url or an id or something. And I don`t know with which Url/Id I can link to that file. Sure, thats not problem with a "Dateiliste", but the file I`m talking about only is uploaded and is available in the Filemanager of phpwcms.
You explain it right.
I think what you need is a replacement tag like the:
[ID 21]Sitemap[/ID]
where 21 refers to the article with id=21. But what you need is for referring to files, something like
[FILE 15]mypdfdoc[/FILE]
which would produce a link to the pdf-file, that you have uploaded using the File-menu. Any php-hacker out-there who can produce such a replacement tag?
I think what you need is a replacement tag like the:
[ID 21]Sitemap[/ID]
where 21 refers to the article with id=21. But what you need is for referring to files, something like
[FILE 15]mypdfdoc[/FILE]
which would produce a link to the pdf-file, that you have uploaded using the File-menu. Any php-hacker out-there who can produce such a replacement tag?
-
- Posts: 22
- Joined: Wed 13. Apr 2005, 10:39
Yes, I set them to public.phwhitfield wrote:Hi
you have to set the fileparameters to public. So that everybody is allowed to download it.
The only problem is the filename. But you could solve this isssue with this link:
download.php?hash
hash is the fieldname f_hash of your file.
The link is:
http://www.path_to_phpwcms.de/include/inc_act/act_download.php?pl=1&dl=52
What do I have to change?
milan
This is exactly the same problem I was facing with. And this is how I dealt with it, not exactly the best method, but it solved the problem. First take a look at the finished product:
http://www.turntechprecision.com/index.php?support
(notice the "Read the letter..." is a PDF file link)
1. Create a "file lists" content part, let it be visible, look up for the PDF file you have uploaded
2. Go look at the live page, you should see the file link there (that one that has a tiny PDF icon next to it), right click on that link and copy the link location
3. Come back to your content and insert the text link
4. Hide or delete the file lists content part
5. Done and go have a cup of coffee
Hope this helps.
This is exactly the same problem I was facing with. And this is how I dealt with it, not exactly the best method, but it solved the problem. First take a look at the finished product:
http://www.turntechprecision.com/index.php?support
(notice the "Read the letter..." is a PDF file link)
1. Create a "file lists" content part, let it be visible, look up for the PDF file you have uploaded
2. Go look at the live page, you should see the file link there (that one that has a tiny PDF icon next to it), right click on that link and copy the link location
3. Come back to your content and insert the text link
4. Hide or delete the file lists content part
5. Done and go have a cup of coffee
Hope this helps.