linking from file center

Get help with installation and running phpwcms here. Please do not post bug reports or feature requests here.
Post Reply
fshock1
Posts: 3
Joined: Wed 26. Jan 2005, 20:32

linking from file center

Post by fshock1 »

Hi as an example,

I have uploaded a pdf file to the file center.

Then I want to put some text in a content area like so...

Down load this document here. Click here now.

where the "click here now" is a hyperlink to the file in the file center.

Now since this is a virtual file center, how do I get the hyper link done for this. ... the same goes for images for example if i want to display an image in a page <img src="filecentervirtualpath">

I tried to find my situation in the forum but am unable to. If it exist someone can direct me to it as well .. thanks.
Peekay
Posts: 286
Joined: Sun 25. Jul 2004, 23:24
Location: UK

Post by Peekay »

Files uploaded to the file centre are stored in the database, not as files. To access them you need to add a 'File List' content part to an article. When the content part dialogue opens, press the 'folder' icon adjacent to the top pane (Files) to see the available files. Click the name of the file to add it to the top pane. Enter the link description, e.g. "download this file", in the lower pane (Description).

Because they're stored in the DB, you can't use a regular image URL to add an image in the filecentre to an article. You need to use the 'image' or 'text with image' content parts. 8)
fshock1
Posts: 3
Joined: Wed 26. Jan 2005, 20:32

Post by fshock1 »

You may be using a different version than I am as i can see that files are stored in the regular file system (perhance with an entry in the db for file center purposes) I am using 1.1 RC4 which i downloaded yester day from phpwcms.de

If I pass my mouse over the link when I place the filelist in the content area I see a link like this...

http://mydomain.com/cms/download.php?id=24656,9,1

the id is probably in the db. Do you know how i can create a replacement tag such as for example [FILECENTERFILE id]Download Now[/FILECENTER]

where id would be replaced by "24656,9,1"

that would produce a html like <a href="download.php?id=24656,9,1">Download Now</a>

Thanks.

I have one more question on the dynamic menu tags but I'll ask that later.
spirelli
Posts: 996
Joined: Tue 27. Jul 2004, 13:37
Location: London

Post by spirelli »

The files get stored in the phpwcms_filestorage folder (and its subfolders).
But it's true, to link to a document file simply choose the "file list" content part. To display pictures you can do this via the the "pictures" ot "text w/ image" content part.
Can't see where the problem is.
spirelli
Posts: 996
Joined: Tue 27. Jul 2004, 13:37
Location: London

Post by spirelli »

spirelli
Posts: 996
Joined: Tue 27. Jul 2004, 13:37
Location: London

Post by spirelli »

Me again, sorry.
fshock1 wrote:If I pass my mouse over the link when I place the filelist in the content area I see a link like this...

http://mydomain.com/cms/download.php?id=24656,9,1
That's the tooltip which shows, right? Otherwise the "file list" content part will show the file name and a discribtion. SO I guess you have to compromise with "please download the file below:" or sth like this. Or settle with <a href="download.php?id=24656,9,1">Download Now</a> as you suggested. There is no [FILECENTRE] tag or similar, as far as I know
Peekay
Posts: 286
Joined: Sun 25. Jul 2004, 23:24
Location: UK

Post by Peekay »

Apologies fshock1, of course you are right that the files do exist. It's just that utilising the file details stored in the database (via the content parts) is the only practical way to use them. My bad wording I'm afraid. :oops:

I agree it would be nice to reference them directly using the original file names, so you could put a link in the middle of a line of text for example. As Spirelli says, not possible without a lot of messing about at present.
Post Reply