Archive for February, 2008

Web hosting billing - 464 CHAPTER 17 CUSTOMIZING YOUR BLOG S LAYOUT

Tuesday, February 26th, 2008

464 CHAPTER 17 CUSTOMIZING YOUR BLOG S LAYOUT Listing 17-1. The Right Sidebar Code to Go in sidebar-b.php

Once the code is in its own file, you need to insert the instruction to include that file in the main index.php file exactly where the code was, as shown in Listing 17-2. Listing 17-2. Include the New File in index.php


Hosting web - CHAPTER 17 CUSTOMIZING YOUR BLOG S LAYOUT 463

Monday, February 25th, 2008

CHAPTER 17 CUSTOMIZING YOUR BLOG S LAYOUT 463 Participate in the conversation. Have the comment form right there. Find what else you have been discussing. Have links to other articles in the same category. Buy the game you ve just reviewed. Have the link there ready for them. Go off and do more research. Have links to other related sites right there. It may sound strange to want to help people leave your site, but sometimes that is a good thing. Have you ever wanted to return to a site you found useful, but you forgot to bookmark it? You can t remember the URL, but you do remember a related site you visited on your journey to get there. You return to the related site, and try to retrace your steps. Of course, you want your site to be the one everyone wants to visit, but that isn t always the case. Being that related site that people return to find links can be just as important. Having a reputation for being the place to find out about other sites on your subject is one of the things that started this whole weblog business. Changing the Layout In this section, I ll show you how you can configure your blog to cater to different types of users. You ll see how to create different layouts for different views in your blog. Some layouts will have both sidebars, some will have one or the other, and some will have none. First, you need the elements that you will use to build your layouts. Building Blocks Think of a layout as building blocks or puzzle pieces that you want to fit together in certain ways. PHP allows you to split up your files in this way and include them into the original. Furthermore, WordPress encourages this kind of split in its support for theming. The themes supplied with WordPress are structured this way. So, first you ll break down the theme files into multiple pieces. You will take each of the elements of the header, the main section, the individual sidebars, and so on, and split them into separate files. You can then choose to include those files as appropriate based on the type of page to display. Rather than take you through splitting each file piece by piece, I will show you one such piece and leave the rest as an exercise. You will be able to download the completed version from the Source Code area of the Apress web site (http://www.apress.com). The example I will take you through is splitting the rightmost column from the main file into its own file. Listing 17-1 shows the code to be moved. All of this code will go into a new file called sidebar-b.php. The name is not related to its position on the page, because it may not always be on the right.
Looking for affordable and reliable webhost to host and run your business application? Then look no more and go to servlet web hosting services.

Free web host - 462 CHAPTER 17 CUSTOMIZING YOUR BLOG S LAYOUT

Sunday, February 24th, 2008

462 CHAPTER 17 CUSTOMIZING YOUR BLOG S LAYOUT Blog comment conversations can be similar to bulletin boards and forums in some respects, but in other ways are quite different. One big difference is that often blog conversations are lead by an article or post of substantial length. Discussing the News If your site is all about commenting on some type of news, like current political events, users are likely to want to read the full details of the story you posted and to contribute to the conversation about it. Their benefit is that they got to hear what their peers have to say and contribute to the conversation themselves. The ability to have a lively conversation with one s peers is a very rewarding experience. You and your writers might post a long, thought-out opinion piece or a proposal for a new direction your group might take, and from that trigger a substantial debate with your readers. In these situations, your readers might not want any distractions from the conversation or the debate. Their main aim in visiting the page is to continue taking part in that debate. Coming to Learn Perhaps your blog is primarily about offering information of a tutorial nature and soliciting feedback. In this case, your visitors still want to read what you have to say and perhaps provide feedback, but they will also want to find more information and other resources about the subject. Your articles are likely to have more structure than a news-type blog post, and perhaps include images or illustrations. It may be that the piece is long enough to split into multiple pages. Your readers might want to read more on the subject you are discussing. They might want to see a brief list of related resources, perhaps with some kind of summary or rating system. Looking for a Review Your blog could be specialized review site, where you discuss and review the latest science fiction books, movies, and games. Here, your main articles will probably be in-depth reviews of the latest DVD releases, complete with publicity photos, cast lists, and so on. But you may also have, for example, a news category where the nature of the stories will be different. On such a site, you might want to have links to allow your readers to purchase the products you are reviewing. If they are affiliate links, you could even earn money that way. To encourage readers to return, you could have a voting or rating system. Or perhaps, you will just want to encourage them to leave their own reviews in the comments. Moving to the Next Step In all the scenarios I ve mentioned, and in any others appropriate to your blog, you must try to anticipate what your visitors will want to do next. You want to help them take their next step, even if that next step is to leave your site! Here are some possibilities of what visitors will want to do next and how you can help them:
Note: If you are looking for cheap and reliable webhost to host and run your mysql application check mysql web server services.

Sex offenders web site - Customizing Your Blog s Layout CHAPTER 1 7

Sunday, February 24th, 2008

Customizing Your Blog s Layout CHAPTER 1 7 In this chapter, I will show you how to improve your users experience by tailoring your blog s layout to your audience. As with the previous chapters, the focus is on building your community and making it enjoyable and rewarding for people, so they will return again and again. To achieve this goal, you need to think about the users experience as they use your site. What are your readers doing on the site? What are they trying to achieve? When you have the answers to these questions, you can help your readers by customizing your site to accommodate their interests. Considering What Your Reader Is Doing When users click the comments link of a story, they are taken to a new page where they are presented with the story in full and the related conversation. Almost everything else they see looks the same as the layout on the front page. That s the beauty of a template-driven system. You don t need to do anything to get the same look and feel, as well as common content across all your pages. But sometimes presenting the same layout is not the right thing to do. You should think about what the users are doing. What are their intentions? What benefit will they get from this action? What will they want to do next? The answers to these questions depend somewhat on the nature of your site. Having a Conversation People love to chat. They love to have their say. In pubs and clubs, in their homes, in bus queues, and in supermarket aisles, people love to talk. For many people, it is just as rewarding to have those conversations without the face-toface contact, such as on the phone or on a shortwave radio. People still have conversations with pen and paper, sending letters to each other. Similarly, people love to have conversations online. The nature of some online conversations is analogous to other types of conversations. Real-time chat in a chat room is most like a face-to-face meeting with several people. Instant messaging is like a phone conversation between two people. E-mail is like a paper-and-pen correspondence. Yet the online world gives us other ways to converse that don t have true parallels in the real world. That e-mail conversation can take place on a mailing list, where many people join in. Bulletin boards are like conversations with a lot of people, but the conversation can be in near real-time, like a chat, or time-delayed over many hours, days, or weeks, more like a mailing list.
In case you need affordable webhost to host your website, our recommendation is ecommerce web host services.

CHAPTER 16 CHANGING THE LOOK OF YOUR (Tomcat web server)

Saturday, February 23rd, 2008

CHAPTER 16 CHANGING THE LOOK OF YOUR BLOG 459 Summary This chapter demonstrated how to change the face of your blog to make your site more appealing to your visitors. I ve shown you how to add pertinent information to enhance the readers experience of your site. All of this has been about the front page of your blog. This is important, as it is the first impression your first-time visitor gets. But you can go much further. WordPress can do a lot more to enhance your visitors time on your site. It can help you keep your readers engaged by presenting the right information at the right time. In the next chapter, I will show you how to change the appearance of the blog depending on the page being viewed and include different content on different pages. I will also introduce more plug-ins to enhance the readers experience.
If you are searching for cheap webhost for your web application, please visit MySQL5 Web Hosting services.

458 CHAPTER 16 CHANGING THE (Cedant web hosting) LOOK OF

Friday, February 22nd, 2008

458 CHAPTER 16 CHANGING THE LOOK OF YOUR BLOG Listing 16-17. The Reduced Element Selector CSS Rules in style.css #right ul { list-style-type: none; margin:0; padding-left: 10px; } #right ul li { margin-top: 4px; margin-left: 1em; text-indent: -1em; } You need to change the HTML in the template to remove the eliminated class names, as they re now not needed or even defined. You can see in Listing 16-18 that the class attributes have been removed from the

    tags. You can download this version of the theme from the Source Code area of the Apress web site (http://www.apress.com), as c3romask2-step2.zip. Listing 16-18. Leaner HTML Without Class Attributes in index.php

    You have now completed the process of customizing a theme to use different images, add new content, and display the links in a different format. You can apply this approach to modify other themes to suit your needs.
    Note: In case you are looking for affordable and reliable webhost to host and run your j2ee application check Vision J2ee Web Hosting services.

CHAPTER 16 CHANGING THE LOOK OF (Web hosting top) YOUR

Thursday, February 21st, 2008

CHAPTER 16 CHANGING THE LOOK OF YOUR BLOG 457 ul#contribute { list-style-type: none; margin:0; padding-left: 10px; } ul#contribute li { margin-top: 4px; margin-left: 1em; text-indent: -1em; } ul.recentcomments { list-style-type: none; margin:0; padding-left: 10px; } ul.recentcomments li { margin-top: 4px; margin-left: 1em; text-indent: -1em; } Listing 16-16 shows an improved version with a new class name, rightsidelists, which is a little more semantic and can be applied to all three sections. Listing 16-16. The Reduced Multiple Class CSS Rules Added to style.css ul.rightsidelists { list-style-type: none; margin:0; padding-left: 10px; } ul.rightsidelists li { margin-top: 4px; margin-left: 1em; text-indent: -1em; } Using the reduced CSS rules in Listing 16-16 means applying a class attribute matching the class name to each unordered list in the right column, as in

    . This is fine for a couple of lists, but gets a little repetitive and is tedious to remember. A better solution is to use the combination of a unique identifier and an element selector, instead of a class selector, to apply rules to all unordered lists in the right column. This eliminates the need to remember to use the class for each one. Listing 16-17 shows the CSS rules that will apply to all unordered lists in the right column.
    Searching for affordable and proven webhost to host and run your servlet applications? Go to Linux Web Hosting services and you will find it.

Web hosting control panel - 456 CHAPTER 16 CHANGING THE LOOK OF

Wednesday, February 20th, 2008

456 CHAPTER 16 CHANGING THE LOOK OF YOUR BLOG Go ahead and make a similar change to the call to the recent comments plug-in, as shown in Listing 16-14. Listing 16-14. Additional PHP Function in index.php to Protect Against Errors with the c2c_get_recent_comments Function


    You will be pleased to hear that there is no need to take the same kind of precautions with the special rssLinkList tag embedded in your posts or pages. The technology WordPress uses to process special tags is more sophisticated than simply executing PHP code. In fact, you can t execute PHP code in a post (although there are plug-ins that allow you to do this). Instead, the tags are simply ignored if the plug-in is disabled or not installed. Also, you don t need to add this kind of testing around WordPress s built-in template functions. As these are core to WordPress, they will always be there. If they are not there, you have a broken installation, and a lot more things will break! Cleaner CSS In making the RSS feed links, the contribute links, and the latest comments links look the same, you have duplicated the same CSS style rules. CSS allows you to be somewhat cleverer than that. Rather than have three separate rules, you can give all three sections the same HTML class, and then have a single set of style rules applied to all three. Listing 16-15 shows the duplicated CSS that needs to be removed. Listing 16-15. The Duplicated CSS Rules to Be Removed from style.css ul.rsslinks { list-style-type: none; margin:0; padding-left: 10px; } ul.rsslinks li { margin-top: 4px; margin-left: 1em; text-indent: -1em; }
    We recommend cheap and reliable webhost to host and run your web applications: Coldfusion Web Hosting services.

CHAPTER 16 (Michigan web site) CHANGING THE LOOK OF YOUR

Tuesday, February 19th, 2008

CHAPTER 16 CHANGING THE LOOK OF YOUR BLOG 455 Listing 16-13. Additional PHP Function in index.php to Protect Against Errors with the rssLinkList Function

454 CHAPTER 16 CHANGING THE LOOK OF (Web hosting solutions)

Monday, February 18th, 2008

454 CHAPTER 16 CHANGING THE LOOK OF YOUR BLOG Safer PHP Code I mentioned earlier that if a theme requires a plug-in and that plug-in is not present, you will get errors on your blog. Sometimes, depending on the place the error occurs, your blog page may not work at all. Take a look at Figure 16-18. Here, I have disabled the RSS Link List plug-in. The error on the page is at exactly the place the plug-in template function is called. No more of the template code is executed, even though the rest of the page would have displayed correctly. Imagine if you had a call to a template function at the beginning of your theme template. The resultant page might contain a cryptic error message and nothing else! Figure 16-18. Theme template code can cause errors on your blog. There is a simple solution to this problem. PHP has a special ability to test whether a function exists. This means you can test to see if the plug-in function exists before trying to call it. If it doesn t exist, you don t call it. There will be no error, and if you write your template code carefully, there won t even be a header with nothing below it. Listing 16-13 shows the new version of the code.
Check Tomcat Web Hosting services for best quality webspace to host your web application.