Web Hosting
Web Hosting

Wednesday, November 9, 2011

Help Your Website Achieve Google Sitelinks

What are sitelinks?

The sitelinks are meant to help your website visitors who search your site name to navigate more easily directly from Google search. While the links are completely automated by Google, you can control them within Google's Webmaster Tools by blocking those that you would not like listed.

What's the benefit?

While Google proclaims that it helps users navigate your site, it also has additional benefits that include:

Google search page coverage – simply it takes up more space on the page which draws attention to your site. Mix it up with Google Adwords and give your website an even better chances of being clicked when searched.
Gets more traffic to internal pages and older posts – encourages visitors to dig deeper into your site and learn more about your company/brand.
Indirectly shows success – Typically only the top websites by Google's standards get sitelinks, so if you luck out, might as well toot your own horn a bit
In addition to also recently noticing that TDC holds a PageRank of 4 in six months, I was unclear how these sitelinks came about. What had I done to achieve these little links of joy?

What can you do?

While Google does not directly state how to achieve sitelinks there has been much discussion around the web in regards to what you can do to increase your chances and amount of time it takes to be awarded with them. Here are a few I've pulled from various studies and observations:

  1. Your site ranks first for the keyword(s) that generate the sitelinks listing
  2. Simple and structured navigation
  3. A fairly high and consistent flow of traffic
  4. High click through rates from the search results page
  5. Useful outbound links
  6. Inbound links from high quality sites
  7. Site age – in age we trust!
  8. Write useful content on your blog
  9. Submit a sitemap in your Google Webmasters Tool panel. If you are using WordPress check out this sitemap plugin.
  10. Use good SEO practices. WordPress users should install the all-in-one SEO pack
  11. Just because you are a "big name" does not necessarily mean your awarded sitelinks. Try Googling 'Doritos'.
Remember: The above do not guarantee that your site will get sitelinks. They are only tried and tested and may be involved in the appearance of sitelinks. What have you done to help being rewarded with Google Sitelinks? Share your tips and thoughts in the comments below.

Saturday, November 5, 2011

How To Use, Style and Implement WordPress Shortcodes

WordPress shortcode API is a powerful function which was introduced from version 2.5, it’s just a simple set of functions for creating macro codes in post content. If you’ve developed a Vbulletin forum before, you would have been familiar with the shortcode (something called BBCode) but the WordPress users maybe not. In this article, I would like to show you how to create and use shortcodes, in addition, I will show you some creative examples of using shortcode in WordPress blog.

What Are Shortcodes?

The shortcodes I’m going to introduce are very simple and easy to use, they look like this:

[text][/text], [clip][/clip], [flv][/flv], [flash][/flash].....

The shortcodes may have attributes or without attributes, so we will go from the easy first.

WordPress Shortcodes without attributes

Example of the shortcodes without attributes:

[text][/text]

How to create? It’s most simple, let’s add the code below to your functions.php file (stored in your current theme directory):

function text() {
return 'Good morning'; } add_shortcode('gm', 'text');

As you see in the code above, the first thing I do is create a function like any other WordPress functions, the function will return the text “Good morning” when called then I add the API call to register the shortcode handler:

add_shortcode('gm', 'text');

The first parameter is a name of the shortcode and the second parameter is the name of the function will be called, in my situation is “text”.

How to use? When posting a new article, whenever you want to display the “Good morning” text, switch the editor to HTML mode and type the following shortcode:

[gm]

WordPress Shortcodes with attributes

WordPress Shortcodes with attributes are more complicated, for example:

[text attribute=""][/text]

The code you should add to your functions.php is:

function text($atts) {
 extract(shortcode_atts(array(
  'attribute' => 'Good morning' // The default value if you do not pass the attribute to the shortcode
 ), $atts));

 return $attribute;
}
add_shortcode('gm', 'text');

How to use? With attributed shortcode you should pass the value of the attributes to the shortcode when using, if not, the function will use the default value:

[gm attribute="Good night"]

… will output “Good night”, but:

[gm]

… will output “Good morning”

WordPress Shortcodes with attributes and content

After reading and trying two trivial examples above, it’s the time to go to the WP shortcodes which you will deal with a lot of time, let’s see this example:

function a($atts, $content = null) {
 extract(shortcode_atts(array(
        "class" => '',
        "rel" => '',
  "url" => ''
 ), $atts));
 return '<a class="'.$class.'" rel="'.$rel.'" href="'.$url.'">'.$content.'</a>';
}
add_shortcode('link', 'a');

Notes:

  • $atts: an array of attributes.
  • $content: the enclosed content.

