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

Get help with installation and running phpwcms here. Please do not post bug reports or feature requests here.
milan
Posts: 51
Joined: Sat 22. Jan 2005, 22:35

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

Post 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
Last edited by milan on Wed 27. Apr 2005, 11:56, edited 3 times in total.
pepe
Posts: 3954
Joined: Mon 19. Jan 2004, 13:46

Post 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...
milan
Posts: 51
Joined: Sat 22. Jan 2005, 22:35

Post 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.
pepe
Posts: 3954
Joined: Mon 19. Jan 2004, 13:46

Post by pepe »

Hi milan,

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

and phpWCMS does the rest :lol:
milan
Posts: 51
Joined: Sat 22. Jan 2005, 22:35

Post 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....
User avatar
pico
Posts: 2595
Joined: Wed 28. Jul 2004, 18:04
Location: Frankfurt/M Germany
Contact:

Post 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:
Lieber Gott gib mir Geduld - ABER BEEIL DICH
Horst - find me at Musiker-Board
milan
Posts: 51
Joined: Sat 22. Jan 2005, 22:35

Post 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.
rotte2
Posts: 7
Joined: Tue 26. Apr 2005, 08:49

Post 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?
User avatar
pico
Posts: 2595
Joined: Wed 28. Jul 2004, 18:04
Location: Frankfurt/M Germany
Contact:

Post 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.
Lieber Gott gib mir Geduld - ABER BEEIL DICH
Horst - find me at Musiker-Board
milan
Posts: 51
Joined: Sat 22. Jan 2005, 22:35

Post by milan »

Jepp, I found that too. Thanx! That was it!
milan
Posts: 51
Joined: Sat 22. Jan 2005, 22:35

Post 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...
phwhitfield
Posts: 22
Joined: Wed 13. Apr 2005, 10:39

Post 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.
milan
Posts: 51
Joined: Sat 22. Jan 2005, 22:35

Post 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?
deanloh
Posts: 99
Joined: Sat 12. Feb 2005, 05:31
Location: Singapore
Contact:

Post 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.
milan
Posts: 51
Joined: Sat 22. Jan 2005, 22:35

Post by milan »

Thanx...that worked. I hope in the next version its easier to do :)=
Post Reply