php files and FrontPage menus (Full Version)

All Forums >> [Web Development] >> General Web Development



Message


Charles Copes -> php files and FrontPage menus (8/5/2002 16:10:44)

I couldn' t find any forum that discussed php files in conjunction with FrontPage, so am starting a new topic. If there is a more appropriate place for this, please let me know.

I use php scripts for my shopping cart on my web site. My product pages are usually just normal .htm pages with a link to the .php shopping cart. However, if I need to offer options, such as sizes of clothing, I have to save my product pages as .php files so that the necessary php script that captures the option info can function.

I use one of Outfront' s templates which uses FrontPage dynamically generated menus. I' ve found that when I name a page with a .php extension, the menus no longer function.

Has anyone ever encountered this problem and if so, how do you overcome it?




Spooky -> RE: php files and FrontPage menus (8/6/2002 5:26:08)

Do you have an example of a non working page we can view?




Charles Copes -> RE: RE: php files and FrontPage menus (8/6/2002 7:09:03)

Sure, the web site is at http://www.lalagniappe.com. The problematic pages are the " Certified Cajun" clothing pages. There are links to these pages on the home page. The shopping cart uses php extensively, so all those files are php, but my actual web site, up to now, has not required any php scripts. I guess I have now discovered the the template can' t be incorporated into the php pages.

The " size" option for the clothing required a php script. The first problem I had was with FrontPage " include" files. I was able to solve this by changing the webbot bot=include to a php script. For example:
<% require( " ../_includes/head.htm" );%>

But, the horizontal and vertical menus use a
<!--webbot
bot=" Navigation" S-Type=" arrows" S-Orientation=" horizontal"
S-Rendering=" text" B-Include-Home=" FALSE" B-Include-Up=" TRUE" U-Page
S-Target -->

This does not work and there is no comparable php command that I am aware of. I don' t know enough of the underlying principles about the FrontPage extensions to know if this is even possible.[&:]




Thomas Brunt -> RE: php files and FrontPage menus (8/6/2002 12:40:58)

I have run into that before with .cfm pages. My recollection is that the fix was to do Tools > Options > Configure Editors > Set FP to be an editor for that file extension.

I believe that you will need to temporarily rename the file back to .htm if you want to drag a page under it in the nav view flow chart, but can rename it back as soon as you' ve done that.

t




Charles Copes -> RE: RE: php files and FrontPage menus (8/6/2002 13:09:53)

I have already configured the editor in Tools > Options >Configure Editors to FrontPage so that I could work with my shopping cart pages, which all have php extensions.

Oddly enough, the menus are visible when I' m working on them in the FrontPage editor, but when I publish they aren' t there. If I switch to " Preview" in the editor, the page I' m working on still has the menus, but when I click on any pages on the menu, the corresponding pages don' t work. Very strange. I feel like there is a way to make this work, but haven' t figured it out yet.




Thomas Brunt -> RE: php files and FrontPage menus (8/6/2002 13:28:31)

Have you tried doing any of this directly on the live site? You can open the live site and edit live the same way you open your local version.

t




Charles Copes -> RE: RE: php files and FrontPage menus (8/6/2002 13:35:03)

No, I haven' t, but I' ll do that tonight and see if that will help. Thanks for the advise. I' ll post again after I try that out. cc




Charles Copes -> RE: php files and FrontPage menus (8/6/2002 20:45:53)

I tried opening the live site, but no cigar. When the pages are open in FrontPage editor, everything is fine. The include files and both horizontal and vertical menus are visible. But, they aren' t there when I view the site through a browser.

I tried recalculating the hyperlinks on the live site. I changed some stuff and saved the page anew, but still no luck. I' m at a loss as to what to try.

This is disappointing since I planned eventually to incorporate the Global Template throughout the site, including the shopping cart.

Hind sight is 20/20, but I guess I should have purchased Spooky' s shopping cart. This was the only one I found specifically designed for FrontPage running on Unix. It is written in PHP using ASP tags rather than PHP tags. That is done so that FrontPage doesn' t choke on and corrupt the code.




Shirley -> RE: php files and FrontPage menus (8/6/2002 20:46:10)

I would just make an external link and link to the page with the whole url.
http://www.yoursite.com/yourpage.php




Thomas Brunt -> RE: php files and FrontPage menus (8/7/2002 9:55:05)

Shirley' s right. In nav view > right click on parent page > add existing page > Existing File > Type in absolute path to that page.

t




