Forums / Setup & design / images not shown

images not shown

Author Message

Toni Ascó

Sunday 11 April 2004 1:55:00 am

Hi, i'm using the online editor to edit my articles.
When i try to insert an image (using the magnifying glass and such) the online editor inserts a piece of code like:

<object id=a_number size=msmall>

But when the article is displayed i only see a link where i should see an image.

Any idea?

Thanx in advance,
Toni

Lazaro Ferreira

Monday 12 April 2004 9:44:40 am

Hi,

It seems that you are getting the result of the default image template, that shows a link to the image object, instead you should get the embed image template (you will need to verride this) that shows the image within your i.e article, or info_page.etc

Lazaro
http://www.mzbusiness.com

Toni Ascó

Monday 12 April 2004 10:00:14 am

Thanx Lazaro, it workerd! :)
Now i face another problem, how can i get the image_size and the alignment?

At the momment i have them as a default mode (medium and center) but if i set small and left in the online editro i expect to put those values in the template override.
I see that embed.tpl gets the attributes in the very first line, but i don't know how to acces to those attributes from ezpublish code...

Any idea?

Thanx in advance,

Toni

Lazaro Ferreira

Wednesday 14 April 2004 11:07:11 am

Hi,

This is the image_embed.tpl supplied with EZP Portal Setup

{let image_variation="false"
     align="center"
     href=''}

{section show=is_set($attribute_parameters.size)}
{set image_variation=$object.data_map.image.content[$attribute_parameters.size]}
{section-else}
{set image_variation=$object.data_map.image.content["medium"]}
{/section}

{section show=is_set($attribute_parameters.align)}
{set align=$attribute_parameters.align}
{section-else}
{set align="center"}
{/section}

{section show=is_set($attribute_parameters.href)}
{set href=$attribute_parameters.href}
{section-else}
{set href=""}
{/section}

{switch match=$align}
{case match="left"}
<div class="imageleft">
{section show=$href}<a href={$href|ezurl}>{/section}
<img src={$image_variation.full_path|ezroot} />
{section show=$href}</a>{/section}

<div style="width: {$image_variation.width}px;">
{$object.data_map.caption.content.output.output_text}
</div>
</div>
{/case}
{case match="right"}
<div class="imageright">
{section show=$href}<a href={$href|ezurl}>{/section}
<img src={$image_variation.full_path|ezroot} />
{section show=$href}</a>{/section}

<div style="width: {$image_variation.width}px;">
{$object.data_map.caption.content.output.output_text}
</div>
</div>
{/case}
{case}
<div class="imagecenter">
{section show=$href}<a href={$href|ezurl}>{/section}
<img src={$image_variation.full_path|ezroot} />
{section show=$href}</a>{/section}

<div style="width: {$image_variation.width}px;">
{$object.data_map.caption.content.output.output_text}
</div>
</div>
{/case}
{/switch}

{/let}

Look at the section :

{section show=is_set($attribute_parameters.size)}
{set image_variation=$object.data_map.image.content[$attribute_parameters.size]}
{section-else}
{set image_variation=$object.data_map.image.content["medium"]}
{/section}

As you see, you can change "medium" size for another one there, it should works

-----------
Lazaro

Lazaro
http://www.mzbusiness.com

bob barker

Sunday 18 April 2004 5:07:50 pm

I have followed this and other threads on the same subject, but I simply do not understand the solution. Could someone step me through how exactly to embed an image in a news article and actually have it displayed? I use the on-line editor, I insert an image object and it shows up in the article in admin mode. In user mode it shows as a text link to the image file. How, exactly, do I override the default template to use some other template, and what does the other template look like?

Please help - this is incredibly frustrating - embedding an image into text should not be this difficult!

Bruce Morrison

Sunday 18 April 2004 7:45:56 pm

1. Copy design/admin/override/templates/embed_image.tpl to design/<<your design>>/override/templates/embed_image.tpl
2. Add

 [embed_image]
Source=content/view/embed.tpl
MatchFile=embed_image.tpl
Subdir=templates
Match[class]=5

to settings/siteaccess/<<your siteaccess>>/override.ini.append
3. Clear cache

Cheers
Bruce

My Blog: http://www.stuffandcontent.com/
Follow me on twitter: http://twitter.com/brucemorrison
Consolidated eZ Publish Feed : http://friendfeed.com/rooms/ez-publish

bob barker

Monday 19 April 2004 6:12:19 am

Bruce, thank you, however ....

I Have done exactly as indicated. But the images still show up as text links to the image.
Yes, I did clear the caches and yes, they are valid image files. If you would like access to the site, send me a clear email address and I will send you the id and password.

Bob Barker
bob.barker@newxco.com

bob barker

Monday 19 April 2004 6:55:39 am

After much checking/rechecking and so on, it now works and I am convinced that something is odd with cache clearing. I used the clear all cache link in the admin screens but images still do not appear, however, if I clear each cache individually then lo and behold .... images in the articles.

Probably this is all just a figment of my imagination, but are you sure that the clear all cache button works??

Thanks for your help - I was on the right track, but cache clearance was masking the reolution.

Felix Laate

Tuesday 04 May 2004 1:56:46 pm

I have experienced the same thing many times with the 3.2-x and 3.3-x series. Never trust the "clear all" option! Do it manually!

Is this a bug?

Felix

Publlic Relations Manager
Greater Stavanger
www.greaterstavanger.com

eZ debug

Timing: Jan 19 2025 00:26:08
Script start
Timing: Jan 19 2025 00:26:08
Module start 'content'
Timing: Jan 19 2025 00:26:09
Module end 'content'
Timing: Jan 19 2025 00:26:10
Script end

Main resources:

Total runtime1.3353 sec
Peak memory usage4,096.0000 KB
Database Queries218

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0081 587.6094180.8438
Module start 'content' 0.00811.1409 768.4531730.6484
Module end 'content' 1.14900.1862 1,499.1016344.4609
Script end 1.3352  1,843.5625 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00410.3064210.0002
Check MTime0.00160.1162210.0001
Mysql Total
Database connection0.00080.062210.0008
Mysqli_queries1.235992.55632180.0057
Looping result0.00380.28372160.0000
Template Total1.303097.620.6515
Template load0.00190.140920.0009
Template processing1.301197.440420.6506
Template load and register function0.00030.019710.0003
states
state_id_array0.00160.119710.0016
state_identifier_array0.00190.145420.0010
Override
Cache load0.00160.1217570.0000
Sytem overhead
Fetch class attribute can translate value0.00180.138360.0003
Fetch class attribute name0.00200.1506110.0002
XML
Image XML parsing0.00180.135660.0003
class_abstraction
Instantiating content class attribute0.00000.0016110.0000
General
dbfile0.00260.1919330.0001
String conversion0.00000.000530.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
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
9content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
10content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
19content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
4content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
2content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 46
 Number of unique templates used: 7

Time used to render debug report: 0.0002 secs