Archive for February, 2008

CHAPTER 16 CHANGING THE LOOK OF YOUR (Free php web host)

Sunday, February 17th, 2008

CHAPTER 16 CHANGING THE LOOK OF YOUR BLOG 453 Listing 16-12. Final Version of the Recent Comments Code in index.php

As you can see in Figure 16-17, the list is much less cluttered now. As a bonus, hovering over the link to the comment gives the comment excerpt as a tool tip. That s the title part of the code in the format parameter used in Listing 16-12. Figure 16-17. The finished recent comment list Cleaning Up the Code You have modified an existing theme, expanding it to do what you want. However, a couple areas could use some cleaning up. These involve making the PHP code safer and eliminating duplication in the CSS rules.
We would like to recommend you tested and proved virtual web hosting services, which you will surely find to be of great quality.

452 CHAPTER (Web design) 16 CHANGING THE LOOK OF

Saturday, February 16th, 2008

452 CHAPTER 16 CHANGING THE LOOK OF YOUR BLOG self-explanatory. For example, %comment_author% will be replaced with the comment author s name, and %comment_excerpt% will be replaced with the first few words from the comment. You could also have the plug-in output a link to the comment author s web site, if the comment writer provided one. The rest of the format parameter (taken from the plug-in author s example) puts the comment details in a list item with the link to the post on a separate line. Figure 16-16 shows the output. Figure 16-16. A different version of the recent comments list This version gives more information, but it seems rather cluttered and the most important information the name of the post and its link isn t easy to discern. So, let s make one more change to this code. You will remove the comment excerpt and just link to the comment, but with the post title. Surprisingly, although this plug-in has more than 40 replaceable tags, none of them match the desired format exactly. You could have the post title as a link to the post, or the post title as a link to the top of the comment section, but none have the post title as a link to the specific comment. However, you can create this format by using two separate replaceable tags, as shown in Listing 16-12.
Searching for affordable and reliable webhost to host and run your web applications? Go to our java web server services and you will be pleased.

CHAPTER 16 CHANGING (Professional web hosting) THE LOOK OF YOUR

Friday, February 15th, 2008

CHAPTER 16 CHANGING THE LOOK OF YOUR BLOG 451 Figure 16-15. Recent comments listed This is a useful addition to the blog, but it could be better. It doesn t show to which story or post the comments belong. A reader might be particularly interested in what other people have to say about a story he commented on recently. A contributor might be looking for comments on her own stories. As its name implies, the Customizable Comment Listings plug-in is flexible enough to accommodate such additions. Let s replace the simple call to the plug-in function with the code shown in Listing 16-11. This is another example provided in the plug-in s documentation. Listing 16-11. New Version of the get_recent_comments Template Function in index.php

    %comment_author% said “%comment_excerpt%” in
    %post_URL%

    “); ?>

This function looks complicated, but it has only one more parameter. It uses a very powerful format template Scott has defined. Each of the terms enclosed in percent signs (%) is substituted by some data from the list of recent comments. The substitution names are fairly
We recommend you use shared web hosting services, because many users agree that it is cheap, reliable and customer-satisfying webhost.

450 CHAPTER 16 (Graphic web design) CHANGING THE LOOK OF

Thursday, February 14th, 2008

450 CHAPTER 16 CHANGING THE LOOK OF YOUR BLOG Adding a Recent Comments Plug-In Now you will install another plug-in, which will list a number of the most recent comments to the blog in the sidebar. This is great mechanism to keep your readers interested. It allows them to see which topics are still being discussed, and thus is an added incentive to keep reading those topics and to continue to get involved. Real conversation about a shared interest between your readers is the lifeblood of an active online community. The plug-in is the Customizable Comment Listings plug-in by Scott Reilly. You can download this plug-in via Scott s site at http://www.coffee2code.com/archives/2005/03/30/ plugin-customizable-comment-listings/. Download, install, and activate the plug-in using the procedure covered in Chapter 15. Read through the comprehensive documentation on Scott s site. Next, add the code shown in Listing 16-9 (from one of the examples in the plug-in s documentation) to the index.php template file, just before the contribute section. The single parameter 5 tells the plug-in to list only the five most recent comments. Listing 16-9. Code to Insert into index.php Immediately Before the Contribute Links

    Now add some more CSS rules to style the list of comments the same as the other lists on that page, as shown in Listing 16-10. Listing 16-10. Additional CSS Rules for the End of style.css ul.recentcomments { list-style-type: none; margin:0; padding-left: 10px; } ul.recentcomments li { margin-top: 4px; margin-left: 1em; text-indent: -1em; } Figure 16-15 shows what the default output of this plug-in looks like. Below the del.icio.us links, you have a list of the five most recent comments with the name of the comment author and the first few words of the comment. Those few words are a link to the individual comment itself. If a reader clicks the link, she will be taken to the blog post commented on with the page scrolled to the individual comment.
    We highly recommend you visit web and email hosting services if you need stable and cheap web hosting platform for your web applications.

CHAPTER 16 (X web hosting) CHANGING THE LOOK OF YOUR

Thursday, February 14th, 2008

