Web Hosting Vodahost    

Home Take The Royal Tour! Order Now Features Prices
Go Back   Web Hosting > BlueVoda Website Builder Forums > BlueVoda Tips, Tricks and Shortcuts

Notices

BlueVoda Tips, Tricks and Shortcuts Know a great BlueVoda (or Web design) tip or trick? Share it with the world here. Become famous for your brilliance! Please, No Questions or Problems!

Reply
 
LinkBack Thread Tools
  #1  
Old 11-25-2006, 02:49 PM
navaldesign's Avatar
General & Forum Moderator
 
Join Date: Oct 2005
Location: Italy
Posts: 8,937
Default Single Menu Page with Bv and PHP

How to create and use a single Menu and use it in all your pages, WITHOUT using Iframes.

Well, menubars have always been a “weak” point for all of us, BV users, and I believe for many other, non BV users. Imagine a 100 or 200 page site, perfectly functioning and on the air. Then, one day, you need to add or delete some button, or simply change a link. You need to change the menubar in ALL 200 pages, and then re-publish them all. Quite a work, ah ?

In Menubar in I-frame I have displayed a method of using a single menu page, then recalling it in the rest of your pages, through an Iframe. Everything nice, but I have Beth(ers) that hates Iframes ! (LOL! This trick has come out after lot of research thanks to your insisting!).

Ok, so what can we do? FrontPage allows for includes, that is recalling other pages in yours. But BV doesn’t. Doesn’t it ?

No, indeed it doesn’t, at least not directly. But, with a little help from my friend, (PHP, I LOVE you!) I found the way of including ANY element in my pages. This method can be used for menubars, dropdown menus, CSS text menubars, headers, and everything else. And, it is all done within BV! No need for editors, Notepad, or anything else. Only one requirement: your pages need to be published as php. Please note that this quite alright with SE, if not even better. We are talking about static PHP pages, so no problem at all. Ok, let’s see how you can do it!

Step 1. Create the menubar

Open a blank page. Create your menubar as you would do normally. Take care to place it in the upper left corner of the page (later we will see how you actually place it in your pages).

Important: do NOT use any metatags, page title, page description, author etc in this page. It could confuse Search Engines, as this code will be implemented to the code of each and every one of your pages.

Step 2. Include the necessary PHP code.

Rig***lick anywhere in the blank space of the page and select Page HTML (or, View, Page HTML). Now, click on “Start of Page” and paste in the window this code:

Quote:
<? function menu() { ?>








Next, click on “End of page” and paste this other piece of code:

Quote:
<?
}
?>




Step 3. Define and publish your page as PHP page.

Rig***lick again anywhere in the blank space of the page, and select Page Properties (or, View, Page Properties). Set the extension of the page to be php when published. Save the page as “menu” and publish it.


Ok, at this point, your menubar page is published on your site, and ready to be used in the rest of your pages. Let’s see how you do this:

Step 4. Insert the menubar in your pages.

Let’s suppose you have already a page. We will use a HTML box to place our menubar in the page. Since you already know what dimensions your menubar is, and where you want to place it, I suggest that you make this html box the same dimensions as the menubar. To help you out with this, you can copy / paste temporarily the menubar in your page, insert the html box, make it same size as the menubar, and then place it behind the menubar, exactly in the same position. Now, delete the menubar, and you will only have the html box, which is still empty.

Visually, if you have followed the above instructions, this html box is occupying exactly the space where your menubar should be.



Ok, double click the html box, and paste in it the following code:

Quote:
<?php
include ("menu.php");
menu();
?>





Step 5. Define and publish your page as PHP page

Repeat exactly the step 3 operations, for this page.

Ok, you are done. I’ll just take a minute to explain what you have done: You have created a menu bar. The php code you have placed in this page, has defined the html code of this page, as a php function, named “menu”. Then, in the main page, you are calling this page, and then, you just call the function “menu”, which creates the menubar in your page.


You can see this page in www.navaldesign.info/Tips/phpmenu.php

Please note that if you care about SE optimization, you can use a CSS text menu, that allows for text menu buttons. This way, your links will be immediately visible to the SE crawlers.

Just make sure, when using menus that make use of external files, like themes or javascript or css, to upload the necessary files in the same folder. If you use ANY of BV’s menubars or dropdown menus, BV will automatically upload everything. If you use the same menubar in different folders, it would be wise to publish the menu page in all the folders.

