Archive for the 'MySQL5' Category

Web hosting reviews - CHAPTER 17 CUSTOMIZING YOUR BLOG S LAYOUT 475

Friday, March 28th, 2008

CHAPTER 17 CUSTOMIZING YOUR BLOG S LAYOUT 475 Teasers and the More Tag for Lengthy Articles If you are writing lengthy articles on your blog, they tend to overpower the front page of your blog. While an article is new enough to still be on the front page, its length will push all the other articles a long way out of the visitors sight. For example, I added a 700-word article as the newest post on my sample blog. This meant that a visitor would need to scroll down through four screens before the next story was visible. If you had several such articles on your front page, it could quickly become a dozen or more screens long. Having a home page of that length is a big turnoff to visitors. They feel overwhelmed by the amount of text presented and are likely to go elsewhere. WordPress has a couple of mechanisms to deal with this. The first is a special tag you use in your post that allows you to present the first part of your article as a teaser. The rest of the article is then available by clicking on a more link. To enable this feature, simply add the (more…)

Geocities web hosting - 474 CHAPTER 17 CUSTOMIZING YOUR BLOG S LAYOUT

Wednesday, March 26th, 2008

474 CHAPTER 17 CUSTOMIZING YOUR BLOG S LAYOUT You can customize the styling of the subscription management page, the wording of the form controls, and the messages that different visitors see from the plug-in administration page, shown in Figure 17-12. As you can see, this plug-in is quite powerful and could provide a great addition to your blog and your visitors experience. Figure 17-12. The Subscribe to Comments plug-in administration page A version of the theme with the changes I have described in this section can be down loaded from the Source Code area of the Apress web site (http://www.apress.com) as c3rohorses-discussion-layout.zip. This is a good starting point to developing a site with a conversation layout. A next step might be to customize the subscriber management page to match the rest of the site. If you read through the rest of this chapter, you may find more features you would like to incorporate on your site. A Learning Layout The next type of layout is one that would suit a blog that is mostly about learning. This type of layout is more likely to incorporate multiple images and other elements in a post. The post itself might span multiple pages. The layout could have links to related articles of interest to the readers. The readers might also see value in a list of related resources.
Looking for affordable and reliable webhost to host and run your business application? Then look no more and go to servlet web hosting services.

CHAPTER 17 CUSTOMIZING YOUR BLOG S LAYOUT 473 (Web hosting india)

Tuesday, March 25th, 2008

CHAPTER 17 CUSTOMIZING YOUR BLOG S LAYOUT 473 Figure 17-10. The subscription administration page Figure 17-11. E-mail notification of a new comment
Note: If you are looking for cheap and reliable webhost to host and run your mysql application check mysql web server services.

Web hosting compare - 472 CHAPTER 17 CUSTOMIZING YOUR BLOG S LAYOUT

Monday, March 24th, 2008

472 CHAPTER 17 CUSTOMIZING YOUR BLOG S LAYOUT Figure 17-8. Subscribe without commenting Figure 17-9. New link to manage subscriptions If your visitors click this link, they will be presented with an administration page (styled like the WordPress administration pages) listing all the posts to which they are subscribed and allowing them to remove subscriptions, block all notifications, and change their e-mail address, as shown in Figure 17-10. When someone else comments on the story to which a reader is subscribed, the reader will receive an e-mail notification, as shown in Figure 17-11. The e-mail message details who commented and what the comment was, and includes a link taking the recipient directly to the post. Another link in the e-mail message takes the recipient to the subscription management page (see Figure 17-10).
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 17 CUSTOMIZING (Web hosting domain) YOUR BLOG S LAYOUT 471

Sunday, March 23rd, 2008

CHAPTER 17 CUSTOMIZING YOUR BLOG S LAYOUT 471 To install this plug-in, download the zip file, expand the archive, and upload it to your server following the instructions in the readme.txt file found in the plug-in package. Put the plug-in file subscribe-to-comments.php in wp-content/plugins and the user administration file wp-subscription-manager.phpin your main WordPress directory. Go to the plug-ins administration page and activate the plug-in. That s all you need to do. WordPress automatically calls the plug-in when the comments are displayed. The plug-in adds a check box to the standard comment form, giving your reader the ability to sign up to be notified when follow-up comments are posted. Figure 17-7 shows this in action. Figure 17-7. The Subscribe to Comments plug-in in action By default, this plug-in allows your visitors to subscribe only when they leave their own comments. If you prefer, you can allow them to subscribe without leaving a comment. Simply add a call to the plug-in s template tag show_manual_subscription_formin the comments.php theme file (full instructions are in the readme.html file; see step 5 of the installation section). The resultant comment form will have a section named Subscribe Without Commenting, as shown in Figure 17-8. Once your readers have subscribed to the comments on a story, the plug-in recognizes them (via a cookie) when they subsequently revisit the same post. This time, a Manage your subscriptions link is presented, as shown in Figure 17-9.
We recommend you use shared web hosting services, because many users agree that it is cheap, reliable and customer-satisfying webhost.

470 CHAPTER 17 CUSTOMIZING YOUR BLOG S (Web hosting servers) LAYOUT

Saturday, March 22nd, 2008

470 CHAPTER 17 CUSTOMIZING YOUR BLOG S LAYOUT post, include the two sidebar building blocks. When you are viewing a single page, the main content should be full width and the sidebars will not be output. This results in the view shown in Figure 17-6. Figure 17-6. Single-post view without sidebars Subscribe to Comments For a scenario of a reader who is solely interested in your article and the discussion stemming from it, an extension can help to keep that reader involved. An appropriate plug-in is one named Subscribe to Comments, created by Mark Jaquith, originally by Jennifer at ScriptyGoddess (http://www.scriptygoddess.com/archives/2004/06/03/wp-subscribe-to-comments/). You can download this plug-in from http://txfx.net/code/wordpress/subscribe-to-comments/. The Subscribe to Comments plug-in allows your readers to subscribe to the comments of a post. This will appeal to those readers who enjoy the conversation aspect of your blog and want to know whenever someone else has posted a comment.
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.

Free web hosting music - CHAPTER 17 CUSTOMIZING YOUR BLOG S LAYOUT 469

Friday, March 21st, 2008

CHAPTER 17 CUSTOMIZING YOUR BLOG S LAYOUT 469 Listing 17-8. Using the Class Variable in main-content.php

A Conversation Layout Now that you have your building blocks in place, you can make some decisions about which pieces to use in appropriate circumstances. This first example demonstrates a layout to satisfy the readers who want to go straight to the conversation and join in. A Single-Post View WordPress has a template function that tells you if the page you are viewing contains a single post: the is_single function. You ll use that template function to decide to exclude the sidebars and allow the post and comments to fill the width of the template. Listing 17-9 show the modified code to make this happen. Listing 17-9. Testing for a Single Page in index.php

Notice a couple of big changes here. First, all the PHP code is inside one block. You don t need to include each line of PHP inside its own tags. You can amalgamate multiple PHP lines. This works well in this case because there is no longer any HTML code mixed in. Second, you use the WordPress template function is_singleto test if the reader is viewing a single post. If the function returns true, then you set your CSS class variable to main-content-full. If it is not true, the else part of the clause is executed, setting the CSS class variable to the normal main-content-norm. The main-content building block isn t included. Then you test again whether you are viewing a single page. This time the test is negative. The exclamation mark in front of the is_single function negates the test. This test means, If the page is not a single
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.

468 CHAPTER 17 CUSTOMIZING YOUR BLOG S LAYOUT (Web space)

Friday, March 21st, 2008

468 CHAPTER 17 CUSTOMIZING YOUR BLOG S LAYOUT Figure 17-5. Main content commented out Before moving onto building a layout from these pieces, you need to make one more change to the basic structure. You can see in Figure 17-2 that the combination of main content and sidebar B does not fill the width of the theme. Similarly, the main content with no sidebars is also too narrow. To resolve this problem, you can define three CSS classes that specify different widths for the main content, as shown in Listing 17-6. Listing 17-6. Special Class Rules in style.css #main-content { float: left; text-align: left; padding: 0 10px 0 5px; } .main-content-norm { width: 340px; } .main-content-wide { width: 530px; } .main-content-full { width: 720px; } This way, you can specify in the code of the template which width to use. Listings 17-7 and 17-8 show the changes in index.phpand the main-content.phpinclude file to continue using the default value. I ll explain how this code works in the next section. Listing 17-7. Setting the Class Variable in index.php


If you are looking for affordable and reliable webhost to host and run your business application visit our ftp web hosting services.

Web site counters - CHAPTER 17 CUSTOMIZING YOUR BLOG S LAYOUT 467

Thursday, March 20th, 2008

CHAPTER 17 CUSTOMIZING YOUR BLOG S LAYOUT 467 Figure 17-2. Sidebar A commented out Figure 17-3. Sidebar B commented out Figure 17-4. Both sidebars commented out
In case you need quality webspace to host and run your web applications, try our personal web hosting services.

Web hosting faq - 466 CHAPTER 17 CUSTOMIZING YOUR BLOG S LAYOUT

Wednesday, March 19th, 2008

466 CHAPTER 17 CUSTOMIZING YOUR BLOG S LAYOUT If you examine index.php (you can use the WordPress Theme Editor, as described in Chapter 16), you will see that it has become very simple and modular. Listing 17-5 shows the whole file. It has been reduced to a mere 18 lines. Each of the main areas of the file has now been extracted to its own file. Listing 17-5. The Lean index.php


Note that the header.php and footer.php files are not directly included by this file. Instead, the WordPress template functions get_header() and get_footer() have been called. These standard template tags automatically include a file called header.php and footer.php, respectively. If one of these files doesn t exist in the theme, the tags will include the corresponding files from the default theme. This modularity now allows you to be incredibly flexible in the layout of the theme. As an example, simply commenting out any combination of the three include files in the central section allows you to change which pieces of the page are included. Figures 17-1 through 17-5 demonstrate how you can change the layout by commenting out files.
We highly recommend you visit web and email hosting services if you need stable and cheap web hosting platform for your web applications.