Forums / Setup & design / OE 5 and images

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

eZ debug

Timing: Jan 18 2025 11:10:42
Script start
Timing: Jan 18 2025 11:10:42
Module start 'content'
Timing: Jan 18 2025 11:10:44
Module end 'content'
Timing: Jan 18 2025 11:10:44
Script end

Main resources:

Total runtime1.3060 sec
Peak memory usage4,096.0000 KB
Database Queries214

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0119 587.6016180.8516
Module start 'content' 0.01201.0871 768.4531666.5547
Module end 'content' 1.09900.2068 1,435.0078344.4688
Script end 1.3059  1,779.4766 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00450.3462210.0002
Check MTime0.00180.1397210.0001
Mysql Total
Database connection0.00330.253810.0033
Mysqli_queries1.205392.29162140.0056
Looping result0.00240.18072120.0000
Template Total1.270997.320.6354
Template load0.00180.134420.0009
Template processing1.269197.175820.6345
Template load and register function0.00030.022110.0003
states
state_id_array0.00100.074510.0010
state_identifier_array0.00110.086720.0006
Override
Cache load0.00170.1270820.0000
Sytem overhead
Fetch class attribute can translate value0.00130.100440.0003
Fetch class attribute name0.00140.1070110.0001
XML
Image XML parsing0.00130.102140.0003
class_abstraction
Instantiating content class attribute0.00000.0021130.0000
General
dbfile0.00360.2723340.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
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
4content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
8content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.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