Please note that you can use this trick not only for menubars, but also for headers, footers, ads, practically ANYTHING that can be in some way inserted in a BV page (BV Rocks!). Just make sure, when using this trick for more than one elements (external pages) to save each page, with each own name, f.e. "myheader" , "footer" etc., and also in the html box, change the words "menu" with "myheader", "footer", etc.
You can have as many external elements called in your page as you like. do NOT use the word "header" as it causes conflicts with pah's "header" command.

That’s all. Have fun and save yourself lots of work by using this trick.
__________________
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!

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #2  
Old 11-25-2006, 04:42 PM
Bethers's Avatar
Major General & Forum Moderator
 
Join Date: Feb 2006
Posts: 5,207
Default Re: Single Menu Page with Bv and PHP

Naval, I love you!

I don't have time right now with Christmas sales, etc to change anything now - but I will be looking at making quite a few changes when things slow back down.

This is what I knew could be done, but didn't know how to do - I'm glad I was some influence on your figuring it out - cuz it will be MUCH better for se's!!

Now, one question - which of the menu bars on the page is the one you inserted that way? Or did you put both in - just showing different possibilities?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #3  
Old 11-25-2006, 07:14 PM
navaldesign's Avatar
General & Forum Moderator
 
Join Date: Oct 2005
Location: Italy
Posts: 8,937
Default Re: Single Menu Page with Bv and PHP

Excactly, both, just to show that it can be done LOL!
__________________
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!

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #4  
Old 11-25-2006, 08:00 PM
Bethers's Avatar
Major General & Forum Moderator
 
Join Date: Feb 2006
Posts: 5,207
Default Re: Single Menu Page with Bv and PHP

Naval,
I'll use that on my next site, but can't afford to rename any pages from .html now on current sites - as se's are sending them traffic and I don't want to go backwards.

Now, I know that it can also be done with css - which I could then use on existing sites with html - and some day I'll find someone who can tell me how that one works :)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #5  
Old 11-25-2006, 09:03 PM
Collectors-info's Avatar
General
 
Join Date: Feb 2006
Location: London (UK)
Posts: 5,064
Default Re: Single Menu Page with Bv and PHP

Well done Naval. This will save loads of time.

One small thing I am not sure on? You say the menu page will have to be placed in all folders. Will this mean manually updating the menu pages that are placed in other folders? Or can the code below be modified to go & get the menu page from, let’s say the public_html area & load it onto the new page?

IE: the code below to go in a html box
<?php
include ("menu.php");
menu();
?>


Don’t laugh! Just my way to explain. IE:

<?php
include ("Go & find main menu in public_html/menu.php");
menu();
?>


Well done again this will go into a new site I am working on.
__________________
From Chris,

www.collectors-info.com
View sites in FF & IE, with res @ 1024 x 768 on 19” screens.

How to ask for help on the forum. - VH prices. - BV Tutorials. - Using PIXresizer - Image/Photo Tips

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #6  
Old 11-25-2006, 10:40 PM
navaldesign's Avatar
General & Forum Moderator
 
Join Date: Oct 2005
Location: Italy
Posts: 8,937
Default Re: Single Menu Page with Bv and PHP

Sorry, no, it can't be done because the menu also requires the relevant images and / or javascript and themes. So you need to publish the menu page in those 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!

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #7  
Old 11-25-2006, 10:58 PM
Collectors-info's Avatar
General
 
Join Date: Feb 2006
Location: London (UK)
Posts: 5,064
Default Re: Single Menu Page with Bv and PHP

Quote:
Originally Posted by navaldesign
Sorry, no, it can't be done because the menu also requires the relevant images and / or javascript and themes. So you need to publish the menu page in those folders.
Thanks Naval,
this will also be a big bonus on some of the browsers that are not so keen on loading iframes.
__________________
From Chris,

www.collectors-info.com
View sites in FF & IE, with res @ 1024 x 768 on 19” screens.

How to ask for help on the forum. - VH prices. - BV Tutorials. - Using PIXresizer - Image/Photo Tips

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #8  
Old 11-26-2006, 08:36 AM
navaldesign's Avatar
General & Forum Moderator
 
Join Date: Oct 2005
Location: Italy
Posts: 8,937
Default Re: Single Menu Page with Bv and PHP

Quote:
Originally Posted by Bethers
Naval,
I'll use that on my next site, but can't afford to rename any pages from .html now on current sites - as se's are sending them traffic and I don't want to go backwards.