Charles Copes -> RE: php files and FrontPage menus (8/7/2002 10:30:59)

It is probably my ignorance, or maybe a different version of FrontPage, but I don' t have an option of adding an existing page. When I right click on the parent page, I can add a " new page" or " external hyperlink" . Those are the only options not directly connected with the parent page itself, i.e. properties, rename, etc.

Each of the child pages although visible in the org chart below the parent page have a " no smoking" sign in the bottom left corner. You know, that red circle with a red bar across it??




Thomas Brunt -> RE: php files and FrontPage menus (8/7/2002 10:33:05)

You' re using 2000. External Hyperlink is the correct option. Sorry!

t




Charles Copes -> RE: php files and FrontPage menus (8/7/2002 12:12:12)

I truly appreciate the suggestions, but alas, this did not work either. I added the pages as " External Hyperlinks" to the parent page in Nav. view and published to the site, but the menus were sill missing (I refreshed to make sure I wasn' t looking at cached pages). I opened the live site in FrontPage and tried doing the same thing from there, but that didn' t work either. Perhaps the webbot just does not recognize files with a last name other than .htm.




Thomas Brunt -> RE: php files and FrontPage menus (8/7/2002 12:22:12)

I don' t think that' s it. I sometimes put javascript function calls in external links.

I can understand the nav bar not shoing up in the acutal .php file, but the link to it on the parent page would show up unless it' s a .php file also.

Is there a url where we can see?

t




Charles Copes -> RE: php files and FrontPage menus (8/7/2002 12:35:25)

Sure, the site is http://www.lalagniappe.com. The offending pages are linked to the home page as " Cajun Clothing" on the menu, or hotlinked on the body text as " Certified Cajun Clothing" . To go straight to one of the offending pages, go to http://www.lalagniappe.com/mall/cajunauthentic.php.




Thomas Brunt -> RE: php files and FrontPage menus (8/7/2002 12:42:45)

I' m stumped.

Maybe go with a work around. The php pages could be plain and with just a sinlge link back to home, or something like that.

t




abbeyvet -> RE: php files and FrontPage menus (8/7/2002 12:43:15)

Why not use PHP includes instead of FP includes in the PHP pages?

It willr equire a little editing of the HTML but not a lot and once you have done it you can use one of the altered pages as a template.

For the navigation it will mean adding some additional pages to include, a hassle but again once you have done it once you will retain all the benefits of includes.

For a file called footer.htm in a folder called includes, the FP include looks like this

<!--webbot bot=" Include" U-Include=" /includes/footer.htm" TAG=" BODY" -->


The equivalent PHP include command looks like this:

<? include(" /includes/footer.htm" ) ?>

Bear a couple of things in mind

1. If you move pages about FP will NOT update PHP includes to reflect the new path, you will have to do it manually.

2. If making page that will only be included with PHP includes, you do not need head or body tags in the included files.

3. You can use absolute URLs and you can include content from one site on another using PHP includes.




Charles Copes -> RE: php files and FrontPage menus (8/7/2002 13:03:07)

I have used the php " include" command to display the header, footer, and message include files, and that works. I' ve never considered creating the menu as an include and then using php to display the menu in the proper location. Sound as though it will work, but what a hassle, huh?




Charles Copes -> RE: php files and FrontPage menus (8/7/2002 13:05:34)

Does FrontPage have this problem with .asp pages? Or do you have to name asp pages as such? I have never worked with asp.




Thomas Brunt -> RE: php files and FrontPage menus (8/7/2002 13:40:39)

The only issue with a .asp page is that you have to rename it to .htm to drag a page under it in the nav view flow chart. You can rename it back after you' ve done that, however.

t




Charles Copes -> RE: php files and FrontPage menus (8/7/2002 15:31:06)

In my case, the parent is a .htm page, so I don' t have any problem dragging these files under it in nav view. They look pretty there, but each one has that annoying " no smoking" sign that I' m sure is supposed to tell me something, but I don' t know what. I guess it just means that .php is " allowed" . Do you think if I renamed them as .htm to get the menus to work initially, then renamed them again as .php files it might stick?




Shirley -> RE: php files and FrontPage menus (8/7/2002 17:07:47)

I am unable to get to the site to see what you are talking about. I just go to an addr.com page.

But if you are not going to use the FP generated navigation just use a FP include page.

You can use a php include or require too but there is no reason to.





Charles Copes -> RE: php files and FrontPage menus (8/7/2002 17:21:05)

Hi Shirley,

Sorry you couldn' t get to the site. I' ve been working on it all day, so may have changed some files when you were trying to access it. In my last comment, I meant to say that the " no smoking" sign must mean that php files are " not allowed" .

I think I' m making progress. Thomas has been trying to tell me all along that changing the files extensions *after* getting the navigation functioning was the way to go. I guess I' m just too hard headed to get it the first time. I' m in the process of doing that now (I' ve changed one file so far) and it seems to work. I renamed all the files back to .htm and got the navigation bars functioning. I' ve changed on of the files back to .php now, and although some of my links still have to be updated, i think the navigation is still working. I' ll post more later. Right now, I' m hopeful.

