HOME | ABOUT | CONTACT |

Search

Custom Search

Saturday, January 31, 2009

How to Add Recent Posts and Comments Widgets to Your New Blogger?

I saw many Blogger blogs implementing a recent post widget and a recent comment widget on their blogs. I know WordPress blog allows you to just click to add them to your blog easily. For Blogger these functions are not yet available. So how can you add them on your Blogger blog?

This article, Easy Peaky Recent Comments Widget for Blogger Layouts, shows the way of how to add a new recent comment widget to your Blogger blog. I've just added mine. What do you think? The codes also added a new recent post widget to your Blogger but the author didn't cover that part. So here is how you can make this new recent posts widget appear by adding the Feed URL for it. After you log in to your dashboard, click on Layout/Edit for Recent Posts widget. A screen will show up. See the screenshot below: Recent PostsYou need to add http://yourblog.blogspot.com/feed/posts/default in the Feed URL. Make sure you change yourblog to be your blog name. Then click on SAVE to close it.

I've also fixed the indentation so that all post feeds line up nicely on the left side. In the codes provided above, there are two <ul>s, two </ul>s, two <li>s, and two </li>s. Change <ul> and <li> to be <p> and change </ul> and </li>to be </p>. That will do the trick. So far the only thing I don't like about is its default number of feeds that are limited to 5 only. I'll try to find a solution for this later. So please bookmark this post and check back for my update. Your questions and comments about this topic are welcome.

Saturday, January 24, 2009

What Should be Included in a Robots.txt?

A robots.rxt is a text file used to control your blog/website. If using properly, it can prevent issues such as duplicate meta tags, duplicate title tags, and even save your web server some bandwidth.

How to create a robots.txt?

You can create a robots.txt using any text editor and named it exactly as robots.txt. I just use a simple text editor such as Notepad.

How to use it?

You may use FTP to upload a robots.txt to your website's root directory. For example, mine is uploaded in my website's root directory as /public_html/. My blog is in an add-on domain so a robots.txt is uploaded in its directory as /public_html/wp/.

What Should be Included in a Robots.txt?

For my Joomla website, I've included a robots.txt as follows. Some of them are used to prevent search engines to crawl my forum because they created duplicate title tags:

User-agent: *
Disallow: /administrator/
Disallow: /cache/
Disallow: /components/
Disallow: /editor/
Disallow: /help/
Disallow: /includes/
Disallow: /language/
Disallow: /mambots/
Disallow: /media/
Disallow: /modules/
Disallow: /templates/
Disallow: /index.php
Disallow: /index2.php
Disallow: /log-in.html
Disallow: /create-an-account.html
Disallow: /lost-password.html
Disallow: /contact-us/
Disallow: /contact-us/name.html
Disallow: /forum/*?
Disallow: /fourum/statistics.html
Disallow: /fourum/view-last-messages.html
Disallow: /option/
Disallow: /profiles/
Disallow: /*action=reminder*/
Disallow: /*action=stats*/
Disallow: /*;msg*/


