We just launched the Yahoo Buzz wordpress plugin

Few minutes back we just launched the Yahoo Buzz wordpress plugin. We developed the Yahoo buzz button plugin for social networking purpose. This plugin is free to download. Yahoo Buzz plugin will give you the power to connect with yahoo buzz to your wordpress blog or website.

Yahoo Buzz wordpress plugin

The yahoo Buzz will easily allows to add the yahoo buzz button your blog to be shared. this will give the admin control to where to show the yahoo buzz button in the post. This plugin has facility to choose where to show the button.

This plugin will give more control to edit and customize the CSS as per your choice for yahoo buzz button to show. This button will show the count of yahoo buzz did by the users.

Yahoo button will share your wordpress articles into yahoo buzz and this will give you more traffic to your wordpress blog. This is very SEO friendly wordpress plugin. You must add this plugin to your wordpress blog. This yahoo buzz button will give very cool look to your site also.

As we know now Yahoo is second number search engine in the world. So adding this buzz button will be helpful to become your wordpress website more socialite.

See some cool screen shots of Yahoo buzz plugin.

Admin panel Screen Shot.

Front End screen Shot

You can freely download the Yahoo Buzz wordpress from here : Yahoo Buzz

The Official Yahoo Buzz WordPress plugin URL is as follows:

http://wordpress.org/extend/plugins/yahoo-buzz/

How to get first category name or id from wordpress post

Many people want to know about post category and know more information current category. Some time we need to use the first category of wordpress post. As we know we can define the multiple category to single article. So if we want retrive the wordpress category then we will get the result in simple php array format. Using that array we can easily extract the first category of post.

if we want first category than, we will get result in php array format. Using that array we can easily get first category name or id from wordpress post.

How to get first category name or id from wordpress post

In this post I will show how we can achieve that. Using following code we can get the first category ID.

< ?php
$category = get_the_category();
$currentcat = $category[0]->cat_ID;
?>

Using following code we can extract the first category name from the wordpress post.

< ?php
$category = get_the_category();
$currentcat = $category[0]->cat_name;
?>

Above code we can use only in the loop but using the following code we can extract the category
outside the loop also

<!--?<span class="hiddenSpellError" pre="" data-mce-bogus="1"-->php
global $post;
$categories = get_the_category($post->ID);

$currentcat = $category[0]->cat_ID;
?></pre>
<pre>

same like that.. cat name

 <!--?<span class="hiddenSpellError" pre="" data-mce-bogus="1"-->php
 global $post;
 $categories = get_the_category($post->ID);

$currentcat = $category[0]->cat_name;
 ?>

</pre>
<pre>
How to get first category name or id from post
How to get first category name or id from post

add event to all image elements using javascript

In this article we will show to attach event to DOM element and add event to all image elements using javascript. Using javascript we can attach the event to any dom element.

add event to all image elements using javascript

You many times heard about getElementsByTagName javascript method but you did not tried.

getElementsByTagName function is very useful when you are working with javascript events. Using this function you can attach the event to any tag which is present in HTML body.

Here I am going to give the image example. Following script will attach the mouseover event to all images which are present in DOM.


var all_images = document.getElementsByTagName('img');

for (var i = 0; i < all_images.length; i++) {

addEvent(all_images[i], 'mouseover', myfunction, false);

}

function myfunction () {

 alert('this is image mouse over alert');

}

/**
 * cross-browser event handling for IE5+, NS6 and Mozilla
 * By Scott Andrew
 */
//This addEvent function we are using for external class use
this.addEvent = function(elm, evType, fn, useCapture) {
 if (elm.addEventListener) { // Mozilla, Netscape, Firefox
 elm.addEventListener(evType, fn, useCapture);
 return true;
 } else if (elm.attachEvent) {  // IE5 +
 var r = elm.attachEvent('on' + evType, fn);
 return r;
 } else {
 elm['on' + evType] = fn;
 }
}

</script>
add event to all image elements using javascript
add event to all image elements using javascript

If you copy paste the following code in your document and If you mouseover on any image then alert with message will come.

This script will work in any browsers. (IE 6,7,8, FF3,2, Safari3,4)

How you can disable Google Buzz

last week google launched the google buzz to challenge the  twitter. Google buzz got really huge amount of response. Now they did some modification in application so that will be easy to disable the unwanted google buzz.

How you can disable Google Buzz

Google’s engineers made some quick changes as a result of the backlash, including a security flaw affecting mobile Buzz users, a setup process that has you manually accepting followers, and an easier way to disable Buzz

You can disable the google buzz following these steps.

1. login to your gmail account first.

2. Click on setting button (right top side)

3. choose buzz option and choose your settings as per your choice.

How you can disable Google Buzz
How you can disable Google Buzz

Using following setting google really saving the people privacy.