So if the shortcode I place on the post editor is:

[link url="http://www.google.com" rel="nofollow" class="hyperlink"]Google[/link]

… the result will be:

<a class="hyperlink" rel="nofollow" href="http://www.google.com">Google</a>

Other ways of using this shortcode:

[link] or [link/] will return: <a></a>
[link]Google[/link] will return <a>Google</a>

Shortcodes were parsed after post formatting was applied so If you do want your shortcode output to be formatted, you should call wpautop() or wptexturize() directly when you return the output from your shortcode handler.WordPress.org

WordPress shortcode is not too hard to understand, and it help you to create a dynamic content for your web blog, you could make anything you want with it, the only limitation is just your imagine, next up I would like to show you how to take advantage of it.

Create Special List Styles

checklist

You could create a special list styles easily with shortcodes, first add the code below to your functions.php file:

function checklist($atts, $content = null) {
 return '
<div class="checklist">'.$content.'</div>
';
}
add_shortcode('checklist', 'checklist')

This shortcode will wrap the <div> around the specific content and we will markup this <div> element by adding to your css file:

.checklist ul {
margin-left:50px;
list-style:none!important
}
.checklist ul li{
padding:5px 5px 5px 30px;
background:#fff url(images/check.png) no-repeat center left
}

Using:

[checklist]
<ul>
 <li>Lorem ipsum dolor sit amet</li>
 <li>Lorem ipsum dolor sit amet</li>
 <li>Lorem ipsum dolor sit amet</li>
 <li>Lorem ipsum dolor sit amet</li>
</ul>
[/checklist]

Thanks to http://www.dezinerfolio.com for the free icon set.

Create Box Styles

box-style

The code:

function box($atts, $content = null) {
 return '
<div class="box">;'.$content.'</div>
';
}
add_shortcode('box', 'box');[php]
The css:
[css].box {
background:#bfe4f9;
border:1px solid #68a2cf;
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
padding:10px
}[/css]
Using:
[html][box]Mauris ut lectus erat. In condimentum, turpis ac ultricies laoreet, felis ante aliquet nulla, vitae volutpat nunc sapien eget quam. Proin auctor auctor mollis. Curabitur congue sem ante, luctus euismod lorem. In iaculis ultrices lorem, ut viverra ipsum fringilla.[/box][/html]
<h3>Create Dropcaps</h3>
<img src="http://www.tuttoaster.com/wp-content/uploads/2010/06/dropcap1.png" alt="dropcap" width="517" height="96" />

The code:
[php]function dropcap($atts, $content = null) {
 return '
<div class="dropcap">'.$content.'</div>
;';
}
add_shortcode('dropcap', 'dropcap');
]

The css:

.dropcap {
display:block;
float:left;
font-size:50px;
line-height:40px;
margin:0 8px 0 0;
}

Using:

Mauris ut lectus erat. In ...

Create A Download Button

download

The code:

function download($atts, $content = null) {
 extract(shortcode_atts(array(
  "url" =&gt; ''
 ), $atts));
 return '<a class="download" href="'.$url.'">'.$content.'</a>';
}
add_shortcode('download', 'download');

The css:

