Image popup

Author Message

Linas Adomas

Thursday 16 June 2005 5:39:55 pm

I am new to Ez and I need help.
I have created A class that includes image field. I need to make such thing: then you click on that image it opens in popup and is much bigger. I have read some topics in forum but it didnt helped me.
I include image in to page like this:
attribute_view_gui image_class=large attribute=$node.object.data_map.image1
I tried many ways to add <a> tag but it didnt worked.
How can I send the Node Id of pressed image to the popup window? If I cold do so, I think I would solve my problem.

Ekkehard Dörre

Friday 17 June 2005 1:18:10 am

Welcome Linas,

http://www.ez.no/community/forum/developer/display_large_image_on_click_small_image

Greetings, ekke

http://www.coolscreen.de - Over 40 years of certified eZ Publish know-how: http://www.cjw-network.com
CJW Newsletter: http://projects.ez.no/cjw_newsletter - http://cjw-network.com/en/ez-publ...w-newsletter-multi-channel-marketing

Heiner Wurbs

Monday 20 June 2005 2:19:55 am

Hi, the problem is, that with this solution there are no html-tags around the image in the popup window, like e.g. a close button or copyright data.

What I did is, creating a new layout (like printlayout):

[popup_img]
PageLayout=popup_img_pagelayout.tpl

And the code for popup_img_pagelayout.tpl is:

<html>
<head>
{include uri="design:page_head.tpl" enable_link=false() enable_glossary=false() enable_help=false()}
<style>
    @import url({"stylesheets/popup.css"|ezdesign});
</style>
</head>

<body>
<a href="JavaScript:close_popup();">
	{let actual_node=fetch( content, node, hash( node_id, $module_result.node_id ))}
			{node_view_gui view=full content_node=$actual_node}
	{/let}
</a>
</body>
</html>

Calling the popup window inside the line view with the following statement:

{section show=$node_obj.object.data_map.imagelarge.content.is_valid}
{let imagelarge=$node_obj.object.data_map.imagelarge.content['original']}
<a href=JavaScript:showImg({concat("/layout/set/popup_img/",$node_obj.object.main_node.url_alias)|ezurl},"{$imagelarge.name}","{$imagelarge.width}","{$imagelarge.height}")><img src={"magnifier.gif"|ezimage} width="22" height="20" border="0"></a>
{/section}

Jazem Khalil

Monday 20 June 2005 10:45:50 pm

Hei, I am a new user , I hava use Ez systems now 2 days. I was trying the simpel intstruction of the way bulding up a popupimage, but when I use it inside the articel.tpl the page do not shows anymore with the intro or other information.

Any Way.., Its that posible to know the code how to make a image bigger in the article when a person do click on it ?

{attribute_view_gui attribute=$node.object.data_map.imagelarge image_class=articleimage align=right}

This is a image code inside a articel full template, but i want when some one do click on it to became bigger or even to popup in orginal size.

Thank you

Heiner Wurbs

Thursday 23 June 2005 3:03:53 am

Hi,
the popup is not really simple, and if you use ez only since two days, there could be many confusion in all that different ini files.

if you use the already created artcile class, then you have to redefine this class, adding the attribute "imagelarge" (as an image datatype) to it, so that data_map.imagelarge is a valid attribute.

regards,
Heiner

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 08:04:38
Script start
Timing: Jan 31 2025 08:04:39
Module start 'layout'
Timing: Jan 31 2025 08:04:39
Module start 'content'
Timing: Jan 31 2025 08:04:39
Module end 'content'
Timing: Jan 31 2025 08:04:39
Script end

Main resources:

Total runtime0.0173 sec
Peak memory usage2,048.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0052 588.0078151.1953
Module start 'layout' 0.00520.0024 739.203136.6094
Module start 'content' 0.00760.0082 775.812594.2266
Module end 'content' 0.01580.0015 870.039137.9922
Script end 0.0173  908.0313 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002313.1659140.0002
Check MTime0.00116.1987140.0001
Mysql Total
Database connection0.00105.707010.0010
Mysqli_queries0.002413.868230.0008
Looping result0.00000.079910.0000
Template Total0.00116.410.0011
Template load0.00094.933110.0009
Template processing0.00031.455710.0003
Override
Cache load0.00063.321810.0006
General
dbfile0.004123.684880.0005
String conversion0.00000.039940.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

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

Time used to render debug report: 0.0001 secs