Sunday, 17 March 2013

Facebook Open Graph Meta Tags For Blogger


The Open Graph protocol enables developers to integrate their pages into the social graph. It works the same way as Twitter Card.

After using Open Graph META tags, Facebook show more detail about your posts to give readers a little preview of what they'll see when they click your link. Adding META tags to your blog to allow links to your site to be more informational when shared. You can learn more about Open Graph Protocol at this link.

Open Graph META Tags:

Before starting this tutorial, let me explain about the properties of META tags. The four required properties for every page are:

  • og:title - The title of the page.
  • og:type - The type of your object, e.g., blog, article, site.
  • og:image - An image URL which should represent your object.
  • og:url - The canonical URL of your object. Make sure that you have uploaded your images from Blogger Post Editor or is hosted on Picasa Web Album.

The following properties are optional for any object and are generally recommended:

  • og:site_name - The title of your blog.
  • og:description - A one to two sentence description of your object.

Optional Open Graph META Tags For Facebook:

These two META tags are option. You can add them to administrate your page from Facebook. To apply these META tags, you need either your Facebook account or your Facebook application ID (or both).

  • fb:admins - Your Facebook profile ID or Username.
  • fb:app_id - The application ID provided by Facebook App.

Adding Open Graph META Tags To Blogger:

Now, I'll show you how to perfectly add these META tags to your blog's template. Don't forget to backup your template.

  • Go To Blogger > Template > Edit HTML > Click on "Proceed"
  • Once you've opened up your template, find the </head> tag in your template's markup. Enter this markup directly above the </head> tag:
<!-- facebook open graph meta tags starts bwidgets.com -->

<b:if cond='data:blog.pageType == &quot;index&quot;'>
<meta expr:content='data:blog.pageTitle' property='og:title'/>
<meta content='blog' property='og:type'/>
<b:else/>
<meta expr:content='data:blog.pageName' property='og:title'/>
<meta content='article' property='og:type'/>
</b:if>
<meta expr:content='data:blog.canonicalUrl' property='og:url'/>
<meta expr:content='data:blog.title' property='og:site_name'/>
<b:if cond='data:blog.postImageThumbnailUrl'>
<meta expr:content='data:blog.postImageThumbnailUrl' property='og:image'/>
<b:else/>
<meta content='Logo URL' property='og:image'/>
</b:if>
<b:if cond='data:blog.metaDescription != &quot;&quot;'>
<meta expr:content='data:blog.metaDescription' property='og:description'/>
</b:if>
<meta content='App-ID' property='fb:app_id'/>
<meta content='Facebook-profile-ID' property='fb:admins'/>

<!-- facebook open graph meta tags ends bwidgets.com -->

In above code, make following changed:

  • Replace Logo URL with your blog's logo URL.
  • Replace App-ID with your the application ID provided by Facebook App.
  • Replace Facebook-profile-ID with your Facebook profile id or username.

If you don't want to add option Facebook META tags, then you can remove following lines from above code:

<meta content='App-ID' property='fb:app_id'/>
<meta content='Facebook-profile-ID' property='fb:admins'/>

Test Your Markup:

You can test your blog's Open Graph META tags markup by using Facebook's official parser and debugger.

Wednesday, 13 March 2013

Styling Tables With CSS


Styling dinner tables in not so easy unlike HTML tables. Using CSS to style a table is easy, and greatly simplifies the markup. Seriously, for the first time it looks a bit hard, but it's just too easy. At times it seems that tables are a little misunderstood in modern web development. A have one suggestion for you, "don't use tables" "don't use tables for layout."

Anyways, Before we dive into the CSS, let’s consider the key structural elements of tables you will need to style clearly:

  • Table headings
  • Table data cells
Here is our basic HTML mark-up:

<table>
<tbody>

<tr>
<th>Name</th>
<th>Nickname</th>
<th>Finisher</th>
</tr>

<tr>
<td>John Cena</td>
<td>The Champ</td>
<td>Attitude Adjustment</td>
</tr>
<tr>
<td>CM Punk</td>
<td>Best In The World</td>
<td>Go To Sleep</td>
</tr>
<tr>
<td>The Undertaker</td>
<td>Dead Man</td>
<td>Tombstomb Piledriver</td>
</tr>
<tr>
<td>Shawn Michaels</td>
<td>HBK</td>
<td>Sweet Chin Music</td>
</tr>
<tr>
<td>Edge</td>
<td>Rated R Superstar</td>
<td>Spear</td>
</tr>

