In first place you must copy the archives to your server. :P Later you are enough to insert the following codes in the pages where you want that the menu appears:
Initially, it makes the inclusion of the class and object creation:
<?
require (�xpMenu.class.php�);
$xpmenu = new xpMenu ();
?>
Later, inside of tag <head> inserts the following code:
<?
echo $xpmenu->javaScript ();
echo $xpmenu->style ();
?>
In any place of your code, create the menu of the following form:
To create a menu:
<?
$xpmenu->addMenu (�menu1�);
?>
Note: the function addMenu have only one parameter. It's short_name, is the short name of menu.
To create a category:
<?
$xpmenu->addCategory (�menusup1�, �Google Links�, �icons/google.gif�, �menu1�);
?>
Note: the function addCategory have four parameters. The first, a_name, is the short name of category. You can use any name, except by names with spaces or special characters. The second, name, is the name that will appear on menu. The third, image, is the image that will appear on menu (use 20X20 image). The last is the menu short name.
To create an option:
<?
$xpmenu->addOption (�google�, �Google�, �icons/google.gif�, �http://www.google.com�, �menusup1�, �menu1�);
?>
Note: the function addOption have six parameters. The first, a_name, is the short name of option. You can use any name, except by names with spaces or special characters. The second, name, is the name that will appear on menu. The third, image, is the image that will appear on menu (use 20X20 image). The next is the link, that will be called by click on menu opotion and the number five is the name of the category of the option (be sure of that category exists). The last is the menu short name.
And to finalize, insert this code in the place where you want to the menu appears (must be after menu creation):
<?
echo $xpmenu->mountMenu();
?>
Very simple!
En�as Gesing
|