how to add google connect to your wordpress site

Many people want to add google connect to your wordpress site. But they don’t know how to achieve that.  In this article I am going to show you the step about adding the google connect to your site.

how to add google connect to your wordpress site

Google friend connect is the best feature to add in your site and increase your blog visits.

First go following URL:

http://www.google.com/friendconnect/home/

login to google friend connect.

how to add google connect to your wordpress site
how to add google connect to your wordpress site

Click on get started button and login with your gmail account.

Then click on ‘Set Up A New Site’ button.

Fill your website URL and information in form and click on next button.

After that you will get the congratulation window.

how to add google connect to your wordpress site
how to add google connect to your wordpress site

Then you will get the configuration page for google connect and you should choose colors and text color settings as per your website. Dont forget to choose or set the width of widget.

Finally click on “generate code” button and you will get the google connect code for your wordpress website.

how to add google connect to your wordpress site
how to add google connect to your wordpress site

Note: This javascript code will never run in test machine. If you want to see the google connect widget then put javascript code in production or live website.

JSONP for cross domain communication solution using with javascript and PHP

Last year in Feb I heard about JSONP and really liked the JSONP solutions. JSONP allows you to make an HTTP request outside your own domain
JSONP consume the Web Services from JavaScript code. Earlier I worked on so on AJAX but there is issue with working or communication issue with cross domain sites.

JSONP for cross domain communication solution using with javascript and PHP
JSONP for cross domain communication solution using with javascript and PHP

XMLHttpRequest is blocked from making external requests.

JSONP for cross domain communication solution using with javascript and PHP

JavaScript code to make a JSONP call will as follows:

[viral-lock message=”Solution code is Hidden! It’s Visible for Users who Liked/Shared This article on Facebook or Twitter or Google+. Like or Tweet this article to reveal the content.”]

function common_jsonpRequest(url, name, query) {

 if (url.indexOf("?") > -1)
 url += "&jsonp="
 else
 url += name + "&";
 if (query)
 url += encodeURIComponent(query) + "&";
 url += new Date().getTime().toString(); // prevent caching

 var JSONPscript = document.createElement("script");
 JSONPscript.id = 'wordpressapi_jsonpRequest';
 JSONPscript.setAttribute("src", url + "&CacheBuster=" + Math.random());
 JSONPscript.setAttribute("type","text/javascript");

 // write the jsonp script tag
 document.body.appendChild(JSONPscript);
 //script.text = "";

}

function returncall (data){
 alert(data);
// you can use data as a variable also.
}

[/viral-lock]

In same javascript you should write the returning function as above.

You can call JSONP this function as follows;

<a href="http://images.purabtech.in/JSONP-request.gif">
<img class="alignnone size-medium wp-image-1167" title="JSONP-request" src="http://images.purabtech.in/JSONP-request-300x125.gif" alt="" width="300" height="125" />
</a>
common_jsonpRequest(base_url+'getData.php?jsonp=mycallback&name=for_wordpressapi');

Notel: getData.php file will beahave like externaal javascript file so handle this file carefully.
getData.php sample file.

<?php
$data = "this is our dynamic data";
if($_REQUEST['name']=='for_wordpressapi'){

echo "returncall(".$data.")";

}

?>&nbsp;

This will return the “this is our dynamic data” as a alert.

How to create and read the xml using php

In this tutorial we given code sample for create and read the xml using php. we given explanation and there details

What is XML?
Extensible Markup Language (XML) is described as both a markup language. Now it is known as data storage format also

How to create and read the xml using php
How to create and read the xml using php

XML is very important in in today’s application development environment.
If you’ve never before worked with XML in PHP or have not yet made the jump to PHP5, this starter guide to working with new functionality available in PHP5 for XML.

Using following code you are able to create simple xml file.

<?php

//Creates XML string and XML document using the DOM
$dom = new DomDocument('1.0');

//add root - <books>
$books = $dom->appendChild($dom->createElement('books'));

//add <book> element to <books>
$book = $books->appendChild($dom->createElement('book'));

//add <title> element to <book>
$title = $book->appendChild($dom->createElement('title'));

//add <title> text node element to <title>
$title->appendChild(
$dom->createTextNode('Wordpressapi Magazine'));

//generate xml
$dom->formatOutput = true; // set the formatOutput attribute of
// domDocument to true
// save XML as string or file
$test1 = $dom->saveXML(); // put string in test1
$dom->save('wordpressapi1.xml'); // save as file
?>

Out put of above code will as follows:

<?xml version="1.0"?>
<books>
<book>
<title>Wordpressapi Magazine</title>
</book>
</books>

Now I am going to show you how to read the xml file using php

[/php]
loadXML(‘wordpressapi1.xml’);
if (!$dom) {
echo ‘Error while parsing the document’;
exit;
}

