Page 1 of 2

Direct File-Link[SOLVED...now really :)]

Posted: Mon 25. Apr 2005, 17:55
by milan
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

Posted: Mon 25. Apr 2005, 20:02
by pepe
Hi milan,

don't know, what you are going to do, but:

put your image (imageName.jpg) into a directory like /picture

and inside your link you use the absolute URL: {SITE}picture/imageName.jpg

might be possible, giv it a try...

Posted: Mon 25. Apr 2005, 21:49
by milan
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.

Posted: Mon 25. Apr 2005, 21:54
by pepe
Hi milan,

the easiest way is, using the contentpart "Dateiliste"....

and phpWCMS does the rest :lol:

Posted: Tue 26. Apr 2005, 01:24
by milan
But when I use Dateiliste I got an article with links. I do not need that. I only want to make a textlink in an article to a file that I have uploaded in the CMS....

Posted: Tue 26. Apr 2005, 08:12
by pico
Hi

then just do it with a Textlink - use HTML Command <a href....> :)

and the WYSIWYG-Editors also have a Function for that :lol:

Posted: Tue 26. Apr 2005, 09:54
by milan
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.

Posted: Tue 26. Apr 2005, 14:17
by rotte2
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?

Posted: Tue 26. Apr 2005, 14:33
by pico
Hi

OK if you need the uploaded Filename goto Filecenter - goto your File and open it from here - then copy the Path and Filname (Right Mouse Button) to the Clipboard and instert it where you need it from Clipboard.

Posted: Tue 26. Apr 2005, 16:01
by milan
Jepp, I found that too. Thanx! That was it!

Posted: Tue 26. Apr 2005, 16:47
by milan
No...I recognized that its only working, when You are logged in. If not, you press on the link and the Login-Screen of phpwcms appears...

Posted: Tue 26. Apr 2005, 17:06
by phwhitfield
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.

Posted: Tue 26. Apr 2005, 17:48
by milan
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.
Yes, I set them to public.

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?

Posted: Tue 26. Apr 2005, 19:12
by deanloh
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.

Posted: Wed 27. Apr 2005, 11:55
by milan
Thanx...that worked. I hope in the next version its easier to do :)=