I Love PHPMaker

... because it gets even more powerful and flexible!!

  • About
  • Terms and Conditions
  • Membership Options
  • Sitemap
  • Downloads
    • PHPMaker Extensions Download
    • PHPMaker Projects Download
    • PHP Report Maker Extensions Download
I Love PHPMaker » PHP Report Maker » Switching Menu from Horizontal to Vertical and Vice Versa Easily Using PHP Report Maker 6.0.0
Optimizing Main Table Width in Websites that Generated by PHP Report Maker 6.0.0
Making a Fixed Width Site Using PHP Report Maker 6.0.0

December 2, 2012

Switching Menu from Horizontal to Vertical and Vice Versa Easily Using PHP Report Maker 6.0.0

This following modification will make the ability to switch your site menu from Horizontal to Vertical and vice-versa easily in websites that generated with PHP Report Maker. Because of PHP Report Maker still allowing you to use one of the two menu layout (whether Horizontal or Vertical) in one occasion, then you have to re-generate your script files using PHP Reprot Maker after adjusting the related setting from Graphical extension (for registered users only).

After implementing template customization below, no need to re-generate your script files each time you want to switch it from one to another. Simply adjust the related constant in the configuration file, then your site menu will turn to the new layout as you want to. Don't you like it?

[hidepost]

  1. Open your \Script\rpt-config.php file, and find this code:

    // General
    

    before that line, please insert the following code:

    // Begin of modification Supports for Horizontal and Vertical Menu, by Masino Sinaga, December 2, 2012
    define("MSR_MENU_HORIZONTAL", TRUE, TRUE); // Set the second parameter to TRUE if you want to use horizontal (default), or FALSE if you want vertical menu.
    // End of modification Supports for Horizontal and Vertical Menu, by Masino Sinaga, December 2, 2012
    
  2. Open your \extensions\Graphical\rpt-menu.php file, and find this code:

    <!--## if (bHorizMenu) { ##-->
    var RootMenu = new YAHOO.widget.MenuBar("RootMenu", { autosubmenudisplay: true, hidedelay: 750, lazyload: true });
    <!--## } else { ##-->
    var RootMenu = new YAHOO.widget.Menu("RootMenu", { position: "static", hidedelay: 750, lazyload: true });
    <!--## } ##-->
    

    then replace it with the following code:

    <?php if (MSR_MENU_HORIZONTAL) { // Begin of modification Supports for Horizontal and Vertical Menu, by Masino Sinaga, December 2, 2012 ?>
    var RootMenu = new YAHOO.widget.MenuBar("RootMenu", { autosubmenudisplay: true, hidedelay: 750, lazyload: true });
    <?php } else { ?>
    var RootMenu = new YAHOO.widget.Menu("RootMenu", { position: "static", hidedelay: 750, lazyload: true });
    <?php } // End of modification Supports for Horizontal and Vertical Menu, by Masino Sinaga, December 2, 2012 ?>
    
  3. Open your \extensions\Graphical\rpt-menucfg.php file, and find this code:

    <!--## if (bVertMenu) { ##-->
    define("EWR_MENUBAR_CLASSNAME", "yuimenu", TRUE);
    define("EWR_MENUBAR_ITEM_CLASSNAME", "yuimenuitem", TRUE);
    define("EWR_MENUBAR_ITEM_LABEL_CLASSNAME", "yuimenuitemlabel", TRUE);
    <!--## } ##-->
    <!--## if (bHorizMenu) { ##-->
    define("EWR_MENUBAR_CLASSNAME", "yuimenubar yuimenubarnav", TRUE);
    define("EWR_MENUBAR_ITEM_CLASSNAME", "yuimenubaritem", TRUE);
    define("EWR_MENUBAR_ITEM_LABEL_CLASSNAME", "yuimenubaritemlabel", TRUE);
    <!--## } ##-->
    

    then replace it with the following code:

    if (MSR_MENU_HORIZONTAL) { // Begin of modification Supports for Horizontal and Vertical Menu, by Masino Sinaga, December 2, 2012
    define("EWR_MENUBAR_CLASSNAME", "yuimenubar yuimenubarnav", TRUE);
    define("EWR_MENUBAR_ITEM_CLASSNAME", "yuimenubaritem", TRUE);
    define("EWR_MENUBAR_ITEM_LABEL_CLASSNAME", "yuimenubaritemlabel", TRUE);
    } else {
    define("EWR_MENUBAR_CLASSNAME", "yuimenu", TRUE);
    define("EWR_MENUBAR_ITEM_CLASSNAME", "yuimenuitem", TRUE);
    define("EWR_MENUBAR_ITEM_LABEL_CLASSNAME", "yuimenuitemlabel", TRUE);
    } // End of modification Supports for Horizontal and Vertical Menu, by Masino Sinaga, December 2, 2012
    
  4. Open your \Script\rpt-menuext.php file, and find this code:

    	<!--## if (bHorizMenu) { ##-->
    <div class="ewMenuRow">
    	<!--## } ##-->
    	<!--## if (bVertMenu) { ##-->
    	<!-- content (begin) -->
    	<table cellspacing="0" class="ewContentTable">
    		<tr>
    			<td class="ewMenuColumn">
    			<!-- left column (begin) -->
    	<!--## } ##-->
    <!--##=SYSTEMFUNCTIONS.IncludeFile("rptmenu","")##-->
    	<!--## if (bHorizMenu) { ##-->
    </div>
    	<!-- content (begin) -->
    	<table cellspacing="0" class="ewContentTable">
    		<tr>
    	<!--## } ##-->
    	<!--## if (bVertMenu) { ##-->
    			<!-- left column (end) -->
    			</td>
    	<!--## } ##-->
    

    then replace it with the following code:

    <?php if (MSR_MENU_HORIZONTAL) { // Begin of modification Supports for Horizontal and Vertical Menu, by Masino Sinaga, December 2, 2012 ?>
    <div class="ewMenuRow">
    <?php } else { // modification Supports for Horizontal and Vertical Menu, by Masino Sinaga, December 2, 2012 ?>
        <!-- content (begin) -->
    	<!-- content (begin) -->
    	<table cellspacing="0" class="ewContentTable">
    		<tr>
    			<td class="ewMenuColumn">
    			<!-- left column (begin) -->
    <?php } // modification Supports for Horizontal and Vertical Menu, by Masino Sinaga, December 2, 2012 ?>
    <!--##=SYSTEMFUNCTIONS.IncludeFile("rptmenu","")##-->
    <?php if (MSR_MENU_HORIZONTAL) { // modification Supports for Horizontal and Vertical Menu, by Masino Sinaga, December 2, 2012 ?>
    </div>
    	<!-- content (begin) -->
    	<table cellspacing="0" class="ewContentTable">
    		<tr>
    <?php } else { // modification Supports for Horizontal and Vertical Menu, by Masino Sinaga, December 2, 2012 ?>
    			<!-- left column (end) -->
    			</td>
    <?php } // End of modification Supports for Horizontal and Vertical Menu, by Masino Sinaga, December 2, 2012 ?>
    
  5. Finally, re-generate your script files using PHP Report Maker as usual.
  6. Since the default menu layout is Horizontal, then if you want to switch it to Vertical, simply adjust the following code in your ewcfg9.php file:

    define("MSR_MENU_HORIZONTAL", TRUE, TRUE);
    

    become:

    define("MSR_MENU_HORIZONTAL", FALSE, TRUE);
    

