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....

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 19 2025 07:12:18
Script start
Timing: Jan 19 2025 07:12:18
Module start 'layout'
Timing: Jan 19 2025 07:12:18
Module start 'content'
Timing: Jan 19 2025 07:12:19
Module end 'content'
Timing: Jan 19 2025 07:12:19
Script end

Main resources:

Total runtime1.0085 sec
Peak memory usage4,096.0000 KB
Database Queries57

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0068 590.1484152.6094
Module start 'layout' 0.00680.0036 742.757839.4141
Module start 'content' 0.01040.9965 782.1719472.0391
Module end 'content' 1.00690.0016 1,254.21098.5078
Script end 1.0085  1,262.7188 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00360.3608160.0002
Check MTime0.00150.1520160.0001
Mysql Total
Database connection0.00100.095310.0010
Mysqli_queries0.957594.9427570.0168
Looping result0.00060.0562550.0000
Template Total0.967796.020.4839
Template load0.00310.310220.0016
Template processing0.964695.642520.4823
Template load and register function0.00020.022410.0002
states
state_id_array0.00140.139510.0014
state_identifier_array0.00130.131920.0007
Override
Cache load0.00270.2630200.0001
Sytem overhead
Fetch class attribute can translate value0.00120.115520.0006
Fetch class attribute name0.00120.117530.0004
XML
Image XML parsing0.00020.024320.0001
class_abstraction
Instantiating content class attribute0.00000.000730.0000
General
dbfile0.00070.0671100.0001
String conversion0.00000.001240.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
3content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
7content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
5content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 17
 Number of unique templates used: 5

Time used to render debug report: 0.0001 secs