Forums Archive Index > SmartMenus 5 > How do I upgrade from 4.6.3 ?

Author: pfranken

Date: 25 Feb 2004 3:46 am

I'm still using v 4.6.3 on our intranet and would like to upgrade to the latest version. Are there some quick instructions to follow to do the upgrade as painless as possible ?


Author: smartmenus

Date: 25 Feb 2004 7:38 am

I have not written such instructions but basically the difference is in the syntax for the menu definitions in the s_arrays.js file. And also in v5 there are some new variables controlling new features.

A step-by-step instructions would look like this:
1) Add all missing variables to section 1 of your old s_arrays.js file.
2) Section 2 is the same- you have to specify default target for your links.
3) In section 3 (the style arrays) I would recommend you to copy and paste one of the new v5 style arrays and then change the colors and settings by your choice. Many new items have been added and the array structure as a whole have been reworked so it's better to do copy and paste.
4) The menu definitions section. This sections has been changed most of all. The syntax is different. Please look below at two simple menus defined in v4.6.3 and v5. This will show you how to achieve the same menus in v5. For further details on the available options for customizing the menus in v5, please refer to the new manual.

// v4.6.3Code:

s_add(
'permanent', // NAME
1,           // LEVEL
150,         // WIDTH
200,         // TOP
15,          // LEFT
true,        // menu is PERMANENT
s_CSS1,      // Stylesheet Array to use for this menu
[            // define the items [link info,text to display]
['SELECTED','Permanent menu DEMO'],
['http://www.dir.bg/','Dir.bg'],
['http://www.dir.bg/','Dir.bg'],
['show:sub_menu;http://www.dir.bg/','Bulgarian stuff'],
['*self*mailto:smartmenus@smartmenus.org','Contact the author']
]
);

   s_add(
   'sub_menu',2,130,'','',false,s_CSS1,
   [
   ['http://www.dir.bg/','Dir.bg'],
   ['http://www.dir.bg/','Dir.bg'],
   ['http://www.dir.bg/','Dir.bg']
   ]
   );
// v4.6.3

// v5Code:
s_add(
{
N:'permanent', // NAME
LV:1,          // LEVEL
W:150,         // WIDTH
T:200,         // TOP
L:15,          // LEFT
P:true,        // menu is PERMANENT
S:s_CSS1       // STYLE Array to use for this menu
},
[              // define items {U:'url',T:'text' ...} look at the Manual for details
{U:'',T:'Permanent menu DEMO',SELECTED:true},
{U:'http://www.dir.bg/',T:'Dir.bg'},
{U:'http://www.dir.bg/',T:'Dir.bg'},
{Show:'sub_menu',U:'http://www.dir.bg/',T:'Bulgarian stuff'},
{U:'mailto:smartmenus@smartmenus.org',T:'Contact the author',Target:'self'}
]
);

   s_add(
   {N:'sub_menu',LV:2,W:130,T:'',L:'',P:false,S:s_CSS1},
   [
   {U:'http://www.dir.bg/',T:'Dir.bg'},
   {U:'http://www.dir.bg/',T:'Dir.bg'},
   {U:'http://www.dir.bg/',T:'Dir.bg'}
   ]
   );
// v5


Author: pfranken

Date: 27 Feb 2004 9:08 am

Thanks for your reply.

Unfortunately I have your menus tightly integrated in our Intranet. Parts of it are generated by Lotus Notes/Domino applications.
So upgrading is going to be hard.

Is there a way I can get hold of the original 4.6.3 download ? I've lost my copy due to PC rebuilds, etc.

Thanks,
Peter


Author: smartmenus

Date: 27 Feb 2004 10:10 am

No problem with the original v4.6.3 download file. I am sending it to you by email in a moment...