Attaching Web Sites

This is a somewhat advanced feature. You might want to skip this section entirely if you are completely new to Manhattan. The process described in this section is also covered in more detail in Using WinZip to package web sites

What's the problem?

As mentioned above, if you want to make a web site that is already published on the Internet available to others in your classroom, you can simply type the full address (correctly called the 'URL' for Uniform Resource Locator) into any Manhattan message, like this:

Hey everybody, check out this site:
   http://www.linux.org
more about the Linux operating system!

Manhattan will convert a valid URL typed into a message into a live link that people can click on and visit. You must be careful to include the 'http://' part, and to make sure you leave a blank before and after the address.

Also, teachers (but not students) can make already published sites on the Internet available to their students by posting the address in Manhattan's Internet Resources module, which is described in The Internet Resources Module

But say you have created a web page you don't want to publish on a web server, but that you want to make available to others in your Manhattan classroom. If the web page consists of a single file you can simply attach the HTML file to any Manhattan message, just as you would any other type of file. When someone clicks on an attached HTML file, the file will be loaded into his or her browser. In fact, attaching standalone HTML files is a good way to post information in Manhattan because unlike for word processing files, special software in not needed to view the file.

Are you OK with that? Good.

Now suppose instead of a standalone HTML file, you have what we'll call a web site on your computer's hard disk. Your web site may consist of many files, including an HTML file designated as the starting point, or 'home' page of your site. Besides the home HTML file, there might be any number of image files, other HTML files, sound files, etc. Consider as a tiny example, a web site which consists of three files: the home page mypage.html, an image picture.gif, and another HTML file another.html.

You can not simply attach all of the required files to a Manhattan message as is done in this screen shot of the Attachments area of a message composition form:

If you did, the files would appear as three separate attachments, and not as a single web site. That's the problem.

The solution

The solution is to put a check in that little checkbox with all of those annoying little words next to it:

Let's take a close look at those words to see what happens when the box is checked.

I'm attaching a web site. This tells Manhattan that the files being attached are not to be treated as separate, isolated files. Instead Manhattan will treat them as related documents which comprise a web site.

The first file below ... Notice! This is important! For normal file attachments, it doesn't matter which of the fields you use. However, when you attach a web site to a Manhattan message, the first file attachment has special meaning.

...is either a 'zip' file containing all of the local files for a web site (and so it's the only file I've attached),... This doesn't apply in this case - we'll talk about 'zip' files later.

... or is the 'home' page for a web site (in which case I've also attached all of the other files required by the site.) That's exactly what we want! The first file, 'mypage.html' is the 'home' page for our web site, and we've used the other fields to attach - in any order - the other files required by the site.

So to attach the three files as a web site, all you've got to do is put the 'home' HTML file in the first field, put the other required files in the other attachment fields in any order, and put a check in the little box.

When reading the message, recipients can click on a button

to view your web site in all of its glory. In effect, Manhattan's attach-a-web-site feature allows you to publish a web site to your Manhattan classroom.

Zip files

There have long been utilities available that can compress (make smaller) and archive (combine two or more files into one) files. There are different standards for file compression and archiving. One standard that is particularly popular with Windows computing is the 'zip' format. Perhaps the most popular Windows utility for creating zip files is WinZip. While a non-expiring trial version of WinZip can be downloaded from the Internet at http://www.winzip.com , the software is NOT free. You may want to search the Internet for free alternatives to WinZip.

When attaching a web site to a Manhattan message, you can either attach all of the individual files required for the site as in the above example, or you can first zip all of the required files and attach that one zip file to the message. The advantages of attaching a zip file include:

You'll have just one file to keep track of on your hard disk for course materials you'll use over again.

When attaching a web site as a zip file, the zip file must go in that special first file attachment box. The file can be called anything you wish, but it must end in .zip. If Manhattan finds that you've checked the "I'm attaching a web site." box, and there's a zip file in the first attachment field, it will insist that all of the other file attachment fields be empty. (Again, carefully read the fine print next to the check box.)

After unzipping your zip file, how does Manhattan know which file is your 'home' HTML file? Manhattan goes through this checklist:

What might go wrong

The most likely problem you'll have with posting your web sites will have to do with the fact that the Manhattan server is case sensitive and your Windows computer sort of straddles the fence when it comes to this issue.

Case sensitivity refers to whether or not it matters if a file's name is in UPPERCASE or lowercase letters. Manhattan runs under a version of Unix which is definitely case sensitive. The files Picture.gif and picture.gif are entirely different. Windows computers preserve case (so you can save a file as PicTuRe.gif) but ignore case completely when an application refers to the file (so that you can open the same file as PICTURE.gIf or picture.gif).

When the links in your attached web page don't work correctly, the problem is often that your HTML code referred to the file in one way, e.g. <img src="PICTURE.GIF">, but the file is saved on your hard drive in another way, e.g. "Picture.gif". You would have the same problem if you wanted to ever publish your web site directly on any Unix web server.

It is also possible that the program you used to 'zip' the files is not case-savvy or doesn't know how to properly handle Windows long file names. Try using WinZip.

While Unix file names can be very long and have spaces, it's best to adopt a simpler convention when designing portable web sites. It's a good practice to use all lowercase letters and to use underscores _ instead of spaces in your file names.