[/hidepost]

Article by Masino Sinaga / PHP Report Maker / horizontal menu, menu, PHP Report Maker 6.0.0, vertical menu 1 Comment

Optimizing Main Table Width in Websites that Generated by PHP Report Maker 6.0.0
Making a Fixed Width Site Using PHP Report Maker 6.0.0

Trackbacks

  1. Optimizing Main Table Width in Websites that Generated by PHP Report Maker 6.0.0 — I Love PHPMaker says:
    December 3, 2012 at 11:10 am

    […] PHP Report Maker Home » PHP Report Maker » Optimizing Main Table Width in Websites that Generated by PHP Report Maker 6.0.0 Switching Menu from Horizontal to Vertical and Vice Versa Easily Using PHP Report Maker 6.0.0 […]

    Log in to Reply

Leave a Reply Cancel reply

You must be logged in to post a comment.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Recent Posts

  • A New PHPMaker 2025 Project File Is Released
  • PHPMaker 2025 Demo Project File Is Released
  • Masino Extensions for PHPMaker 2025 Is Released!
  • A New PHPMaker 2024 Project File Is Released
  • PHPMaker 2024 Demo Project File Is Released
  • Masino Extensions for PHPMaker 2024 Is Released!
  • PHPMakerProjects.com, For Those Who Need PHPMaker Project Sample
  • A New PHPMaker 2023 Project File Is Released
  • PHPMaker 2023 Demo Project File Is Released
  • Masino Extensions for PHPMaker 2023 Is Released!

Search

Recent Comments

  • Masino Sinaga on Masino Extensions for PHPMaker 2024 Is Released!
  • Masino Sinaga on A New PHPMaker 2024 Project File Is Released
  • Masino Sinaga on PHPMaker 2023 Demo Project File Is Released
  • Edward Babatunde on PHPMaker 2023 Demo Project File Is Released
  • Edward Babatunde on Masino Extensions for PHPMaker 2024 Is Released!

Demo Website

  • Demo of I Love PHPMaker 2025 (MasinoExtensions).
  • Stock Inventory Management for PHPMaker 2025.

Another Demo

The following template are not available in this site (must be purchased separately)

  • PHPMaker v2018 Horizontal Vertical Template.
  • PHPMaker v2017 Horizontal Vertical Template.

Demo Explanation

Stock Inventory Management is the good project for your reference, since it uses the real example in the real world. Many useful features you can use from this project, such as how to add the Thousand and Decimal separator character, and also how to calculate multiple row in Grid-Add when End-Users are entering data into the Grid-Add mode.

Categories

  • Customize Template (103)
  • General (4)
  • PHP Report Maker (17)
  • PHP Report Maker Extensions (2)
  • PHPMaker Extensions (84)
  • PHPMaker Projects (7)
  • Tips and Trick (72)

Articles based on version

  • PHPMaker 2025
  • PHPMaker 2024
  • PHPMaker 2023
  • PHPMaker 2022
  • PHPMaker 2021
  • PHPMaker 2020
  • PHPMaker 2019
  • PHPMaker 2018
  • PHPMaker 2017.0.7
  • PHPMaker 12.0.7
  • PHPMaker 11.0.6
  • PHPMaker 10.0.5
  • PHPMaker 9.2.0
  • PHPMaker 8.0.3
  • PHP Report Maker 12

(c) I Love PHPMaker 2010 - 2025 by Masino Sinaga | WordPress | Log in | Back to top