Forums / General / Does anybody know how to make a file download like this?

Does anybody know how to make a file download like this?

Author Message

Dicky Leung

Monday 22 December 2008 8:49:43 pm

" The presentation file used by ITB in the IT Security Awareness Seminar can be downloaded <b>HERE</b>. "

The user can download file by click the HERE.

And, the web admin may make the link at the online editor.

Thank you.

source pixel

Monday 22 December 2008 9:50:49 pm

hello, maybe this help
Creating a link to download a file with Online Editor in eZ Publish
http://pwet.fr/blog/creating_a_link_to_download_a_file_with_online_editor_in_ez_publish

Dicky Leung

Monday 22 December 2008 10:50:20 pm

Thank you for your help.

I was following the step to do, but still not work.
Is it affect by using ezpublish 4.0.0 & eZ Online Editor MCE 5.0.0beta3?

Noicokuna Niemoge

Friday 23 January 2009 12:14:42 am

I have the same problem...

And what is the file// link for anyway? o_O

Shiki soku ze ku...

André R.

Friday 23 January 2009 1:40:47 am

file//

Intranets, its a link to the file system. (Like c:\ on windows)

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

Noicokuna Niemoge

Friday 23 January 2009 1:51:24 am

Hi Andre;

Following the steps described in the blog's post produces a link like:

http://www.site.com/index.php?/site/Media/Files/File_name

Of course people can't download it since they don't have access to Media folder. How to get the addres like:

http://www.site.com/index.php?/site/content/download/529/3682/file/File_name.pdf ? o_O

The template used in that example is:

{def $n='' $attribute='' $url=false() $protocols=array('http', 'file', 'ftp', 'mailto', 'https')
}{if $protocols|contains( $href|explode(':')|extract_left(1) )not()
    }{set $n=fetch(content, node, hash(node_path, $href))
    }{if and($n, $n.object.class_identifier|eq('file'))
    }{set $attribute=$n.data_map.file
    }{set $url=concat( '/content/download/', $attribute.contentobject_id, '/', $attribute.id,'/version/', $attribute.version , '/file/', $attribute.content.original_filename|urlencode )
    }{/if}{/if}{if $url|not()}{set $url=$href}{/if}<a href={$url|ezurl}{section show=$id} id="{$id}"{/section}{section show=$title} title="{$title}"{/section}{section show=$target} target="{$target}"{/section}{section show=ne($classification|trim,'')} class="{$classification|wash}"{/section}>{$content}</a>{undef $n $attribute $url $protocols}

Shiki soku ze ku...

Noicokuna Niemoge

Friday 23 January 2009 3:35:45 am

Please help, this template looks good to me, I don't know what to change to make it display right link...

Shiki soku ze ku...

Noicokuna Niemoge

Saturday 24 January 2009 11:09:53 am

I'm forced to bump the topic because I really have no idea what to change, where's the problem, etc. I'm really sorry, but I need your help...

Shiki soku ze ku...

eZ debug

Timing: Jan 30 2025 21:46:44
Script start
Timing: Jan 30 2025 21:46:44
Module start 'content'
Timing: Jan 30 2025 21:46:45
Module end 'content'
Timing: Jan 30 2025 21:46:45
Script end

Main resources:

Total runtime0.2224 sec
Peak memory usage8,192.0000 KB
Database Queries141

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0100 588.0703370.2813
Module start 'content' 0.01000.0155 958.35161,009.7031
Module end 'content' 0.02550.1968 1,968.05473,897.7109
Script end 0.2223  5,865.7656 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00462.0880200.0002
Check MTime0.00140.6080200.0001
Mysql Total
Database connection0.00090.404310.0009
Mysqli_queries0.120053.98361410.0009
Looping result0.00150.69171390.0000
Template Total0.196288.210.1962
Template load0.00090.421810.0009
Template processing0.195387.806510.1953
Override
Cache load0.00060.281110.0006
Sytem overhead
Fetch class attribute can translate value0.00190.867110.0019
XML
Image XML parsing0.00060.275710.0006
General
dbfile0.00803.5838200.0004
String conversion0.00000.004030.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0002 secs