Unix Accounts .classlist File Spreadsheet Help Web Template Archive Programs How to Ftp

How to set up your FANCY web site

This template contains the files for the "fancy" html site, and for the "basic" html site, which link via the noframes tag for people without browsers capable of displaying frames. The web pages are actually saved to disk in pieces, and are assembled when someone loads them from their browser. This is why the link files aren't actual html pages. You only need to make changes to the file for a specific link (Final.html, etc.). This way both sites are updated automatically, and the data section is seperate from the template.

 

Obtaining the FANCY web site

WARNING: The tar extraction does not check the presence of files. It will obliterate any files with the same name as the ones in it's archive. Be sure before you extract the files that there aren't any files of value that could be overwritten by the extraction method. See below for a list of the files within the tar package to know what could be erased.

Now you can see the web page on your browser at http://www.student.math.uwaterloo.ca/~courseAccountName

You can change the course title, the titles of the menus, and the links they contain easily... see the help section below.


Information/Help:

I want to change the course title
How do I edit the web pages?
How do I write HTML?
I want different links!
When the page is viewed on the internet, the browser comes up with "Forbidden". Why?

When the page is viewed on the internet, the images don't show up... only red boxes (or ripped paper). Why?
What is a linkfile?

Why aren't there HTML and BODY tags in the linkfiles?

How do I change the menu headers?
I want different pages of student marks for each section
How do you use pagelinks.dat?


The Package:

This package contains templates which are built in an unusual way, but ultimately provide a much simpler and more efficient design for the website. There are several things to be aware of.

  1. Every page is assembled by taking the "template" and "endtemp" files for a particular template, and inserting the proper "linkfile" inbetween.
  2. The menus and links actually reside in the pagelinks.dat file, and are loaded automatically by the templates.

You won't need to edit a mountain of files using this version because most of it loads automatically. Any changes to the information or data content of the site need to be made only to the appropriate "linkfile". For instance, if the midterm information needs to be updated, then simply edit Midterm.html in the html directory. All four template versions will automatically show the changes.

The html directory is where the html files can be found and edited. The template files are the pieces that go around the link files, and are found in the templates directory. The link files (Home.html, Outline.html, Assignments.html, etc.) go inbetween the template files, and should contain the information for the page. The only files that need to be edited to maintain this site are in the html directory.

The fancy web site has this collection of files: (blue areas are editable)

