The toolbar configuration is kept in a file named toolbar.cfg
which must be in the same directory where is the toolbar's DLL.
Obtaining a license you can also rename the DLL - keep track of
this and check the installation configuration that both the DLL
and the toolbar.cfg will be installed to the same directory.
Here is one example toolbar.cfg with the entries explained
after the sample:
{ MAIN:
(string)Name=Sample toolbar
(string)Protocol=Direct
(string)Control=toolbar.htm
(int)CodePage=0
{ MinSize:
(int)x=350
(int)y=24
} MinSize;
{ MaxSize:
(int)x=-1
(int)y=24
} MaxSize;
{ IdealSize:
(int)x=350
(int)y=24
} IdealSize;
{ Script:
(string)File=toolbar.vbs
(string)Language=VBScript
} Script;
{ ForbiddenAPI:
(int)Execute=0
(int)CreateObject=0
(int)MsgBox=0
(int)Timeout=0
} ForbiddenAPI;
} MAIN;
The settings explained:
Name - The name of the toolbar.
This is what is shown beside the toolbar area in the IE frame
window. For example if the name is set to X Toolbar it
will show like this:
Protocol - Can be Direct
or ALP. If the setting is not in the configuration Direct
is assumed. This specifies how the toolbar user interface HTML
is loaded. Direct - it is loaded directly from the file
specified by Control setting. ALP it is loaded through ALP
engine (a dynamic URL is generated to point the file
specified in Control). Note that ALP can be used only if you
install both the toolbar and ALP on the machine or if you
redistribute your toolbar with the ALP engine together.
Control - This specifies the
HTML file which describes the toolbar's look (user interface -
UI). You can specify relative path here. The actual path to the
file is composed relatively to the toolbar's DLL location. E.g.
as it is specified above it means the file is in the same
directory (which is recommended). A reminder - do not forget to
put <BASE HREF="%BASE%"> in the head of your
user interface HTML file if you use the Direct method.
CodePage - the code page used
when the toolbar script is loaded (see also the Script section
below). In most cases 0 will be a good setting, but if your
toolbar script contains code page sensitive information you may
need to specify a code page explicitly. For example if you have
non-English string literals in the script and you expect that
the toolbar may be installed on machines which will have default
locale settings different from the language in which the strings
are. For example you may have something prepared for Dutch but
often used on English machines by people who understand Dutch.
Dimensions - They are 3
similar sections: MinSize, MaxSize and IdealSize.
They all specify two values - x and y the width and height
respectively. When the value is set to -1 this means no limit.
These limits are used by the Microsoft Internet Explorer when
the user moves the toolbars around the browser's toolbar area.
They specify how small it can be, how big it can be and what is
its ideal size. They are in screen pixels and you must determine
them over the size of the user interface you have designed. If
part of it is of secondary importance you can specify the
minimal size so that the toolbar can occupy as small area as
possible by leaving the unimportant parts hidden (outside the
boundaries). In case the user has too many toolbars installed
you should allow the IE to make your toolbar small. The ideal
size is the size of the area which IE will try to allocate for
your toolbar if it is possible. The maximum size is most often
limited only for the height and unlimited for the width because
this is the general way toolbars are designed (as horizontal
lines). It is recommended to try the settings carefully
especially if your toolbar has complex visual behavior. These
settings cannot be changed at run-time, because it is assumed
that size change may occur only in response to an user action.
Script section
File - specifies the toolbar script file relative to
the directory that contains the toolbar's DLL.
Language - specifies the script language in which
the toolbar script is written.
The script is loaded only once - when the toolbar shows for
the first time. If an error occurs and you correct it in the
script you must restart the browser in order to reload the
corrected script. This measure has been taken in order to
avoid chained errors. For example if you happen to distribute
a package with some bugs forgotten in your script the user
will not be overwhelmed by continuous error messages while the
toolbar tries to reload over and over.
ForbiddenAPI section
This is "paranoia" section where you can forbid
the access to the unneeded utility methods the toolbar
provides for the toolbar script (see the Script section
above). If the value for the method is set to 1 it is
forbidden if it is set to 0 the method is allowed. You can
remove the entire section if you do not want to forbid any
method.
Execute - If set to 1 forbids the Host.Execute
method. 0 or missing - allows it.
CreateObject - If set to 1 forbids the
Host.CreateObject method. 0 or missing - allows it.
MsgBox - If set to 1 forbids the Host.MsgBox method.
0 or missing - allows it.
Timeout - If set to 1 forbids both the Host.Timeout
and Host.DiscardTimeout methods. 0 or missing - allows them.
Remarks: While the toolbar script is not a front end
vulnerable to any attacks, by forbidding the methods you do
not use you may help minimize the possible ways a virus can
spread if the PC is already infected by other means.
Remarks
If you have more than one Script Bar licenses and you are
distributing more than one toolbar applications you should
install their toolbar DLL and resources in different
directories. Thus each of your toolbars will have its own
configuration, own DLL, script and other resources.
|