Add A New Year Background Image to your Blog

New year is just hours away and everyone is getting prepared wish new year to their friends and family. If you run a blog it would be a good idea to celebrate new year with your readers by changing its look a bit.

This new year eve, add a bit of code in your blog to wish your blog readers a happy new year. We just add a view lines of code to set a new background image with a happy new year message on your blog.

It's almost 2014, so without much blah blahs, following are the wallpaper's preview and the code you need to add :

1. Dark Brown Wallpaper


html, body {
background: url('https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjxgiWtDpSnVIlnbxRj5tBGwR3x_GBk4t2HmYmX3bSPVyEwlnFHZCxPmt1NRd4r25zWnh12QrDfLSd6WhSsYLITT3k1PvH1egfCBYorYmU0j5ZUy4n3n0j1kW0w63laGXd0O0GpdKZzRcSL/s1600/1059-happy-new-year-1280x800-holiday-wallpaper.jpg') no-repeat center center fixed;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
}



2. Background with Fireworks



html, body {
background: url('https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgyyMxzi8Xig951jpgAjTxOxZY2_PN3MIPDABScAxBq1GJo3RhyYmhS04Pb_l6C7kO8lSjoVhsrktXO6PKBnKXmkaQztzZ2Y6gKw3YkeothvoJYQOiGSIuOiBZMCvquVlVk7wwOzEJOkT6I/s1600/1961-happy-new-year-1280x800-holiday-wallpaper.jpg') no-repeat center center fixed;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
}


3. Purple Background


html, body {
background: url('https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEja2oMNbpkMNm5vbUbthfuEumadpvhj4I7ujuN_v7vppSaanIZNs5RmSvRignryq0o2dN4ALjb84oMes-s_TolIgnYUChgN0sU5tbMmlJfqapQyelMOyXrrt8g8BP4N3ZU8f5q_bg9kEcWU/s1600/2084-happy-new-year-1280x800-holiday-wallpaper.jpg') no-repeat center center fixed;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
}

4. Classic Gold Shine


html, body {
background: url('https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi0Ozjx2Bo55_eaKkr5dz_95i8rZFqpcUPfquVDLTHNrOPbDnHcijHTkrB7Xe6cuL88IorcfFsvUZf8wN6BmuM9dhtHZI39BLxIsL8mzioLulGMzoSXeGcBUj0TMT0fcSmTTj9rJz3Z5dT3/s1600/2085-happy-new-year-1280x800-holiday-wallpaper.jpg') no-repeat center center fixed !important;
-webkit-background-size: cover !important;
-moz-background-size: cover !important;
-o-background-size: cover !important;
background-size: cover !important;
}

Add the code

Once you've chosen a background image that suits with your blog you are ready to apply its code on your blog. To do it, copy the code.

Now go to your Blogger Dashboard -> Template -> Customize -> Advanced -> Add CSS -> Now paste the CSS code in the text area in the "Add CSS" tab and save it by clicking the "Apply to Blog" button.

That's it! And a very very big happy new year! :D

Easiest Way to Earn Money for Freelance Web Designers

If you have just entered the world of web designing it will be difficult for you to find work to earn some bucks but don't get disappointed, we have found a great way for you to earn money with your web design skills.

Internet is a great place use your web design skills and earn money from it, but finding clients is not easy as it seems. You can find a job in some local IT company etc. or start working as a freelance. Both have their own pros and cons. But if you are a person who wants to earn money fast by doing the work you like then Freelancing is the option for you.



It might be difficult for you find clients and projects on your own but if you are ready to work as a freelance then Freelance.com is a great start-point for your web design career. Unlike other outsourcing programs it doesn't require you to have years of experience in the area you want to work in.

If you are willing to work then you can start earning 100s of dollars in less than a week. Freelancer.com is a platform for both small business and entrepreneurs. The site has more than 9 Million users which makes it a great Freelancing platform.

It will take not more than 10 minutes to setup your profile and after that you will be able to bid on projects and take part in contests.

Not just web designing, from Data Entry to T-Shirt designing, it's got a large number of areas of work. 

Changes to Files not Immediately Applied on WordPress Blog

A few days ago I got a project to setup a WordPress blog on the client's website. Most of my work included editing and adding codes to re-design the look of the blog, so editing, saving and viewing is a normal process. But I found a issue of changes not updating on site immediately after I updated the files.