Basic.shtml Basic.shtml?linkname assembles the "Basic" site: template_b.shtml + linkname.(s)html +endtemp_b.html
Main.shtml Main.shtml?linkname assembles the "Fancy" mainframe: template_fa.html + linkname.(s)html + endtemp_fa.html
index.html Loads the "Fancy" web site
updatehtml Type ./updatehtml after extracting the files from the tar package. This will automatically update the files to the new course account. This file gets deleted after it is executed.
updatehtml.pl This is a PERL script used by the updatehtml script to update your new files. It gets deleted as well.
images <directory> Where the images for the site are kept
MathHome.gif
The Math Home image that appears on the "Fancy" site
MathHome2.gif
The red circle with transparent lettering... is the Math Home image loaded when the mouse passes over
universalbg
The background for the "Basic" web site
universalbg2
An alternative background for the "Basic" web site provided in this package
uwlogowhite.gif
The UW logo that appears in the "Fancy" web site; it has white lettering
uwlogo.gif
The UW logo that appears in the top left-hand corner of the web sites
html <directory> This directory is where the html pages are stored. This is where you do your editing.
AssignmentSolutions.html
This is the "linkfile" that gets loaded by clicking the AssignmentSolutions link
Assignments.html
This is the "linkfile" that gets loaded by clicking the Assignments link
Final.html
This is the "linkfile" that gets loaded by clicking the Final link
Home.html
This is the "linkfile" that gets loaded by clicking the Home link
Links.html
This is the "linkfile" that gets loaded by clicking the Links link
Marks01.shtml
This is the "linkfile" that gets loaded by clicking the Marks01 link. It ends in .shtml so you can include CGI scripts for automatic student Marks tables.
Marks02.shtml
This is the "linkfile" that gets loaded by clicking the Marks02 link. It ends in .shtml so you can include CGI scripts for automatic student Marks tables.
Marks03.shtml
This is the "linkfile" that gets loaded by clicking the Marks03 link. It ends in .shtml so you can include CGI scripts for automatic student Marks tables.
Marks04.shtml
This is the "linkfile" that gets loaded by clicking the Marks04 link. It ends in .shtml so you can include CGI scripts for automatic student Marks tables.
Marks05.shtml
This is the "linkfile" that gets loaded by clicking the Marks05 link. It ends in .shtml so you can include CGI scripts for automatic student Marks tables.
Marks06.shtml
This is the "linkfile" that gets loaded by clicking the Marks06 link. It ends in .shtml so you can include CGI scripts for automatic student Marks tables.
Marks07.shtml
This is the "linkfile" that gets loaded by clicking the Marks07 link. It ends in .shtml so you can include CGI scripts for automatic student Marks tables.
Marks08.shtml
This is the "linkfile" that gets loaded by clicking the Marks08 link. It ends in .shtml so you can include CGI scripts for automatic student Marks tables.
Marks09.shtml
This is the "linkfile" that gets loaded by clicking the Marks09 link. It ends in .shtml so you can include CGI scripts for automatic student Marks tables.
Marks10.shtml
This is the "linkfile" that gets loaded by clicking the Marks10 link. It ends in .shtml so you can include CGI scripts for automatic student Marks tables.
MarksJ01.shtml
This is the "linkfile" that gets loaded by clicking the MarksJ01 link. It ends in .shtml so you can include CGI scripts for automatic student Marks tables.
Midterm.html
This is the "linkfile" that gets loaded by clicking the Midterm link
Outline.html
This is the "linkfile" that gets loaded by clicking the Outline link
Review.html
This is the "linkfile" that gets loaded by clicking the Review link
pagelinks.dat
This file contains the title of the site, menus, and the links to be used in those menus. CGI Scripts have been written to automatically include these links into the various templates provided in each package.
templates <directory> This is where the templates and menu pages are kept
Menu1b.shtml
This file is called for the basic sites when menu#1 is chosen: This page will create the links for that menu on one page
Menu1m.shtml
This file is called for the frames sites when menu#1 is chosen: This page will create the links for that menu on one page
Menu2b.shtml
This file is called for the basic sites when menu#2 is chosen: This page will create the links for that menu on one page
Menu2m.shtml
This file is called for the frames sites when menu#2 is chosen: This page will create the links for that menu on one page
Menu3b.shtml
This file is called for the basic sites when menu#3 is chosen: This page will create the links for that menu on one page
Menu3m.shtml
This file is called for the frames sites when menu#3 is chosen: This page will create the links for that menu on one page
Menu4b.shtml
This file is called for the basic sites when menu#4 is chosen: This page will create the links for that menu on one page
Menu4m.shtml
This file is called for the frames sites when menu#4 is chosen: This page will create the links for that menu on one page
titleframe.shtml
This is the html file for the title frame with the course title for the "Fancy" site
sideframe.shtml
This is the html file containing the links for the side of the "Fancy" web pages
endtemp_fa.html
The end wrapper for the "Fancy" mainframe pages
endtemp_b.html
The end wrapper for the "Basic" website
template_fa.html
The lead wrapper for the "Fancy" website
template_b.shtml
The lead wrapper for the "Basic" website
cgi-bin <directory> This directory is required to run CGI scripts
blinks.cgi
This script will extract menu/link data from pagelinks.dat and return suitable HTML code for a menu#b.shtml file
fancy.cgi
This script will extract menu/link data from pagelinks.dat and return suitable HTML code for a fancy template
mlinks.cgi
This script will extract menu/link data from pagelinks.dat and return suitable HTML code for a menu#m.shtml file
table.cgi
This is a CGI script that will automatically create a table of student marks. For more information, click here
basic.cgi
This script will extract menu/link data from pagelinks.dat and return suitable HTML code for an basic template
marks <directory> A place to store all of the student marks tables to be viewed on the web page. This makes it easier to separate the legitimate spreadsheet files from the displayable text based tables. You may edit the contents of this folder.
table.txt
This contains a simple file containing a delimited text table, which is used as input to table.cgi to create an HTML table automatically

