Forums / Setup & design / upload file

upload file

Author Message

Marina Andreou

Wednesday 15 June 2005 5:20:57 am

hello,

I am new to ezPublish and php and I have to say that i am a bit confused.I am trying to build a site in which someone could upload a file. What I mean is that I want page in which there will be an upload form. If I am correct I have to use the upload.tpl file.How can I use upload .tpl?and genarally how can I use .tpl files?
Please don't laugh at me...I am very confused with ez publish.

Arran Price

Wednesday 15 June 2005 4:08:33 pm

Hi Marina,
welcome to the steep but worthwhile learning curve for ezpublish ;-)

Files are a content class within ezpublish.
Im assuming you want something similar to the new file creation/adding facility within the admin interface but on the standard user interface instead.

What you need to do is:
* Make sure you have the roles/policies set up to allow the user(s) to create new file objects.
* Create an override template to actually bring up the default edit page for a file (look at template overrides, you may want to add a folder and override that with the correct template to add a file) If you arent sure what templates you want, start by turning on template debugging, so when you add a file through the admin interface you can see which templates it uses (and hence which ones you need to override)
* Modify the copies of the default templates (copy the templates that you want to the appropriate directory and modify them)

Hope that helps.
If you havent done the tutorial, I strongly recommend that you go through it, as it some parts that are directly related to what you are trying to achieve.

Arran

Marina Andreou

Thursday 16 June 2005 3:09:55 am

Thenks a lot....you were very helpful....