Frontpage Changing Code

  • Thread starter Thread starter Steven Haslam
  • Start date Start date
S

Steven Haslam

I have noticed over the many years of working with
frontpage, that occasionally it will change the code of a
page i have written in the code view (currently working
in 2003). This has become more of an issue as i have
started doing PHP in frontpage.

For example:

<input class="button" type="submit" value="<?=
($$_FORMTYPE_ID_) ? "Update" : "Add"?>">

This will flip out in Frontpage, but it is a valid PHP
code use. But because the php code has quotation marks,
it will then throw an extra piece of the end on top of
the text.

on top of that, i am not the one who originally wrote the
site, so i cannot go through this 300+ page system and
find everywhere this error occures or watch for it when i
save a file.

How do i turn off frontpage's auto-managment system? I
dont want frontpage to care about what i put in the
scripting, and i want to use just 1 program, and its the
best in my oppinion for handling files and taking care of
tables.

Thank you for a quick response.

Steven Haslam
 
1. You can't disable this function of FP to validate the HTML code.
2. However you can set FP to edit PHP pages in Notepad which will solve the problem.

--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
WEBMASTER Resources(tm)

FrontPage Resources, WebCircle, MS KB Quick Links, etc.
==============================================
 
Do you know if this will be a future option

(even if its hidden way deep into the options pages so
only those who know what they are doing can have this
option?)

If not, how would i go about doing an official request?

I want to be able to keep colorizations in the HTML part
of the page (helps me to see where i am in the page). So
notepad would be as bad as having two editors in my
opinion. Plus - its a major reason a lot of developers
dont go with FP. Most complain that it changes the code
on them.

Any ideas?

Steven Haslam
 
When you open you pages, does FP automatically open them in html/code View, if so then you should
not force them in to Normal/Design view as FP has indicated that it can't parse the code? Also make
sure the you have FP set to never modify your HTML code Page / Authoring Options.

I have never have a problem with FP changing my code, but I do work only with hand coded
ASP/VBScript.

FP really has no built-in support for PHP tags, however PHP can be configured to use ASP <% %> tags
which would solve your problem, but you host would have to make the change on the server.

--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
WEBMASTER Resources(tm)

FrontPage Resources, WebCircle, MS KB Quick Links, etc.
==============================================
 
Unfortunately, the issue still is that i am not working
with brand new code - but older code done in php-edit -
which i dont like the way it manages files. So older
parts of the code are <??>. Those are the areas which i
am having problems with.

so instead of going through all 300 pages and changing
them to <%%>, i would like Frontpage to behave with php
and still have the functionality of the full frontpage
editor (which i still feel is the best editor out there).

and all that needs to be done is a setting where
frontpage does not auto-correct.

All i would like to do at this time is to oficially
request the feature. How would i do that?

Thank you for your patience.

Steven Haslam
-----Original Message-----
When you open you pages, does FP automatically open them
in html/code View, if so then you should
not force them in to Normal/Design view as FP has
indicated that it can't parse the code? Also make
sure the you have FP set to never modify your HTML code Page / Authoring Options.

I have never have a problem with FP changing my code,
but I do work only with hand coded
ASP/VBScript.

FP really has no built-in support for PHP tags, however
PHP can be configured to use ASP said:
which would solve your problem, but you host would have
to make the change on the server.
 
believe it or not, I've found that simply leaving or naming the page as htm
and putting the php code in <script> blocks or by the insert/ web component/
html works the best.
I've been messing with trying to get some php functionality into FrontPage
templates. You can actually have the server process the htm/html past the
php engine. it seems to work so far so good.
this server mod is easy and it can be done on a subweb or single site not
necessarily on the entire server root.

by having the pages as .htm and the php code as I mentioned FrontPage will
leave it alone and you've still got access to all the FrontPage components
such as navigation, themes, templates, FrontPage includes, etc.

HTH

HTH

--
Chris Leeds,
Microsoft MVP FrontPage

The email address on this posting is a "black hole". I got tired of all the
spam.
Please feel free to contact me here:
http://nedp.net/contact/
 
Have you set FP to no modify HTML under Tools | Page Options / Authoring Options?

You can post your suggestion at:
http://register.microsoft.com/mswish/suggestion.asp

--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
WEBMASTER Resources(tm)

FrontPage Resources, WebCircle, MS KB Quick Links, etc.
==============================================
 
Thomas,
What is that add-in supposed to do? I installed it on my machine with fp 03
and all I could tell is that it added a button to the toolbar, nothing more.
In fairness I didn't read any "documentation" ;-).

--
Chris Leeds,
Microsoft MVP FrontPage

The email address on this posting is a "black hole". I got tired of all the
spam.
Please feel free to contact me here:
http://nedp.net/contact/
 
Chris,

I have no idea, as I don't work with PHP. However on the MS Download, right below the download is
link to get more details about the add-in directly from the author's website.

--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
WEBMASTER Resources(tm)

FrontPage Resources, WebCircle, MS KB Quick Links, etc.
==============================================
 
I just finished installing it and setting it up.

dosnt work for this issue - its because frontpage wont
let me save a file that it feels is incomplete in its
scripting.

Its complete, but frontpage (understanably) cant parse it
correctly. All i wanted to do is tell Frontpage
to "chill, just save".

I did find the page that allows me to make sudgestions -
which i did - and i will be getting as many people as
possible to post the same thing.

Hopefully, frontpage will one day have an option to let
the developer be in complete control if they want to.

Thank you all for your help! its greately appreciated!

Steven Haslam
-----Original Message-----
Chris,

I have no idea, as I don't work with PHP. However on the
MS Download, right below the download is
 
I have turned that option completely off - but its still
modifying the code.

Tools/Page Options/Authoring

there is nothing that says "Modify HTML" that i could
turn off, i set frontpage/sharepoint to None, and turned
off all the features below that screen too.

Thanks for the link though - i found it last night after
searching the MS office site.

Steven Haslam
 
honest, either put the php into the page using the insert/ web component/
advanced/ html or put it in <script> blocks (just like JavaScript but for
php), as further insurance leave them htm pages and rig the server to
process them through the php engine (I'll paste the instructions I sent to
my server admin if you like) it works very well. Like an nirvana!

--
Chris Leeds,
Microsoft MVP FrontPage

The email address on this posting is a "black hole". I got tired of all the
spam.
Please feel free to contact me here:
http://nedp.net/contact/
 
I have worked like that before, and i also know ways to
keep php code from being changed.

but the real issue is that i didnt write the site. The
gentleman who did did it very modularly - makin the site
some 300+ pages.

My issue is working with already written code - I was
hoping for a way to prevent having to go through every
page and change the code so its frontpage compliant.

If i am writing new code, not a problem because i know
what to avoid. I just dont want to have to change every
page's coding.

Thanks

Steven Haslam
 
The issue is not with FP changing code, it is with FP's support of PHP <? and ?>. Also the
recommendation on the Add-in download page is to modify the php.ini to use <% and %> instead of the
default <? and ?>. You can easily change these by doing a global search and replace.

As I stated, I code with ASP/VBScript and have never had FP change my code.


--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
WEBMASTER Resources(tm)

FrontPage Resources, WebCircle, MS KB Quick Links, etc.
==============================================
 
in that case, I'd probably turn on asp style tags, do a global find and
replace of <? to <% and ?> to %>. it'll be fairly fast and should keep
FrontPage's mits out of the mix.

HTH

--
Chris Leeds,
Microsoft MVP FrontPage

The email address on this posting is a "black hole". I got tired of all the
spam.
Please feel free to contact me here:
http://nedp.net/contact/
 
Back
Top