Upload files in forum topic and replay

Author Message

Francisco Rubio

Sunday 09 December 2007 4:31:16 am

I would like to allow users to upload files on forums topic and replay, but don´t know how to do it.
I´m a new user of ez publis, so don´t know very well how to use the role/policy structure.

Please help me!

Jon Staines

Monday 10 December 2007 7:21:42 am

Assuming that you trust your forum users enough to allow them to upload files. The easiest way I can think of is to just add one or more file attributes to the forum_reply class. This way you wouldn't have to do anything to the user permissions.

You will need to edit the templates that are used for creating and viewing the forum_replies. I think they are extension/ezwebin/design/ezwebin/override/templates/full/forum_topic.tpl and extension/ezwebin/design/ezwebin/override/templates/edit/forum_reply.tpl. Just add in a part for the new variable that you made.

Francisco Rubio

Tuesday 11 December 2007 12:17:25 am

And what exactly do I have to change in the code? And why the forum topic in the /full/ directory and the reply in the edit directory?
I´m very new at this and find it a little difficult. Please give me some more help

Jon Staines

Tuesday 11 December 2007 3:34:14 am

I wouldn't suggest doing this until you are a lot more familiar with how eZ Publish works. Read through some of the documentation on this site and learn how the template system works. Once you have tried a few examples and overridden some templates it will be straight forward.

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 18 2025 20:51:53
Script start
Timing: Jan 18 2025 20:51:53
Module start 'layout'
Timing: Jan 18 2025 20:51:53
Module start 'content'
Timing: Jan 18 2025 20:51:54
Module end 'content'
Timing: Jan 18 2025 20:51:54
Script end

Main resources:

Total runtime1.3781 sec
Peak memory usage4,096.0000 KB
Database Queries60

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0051 588.0313152.6406
Module start 'layout' 0.00510.0037 740.671939.4766
Module start 'content' 0.00871.3679 780.1484510.2734
Module end 'content' 1.37660.0014 1,290.421912.1406
Script end 1.3780  1,302.5625 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00370.2707160.0002
Check MTime0.00150.1068160.0001
Mysql Total
Database connection0.00080.060310.0008
Mysqli_queries1.329996.5012600.0222
Looping result0.00060.0416580.0000
Template Total1.340397.320.6702
Template load0.00230.167620.0012
Template processing1.338097.093920.6690
Template load and register function0.00020.016010.0002
states
state_id_array0.00150.107910.0015
state_identifier_array0.00210.154620.0011
Override
Cache load0.00190.1411160.0001
Sytem overhead
Fetch class attribute can translate value0.00090.062820.0004
Fetch class attribute name0.00100.074350.0002
XML
Image XML parsing0.00080.057620.0004
class_abstraction
Instantiating content class attribute0.00000.001460.0000
General
dbfile0.00090.0673160.0001
String conversion0.00000.000540.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
4content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
2content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
4content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
2content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 14
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs