Toolbar override problem

Author Message

Pascal France

Monday 21 August 2006 11:26:15 am

Hi,

It seems there is a little trouble with toolbar.ini override.

In my toolbar.ini.append.php of my public_siteaccess I have:

[Tool]
AvailableToolArray[]
AvailableToolArray[]=basket
AvailableToolArray[]=best_seller
AvailableToolArray[]=calendar
AvailableToolArray[]=create_object
AvailableToolArray[]=drafts
AvailableToolArray[]=link
AvailableToolArray[]=login
AvailableToolArray[]=menu_droite_pascal             <== my toolbar
AvailableToolArray[]=node_list
AvailableToolArray[]=notification
AvailableToolArray[]=preferred_currency
AvailableToolArray[]=searchbox
AvailableToolArray[]=users
AvailableToolArray[]=user_country

[Tool_menu_droite_pascal]
parent_node=2
title=Menu général
show_subtree=
limit1=5
limit2=5
limit3=5
limit3=5
sort_by=published
treelist_check=yes
type_color_menu=bleu

[Tool_menu_droite_pascal_description]
parent_node=Répertoire dont il faut afficher le contenu
title=Titre
show_subtree=Répertoire dans lequel afficher l'outil
limit1=Nombre d'objets de 1er niveau à afficher
limit2=Nombre d'objets de 2ème niveau à afficher
limit3=Nombre d'objets de 3ème niveau à afficher
limit4=Nombre d'objets de 4ème niveau à afficher
sort_by=Critère de tri des objets
treelist_check=Rechercher dans tout l'arbre ?
type_color_menu=Couleur

But the system deals only with [Tool_menu_droite_pascal] and not with
[Tool_menu_droite_pascal_description]

If I put all that in toolbar.ini all works fine.

Regards

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

Kristof Coomans

Monday 21 August 2006 11:06:25 pm

Hi Pascal

Did you forget to add menu_droite_pascal_description to [Tool].AvailableToolArray[] ?

independent eZ Publish developer and service provider | http://blog.coomanskristof.be | http://ezpedia.org

Pascal France

Monday 21 August 2006 11:53:01 pm

Hi Kristof,

I use ezp 3.8.3 and it is a multisite (each site has its database).

In my settings/siteaccess/public_siteaccess/toolbar.ini.append.php I have exactly what is written in my previous post.

When I edit menu_droite_pascal in the admin interface, the french descriptions are not displayed.

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

Marcin Drozd

Tuesday 22 August 2006 1:12:00 am

Hi Pascal
I have the same problem with the 3.6 and 3.7 versions too, but I havent found the solution yet.

http://ez-publish.pl

Kristof Coomans

Tuesday 22 August 2006 3:52:22 am

Hello guys

Don't pay attention to my previous post, I was completely wrong :-)

The [Tool] blocks themselves are read either from the siteaccess toolbar.ini.append or from the default toolbar.ini (see kernel/visual/toolbar.php line 56-63 eZ publish 3.8.3), but the [Tool_description] blocks are only read from the default toolbar.ini (line 250-253).

Try to replace line 250-253 with this code:

    if ( $iniAppend->hasGroup( "Tool_" . $toolName . '_description' ) )
    {
        $actionDescription = $iniAppend->group( "Tool_" . $toolName . '_description' );
    }
    elseif ( $ini->hasGroup( "Tool_" . $toolName . '_description' ) )
    {
        $actionDescription = $ini->group( "Tool_" . $toolName . '_description' );
    }

Does it work now?

independent eZ Publish developer and service provider | http://blog.coomanskristof.be | http://ezpedia.org

Pascal France

Tuesday 22 August 2006 5:25:25 am

Hi Kristof,

It works perfectly !
Thanks a lot.

A last thing: with left toolbar the image of the tool is never showed in the admin iterface (Design->toolbar)

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

Marcin Drozd

Tuesday 22 August 2006 5:25:58 am

Hi Kristof
Yes, it does
Thank U, but one more question:
Is it a bug or purposeful action? Why doesn't it open in standard functionality?

http://ez-publish.pl

Marcin Drozd

Tuesday 22 August 2006 5:35:18 am

Hi
Pascal, Im not sure what U want to get, but I have a guess, and try change name of your image file like: mytool_line.png (instead of mytool.png)
or modify visual/toolbar.tpl, because there is:

{section show=eq($toolbar_position,right)} {* <-- only for right toolbar without '_line' *}
        <img src={concat( "toolbar/", $Tool.name|wash, ".png" )|ezimage} alt="{$Tool.name|wash}" />
    {section-else}
        <img src={concat( "toolbar/", $Tool.name|wash, "_line.png" )|ezimage} alt="{$Tool.name|wash}" />
    {/section}

<i>(Im really a slow writer)</i>

http://ez-publish.pl

Kristof Coomans

Tuesday 22 August 2006 6:44:36 am

I guess this is a bug, I report it now: http://ez.no/bugs/view/8864

independent eZ Publish developer and service provider | http://blog.coomanskristof.be | http://ezpedia.org

Pascal France

Tuesday 22 August 2006 7:21:55 am

Hi Marcin,

Thank a lot.
By changing the visual/toolbar.tpl all works fine.

@Kristof,

Couldn't be possible ezp manages left toolbar by default and the right or left empty spaces when we are not in the show_subtree of the tools ?

Regards

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

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 22:11:10
Script start
Timing: Jan 18 2025 22:11:10
Module start 'layout'
Timing: Jan 18 2025 22:11:10
Module start 'content'
Timing: Jan 18 2025 22:11:11
Module end 'content'
Timing: Jan 18 2025 22:11:11
Script end

Main resources:

Total runtime1.3546 sec
Peak memory usage4,096.0000 KB
Database Queries80

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0046 587.9141152.6250
Module start 'layout' 0.00460.0029 740.539139.4453
Module start 'content' 0.00751.3452 779.9844657.2891
Module end 'content' 1.35270.0018 1,437.273424.1641
Script end 1.3545  1,461.4375 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00300.2193160.0002
Check MTime0.00120.0908160.0001
Mysql Total
Database connection0.00060.041710.0006
Mysqli_queries1.279994.4836800.0160
Looping result0.00080.0612780.0000
Template Total1.326397.920.6632
Template load0.00210.152720.0010
Template processing1.324297.759620.6621
Template load and register function0.00020.016510.0002
states
state_id_array0.00070.051110.0007
state_identifier_array0.00160.115120.0008
Override
Cache load0.00180.1363620.0000
Sytem overhead
Fetch class attribute can translate value0.00080.056030.0003
Fetch class attribute name0.00160.1181110.0001
XML
Image XML parsing0.00070.052130.0002
class_abstraction
Instantiating content class attribute0.00000.0021130.0000
General
dbfile0.00190.1414160.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
10content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
16content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
3content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
7content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
3content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 41
 Number of unique templates used: 7

Time used to render debug report: 0.0002 secs