.download {
display: inline-block;color:#fff;
font-weight:bold;
font-size:1.2em;
background : -webkit-gradient(linear, left top, left bottom, from(#88c841), to(#73b338));
background : -moz-linear-gradient(center top, #88c841, #73b338);
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
border-radius: 5px;
padding: 5px 20px;
text-align: center;
-shadow: 0px 1px 0px #6c0909;
}

.download:hover {
background : -webkit-gradient(linear, left top, left bottom, from(#73b338), to(#88c841));
background : -moz-linear-gradient(center top, #73b338, #88c841);
}

Using:

[download url="http://www.google.com"]Download Google Chrome[/download]

Jquery Slide Up / Slide Down Shortcode

scroll

The code:

function slide($atts, $content = null) {
 extract(shortcode_atts(array(
  "title" =&gt;; ''
 ), $atts));
 return '<a class="slide">'.$title.'</a>

'.$content.'

';
}
add_shortcode('slide', 'slide');

The css:

.slide {cursor:pointer}
.slide-next {display:none}

The Javascript: (You can add the javascript code to your footer.php file)

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js" type="text/javascript"><!--mce:0--></script>
<script type="text/javascript"><!--mce:1--></script>

Using:

[slide title="Lorem ipsum dolor sit amet"]Mauris ut lectus erat. In condimentum, turpis ac ...[/slide]

Post Content In Column

column

The code:

function half($atts, $content = null) {
 return '
<div class="half">'.$content.'</div>
';
}
function half_last($atts, $content = null) {
 return '
<div class="half-last">'.$content.'</div>
<br style="clear: both;" />';
}
add_shortcode('half', 'half');
add_shortcode('half_last', 'half_last');

The css:

.half, .half-last {float:left;width:47%;margin:10px 0;margin-right:6%;}
.half-last {margin-right:0}

Using:

[half]Mauris ut lectus erat. In condimentum, turpis ...[/half]

[half_last]Mauris ut lectus erat. In condimentum, turpis ...[/half_last]

Of course, you could modify the code to create 3,4 or 5 columns post layout as your needs :) .

Create A Multiple URL Shortener Shortcode

This is an exclusive WordPress Shortcode I created for Tuttoaster.com, all you need to do is give shortcode the URL then it will shorten via the most 4 popular sevices: : tinyURL, Google shortener, is.gd and Su.pr (Stumbleupon), paste the code below to your functions.php file:

function getContent($url) {
    $content = '';
    if (function_exists('curl_init')) {
        $ch = curl_init($url);
        curl_setopt($ch, CURLOPT_HEADER, false);
        curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
        curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
        $content = curl_exec($ch);
        curl_close($ch);
    }
    elseif (ini_get('allow_url_fopen')) {
        $content = file_get_contents($url);
    }
    return $content;
}

function short($atts) {
 extract(shortcode_atts(array(
  "url" =&gt; ''
 ), $atts));
 $googledata = getContent("http://ggl-shortener.appspot.com/?url=$url");
    $googlejson = json_decode($googledata);

 $isgd = getContent("http://is.gd/api.php?longurl=$url");
 $tinyurl = getContent("http://tinyurl.com/api-create.php?url=$url");
 $google = $googlejson-&gt;short_url;
 $supr = getContent("http://su.pr/api?url=$url");

 $output = '
<ul>';
 $output .= '
 <li>Is.gs: <a href="'.$isgd.'">'.$isgd.'</a></li>
';
 $output .= '
 <li>Google: <a href="'.$google.'">'.$google.'</a></li>
';
 $output .= '
 <li>Tinyurl:<a href="'.$tinyurl.'">'.$tinyurl.'</a>;</li>
';
 $output .= '
 <li>Su.pr: <a href="'.$supr.'">;'.$supr.'</a></li>
';
 $output.='</ul>
';
 return $output;
}
add_shortcode('short', 'short');

How to use? It’s very simple, huh?:

[short url="http://url-need-to-be-shortened.com"]

And the result would be:

url-short

In the shortcode code above, I think you should register for the services account and using the callback with APIKey then your post content does not need to re-shorten the URL every-time loaded.

The next following is 2 shortcodes which I like most and I want to introduce to you:

Get posts from WordPress Database with a Shortcode

The code:

function sc_liste($atts, $content = null) {
        extract(shortcode_atts(array(
                "nombre" =&gt; '5',
                "cat" =&gt; ''
        ), $atts));
        //requete sur la BDD pour recuperr la liste de billet
        global $post;
        $myposts = get_posts('numberposts='.$nombre.'&amp;order=DESC&amp;orderby=post_date&amp;category='.$cat);
        $retour='
<ul>';
        foreach($myposts as $post) :
                setup_postdata($post);
             $retour.='
 <li><a href="'.get_permalink().'">'.the_title("","",false).'</a></li>
';
        endforeach;
        $retour.='</ul>
';
        //on renvoi la liste
        return $retour;
}
add_shortcode("liste", "sc_liste");

Using: (It will display 3 posts from the category ID = 1)

[liste nombre="3" cat="1"]

The code source.

Hide Content From The Public

The code:

function guest_check_shortcode( $atts, $content = null ) {
  if ( ( !is_user_logged_in() &amp;&amp; !is_null( $content ) ) || is_feed() )
  return $content;
 return '';
}
add_shortcode( 'guest', 'guest_check_shortcode' );
function member_check_shortcode( $atts, $content = null ) {
  if ( is_user_logged_in() &amp;&amp; !is_null( $content ) &amp;&amp; !is_feed() )
  return $content;
 return '';
}
add_shortcode( 'member', 'member_check_shortcode' );

Thursday, November 3, 2011

How To Install WhatsApp On iPod Touch and iPad Without Jailbreak

Whats app is an application for iPhoneAndroid and other mobile platform that lets you to send text message between your friends at free of cost. Whats app cannot be installed on iPod Touch and iPad because its not compatible with it. Now you can easily install it on your iPod Touch or iPad without Jail-breaking your device.

All you need is iPhone Configuration utility and iTunes.

Download iTunes For Windows and Mac

Download iPhone Configuration utility for Windows and Mac

In my case I tried with iTunes 10.5 Beta, iOS 5 and iPod Touch 4th Gen

Step To Follow

1. Open your iTunes and looks for the App that is not compactable with your iPod Touch or iPad

2. Install and open the iPhone Configuration utility before that make sure you connected your iDevice on Windows PC or Mac

3. Check on the left panel on iPhone configuration utility.

Click on application, Add file and locate the .ipa file you want to add or simply drag and drop the .ipa file to iPhone configuration utility

You can Locate the .ipa at the following path

For Mac user

/Music/iTunes/iTunes Media/Mobile Application

For Windows user

C:\Users\USER\Music\iTunes\iTunes Media\Mobile Applications

Note : The paths mentioned above are default ones, if you changed the path them check the .ipa file there.

4. Check for Devices on the left panel on iPhone configuration utility and make sure your iDevice is listed.

Click on your device and go to application. A list of applications will will shown and in our case you can see Install button next to wahts app. Click on it and allow few seconds

Give it some time it will be installed on your deice and you will see the uninstall button next to the app installed.

5. Now you can enjoy whatsapp on your iPod Touch or iPad. You can also do the same for other apps to make it force install if its not compatible with your iPod Touch or iPad

Screen Snaps from iPod Touch

Hope you enjoy whats app on you iPod Touch and iPad

We noticed that many users got kAMDRecieveMessageError Here is a solution to fix it..

Friday, October 28, 2011

How to turn off iPhone, iPod Touch Auto-Correct feature

If you one of those iPhone users who is not that geeky, it might be pretty bugging at times when iPhone's auto-correct feature keeps correcting your slang and hinglish typos' while emailing or sms'ing. There is an easy way you. You can turn off this auto-correct feature, here is how:

  1. Tap Settings icon
  2. Go to General > Keyboard menu
  3. Turn off Auto-Correction

You can now type anything without getting bugged. 

Thursday, October 27, 2011

Free Web Hosting Services without Ads.!

Often, people like to host their web pages on a Free Web Hosting server.. It may be because they want to host a personal web page or either they do not want to pay for web hosting.. Whatever the reason may be, people prefer using Free Web Hosting.


But one of the main disadvantages of Free Web Hosting Services is that they always come with ads..! It is very difficult to find premium web hosting services without ads. Even if you do, they limit your disk space or some of the services (like PHP, MySQL support etc.).. 

I used to search for free web hosting services but never used to find any.. I know how difficult it is to find one, so to help ya'll I list a few good ones I know..

1.    1.X10 Web Hosting - This is one of my favorites and one among the best free web hostingservices.. There are absolutely NO ADS (except for the 404 error page).. You get about 500 MB of free disk space and free sub domain.. It supports HTML,PHP, ASP.NET, CGI, Perl,MySQLetc.. You also get FTP support and also Webmail with POP3 support.. 

2.    2.HeliosHost - This is supposed to be one among the best, but the problem is it offers only alimited no of registrations per day.. This too doesn't have any ads.. It offers you about 250 MB free disk space and also a free subdomain.. Compared to x10 web hosting this gives support Ruby and Ruby on rails too.. You also get FTP support and also Webmail with support for unlimited email accounts and also POP3 and IMAP support.

3.   3. HostHelpers - Compared to the others this provides you with 1GB-5GB of free disk space..You have an option to select the free subdomain or the free .WS domain.. This supports PHP, MySQL, CGI/Perl.. You also get POP3 email accounts as well as SMTP support..

4.    4. FreeBeeHosting - FreeBeeHosting is another good free web hosting service but has some limitations.. You get about 600 MB of disk space and free co.cc domain.. This supports only CGI, SSI and PHP.. You can also have a maximum of 2 email accounts.. 

5.    5. FreeHostin - This web hosting provides almost similar services as HostHelpers.. From disk spaceto support for scripts, almost everything is similar..The only difference is that you get a free CO.CC domain..

These are a few best free web hosting services without ads.. Select the one which bests suits your needs and make the most out of your free web hosting service.. 

KP's Opinion - If you really want a professional hosting service without ads then x10 hosting and HeliosHost are the best.. The services they offer are really nice.. They also support a wide variety of scripts compared to the others.. You gotta try your luck daily if you want to get a HeliosHost account, as they give away only limited no of accounts daily.. X10hosting doesn't have any such conditions.. I myself have tried X10 hosting.. It's really awesome.. Worth trying..! :)..

 

 
Design by Free WordPress Themes | Bloggerized by Lasantha - Premium Blogger Themes | Facebook Themes