Path

ez.no / exponential / documentation / customization / components / toolbars / adding new tools to toolbar list


Adding new tools to toolbar list

These documentation pages are no longer maintained. Please visit the new documentation site.

In Exponential 3.4 standard release, the following tools are available in the toolbar list:

  • basket
  • calendarlink
  • login
  • searchbox
  • node_list
  • users
  • notification
  • best_seller
  • create_object
  • notification
  • drafts

To add a new tool to toolbar list, you need to:

1. Copy following code to settings/siteaccess/site/toolbar.ini.append.php if there is no [Tool] block in this file:

[Tool]

AvailableToolArray[]

AvailableToolArray[]=basket

AvailableToolArray[]=calendar

AvailableToolArray[]=link

AvailableToolArray[]=login

AvailableToolArray[]=searchbox

AvailableToolArray[]=node_list

AvailableToolArray[]=users

AvailableToolArray[]=notification

AvailableToolArray[]=best_seller

AvailableToolArray[]=create_object

AvailableToolArray[]=notification

AvailableToolArray[]=drafts

2. Add the tool name to the end of [Tool] block like this:

...

AvailableToolArray[]=drafts

AvailableToolArray[]=mytool

3. If this tool has parameters, define them by adding code below in the same file:

[Tool_mytool]

parameter1=default_value_of_this_parameter

parameter2=default_value_of_this_parameter

...

4. Create template file for the tool.

If the tool is only used in top or bottom toolbar, only line view of the tool template is needed. If the tool is only used in right toolbar, then full view of the tool template should be added. In our example, the new created tool name is 'mytool', therefore a template file named mytool.tpl should be added under design/your_site_design/templates/toolbar/full/ or design/your_site_design/templates/toolbar/line/, depending on its useness. In this template, $parameter1 and $parameter2 will be available.

5. Add a thumbnail image for the tool (optional).

You can add a thumbnail image to the tool by creating a image mytool.png ( for right toolbar ) or mytool_line.png ( for top and bottom toolbar ) and put it under folder design/standard/images/toolbar/.

Comments

Creating Tools with Node Browsers, Etc.

In looking at /design/toolbar.tpl, it looks like tool parameters can have 6 types, the default (a simple text field), note, classidentifier, classidentifiers, and subtree. The type is specified by ending the parameter name with _type the toolbar override, like so:

[Tool_exampletool]
parameter1_node=
parameter2_classidentifier=
parameter3_classidentifiers=
parameter4_subtree=
parameter5_check=yes

*As of 3.5rc2, if you do not set parameter5_check to default as either yes or no, it will not render as a checkbox. *

Presumably you can add more types (i.e. "textarea", etc.) by overriding /design/toolbar.tpl for your admin siteaccess. I personally have not had any success with this method, but it is likely due to my own relative inexperience with the override system.

Here's a solution

I found an acceptable solution today. Take a look here: http://homepage.ntlworld.com/bobosola/index.htm

Basically, all you need to do is download a javascript file, call it in your pagelayout.tpl (with IE-specific if statements that appear as comments for other browsers) and PNGs will be displayed correctly.

We've started using it, and it works.

--
Hans

Yes, but badly

Transparency is not working which still makes me use GIFs where needed.

Sad thing

http://dean.edwards.name/IE7/ should solve this, but I did not try it yet.

-paul

IE?

Do PNG files display on IE?

paul

log in or create a user account to comment.

Contents

Customization

Access control
Exponential API Documentation
Content structure
Custom design
Components
    Images
    Datatypes
    Shop
    Information collection
    Search
    Form processing
    Error handling
    Icons
    Menus
    Toolbars
       How to customise toolbar?
       Adding new tools to toolbar list
       How to use the toolbar system in the...
       How to manually edit toolbar
Tips & Tricks
Troubleshooting


Created

11/05/2004
3:03:27 pm
by Wenyue Yu

Last updated

02/06/2004
11:20:15 am
by Terje Gunrell-Kaste

Authors

Wenyue Yu
Terje Gunrell-Kaste



This page is part of the Exponential documentation. The documentation is available under the GNU Free Documentation License. All contributions will be released under the terms of this license.