Hi All,
Actually... it's mostly v5, but part v3. It's got all three v5.22 source .js files. the menu_data.js file, however, is another story; it's a hybrid. It starts with comments from a typical v3 menu_array.js file, followed by an initial line of code from a v3 menu_array.js file (v3.5.14 or later). This is followed by correct v5 global variable settings, and then a correct v5 menu style definition. Then come the menu definitions. Each one starts out correctly for v5. But the item definitions are an odd mix of v3 item definition syntax within v5 aI() function calls. It's the last bit that's causing the error message: line 64 is where the first aI() call appears.
So... ACIDSTEALTH... what to do?
It looks like much of your menu_data.js file is OK, but you'll have to remove some of it, and change all of the aI() item definitions to use the correct syntax.
I'm assuming that you downloaded the menu code from the main site, then unzipped the file to get milonic_src.js, mmenudom.js, and mmenuns4.js. In that zip file, you will also see an example menu_data.js file showing the correct file structure (note how it starts) and the correct aI() item definition syntax. Here's something to get you started:
(1) Delete the first 25 lines of menu_data.js; it's all version 3 stuff.
(2) Your menu definitions start out fine, but the stuff inside of each aI() funciton call (the stuff between the parentheses) is all messed up. Look at the example menu_data.js file to see how menu items are defined with
aI(). You have your old v3 lines inside of the aI(). Won't work. So, instead of the v3 approach:
Code: Select all
,"Item Text", "URL", "Alternate URL", "Status Text", "Separator Bar"
You'd have the v5 approach:
Code: Select all
aI("text=Item Text;url=whatever.htm;status=Status Text;");
The separator bar is often defined in the menuStyle, or can also be defined for each item, but that's more advanced so let's stick to the basic for now.
To take some examples from your code:
(a) In your Main Menu, the "Home" item is an example of an item that just links to a different page. In v3 it would have been something like
Code: Select all
," Home ","/index.htm",,"Home",1
In v5 that would be
Code: Select all
aI(" Home url=/index.htm;status=Home;");
(you could probably drop the nonbreaking spaces for padding here; they're not needed quite so much in v5).
(b) Let's use the "Gallery" item in your Main Menu as an example of a menu
item that just opens a submenu (no link of its own). In v3 it would have been something like
Code: Select all
," Gallery ","show-menu=Gallery",,"",1
In v5 it would be
Code: Select all
aI("text=Gallery;showmenu=Gallery;");
Note that there is no longer a dash in showmenu.
(c) Finally, I don't know if you have any, but there can also be menu items that both link to a url if clicked
and open a submenu when moused over. In v3, that would have been something like this:
Code: Select all
,"Web Search","show-menu=Search","http://www.google.com/","Click to go to directly to Google",1
So, mousing over the item sould open a submenu called "Search" but clicking the item would go to Google (the "alternate URL" in v3 terminology)
In v5, that'd be
Code: Select all
aI("text=Web Search;showmenu=Search;url=http://www.google.com/;status=Click to go directly to Google;");
Final note: If you've tried to manually go from a v3 menu_array.js file to a v5 menu_data.js file, you might try the
v3 to v5 converter on the main site. I haven't tried it myself, but I hear that it works pretty well as a starting point, with perhaps a small amount of editing left to be done to the converted file. Ccut and paste from your v3 menu_array.js file into your v5 menu_data.js file also shouldn't be too difficult.
Come back if you have questions... and you don't have to wait nine hours!
Cheers,
Kevin
P.S. My guess is that your friend wouldn't tell you what the error was because he had no idea what it was. I don't see how he could have unless he was very familiar with v3 and v5 of Milonic Menus.
P.P.S. This post was moved to the v3 forum because of the v3 content in the code. But I'm moving it back to the v5 forum, because it looks like it was your intent to use v5 and that's the direction you're heading.