For my WordPress blog, I've included a robots.txt as follows:
User-agent: *
Disallow: /wp-*
Disallow: /feed/
Disallow: /trackback/
Disallow: /rss/
Disallow: /comments/feed/
Disallow: /page/
Disallow: /date/
Disallow: /comments/
Disallow: /cgi-bin/
Disallow: /2007/
Disallow: /2008/
Disallow: /*?*
Disallow: /iframes/
Disallow: /recommends/

User-agent: Googlebot-Image
Allow: /wp-content/uploads/

sitemap: http://www.learningwp.com/sitemap.xml


Feel free to talk about what you've included in your robots.txt.

Related article
How to Use a Robots.txt to Control Your Website?

Saturday, January 17, 2009

Session Save Path Unwritable in Joomla! Install?

I have to install one of my Joomla! sites manually because Fantastico De Luxe in my server is no longer working. After I uploaded my Joomla! files to my server (using FTP), I typed my website's url in the browser; it automatically directed me to the Joomla! installation page which allowed me to have pre-installation checked all my files' permissions. Everything is writable (green color) except Session Save Path which is unwritable (red color). If you leave it alone not to fix it, it will cause back end login problem. So it cannot be ignored.

I searched the web for a solution, this article has covered pretty much every case; but it did not solve mine. I have to create a folder called session in the same directory as configuration.php is (using FTP), then I have to download index.php, which is in installation folder, to my local computer. It is important that you make a copy and save it somewhere else before you go on. Then I have to find the codes below:

<td class="item">
Session save path
</td>
<td align="left" valign="top">
<?php echo is_writable( $sp ) ? '<b><font color="green">Writeable</font></b>' : '<b><font color="red">Unwriteable</font></b>';?>
</td>


and replace them with the following codes:
<td class="item">
Session save path
</td>
<td align="left">
<b><?php ini_set('session.save_path','/home/airlinet/public_html/intetnet/session'); ?></b>,
<b><?php echo (($sp=ini_get('session.save_path'))?$sp:'Not set'); ?></b>,
<?php echo is_writable( $sp ) ? '<b><font color="green">Writeable</font></b>' : '<b><font color="red">Unwriteable</font></b>';?>
</td>


Pay attention to the red color path, find yours from your web server and replace it. After I edited and saved index.php, I uploaded it back to installation folder. I refreshed the screen that had given me Session Save Path Unwritable. Hooray! It turned Unwritable (red color) to be Writable (green color). Hope this tip can help someone who encountered the same problem as I had. Like to discuss more, please leave your comments here.

Saturday, January 10, 2009

How to Create a Single RSS Feed for BANS?

If a blog/website has no content, then it is dead. So it is very important to add fresh content in your blog/website. Updating your blog/website regularly will not only give your visitors a reason to come back but also attract search engines to visit your blog/website often. Thus it will help indexing your blog/website right away.

Adding a rss feed to a BANS site is one way to provide fresh content to your visitors. I was able to implement a single rss feed to my BANS store. I followed this article, How to Add a Single RSS Content Page to Your Site?, to accomplish the task. It is pretty straightforward process. If for any reason that you run into any problem, let me know in the comment section.

Saturday, January 3, 2009

New Blogger Comments and Backlinks - Do Follow?

I lately changed my new Blogger's comment from 'nofollow' to be 'dofollow'. What is 'nofollow' and 'dofollow'? Well, 'nofollow' is an attribute of HTML tag that will stop search engines to follow the link you've left in the comment section. That means you will not be benefited as a one-way link to your blog/website. 'Dofollow', on the other hand, is opposite. Your link would be treated as one-way link. Search engines will follow your link and crawl it. The more one-way links point to your blog/website, the more important the search engines will consider your blog/website to be. Thus it will increase your pagerank.

Although applying 'dofollow' might not be good to your blog/website in terms of pagerank, I see the potential benefits behind it. This will encourage more people to leave comments in your blog/website, thus search engines will pick up some long tail keywords for your blog/website. This implies that your blog/website will get more organic traffic from search engines. As we all knew Google's new Blogger has built in 'nofollow' attribute in its system. If you like to change yours, it is pretty easy to implement it.

  • Click on Layout/Edit HTML. Back up your HTML before you start. See the screenshot below: Layout/Edit HTML/Backup Template
  • Tick to expand your HTML. See the screenshot below: Expand Widget Template
  • Find the following codes from your HTML editor. You can hold Ctrl and hit F at the same time to bring up a search box, then copy and paste respectively the following line to find them. The first one is for the commenter's url and the second one is for backlink's url:
    <a expr:href="data:comment.authorUrl" rel="nofollow"><data:comment.author/></a>

    <a expr:href="data:backlink.url" rel="nofollow"><data:backlink.title/></a>
  • Change these two rel="nofollow" to be rel="follow" respectively or delete the whole thing because no attribute in HTML has the same effect as 'dofollow'
  • Save your template by hitting SAVE TEMPLATE button.
Will you change your blog/website to be 'dofollow'? Why or why not? Please leave your comments below.

Related article:
How to Make a Self-Hosted WordPress Blog DoFollow?

Search

Custom Search