Single Menu Page with Bv and PHP

Collapse
This topic is closed.
X
This is a sticky topic.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • Meanderer
    Major

    • Aug 2007
    • 324

    Re: Single Menu Page with Bv and PHP

    Use it for footers too. They don't float as such, but as you are building each page, just adjust your page length in the " page properties" and reposition (drag) the HTML box containing the footer, to the bottom of the page.
    Tip: When you design your base page using this method, make sure you size the footer' html box to fit hard against left side of page. That way it's only a matter of sliding the box down the left edge when constructing a new page. Also, make sure after you have moved any elements (should only need to move footer), recheck your page width iin the properties. You could have slipped over a little and width will stay at the max width element caused during the move.
    Rick

    Comment

    • therecipelist.com
      Private First Class

      • Jan 2008
      • 5

      Re: Single Menu Page with Bv and PHP

      I used this to design my menubar for every page and it worked great, however, my background is now white instead of green like it originally was on my index page. Do you know what would cause this? Am I supposed to make the background on the menu.php transparent, and how do I do that?

      Comment

      • navaldesign
        General & Forum Moderator

        • Oct 2005
        • 12080

        Re: Single Menu Page with Bv and PHP

        Simply do NOT set any background in your menu.php page
        Navaldesign
        Logger Lite: Low Cost, Customizable, multifeatured Login script
        Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
        DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
        Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!

        Comment

        • Paulinor
          Sergeant

          • Jan 2008
          • 21

          Re: Single Menu Page with Bv and PHP

          I've received the following error message when opening my site


          Parse error: syntax error, unexpected '}' in /home/eynbvrar/public_html/myheader.php on line 18

          I've been working with BV for a month now - had all pages published as html with no problem but decided to change them to php to enable single menu as per Naval instructions. Used the same process for the header and text menu. Now only the error message and the title of the article are visible - no sign of menu bar, text menu or the content of the page. I've been learning BV as I build the site - easier to see what works (or doesn't!). Watched the tutorials endless times and spent hours going through the forums looking for answers but without luck. Time to cry for help, I guess.

          Thanks,

          Rosa

          Comment

          • navaldesign
            General & Forum Moderator

            • Oct 2005
            • 12080

            Re: Single Menu Page with Bv and PHP

            It is obvious tha there is a mistake in the myheader page code.
            Please post here the code in your "myheader" start of page
            Navaldesign
            Logger Lite: Low Cost, Customizable, multifeatured Login script
            Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
            DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
            Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!

            Comment

            • Paulinor
              Sergeant

              • Jan 2008
              • 21

              Re: Single Menu Page with Bv and PHP

              The code I used for header in all pages was: <? function myheader() { ?>

              I've deleted the menu/header/textmenu codes from the index page. ( That's what I got from your reply to WSBlue : "In your index page the menu doesn't show because it retrieves the html page (you need to delete it) and not the php. However, you also have made some other mistake because you have inserted the menu code in that page too"). Now the index page shows up but the problem continues in the others. Should I include the codes in the index.php page as well?

              Thanks,

              Comment

              • Paulinor
                Sergeant

                • Jan 2008
                • 21

                Re: Single Menu Page with Bv and PHP

                I reviewed all codes - they were correct. So I went radical: deleted everything and copied and pasted all over again. It works beautifully now. Thanks a lot.

                Rosa

                Comment

                • Collectors-info
                  General

                  • Feb 2006
                  • 8703

                  Re: Single Menu Page with Bv and PHP

                  Hi, I believe Naval posted a thread quite a wile back showing a way to link to the other php files in another folder/directory that would make the total page up. This was to save you having to place a (for argument sake) a php menu file in each of the sites folders/directory's.
                  Or am I imagining this.?????????????? "Naval!"
                  Regards Chris.

                  Collectables, Collecting, collectors-info.com

                  www.chrismorris.co.uk

                  House build project

                  Comment

                  • navaldesign
                    General & Forum Moderator

                    • Oct 2005
                    • 12080

                    Re: Single Menu Page with Bv and PHP

                    Hi Chris,

                    no, you have not imagined it.

                    Here is the code:

                    <?
                    $file_to_include = $_SERVER['DOCUMENT_ROOT']."/include_path/menu.php";
                    include($file_to_include);
                    menu();
                    ?>

                    This is the same code, but two additions:

                    1. $_SERVER['DOCUMENT_ROOT'] is ONE OF THE VALUES OF THE $_SERVER superglobal, that corresponds to /home/username/public_html/file_folder where file_folder is the folder that is calling the menu.php . Instead, include_path would be, the folder where you have published your file that needs to be included (menu.php)

                    If you have (as most of us) published the menu.php in your public_html (or, in case of addon, in the domain root directory), the voice "include_path" should be left out, and the command would become:

                    <?
                    $file_to_include = $_SERVER['DOCUMENT_ROOT']."/menu.php";
                    include($file_to_include);
                    menu();
                    ?>

                    What i would like to point out here is that the code i have presented here, requires the menu (or other) to be defined as a function. The code in the pages calls the script, then it uses the command

                    menu();

                    to "display" the menu itself.

                    The reason i did so is that, with a minimum of php experience, the user can pass over to the included file, some parametrs and then call the function with

                    menu($par1, $par2, $par3, .....) . This way you can have a menu that behaves (read: displays) differently depending on the parametres passed over.

                    If you don't need this type of performance, the menu, header, etc, CAN BE SIMPLE BLUEVODA HTML PAGES, WITHOUT ANY CODE ADDED IN THE START OF PAGE AND END OF PAGE and ONLY THE CALLING PAGE NEEDS TO BE PHP.

                    In that case, the command could be simply


                    <?
                    include('menu.html');
                    ?>



                    <?
                    $file_to_include = $_SERVER['DOCUMENT_ROOT']."/include_path/menu.html";
                    include($file_to_include);
                    ?>

                    Please note that if your menu has buttons (images) you MUST set the relative path to these images or they will not display,

                    This is the reason i suggest that if you have this method for pages in different folders, it would be wise to publish the included page in all folders
                    Navaldesign
                    Logger Lite: Low Cost, Customizable, multifeatured Login script
                    Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
                    DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
                    Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!

                    Comment

                    • Collectors-info
                      General

                      • Feb 2006
                      • 8703

                      Re: Single Menu Page with Bv and PHP

                      Hi, i maybe doing something daft here? But it wont bring any images across from the root directory. This page is the only one in the new directory & links on the page will go back to the public_html area to show the working pages. So don't be confused as this works fine. Any ideas?

                      PS, i may also have this part wrong? But if you use the BV logo tool, it seems to be missing something, as when i tried this on the header, it seemed to be distorted in the new/remote directory, as if a file was missing that load the image.
                      Regards Chris.

                      Collectables, Collecting, collectors-info.com

                      www.chrismorris.co.uk

                      House build project

                      Comment

                      • navaldesign
                        General & Forum Moderator

                        • Oct 2005
                        • 12080

                        Re: Single Menu Page with Bv and PHP

                        No, you are correct. If the images used in the menu page are (as the menu page itself) in different folder, the images MUST be provided in the BV page, as absolute URLs. So, when you want to insert in your BV page an image, let's call it "logo.jpg", you should provide also the absolute URL for it instead of simply showing the pah in your local computer.

                        Usually, pages built by pros, have all images uploaded in a folder of their own, and retrieved from there. So in the BV page, you should provide the image source as http://www.yourdomain.com/images/logo.jpg The same problem (even greater in fact) exists also for the classic BV menus, where buttons are images.

                        As you see, that might be a bit complicated, and that is why i have suggested that the easier way, at least for the average user, is to publish the menu in those two or three folders that he might have.
                        Navaldesign
                        Logger Lite: Low Cost, Customizable, multifeatured Login script
                        Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
                        DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
                        Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!

                        Comment

                        • Collectors-info
                          General

                          • Feb 2006
                          • 8703

                          Re: Single Menu Page with Bv and PHP

                          Originally posted by navaldesign View Post
                          No, you are correct. If the images used in the menu page are (as the menu page itself) in different folder, the images MUST be provided in the BV page, as absolute URLs. So, when you want to insert in your BV page an image, let's call it "logo.jpg", you should provide also the absolute URL for it instead of simply showing the pah in your local computer.

                          Usually, pages built by pros, have all images uploaded in a folder of their own, and retrieved from there. So in the BV page, you should provide the image source as http://www.yourdomain.com/images/logo.jpg The same problem (even greater in fact) exists also for the classic BV menus, where buttons are images.

                          As you see, that might be a bit complicated, and that is why i have suggested that the easier way, at least for the average user, is to publish the menu in those two or three folders that he might have.
                          I thought it might be this. But also thought i might be missing something. Dont feel so daft now. lol

                          Cheers George.
                          Regards Chris.

                          Collectables, Collecting, collectors-info.com

                          www.chrismorris.co.uk

                          House build project

                          Comment

                          • ofirbeigel
                            Master Sergeant

                            • Jul 2008
                            • 65

                            Re: Single Menu Page with Bv and PHP

                            A question about the meta tags using this system.
                            is it ok if I have meta tags on the page where the menu.php HTML code is pasted (not on the menu.php file itslef) ?
                            or do I need to have no meta tags whatsoever on pages that include the menu.php html code ?

                            Comment

                            • navaldesign
                              General & Forum Moderator

                              • Oct 2005
                              • 12080

                              Re: Single Menu Page with Bv and PHP

                              Yes, it is ok to have all the necessary tags in the main page
                              Navaldesign
                              Logger Lite: Low Cost, Customizable, multifeatured Login script
                              Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
                              DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
                              Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!

                              Comment

                              • trebzky
                                Private

                                • Aug 2008
                                • 4

                                Re: Single Menu Page with Bv and PHP

                                I think the easiest way is to copy and paste the menu from your main page in every page you make if you want to use the same menu....i tried it and works fine. Just lock the menu so when you paste it to other pages it will reside exactly at the same place in the new page and locked as well.

                                Comment

                                Working...
                                X