I am not dead. Yet.

2 full years passed and I did not write a single post on this blog. Please do not presume me dead. It seems I am the busiest person on this planet despite having nothing much to do other than pounding my fingers on keyboard everyday.

After this much time, I finally gathered courage and thought of updating thi blog about what I had been to. For those of you wondering, keep reading. Here is what I did in last 2 years.

Started a company

I and couple of my friends, launched our own web development firm back in 2013. We call our company Developers Lab. We will complete 2 years this April. It has been a fun ride so far and we hope to do much better this year.

VAB Developers Lab Pvt. Ltd.

We create web applications using both Microsoft and LAMP stack. Travel domain is our expertise and in these two years we have created a hotel booking engine, a flight booking engine and a package booking engine all using MS technologies. For other projects, we prefer to use PHP on server side. As far as frontend is concerned, we use vanilla JavaScript, jQuery and AngularJS with JSON to carry data.

Became a father


Wife gave birth to a sweet baby girl last year and she will turn one coming April. Almost 11 months and my wife and me have not yet been able to decide a name for her.

Wrote my second book

After a long interval of 4 years, I started working on my second book for Packt last year. My first book was also from Packt and was named PHP jQuery Cookbook (2011).

Guys from Packt contacted me last year about an idea of a book titled “Mastering jQuery UI” and asked if I would be interested in writing it. I said, hell, why not!

Mastering jQuery UI


So after around 10 months the book is scheduled to release this week. I hope people like it. Fingers crossed till then.

Learnt some new technologies

This goes without saying as it is inevitable in our trade. But we need to remind ourselves more of it. You are out of market the day you become outdated in terms of technology/tools. I learnt responsive design, AngularJS, Laravel among many other tools. Planning to learn some more this year (I am looking at you nodeJS and React).

So, in short I am not dead. These were pretty much the highlights of last couple of years. I will see you soon with a new post (I promise).

Quick Tip – TinyMCE : Use full url while inserting image

Problem:This is a common scenario. You are using tinyMCE in admin of a site to insert a link to image.  While displaying that image on frontend tinyMCE makes it relative path instead of absolute.
When setting up tinyMCE set these 2 configuration options:

relative_urls : false
remove_script_host : false

Both these options are true by default. As the name implies, “remove_script_host” removes the protocol and host part of URLs. “relative_urls” must be set to false is you want to set “remove_script_host” to false.

TinyMCE documentation for relative_urls and remove_script_host.

Hope it helps.

Javascript advice for beginners

As you know, Javascript can be thought of as an extension to HTML – this allows authors to incorporate some functionality into their website, from controlling webpage navigation to adding interactive content. Javascript is one of the best ways to jazz-up your webpage.

There are so many advantages of using  Javascript, so if you are right in the middle of setting up your very first website then you are sure to be interested in reading this blog post which will show you  some good Javascript books to get you started.

Javascript is used on almost all websites. Social networking sites like Facebook use it so we can post a status without leaving the page, while gaming sites like http://www.partycasino.com use it to make their content interactive, as well as animate their pages with pictures and videos. Javascript is also commonly used to record information about the user’s reading habits, like how long they stayed on a certain page and what they looked at. Let’s have a look at some handy Javascript books to get you started.

Continue reading Javascript advice for beginners

Create sharing icons for Facebook, Twitter and LinkedIn to share URLs

Social sharing icons are commonplace on websites these days. Almost every blog or website has links to share on Facebook and Twitter at least. Normally, these can be embedded by copy-pasting some JavaScript and HTML code from their respective sites. This is clearly an overhead for your web page if all you want to do is share a link from your web page.

In this post, we will see, how your can create your own sharing icons to share links on Facebook, Twitter and LinkedIn in a simple manner. Let us start now.

Continue reading Create sharing icons for Facebook, Twitter and LinkedIn to share URLs

Code snippet : WordPress qTranslate – Getting current language

So I was working with the qTranslate plugin of WordPress’s and needed to select an image depending on language. qTranslate provides a utility function which returns the current language.

The function is called qtrans_getLanguage() and it works as follows:

$currentLang = qtrans_getLanguage();
if($currentLang == 'fr')
	//show french logo
	$imageName = logoFR.png';
else if($currentLang == 'hi')
	//show Hindi logo
	$imageName = logoHI.png';
	//show english logo to rest
	$imageName = logoEN.png';

You can find this function in qtranslate_utils.php file in qTranslate directory.