We can specify a color in Google image search

Now there is extra parameter to filter the search result by color. The option is not available now , you have to change the URL to get the results.

http://images.google.com/images?imgcolor=red&q=shirt

No Comments

Iterating CSS class for elements using jQuery

This is a small jQuery extension used for iterating class for elements. Here you can specify class name and also you can specify how to iterate the class. You can pass multiple class names for iteration.


How to call ?

$("div.row").iterate({iterateBy:2,className:'alternate'});
$("div.row").iterate({iterateBy:3,className:'red,green,yellow'});

No Comments

Trying to avoid duplicate content in my blog

After watching video about Canonical link element By Matt Cutts , I analyzed my site for possible duplicate content. I found that there are some pages having duplicate content.

I had listed these pages below:

  1. Article listing based on tags and article detail page. This happens when there is only one article inside a tag.
  2. Article listing based on category and article detail page. This happens when there is only one article inside a category.

I started searching for word press plug-in. One plug-in I found was adding canonical link to page and post. The plug-in was named “No duplicate content”. What it does is adding canonical link element for single page and post.

<link rel="canonical" href="YOUR_PREFERED_URL"/>

For my blog I don’t need a canonical link element in article detail page. There is no chance of duplicate content for article detail page. The only url I am providing to search engines is the permalink of the page.

In category/tag page I found an alternative way to avoid duplicate content. I wrote a small script for permanent redirect (301) in category/tag page. The redirect is conditional the page will be redirected if there is only one post inside category/tag page.

add_action ( "template_redirect", "canonicalLink");
function canonicalLink() {
	global $wp_query;
	$postCount = count($wp_query->posts);
	if((is_category()|| is_tag()) && $postCount==1) {
	 return wp_redirect(get_permalink($wp_query->posts[0]->ID),301);
	}
	return ;
}

I am experimenting with my blog, so I will be checking whether this script have any difference with Google indexing.

2 Comments

I don’t know why feed format look like this in chrome?

Today I found  that rss feed in chrome looks really weird. See the screen shots below.
The feed looks nice in IE,FF.

I am so used to subscribe button shown in IE and Firefox. This is missing with chrome . Chrome is still beta  ie, formatting may be weird.I am a big fan of chrome :)

Chrome
chrome

Firefox
ff

No Comments

Google Transit what a nice concept

Last week I watched  a video by Matt cutts,Google webspam engineer. Video was titled
“State of the Index 2008”. This Highlights  what Google has done in 2008, and what to expect in 2009.

In that video Matt  given an overview of all the  Google launches in 2008. Then I came to know about Google transit

.

I hope Google will update these transit directions with more cities so I can look for public transportation in my city :)

No Comments

Divs of equal height using jQuery script

What the script do ?
Script will calculate the maximum height from the set of elements. While calculating it will consider the padding applied through CSS also . So have fun :)

How to call ?

$(document).ready(function(){
$(".my-equal-boxes").setEqualHeight();
});

JQuery extended function

   jQuery.fn.setEqualHeight=function(o) {
    	var maxHeight=0;
    	var maxElement=null;
     	jQuery(this).each(function(i) {
          		if((jQuery(this).height()+parseInt(jQuery(this).css("padding-bottom"))+parseInt(jQuery(this).css("padding-top")))&gt;maxHeight) {
    			maxHeight=jQuery(this).height()+parseInt(jQuery(this).css("padding-top"))+parseInt(jQuery(this).css("padding-bottom"));
    			maxElement=this;
    		}
    	});
    	jQuery(this).not($(maxElement)).each(function() {$(this).height(maxHeight-parseInt(jQuery(this).css("padding-top"))-parseInt(jQuery(this).css("padding-bottom")))})
    }

,

3 Comments

Files to edit for enabling cURL in XAMPP?

Last week I was installing “Magento” on XAMPP . Then I realized that cURL was disabled by default in XAMPP. I changed   “\apache\php\php.ini” and uncommented the line for cURL extension but still not working. Finally I made it working by editing couple of “ini” files. I had listed these ini’s below.

\xampp\apache\bin\php.ini
\xampp\apache\php\php5.ini
\xampp\apache\php\php.ini
\xampp\apache\php\php\php4.ini (to switch PHP version)

To enable cURL you need to uncomment the below line

;extension=php_curl.dll

to

extension=php_curl.dll

, ,

No Comments

JQuery Script to highlight current page’s navigation link

This is a small script used for highlighting the current page’s navigation link. Here you can also specify the scope by just removing “*” with your own expression. Here I am adding class “current” to the navigation link wich can be used for styling the link.

$("*").find("a[href='"+window.location.href+"']").each(function(){
$(this).addClass("current")
//add your own logic here if needed
})

,

No Comments

JQuery tooltip with HTML support

This tooltip is customized for adding html content as tooltip content.
You can put any formatted html as tooltip content. See the demo below, mouse over the icon and check the tooltip

How to call ?

$(document).ready(function(){
$(".formInfo").tooltip({tooltipcontentclass:"mycontent"})
});;

CSS : Here is the sample style used in this demo page.You can style this according to your site theme

#NT_copy {
background-color: #333333;
color: #FFFFFF;
font-weight: bold;
font-size: 13px;
font-family: "Trebuchet MS";
width: 300px;
left: 0;
top: 0;
padding: 4px;
position: absolute;
text-align: left;
z-index: 20;
-moz-border-radius: 0 10px 10px 10px;
filter: progid:DXImageTransform.Microsoft.Alpha(opacity=87);
-moz-opacity: .87;
-khtml-opacity: .87;
opacity: .87;
}

,

No Comments

Is adsensebot helping googlebot with indexing?

I believe that Adsensebot is helping googlebot with indexing.

After registering my domain I had submitted my site to https://www.google.com/webmasters/.
I was constantly checking if the site was indexed by google. As site was not indexed by the google I started googling for SEO realted articles. I came across several blogs and read some articles regarding adsense bot.Finally I decided to put adsense in my site. The very next day I got my homepage indexed in Google.

Google has been using a shared cache So any page crawled by any Googlebot is stored in the cache, then any other bot can first check the cache before sending out a page request So this way adsensebot may help googlebot.

1 Comment