Enlarge an image located in an article once clicked...

Author Message

Kamil Kube

Thursday 20 January 2005 5:07:31 am

Hi, a few month ago a user asked this one, but no answer has been found... Is it possible?!?

Here it goes:
"When I related a imgage to an article, it always appears quite small. Is it possible that I can click to enlarge those images? Thank you very much for helps."

Thanks, Kamil

Sven Berg Ryen

Thursday 20 January 2005 6:13:08 am

Sure, it's possible.

(I'll assume that you have the knowledge of how to achieve this through plain HTML/Javascript in my answer).

What I'd do, is create a separate pagelayout for displaying images in popup windows, and access the pagelayout through /layout/set/<your_layout>/ . Let's say you use "pagelayout_popup.tpl" for this purpose.

I think the layout needs be set in layout.ini.append.php .

To avoid having the window open full screen, you might include a javascript either on the page with the link, or in the pagelayout that opens in a new window.

Inside the pagelayout_popup.tpl file, instead of including $module_result.content, like you normally would, fetch the node and use attribute_view_gui to display the image, only this time with a different size.

HTH!

Cheers,

Sven Ryen
sven.ryen at maxus.no

Kamil Kube

Thursday 20 January 2005 6:27:44 am

Sorry, forget to mention that we still use EZ 2.2.9. Is it also possible here?

Sven Berg Ryen

Thursday 20 January 2005 7:41:13 am

I have no clue. Have you considered upgrading to 3.5? What kind of site are you running?

Cheers,

Sven Ryen
sven.ryen at maxus.no

Kamil Kube

Thursday 20 January 2005 8:42:50 am

No, unfortunately this is not possible because of our company policy. It's an intranet page.

Eivind Marienborg

Thursday 20 January 2005 10:03:12 am

You could try linking to the original image file, like this:

{attribute_view_gui attribute=$node.object.data_map.thumbnail href=concat('http://www.SITENAME.COM/',
$node.object.data_map.thumbnail.content.original.url)}

Kamil Kube

Tuesday 25 January 2005 2:27:10 am

Eivind -- thanks a lot but your suggestion looks like V 3.x code. What I need is a solution for 2.2.x. Any further idea, perhaps?

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 31 2025 01:18:47
Script start
Timing: Jan 31 2025 01:18:47
Module start 'layout'
Timing: Jan 31 2025 01:18:47
Module start 'content'
Timing: Jan 31 2025 01:18:48
Module end 'content'
Timing: Jan 31 2025 01:18:48
Script end

Main resources:

Total runtime0.8060 sec
Peak memory usage8,192.0000 KB
Database Queries71

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0046 588.2578151.2266
Module start 'layout' 0.00460.0034 739.4844220.7344
Module start 'content' 0.00800.7972 960.21884,511.9844
Module end 'content' 0.80520.0007 5,472.203115.8125
Script end 0.8060  5,488.0156 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00350.4354160.0002
Check MTime0.00130.1601160.0001
Mysql Total
Database connection0.00070.086210.0007
Mysqli_queries0.717188.9653710.0101
Looping result0.00070.0882690.0000
Template Total0.758494.120.3792
Template load0.00200.247120.0010
Template processing0.756493.845720.3782
Template load and register function0.00140.172810.0014
states
state_id_array0.00110.140810.0011
state_identifier_array0.00110.133520.0005
Override
Cache load0.00170.2109270.0001
Sytem overhead
Fetch class attribute can translate value0.00170.205030.0006
Fetch class attribute name0.00841.042880.0011
XML
Image XML parsing0.00190.233030.0006
class_abstraction
Instantiating content class attribute0.00000.002380.0000
General
dbfile0.00220.2711160.0001
String conversion0.00000.000740.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
7content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
8content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 20
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs