PDA

View Full Version : changing menu bars



nadiabodikian
04-28-2010, 05:40 PM
Hello there,

I would like to have a menu bar on the left side of every page on my website.However, from time to time the content of this menu bar will change, is there a way, these changes can show on every page, without me having to publishh all the pages one by one?

DarrenC
04-28-2010, 06:01 PM
Read this Topic by Naval Design (http://www.vodahost.com/vodatalk/bluevoda-tips-tricks-shortcuts/15764-single-menu-page-bv-php.html)

All the best.

nadiabodikian
04-28-2010, 09:22 PM
I tried what was described by Naval design, and it seems to work with php. But as all me pages already exist in html, what will happen if I convert tehm? will I have duplicate pages ont set in html and one set in php? or will taht be automatically replaced?
Also are php pages same as html for SE etc?

larazovich
04-29-2010, 12:07 AM
I tried what was described by Naval design, and it seems to work with php. But as all me pages already exist in html, what will happen if I convert tehm? will I have duplicate pages ont set in html and one set in php? or will taht be automatically replaced?
Also are php pages same as html for SE etc?

nothing will happen to your pages - just resave them as php. and yes they will act the same to search engines; you will lose nothing.

CarbonTerry
04-29-2010, 06:11 AM
You should go ahead and delete the html pages. You will want to do a redirect for those pages as they may be bookmarked by previous visitors.
Use your .htaccess file for that.
Here's the code for each page:
redirect 301 /xxxx.html http://yourwebsite.com/xxxx.php
(note that there is a space between the 301 & / )
You can put all redirects for all pages in your .htaccess
JMO
You can still have the pages as html if you use an IFrame for your menu. SE's don't like IFrames though.

nadiabodikian
04-29-2010, 03:13 PM
ok great!! thank you all!!

WSBlue
04-30-2010, 06:00 AM
You should go ahead and delete the html pages. You will want to do a redirect for those pages as they may be bookmarked by previous visitors.
Use your .htaccess file for that.
Here's the code for each page:
redirect 301 /xxxx.html http://yourwebsite.com/xxxx.php
(note that there is a space between the 301 & / )
You can put all redirects for all pages in your .htaccess
JMO
You can still have the pages as html if you use an IFrame for your menu. SE's don't like IFrames though.

where to apply the code:
redirect 301 /xxxx.html http://yourwebsite.com/xxxx.php (http://yourwebsite.com/xxxx.php)

what and where to find .htaccess ?
Thank you

CarbonTerry
04-30-2010, 08:08 AM
The .htaccess file is in your public_html directory. It is edited with notepad.
If there is not one there you can create one using notepad and ftp it.
Note that there is a dot/period in the file at the beginning.
.htaccess
If there is one already there and there is text, copy it and store it on your hard drive in.case something goes wrong.
Here's the .htaccess info for one of my websites:

redirect 301 /peep.html http://redhawk-archery.com/peep.php
redirect 301 /index.html http://redhawk-archery.com/index.php
redirect 301 /ke.html http://redhawk-archery.com/ke.php

Note the space between 301 /
That's the only space on each redirect.
BTW, 301 is a "Permanent Redirect"

You can test it by entering the old html URL. Of course, the html file must be deleted prior to testing.

nadiabodikian
05-01-2010, 01:14 PM
ok I have attempted to do this to an existing page , but the the contents of the HTML box does not show.
Do I have to create all the pages from scratch for this to work?
Please take a lookk and tell me where I am going wrong?
http://www.alexanderhitek.com/eyewear-collection-test3.php

there is an html box just under accessories, and it doe snot show. please help!!!

CarbonTerry
05-01-2010, 04:58 PM
I get an error page. What code is in the html box?

nadiabodikian
05-01-2010, 05:27 PM
No.. I got it.I was trying to convert an existing html page into php, it will not do. I have to create the page from scratch with a different name in php, then it is working

CarbonTerry
05-01-2010, 06:10 PM
You do not have to redo from scratch. Change the page properties to php, save as, publish.
The old html pages will still be on the server.

nadiabodikian
05-01-2010, 06:10 PM
someone please HELP!!!

I have spent hours trying to do this.
I have created a new page from scratch in php.
the first external element works fine.
Second one half works.
the third one does not show at all.
please look at the link below and tell me what is going wrong

http://www.alexanderhitek.com/eyewear-collection-test5.php

CarbonTerry
05-01-2010, 06:13 PM
what is the 3rd element?

nadiabodikian
05-01-2010, 06:21 PM
another menu bar which is not showing at all this one
http://www.alexanderhitek.com/hitekwoman.html

nadiabodikian
05-01-2010, 07:07 PM
please look at this page,

http://www.alexanderhitek.com/eyewear-collection-test2.php

underneath the title accessories is an html box contaning <?php
include 'accessories.html';
?>
which is page
http://www.alexanderhitek.com/accessories.html
and it does not show at all, i have used a sliding menu, where am i going wrong?

CarbonTerry
05-02-2010, 03:27 AM
Correct code:
<?php
include ("accessories.php");
accessories();
?>

The accessories page must be php for this to work

CarbonTerry
05-02-2010, 04:06 AM
When using this system you must replace the word "menu" (no quotes) wherever it appears and replace with the name of the php page you have published. In the above case it will be "accessories" (nq)

nadiabodikian
05-03-2010, 11:57 AM
I have done what you suggeted, published the pages contaning the menu in php, inserted the following codes in 1, 2, 3 html boxes respectivley
<?php
include 'accessories2.php';
?>

<?php
include 'hitekman2.php';
?>

<?php
include 'woman.php';
?>
and the result is still corrupt, only the 3rd menu Hi Tek woman is funstioning as it should. If I have one menu it works, by addin 2nd and third, the previous ones are gettin corrupt.

please take a look, and I really appreciate your help.
http://www.alexanderhitek.com/eyewear-collection-test2.php

CarbonTerry
05-03-2010, 05:06 PM
Incorrect code !!!!! You are leaving out a line of code on all examples.
Here's the correct code:
<?php
include ("accessories2.php");
accessories2();
?>

Is this menu named and published as accessories2 ???
------------------------------------------------------------
<?php
include ("hitekman2.php");
hitekman2();
?>

Is this menu named and published as hitekman2 ???
--------------------------------------------------------------

<?php
include ("woman.php");
woman2();
?>

Is this menu named and published as woman ???

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

nadiabodikian
05-03-2010, 05:14 PM
ok one of the menu names is accessories2.php is the code
include ("accessories2.php"); or include ('accessories2.php');

CarbonTerry
05-03-2010, 05:18 PM
I edited my last post please check again. "xxxxxxxx.php" is correct

CarbonTerry
05-03-2010, 05:21 PM
You may want to review the tutorial (http://zone5pix.com/php-tutorial/php-menu.htm).

Remember...you will have to replace the word " menu " with whatever the name of the page is that contains the information.

nadiabodikian
05-03-2010, 05:22 PM
sorry I dont get it is it with or without quotes? I put in all 3 cases exactly as you have shown me above and the reult is very bad. you must bear in mind that I dont know to write html (obviously)

CarbonTerry
05-03-2010, 05:40 PM
I see that you have published all menus. Have you inserted the correct code on all menu pages?

Start of Page:
<? function menu() { ?>
End of Page:
<?
}
?>

Replace the word " menu " (no quotes) with the appropriate page name, ie accessories2 or woman or hitechman2.


This has to be done with each menu page.

All pages that use this system must be published as .php extension.

nadiabodikian
05-03-2010, 05:40 PM
I believe I have done step by step everything in the tutorial, but it does not work with me. it works is it is a text menu but not a menu bar if that makes any sense.

CarbonTerry
05-03-2010, 05:44 PM
Please provide the link again.

nadiabodikian
05-03-2010, 05:46 PM
http://www.alexanderhitek.com/eyewear-collection-test2.php

pretty baaad

CarbonTerry
05-03-2010, 06:04 PM
This can be quite frustrating for a new webbie. Let's do one page at a time.
main page
I know that you have checked it many times but there is an error there.
<?php
include ("accessories2.php");
accessories2();
?>
is the code that goes into the html box on the main page
----------------------------------------------------

accessories2
Right click 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:
<? function accessories2() { ?>
-----------------------------------------------------------------------
Next, click on “End of page” and paste this other piece of code:
<?
}
?>
publish both pages as php
Give it another try please.

CarbonTerry
05-03-2010, 06:22 PM
So......on your main page you will have 3 html boxes in the physical position desired for the menus to appear.

CarbonTerry
05-03-2010, 06:55 PM
I'll be back online in 7-8 hrs.

CarbonTerry
05-03-2010, 07:01 PM
There was a problem with the link to the tutorial (http://zone5pix.com/php-tutorial/phpmenu.pdf).
Many thanks to NavalDesign for this.

nadiabodikian
05-03-2010, 07:08 PM
i have done everything you have told me. if it is only one menu bar it works, when I add more than one , the previous ones get corupted.

CarbonTerry
05-03-2010, 07:10 PM
2 menus are now working

CarbonTerry
05-03-2010, 07:20 PM
You have 3 separate html boxes on the page?
html box 1:
<?php
include ("accessories2.php");
accessories2();
?>
------------------------------------------------------------------------


html box 2:
<?php
include ("woman.php");
woman();
?>
---------------------------------------------------------------
html box 3:
<?php
include ("???????.php");
???????????();
?>
I don't remember the menu name for this>

CarbonTerry
05-03-2010, 07:22 PM
1:22 PM
Leaving in 10 minutes.

CarbonTerry
05-03-2010, 07:42 PM
If you want to send me your page I'll check it over.

nadiabodikian
05-16-2010, 08:12 AM
hi, how can i send you my page so you check it over? thanks for helping me :)

CarbonTerry
05-16-2010, 09:04 AM
Go here (http://www.z5web.com/) and click on the CONTACT link then attach your page. What version of BV are you using?
I have 10.2 & 11.4G installed.
You will need to send the page with the html box and the page you are using for the menu.