Now, I know that it can also be done with css - which I could then use on existing sites with html - and some day I'll find someone who can tell me how that one works :)
Beth, from what i know, you can use CSS to STYLE your menubar. Indeed, the best menubar, is a text based one, like the ones you are using. Well, with CSS you can style your menu text, and make it appear as button. But, till now, i have NOT been able to find any way to recall a menubar in a page, if not with somekind of "include" method: Iframe, php or the FP includes. I will keep searching though if you are sure about this.
__________________
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!

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #9  
Old 11-26-2006, 05:57 PM
Bethers's Avatar
Major General & Forum Moderator
 
Join Date: Feb 2006
Posts: 5,207
Default Re: Single Menu Page with Bv and PHP

Naval - I'm lost in css - but here's where I found the info that makes me believe I should be able to do it:

http://webdesign.about.com/od/freeme...bllistvert.htm

http://webdesign.about.com/od/cssmen...s=css+template

And - this one is where I wanted to dissect:
http://webdesign.about.com/od/css/a/aa082304.htm

I appreciate it if you can figure this out for me (and the many others out here!)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #10  
Old 11-27-2006, 06:40 AM
navaldesign's Avatar
General & Forum Moderator
 
Join Date: Oct 2005
Location: Italy
Posts: 8,937
Default Re: Single Menu Page with Bv and PHP

Quote:
Originally Posted by Bethers
Naval - I'm lost in css - but here's where I found the info that makes me believe I should be able to do it:

http://webdesign.about.com/od/freeme...bllistvert.htm

http://webdesign.about.com/od/cssmen...s=css+template

And - this one is where I wanted to dissect:
http://webdesign.about.com/od/css/a/aa082304.htm

I appreciate it if you can figure this out for me (and the many others out here!)
Hi Beth,

as i was afraid, that is not a way of including a single menu in your pages.

Explain: all the links you posted, are tutorials on how to create a menubar, using CSS. BUT, the menu has to be inside each and every page. Only the stylesheet document can be unique for all pages, so if you want to change the look of your menu, then you only need to edit this one css file.

But when it comes to editing the menu itself, in the meaning of adding, deleting, or changing links, etc, you still need to edit page per page. You will need to manually edit the menu in one page, eventually copy paste in the rest of the the pages, then republish ALL the pages.

The only way, as i posted above, i know of, to have a SINGLE menu, is to in someway, include this unique menubar, in your pages, calling it from whithin the page. And, as long as you don't have the includes (that FP allows for), the only way i could come up with, is the one i posted, making use of php.

Please note that, as i posted above, this include, can be practcally ANYTHING that can be included in a php/html page: menubars, headers, footers, ANYTHING. So, you can use this trick to implement a CSS menu as well.

Now, i do understand that a CSS menu, like the ones described in your posts, are the best, as long as SE are concerned. And, those tutorials, explain how to create them. However, there is a simpler way to accomplish the same result (creating a CSS menu), by making use of the CSS menu generators you can find in the web. Here is an easy one:
http://www.webmaster-toolkit.com/css...enerator.shtml . It will allow you to create your CSS menu and then download the code, ready to place in your 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!

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #11  
Old 11-27-2006, 06:47 PM
Bethers's Avatar
Major General & Forum Moderator
 
Join Date: Feb 2006
Posts: 5,207
Default Re: Single Menu Page with Bv and PHP

Thanks, Naval. I'll see what I can do with the generator - and just keep having to change all my pages when I have changes.

And I'll try the php script above on my next site (in the works).
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #12  
Old 11-27-2006, 06:52 PM
navaldesign's Avatar
General & Forum Moderator
 
Join Date: Oct 2005
Location: Italy
Posts: 8,937
Default Re: Single Menu Page with Bv and PHP

You're welcome. I am by no means an expert of CSS, so maybe FPRob can give us both an advise on this issue. Maybe we should post in the CSS forum.
__________________
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!

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #13  
Old 11-27-2006, 08:12 PM
navaldesign's Avatar
General & Forum Moderator
 
Join Date: Oct 2005
Location: Italy
Posts: 8,937
Default Re: Single Menu Page with Bv and PHP

Beth! Download this CSS menu generator: i find it excellent! http://www.4yougratis.it/software_we..._generator.htm
__________________
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!

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #14  
Old 11-28-2006, 02:00 AM
Bethers's Avatar
Major General & Forum Moderator
 
Join Date: Feb 2006
Posts: 5,207
Default Re: Single Menu Page with Bv and PHP

Downloaded - will look at it later,
THANK YOU.
__________________
Beth
A Child's Palace - Pinata Palace -