Thursday, 23 July 2015

Mega Menu with Images or Thumbnails for Blogger

Visual content holds a certain appeal that websites integrate images to every page, or even operate solely through photos. Now, with the new AJAX navigation menu widget, images can be added to the drop-down menu as well.

The AJAX navigation menu for blogger is a widget designed specifically for the Blogger platform. It is inspired from the Mashable website long before it was given a makeover. Despite the plain and simple inspiration, the drop down menu with images is a huge hit.

It works based on the jQuery library and Blogger JSON Feed API. Function-wise, it works just like a normal drop-down menu when JavaScript is disabled. For it to work online, a blog must be for public visitors, so the Blogger JSON Feed API will function as designed.

Features

Multi-Level Menu Support

The AJAX menu is a multi-level drop-down menu that is based on the standard unordered list of HTML. When a menu contains a sub-menu, it loads on the fly when a user rolls over the main menu. What is great about this is that it saves outgoing traffic, especially on a website that uses a large navigation.

Cross-browser Compatibility

Most AJAX applications will work across different browsers even with other plugins or proprietary technology already installed.  The menu with images works in the same premise, instead of being designed for a specific browser. Because there is no telling which browser you or your blog readers would use, the new AJAX drop-down mega menu with images is the ideal option.

Some of the Windows browser supported includes IE5+, Firefox, Google Chrome, Safari Netscape 7+ and Opera 8+. When you're using a Mac, the AJAX menu is supported on Firefox, IE and Safari. If JavaScript is disabled, however, the menu is still accessible, but only as pure CSS menu.

Automatic Sub-Menu Display

With the new AJAX menu, you only need to roll over a menu item and sub-menus will automatically load. No need to click on a menu to get the sub-menu to drop down. This not only saves users' valuable navigation time, but also outgoing traffic.

Menu Styling

AJAX menus can be styled by simply changing the megamenu.js and the CSS style. The former is used when javaScript is turned on, while the latter is when it is turned off. You can adjust the menu parameters manually or you can use ready-to-use templates.

There are plenty of other features, but you would not be able to use or experience them if you do not install the new mega menu with images. What do you need to do then to implement it in your blog or website?


Adding Mega Menu with Images/Thumbnails in Blogger

Step 1. Log in to your Blogger account, then go to the Dashboard. Select the blog where you want to install the new mega menu.

CSS

Step 2. Click on Template, then press the Edit HTML button. Press anywhere inside the code area and use the CTRL + F function to make your search quicker and easier. Type the following tag and hit Enter to find it:
]]></b:skin>
Once you find the tag, add the code below just above/before it:
.megamenu *{margin:0;padding:0;font-family:'PT Sans Narrow'}ul.megamenu{list-style:none;line-height:1;overflow:visible !important}ul.megamenu:after{margin:0;padding:0;content:' ';display:block;height:0px;clear:both}ul.megamenu li{float:left;display:inline;position:relative;text-transform:uppercase}ul.megamenu li a.menu-target:after{content:"";width:0;height:0;border-left:3px solid transparent;border-right:3px solid transparent;border-top:3px solid #fff;font-size:0;line-height:0;bottom:22px;right:5px;position:absolute}ul.megamenu li a{display:block;line-height:50px;padding:0px 20px;text-decoration:none;border-left:1px solid #000;box-shadow:1px 0 0 0 rgba(255, 255, 255, 0.1) inset;color:#d9d9d9;font-size:14px;transition:all 0.3s ease-in-out}ul.megamenu li a:hover{background:#111111;color:#fff}ul.megamenu ul{position:absolute;display:none;top:100%}ul.megamenu li:hover > ul{display:block}ul.megamenu ul li{z-index:72;min-width:149px;float:none;background:#000;text-shadow:none}ul.megamenu ul li a{text-transform:none;font-weight:normal}ul.megamenu ul li a:hover,ul.megamenuid ul li a.hover{background:#E0E0E0;color:#444}ul.megamenu ul ul{display:none;left:100%;top:0}ul.megamenuid li div.megasubmenu{background:#F9F9F9;position:absolute;width:830px;z-index:90;left:0;top:100%;overflow:hidden;min-height:150px;-moz-transform:translate(0,30px);-webkit-transform:translate(0,30px);-o-transform:translate(0,30px);transform:translate(0,30px);transform-origin:50% 0;visibility:hidden;opacity:0;color:#888;box-shadow:0 10px 7px -7px rgba(0,0,0,0.1);transition:all 0.3s ease-in-out}ul.megamenuid li:hover div.megasubmenu{visibility:visible;opacity:1;-moz-transform:translate(0,0);-webkit-transform:translate(0,0);-o-transform:translate(0,0);transform:translate(0,0)}ul.megamenuid ul,ul.megamenuid ul li{display:block !important;border:0 none !important;margin:0 !important;padding:0 !important}ul.megamenuid ul li{background:none !important;float:left !important}ul.megamenuid ul.leftmenulist{position:absolute;width:18%;left:0;top:0;bottom:0;background:#EEEEEE;border-right:1px dashed #e5e5e5 !important}ul.megamenuid ul.leftmenulist a{border-left:none !important;color:#555}ul.megamenuid ul.rightmenulist{position:relative;display:block;width:81%;float:right;margin:0px 0px 0px !important;background:none}ul.megamenuid ul.rightmenulist li{display:block;overflow:hidden;position:relative;min-height:210px;padding:5px 17px 5px 0px !important}ul.megamenuid ul.rightmenulist li .thumb-container{left:0;width:100%;height:100%;position:absolute;overflow:hidden;font-size:0;line-height:0}ul.megamenuid ul.rightmenulist li .thumb-container img{position:relative;top:10px;padding:0;width:100%;height:100%;display:block}ul.megamenuid ul.rightmenulist li a{display:block;border-left:none !important;padding:0px 5px !important;line-height:1.4;color:#777;font-weight:bold;font-size:14px}ul.megamenuid ul.rightmenulist li a:hover{color:#000;background:transparent}ul.megamenuid .loading-icon{background:url('https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEinw2rQGWKswaebvSMmneWJa-2Bl5dqf-gA5wIjlxmzoxwx-k86Q0o1gHI9TUAfhYpvRCIBBLoqp_sajll_6B1QajTD1dkZbYMR111DeYIIpJL2wn8kb2ET66a2hyphenhyphenoXcTCDrPH35nAofFs/s1600/wait.gif') no-repeat scroll 0 0 transparent;width:22px;height:22px;position:absolute;top:50%;margin-top:-11px;right:5px}ul.megamenuid .menu-icon{border-bottom:4px solid transparent;border-top:4px solid transparent;border-left:4px solid #777;display:block;height:0;margin-top:-4px;position:absolute;right:11px;top:50%;width:0}#megamenuid{background:rgba(0, 0, 0, 0) -moz-linear-gradient(center top , #3d3d3d, #212121) repeat scroll 0 0;background:-webkit-linear-gradient(top,#3d3d3d,#212121);background-color:#3d3d3d;box-shadow:1px 1px 0 0 rgba(255, 255, 255, 0.1) inset;height:50px;width:100%;position:relative;max-width:1000px;margin:0 auto;padding:0px}#megamenuid h5{font-size:16px;margin-top:70px;text-align:center}#megamenuid h5:before{content:"";position:absolute;top:50px;left:50%;width:5px;height:2px;margin-left:-4px;border-left:2px solid black;border-right:2px solid black}#megamenuid h5:after{content:"";position:absolute;top:55px;left:50%;width:10px;height:5px;margin-left:-7px;border-top:2px solid black;border-left:2px solid black;border-right:2px solid black;border-radius:8px 8px 0px 0px}li.search-box{float:right !important;line-height:35px;margin:7px 10px 0 0}li.search-box .search-field{border:none;padding:3px;background:#3F3F3F;color:#fff;width:135px;font-size:13px}li.search-box .search-field:focus{border:none;outline:none;background:#4C4C4C;color:#fff}li.search-box .search-button{background:url('https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEih8uHIXAs8Wc5EKiVfnapqt1N4ycoin3msEEBh6DmqUvFJV9mjvVGJwHmtMiKKrUbEV849bl138e2x8dp8oOR0hCYWa2sl1u9EZ5gFMWSKceW9H-Yw_RxIVTUsAKvv_xPwBlWj_Z8NyV8/s1600/search.png') no-repeat;border:none;cursor:pointer;padding:5px 10px;transition:all 0.3s ease-in-out}li.search-box .search-button:hover{opacity:0.9}.search-alert{background:#E84C3D url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh2QMRqnR9RXZTansA6wFc9KEoZ2X5WIOLEhj107Q-cwtPkKTMRKRv9QlhbSxPt2VF42Gaq7HjIzR0yT760E1-oef3U9KDpQ1NqyOnk-c8SKv9_p5rCAQumXdFTJvCxffux5_daYec4tqU/s1600/search-info.png) no-repeat;background-position:5px;text-transform:capitalize;color:#fff;margin:-5px;padding:0px 15px 0px 40px;display:none;border-radius:5px}

JavaScript

Step 3. Check if your blog has the jQuery plugin already installed. If not, you need to add a few lines of code before the </head> tag (CTRL + F to find it). See the code below:
<script src='http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js' type='text/javascript'/>
<script src='https://helplogger.googlecode.com/svn/trunk/megamenu.js' type='text/javascript'/>
<script type='text/javascript'>
jQuery(document).ready(function($) {
 $(&#39;#megamenuid&#39;).megaBloggerMenu({
  postsNumber : 4,
  noThumbnail : &#39;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEghrKqXTrOzSS7oIcJQQ5lEBn5MTaTX_ulBI-xS45wON0Bzt_mO2D4v2r0K8kYZ0ZVve-7skbrJydRaw3DJ_tzO4WGqeLBWPCzB3yozf8WcG6RGi1BGIFp86g8kLW4FKGwLN9wnnYEbOY0/s1600/no_image_available.png&#39;
 });
});

