PHP and FrontPage2003<

liunx

Guest
I've never used FrontPage 2003, or any FrontPage software, so please understand any stupidity in this post. I am going to explain the ideal scenario, and someone tell me if it is possible, and any suggestions/tips on making it happen.

-I make a template (assuming I can make such things in FrontPage). For exemplification purposes, let's say this template, on line 11, has <h1>Title Goes Here</h1>.

-My client, who does not know code, but uses the FrontPage 2003 interface to design websites, opens this template. He changes the "Title Goes Here" to whatever his own title is going to be. And he publishes it to wherever.

-On this "wherever," there is a separate PHP file. The PHP file goes "Read line 11 from that htm file, strip off the <h1> and </h1>, and return the remainder."

-Now the PHP file successfully has the title of the document to be used in other includes, etc.

There are a few things I'm unsure of. This guy uses only the interface. He will only edit the text inside this template that I plan to make... but is there a high risk of extra lines being added, etc? Because then the <h1></h1> won't be on line 11 anymore, they'll be somewhere else. And this whole code won't work.

Also, is it even possible to read the source of an htm file and search for line 11, etc?

Now, something would get rid of the first issue I addressed: what if I did something like <h1 class="blah">Title Goes Here</h1>... then do you think I can script PHP to search for such a class and take it from there?

... sorry if this question wasn't very eloquently said. it's kind of hard to explain. i'm making a website for this guy but he needs to be able to update it. so i'm trying to let him use frontpage, and have my php scripts take out information from his published files, incorporating it into my own website design that i made for him. i guess i'll have to get frontpage sometime soon...

thanksOriginally posted by pyrexyn


Also, is it even possible to read the source of an htm file and search for line 11, etc?


yes and you should be doing it this way anyway.

you need to use regular expressions and just search for what you want instead of worrying on which line it is on.

there was a post not to long ago, a day or so, that did just this exact thing.ah, sorry. i'll go look for the post. thanks. i assume its in this php forum somewhere...<!-- m --><a class="postlink" href="http://www.htmlforums.com/showthread.php?s=&threadid=42767">http://www.htmlforums.com/showthread.ph ... adid=42767</a><!-- m -->
<!-- m --><a class="postlink" href="http://www.htmlforums.com/showthread.php?s=&threadid=42667">http://www.htmlforums.com/showthread.ph ... adid=42667</a><!-- m -->

I looked at these two. But they don't really help me. I think the second one is what you meant scoutt.

This whole snoopy-link thing I'm confused at... I don't see what to do...nope, neither one of those.

<!-- m --><a class="postlink" href="http://www.htmlforums.com/showthread.php?s=&threadid=42765">http://www.htmlforums.com/showthread.ph ... adid=42765</a><!-- m -->

that is the one.
 
Back
Top