$s = simplexml_import_dom($dom);

echo $s->book[0]->title; // WordPressapi Magazine
?>
[/php]

or in other way

$xmlFileData = file_get_contents(“wordpressapi1.xml”);
// Here's our Simple XML parser!
$xmlData = new SimpleXMLElement($xmlFileData);
// output will be shown in array format
print_r($xmlData);

how to add tag cloud to wordpress theme

WordPress tags and tag cloud is important part in wordpress theme. Here in article given code to add tag cloud to wordpress theme. Tag cloud good for SEO.

I will give so much credit to tags and tag cloud because SEO prospective tag are important.

how to add tag cloud to wordpress theme

What is a tags and Tag cloud?

This is the process of adding keywords which link directly to a site that monitors and allows search of key tags to find information on websites and blogs.

Tag cloud are also same but that will attract the users and give more information about topics which write in your blog. Keep this in mind tag are really important for SEO.

In this article I will show how to create the beautiful tag using wordpress api.

In your template you will found the single.php and page.php or index.php files in that file, You are already using some loop for fetching the posts. In that loop just put following code for displaying the tags.


the_tags( $before, $separator, $after );

<php the_tags();?>

Now comes interesting part,  adding a tag cloud to your sidebar or footer.

Using following code you can display the tag could but don’t put following code in any loop.


<!--?php wp_tag_cloud('smallest=8&largest=22'); ?-->

If you want to show tag cloud more interesting than use my code in your style.css file.


.tags{
 clear:both;
 background:#FAFAFA bottom;
 margin:10px 0 10px;
 padding:12px 10px 15px 10px;
 -moz-box-shadow:0 2px 2px rgba(0, 0, 0, 0.2);
 width:auto;
 margin-bottom:5px;
 width:304px;
 border:1px solid #cfdcc7;
}

.tags a:link,.entry a:visited {
 font-weight:normal;
 color:#356BB2;
}
.tags a:hover {
 background:#356BB2;
 color:#fff;
 font-weight:normal;
 text-decoration:none;
}

Your tag cloud will look like..as follows.

how to add tag cloud to wordpress theme
how to add tag cloud to wordpress theme

you can pass following param to tag_cloud function.


More help full function tag related as follows:

the_tags, tag_description, single_tag_title, wp_tag_cloud, wp_generate_tag_cloud, get_tags, get_the_tags, get_the_tag_list, get_tag_link

You can visit the pages and check the details.

wordpress vs wordpressmu

As we know the wordpress is best featured CMS and growing very fast. Thousands sites are building wordpress daily. When it comes to which wordpress CMS we need to use then You should think about following points. Points about wordpress vs wordpressmu

wordpress vs wordpressmu

I am WordPressMU fan frankly speaking but that comes after words. When you are choosing wordpress client in senorio you should better understand the requirement and future plans of client.

In this article I am going to talk about some good features of both (wordpress and wordpressMU). We should also discuss about when to choose wordpress and when to choose wordpressmu.

——————————x———————x———————————–x—————

  • Use WordPress When following criteria is fitting with your client.
wordpress vs wordpressmu
wordpress vs wordpressmu

1. When client want create website in very less time

2. There are only few admin are going to handle the site

3. There is not so much huge amount of data to listed on website

4. Client is no huge future plans about website

5. If client want so much free plugins or many features.

6. Client has less knowledge about handling CMS

7. For single small firms  and business like (lawyer, Doctor, real estate agents, builders, witter,  advertiser,   engineers, professionals). In this situation wordpress is best suitable.

8. For small sites and wordpress will give the best performance.

9. SEO purpose wordpress is the best tool.

10. You will get so many free plugins and tools for wordpress

11. You will easily get the so much help and documentation

12. wordpress will always get first update from wordpress compnay

13. Performance – WordPress gives the is best in performance. But you should think about data size.

————————x———————————x—————————x——————————–

  • Use WordPressMU When following criteria is fitting with your client.
wordpress vs wordpressmu
wordpress vs wordpressmu

1. When Client has big future plans with the website

2. There is enough time develop the site

3. If client is agree to develop custom solutions

4. If client is taking interest and he is having some knowledge about CMS

5. They are so many authors going to write and mange the website

6. There is very huge data need to be insert in website

7. For Big firms and business like (Magazine, Publication house, book writters, groups, social community, Big manufactures, big offices…etc). In this situation wordpressmu is the best solution.

8. For bigger sites I would recommend use wordpressMU

9. SEO purpose wordpressmu is also good but you need to do some customization in code.

10. For wordpressmu there are always few plugins and tool. (No plugins like wordpress)

11. You will get documentation and help but limited becasue not so many developers working on WordPressMU

12. WordPressMU always wait for update from wordpress company

