Once again you'll notice another Spectacular, World-Class, Award-Winning User
Interface from us here at ASP 101! Granted most of the world shouldn't see this
app if you decide to use it, and the part they do see can be edited in any standard
html editor AS LONG AS YOU LEAVE OUR COMMENTS ALONE! Okay, now we've warned you, so
it's on your head if you start messing with our magical script and it does something
you weren't expecting!
Seriously though, anything you edit THAT ISN'T one of our comments should make it
through any updates you make using this system and even get added to new links you
add! That was one of the main goals of the sample! Just don't play with anything
between <!-- and --> or delete any of them! Ok now that we've beaten you
over the head with the warnings and no one in their right mind would mess with our
comments, lets discuss the script and why you SHOULDN'T TOUCH OUR COMMENTS!
Basically this script is done using two main ideas. First we use the
FileSystemObject in order to read and write the links file. If you're interested,
a simpler example can be found in the TextFiles sample.
While we're writing, we embed HTML comments to offset the data the script should
change and separate it from the formatting elements which you can freely edit in
any HTML or text editor. This gives us a way to open the file back up and change
a link or even add a new one without interfering with the formatting elements...
sort of! When you go to add a new item, the script looks at the formatting of the
last link on the current list and copies that to the new link! It seems to work
relatively well if you use tables, list items, or just a plain list. We're leaving
the testing with more complex formats up to you guys, but tables and lists take care
of the majority of the lists we've seen, so thats what we tested it with.
You can also feel free to just leave the comment field blank if you want, but the
HTML comments delimiting it, need to stay in the links file for everything to work!
Oh, and I should have mentioned this earlier, but you need to set the physical path
to your (properly formatted) links file in the constants area at the top of the
script. We recommend going to the sample links page and doing a File > Save As...
and using that as a starting point. Lastly you'll probably want to secure the
management page with a password or some sort of security so that you don't have
unauthorized people messing with your links! Good luck and let us know if you find
this to be a useful script or if you have any problems with it. That is, of course,
unless you ignored us and modified our comments!