</tbody>
</table>

Without CSS, it will something like this:

Name Nickname Finisher
John Cena The Champ Attitude Adjustment
CM Punk Best In The World Go To Sleep
The Undertaker Dead Man Tombstomb Piledriver
Shawn Michaels HBK Sweet Chin Music
Edge Rated R Superstar Spear

The first decision is how wide to make the table. The browser default is the same as setting table { width: auto; }, which results in the table extending to the width of the content. Our tables are going to be 500px. Here is first design:

Name Nickname Finisher
John Cena The Champ Attitude Adjustment
CM Punk Best In The World Go To Sleep
The Undertaker Dead Man Tombstomb Piledriver
Shawn Michaels HBK Sweet Chin Music
Edge Rated R Superstar Spear

Above style is very simple and stylish. Our table has black background with 500px width, td has 5px padding, here is full CSS of above table:

table {
    background:black;
    width:500px;
}

td {
    padding:5px;
}

th {
    background:grey;
    color:white;
}

tr {
    background:whitesmoke;
}

It was simple... :) Now it's time for second style:

Name Nickname Finisher
John Cena The Champ Attitude Adjustment
CM Punk Best In The World Go To Sleep
The Undertaker Dead Man Tombstomb Piledriver
Shawn Michaels HBK Sweet Chin Music
Edge Rated R Superstar Spear

The simplest way to accomplish zebra stripes is to add a class to alternate table rows, then use a contextual CSS selector to style the cells in those rows. First, the classes "odd" and "even" are added to the table rows, like so:

  ...

<tr class="odd">

  ...

<tr class="even">

  ...
But wait, Beben Koben shared a great way (in comments) to style even/odd elements without changing our mark-up. We're going to use :nth-child(even) and :nth-child(odd) to style them:

Here is full CSS of this table:

table{
    width:500px;
    border:2px black solid;
}

td {
    padding:5px;
}

th {
    background:grey;
    color:white;
}

table tr:nth-child(even) {
    background-color: whitesmoke;
}

table tr:nth-child(odd) {
    background-color: lightgrey;
}

It's time for our final table, which is not created by me. It's from W3Schools. Here we go:

Name Nickname Finisher
John Cena The Champ Attitude Adjustment
CM Punk Best In The World Go To Sleep
The Undertaker Dead Man Tombstomb Piledriver
Shawn Michaels HBK Sweet Chin Music
Edge Rated R Superstar Spear
It looks awesome, isn't it? W3 Schools chose some great colors to create this table. Here is our CSS:

table{
    background-color: rgb(255, 255, 255);
    border: 1px solid rgb(195, 195, 195);
    border-collapse: collapse;
    width: 500px;
}

th {
    background-color: rgb(229, 238, 204);
    border: 1px solid rgb(195, 195, 195);
    padding: 3px;
    vertical-align: top;
    text-align: left;
    font: 14px/20px Arial,Verdana;
}

td {
    border: 1px solid rgb(195, 195, 195);
    padding: 3px;
    vertical-align: top;
}

That's it for this time...hope it was helpful :) And I just realized that thumbnail of this article is not featuring our second table (Fixed IT). Also, just wanted to inform you that I used WWE related names and all in table because I'm a huge fan.

MyLikes: Easy Way To Earn With Twitter


MyLikes is a social advertising platform that allows users to share advertiser content through social media, and earn money on a per-click basis. If you have a large number of fans on social media, then you can easily earn some good amount of money from MyLikes.

Go to MyLikes, and sign-up as a publisher. Find advertising campaigns you like and create sponsored videos, tweets, tumbles or blog posts. Earn money each time you receive a click or view. Get paid weekly with Paypal or Amazon gift cards.

MyLikes has a minimum balance of only $2 to send you payment! Once you start earning from clicks, they will send you payment every Friday! If you don't have a Paypal account, you can also receive payments as an Amazon.com gift card. If you do not provide them with a PayPal email address, then they will send your payment as an Amazon.com gift card to the email address associated with your MyLikes account.

