Drew Wutka
DWUTKA at marlow.com
Fri May 2 20:21:08 CDT 2003
Okay, I am going to explain what's going on with this article in an email, don't have time right now to do it within the Word document. First of all, I appreciate the comments, it is definitely a learning experience. Next, this is a hack....it is something Microsoft has never published, and was a pain to figure out, but I did figure it out. That is the reason for the term 'trick', because this is most definitely a trick, not something microsoft had in mind for design. Let me explain what is going on, so you understand the logic behind this whole thing. FrontPage is a web page editor. Web pages are just HTML, so you can just use Notepad. Because of that, FP needs features that are more difficult to perform by hand, so that it sells. On such feature is it's Navigation (which would be a noun, just like VBE, it's a component of FP, which makes it an object.). The navigation is pretty simple to use. When you are building a site within FrontPage, you can simply drag your pages into the Navigation structure, and it keeps track of it. It keeps track of it WITHIN the structure.cnf file (for that particular site.....so if it is a local site, or you are publishing the site without FP extensions, then the structure.cnf is going to be on your local machine....if you are using an IIS server (which I think should be called just that.....since IIS is just a service ON a server.), and have FP extensions installed, then the structure.cnf is located on the IIS server itself. Now, FP uses the Navigation strictly for Navigation bars. These navigation bars are built by web bots, and use the data within structure.cnf. For example, if you go to www.marlow.com <http://www.marlow.com> , you'll see an example of a navigation bar. The 'links' on the home page a 'built' from FP's navigation. If I go into FrontPage and rearrange the navigation, the navigation bars automatically reflect the changes made. Pretty handy. Front page does let you programmatically mess with the Navigation stuff, however that's only when YOUR FP is open. If someone else makes a change to the site, code on your machine won't pick that up. Now, since FP uses structure.cnf to store the information on how the Navigation is structured, it was simply a matter of finding that (friggin <grin>) file. That was no easy matter. To begin with, it's a hidden file...really hidden, and if I didn't have direct access to our IIS server, I probably never would have found it. Next, the file extension is tricky. Even when I found the appropriate folder, I couldn't directly open the file, which makes it difficult to find out if a file is the right file or not. That's why I explained how to open it. I many people are 'experienced' with Notepad, however, I have NEVER seen a file act like this one, ever before. Typically, if you find a file, that has an extension that you want to open it with something else, then you can right click (or shift right click) and you'll get the 'Open With' option. This did NOT do this. .cnf is a special file extension that Windows Explorer uses a special shortcut menu for. It's odd. In reality, if the user has an IIS server, and FP extensions, they can just use the code...it's that simple. However, I figured it would make a better article if information on how to 'hack' or how it was 'hacked' was provided. There are other perks you can receive once you understand how FP's Navigation uses this file. For instance, the Navigation won't let you put the same page into it twice. However, with direct access to the file, and understanding how the file works, you CAN add the same page to the navigation structure as many times as you want. (This is really handy if you have an ASP page that you want shown in the navigation at several junctures......) So, in conclusion, the .asp code reads the structure.cnf file that is already located on the web server. (If it's a 'published' site, then the file needs to be uploaded to the root, which means that it's not entirely dynamic, since it requires that manual upload.) Assuming this is a complete M$ setup, with an IIS server, FP, etc. Just dropping the sitemap.asp file on the the websites root will provide a sitemap for that web site. The code automatically reads the file, and builds a structure containing links to all of the pages within the Navigation structure. Let me know if that changes any of your comments/suggestions (It should for some of the technical stuff). If you have more questions, let me know. Drew -----Original Message----- From: Susan Harkins [mailto:harkins at iglou.com] Sent: Friday, May 02, 2003 7:39 PM To: accessd at databaseadvisors.com Subject: Re: [AccessD] Access VB question One method is to disable the startup from with the database itself. ie, have it look for a specific flag in a record, or have it check for a specific command line argument, so that when it starts, the startup code checks that 'trigger', and then stops...effectively 'bypassing' the startup stuff. ========Exactly, but what I'm suggesting is that the problem may need a change of strategy.... some "trigger" within the db itself that knows when to reset the check -- such a "clue" may not exist. Susan H. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://databaseadvisors.com/pipermail/accessd/attachments/20030502/d57b4b08/attachment-0001.html>