I have worked on WordPress many times, but this project required me to work in a different environment, by different environment I mean editing theme and other PHP files only through the WordPress interface and the Web Host was Yahoo which still provides a quite older version of WordPress for their customers.

As the primary job was designing the blog I had to edit and reload the blog page to see the changes on the live blog. Many times the changes didn't appear immediately on the blog, especially the header.php and other page template files.

While I was working on it, I didn't had much problem because of this issue but when the client tried checking the changes I made they complained about the blog not updating. I thought it was a problem with the web host but the actually cause of the problem turned out to be something else.

WP-Cache is what causing the problem

I didn't even think about it. I knew there were cache plugins for WordPress but my mind never focused on it. After exchanging messages with the client he sent me a link to a forum where the cause of the problem was mentioned and it was WP-Cache plugin.

Fixing it is easier than you may expect, just login to your WordPress Dashboard -> Settings -> WP-Cache

wp-cache plugin wordpress settings

When you are in the settings page for WP-Cache plugin, click the "Disable it" button to disable the plugin.

Once you disable the plugin, any changes you make to your WordPress files will be immediately applied to the live site. That's a good idea when you are working on a re-design and you need to preview your changes again and again.

If it's not WP-cache..

If you don't have WP-cache plugin for your site then something else or other cache plugin is causing the problem. Look for other cache plugin for your WordPress blog, you will find all your plugins in the Plugins tab. If you find one then just disable it to solve the problem.

If it's not even a plugin then you might need more help with your blog's technical details, so it's a good idea to try WordPress Support Forum.

Hiding Newer - Older Post Links Below Posts in Blogger

The older - new post links or blog pager links are one of the most basic part of a blog. It provides an easy access to other blog posts on the blog. If you want to remove it then continue reading the tutorial.

In this short tutorial you will learn how to control the display of the three links below each posts called Blog pager (Newer - Older Post and Home link).

There can be many reasons you want the the Newer - Older post links to be removed from your blog. One can be that you are using your blog for just a single paged blog and in that case any blog pager links are not necessary.

Hiding it with CSS

The blog pager has three links Newer Post, Home and Older Post, if you want to remove only a specific link(s) I have provided the code for that too. Let's start with the code to hide the all the three links.
To learn how to add the CSS codes in your template, see this tutorial:
How to add CSS to Blogger

Hiding All Three Links

Hiding elements on web pages is not a rocket science, all you need is a small snippet of code. To hide the pager links we need this a one line CSS code
#blog-pager {display:none;}

Hide the 'Newer Post' link

To hide just the "Newer Post" link in the blog pager use the following CSS code
#blog-pager-newer-link {display:none;}

Hide the 'Home' link

Using this code will hide the Home link in the blog pager
#blog-pager .home-link {display:none;}

Hide the 'Old Post' link

And use this for hiding the "Older Post" link
#blog-pager-older-link {display:none;}

A little note..

Using CSS to hide these links wouldn't remove the links from the HTML document but it will simply hide it from view, this is easier than and safer than removing it from the root. But if you still want to entirely remove it then try this
http://blogging.nitecruzr.net/2007/08/removing-newer-post-home-older-posts.html

Encrypt Your Personal Details with JavaScript

When you have a lot of online accounts to handle and don't have enough time to memorize all the passwords it becomes an annoying problem. What if you could save your passwords and other details in a simple text file on your PC ?

That makes sense but if your PC is accessible to others it is not a good idea to explicitly save your personal account details in a text file available to every user on your PC.

There are many other ways to keep your account credentials safe on your computer but they are often a folder password software or something like that, but it is a waste of time and most of the times those software are malware itself.

Another option is using an encryption/decryption software on your PC but you won't be able to decrypt your details if you don't have that particular software on the other PC too. Say you downloaded the encrypted file from your Dropbox on a public PC, now to decrypt it you need to install an extra software on it, and it's not a good idea though.  

Let's Start Encrypting/Decrypting

There's an inbuilt encode and decode function in JavaScript that takes in an string and output the result. The function we are talking about are btoa and atob, in JavaScript these functions are generally used for transmission of data that may cause communication problems.

But I found another use of these functions and when I found myself saving my account details on my PC accessible to anyone. I then used those function to encode the details, save it in a text file and when I needed it I used the decode function.