MyLikes also has a widget for blog, which is a great way to transform your traffic into some quick money. MyLikes is not a spam or anything. I can assure you that it works. It's already used by millions of Twitter users and they're earning way too much. Even Snooki from Jersey Shore is using MyLikes.

Tuesday, 12 March 2013

How To Backup Your Tweets


We all have some good tweets stored in our Twitter, which are really important to us. Shawn Michaels has replied to me three times, which is a great honor for a Wrestling fan like me. Twitter will only save your most recent 3,200 tweets. And your tweets are only searchable for roughly a week and a half.

Don't worry, you can backup your valuable tweets for free. Twitter is in process of releasing a new “Export Tweets”. The Export Tweets feature is in the process of being rolled out to all Twitter users. Until then, we'll use another great service call TweetBackup to backup our tweets.

TweetBackup runs over the internet, meaning there's nothing to install and no work required on your part. The only thing we require, is to follow @tweetbackup. As of writing, TweetBackup has 425,862,240 archived tweets!

Monday, 11 March 2013

Email Subscription Slider Widget For Blogger


This widget is inspired from Social Subscription Scrolling Slider Widget. It's feed subscription form, which will slide out after scrolling the page little bit. It's based on jQuery, so don't forget to remove jQuery from our code, if your blog already has it.

I created this widget past Saturday for my blog but then I thought that I should share this with you all. As of writing, this widget will appear on our blog as you scroll down a little bit.

Add This To Blogger:

  • Go To Blogger > Layout > Add A Gadget > HTML/JavaScript
  • Paste following code and click on Save:

<!-- Email Subscription Slider Widget For Blogger by BWidgets -->
 <script type="text/javascript" src="http://widcraft.googlecode.com/svn/jquery.min.js"></script>
<script type="text/javascript">$(window).scroll(function(){if($(document).scrollTop()>=$(document).height()/4)$("#bwsocialslide").show("slow");else $("#bwsocialslide").hide("slow");});function closebwsocialslide(){$('#bwsocialslide').remove();}</script>

<style>
#bwsocialslide{
  background:#f3f3f3;
  -moz-box-shadow:inset 0 0 1px #333;
  -webkit-box-shadow:inset 0 0 1px #333;
  box-shadow:inset 0 0 1px #333;
  padding:12px 14px 12px 14px;
  width:250px;
  position:fixed;
  bottom:13px;right:0px;
  display:none;
  z-index:3;
  height:65px;
}
.bw-email{
  padding:5px 0 0 5px;
  float:left;
  font-size:1.4em;
  font-weight:bold;
  margin:0 0 10px 0;
  color:#686B6C;
}
.bw-emailsubmit{
  background:#9B9895;
  cursor:pointer;
  color:#fff;
  border:none;
  padding:3px;
  text-shadow:0 -1px 1px rgba(0,0,0,0.25);
  font:12px sans-serif;
}
.bw-emailsubmit:hover{
  background:#E98313;
}
.textarea{
  padding:2px;
  margin:6px 2px 6px 2px;
  background:#f9f9f9;
  border:1px solid #ccc;
  resize:none;
  box-shadow:inset 1px 1px 1px rgba(0,0,0,0.1);
  -moz-box-shadow:inset 1px 1px 1px rgba(0,0,0,0.1);
  -webkit-box-shadow:inset 1px 1px 1px rgba(0,0,0,0.1);
  font-size:13px;
  width:170px;
  color:#666;
}
</style>

<div style="display: none;" id="bwsocialslide">
<a style="position:absolute;top:14px;right:10px;color:#555;font-size:10px;font-weight:bold;" href="javascript:void(0);" onclick="return closebwsocialslide();">(X)</a>