13. Performance – WordPressMU gives best in performance in any condition.

But still I say I love WordPressMU and I think in future automatic will merge wordpress with wordpressMU.

So have fun and develop sites in wordpress.

Advanced rounded corner with only css

CSS tutorial, Advanced rounded corner with only css. I got so many scripts which had solution with javascripts and some are given solutions with images.

In one of my project I got requirement about half rounded corner in header and footer.

Advanced rounded corner with only css

But I want customize every thing like color of rounded corner header background, footer background and border also.

I did so much R&D about same but did not found any solution.

So I tried to code myself in CSS and I got succeed in that.
In this article I am going to share the code with you.

first put my style sheet in your webpage.

<style type="text/css">
body {background-color: #fff;font: normal 10pt ,Arial,sans-serif;}

img{border:none;}

.wordpressapi-main{
 clear:both;
 float:left;
 width:300px;
 /*border:1px solid #f00;*/
}

.wordpressapi_round_header {
 background-color: #ddd;

 -moz-border-radius: 15px 15px 0px 0px;
 -webkit-border-radius: 15px 15px 0px 0px;
 border-radius: 15px 15px 0px 0px;
 /*behavior: url(border-radius.htc);*/
 text-align:center;
 padding:5px 0px 5px 0px;
 clear:both;
 float:left;
}

.wordpressapi_round_footer {
 background-color: #ddd;

 -moz-border-radius: 0px 0px 15px 15px;
 -webkit-border-radius: 0px 0px 15px 15px;
 border-radius: 0px 0px 15px 15px;

 /*behavior: url(border-radius.htc);*/
 text-align:right;

 clear:both;
 float:left;

}
.wordpressapi_round_middle {
 text-align:center;
 color:blue;
 clear:both;
 float:left;
}
.inner_ad {
 padding:10px;
 text-align:left;
 color:black;
 font-size:12px;
 vertical-align: middle;

}
.round_heading{
font-size:16px;
line-height:26px;
font-weight:bold;

}

/* rounded corners */
.wordpressapi-blue-round-container{ /*margin-top:10px;*/}
.wordpressapi-blue-round-container-top, .wordpressapi-blue-round-container-bot, .wordpressapi-acco-top, .wordpressapi-acco-bot {
 display:block;
 background:#fff;
 font-size:1px;
 clear:both;

}
.blue-round-t1, .blue-round-t2, .blue-round-t3, .blue-round-t4 {display:block; overflow:hidden;}
.blue-round-t1, .blue-round-t2, .blue-round-t3 {height:1px;}
.blue-round-t2, .blue-round-t3, .blue-round-t4 {
 background:#0000FF;
 border-left:1px solid #ccc;
 border-right:1px solid #ccc;
}
.blue-round-t1 {
 margin:0 5px;
 background:#0000FF;
 border-top:1px solid #ccc;
 height:0px;
}
.blue-round-t2 {margin:0 3px; border-width:0 2px;}
.blue-round-t3 {margin:0 2px;}
.blue-round-t4 {height:2px; margin:0 1px;}

.white-round-t1, .white-round-t2, .white-round-t3, .white-round-t4 {display:block; overflow:hidden;}
.white-round-t1, .white-round-t2, .white-round-t3 {height:1px;}
.white-round-t2, .white-round-t3, .white-round-t4 {
 background:#FFF;
 border-left:1px solid #ccc;
 border-right:1px solid #ccc;
}
.white-round-t1 {
 margin:0 5px;
 background:#FFF;
 border-top:1px solid #ccc;
 height:0px;
}
.white-round-t2 {margin:0 3px; border-width:0 2px;}
.white-round-t3 {margin:0 2px;}
.white-round-t4 {height:2px; margin:0 1px;}

.wordpressapi-blue-round-contents{
 display:block;
 border:1px solid #000;
 border-width:0 1px;
 padding: 0 15px;
 background:#0000FF;
 color:#000;
 text-align:justify;
 width: 878px;
 clear:both;
 float:left;

}

.hold{
 border-left:1px solid #ccc;
 border-right:1px solid #ccc;
 clear:both;
 float:left;
 width:298px;
}

.inner-adds-bottom{
 padding-top:1px;
 clear:both;
 float:left;
}

/* rounded corners */

.cross-img, .cross-img:link, .cross-img:hover{
 background:url(close_button.gif) no-repeat center;
 width:12px;
 height:12px;
 display:inline-block;
}

.info-img, .info-img:link, .info-img:hover{
 background:url(information_btn.gif) no-repeat center;
 width:12px;
 height:12px;
 display:inline-block;
}
</style>

Then Put following code in your HTML body.

Advanced rounded corner with only css
Advanced rounded corner with only css

You will get the following result as follows:

Download the main html file from  here: Advanced rounded corner with CSS