$(function(){
  $(&#39;.search-here&#39;).submit(function(e){
    if($(&#39;.search-box .search-field&#39;).val().length==0){
       $(&#39;.search-box .search-alert&#39;).fadeIn().css(&#39;display&#39;,&#39;inline-block&#39;);
      e.preventDefault();
    }
  });
});
</script>

Note

- If jQuery plugin already exist, remove the line in red.
- To change the number of posts, change the 4 value from:
postsNumber : 4
- To add a different thumbnail when a post has no image, replace the url in blue from:
noThumbnail : &#39;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEghrKqXTrOzSS7oIcJQQ5lEBn5MTaTX_ulBI-xS45wON0Bzt_mO2D4v2r0K8kYZ0ZVve-7skbrJydRaw3DJ_tzO4WGqeLBWPCzB3yozf8WcG6RGi1BGIFp86g8kLW4FKGwLN9wnnYEbOY0/s1600/no_image_available.png&#39;

HTML

Step 4. Carefully add the HTML code to ensure that the drop down menu with images will work as designed. There are only three types of URLs that the AJAX Menu accepts and they must be used accordingly.

Label URL: http://yourblogurlblogspot.com/search/label/LABELNAME
Search Query: http://yourblogurl.blogspot.com/search?q=SEARCHQUERY
Label w/ Search Query: http://yourblogurl.blogspot.com/search/label/LABELNAME?q=SEARCHQUERY

Among the three URLs, the Search Query has to be URL encoded using a specific tool.

Step 5. Search the following line using CTRL + F:
<div class='main-outer'>
Just above this line, add the following HTML code:
<ul class='megamenu' id='megamenuid'>
<li><a href='/'>Home</a></li>
<li><a class='menu-target' href='#'>MENU TITLE</a>
<ul>
<li><a href='http://ADDURLHERE.com'>LABEL NAME</a></li>
<li><a href='http://ADDURLHERE.com'>LABEL NAME</a></li>
<li><a href='http://ADDURLHERE.com'>LABEL NAME</a></li>
</ul>
</li>
<li><a class='menu-target' href='#'>MENU TITLE</a>
<ul>
<li><a href='http://ADDURLHERE.com'>LABEL NAME</a></li>
<li><a href='http://ADDURLHERE.com'>LABEL NAME</a></li>
<li><a href='http://ADDURLHERE.com'>LABEL NAME</a></li>
</ul></li>
<li><a href='http://ADDURLHERE.com'>Normal Link</a></li>
<li class='search-box'>
<form action='/search' class='search-here' method='get'>
<input class='search-field' name='q' placeholder='Search Here' size='30' type='text'/>
<input class='search-button' type='submit' value=' '/>
</form>
<p class='search-alert'>Search form is empty!</p>
</li>
</ul>
<div class='clear'/>
<div class='clear'/>
Note: replace the text in blue with the label url and the text in red with the name of the label. This is the label that you have added to the Labels settings of your post editor:


Step 6. Click on Save template for all the changes to take effect.

If you can't find the line from step 5, access the Layout tab, click on Add Gadget, and then choose HTML/JavaScript Gadget. Copy the HTML code and paste it inside the box... then press the Save button.

That's it!

Once that is done, your AJAX menu with images will be implemented and ready for you to use. Make sure to choose photos that are relevant to the menu and sub-menus so your website will have cohesive look and appeal. Research shows, however, that text accompanied by any image, even if completely irrelevant, can grab attention. 

Thursday, 16 July 2015

Which Hashtag Instagram Widget Should You Choose?

There are apps and widgets for almost everything, but one thing that is lacking is a widget that connects one of the most popular image-based social network to your website. Unfortunately, Instagram has yet to design an official widget that will allow you to easily and quickly embed grams on your website.

A widget is like a desk accessory that allows an end user to execute a particular function within a webpage. It fetches information from a particular source and then display it on an intended area. It can be designed to provide easy accessibility to weather, maps, sports updates, calendar and many others. Android and WordPress are two of the biggest contributors of web and mobile widgets, but Instagram still has to catch up.

While they're still trying to figure out how to make an Instagram widget, take advantage of any of the third-party widgets for Instagram. But because there are plenty of them out there, choosing the right one can be tough. Well, we did the sorting and guesswork out for you and presented you with the top 3 options:
instagram widget, instagram

Instansive

Instansive is a widget generator for Instagram that you can use for free or for a fee. Both versions practically have the same features, except for the number of times that the photos refreshes. It only happens once per day with the free version, but is always up to date with the premium version. If you want to do away with the restrictions of this Instagram widget, be ready to make a tiny investment.

instagram widget instansive


Instansive Features

- Display photos and hashtags in grid, slideshow or column.
- Customize the number of columns and rows
- Add a hover effect
- Show or hide image captions
- Photos are linked directly to Instagram
- Offers native support for Drupal and WordPress

For a one-time fee of $5, you can upgrade to the premium version.

Instansive, however, is not perfect compared to other third-party widgets for Instagram, because it has limited features in terms of customization, display, and refresh frequency. Even if you pay the minimal fee, only the photos will be kept up-to-date, but no other features will be added. But look on the bright side, it is responsive.


Intagme

Intagme is pretty simple and straightforward, which can be a bonus if you have to manage plenty of social media accounts and widgets. Its features also get the job done.

instagram widget intagme


Intagme Features

- Pull photos or hashtags and display them in grid or slideshow
- Get to customize the layout, thumbnail, size and image padding
- Edit photos by adding borders and/or background color

On top of all these, Intagme is 100% free, which would probably put all other third-party widgets at the bottom of your list. Before you make a final decision, however, know that Intagme lacks one display feature - column, similar to what you will see on Pinterest. It is not responsive and has limited customization options. Moreover, photos are linked to a page on Intagme.com, instead of directly to Instagram.

Related: How to Add an Instagram Widget in Blogger


SnapWidget

Among Instagram widgets, snap widget is the most popular and is used by more than 100,000 websites daily. It can be used free or for a monthly fee of $6.99.

instagram widget snapwidget

SnapWidget Features

- Pull photos or hashtags, then display them in grid, board, slideshow, map or scrolling.
- Thumbnail size and layout can be customized
- Background color hover effect layout and photo padding can be used to customize photos
- Show or hide sharing buttons

Features of Premium Version

- All of the above
- Create up to 10 widgets
- Filter photos by username & hashtag
- Link photos to Instagram or any other page add custom CSS if so desired
- Has more advanced customization options, such as pagination controls integration of Google Analytics and photo pop-up functionality

For a price of $6.99 per month, this Instagram widget is a worthy investment, especially because the free version is ad supported. This means thumbnails are linked to a SnapWidget page where photos appear alongside ads. An added bonus is that whether free or paid, there is an option available that lets you make the widget responsive for mobile use.

Which Instagram Widget Should You Choose?

Even if only 3 options were presented, making a choice is still not a walk in the park, but at least you don't need to shuffle through tons of widgets. From the information above, you can make an informed decision as to which Instagram widget to use. Or, you can narrow down your options based on your budget - whether you have one or not, the features you need, and how much customization control you want to have.

You should also think about how an Instagram widget can affect your SEO efforts. If you want it to be SEO friendly as the rest of your website, find out how it was developed or rendered, as some of the platforms used may not be visible to search engines. Consider all the factors above and your work will be easier.

Monday, 13 July 2015

7 Search Engine Optimization Tips for Bloggers

SEO, as you might have already know, is an acronym for search engine optimization. In the simplest of words, it's the way search engines like Google.com, Yahoo.com, Bing.com and others present your page in users' search results on their sites.

Cool, how do they that?

Well, they do that via sophisticated software tools, called spiders. Consider the whole internet as an empty room, with air particles as websites. Now sneak a spider into that room. Each tiny step that this spider would take now is essentially crawling a website (as the room is dark and full of websites). This is how search engines crawl through the web picking up site after site, studying them and ranking them. This ranking is important, really important. A higher ranked website by Google will always be on the first page of Google's search results for a related query compared to a lower ranked one.


So, in order to get ranked higher, you and I need SEO. SEO is like black pepper without which fried egg might not taste 'that' tastier. In simple words, in order for search engines to find your site and rank it higher than others in your field, you need to optimize it. Let's see how with these 7 simple tips.

Ways to SEO Optimize your Blog

Before starting with our 7 simple tips for a quality SEO, it's important to broadly classify those tips into two basic areas, on the basis of origin:

On-page Optimization

Refers to optimization of your actual web content including your HTML code, your text, as well as graphic content.

Off-page optimization

Off-page optimization, however, deals with things like backlinks (hyperlinks pointing to you site from other websites, apps and networks).

1. Create SEO Friendly Blog Post Titles

Post titles are important for SEO. They really are since they are deal makers or breakers. Whenever you write something, make sure you give proper attention to the post's title. Make your titles simple, intriguing, descriptive and gullible so that people may know what is this all about and what to expect. An even better approach is to wear searchers shoes while giving a title and think how would you Google it if you were looking for content like this.

google search results, seo title

Also, don't forget to include keywords in your title and keep it under 70 characters (or search engines would crop it before looking).

2. Improve the quality of your content

If you think 'content' isn't important for SEO, think again! Your content is the most important part of your site. While writing, don't copy-paste from elsewhere, don't stuff it with keywords alone, don't bombard it with images and multimedia files and don't write any lesser than 300 words. These all would affect your ratings quite poorly.

So, write original, use keywords in scenarios instead of straying them around (like I didn't use SEO here, SEO there in every next line), use images where they suffice and make sure you name them properly to appear in image search results, i.e. an image with the "img009.jpg" name would never appear in the image search results but "tips_to_success.jpg" would. The best would be to use text content and wrap them proper in HTML tags like <H2></H2> etc. (search engines likes content this way). Also, make sure your blog post's length is somewhere between 300-500 words - crossing over is fine but lesser isn't.

seo title headings

3. Keywords are keys

Keywords are terms that others may use to search for your content. While keywords are important for SEO, don't go on and stuff your site with keywords. This would make your content appear like a spam to spiders, who would neglect it henceforth.

Ideal is that once you have chosen your title (and included your keyword in it, as I have added keyword SEO in title above), use it in page URL, in your starting and ending paragraphs, as well as in article body where required without sounding awkward. Additionally, you may link it using anchor text to relevant resources in and out of site.

Adding keyword in the post URL using Custom Permalink

4. Meta-tags are important, but not 'that' much

If we had been living in early part of 21st century, meta tags might have done all the SEO for your site. Unluckily, we aren't. Google and other search engines have long left using meta-tags for finding site information. Hence, if someone tells you meta-tagging is all you need for your sites SEO, tell them it isn't.

Nevertheless, it's important that you use your keywords in your meta-data. Some themes already do that for you, if they don't (you can check that using page source or using view source code from browser), don't sweat. You can use 3rd party plugins like All in One SEO Pack and Scribe.

5. Socialize!

Make others talk about your site and share your content on social media sites or their blogs. It gets even better if somehow sites with high ratings link back to your site. This makes spiders think that you are someone important that everyone these days is talking about, resulting in enhancing your ratings dramatically.

Guest posting is another good approach for that. Comment on other sites, make friends with bloggers (best in business) and make them comment at yours. These tiny little things do matter a lot, resulting in enhanced SEO of your site.

6. Link in and Link-Out

Hyperlinks or Links are important from SEO perspective. You can use them to:

Link out to other sites, networks and posts, or even to your previous posts (also called inbound or backlinks) using anchor element with keyword.

anchor element with keyword

Or even better, make others to link in to you, via sharing your content on their sites or social media networks.

As stated above, an even outstanding strategy for building links is guest posting.

7. Write Often

Sites with new content every day, or twice thrice a week have still far better ratings than those who post every fortnight. A better incoming content frequency makes spider come to your site regularly, resulting in better ratings and enhanced SEO.
Are we done then? Well, trust me - your sites rating is in your hands, not in Google or Yahoo. SEO is just about doing things neatly and in a sophisticated manner. Walk your site these 7 steps for a quality SEO and you will witness the difference yourself at Google, if no place else.

Remember, code clean, write original, socialize... this is what SEO is all about!

Wednesday, 11 March 2015

Building a List/Grid View Switcher in Blogger with Auto Read More

A list of posts in grid or list view provides a more defined canvas with which a blogger or website owner can use as a guide in creating content. This concept has extended to visitors, where they can have control on whether or not they wish to view posts in list or grid view. While custom modification codes are shared by some blogging sites, others are not. Some that are shared, however, can be complex even to bloggers themselves, such as JQuery.

The good news is there are lightweight codes available, including the Auto Read More in Blogger. Through it, a blogger can add two buttons that will enable visitors to switch between grid view and list view, depending on what they prefer. These buttons, however, are only visible on limited pages - homepage, label page and archive page. Nonetheless, it is better than not having this particular feature at all.

Unlike JQuery, the Auto Read More uses HTML, CSS and JavaScript. To view posts in a list view, two sets of CSS codes are added as one. Another set is added to view posts in grid view. Other combination of codes is used to enable easy switch between views, particularly at a click of a button.



How to Add a List/Grid View Switcher in Blogger

Step 1. Log into your Blogger dashboard and select your blog, then go to "Template" > press the "Edit HTML" button.

Step 2. Click anywhere inside the code area and press the CTRL + F keys to open the search box. Type this tag below inside the box and hit Enter to find it:
</head>
Step 3. Just above the </head> tag, copy and paste the following CSS style and scripts:
<script type='text/javascript'>
function list_view(){
if(document.getElementsByClassName(&quot;post&quot;)) {elementArray = document.getElementsByClassName(&quot;post&quot;); while (elementArray.length) {elementArray[0].className = &quot;post-grid-view&quot;;}}
if(document.getElementsByClassName(&quot;post-title&quot;)) {elementArray = document.getElementsByClassName(&quot;post-title&quot;); while (elementArray.length) {elementArray[0].className = &quot;post-title-grid&quot;;}}
}
function grid_view(){
if(document.getElementsByClassName(&quot;post-grid-view&quot;)) {elementArray = document.getElementsByClassName(&quot;post-grid-view&quot;); while (elementArray.length) {elementArray[0].className = &quot;post&quot;;}}
if(document.getElementsByClassName(&quot;post-title-grid&quot;)) {elementArray = document.getElementsByClassName(&quot;post-title-grid&quot;); while (elementArray.length) {elementArray[0].className = &quot;post-title&quot;;}}
}
</script>
 <script type='text/javascript'>
posts_no_thumb_sum = 100;
posts_thumb_sum = 350;
</script>

<script type='text/javascript'>
//<![CDATA[
function removeHtmlTag(strx,chop){
if(strx.indexOf("<")!=-1)
{
var s = strx.split("<");
for(var i=0;i<s.length;i++){
if(s[i].indexOf(">")!=-1){
s[i] = s[i].substring(s[i].indexOf(">")+1,s[i].length);
}
}
strx = s.join("");
}
chop = (chop < strx.length-1) ? chop : strx.length-2;
while(strx.charAt(chop-1)!=' ' && strx.indexOf(' ',chop)!=-1) chop++;
strx = strx.substring(0,chop-1);
return strx+'...';
}
function createSummaryAndThumb(pID, pURL, pTITLE){
var div = document.getElementById(pID);
var imgtag = "";
var img = div.getElementsByTagName("img");
var summ = posts_no_thumb_sum;
if(img.length>=1) {
imgtag = '<span class="posts-thumb" style="float:left; margin-right: 10px;"><a href="'+ pURL +'"><img src="'+img[0].src+'" /></a></span>';
summ = posts_thumb_sum;
}

else {
imgtag = '<span class="posts-thumb" style="float:left; margin-right: 10px;"><a href="'+ pURL +'" title="'+ pTITLE+'"><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEipFx_xZZFXAOx4snUzr_t4hC9QIVP9vnSN00fJQCJDPQH2Qw5W4UuTqQfP78En2-udcSVMQtliF-PN8_-HmkUDFrRY-SLr09FTApUXa_tgnFtCLEUWhHYL8FvK2lu8nttuZzq9bTXCMt5-/s1600/sorry-image-not-available.png" style="margin-top: -30px;" /></a></span>';
summ = posts_thumb_sum;
}

var summary = imgtag + '<a href="'+ pURL +'"><div class="post-summary-text">' + removeHtmlTag(div.innerHTML,summ) + '</div></a>';
div.innerHTML = summary;
}
//]]>
</script>

<b:if cond='data:blog.pageType != &quot;static_page&quot;'>
<b:if cond='data:blog.pageType!= &quot;item&quot;'>
<style>
#list-view-button {font-family: Verdana; text-align:left;cursor:pointer;font-size: 14px;border-bottom: 5px solid #eaeaea;text-decoration: none;}
#list-view-button a{text-decoration: none; color: #666;}
.grid-view-button {background-color:#efefef;color:#666;padding:5px 10px;border-radius: 5px;font-size: 12px;}
.list-view-button {background-color:#efefef;color:#000;padding:5px 10px;border-radius: 5px;font-size: 12px;}
.post-grid-view {width:100%;height:250px;overflow: hidden;float:left;margin:0px 0px 20px !important;position:relative;display: block; -webkit-transition:all 0.5s ease 0s; -moz-transition:all 0.5s ease 0s; -o-transition:all 0.5s ease 0s; transition:all 0.5s ease 0s; }
.post-grid-view .posts-thumb {width:40% !important;height:250px !important;float:left;margin:0px;position:relative;border-top: 0px solid transparent !important;overflow: hidden;}
.post-grid-view .post-header {display: none;}
.post-grid-view .post-body img {min-width: 300px !important; min-height: 250px !important;display:block;width:100%!important;height:auto!important;max-width:800px!important;max-height:400px!important;border:none;outline:none;position:relative;margin: 0px;padding:0;}
.post-grid-view .post-summary-text {opacity: 1; background: none; width: 58%;font-size: 120% !important;clear: none !important; display: inline-block !important; padding: 80px 0px !important; color: #666 !important; text-shadow: none !important; float: right !important; text-align: left; position: relative !important; font-family: &#39;Open Sans Condensed&#39;, sans-serif;}
.post-grid-view .post-body {height: 250px;background:#f5f5f5; box-shadow: none !important;}
.post-title-grid a { font-size:170%;color: #777;font-family: &#39;Open Sans Condensed&#39;, sans-serif;}
.post-title-grid { position: absolute; left: 42%; top: 5%; z-index: 1;}
.post-grid-view .post-footer {left: 41%; display:block;position: absolute; bottom: 2%;font-size: 120%; background: transparent !important; border: 0px solid transparent !important;font-family: &#39;Open Sans Condensed&#39;, sans-serif;}
.post-grid-view .post-footer a{color: #128EC9;}
.post-grid-view a.comment-bubble {display: none;}
.main-inner .column-center-inner .section {margin: 0px !important;}
.post { -webkit-transition:all 0.5s ease 0s; -moz-transition:all 0.5s ease 0s; -o-transition:all 0.5s ease 0s; transition:all 0.5s ease 0s;}

#blog-pager {clear:both;}
.post {height:auto;width:32.2%;display:inline-block;text-decoration:none;float:left;margin:0 1% 1% 0%;overflow: hidden;padding:0!important;}
.date-header {display: none;}
h3.post-title a {font-size:90%;font-family: &#39;Open Sans Condensed&#39;, sans-serif;text-transform:uppercase;color:#fff;text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.1);font-weight: bold;}
h3.post-title {text-align: center; position:absolute;top:0;width:100%;overflow:hidden;margin:0px !important;padding-top: 30%; background-color: rgba(50, 126, 213, 0.8);transform: scale(1);opacity: 0;z-index: 10;height: 100%;transition: all 300ms ease-out 0s;}
h3.post-title:hover {opacity: 1;}
.posts-thumb {width:100%!important;height:200px!important;overflow:hidden;clear:both;}
.post-body {border-radius:2px;box-shadow:0 5px 4px 1px rgba(0,0,0,0.1);position:relative;overflow: hidden;}
.post-body a {text-decoration: none;}
.post-body img {display:block;width:100%!important;height:auto!important;max-width:800px!important;max-height:400px!important;min-width:200px!important;min-height:200px!important;border:none;outline:none;position:relative;margin: 0px;padding:0;}
.post-summary-text {display: none;}
a.comment-bubble {color:#fff;text-decoration:none;font-size:100%;width: 100%;text-align: center;position:absolute;top:175px;left: 0px;text-shadow:1px 2px 1px #333;font-family: &#39;Pacifico&#39;, cursive;z-index: 122;}
a.comment-bubble:before { content: &quot;Comments: &quot; url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhfe0oGwxQzglwLcvvpH7kyx5-Ba29_juXXhuxtXKw0-brnvrH7df9fk7uPvQZotUS4Q-zv31C94tlrXpqLCIU5KPUhyphenhyphenHZuRRI1x9Rgqd1wWip6eifbPCLBggRYH43wE4DvqUG7f-fsKCb1/s1600/heart-active.png);}
.post-header,.post-footer {display:none;}
</style></b:if></b:if>
<link href='http://fonts.googleapis.com/css?family=Open+Sans+Condensed:300' rel='stylesheet' type='text/css'/>
<link href='http://fonts.googleapis.com/css?family=Pacifico' rel='stylesheet' type='text/css'/>

Step 4. Next, search for the following line:
<b:section class='main' id='main' showaddelement='no'>
...in case you can't find it, search for this one instead:
<b:section class='main' id='main' showaddelement='yes'>
Step 5. Just above this line, add the following code:
<b:if cond='data:blog.pageType != &quot;static_page&quot;'>
<b:if cond='data:blog.pageType!= &quot;item&quot;'>
<div id='list-view-button'><a class='grid-view-button' onclick='grid_view()'><img src='https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiO7lBqVsl6F2-KlDC3DMdBf2xWQLpecUulqRhiLaYvkEDQ7SdmpThDDUCuNXtOjvWZm_fzM5A3c1hHxEW21TIX5jZji1QCpRpHVAOHN-haNOi8R2uFrF4BjiVxadIQTUQlwqC4H5PUoV0u/s1600/search-grid-icon.png' style='margin: -8px 1px -3px -6px;width: 16px;'/> Grid View</a> <a class='list-view-button' onclick='list_view()'><img src='https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgMeamflbjVZq1-HeRD5LRWxg8zE3Cet2eXDXqWIYBFLQbCxmEObb6lckUhF3vkSkZZ8sLI9N-Otz2I-5Oy5ej9N65fgo7EVq4i2xW4bB_9_cEHKj9_CUmF2zGsFUWQhHmpw2zD3wMzClqA/s1600/icon-list-view.png' style='margin: -8px 1px -3px -6px;width: 16px;'/> List View</a></div>
</b:if></b:if>
Step 6. Now, search the code below:
<data:post.body/>
Step 7. You will find 3 occurrences of this code, replace only the second and third one with this one below:
 <b:if cond='data:blog.pageType != &quot;static_page&quot;'>
    <b:if cond='data:blog.pageType != &quot;item&quot;'>
        <div expr:id='&quot;summary&quot; + data:post.id'>
            <data:post.body/>
        </div>
        <script type='text/javascript'>createSummaryAndThumb(&quot;summary<data:post.id/>&quot;,&quot;<data:post.url/>&quot;);</script>
        <b:if cond='data:post.allowComments'>
            <a class='comment-bubble' expr:href='data:post.addCommentUrl' expr:onclick='data:post.addCommentOnclick'>
                <data:post.numComments/>
            </a>
        </b:if>
    </b:if>
</b:if>
<b:if cond='data:blog.pageType == &quot;item&quot;'>
    <data:post.body/>
</b:if>
<b:if cond='data:blog.pageType == &quot;static_page&quot;'>
    <data:post.body/>
</b:if>
Important: if you already added the auto read more script, remove the previous one in order to make this work.

Step 8. Finally, click "Preview" to see if everything looks good and press the 'Save Template' button to save the changes...

That's it!

Adding a dynamic view switcher on a blog will make viewing content a lot easier for visitors. Whether using a list or grid view, a more compressed list of posts will eliminate the need to click on the next page, which could take time if loading takes a while to complete. For a blog archive, using the Auto Read More codes in Blogger will surely make everyone's viewing experience very convenient.

Considering the ease with which the codes can be customized, building a list/grid view switcher would be completed in no time. A real bonus is that Auto Read More works on all platforms, with cross-browser support as well.

Thursday, 5 March 2015

Add Masonry, Grid Layouts to Blogger Posts with CSS and Javascript

How a website's content is displayed can spell the difference between being popular and obscure. Anything that looks chaotic or hardly readable is never going to be anyone's favorite. This is why content must be displayed in an organized, easy to follow and straightforward manner. Nothing works better than a structured grid, in this case.

Posts listed in grid view provide an excellent viewing experience for both the blogger or website owner and the visitors. This is especially true if the grid comes with images that would play with a person's visual inclination. What is great about grids is the seamless and smooth layout, complemented with a structured yet simple architecture. This makes it easier to navigate through a blog archive or product page. The style also enables a website owner to present posts in a more artistic and informative manner, without delving into the details. Suffice to say that a grid view demands creativity to be effortlessly mixed with functionality.

How views can be switched depends on a number of changes in a blog's codes. Some are fairly easy to implement, while others can be a little complex. Not to worry, as there are guides that will be provided. Grid styles also come in huge varieties, with each one designed to cater to a specific audience. Now, are you ready to go on the grid?

Features

What features can you expect from a grid style post in Blogger?

  • All the posts will follow the grid style when switching to grid view.
  • While the codes are being customized, the posts are left untouched. Their length, however, could be changed accordingly.
  • Auto Read More will be applied on all posts.
  • Thumbnails are automatically added based on the first picture found in each post.
  • Code is secure and is used across the board. In fact, 99% of bloggers are using a similar code to enable grid style posts in blogger.

What are the benefits of grid style?

  • Quick loading time of posts. Since only the snippets are loaded in certain pages, or a thumbnail and a caption, pulling up a blog archive would be quicker. When loading time is decreased, user experience is greatly enhanced.
  • Professional-looking blog. Without the chaos and concerns on readability, a website can look really clean and professional. Combined with the right colors and images, it can also leave a visual impact.
  • Improved website ranking. Because visitors have to click in order to view the rest of the post, page views of a site will significantly increase. This makes for a better SEO strategy.

Although changes to the CSS codes have to be made to implement the grid style view and make it compatible with a blog's template, all the work will be worth it once it is up and running.

Important:
Before anything make sure that you backup your Blogger template! If have encounter any problems with your edits, you can revert the template back to its previous condition by restoring it from your backup. For this, go to 'Template' in the left menu > click on the 'Backup/Restore' button in the upper right corner and press the 'Download Full Template' button - choose where you want to save the file on your computer and click the 'Save' button.

Now we can safely proceed with editing our Blogger template. If you run into problems, just revert back to your saved template.

How to Create Masonry, Grid Style Posts in Blogger

Step 1. Log into your Blogger dashboard and click on the blog where you want to apply the grid style.
Step 2. Go to "Template" located on the left side of the screen and press the "Edit HTML" button.
Step 3. Click anywhere inside the code area and press the CTRL+F keys to open the search box, then type the following tag inside the box (hit Enter to find it):
</head>
Step 4. Now copy the script below and paste it just before the </head> tag:
<script type='text/javascript'>
posts_no_thumb_sum = 100;
posts_thumb_sum = 100;
</script>

<script type='text/javascript'>
//<![CDATA[
function removeHtmlTag(strx,chop){
if(strx.indexOf("<")!=-1)
{
var s = strx.split("<");
for(var i=0;i<s.length;i++){
if(s[i].indexOf(">")!=-1){
s[i] = s[i].substring(s[i].indexOf(">")+1,s[i].length);
}
}
strx = s.join("");
}
chop = (chop < strx.length-1) ? chop : strx.length-2;
while(strx.charAt(chop-1)!=' ' && strx.indexOf(' ',chop)!=-1) chop++;
strx = strx.substring(0,chop-1);
return strx+'...';
}
function createSummaryAndThumb(pID, pURL, pTITLE){
var div = document.getElementById(pID);
var imgtag = "";
var img = div.getElementsByTagName("img");
var summ = posts_no_thumb_sum;
if(img.length>=1) {
imgtag = '<span class="posts-thumb" style="float:left; margin-right: 10px;"><a href="'+ pURL +'"><img src="'+img[0].src+'" /></a></span>';
summ = posts_thumb_sum;
}

else {
imgtag = '<span class="posts-thumb" style="float:left; margin-right: 10px;"><a href="'+ pURL +'" title="'+ pTITLE+'"><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEipFx_xZZFXAOx4snUzr_t4hC9QIVP9vnSN00fJQCJDPQH2Qw5W4UuTqQfP78En2-udcSVMQtliF-PN8_-HmkUDFrRY-SLr09FTApUXa_tgnFtCLEUWhHYL8FvK2lu8nttuZzq9bTXCMt5-/s1600/sorry-image-not-available.png" style="margin-top: -30px;" /></a></span>';
summ = posts_thumb_sum;
}

var summary = imgtag + '<a href="'+ pURL +'"><div class="post-summary-text">' + removeHtmlTag(div.innerHTML,summ) + '</div></a>';
div.innerHTML = summary;
}
//]]>
</script>
Step 5. Find the following code snippet using CTRL+F or Command + F:
<data:post.body/>
Step 6. After pressing the "Enter" key on your keyboard, you may find three occurrences of the above code, replace only the second and the third one with this code below:
<b:if cond='data:blog.pageType != &quot;static_page&quot;'>
    <b:if cond='data:blog.pageType != &quot;item&quot;'>
        <div expr:id='&quot;summary&quot; + data:post.id'>
            <data:post.body/>
        </div>
        <script type='text/javascript'>createSummaryAndThumb(&quot;summary<data:post.id/>&quot;,&quot;<data:post.url/>&quot;);</script>
        <b:if cond='data:post.allowComments'>
            <a class='comment-bubble' expr:href='data:post.addCommentUrl' expr:onclick='data:post.addCommentOnclick'>
                <data:post.numComments/>
            </a>
        </b:if>
    </b:if>
</b:if>
<b:if cond='data:blog.pageType == &quot;item&quot;'>
    <data:post.body/>
</b:if>
<b:if cond='data:blog.pageType == &quot;static_page&quot;'>
    <data:post.body/>
</b:if>

Step 7. Now choose one of the styles below, copy the code provided and paste it just above the </head> tag:

Simple Grid Design


<b:if cond='data:blog.pageType != &quot;static_page&quot;'>
<b:if cond='data:blog.pageType!= &quot;item&quot;'>
<style>
#blog-pager {
clear:both;
}
.post {
height: auto;
width:30.8%;
overflow: hidden;
display:inline-block;
text-decoration:none;
float:left;
margin:0 1.1% 2%;
padding: 0px !important;
}

h3.post-title a {
font-size:75%;
font-family: &#39;Open Sans Condensed&#39;, sans-serif;
text-transform:uppercase;
padding:0;
color:#444;
}
h3.post-title {
height: 26px;
text-align:center;
width:100%;
margin:0!important;
padding-bottom: 4%;
}
.date-header {
display: none;
}

.post-body a {
text-decoration: none;
}
.posts-thumb {
width:100%!important;
height:190px!important;
overflow:hidden;
clear:both;
}
.post-body img {
display:block;
width:100%!important;
height:auto!important;
max-width:800px!important;
max-height:400px!important;
min-width:190px!important;
min-height:190px!important;
border:none;
outline:none;
position:relative;
margin: 0px;
padding:0;
}
.post-summary-text {
color:#777;
font-size:100%!important;
font-family: &#39;Open Sans Condensed&#39;, sans-serif;
text-align:center;
clear:both;
overflow:hidden;
margin:5px 0 0;
padding:7% 10%;
}
a.comment-bubble {
color:#fff;
text-decoration:none;
font-size:100%;
font-weight: bold;
right:10px;
position:absolute;
top:165px;
text-shadow:1px 2px 1px #333;
font-family: &#39;Open Sans Condensed&#39;, sans-serif;
}
a.comment-bubble:before {
content: &quot;Comments: &quot;;
}
.post-header,.post-footer {
display:none;
}
</style></b:if></b:if>

<link href='http://fonts.googleapis.com/css?family=Open+Sans+Condensed:300' rel='stylesheet' type='text/css'/>

Grid Layout with Post Summary and Thumbnail

grid layout for blogger


<b:if cond='data:blog.pageType != &quot;static_page&quot;'>
<b:if cond='data:blog.pageType!= &quot;item&quot;'>
<style>
#blog-pager {
clear:both;
}
.post {
height:auto;
width:31%;
display:inline-block;
text-decoration:none;
float:left;
margin:0 1.1% 2%;
padding:0!important;
}
h3.post-title a {
font-size:75%;
font-family: &#39;Open Sans Condensed&#39;, sans-serif;
text-transform:uppercase;
color:#111;
padding:0;
}
h3.post-title {
text-align:center;
height:22px;
position:absolute;
bottom:23%;
width:100%;
z-index:101;
overflow:hidden;
margin:0!important;
padding:10px 0;
}
.date-header {
visibility:hidden;
height:0!important;
width:0!important;
margin:0!important;
padding:0!important;
}
.posts-thumb {
width:100%!important;
height:190px!important;
overflow:hidden;
clear:both;
border-bottom:3px solid #00C8BD;
border-top:3px solid #558ABB;
}
.posts-thumb:hover {
border-top:3px solid #FF664E;
border-bottom:3px solid #FEBE36;
}
.post-body {
border-radius:2px;
box-shadow:0 0 6px 1px rgba(0,0,0,0.1);
position:relative;
height:auto;
}
.post-body a {
text-decoration: none;
}
.post-body img {
display:block;
width:100%!important;
height:auto!important;
max-width:800px!important;
max-height:400px!important;
min-width:190px!important;
min-height:190px!important;
border:none;
outline:none;
position:relative;
margin: 0px;
padding:0;
}
.post-summary-text {
color:#555;
background:#f5f5f5 url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjpeBh9hHMSkEdF1t04vpxZDacGiIJAIPBIS29JKJqAa-0yf6h7_ijGAPhlWnkzOblD2wtORTE2XTMShpc4IwWNSNokEp6nFDX3JvoUCLvw9yLeda7vV3ZzdetKGkPhCpB7-oTUHaTpZQF9/s1600/blueprint.png);
font-size:100%!important;
font-family: &#39;Open Sans Condensed&#39;, sans-serif;
text-align:center;
clear:both;
overflow:hidden;
margin:5px 0 0;
padding:17% 10% 6%;
}
a.comment-bubble {
color:#fff;
text-decoration:none;
font-size:110%;
right:10px;
position:absolute;
top:165px;
text-shadow:1px 2px 1px #333;
font-family: &#39;Pacifico&#39;, cursive;
}
a.comment-bubble:before {
content: &quot;Comments: &quot; url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhfe0oGwxQzglwLcvvpH7kyx5-Ba29_juXXhuxtXKw0-brnvrH7df9fk7uPvQZotUS4Q-zv31C94tlrXpqLCIU5KPUhyphenhyphenHZuRRI1x9Rgqd1wWip6eifbPCLBggRYH43wE4DvqUG7f-fsKCb1/s1600/heart-active.png);
}
.post-header,.post-footer {
display:none;
}
</style></b:if></b:if>

<link href='http://fonts.googleapis.com/css?family=Open+Sans+Condensed:300' rel='stylesheet' type='text/css'/>
<link href='http://fonts.googleapis.com/css?family=Pacifico' rel='stylesheet' type='text/css'/>

Grid Layout with Text Snippet on Hover

blogger posts


<b:if cond='data:blog.pageType != &quot;static_page&quot;'>
<b:if cond='data:blog.pageType!= &quot;item&quot;'>
<style>
#blog-pager {
clear:both;
}
.post {
height:auto;
width:31%;
display:inline-block;
text-decoration:none;
float:left;
margin:0 1.1% 2%;
padding:0!important;
}
h3.post-title a {
font-size:95%;
font-family: &#39;Open Sans Condensed&#39;, sans-serif;
text-transform:uppercase;
color:#fff;
padding:0;
text-shadow: 2px 2px 3px #222;
}
h3.post-title {
height: 22px;
text-align:center;
position:absolute;
top:1%;
width:100%;
z-index:101;
overflow:hidden;
margin:0!important;
padding:10px 0;
}
.date-header {
visibility:hidden;
height:0!important;
width:0!important;
margin:0!important;
padding:0!important;
}
.posts-thumb {
width:100%!important;
height:190px!important;
overflow:hidden;
clear:both;
}
.post-body {
border-radius:2px;
box-shadow:0 5px 4px 1px rgba(0,0,0,0.1);
position:relative;
overflow: hidden;
}
.post-body a {
text-decoration: none;
}
.post-body img {
display:block;
width:100%!important;
height:auto!important;
max-width:800px!important;
max-height:400px!important;
min-width:190px!important;
min-height:190px!important;
border:none;
outline:none;
position:relative;
margin: 0px;
padding:0;
}
.post-summary-text {
cursor: pointer;
background-color: rgba(44, 77, 163, 0.8);
color:#fff;
font-size:120%!important;
font-family: &#39;Open Sans Condensed&#39;, sans-serif;
clear:both;
overflow:hidden;
padding:25% 10% 0%;
left: 0;
position: absolute;
text-align: center;
vertical-align: bottom;
text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.1);
top: 0;
transform: scale(1);
opacity: 0;
z-index: 10;
height: 100%;
transition: all 300ms ease-out 0s;
}
.post-summary-text:hover {
opacity: 1;
}
a.comment-bubble {
color:#fff;
text-decoration:none;
font-size:100%;
width: 100%;
text-align: center;
position:absolute;
top:165px;
left: 0px;
text-shadow:1px 2px 1px #333;
font-family: &#39;Pacifico&#39;, cursive;
z-index: 122;
}
a.comment-bubble:before {
content: &quot;Comments: &quot;;
}
.post-header,.post-footer {
display:none;
}
</style></b:if></b:if>
<link href='http://fonts.googleapis.com/css?family=Open+Sans+Condensed:300' rel='stylesheet' type='text/css'/>
<link href='http://fonts.googleapis.com/css?family=Pacifico' rel='stylesheet' type='text/css'/>

Masonry Layout (Pinterest Like Grid)

masonry layout for blogger


<b:if cond='data:blog.pageType != &quot;static_page&quot;'>
<b:if cond='data:blog.pageType!= &quot;item&quot;'>
<style>
#blog-pager {
clear: both;
position: absolute;
bottom: 0px;
left: 0px;
}
.blog-feeds {
display: none;
}
.post {
height: auto;
width: 100%;
padding: 0px !important;
margin: 0px 0px 30px;
display: inline-block;
text-decoration: none;
}
h3.post-title a{
font-size: 95%;
font-family: &#39;Open Sans Condensed&#39;, sans-serif;
text-transform: uppercase;
padding: 0px;
color: #fff;
text-shadow: 3px 2px 2px #222;
font-weight: bold;
}
h3.post-title, .comments h4 {
margin: 0px !important;
text-align: center;
padding: 10px 0px;
position: absolute;
top: 10px;
width: 100%;
z-index: 200;
}
.post-header {
display: none;
}
.date-header {
visibility: hidden;
height: 0px !important;
width: 0px !important;
padding: 0px !important;
margin: 0px !important;
}
.posts-thumb {
width: 100%;
height: auto;
overflow: hidden;
clear: both;
}
.post-body {
overflow: hidden;
position:relative;     
}
.post-body a {
text-decoration: none;
}
.post-body img {
display: block;
width: auto;
height: auto;
max-width: 100%;
max-height: none;
min-width: 100%;
min-height: auto;
margin: 0px;
padding: 0;
border: none;
outline: none;
position: relative;
}
.post-summary-text {
cursor: pointer;
background-color: rgba(44, 77, 163, 0.8);
color:#fff;
font-size:120%!important;
font-family: &#39;Open Sans Condensed&#39;, sans-serif;
clear:both;
overflow:hidden;
padding:25% 10% 0%;
left: 0;
position: absolute;
text-align: center;
vertical-align: bottom;
text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.1);
top: 0;
transform: scale(1);
opacity: 0;
z-index: 10;
height: 100%;
transition: all 300ms ease-out 0s;
}
.post-summary-text:hover {
opacity: 1;
}
.post-footer {
display: none;
}
a.comment-bubble {
color: #fff;
text-decoration: none;
font-size: 120%;
right: 5px;
z-index: 222;
position: absolute;
top: 5px;
text-shadow: 1px 2px 1px #333;
font-family: &#39;Open Sans Condensed&#39;, sans-serif;
}
a.comment-bubble:before {
content: url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhfe0oGwxQzglwLcvvpH7kyx5-Ba29_juXXhuxtXKw0-brnvrH7df9fk7uPvQZotUS4Q-zv31C94tlrXpqLCIU5KPUhyphenhyphenHZuRRI1x9Rgqd1wWip6eifbPCLBggRYH43wE4DvqUG7f-fsKCb1/s1600/heart-active.png);
}
.main-inner .column-center-inner {
-moz-column-count: 3;
-moz-column-gap: 1px;
-webkit-column-count: 3;
-webkit-column-gap: 1px;
column-count: 3;
column-gap: 1px;
width: 100%;
padding: 0px !important;
}
</style></b:if></b:if>

<link href='http://fonts.googleapis.com/css?family=Open+Sans+Condensed:300' rel='stylesheet' type='text/css'/>

Please note that the masonry layout might not work if you have a customized template, also older posts will appear vertically (from top to bottom) instead of left to right.

Step 8. Click "Preview" and if everything looks fine, press the "Save Template" button.


That's it!

Implementing a grid style view has its pros and cons, but the benefits clearly outweigh the disadvantages. The fact that a website will look visually appealing and professional when set in grid style, is already enough to boost its online reputation. An increase in page views is just the beginning. With the right images and content, a blog will also have better SEO. Most importantly, implementing the changes is not as complex as some might think. With a step-by-step guide available, adding a dynamic view switcher would be completed in no time.

Tuesday, 17 February 2015

How to Track Invalid Adsense Clicks Using StatCounter

A lot of things can happen online, some of which are beyond your control. One of these is invalid click activities that are caused by a number of things, but can lead you into one unfortunate situation - getting banned from AdSense for good. Since you need AdSense to keep track of your website's performance, you should do anything possible to protect yourself against invalid clicks.

StatCounter can help you in this mission. This is a web traffic analysis tool that lets you track all clicks and exit links. Through it, you will know where a majority of your invalid clicks are coming from, and the corresponding IPs that you can then block to protect your AdSense account.

Getting started is as easy as signing up and creating an account. You can then create a new project for a website that you want to track. Like most analytics tools, StatCounter is fairly easy to use. Make sure to select a counter or Invisible tracking, and opt to receive reports in a weekly or monthly basis, so that you can keep an eye on invalid AdSense clicks.


After entering the appropriate information, press the "Add Project" button which will take you to the "Choose an installation Guide for your website" page - here click the "Default Installation Guide" link. Now, StatCounter will give you a code along with instructions on how to install this code on your website. After adding the code, press the "Check Installation" button on the right toward the bottom of the page in order to finish the installation process.

Tracking Exit Links

Once you have added StatCounter to your website, your reports will be available within minutes. Now let's see how to track invalid AdSense Clicks using StatCounter.

Click on Stats and click on the menu called "Exit Link Activity". This will show all the links that visitors clicked on to leave your website. Here, you can also find Date, Time, Exit Link Clicked and the page on which the exit link was clicked.


The exit link could be a advertisement or a link to other website. To display only the clicks on the AdSense ads, use the "Exit Link Match" filter to 'google adsense'. This way, you will be able to see how many clicks are there on advertisements and at what time the click was made.

To see even more information about a particular visitor who clicked on the link, click on the magnify icon. This will show you the Search Referral, IP Address of the visitor, Host Name, their Location, how many times they've visited your blog before, Visit Length, Browser, OS, Resolution, ISP, and the pages they viewed including the exit links.


So this is how you can track the invalid AdSense clicks using StatCounter. Although you may have to disable advertisements on your website temporarily to avoid a potentially disastrous situation, such as being click bombed, it is a better alternative than being kicked out of AdSense permanently. Through StatCounter, you will be able to detect invalid clicks or any suspicious activities that will inflate the number of clicks on an ad. Since you can't control an advertiser or publisher's desire to increase their earnings, you should monitor click through rates or the cost per clicks you are making. If there is a sudden increase of clicks but you make zero CPC, it's time to track down on these invalid Adsense clicks and put a stop to them.

4 Ways to Detect Invalid Activity in Google AdSense

Monitoring your website's performance shouldn't be a chore but a necessity. After all, how else will you know how to serve your audience better - and acquire new ones - if you don't know how they get to you, what they do on your site and who they are? Google Analytics is a tool that does all that, but despite its sophistication, your account can be suspended for invalid activity.

This is the one thing that you have to avoid because the process of reinstating your account may take a while. That said, how can you detect invalid activity?

Before answering the question, here are some terms that you need to familiarize yourself with as they will appear throughout the rest of this post:

DEFINITIONS

  • Clicks - number of times a user has clicked on your advertisements
  • CPC - cost per click; what you get whenever a user clicks on your ads
  • Pageviews - refers to the action the user takes of viewing a page with an ad displayed
  • CTR - click through rate; calculated as (clicks / pageviews) x 100 and is given in percentage
  • Estimated Earnings - calculated as (clicks x CPC); the value goes up or gown while the earnings are still in verification process

WAYS TO DETECT INVALID ACTIVITY

1. You have a CTR above 20%. The normal range for CTR is 1% to 11%, but anything above these tells Google that there is something iffy and that may not bode well for you. So, if you notice this, make necessary changes so that you maintain a healthy CTR.

2. You have a lot of clicks but no CPC. As in, your assigned CPC is 0.00. For example, if you get about 50 clicks and don't have a CPC set, that tells Google that something funky is going on and they will not hesitate to take action. Keep in mind that they do take matters like this seriously, and which is why they employ both human and machine checking to analyze clicks and impressions.

3. You're estimated earnings rise then fall suddenly. For example, you get estimated earnings of $1.00 but the next minute this drops to $0.0. Whether it drops to zero or half the original estimated earnings amount after you refreshed the page, you know that something is up.

4. You have many clicks from one country but less pageviews. Google operates on the belief that if a user clicked on an ad, they are interested in what it has to say. So, if the pageviews are really low, that sends a wrong signal to Google and causes them to think that something fishy is happening.

So, make sure to check your AdSense performance regularly so you can spot discrepancies and address them as soon as possible before Google decides to suspend your account.

Monday, 12 January 2015

Using the AdSense Access and Authorization Feature

It is amazing when you see a webmaster using a blogspot blog stealing an AdSense Java Script Code and using it on their website. They will usually keep your unique publisher ID while showing ads from your account. While their action may be unintentional in terms of them not caring which ID that they use, the net effect is that you are now involved in their illegal action.

Whatever their reason for doing so, once they are caught and banned for using illegal and plagiarized materials, chances are that Google will also ban your Adsense account as well because it violates the terms of service and the program polices even though you may not have been aware that this happened to you. It doesn't really matter to Google because they see your unique publisher ID and assume that it is you posting the illegal materials.

In addition, there are websites that also use the iFrame HTML program that will embed to the post and pages of your website as well. This means that you are now violating the Terms of Services as well as the Program Policies because they are showing the AdSense ads inside an iFrame which is forbidden. Again, because it is your website, Google will assume that it is you unless you can take appropriate action.

While this may seem unfair, it must be noted that Google has recognized the practices of others in using the websites and unique publisher ID, so they have developed a new feature called "Access and Authorization" that you can find within the dashboard of AdSense. It is here that you can only allow certain sites to show ads for your account and not have to worry about getting punished for something that you did not do.

Access and Authorization Usage

You will need to log into your AdSense account and then proceed to "Site Authorization" which will then let you check the mark to allow only certain ads to be shown for your account. When you check the box that allows only certain sites, it will ask you which domains that you are allowing to show on your website and what has permission to use your ad code:

access and authorization

Here, you will need to type in all the websites or domains that you have granted permission and save the changes you have made by clicking the "Save" button. While it may be tempting to not list any, you will need to list the following in order to fully comply with the request and not create any more confusion:

- Your Domains: Any domains and sub-domains that you own where you want to monetize them with AdSense.
- Country Specific TLDs: Basically, any country-specific TLDs of Google will need to be included as well, for example a .blogspot.com blog (see the screenshot below). To find a complete list of all Google domains, click HERE.
- Translate Site: If some of your customers are using translation sites to visit your website, then you'll want to at least include the major ones such as Google Translate and others. You can find a list of the major ones or stick to Google if you like.
- Yahoo & Bing Domains and Sub-Domains: Wherever your articles are being read, you'll need to include these sites as well.
- Articles: If you are using articles from other websites that have your ad code and you have promised to share your AdSense revenue with the parties involved, then you will need to enter all of the article URL codes separately in order to make sure that they are authorized.


If you were to use a domain name that is not on your list of authorized websites, but it does use your ad code, then you will see alerts on your dashboard to notify you. If these are legitimate sites that you want to use your ad code, but simply did not put them on the list you can do so thanks to the warning provided on your dashboard:
We've noticed your ad code has appeared on websites you haven't authorized. To avoid lost revenue, make sure to authorize any sites you own to display ads by visiting your account settings.
However, if these sites are not authorized, then you can feel comfortable by ensuring that their domain is not on your list and Google will not punish you for the theft by others.

Also, keep in mind that any domain name that is using your ad code and is not authorized will remain in place and not generate any money for you. So, you cannot profit by the theft of others even when they are using your ad code. While this may seem unfair in a sense, the way the process works does keep your website from being punished for what someone else has done.

Additional Notes for Using Access and Authorization on AdSense

There are a number of things that you will need to be aware of when using this particular program. First, be sure that you check it frequently so that you can catch any warning early on. You only need to sign into your account and check the dashboard where the authorization is located. By checking frequently, you can catch those who are authorized and add them to your account.

Remember that any partner websites of Adsense such as youtube.com, blogspot.com, blogger.com etc. are fully authorized to show your ads without having to add them to your account listing. All partner websites of AdSense qualify, so you only need to restrict yourself to the sites that are outside that particular area.

When you add a domain to your list of sites that are authorized to use your ad code, they will automatically be added to your list of sites that you own as well. This means that you don't have to add them twice and can limit your efforts to just the first authorization part.

You'll want to use this feature in order to avoid any misunderstanding and especially to avoid being punished for something that you did not do. However, you'll need to prepare a bit before entering all of the applicable domains that can use your ad code. By taking a little time and going over all the places where they appear, you can add them in and get the greatest benefit from this particular feature of AdSense.

If you have any more questions, you might also try posting them here in the Adsense help forums.