<div class="bw-email">
Subscribe via Email <form action="http://feedburner.google.com/fb/a/mailverify" id="feedform" method="post" target="popupwindow" onsubmit="window.open('http://feedburner.google.com/fb/a/mailverify?uri=widgetcraft', 'popupwindow', 'scrollbars=yes,width=550,height=520');return true">
<input gtbfieldid="3" class="textarea" name="email" onblur="if (this.value == &quot;&quot;) {this.value = &quot;Enter email address here&quot;;}" onfocus="if (this.value == &quot;Enter email address here&quot;) {this.value = &quot;&quot;;}" value="Enter email address here" type="text" />
<input type="hidden" value="widgetcraft" name="uri"/><input type="hidden" name="loc" value="en_US"/>
<input class="bw-emailsubmit" value="Submit" type="submit" />
</form>
</div>
</div>
<div class='clear'></div>
<!-- Email Subscription Slider Widget For Blogger by BWidgets -->

In above code, replace widgetcraft with your feed id. You are free to share this widget with your fans and friends. Please attribute the credits back to our blog as the only favor in return. Don't forget to leave a comment.

Sunday, 10 March 2013

Easiest Way To Make Money From Social Media

There are actually many ways to make money from social media. However, you need a strong fan base to make it work. In this post, we will discuss about some ways, which could help you to earn some money from your social media.

Twitter is a great way for people with same interest to connect and share their ideas and thoughts. You may know some Twitter accounts with some large number of followers. They just tweet funny things and some links. It's hard to accept but they are probably making some big amount of money with their tweets.

Just like them, you can also earn some money with your 140 chars. You may have to tweet, blog, tout, post, upload or pin. Here are some ways to use your social media power:

Social Media Manager:

A social media manager is the person responsible for managing a brand or company’s social media presence. Social media management doesn’t require a lot of education or experience as you may already have the skills to start doing it right now.

A social media manager manages their client's social presence across all the social platforms. As a social media manager, you'll be represent your client across all the social platforms that they intend to use like Facebook, Twitter, Youtube, LinkedIn, Google+, Pinterest…etc.

It's your duty to interact with your brand's audience, reply them, build social media strategies, keep it clean, and more. I bet that you already know how to do most of the things. According to Mashable.com, a social media manager’s salary could go beyond the $100k mark depending on their location and expertise.

Advertising Products:

If you have a strong fan base then you can also use your social media profile to advertise a client's products or websites. Your client will pay you for tweeting or posting his product on your social networking profile. It could be a tweet, blog post or even a YouTube video.

Get started by contacting local dealers and new websites who want to get out into the market. It's just like putting a banner on your blog. Twitter and YouTube are the best way to advertise your client's products.

You can also promote and recommend certain products or services to your followers. You can also use some pay-per-click services that allows you to earn by tweeting their products.

Affiliate Marketing:

Affiliate marketing is a type of performance-based marketing in which a business rewards one or more affiliates for each visitor or customer brought about by the affiliate's own marketing efforts.

Your affiliate host will provide you with your personal affiliate link. You can always track your link by using url shortening services, such as bit.ly. So whenever a follower clicks on your link, it is considered as a referral on your behalf, and you will get some percentage of that sale.

For example, if someone is asking your advice on the best domain registrar, you can refer them to your domain registrar via your referral link. The amount varies with different affiliate programs.

That's all for this time folks. Remember, you can earn with all above methods but keep it clean and spam free. In some future posts, we will be focusing on Money Blogging.

Saturday, 9 March 2013

Combine Multiple Feeds Into One


Using web feed is a way of providing content to the user's browser or desktop in an efficient and easy way. In this post, we will not talk about creating a feed or anything like that. It's always hard to track every single feed, so we'll combine them into one.

By combining feeds you'll be able to put a variety of content into your website or favorite rss aggregator with a single rss feed by merging RSS feeds.

We don't need to download any crappy software, plugin or extension to combine our feeds. Last night, I searched and used bunch of services to combine/merge/mix feeds into one. Finally, I found three great services to do this, which are following:

RSS Mix: Mix any number of RSS feeds into one unique new feed! To create a new RSS Mix, copy and paste the URLs of the existing source feeds into the RSS Mix and hit Create! No signup required!!!

Feed Killer: The service is extremely simple and it is completely free! Enter the URLs of the feeds you want to merge Specify how many stories/entries from that feed you would like to have in your custom feed. No signup required!!!

Feed Combine: Feed combine can mix your feeds and combine RSS, RDF and Atom feeds into one feed-format! Just register, combine your favorite RSS feeds and subscribe the easy-to-use RSS feed URL.

