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
  • barbroberts
    Sergeant Major

    • Feb 2007
    • 91

    Re: Single Menu Page with Bv and PHP

    CORRECTION: This is what I put on my template in an html box where I want the image to be:
    <?php
    include ("sidemenu.php");
    sidemenu();
    ?>

    I saved the new template as a php and published. The php file (which I created in the upper left corner like the menu and footer) contains this code:

    <?php
    include ("sidemenu.php");
    sidemenu();
    ?><img src="http://www.elizabethbaileyportraits.com/bv01037.gif">

    I saved the header image file as "image.php and published and got nothing! Where is the error of my ways?
    http://www.elizabethbaileyportraits....w_template.php

    I'm going to get away from this for a while. It exhausts me.
    Barbara
    http://www.gardenpartyteas.com
    http://www.elizabethbaileyportraits.com

    Comment

    • navaldesign
      General & Forum Moderator

      • Oct 2005
      • 12080

      Re: Single Menu Page with Bv and PHP

      Please understand that these are two different things that you need to do.

      1. Create the element that will be included. This may be a menu, a footer, a side menu, a Logo, anything.
      This page MUST start with

      <?
      function sidemenu() {
      ?>

      The second part is the actual code that creates the visual effect. In your case :

      <img src="http://www.elizabethbaileyportraits.com/bv01037.gif">




      in the case of a side menu (the name you asign to the function is NOT important, you could have evan called it "myheader" or "logo" or "mybanner" or whatever.

      As you see, you have missed the last part,

      <?
      }
      ?>

      So the complete code would be:

      <?
      function sidemenu() {
      ?>
      <img src="http://www.elizabethbaileyportraits.com/bv01037.gif">
      <?
      }
      ?>




      2. Then, in your template page, you need to have simply

      <?php
      include ("sidemenu.php");
      sidemenu();
      ?>

      in the html box.

      However, if you building the pages in BV you do NOT need to worry about correct coding. If you actually use BV, there are only two things to do:

      1. Create in BV a page with the element you want. In this case, the page must only have the image. The rest of the code you is automatically generated by BV. Place in the start of page

      <? function sidemenu() { ?>

      and, in the End of page:

      <?
      }
      ?>

      The second part, that described in step 2., is the same as described.
      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

      • barbroberts
        Sergeant Major

        • Feb 2007
        • 91

        Naval,
        I am still having a problem getting this to work in the header of my template. I am using BV. I have created the menu and footer in php in a new template. They both work fine. I have done the same thing for the image in the header and this is the result:

        I am going to assume that this code means something to you. I simply don't understand it.

        There is a gray rectangle in the header. This is a background shape
        (serving as a border) that sits just under the image that is supposed to be there! I tried removing the rectangle to see if that was the problem but it was not, so I put it back.

        I went to my FTP manager and deleted all previous attempts at creating this element. I can send screen prints of the codes and where I placed them if that would help. I have gone over and over this but cannot find the problem. Sorry to be such a pest.
        Barbara
        http://www.gardenpartyteas.com
        http://www.elizabethbaileyportraits.com

        Comment

        • navaldesign
          General & Forum Moderator

          • Oct 2005
          • 12080

          Re: Single Menu Page with Bv and PHP

          It seems that no "sidemenu.php" file exists on the server as i get a 404 error.

          Make sure that ou have published the page as "sidemenu" with it's properties set to be php
          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

          • barbroberts
            Sergeant Major

            • Feb 2007
            • 91

            php image in header

            Naval, I had chosen another name to save and upload the file not realizing it had to be sidemenu. After your last post, I deleted the old file, changed the name to "sidemenu.php" and published. It worked! but I still have some verbiage behind the image. It says:

            "Fatal error: Called to undefined function sidemenu() in home/pfvgmdxy/public_html/EBP_new_template.php on line 72"

            The verbiage is behind the image but shows to the right. I can quickly read what is under the image by clicking on refresh.


            I tried moving the image location in the template and publishing again to see exactly where the verbiage was coming from and it stayed behind the image. Any idea as to what is causing this?
            Barbara
            http://www.gardenpartyteas.com
            http://www.elizabethbaileyportraits.com

            Comment

            • navaldesign
              General & Forum Moderator

              • Oct 2005
              • 12080

              Re: Single Menu Page with Bv and PHP

              The code that you have added in your "sidemenu" page should be:
              <? function sidemenu() { ?>

              If you have named it anything else, the function "sidemenu" is not defined, so the script gives you that error.
              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

              • whshyan
                Corporal

                • Mar 2007
                • 11

                Re: Single Menu Page with Bv and PHP

                hi, i'm back :)

                i realise something about this kind of codes,

                <?php
                include ("sidemenu.php");

                sidemenu();
                ?>

                for my website, i use it for my leftside menu, rightside menu and my footer.

                for my leftside menu, i use

                <?php
                include ("leftsidemenu.php"); <---any name
                menu();

                ?>

                for my rightside menu, i use

                <?php
                include ("rightsidemenu.php");
                rightsidemenu();

                ?>


                i found out that leftsidemenu.php can also be any name but menu(); cannot be change. eg, if i change to leftsidemenu(); there is error and it need to be menu(); and other menu
                http://www.singlisher.com

                Comment

                • navaldesign
                  General & Forum Moderator

                  • Oct 2005
                  • 12080

                  Re: Single Menu Page with Bv and PHP

                  What you are doing here is define functions and then call them in your page. It is obvious that a function can only be defined once. Redefining the same function will cause a conflict.
                  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

                  • barbroberts
                    Sergeant Major

                    • Feb 2007
                    • 91

                    Re: Single Menu Page with Bv and PHP

                    I'll give up on this if it can't be resolved soon. I simply cannot believe my php file for the image in the header won't work especially since the menu and footer both work. And it does bring up the image. so what is causing the verbiage behind it? What does the message mean? Where is this line 72 ?


                    <b>Fatal error</b>: Call to undefined function sidemenu() in <b>/home/pfvgmdxy/public_html/EBP_new_template.php</b> on line <b>72</b><br />

                    I have worked on this for hours again today, tweeking everything I know to tweek. I even deleted the new_template and sidemenu.php files and started over. same result.

                    I have other sites to build much more complex than this little one. If I can't get this fixed, I won't be very optimistic about all the rest I need to learn.
                    Barbara
                    http://www.gardenpartyteas.com
                    http://www.elizabethbaileyportraits.com

                    Comment

                    • navaldesign
                      General & Forum Moderator

                      • Oct 2005
                      • 12080

                      Re: Single Menu Page with Bv and PHP

                      Use my form and send me all your related files. i will fix any errors and send the files back to you.
                      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

                      • barbroberts
                        Sergeant Major

                        • Feb 2007
                        • 91

                        Re: Single Menu Page with Bv and PHP

                        You be giving up on me when you hear this question. How do I submit my files to you? I looked at "Your Form" but don't know how to add my files. Do I simply send you the link where they appear in my BV folder on my PC? That doesn't seem possible.....?
                        Barbara
                        http://www.gardenpartyteas.com
                        http://www.elizabethbaileyportraits.com

                        Comment

                        • Karen Mac
                          General

                          • Apr 2006
                          • 8332

                          Re: Single Menu Page with Bv and PHP

                          Barb

                          See where it says browse, etc below the questions? thats where you browse your hard drive for the files you want to send him. They upload and then he downloads to his computer.

                          Karen

                          VodaHost

                          Your Website People!
                          1-302-283-3777 North America / International
                          02036089024 / United Kingdom
                          291916438 / Australia

                          ------------------------

                          Top 3 Best Sellers

                          Web Hosting - Unlimited disk space & bandwidth.

                          Reseller Hosting - Start your own web hosting business.

                          Search Engine & Directory Submission - 300 directories + (Google,Yahoo,Bing)


                          Comment

                          • barbroberts
                            Sergeant Major

                            • Feb 2007
                            • 91

                            Re: Single Menu Page with Bv and PHP

                            tks, Karen, I'll do it now!
                            Barbara
                            http://www.gardenpartyteas.com
                            http://www.elizabethbaileyportraits.com

                            Comment

                            • barbroberts
                              Sergeant Major

                              • Feb 2007
                              • 91

                              Re: Single Menu Page with Bv and PHP

                              No I won't. There is nothing on that form that allows me to upload a file. When I put in the file's path from my pc it says: "The field Site must be less than 30 characters !"

                              What am I missing?
                              Barbara
                              http://www.gardenpartyteas.com
                              http://www.elizabethbaileyportraits.com

                              Comment

                              • navaldesign
                                General & Forum Moderator

                                • Oct 2005
                                • 12080

                                Re: Single Menu Page with Bv and PHP

                                Yes, i had set this limitation. However, since that is NOT a required field, you could simply leave it blank. Try again now, i have set it to 60 chrs. I also added 3 more upload fields, so you don't need to upload one file at a time
                                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

                                Working...
                                X