Forums / Developer / Toolbar override problem

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

eZ debug

Timing: Jan 18 2025 19:33:18
Script start
Timing: Jan 18 2025 19:33:18
Module start 'content'
Timing: Jan 18 2025 19:33:18
Module end 'content'
Timing: Jan 18 2025 19:33:18
Script end

Main resources:

Total runtime0.1486 sec
Peak memory usage2,048.0000 KB
Database Queries141

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0060 587.7109180.8359
Module start 'content' 0.00600.0057 768.5469105.9922
Module end 'content' 0.01170.1368 874.5391535.7734
Script end 0.1485  1,410.3125 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00362.4254200.0002
Check MTime0.00140.9099200.0001
Mysql Total
Database connection0.00060.386910.0006
Mysqli_queries0.104770.45071410.0007
Looping result0.00140.91151390.0000
Template Total0.136491.810.1364
Template load0.00090.593810.0009
Template processing0.135591.232510.1355
Override
Cache load0.00060.390410.0006
Sytem overhead
Fetch class attribute can translate value0.00090.609210.0009
XML
Image XML parsing0.00030.182910.0003
General
dbfile0.00181.2350200.0001
String conversion0.00000.003430.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
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0002 secs