OE 5 and images

Author Message

Pascal France

Thursday 21 May 2009 9:42:08 am

Hi,

In OE 4 we could select the size we wanted for the display of an image.

I would like to do the same thing with OE 5.0 so I want a selectbox where I will select the size witch will be used in my custom template.

So, after reading comments in all ini files and spent 2 days looking for a solution, I did:

settings/ezoe_customattributes.ini.append.php

[myimage]
CustomAttributes[]=size
CustomAttributesDefaults[size]=petite
[CustomAttribute_myimage_size]
Name=Taille
Disabled=false
Type=select
Selection[]
Selection[petite]=100x100
Selection[grande]=200x200

admin_siteaccess/content.ini.append.php

[embed]
AvailableViewModes[]
AvailableViewModes[]=maffff

Please help me before I become crazy ! :-(

Pascal

Ce qui embellit le désert c'est qu'il cache un puits... quelque part... (A. de Saint-Exupéry) - http://luxpopuli.fr/eZ-Publish

Michael Fürst

Thursday 21 May 2009 11:47:46 am

Hi,

Do you mean embedded images?

I added the settings to my image.ini:

/settings/override/image.ini.append.php

[AliasSettings]
AliasList[]=articleimage468xX
AliasList[]=articleimage170xX

[articleimage468xX]
Reference=
Filters[]
Filters[]=geometry/scalewidth=468

[articleimage170xX]
Reference=
Filters[]
Filters[]=geometry/scalewidth=170

Pascal France

Thursday 21 May 2009 12:13:25 pm

Hi Mike,

Thanks for your answer.

Yes, I mean embedded image.

I have tried your solution but nothing happends.

In OE 5.0, when you upload an image to insert it in your article, once uploaded, you can choose:
- embed
- embed-inline
- full
- line

I have added a new choice:

- myimage

When I select «myimage» I think it is possible the «New <embed> tag» dialogbox displays a dropdown menu where I can select for exemple:

- reference
- small
- medium
- large
- rss
- original

It's this dropdown menu I can't create.

Pascal

Ce qui embellit le désert c'est qu'il cache un puits... quelque part... (A. de Saint-Exupéry) - http://luxpopuli.fr/eZ-Publish

André R.

Friday 22 May 2009 1:11:49 am

Pascal: It doesn't work like that.

To get image size drop down the class needs to be defined as image using the settings mentioned above. should be content.ini [RelationGroupSettings]ImagesClassList[] (and it uses class identifier, not numeric id)

If that is correct then, the ezoe/relation view (used in the background by the popup dialog when looking at embed tags properties) will pick the templates/ezoe/tag_embed_images.tpl automatically, witch includes the size drop down and image preview.

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

Pascal France

Friday 22 May 2009 3:41:00 am

Thanks André,

Now it's really better ;-)

In fact, the problem was that I don't use the default «image» class so the template use by the dialogbox of OE was extension/ezoe/design/standard/templates/ezoe/tag_embed_objects.tpl

Now I'm using the default image class, I have a problem with the image alignment on the public site wich is always on the left as you can see, for example, here:
http://linuxorable.fr/femoca/index.php/femoca/Artistes/Papa-Kourand

On the link above, the tiny image should be on the right (even if I disable the debug system, the images are on the left on the public site)
In Online Editor, the image is to the right place: on the right.

Pascal

Ce qui embellit le désert c'est qu'il cache un puits... quelque part... (A. de Saint-Exupéry) - http://luxpopuli.fr/eZ-Publish

André R.

Friday 22 May 2009 4:38:53 am

Not sure, haven't used base design since 3.6 era my self.

There shouldn't be any changes in this regard in the base design recently, so has image alignment never worked on your sites? or stopped working now?

IMO: One of many reasons why one should base pages on the webin (or flow witch extends webin) design instead though, more out of the box and more used.

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

Pascal France

Friday 22 May 2009 5:31:08 am

Hi André,

I'm sorry: a litle mistake in the /design/standard/templates/content/datatype/view/ezxmltags/embed.tpl template was the reason of the bad display.

Now all works fine.

I'm not using the ezwebin extension but the «plain» type.
Of course, while all is perfect with ezwebin, I will have to configure my templates with plain.

But I have noticed that the ezwebin Online Editor has two bottons Sup and Sub.
In my ezoe.ini this two lines:

 89 Buttons[]=sub
 90 Buttons[]=sup

are uncommented by default but the buttons are not displayed.
Is there something else to do ?

Thank's again for your help,

Pascal

Ce qui embellit le désert c'est qu'il cache un puits... quelque part... (A. de Saint-Exupéry) - http://luxpopuli.fr/eZ-Publish

Pascal France

Friday 22 May 2009 6:29:50 am

Hi,

I have done a from scratch plain type installation and the sub and sup buttons are well displayed.

The site where I meet the problem is an upgrad from 4.0.1 to 4.1.1.
But I don't think this is the cause.

Pascal

Ce qui embellit le désert c'est qu'il cache un puits... quelque part... (A. de Saint-Exupéry) - http://luxpopuli.fr/eZ-Publish

André R.

Friday 22 May 2009 6:36:21 am

They are only displayed if you have sub and sup custom tags enabled, similar to underline button.

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

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 16:08:00
Script start
Timing: Jan 18 2025 16:08:00
Module start 'layout'
Timing: Jan 18 2025 16:08:00
Module start 'content'
Timing: Jan 18 2025 16:08:00
Module end 'content'
Timing: Jan 18 2025 16:08:00
Script end

Main resources:

Total runtime0.0203 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.0077 589.2422152.6094
Module start 'layout' 0.00770.0038 741.851639.4297
Module start 'content' 0.01150.0063 781.2813101.4141
Module end 'content' 0.01790.0024 882.695346.3047
Script end 0.0203  929.0000 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.003014.5219140.0002
Check MTime0.00115.6066140.0001
Mysql Total
Database connection0.00146.938510.0014
Mysqli_queries0.003215.702530.0011
Looping result0.00000.167710.0000
Template Total0.00209.710.0020
Template load0.00115.266610.0011
Template processing0.00094.395510.0009
Override
Cache load0.00073.299310.0007
General
dbfile0.00031.616880.0000
String conversion0.00000.058640.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