TemplateThis is the basic template for a treesong.org page. It consists of a PHP file, two quasi-HTML files, two style files, and two JavaScript files. First, let me explain the three main files of the group - the PHP file and the two quasi-HTML files. The file treesong.org/template/index.php is the simple solution that powers the whole site. When you access any directory on this site, that directory's index.php file goes to work. It tells the server to combine the navigation bar file at treesong.org/navigation.html with the current directory's front page. In the case of the template directory, that page is treesong.org/template/index.html. All subdirectories have a similarly named front page. PHP is one of many web design conventions that allows you to tell the server to combine two or more files into a single page. This allows you to "include" the familiar navigation bar on each page without resorting to frames or recreating the whole bar on every single page in the entire site. I have designed treesong.org this way for two reasons: so that users who dislike frames are happy, and so that search engines that can't understand frames will be able to index the site. Note that the files navigation.html and index.html are not "well-formed" HTML. They are incomplete; they don't have necessary tags like <HTML> and <BODY>. The PHP file has these tags, so I did not repeated them in each individual page. This means that technically speaking, each individual file is poorly formed. This is why I call them quasi-HTML documents. However, once all of the pieces are put together, you are viewing a well-formed HTML document. In addition to index.php, nagivation.html, and index.html, this document also uses two style files: treesong.org/style/1.css and treesong.org/style/banner.css. The first one tells your browser what the general style of the page should be - how the title at the top looks, how links look, how paragraphs look, etc. The second one tells your browser how the navigation bar should look. You may have noticed that viewing the navigation bar directly does not display it as a tidy menu. That's because banner.css uses a "banner" style to give the navigation menu its usual appearance and make it stay in one place while you scroll up and down the page. Finally, this page uses two JavaScript files to perform special functions on this page. The first one, treesong.org/script/updated.js, writes the date that this page was last modified. Another file, treesong.org/script/popup.js, does the work for the navigation bar's automatic pop-up menu. As you can see, even the simplest page at treesong.org is a complex work of art! I have explained all of this in order to make the design transparent and help out new web designers who like what they see. There are plenty of good tutorials on the Internet that explain PHP, JavaScript, and the other languages and tricks used in my page (such as XML for some data storage). For more information, try using a search engine such as google.com or dogpile.com to do a search for "php tutorial", "JavaScript tutorial," etc. You can also email me for more information. Thanks for listening, and I hope that you enjoy your time at treesong.org! |