Dec 20

Apple eyes Passbook coupons with touch of NFC



A new patent from Apple provides loads of information on Passbook and hints at the possibility of using near-field communications with the app.

Published today by the U.S. Patent and Trademark Office, the patent, dubbed “Integrated Coupon Storage, Discovery, And Redemption System,” goes into great detail about a system that lets you manage and redeem electronic coupons on a mobile device.

As described in the patent, such a system could trigger an alert on your phone when you’re near a store where a saved coupon can be used. It could also alert you when you’re using your device to buy something.

Passbook currently allows you to store digital coupons on your iOS device so that you can redeem them at different stores and merchants. Read More…

Dec 17

Apple in 2013: Five predictions

What will Apple do next? It’s the very secret sauce that keeps the company interesting, along with some very successful products.

Here are five predictions for the next 12 months as Apple heads into one of its most closely watched years yet.

Editor’s note: This is the first in a series of stories looking ahead at what’s to come from a handful of major technology companies, and technology categories. In the coming days CNET will do the same for Google, Facebook, Microsoft, Amazon, and others. Read More…

Dec 17

Hackers hit Westboro Baptist Church after Newtown threat

A group attached to the online hacktivist group Anonymous claims to have hacked the Web site of the Westboro Baptist Church in response to plans by the controversial church to picket the funerals of those massacred Friday at a school in Newtown, Conn.

As part of a campaign dubbed #OpWestBoro, KY Anonymous said yesterday it posted the personal information belonging to members of the extremist organization, which is best known for conducting protests designed to disrupt the funerals of members of the military killed in action. The data dump included the names, phone numbers, e-mail addresses, and physical addresses of dozens of alleged members of the religious organization. The group did not indicate where or how it acquired the data.  Read More…


Dec 16

10 Tech CEOs Who Could Be Fired Now

Bangalore: CEOs are at helm of the company and so are credited with all things, good or bad, the company goes through. More than often they have to captain a ship out of mighty storm. Some pull trough and some fizzle out. The CEOs who failed to pull through, had to put up with “hot seat” before they were actually relieved of their positions. Read to know such 10 CEOs who were in hot seats, as compiled by Business Insider. Read More…

Nov 25

WordPress and Ajax calls

WordPress and ajax calls!!! Let me first explain you the situation. You have created one plugin and in this plugin one of your functionality need some ajax functionality mean you want to do something without refreshing the page like voting(like/dislike article), ajax sign in functionality.

After research alot and read several articles I understood that there are several ways to do a ajax call in WordPress like:
1: Use admin-ajax.php file for ajax call.
2: Include wp-load.php file in your ajax call file.
3: Include wp-config.php file with defining ‘SHORTINIT’ as TRUE.

Disadvantage of above ways:

- Site performance decreasing marginally due load the WP environment more than once.

- In first way is_admin() function will always get TRUE  even though you are in front-end.

Related links:

Now let say one situation you are working on a project in which you need several ajax functionality for all these you have created one common .PHP file and include wp-load.php or wp-config.php file and do your job. Now in future someone else going to work on this project and want to create some new ajax functionality as the new developer not aware about your file s/he will create a new .PHP and include wp-load.php or wp-config.php file and do his/her own job. So now What is the status of your site performance? What is the time complexity of your site? Think !!!

So, is there any other way to perform a ajax call without decreasing the site performance. Yes, there is a nice, tricky and easy way to do this.

Let us do a test:

Step1: Login as admin.
Step2: Create a page(say title My Ajax Test).
Step3: Note this page slug here slug is my-ajax-test
Step3: Note this page ID.
Step4: Create one file with name page-PAGEID.php or page-PAGESLUG.php and put it in your current theme root directory.
Step5: Provide this created page’s url for ajax functionality.
Step6: Write code in the above created file, in this file you have access to all WordPress functions, for ajax functionality.
Step7: DONE :)

What are you thinking, is not a good and perfect way to do ajax call in WordPress?

Now what if you want to create a plugin in which you need to implement some ajax functionality and plugin needs to be portable?

In this case create a page using code and create a page-PAGEID.php file in your current theme root directory. Place you ajaxed php code in this file using PHP file handeling functions.

I have created one sample plugin which will help you to understand this more clearly.

How to use the above plugin:
- Install the plugin.

- Goto widget section.

- Drag the ‘WordPress Better Ajax’ widget to any sidebar.

- Goto front end and click on ‘Click Me’.


- This procedure will not decrease your site performance.

- In a single file you can do all your ajax calls.

- If you directly access this page then it will give you a message indicating that you are in  wrong place.

Please comment what you are think about this.

Nov 22

How to create a order In Drupal programmatically

Today I got one strange requirement from my client and that is he has a Drupal website which is combined with NetSuite(NS), and he wants that if he create any order at NS end then this order will be create at Drupal end using web-services. So now the first question  ”How to create a order In Drupal programmatically”.

Following are the steps:

Step1: Create an new order with the help of below code:

// Create the new order in checkout status.
$order = commerce_order_new($uid, 'pending');

Step2: Load products which you want to add in your news order with the help of below code:

$product = commerce_product_load($product_id);
$line_item = commerce_product_line_item_new($product, 1, $order->order_id, array());

Note: You can do the same for multiple products in a single order.

Step3: Wrap up the order with the help of below code:

$order_wrapper = entity_metadata_wrapper('commerce_order', $order);
$order_wrapper->commerce_line_items[] = $line_item;

Step4: Save the order to database:


Step5: Done :)

Code together:

$uid = 'USER_ID';
$product_id = 'PRODUCT_ID';

$order = commerce_order_new($uid, ‘pending’);

$product = commerce_product_load($product_id);
$line_item = commerce_product_line_item_new($product, 1, $order->order_id, array());

$order_wrapper = entity_metadata_wrapper(‘commerce_order’, $order);
$order_wrapper->commerce_line_items[] = $line_item;



Create one link using hook_menu() and call a custom ‘page callback’ function and add the above code in this custome function and execute the newly created link in browser.

Nov 09

How to make compatible nextgen gallery with AWS plugin

From few peoples I heard that nextgen gallery plugin is not working with AWS plugin as it should and asking me How to make compatible nextgen gallery with AWS plugin? So I have work around it and come out with some solution explaining below:

- Create gallery and add images as per the rule of NGG.
- Show your created gallery as per the rule of NGG.
- Now find out the ID of the div in which all your gallery images are present.
- Put this ID in “AWS Options” admin form’s first field named “No ajax container IDs”.

- Now add the below code in AWS plugins ajaxify.js file just before the "$body.removeClass('loading');"(at line 179)
scriptNode = document.createElement('script');
scriptNode.setAttribute('src', rootUrl + 'wp-content/plugins/nextgen-gallery/js/jquery.cycle.all.min.js');

scriptNode = document.createElement(‘script’);
scriptNode.setAttribute(‘src’, rootUrl + ‘wp-content/plugins/nextgen-gallery/js/ngg.slideshow.min.js’);

scriptNode = document.createElement(‘script’);
scriptNode.setAttribute(‘src’, rootUrl + ‘wp-content/plugins/nextgen-gallery/shutter/shutter-reloaded.js’);

that’s it :)
- Example site link: