PHP n AJAX Programming, Tools, Tutorials, Tips, Tricks

Thursday, March 22, 2007

Setting Up Simple Horizontal Menu Bar Using PHPLayersMenu (Part 02)

Add to Technorati Favorites
Slashdot




DISCLAIMER:
I have made every attempt to present accurate information, but I cannot guarantee that inaccuracies will not occur. I (the author) will not be held responsible for any claim, loss, damage or inconvenience caused as a result of any information found on this website (blog).


Menu Configuration




You must read Part 01 of this tutorial before reading this.


It is very easy to configure the menu bar and items. You can add or remove menu items in ‘layersmenu-horizontal-1.txt’ but for the look and feel etc. of the menu you have a number of options you can choose from.



Line [1 - 2] - Changing the Menu Bar and Menu Items’ Style:

To change the look and feel of menu bar and items, you can make changes to the CSS stylesheet ‘phplayersmenu/layersmenu-keramik.css’. If you want to use a different style sheet then you have to make changes to the line below. Replace '<new file name with path>' with the new CSS file name.

<link href="<new file name with path>" rel="stylesheet" type="text/css" />



Line [16] - Changing the base directory:

Instead of writing ‘phplayersmenu’ as the base directory name in all functions you can also specify a base folder name $myDirPath = "phplayersmenu".



Lines [19 – 20] - Changing the Images’ Folder/Directory:

You can add more images for arrows by adding new files in 'phplayersmenu/menuimages/'. You can also change the menu images directory by modifying the functions below.

$mid->setImgdir('<new image folder>');

$mid->setImgwww('<new image folder>');



Lines [21 – 22] - Changing the Icons’ Folder/Directory:

The icons’ folder can be changed using the functions below. Replace '<folder name>' with actual folder name below.

$mid->setIcondir('<folder name>');

$mid->setIconwww('<folder name>');



Line [23] - Changing Icon Size:

You can change size of icons used with menu items by making changes to the function parameters of $mid->setIconsize(22, 22);. First parameter denotes width and the second parameter denotes height of icons.



Lines [27 – 28] - Changing Arrows used in Menu Bar:

You can change the arrows (down, forward) using the functions below. Replace '<image file name>' with actual file names.

$mid->setDownArrowImg('<image file name>');

$mid->setForwardArrowImg('<image file name>');



Line [29] - Changing name of Menu File:

Change the name in the function below.

$mid->setMenuStructureFile('layersmenu-horizontal-1.txt');



Make sure you delete unnecessary files under phplayersmenu folder. Most of the example scripts are not required on a production server.


Please let me know if you find any errors in this tutorial. Thanks.


Labels:

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home