Open the JavaScript Console

First we need to open the Developer Tools with JS Console in the browser. If you want to learn how to open developer tools in different browser check this tutorial.
http://www.stramaxon.com/2013/10/developer-tools-in-browser.html

If you don't want to read that tutorial then just use these keyboard shortcuts to open JavaScript console on your browser :
Chrome - CTRL+SHIFT+J (CMD+SHIFT+J on Mac)
Mozilla Firefox - CTRL+SHIFT+K

Encode it first

Finally when we have the Console open, we are ready to use it for encoding any text we like. The function that encodes any text is btoa("Text you want to encode") if you run this in your Console it will output this VGV4dCB5b3Ugd2FudCB0byBlbmNvZGU= .

We now know what the function does now see how can you use it
btoa("Something here");

The text between the parentheses and double quotes is the text you are encoding so replace it with your personal details you want to encode and once you run it the console will return the encoded version of it, now you can save that text in your file and no one be able to read it (if you don't have any geek or programmer kind of people near you, can be worry free).

Here's a screenshot


Time to Decode

Encoding is of no use if you can't decode it for later use. As btoa() encodes a string similarly atob() decodes the encoded text.

Try running this code in your open JavaScript Console
atob("VGV4dCB5b3Ugd2FudCB0byBlbmNvZGU=");

This will output "Text you want to encode". You use this function in the same way but you just need to pass encoded data in the parentheses.


Tip: If you want extra protection, you can encoded the encoded data too but you also need to decode it the times you encoded it.

Bonus Tool!

Even before writing this article I had written a small JavaScript tool you can use to encode/decode data without worrying about the Console and function codes. Click the link below and start using it.

Sometimes it's fun to to a work in the difficult way ;)

How to Open Developer Tools in Different Browsers

Developer tools or shortened DevTools are set of tools used for debugging web pages which is important tool for web developers and also general users who wants to inspect a page, make changes to the site on the front-end or analyse network usage by the webpage.

It is a all-in-one tool for a person who wants to learn what happening behind the scenes of a website. If you are new to it you may want to learn about, I wrote a post about using Chrome Developer Tools but if you need a more brief information about it see this
https://developers.google.com/chrome-developer-tools/

Chrome and Safari's developer tools are very much the same. But Mozilla Firefox has it's own unique developer tool set but using it is almost same as using any other developer tool.

Google Chrome

Google Chrome in my opinion is the best browser for web debugging using DevTools. DevTools are frequently updated and are simple to use.

Starting DevTools on Chrome

Starting DevTools on any webpage is very easy. There are three ways to open the console :

1. Select the Chrome Menu  > Tools > Developer Tools

2. Right click on a blank area of the page and from the list of options click on "Inspect Element" at the bottom. To inspect a particular element right click on the element and then select the inspect element option.

3. Another way to open the console is keyboard shortcut. Press Ctrl+Shift+I (Cmd+Shift+I on Mac) and the developer tools will appear.


Starting JavaScript Console in DevTools

JavaScript Console is used to run JavaScript codes on a page. It's often used to test scripts on a website to check if the code works well or not. But you can use it as a calculator or just try out JavaScript functions using it.
To directly open the JavaScript Console select the Chrome Menu  > Tools > JavaScript console or use the keyboard shortcut Ctrl+Shift+J (Cmd+Shift+J on Mac).

When the Developer Tool is opened select the "Console" tab on top to switch to JavaScript console.

Mozilla Firefox

If you are using Firefox make sure you have the latest version, as older versions don't include developer tools or if they do, they are old. Developer tools of new Firefox is way better than the older version and got some extra tools too.

Starting Developer Tools on Firefox

You can it by various ways. The most common way is to open it using Inspect Element option. Right click on a blank area on the web page and from the list options select "Inspect Element", the Firefox Developers tools will open.

Or if you can open it by going to the Tools menu > Web Developer > Inspector, this will open the developer tool in page inspector mode.

Opening JavaScript Console

Accessing JavaScript console in Firefox is similar to opening the page inspector. Open the Developer tools by right clicking on a blank area and then selecting the Inspect Element option. Now just switch to the "Console" tag on top of the dev. tools.

Or you can also open it through the tools menu. Click on Tools > Web Developer > Web Console or use the keyboard shortcut CTRL+SHIFT+K.



Apple Safari

Accessing developer tools on Safari is similar to as in Chrome. Some keyboards shortcuts might be different. Simply right click anywhere on the page and press Inspect element.

If you have any question ask it in the comments.  

Expandable Section in your Post on Blogger

Did you ever wanted to have sections inside your post body which is optional for the reader to read or see ?

In some cases you might feel need for a section of your article to be hidden and only visible when the readers wants it to be. But in basic option we get in Blogger or any other WYSIWG editor this is not possible. But wait, it doesn't mean it can't be done.

Before you proceed to the tutorial, check this demo :
Expandable Section Demo

There's nothing special, it just a hide/show box inside which you can put content of your choice. It's not something that everyone might need for their blog posts but when you need it isn't easy to find easy-to-follow instruction on the Internet so I decided to create such a box and put up its instructions for blogger.

Let's start

This tutorial requires you to work with codes, here work means just copying-pasting and editing some parts of the code. So it will be easier for you to work if you open a plain text editor like Notepad.

Including the jQuery Library

This step is optional, you might not need to perform this step if your template already has a jQuery library included. If you are using a custom designed template, as your web dev. if they've already added it. If not you may continue with the steps

  1. Go to your Blogger Dashboard -> Template -> Edit HTML
  2. When inside the code box press CTRL+F to open a search box
  3. Search for </head> in the template
  4. Once you find it in the template, paste the following code immediately above </head>
    <script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>

That is how you add jQuery to your blog.
Always remember to add the jQuery script code above any script (including the one I am going to provide for this widget) in the template depends on jQuery.

JavaScript/jQuery Code

The first thing you will add in the template to make our expandable section work is the code that handles it hiding and showing. It's a small jQuery dependent JavaScript code. Following is the code you need :

<script type='text/javascript'>
$(document).ready(function(){
$(".sh-section-btn").on("click",function(){
$(this).parent().children(".h-section-cont").slideToggle(200);
});
});
</script>

The code above simply tells the browser to show hidden content if the "show" button is clicked, and if the content box is already visible it simply hides.

To apply this code go to the Blogger Dashboard -> Template -> Edit HTML -> Use CTRL+F to find </body> and paste the JavaScript code immediately above/before it and save.

Adding the CSS

The event handling part is done. Now let's style our expendable box so that it looks good and the reader notices it.  Here's the CSS that styles the complete box.

/* Expandable Box CSS */

.hidden-section-container {
background-color:rgba(187, 187, 187, 0.93);
box-shadow:0 2px 10px rgba(0,0,0,0.2);
}

.sh-section-btn {
font-size:18px;
color:#fff;
text-shadow:1px 1px 0px rgba(0,0,0,0.2);
padding:5px 10px;
cursor:pointer;
}

.h-section-cont {
padding:10px 10px;
background-color:#eee;
display:none;
}

If you aren't sure how to add this CSS to your Blog, check my tutorial on adding CSS in blogger.

HTML for the box

After we've got the two main things for this box we can now actually use it in our blog posts. Using it is simple. The HTML for box may contain your text or any other content you want inside it. But before we add the content let's see what's the basic HTML for this box.

<div class='hidden-section-container'>
<div class='sh-section-btn'><span>Show</span></div>
<div class='h-section-cont shw-box'>
<!-- All your text/html below this -->

<p>All your content here</p>

<!-- All your text/html above this -->
</div>
</div>

You don't need to make much changes to this. All you need to change is the title and the content. Let's see how you will do it :

  1. Title Text - This is the text that will appear as the title of that expandable box. See the second line of the code. Change the text "Show" to anything you want as the title.
  2. Content - After the line 4 you can add anything possible with HTML inside the hidden box. Add text, images, links etc. using its HTML markup.
Once your HTML for the expandable box is ready you are all set to put it in your post body. But you can't simply paste HTML code in your post editor. In order to prevent the HTML from being shown just as plain text you will first need to switch to the HTML mode in the post editor. 

Open your Post Editor, now select the HTML tab next to the 'Compose' tab to switch to HTML mode. Now you can paste your code anywhere you want the box to appear.

This is how simple it is to get such cool features in Blogger. If you face any difficulty while implementing this widget feel free to comment here or email me for help.