Read Building Web Sites All-in-One For Dummies® Online
Authors: Claudia Snell
And now is more PHP code. Basically, the code
$i++
is increasing the value of the variable
$i
by a value of
1
. The
++
shortcut is code to increase a value by
1
. The closing curly bracket (
}
) signifies the end of the instructions included in the
while
loop. The loop continues until all of the records are displayed.
Chapter 5: Additional Site Interactivity
In This Chapter
Considering adding a blog
Letting users speak: Message boards and wikis
Setting up automatic notifications: RSS feeds
Keeping in touch with e-mail
It seems as though interactivity is the buzzword when it comes to Web sites. If you design sites that aren't interactive, you're not a happening designer. And it's a well-known fact that happening designers get most of the work, and non-happening designers run the risk of being has-beens. If you've read previous chapters of this minibook, you have an idea of the type of interactivity you can create when you design pages for your clients. But wait; there's more! In fact, a whole lot more. This chapter shows you other forms of interactivity you can add to your pages. In fact, it shows you a whole lot of interactivity in this chapter.
Engaging Visitors with an Online Journal (Blog)
Blogs have become the hottest thing since sliced bread. It seems as though everyone and his little sister has a blog these days. Some of them are vanity blogs, and others contain useful information or points of view. Figure 5-1 shows a blog that contains useful information about digital photography. The creators are two best-selling authors of books on digital photography and Photoshop. The blog is interactive in that readers can leave comments on blog posts.
Figure 5-1:
Use blogs to dispense useful information.
Savvy businesspeople also use blogs. Because the information in a blog is updated frequently, Web sites with blogs are ranked highly by search engines. If a commercial blog site is optimized for search engines, it attracts traffic that might include potential clients.
You can download two popular â and free â blog applications. One is b2evolution. You can find information about b2evolution and download the application at
http://b2evolution.net
. WordPress is another popular blog application. You can find information about WordPress and download the application at
http://wordpress.org
. You can customize both applications to suit a Web site.
Blogs are also ideal venues for distributing podcasts. Developers like to create plug-ins for blog applications. For example, the PodPress plug-in for the WordPress blog makes posting a video or audio podcast child's play. The plug-in enables the site owners to view statistics, such as how many times an episode has been downloaded and played. It also features a player. Figure 5-2 shows a podcast being hosted with a WordPress blog.
Figure 5-2:
Blogs and podcasts reside happily forever after.
The aforementioned blog applications use PHP and a MySQL database. Both applications enable users to post and manage blogs using a browser-based interface. Before you add one of the aforementioned blog applications to your site (or to your client's site), make sure your server has the proper version of PHP and MySQL at your disposal. For more information on blogs, see Book IX, Chapter 1.
Initiating Online Conversations: Forums and Message Boards
If your client has a product or service that includes a user base that likes to exchange information about topics related to the product or service, an online forum or a bulletin board is an ideal addition to the main Web site. Forums give users a chance to interact with each other. Someone on your client's staff moderates the bulletin board. The moderator can add his two cents to a forum thread. Forums can create customer loyalty. Forums also turn visitors into potential customers.
A
forum
or
bulletin board
is an application that enables visitors to post information. The information in a bulletin board changes; therefore, the page needs to be generated on the fly when someone visits the site. Most bulletin board and forum applications use ASP or PHP code to generate the page and pluck the required information from a database. The application writes new forum posts to the database, which also contains subscriber information and so on. One forum application that you can download free is phpBB. The application uses PHP code combined with a MySQL database. For more information about phpBB and to download the application, visit
www.phpbb.com
.
The forum application enables the administrator to determine whether guests can make a post or whether only registered members can post messages in the forum. The administrator can subdivide a forum site into forums that pertain to related topics. The forum site administrator manages the forums. The administrator also grants rights to visitors of the forum site, which determine who can view posts, write posts, moderate forums, and so on.
When someone posts a new topic on a bulletin board, other visitors (or registrants, depending on the permissions allowed by the forum administrator) can respond to the post. The topic and replies are
threads.
The information in the forums is stored in a database on the server. Ken Milburn, a photographer and author, and Doug recently used phpBB to create a forum for digital photography. Figure 5-3 shows the home page of the forum.
The forum site in Figure 5-3 is divided into several interest areas, including forum areas devoted to Photoshop, Painter, and specific brands of digital cameras. Site visitors can view other visitors' comments in a topic area by clicking the appropriate link on the home page. Each topic area lists the most recent posts. (See Figure 5-4.) A forum page generated with the phpBB application shows a visitor what rights she has in a list at the bottom of the page.
Another nice feature of a forum using the phpBB application is the ease of administration. After logging in, an administrator can manage every aspect of the forum using the Administration panel. From within the panel, the administrator can assign rights to user ranks, create new user ranks, delete users, manage and create forums, and so on. Figure 5-5 shows the Forum Administration section of the Administration panel.
Figure 5-3:
A phpBB forum for digital photo-graphers.
Figure 5-4:
A topic area in a phpBB forum.
Figure 5-5:
Admini-stering a phpBB forum.
Establishing an Online Community: A Wiki
A
wiki
(pronounced just like it looks,
WICK-ee
) is an online community of users who can share documents and spreadsheets, create Web pages, and more. The name
wiki
comes from
wiki wiki,
which means
quick
in Hawaiian. The software that runs a wiki enables members of the community to use a common interface to create content for the community.
Wiki
is server software that enables users to create and edit Web page content using any Web browser. Wiki software enables visitors to insert hyperlinks, using simple text syntax to create new pages and cross-links between internal pages. Users can modify the organization of wiki content as well as edit the documents. To check out a very busy and active wiki community, visit
www.wikipedia.org
. Figure 5-6 shows a page from a wiki site where visitors can edit the page.
The very nature of a wiki means that literally anyone who can access the wiki can edit pages within the wiki site. Some wiki communities require users to register before they can edit pages. Others require an authentication code, while others let the user freely edit the page â but they record the user's IP. You might wonder whether pages could be wiped out. The answer is yes. However, most communities are fairly civil, and pages are rarely wiped clean. Figure 5-7 shows a wiki page that's ready for editing. You can find wiki software by typing those very words in your favorite search engine. Everything you want to know about wikis can be found in
Wikis For Dummies
by Dan Woods and Peter Theony (Wiley).
Figure 5-6:
Edit me. Go ahead and make my day.
Figure 5-7:
Now let's see, if we boldface this and italicize that . . . yada, yada, yada.