Information/Help:


I want to change the course title

That can be done easily.

  1. Telnet to the course account (or use an x-terminal) (if not already there)
  2. Type "cd public_html/html" (if not already there)
  3. Type "pico pagelinks.dat"
  4. There will be a line reading
    //course title
    Change the line after it to reflect the proper course.
  5. Type [CRTL]-X to exit, type [y] to save changes, and [ENTER] to keep the same filename.

How do I edit the web pages?

  1. Telnet to the course account (or use an x-terminal) (unless you're already connected)
  2. Type "cd public_html/html" (unless you're already there)
  3. Type "pico filename", where filename is the name of the file you want to edit.
  4. When you are finished making changes, type [CTRL]-X to exit pico, [y] to save changes, and [ENTER] to keep the same filename.

How do I write HTML?

If you don't know anything about html, try visiting htmlgoodies.earthweb.com. They have a short primer section which teaches basic HTML that you can then use in your web site.


I want different links!

The links can be edited easily by editing the pagelinks.dat file in the public_html/html directory.

  1. Telnet to the course account (or use an x-terminal) (unless you're already there)
  2. Type "cd public_html/html" to get to the proper directory (unless you're already there)
  3. Type "pico pagelinks.dat"
  4. Find the lines reading //menu# title , //menu# links and //end
  5. In between //menu# links and //end , separated by commas, put:
    one link per line.
  6. Type [CTRL]-X to exit pico, type [y] to save changes, and [ENTER] to keep the same filename

Remember, for the new link to work, there must be a link file in the html directory. Copy a link using the command "cp otherfilename newfilename", and make the changes you want on the newfilename in pico.


When the page is viewed on the internet, the browser comes up with "Forbidden". Why?

The permissions probably aren't set. Try going into the public_html directory on the course account ("cd public_html") and type "chmod o+r *". Now EVERYTHING in the public_html directory is viewable on the internet. If that doesn't work, try the same thing in the html directory (cd "html").


When the page is viewed on the internet, the images don't show up... only red boxes (or ripped paper). Why?

The permissions for the images probably aren't set. Go to the public_html/images directory and type "chmod o+r *". That should solve the problem.


What is a linkfile?

A linkfile is just a term I have been using to describe the files associated with the various links on the pages. For instance, Home.html would be a "linkfile" because it is the file loaded when you click on the "Home" link.


Why aren't there HTML and BODY tags in the linkfiles?

The linkfiles are just pieces of an html file. When a page is loaded, it is constructed by adding the template file and the linkfile to the endtemplate file. That way, no matter what page is being viewed, they will all have the same template. If you want to make changes to the template, all you have to do is alter template.html, instead of the header of all the linkfiles.


How do I change the menu headers?

All you need to do is edit the pagelinks.dat file.

  1. Telnet to the course account (or use an x-terminal) (unless you're already there)
  2. Type "cd public_html/html" to get to the proper directory (unless you're already there)
  3. Type "pico pagelinks.dat"
  4. Find the lines reading //menu# title , //menu# links and //end
  5. Change the line below the //menu# title to the menu name you want.
    Note: The Frames and Basic versions do not use a menu system. They will show one link with the menu name pointing to a page containing the menu links. If you want the links of a menu to show up down the side of the page instead of on a separate page, put an asterisk (*) after the menu title.
  6. Type [CTRL]-X to exit pico, [y] to save changes, and [ENTER] to use the same filename.

To change the links produced by the menus, click here


I want different pages of student marks for each section

  1. In Marks.shtml, provide links to a file for each section. Marks01.shtml for section 01, Marks02.shtml for section 02, etc.
  2. Create those files and put the student marks tables for the proper section in those files

There are programs designed to automate the creation and inclusion of student marks tables in html files. Click here for more information


Questions? Concerns? Write to me at
dwashton@student.math