Customizing the Template
The family/personal website template shown in Figure 3.1 provides bare-bone web pages that you can easily add to and customize to create your own unique family/personal website. If you like the look and feel of the template, all that's left to do is to customize the template's content, replacing the current text with the text pertinent to you and your family, and the image in the upper-left corner with an image of your own choosing.
"When working with the template, you may find that you want to customize certain aspects... Fortunately, Composer makes customizing the template quick, fun, and easy."
Recall that to customize a template you need to copy the template files from the book's accompanying CD to your computer's hard drive. The "Building a Website from a Template" section in Chapter 2, "Creating a Website," provides more details on this process.
When working with the template, you may find that you want to customize certain aspects. For example, you might want to change the template's font, or alter the text or background colors. You might want to add additional web pages to the template, such as a web page that lists important dates (anniversaries, birthdays, and so on). You might want to remove pages from the template; perhaps you don't want a favorite recipes page.
Fortunately, Composer makes customizing the template in any of these ways quick, fun, and easy. In this section, we'll be examining a myriad of ways to customize your template. When working with the template files, keep the following two things in mind:
Composer is like any other word processor. If you want to customize the page by centering some text, for example, simply select the text to center and click on the Center icon in the toolbar, just like you would to center text with Microsoft Word.
Have fun customizing the templates, and don't be afraid to experiment! Keep in mind that since you're working with the template files on your computer's hard drive, no matter what you do, you can't irreparably screw up the template. There will always be a pristine copy of the website's template files on the book's CD that you can recopy to your computer should the need arise.
With that, it's time to get started examining how to use Composer to customize the family/personal website template!
Changing the Upper-Left Image
Each page in the family/personal website contains an image in the upper-left corner of my dog, Sam. You are invited to add your own image here, such as a picture of yourself, your family, or your family's pet. To replace the picture of Sam with a picture of your own, you'll need to have the picture on your computer's hard drive. In the "Customizing the Family Pictures Page" section, you'll learn how to get pictures of yourself or family onto your computer, so that you can add them to your website's pages.
To customize the upper-left image, first copy the image you want to replace it with into the same folder that you copied the website template files to. Next, launch Composer if you have not already done so. (Recall that this involves starting the Mozilla Browser, and then going to the Window menu and choosing the Composer option.) Next, open the template's home page file, index.html, in Composer. This is accomplished by either clicking the Open icon in the toolbar or by going to the File menu and selecting the Open File menu option.
Once you have opened the index.html page in Composer, your screen should look similar to Figure 3.2.
Figure 3.2 The index.html file has been opened with Composer.
To change the image of Sam to an image of your own, you'll need to open the Image Properties dialog box for the image. This can be done in one of a number of ways: by right-clicking on the image and selecting the Image Properties menu option; by double-clicking the image; or by single-clicking the image and then clicking on the Image icon in the toolbar. Using any of these approaches will display the Image Properties dialog box (see Figure 3.3), from which you can customize the information about the displayed image.
The next section, "Specifying Image Properties," steps through the four tabs in the Image Properties dialog box and discusses how to replace the image of Sam with an image of your own. Keep in mind that you'll need to replace the image of Sam with your own image for each web page in the family/personal website template.
Great Community Site
If you're going to have a community website, then you have to tell people how to participate in your community. This site does a great job of telling visitors how they can interact with the rest of the community through blogs, discussion forums, newsgroups, and authoring articles.
If you click around their website, you'll find their discussion forum page that offers around 50 discussions. So how do you get a discussion page like that one? If you're reading this book, the best idea is to purchase discussion software from a company that has done all of the programming for you. VBulletin (http://www.vbulletin.com) is a pretty good discussion software that isn't too expensive$85 annually for one server.
Figure 3.3 Customize the image from the Image Properties dialog box.
The Image Properties dialog box contains four tabs: Location, Dimensions, Appearance, and Link. These tabs contain settings to customize the selected image's properties. Let's look at each of these tabs one at a time.
The Location Tab
The Location tab, shown in Figure 3.3, allows you to specify the file to display. To change the upper-left image from one of my dog to one of your own, click on the Choose File button and select the image you want to display. Upon doing so, a small preview of the image selected will appear in the lower left corner of the Image Properties dialog box.
Make sure that the image file you choose exists in the same folder as the template web page file. That is, if the image file resides in a different directory, first copy it to the same directory where you've saved the web page template files. Too, make sure that the URL is relative to page location check box remains checked.
We'll discuss why the folder that the image file exists in is important and why the "URL is relative to page location" check box must be checked in the "Publishing Your Family/Personal Website" section.
Next, from the Location tab, you can set the Alternate text for the image. This is the text that is displayed in the image's place for those visitors who are using text-only browsers or who have configured their browsers to not display images. Realistically, very few web surfers fall into this category, so feel free to simply not provide any alternate text. If you decide not to provide alternate text, be sure to select the Don't use alternate text radio button.
If you don't provide alternate text and leave the Alternate text radio button selected, you will be shown a warning when you click the Image Properties dialog box's OK button.
The Dimensions Tab
The next tab, Dimensions, allows you to customize the width and height of the image. As Figure 3.4 shows, the Dimensions tab has two radio buttons: Actual Size and Custom Size. If you leave Actual Size selected, the image will be displayed in its actual size. If you click Custom Size, you can specify the image size in either pixels or as a percentage of the browser's window.
Figure 3.4 The image's size can be configured in the Dimensions tab.
The picture of Sam is scaled to a width of 170 pixels and a height of 166 pixels. As shown in the Image Preview section at the bottom of the dialog box in Figure 3.4, the actual image size is 321 pixels by 313 pixels.
Oftentimes an image will be resized so that it fits nicely on a page. The full-sized image of Sam is too large to fit nicely in the web page, hence it is scaled down to 170 by 166. When scaling images yourself, make sure to check the Constrain check box. This check box, if checked, makes sure that the ratio between the resized width and height remains the same as the original image's width and height ratio. By leaving this check box checked you ensure that resizing your image won't result in an image that is squished too fat or too thin.
When adding your own image, scale it so that it is at least 166 high. The family/personal website was designed to display an image precisely 166 pixels high. If you make the image shorter than 166 pixels, there will be whitespace beneath the image. When adding your own image, I would recommend that you
Select the Custom Size radio button.
Check the Constrain check box.
Enter 166 as the height.
Realize that sizing the image smaller than its original size in the Dimensions tab only specifies to the browser to display the image as a certain size. Specifying a smaller size than the original does not reduce the image's file size. If you want to make the image a smaller file size, you need to use the resizing techniques discussed in the section "Resizing Digital Images," which can be found in the Bonus Chapter.
The Appearances Tab
The Appearances tab (shown in Figure 3.5) allows you to configure how the image will appear within text. The Spacing section lets you specify how much spacing should appear between the left and right and top and bottom of the image and the text around the image. The Solid Border text box permits you to specify whether the image should have a border and, if so, how many pixels wide it should be.
Additionally, you can choose how to have the text aligned with the image. You can have the following text appear at the bottom of the image, the center, or the top. Alternatively, you can have the image flow within the text on the left or right.
For the family/personal website, I'd recommend not changing the values in the Appearances tab, as the template was designed to have no spacing around the image.
Figure 3.5 The Appearances tab specifies how the text and image coexist.
The Link Tab
The final tab, the Link tab, allows you to specify a hyperlink for the image. That is, you can indicate that when the image is clicked, the user be whisked to a particular URL. A screenshot of the Link tab is shown in Figure 3.6. See Table 3.1 for a summary of the Image Properties dialog box's tabs.
Figure 3.6 Use the Link tab to link the image to a URL.
Table 3.1 A Summary of the Image Properties Dialog Box's Tabs
Choose the image to display from the Location tab. You can provide a Tooltip, which will be displayed when a visitor hovers her mouse over the image. Also, the Location tab allows you to specify an Alternate text, which is displayed in place of the image for those visitors whose browsers don't support images.
From the Dimensions tab you can indicate a custom height and width for the image.
The Appearance tab allows you to indicate the top, bottom, left, and right spacing around the image (if any), along with how text flows around the image.
You can configure your image so that when a visitor clicks it he is whisked to a different web page. If you want to enable this behavior, specify the URL to send the user in the Link tab.
Looking for a Web Hosting SiteShop Around
There are some great sites out there for hosting your website. We found SecureWebs to have a range of services and an online catalog of features. Shop around for the best deal and the types of services that you want. You may only need a small amount of space for a family or hobby website, which you can usually get from your Internet provider. Most accounts offer FTP access and a 50100 MB of space for your own little website. But if you want to create a larger website, especially one that involves selling products or services, you might want to let a hosting site do most of the work for you. These sites take care of mass emailing, shopping carts, online catalogs, and newsletters for you. They also have security for your site, which can be difficult to program by yourself if you're a beginner. They have firewalls to prevent hackers from destroying your website as well as SSL (Secure Sockets Layer) that allows your visitors to perform transactions in a secure environment.
Removing the Image Altogether
While some readers will like having a picture shown on each page, others might not want a picture shown at all. Fortunately, Composer makes it a cinch to remove the image from the upper-left corner. To strike the image from the web page altogether, simply right-click on the image and choose the Delete menu option.
Changing the Font
The text in the web page templates is displayed using a Verdana font. You can easily change the font for any text in Composer with the following steps:
Select the text whose font you want to change. The easiest way to do this is to place the mouse at the beginning of the text you want to select, and, holding down the mouse button, drag the mouse cursor until the text you want to modify is completely selected.
With the text selected, go to the Format menu. Choose the Font menu option and then pick a font from the list.
You can also change other text propertiessuch as the text color and stylethrough the Format menu. For example, imagine that you wanted to change the foreground color of the header text for a web page. (The header text in the home page is "Welcome to the Mitchell Family Website!" and is displayed in a turquoise color.) To change this text's foreground color to, say, red, you'd first select the text and then go to the Format menu and choose the Text Color menu option. This will display the Text Color dialog box (see Figure 3.7), from which you can select a new foreground color.
Figure 3.7 Pick the text's foreground color from the Text Color dialog box.
To make the font bold, italic, or underlined, first select the text and then go to the Format menu's Text Style menu. From there you can see the various formatting options.
To make the selected text bold, underline, or italic, you can also click on the appropriate B, I, or U icons in the toolbar.
Adding and Removing Pages from the Template
The family/personal website template comes with four web pages: a home page, a family pictures page, a recent events page, and a favorite recipes page. As we discussed earlier, though, you might very well want to add additional pages, or remove some of the pre-packaged pages.
Removing a page from the site simply entails removing the links from the other web pages to the page you wish to snip from the site. For example, imagine that you didn't want to have a favorite recipes page on your family/personal website. To accomplish this, you'd need to open the home page, family pictures page, and recent events page in Composer, and remove the link at the top to the Recent Events page. Removing the link is as simple as selecting the link text and hitting Delete.
Keep in mind that you will need to remove all links to the page you want to remove. Be sure to open all other pages in Composer and remove any links you find pointing to the page to be removed.
To add a new page to the template, you need to create a new web page whose look and feel mimics that of the other pages in the template. Creating a new web page using the template can be done in one of two ways:
By creating a new web page in Composer, and then copying and pasting the entire contents of a template page to the new page, or
By going to the File menu and choosing the Save As menu option, which has the effect of saving an existing template web page with a different filename.
Once you have created the new web page and inherited the template's look and feel, you can customize the page's content as needed. For example, if you added an additional page that listed important dates for your family, the content for this page would include the dates and their meanings (anniversaries, birthdays, graduations, and so on). After you have created the content for the new page, save the web page by going to the File menu and choosing the Save menu option.
Once you have created and saved the new page, the next step is to add a link from all other web pages in the site to the new page. As Figure 3.1 showed, each page has a list of links along the top. You'll need to add a link up top to the new page you created.
To add a link, start by clicking your mouse where you want the link to appear, perhaps between the Family Pictures and Recent Events links. Next, type in the text for the link, such as "Important Dates", followed by a period, which is used as a separator between each link.
The final step is to link the text you just entered to the new web page you created. To accomplish this, select the text you just added, go to the Insert menu, and choose the Link menu option. This will display the Link Properties dialog box, shown in Figure 3.8.
Figure 3.8 Select the page to link to using the Choose File button.
From the Link Properties dialog box, choose the file you want the user whisked to when they click the link. Since this link needs to take the user to the newly created page, click the Choose File button and select the page you added just a moment ago. Finally, click the OK button to create a hyperlink to the newly created page.
Finding Add-ons for Your Site
Cnet provides Downloads.com, which offers software that you can download, sometimes free of charge. The greatest thing about going to Cnet's site is that users rate the downloads, and you can view how many people have downloaded each program. You can find the most popular downloads, the top-rated downloads, and new releases. Why spend hours programming something for your website when you can download the component that you need? Here is a sampling of the kinds of tools you can find:
1 Cool Password ToolAdds password protection to your site or a single page on your site without any program knowledge required.
Magic GalleryHelps you create an online photo gallery.
DHTML Menu BuilderCreates DHTML drop-down menus for your site without you having to write the scripts.
Web CEO Free EditionGet live traffic analysis of more than 160 reports with full coverage of your visitors' activity and e-commerce analysis.
Web Menus Studio 2005Create professional-looking menus.
Forms To GoCreate custom scripts in PHP, ASP, or Perl to send the field values of your HTML forms thru email.
Don't forget to add a link to the newly created page in all of the web pages in the site. If there are no links to the newly created page, then your visitors won't be able to get to the new page unless they manually enter the URL of the page in their browser's Address bar.