CHAPTER 16 CHANGING THE LOOK OF YOUR BLOG 449 The call to wp_loginout produces a link to the login page if the current visitor is not already logged in, and a logout link if the visitor is logged in. Next, add the CSS rules from Listing 16-8 to the end of the style sheet. This will ensure the display of the links matches that of the other parts of the sidebar. Listing 16-8. CSS Rules for Login and Register Links Added to style.css ul#contribute { list-style-type: none; margin:0; padding-left: 10px; } ul#contribute li { margin-top: 4px; margin-left: 1em; text-indent: -1em; } Figure 16-13 shows how your register and login links should appear, and Figure 16-14 shows the site admin and logout links. Figure 16-13. The register and login links Figure 16-14. The site admin and logout links
You want to have a cheap webhost for your apache application, then check apache web hosting services.

Web site counters - 448 CHAPTER 16 CHANGING THE LOOK OF

Wednesday, February 13th, 2008

448 CHAPTER 16 CHANGING THE LOOK OF YOUR BLOG Figure 16-12. The improved list of links Adding Registration and Login Links Something missing from this template are the links to register and log in to the blog. Most WordPress blogs, being one-person blogs, don t need these links. Many themes don t even bother to include them. For a community blog, you will want to add them to your theme. To the index.php template file, add the code highlighted in bold in Listing 16-7. Listing 16-7. WordPress Template Tags for Registration and Login Links Added to index.php “show_description”=>FALSE, “num_items”=>10)); ?>

The additions in Listing 16-7 are standard WordPress template tags. The call to wp_register() produces a link to the registration page, but it does so only if registration is enabled. If you are logged in, however, it produces a link to the administration pages.
We would like to recommend you tested and proved virtual web hosting services, which you will surely find to be of great quality.

CHAPTER 16 (Web server info) CHANGING THE LOOK OF YOUR

Tuesday, February 12th, 2008

CHAPTER 16 CHANGING THE LOOK OF YOUR BLOG 447 Adjusting the Links The links appear in the sidebar, but they are not quite as pretty as you might like. Let s add some style rules for the header and the list to the end of the style.css style sheet, as shown in Listing 16-5. Listing 16-5. CSS Rules for the List of Links Added to style.css #right h2 { margin-top: 1.2em; } ul.rsslinks { list-style-type: none; margin:0; padding-left: 10px; } ul.rsslinks li { margin-top: 4px; margin-left: 1em; text-indent: -1em; } Also notice that some of the links have a description after them. If the RSS feed includes a description, the plug-in will display it by default. You can turn that off quite easily. Another default the plug-in provides is the number of links, which is 15. I think 10 is a more suitable number. The resultant code in the index.php template file looks like Listing 16-6. Listing 16-6. Additional Parameters to Restrict the Link List Output in index.php

If you check your blog page now, it should look like Figure 16-12. You will see the list looks much neater and blends in with the rest of the content. You have now added an external resource as part of the blog. Here, I chose one that is pertinent to the readers. You could also have added a feed of related news items from another web site or a list of the latest topics from a companion forum. The possibilities are quite extensive. As long as there is a resource available in RSS format, you can add it this way.
Note: If you are looking for cheap and reliable webhost to host and run your mysql application check mysql web server services.

446 CHAPTER 16 CHANGING (Web server address) THE LOOK OF

Monday, February 11th, 2008

446 CHAPTER 16 CHANGING THE LOOK OF YOUR BLOG Listing 16-4. Template Function _rssLinksList Added to index.php

View your blog page now, and you should see something like Figure 16-11. Figure 16-11. The RSS feed appears as a list of links in the sidebar.
We recommend you use shared web hosting services, because many users agree that it is cheap, reliable and customer-satisfying webhost.

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

Sunday, February 10th, 2008

CHAPTER 16 CHANGING THE LOOK OF YOUR BLOG 445 In this example, you will remove the list of buttons underneath the calendar and add a list of news stories using the RSS Link List plug-in introduced in Chapter 15. To remove the buttons from the rightmost column, choose the Main Template index.phpfrom the drop-down list of theme files on the right side of the page. When that file loads, find the section of index.phpthat begins

444 CHAPTER 16 CHANGING THE LOOK OF (Hosting your own web site)

Saturday, February 9th, 2008

444 CHAPTER 16 CHANGING THE LOOK OF YOUR BLOG image for highlights and so on. See Figure 16-10 for the progress so far. You can download this version of the theme, c3romask2-step1.zip, from the Source Code area of the Apress web site (http://www.apress.com). Figure 16-10. The new theme with all images and colors in place Changing the Template If you want to make modifications to your theme files, you can edit them in WordPress s Theme Editor, as long as the theme files are writable by the web server process (see the Setting File Upload Options section in Chapter 14). To activate the Theme Editor, go to the Presentation administration page and click the Theme Editor tab. Make sure that the theme you want to edit (c3ro mask 2 in this example) is selected in the drop-down list. Alternatively, you can edit the theme files on your machine with your favorite editor and upload them when you are ready. In both cases, you will want to make a backup copy, in case something goes wrong.
Please visit our professional web hosting services to find out about cheap and reliable webhost service that will surely answer all your demands.