The secret seems to be leaving the files as .htm until everything is functioning, then renaming them to .php. I' ll verify that later.

C




Charles Copes -> RE: RE: php files and FrontPage menus (8/7/2002 17:52:10)

The site is still doing strange things, but it is closer. The include files are now working... after renaming the files .htm and dragging them under the parent page. After navigation and includes were functioning, I renamed them back to .php files. The includes still work and the navigation menus are visible... sorta... still not quite right, but getting closer.

If you want to take a look, try http://www.lalagniappe.com and click on Cajun Clothing.

Just wanted to stop and say thanks to all you folks who took time to help. I am amazed that you do this to help people you don' t know... and for no money! A big thanks!!!




Charles Copes -> RE: php files and FrontPage menus (8/7/2002 18:04:11)

The navigation bars are there, but the graphics are missing. Only the text is there and they still link to the .htm files which no longer exist.




Charles Copes -> RE: php files and FrontPage menus (8/8/2002 9:32:50)

Here is an update for those of you who might be following along on this thread. After an all nighter, I' ve concluded that FrontPage 2000 either hates me or .php files. Actually, I imagine the problem I' m experiencing is common when attempting to use FrontPage' s dynamically generated navigation menus with any pages with a last name other than .htm.

If I place the .php pages under their parent (.htm file) in the Nav view, everything looks nice and in the FrontPage editor, the navigation menus are visible, but not when published live.

With the advise of many here, I have spent untold hours working on the site both locally and live on the web. The current situation is as close as I can get and that is not satisfactory.

If I temporarily name the files with a .htm extension on the live site, FrontPage will generate the proper navigation menus. If I then rename the files back with the .php extension, all sorts of random buggy things happen. The navigation buttons are there, well almost, sometimes it is just the text. Sometimes the buttons still try to link to the .htm files which no longer exist, and sometimes they work.

While this is not satisfactory, it is so much closer than where I started. Initially I had no include files and no navigation buttons. The include files just miraculously started to function on their own (I know, things like that don' t happen... but they do with FrontPage). And sometimes I have navigation buttons. I' m hoping for another miracle.

Thanks again to all the folks who assisted.

cc




Charles Copes -> RE: php files and FrontPage menus (8/15/2002 23:11:24)

I have tried twice to post a final fix for this problem, but I guess my explanation was too long and I lost the whole thing. I just wanted to let all know that I did eventually make this work. FP2000 does not want to allow navigation bars using files with last names other than htm, but you can make it do so with a lot of trial and error.

It has to do with renaming the files about 3 times working form the live site, and also saving the files during the process. If anyone ever wants to know more detail, let me know. Thanks again for the help. cc

To see functional navigation bars utilizing pages with php extensions, go here:

http://www.lalagniappe.com/mall/cajunauthentic.php




aarndt -> RE: php files and FrontPage menus (7/20/2004 16:26:52)

WoW! The same problem I am currently having!

I would like to chat more about how you fixed your problem

Thanks

Andrew Arndt
aarndt@usa.com




kgiles -> RE: php files and FrontPage menus (7/22/2004 17:48:20)

Sorry I picked up this thread rather late
The basic problem is that FP doesn't recognise .PHP files for most of its proprietary functions. i.e you cant use .php file if FP navigation
one solution to this is to allow the PHP interpreter to work on .htm files. You need to be able to access the
.htaccess in your root dir of the server the edit the file by adding the following code line to the bottom of the file:

AddType application/x-httpd-php .htm .html


You still need to be carful as frontpage does handel PHP files well so try not to use F/P to edit these files.
Good luck




aarndt -> RE: php files and FrontPage menus (7/22/2004 18:05:49)

My solution...use java navigation.

I will port updates as it progresses.

Thanks!

Andrew




Page: [1]

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI
7.763672E-02