Forum Moderators: coopster

Message Too Old, No Replies

php and FrontPage question

Is FrontPage is compatiple with server-side scripting?

         

pixeltierra

12:21 am on Jul 12, 2006 (gmt 0)

10+ Year Member



My client wants to use FrontPage to edit the site I've made. Anyone know if FrontPage is compatiple with server-side scripting?

As is the case with many WYSISYG editors, they kill perfectly good scripting code by forcing the page to correspond to a static html page.

For example the following


<?php include('../file/top.php');?>

<h1>Header</h1>
<p>a bunch of stuff</p>
<p>a bunch of stuff</p>

<?php include('../file/bottom.php');?>

will get turned into:


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="ltr">
<head>
</head>
<body>

<h1>Header</h1>
<p>a bunch of stuff</p>
<p>a bunch of stuff</p>

</body>
</html>

Does anyone know if FrontPage has this annoying habit?

abbeyvet

12:46 am on Jul 12, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



PHP will not be touched in FP. That stuff usually appears when someone pastes in text directly from Word or something like that.

You need to get your client to go to Tools > Page Options > HTML source and then tick "Preserve Existing HTML"

Then send them to Tools > Options > Configure Editors > Add
There are three things to fill in there, and this is what they need to put:

File type: php
Editor Name: FrontPage
Command: frontpg.exe

Then everything should be fine - I am not 100% sure though, because although I use FP, I use none of its proprietory features and do not 'publish', I FTP.

However I have pages with loads of PHP scripting in them, not just includes, and have never, ever had FP mess it up in any way.

pixeltierra

9:31 am on Jul 12, 2006 (gmt 0)

10+ Year Member



That's good news. I've been trying to figure out this problem for years. The thing that is truly annoying is that if the renderer doesn't see <html> tags or other things that look like the page is formatted correctly, it adds them in! But no site worth anything these days is static. Why are these crappy editors so resistant to changing, or like you say, having an option that says, don't mess with the code.

I'll have to see it to believe it though, as it sounds too good to be true. In my past experience that "don't mess with HTML" option means that it won't change the "indentations" and such in the html, but doesn't stop it from adding tags. I'll have to try to get my hands on FP to see.