That was easy....Don't forget to leave your response.

Friday, 8 March 2013

Twitter Followers Box Widget For Blogger


Facebook provides us a Like Box widget, which is great way to get more likes to your Facebook page from your blog/site. While Twitter developers were just too lazy to create something like that, Mark Carey created a Twitter Fan Box, which works just like the popular Facebook Fan Box, with a few small differences.

Twitter Fan Box displays the 10 most recent followers, which encourages people to follow your Twitter account. When someone clicks the "Follow" button, a popup appears for them to login to their Twitter account or authorize Twitter Fan Box.

Add Twitter Fan Box To Blogger:

  • Go To Blogger > Layout > Add A Gadget > HTML/JavaScript
  • Paste following code and click on Save:

<!-- Twitter Fan Box -->
<script type="text/javascript" src="http://s.moopz.com/fanbox_init.js"></script><div id="twitterfanbox"></div><script type="text/javascript">fanbox_init("HardeepAsrani");</script>
<!-- End Twitter Fan Box -->

Don't forget to replace HardeepAsrani with your Twitter handler. You can test this widget by following me:

Wednesday, 6 March 2013

Choosing A Perfect Name For Your Blog

Choosing a perfect name for your blog can be one of the most hardest and important thing. You want a name that portrays whatever your blog is about in a clear and concise manner. You can choose two types of names for your blog, relevant or something outside the box. Below are things to consider when choosing a blog name:

Related To Your Niche:  Make sure your blog's name is related to your blog's niche. It should give your visitors an idea about your blog. It's recommended that you focus on the main topic of your blog.

Easy To Remember: It must be easy for your visitors to remember. Be creative with your name but make it short and easy. Don't choose a ten word name for blog, which would look a bit awful. Stick with easy to remember names. Always try to pick a name with two or three words. Bored Panda is an epic name!!

Search For Available Domain Names:  This point is often ignored by people, probably because it's really hard to find a domain name of your choice that has not been registered yet. Always choose .com, .net or .org for your blog. If you're blogging about yourself then .me or .name is also a good choice.

Don't Be A Copycat: Copying a famous website or blog's name is not a great idea. You don't want to copy one of your competitor's blog names, so don't forget to Google a name before choosing it. Picking a famous website's name is also not good for your reputation. People will look your blog as a copy, even if it's not. Make sure it’s a name that will not get confused with other products, or services for that matter.

That's all for this time. These are just some few tips from me. In additional, asking your family and friends is also a great idea.

Rest In Peace ~ William "Paul Bearer" Moody (April 10, 1954 – March 5, 2013) ~ Greatest Pro-Wrestling Manager ~ Reason behind The Undertaker's success.... Miss yea Uncle Paul :'(

Tuesday, 5 March 2013

Hiding Links Inside Blogger Comments


Good News!!! The percentage on SPAM has not increased since the last year. Great, you know how high was the percentage last year? 100%!!!

Spam everywhere on your blog comments? Well, it's hard to find and delete every single spam comment from your blog. Even in Blogger, spammers will always target your blog's comment form to spread spam. Blogger's inbuilt spam filter will stop almost every possible spam comments but this will not solve the problem.

Last year, I shared a nice way to reduce email spam. Prayag Verma came up with a simple jQuery powered hack that hides any clickable link and just displays its text.

Code:

<script src='https://widcraft.googlecode.com/svn/jquery.js'/>
<script> 

$('.comment-content a[rel$=nofollow]').replaceWith(function(){return ($(this).text());});

</script>

Add it just before the </body> tag in the Edit HTML. If you want to completely remove the links from the comments , then use this code instead:

<script src='https://widcraft.googlecode.com/svn/jquery.js'/>
<script> 

$('.comment-content a[rel$=nofollow]').hide());

</script>

This works for the Threaded Comments in Blogger, incase you want to make it work for the old Comments in Blogger , then the code is as follows:

<script src='https://widcraft.googlecode.com/svn/jquery.js'/>
<script> 

$('.comment-body p a[rel$=nofollow]').replaceWith(function(){return ($(this).text());});

</script>

Hope this will reduce some spam from your comments. Don't forget to leave your comments...

Popular Posts

 
Powered by Blogger.